Generation example and rescaling...
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
||||
*.ali
|
||||
window
|
||||
preview
|
||||
generation
|
||||
|
@ -18,6 +18,6 @@ gnatlink generation.ali -lraylib
|
||||
|
||||
mv window ../window
|
||||
mv preview ../preview
|
||||
mv preview ../generation
|
||||
mv generation ../generation
|
||||
|
||||
exit
|
||||
|
@ -1,7 +1,7 @@
|
||||
with Raylib;
|
||||
use Raylib;
|
||||
|
||||
procedure Preview is
|
||||
procedure Generation is
|
||||
|
||||
type Texture_Index is (
|
||||
Archery,
|
||||
@ -23,29 +23,43 @@ procedure Preview is
|
||||
begin
|
||||
Open_Window (1280, 720, "Pandemos Empire" & ASCII.NUL);
|
||||
--
|
||||
for I in Texture_Index
|
||||
loop
|
||||
Set_Exit_Key (Key_Q);
|
||||
Set_Target_FPS (1);
|
||||
--
|
||||
for I in Texture_Index loop
|
||||
Texture_Array (I) := Load_Texture ("./example/resource/"
|
||||
& Texture_Index'Image (I)
|
||||
& ".png"
|
||||
& ASCII.NUL);
|
||||
end loop;
|
||||
--
|
||||
until Window_Should_Close
|
||||
loop
|
||||
loop exit when Window_Should_Close;
|
||||
Begin_Drawing;
|
||||
for Y in 0 .. Get_Screen_Height / Terrain.Height - 2
|
||||
for X in 0 .. Get_Screen_Width / Terrain.Width - 2
|
||||
--
|
||||
for Y in 0 .. Get_Screen_Height / Texture_Array (Terrain).Height loop
|
||||
for X in 0 .. Get_Screen_Width / Texture_Array (Terrain).Width loop
|
||||
Draw_Texture (Data => Texture_Array (Terrain),
|
||||
X => X * Terrain.Width,
|
||||
Y => Y * Terrain.Height);
|
||||
X => X * Texture_Array (Terrain).Width,
|
||||
Y => Y * Texture_Array (Terrain).Height);
|
||||
end loop;
|
||||
end loop;
|
||||
--
|
||||
for Building in Archery .. Stable loop
|
||||
Draw_Texture (Data => Texture_Array (Building),
|
||||
X => Get_Random_Value(0, Get_Screen_Width),
|
||||
Y => Get_Random_Value(0, Get_Screen_Height));
|
||||
end loop;
|
||||
--
|
||||
Draw_Texture (Texture_Array (Tree_1));
|
||||
Draw_Texture (Texture_Array (Tree_2), 640, 360);
|
||||
Draw_Texture (Texture_Array (Tree_3), 960, 360);
|
||||
--
|
||||
End_Drawing;
|
||||
end loop;
|
||||
--
|
||||
for I in Texture_Index
|
||||
loop
|
||||
for I in Texture_Index loop
|
||||
Unload_Texture (Texture_Array (I));
|
||||
end loop;
|
||||
--
|
||||
Close_Window;
|
||||
end Preview;
|
||||
end Generation;
|
||||
|
@ -15,7 +15,7 @@ begin
|
||||
Begin_Drawing;
|
||||
Draw_Texture (Map);
|
||||
End_Drawing;
|
||||
end loop Main_Loop;
|
||||
end loop;
|
||||
--
|
||||
Unload_Texture (Map);
|
||||
--
|
||||
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 377 KiB After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 204 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 21 KiB |