|
|
@@ -28,16 +28,16 @@ package body world is |
|
|
|
begin |
|
|
|
core.echo (core.comment, "-- Procedurally generating new map..."); |
|
|
|
-- |
|
|
|
core.echo (core.comment, "-- -- Map type : " & index'image); |
|
|
|
core.echo (core.comment, "-- -- Map width :" & width'image); |
|
|
|
core.echo (core.comment, "-- -- Map height :" & height'image); |
|
|
|
core.echo (core.comment, "-- -- Landmark count :" & landmark_limit'image); |
|
|
|
core.echo (core.comment, "-- -- Map type : " & index'image); |
|
|
|
core.echo (core.comment, "-- -- Map width :" & width'image); |
|
|
|
core.echo (core.comment, "-- -- Map height :" & height'image); |
|
|
|
core.echo (core.comment, "-- -- Landmark count :" & landmark_limit'image); |
|
|
|
-- |
|
|
|
map.kind := index; |
|
|
|
map.width := width; |
|
|
|
map.height := height; |
|
|
|
map.tiles := new tile_array (0 .. map.width - 1, 0 .. map.height - 1); |
|
|
|
map.landmarks := new landmark_array (1 .. landmark_limit); |
|
|
|
map.tiles := new tile_array (0 .. map.width - 1, 0 .. map.height - 1); |
|
|
|
map.landmarks := new entity_array (1 .. landmark_limit); |
|
|
|
-- |
|
|
|
for x in 0 .. width - 1 loop |
|
|
|
for y in 0 .. height - 1 loop |
|
|
@@ -46,11 +46,12 @@ package body world is |
|
|
|
end loop; |
|
|
|
-- |
|
|
|
for index in 1 .. landmark_limit loop |
|
|
|
map.landmarks (index).index := landmark_index'val (core.random (0, 8)); |
|
|
|
map.landmarks (index).index := core.random (0, 8); |
|
|
|
map.landmarks (index).x := core.random (0, map.width - 1); |
|
|
|
map.landmarks (index).y := core.random (0, map.height - 1); |
|
|
|
end loop; |
|
|
|
-- |
|
|
|
-- |
|
|
|
core.echo (core.success, "Finished procedurally generating new map."); |
|
|
|
end make; |
|
|
|
|
|
|
@@ -94,7 +95,7 @@ package body world is |
|
|
|
end loop; |
|
|
|
-- |
|
|
|
for index in 1 .. landmark_limit loop |
|
|
|
core.draw (data => landmarks (map.landmarks (index).index), |
|
|
|
core.draw (data => landmarks (landmark_index'val (map.landmarks (index).index)), |
|
|
|
x => offset.x + (map.landmarks (index).x - core.camera.x) * core.base * core.zoom, |
|
|
|
y => offset.y + (map.landmarks (index).y - core.camera.y) * core.base * core.zoom); |
|
|
|
end loop; |
|
|
|