printf and Raylib TextFormat work!

This commit is contained in:
Krzosa Karol
2023-04-14 22:27:39 +02:00
parent 8c4975db35
commit 9b035e85af

View File

@@ -61,15 +61,12 @@ Add :: (a: *Array($T), item: T)
a.data = realloc(a.data, SizeOf(T) * a.cap->U64)
a.data[a.len++] = item
Memes :: (a: S32, ...)
pass
TextFormat :: #foreign (str: *char, ...): *char
main :: (): int
guys: Array(Guy)
Add(&guys, {pos = {100, 100}})
Memes(32, 32, 32, 32.42, "ASD")
InitWindow(1280, 720, "Testing")
SetTargetFPS(60)
for !WindowShouldClose()
@@ -85,7 +82,7 @@ main :: (): int
BeginDrawing()
ClearBackground(RAYWHITE)
DrawFPS(0, 0)
DrawText("Testing and stuff", 100, 100, 20, RAYWHITE)
DrawText(TextFormat("Testing %d", 32), 100, 100, 20, MAROON)
DrawCube({0,0,0}, 10, 10, 10, BLACK)
for i := 0, i < guys.len, i += 1
it := guys.data + i