Generation example and rescaling...
1
.gitignore
vendored
@ -2,3 +2,4 @@
|
|||||||
*.ali
|
*.ali
|
||||||
window
|
window
|
||||||
preview
|
preview
|
||||||
|
generation
|
||||||
|
@ -18,6 +18,6 @@ gnatlink generation.ali -lraylib
|
|||||||
|
|
||||||
mv window ../window
|
mv window ../window
|
||||||
mv preview ../preview
|
mv preview ../preview
|
||||||
mv preview ../generation
|
mv generation ../generation
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
with Raylib;
|
with Raylib;
|
||||||
use Raylib;
|
use Raylib;
|
||||||
|
|
||||||
procedure Preview is
|
procedure Generation is
|
||||||
|
|
||||||
type Texture_Index is (
|
type Texture_Index is (
|
||||||
Archery,
|
Archery,
|
||||||
@ -23,29 +23,43 @@ procedure Preview is
|
|||||||
begin
|
begin
|
||||||
Open_Window (1280, 720, "Pandemos Empire" & ASCII.NUL);
|
Open_Window (1280, 720, "Pandemos Empire" & ASCII.NUL);
|
||||||
--
|
--
|
||||||
for I in Texture_Index
|
Set_Exit_Key (Key_Q);
|
||||||
loop
|
Set_Target_FPS (1);
|
||||||
|
--
|
||||||
|
for I in Texture_Index loop
|
||||||
Texture_Array (I) := Load_Texture ("./example/resource/"
|
Texture_Array (I) := Load_Texture ("./example/resource/"
|
||||||
& Texture_Index'Image (I)
|
& Texture_Index'Image (I)
|
||||||
& ".png"
|
& ".png"
|
||||||
& ASCII.NUL);
|
& ASCII.NUL);
|
||||||
end loop;
|
end loop;
|
||||||
--
|
--
|
||||||
until Window_Should_Close
|
loop exit when Window_Should_Close;
|
||||||
loop
|
|
||||||
Begin_Drawing;
|
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),
|
Draw_Texture (Data => Texture_Array (Terrain),
|
||||||
X => X * Terrain.Width,
|
X => X * Texture_Array (Terrain).Width,
|
||||||
Y => Y * Terrain.Height);
|
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_Drawing;
|
||||||
end loop;
|
end loop;
|
||||||
--
|
--
|
||||||
for I in Texture_Index
|
for I in Texture_Index loop
|
||||||
loop
|
|
||||||
Unload_Texture (Texture_Array (I));
|
Unload_Texture (Texture_Array (I));
|
||||||
end loop;
|
end loop;
|
||||||
--
|
--
|
||||||
Close_Window;
|
Close_Window;
|
||||||
end Preview;
|
end Generation;
|
||||||
|
@ -15,7 +15,7 @@ begin
|
|||||||
Begin_Drawing;
|
Begin_Drawing;
|
||||||
Draw_Texture (Map);
|
Draw_Texture (Map);
|
||||||
End_Drawing;
|
End_Drawing;
|
||||||
end loop Main_Loop;
|
end loop;
|
||||||
--
|
--
|
||||||
Unload_Texture (Map);
|
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 |