diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-10-09 13:26:28 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-10-09 13:26:28 -0400 |
| commit | 074cf22ad462eafe963e4a749b2b74cab51211a1 (patch) | |
| tree | e1d7f938f2d949cc5dcf67ca648f200663e36562 /examples/game | |
| parent | 47fca946065508cff4151a32b3008c161983fd9d (diff) | |
Change function syntax from `func(args)->ret` to `func(args -> ret)`
Diffstat (limited to 'examples/game')
| -rw-r--r-- | examples/game/game.tm | 6 | ||||
| -rw-r--r-- | examples/game/world.tm | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/game/game.tm b/examples/game/game.tm index c7d843e3..81aed45f 100644 --- a/examples/game/game.tm +++ b/examples/game/game.tm @@ -6,7 +6,7 @@ use <raymath.h> use ./world.tm func main(map=(./map.txt)): - extern InitWindow:func(w:Int32, h:Int32, title:CString)->Void + extern InitWindow:func(w:Int32, h:Int32, title:CString) InitWindow(1600, 900, "raylib [core] example - 2d camera") map_contents := map:read() or exit("Could not find the game map: $map") @@ -16,10 +16,10 @@ func main(map=(./map.txt)): extern SetTargetFPS:func(fps:Int32) SetTargetFPS(60) - extern WindowShouldClose:func()->Bool + extern WindowShouldClose:func(->Bool) while not WindowShouldClose(): - extern GetFrameTime:func()->Num32 + extern GetFrameTime:func(->Num32) dt := GetFrameTime() World.CURRENT:update(Num(dt)) diff --git a/examples/game/world.tm b/examples/game/world.tm index 6208d1c5..71c14bfd 100644 --- a/examples/game/world.tm +++ b/examples/game/world.tm @@ -6,7 +6,7 @@ use ./color.tm use ./box.tm # Return a displacement relative to `a` that will push it out of `b` -func solve_overlap(a_pos:Vec2, a_size:Vec2, b_pos:Vec2, b_size:Vec2)->Vec2: +func solve_overlap(a_pos:Vec2, a_size:Vec2, b_pos:Vec2, b_size:Vec2 -> Vec2): a_left := a_pos.x a_right := a_pos.x + a_size.x a_top := a_pos.y |
