with Raylib; use Raylib; procedure Generation is type Texture_Index is ( Archery, Barracks, Blacksmith, Castle, House_1, House_2, House_3, Stable, Terrain, Tree_1, Tree_2, Tree_3 ); Texture_Array : array (Texture_Index) of Texture; Tile_Size : Natural := 64; -- Texture_Array (Terrain).Height/Width begin Open_Window (1280, 720, "Demo 1440 " & ASCII.NUL); -- 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; -- loop exit when Window_Should_Close; Begin_Drawing; -- 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 * Tile_Size, Y => Y * Tile_Size); 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 Unload_Texture (Texture_Array (I)); end loop; -- Close_Window; end Generation;