aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorxolatile2024-04-23 15:34:14 -0400
committerxolatile2024-04-23 15:34:14 -0400
commitad15946d12814bd04473f31ec0bea650e67cf8e8 (patch)
treee49b1b273577ff97233dbb8a3d6a380b8fcc94c4 /example
parent9b449a07b780c7a86fa52c708496b0cf8d37499c (diff)
downloadxolatile-raylib-ada-master.tar.xz
xolatile-raylib-ada-master.tar.zst
Update to generation...HEADmaster
Diffstat (limited to 'example')
-rw-r--r--example/generation.adb12
1 files changed, 7 insertions, 5 deletions
diff --git a/example/generation.adb b/example/generation.adb
index 0c36181..6dbeb82 100644
--- a/example/generation.adb
+++ b/example/generation.adb
@@ -20,8 +20,10 @@ procedure Generation is
Texture_Array : array (Texture_Index) of Texture;
+ Tile_Size : Natural := 64; -- Texture_Array (Terrain).Height/Width
+
begin
- Open_Window (1280, 720, "Pandemos Empire" & ASCII.NUL);
+ Open_Window (1280, 720, "Demo 1440 <Q to Quit>" & ASCII.NUL);
--
Set_Exit_Key (Key_Q);
Set_Target_FPS (1);
@@ -36,11 +38,11 @@ begin
loop exit when Window_Should_Close;
Begin_Drawing;
--
- for Y in 0 .. Get_Screen_Height / Texture_Array (Terrain).Height loop
- for X in 0 .. Get_Screen_Width / Texture_Array (Terrain).Width loop
+ for Y in 0 .. Get_Screen_Height / Tile_Size loop
+ for X in 0 .. Get_Screen_Width / Tile_Size loop
Draw_Texture (Data => Texture_Array (Terrain),
- X => X * Texture_Array (Terrain).Width,
- Y => Y * Texture_Array (Terrain).Height);
+ X => X * Tile_Size,
+ Y => Y * Tile_Size);
end loop;
end loop;
--