aboutsummaryrefslogtreecommitdiff
path: root/src/main.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.odin')
-rw-r--r--src/main.odin5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.odin b/src/main.odin
index e7559ea..03b95cd 100644
--- a/src/main.odin
+++ b/src/main.odin
@@ -89,8 +89,13 @@ main :: proc() {
DAY_HEIGHT*i32(i+1)-4, width-170, DAY_HEIGHT-1, BLUE)
}
+ // TODO: This is bad, figure out how to overwrite the existing memory instead
+ // of doing these horrible repeated allocations and deallocations
call_text = strings.clone_to_cstring(clockprint(day.call))
+ defer delete(call_text)
wrap_text = strings.clone_to_cstring(clockprint(day.wrap))
+ defer delete(wrap_text)
+
text_height = math.round(f32(i+1)*DAY_HEIGHT+(DAY_HEIGHT-font_size)*0.25)
DrawTextEx(font, call_text, {20, text_height}, font_size, 0, RAYWHITE);