aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild/handmade.sobin0 -> 266560 bytes
-rwxr-xr-xbuild/linux_handmadebin0 -> 93272 bytes
-rwxr-xr-xcode/build.sh1
-rw-r--r--code/handmade.cpp24
4 files changed, 12 insertions, 13 deletions
diff --git a/build/handmade.so b/build/handmade.so
new file mode 100755
index 0000000..97625ad
--- /dev/null
+++ b/build/handmade.so
Binary files differ
diff --git a/build/linux_handmade b/build/linux_handmade
new file mode 100755
index 0000000..af7fdb1
--- /dev/null
+++ b/build/linux_handmade
Binary files differ
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 a027526..3f41a1b 100644
--- a/code/handmade.cpp
+++ b/code/handmade.cpp
@@ -1,5 +1,4 @@
#include "handmade.h"
-#include "handmade_random.h"
#include <curl/curl.h>
#define STB_SPRINTF_IMPLEMENTATION
@@ -27,7 +26,7 @@ GetColorRGBForColorIndex(u32 Index)
#define MemoryCopy memcpy
-psize StringLength(char *String)
+psize CStringLength(char *String)
{
psize Result = 0;
@@ -1118,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",
@@ -1128,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;
}