aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/game/game.tm8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/game/game.tm b/examples/game/game.tm
index 368d17af..362eae04 100644
--- a/examples/game/game.tm
+++ b/examples/game/game.tm
@@ -6,14 +6,14 @@ use file
use ./world.tm
-func main():
+func main(map="map.txt"):
extern InitWindow:func(w:Int32, h:Int32, title:CString)->Void
InitWindow(1600, 900, "raylib [core] example - 2d camera")
- map := when read("map.txt") is Success(m): m
- else: exit(code=1, "Could not find the game map!")
+ map_contents := when read(map) is Success(m): m
+ else: exit(code=1, "Could not find the game map: $map")
- World.CURRENT:load_map(map)
+ World.CURRENT:load_map(map_contents)
extern SetTargetFPS:func(fps:Int32)
SetTargetFPS(60)