This commit is contained in:
nub31
2025-08-18 16:56:20 +02:00
parent 860e1fd0e4
commit f80be58fed
5 changed files with 73 additions and 153 deletions

View File

@@ -1,49 +0,0 @@
// c
extern func puts(text: cstring)
// raylib
extern func InitWindow(width: i32, height: i32, title: cstring)
extern func CloseWindow()
extern func WindowShouldClose(): bool
extern func BeginDrawing()
extern func EndDrawing()
extern func ClearBackground(color: Color)
extern func DrawCircle(centerX: i32, centerY: i32, radius: f32, color: Color)
struct Color
{
r: u8
g: u8
b: u8
a: u8
}
struct Vector2
{
x: f32
y: f32
}
struct Vector3
{
x: f32
y: f32
z: f32
}
func main(args: []cstring): i64
{
InitWindow(800, 600, "Hello from nub!")
while !WindowShouldClose()
{
BeginDrawing()
ClearBackground(struct { r = 55 g = 55 b = 55 a = 255 })
DrawCircle(400, 300, 50, struct { r = 255 g = 255 b = 0 a = 0 })
EndDrawing()
}
CloseWindow()
return 0
}