diff options
| -rwxr-xr-x | build/handmade.so | bin | 264728 -> 264736 bytes | |||
| -rwxr-xr-x | build/linux_handmade | bin | 88824 -> 88824 bytes | |||
| -rwxr-xr-x | code/build.sh | 1 | ||||
| -rw-r--r-- | code/handmade.cpp | 23 |
4 files changed, 12 insertions, 12 deletions
diff --git a/build/handmade.so b/build/handmade.so Binary files differindex 1805456..daf4888 100755 --- a/build/handmade.so +++ b/build/handmade.so diff --git a/build/linux_handmade b/build/linux_handmade Binary files differindex f570a08..1b03ed9 100755 --- a/build/linux_handmade +++ b/build/linux_handmade diff --git a/code/build.sh b/code/build.sh index 9575bfe..8244c49 100755 --- a/code/build.sh +++ b/code/build.sh @@ -34,6 +34,7 @@ WarningFlags="-Wall " ClangCompilerFlags=" +-fdiagnostics-absolute-paths -ftime-trace " ClangWarningFlags=" diff --git a/code/handmade.cpp b/code/handmade.cpp index 277ab6c..3f41a1b 100644 --- a/code/handmade.cpp +++ b/code/handmade.cpp @@ -26,7 +26,7 @@ GetColorRGBForColorIndex(u32 Index) #define MemoryCopy memcpy -psize StringLength(char *String) +psize CStringLength(char *String) { psize Result = 0; @@ -1117,7 +1117,7 @@ extern "C" GAME_UPDATE_AND_RENDER(GameUpdateAndRender) { r32 FontScale = stbtt_ScaleForPixelHeight(&DefaultFont.Info, 20.0); - char *Sentences[] = + char *HelpLines[] = { "key binds", "- [Enter] to use new word", @@ -1127,25 +1127,24 @@ extern "C" GAME_UPDATE_AND_RENDER(GameUpdateAndRender) "- [Left Button] paint with color", "- [Scroll Up/Down] change color", }; - u32 SentencesCount = ArrayCount(Sentences); - u8 *Text = 0; - u32 TextLen = 0; - color_rgb TextColor = {0.8f, 0.8f, 0.8f}; + u32 LinesCount = ArrayCount(HelpLines); + // color_rgb TextColor = {0.8f, 0.8f, 0.8f}; + color_rgb TextColor = {0.71f, 0.62f, 0.53f}; v2 Offset = {650.0f, 50.0f}; YAdvance = FontScale*(DefaultFont.Ascent - DefaultFont.Descent + DefaultFont.LineGap); - for(u32 SentencesIndex = 0; - SentencesIndex < ArrayCount(Sentences); - SentencesIndex++) + for(u32 LinesIndex = 0; + LinesIndex < ArrayCount(HelpLines); + LinesIndex++) { - Text = (u8 *)Sentences[SentencesIndex]; - TextLen = StringLength((char *)Text); + char *Text = HelpLines[LinesIndex]; + u32 TextLen = CStringLength(Text); DrawText(Buffer, &DefaultFont, FontScale, - TextLen, Text, Offset, TextColor, false); + TextLen, (u8 *)Text, Offset, TextColor, false); Offset.Y += YAdvance; } |
