From 9f7f4eb858d723b0d4fc954b1575feb05f0f8134 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 8 Sep 2024 19:53:28 -0400 Subject: Take map as a CLI parameter --- examples/game/game.tm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') 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) -- cgit v1.2.3