diff options
| author | Raymaekers Luca <luca@spacehb.net> | 2025-10-31 17:35:54 +0100 |
|---|---|---|
| committer | Raymaekers Luca <luca@spacehb.net> | 2025-10-31 17:35:54 +0100 |
| commit | 600901d2e286d6aa8e762bc3e617c1345a671d15 (patch) | |
| tree | 30eb3f73680721e21f14eae4ad7c803f039ec745 /code/game.cpp | |
| parent | 8cc81f19a41cfa289c5cfb15945c4be134d757a7 (diff) | |
checkpointmain
Diffstat (limited to 'code/game.cpp')
| -rw-r--r-- | code/game.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/code/game.cpp b/code/game.cpp index c829ee6..2d7ef6b 100644 --- a/code/game.cpp +++ b/code/game.cpp @@ -7,7 +7,7 @@ #define BYTES_PER_PIXEL 4 //~ Libraries -#de,fine STB_SPRINTF_IMPLEMENTATION +#define STB_SPRINTF_IMPLEMENTATION #include "libs/stb_sprintf.h" #include "libs/handmade_math.h" @@ -28,9 +28,11 @@ u8 GlobalImageBuffer[WIDTH*HEIGHT*BYTES_PER_PIXEL]; //~ Functions //- Platform (js) #define external extern "C" -external void LogMessage(u32 Length, char* message); +external void LogMessage(u32 Length, char *Message); #define S_Len(String) (sizeof(String) - 1), (String) +external void JS_DrawText(u32 Length, char *Message, s32 X, s32 Y); + external r32 floor(r32 X); external r32 ceil(r32 X); external r32 sqrt(r32 X); @@ -207,12 +209,19 @@ UpdateAndRender(s32 Width, s32 Height, s32 BytesPerPixel, RenderRectangle(Buffer, Pitch, Width, Height, BytesPerPixel, MinX, MinY, MaxX, MaxY, Color); + + + +#if 0 + JS_DrawText(S_Len("hello world world world"), MinX, MinY + 16); +#endif + + } Toggle = !Toggle; } - #if 0 // Draw mouse pointer { |
