Minor changes that ease the work...
This commit is contained in:
parent
206bd28fa8
commit
0653ca2f57
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
source/*.o
|
||||
source/*.ali
|
||||
xhads
|
||||
song/*
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, ui, ai;
|
||||
|
||||
use ai;
|
||||
|
||||
package body ai is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, ui, attribute;
|
||||
|
||||
use attribute;
|
||||
|
||||
package body attribute is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, ui, faction, chad;
|
||||
|
||||
use chad;
|
||||
|
||||
package body chad is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, effect, resource, faction, construction;
|
||||
|
||||
use construction;
|
||||
|
||||
package body construction is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core;
|
||||
|
||||
use core;
|
||||
|
||||
package body core is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@ -85,6 +83,18 @@ package body core is
|
||||
procedure pause_sound (data : sound) with import => true, convention => c, external_name => "PauseSound";
|
||||
procedure resume_sound (data : sound) with import => true, convention => c, external_name => "ResumeSound";
|
||||
|
||||
procedure megadraw (
|
||||
data : texture;
|
||||
uv : rectangle;
|
||||
view : rectangle;
|
||||
origin : vessel;
|
||||
rotate : float;
|
||||
tint : color
|
||||
) with
|
||||
import => true,
|
||||
convention => c,
|
||||
external_name => "DrawTexturePro";
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
texture_count : integer := 0;
|
||||
@ -482,6 +492,12 @@ package body core is
|
||||
uv => (float (u), float (v), float (width), float (height)),
|
||||
view => (float (x), float (y)),
|
||||
tint => (255, 255, 255, 255));
|
||||
--~megadraw (data => texture_array (sprite),
|
||||
--~uv => (float (u), float (v), float (width), float (height)),
|
||||
--~view => (0.0, 0.0, float (x), float (y)),
|
||||
--~origin => (0.0, 0.0),
|
||||
--~rotate => 0.0,
|
||||
--~tint => (255, 255, 255, 255));
|
||||
end render_sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, deity;
|
||||
|
||||
use deity;
|
||||
|
||||
package body deity is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, effect;
|
||||
|
||||
use effect;
|
||||
|
||||
package body effect is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, attribute, skill, resource, faction;
|
||||
|
||||
use faction;
|
||||
|
||||
package body faction is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, item;
|
||||
|
||||
use item;
|
||||
|
||||
package body item is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, ui, effect, magic;
|
||||
|
||||
use magic;
|
||||
|
||||
package body magic is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, ui, effect, might;
|
||||
|
||||
use might;
|
||||
|
||||
package body might is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, ui, resource;
|
||||
|
||||
use resource;
|
||||
|
||||
package body resource is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, ui, skill;
|
||||
|
||||
use skill;
|
||||
|
||||
package body skill is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, ui;
|
||||
|
||||
use ui;
|
||||
|
||||
package body ui is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -4,8 +4,6 @@
|
||||
|
||||
with core, ui, effect, attribute, faction, unit;
|
||||
|
||||
use unit;
|
||||
|
||||
package body unit is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -2,11 +2,8 @@
|
||||
--
|
||||
-- GNU General Public Licence (version 3 or later)
|
||||
|
||||
--~with ada.strings.fixed;
|
||||
with core, resource, item, unit, construction, world;
|
||||
|
||||
use world;
|
||||
|
||||
package body world is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
@ -40,12 +37,12 @@ package body world is
|
||||
--
|
||||
for index in codex
|
||||
loop
|
||||
landmarks (index) := new sprite_array (0 .. limit (index));
|
||||
for value in 0 .. limit (index)
|
||||
landmarks (index) := new sprite_array (0 .. limit (index) - 1);
|
||||
--
|
||||
for value in 0 .. limit (index) - 1
|
||||
loop
|
||||
declare
|
||||
folder : constant string := core.lowercase (codex'image (index));
|
||||
--~file : constant string := ada.strings.fixed.trim (value'image, ada.strings.left);
|
||||
file : constant string := value'image;
|
||||
begin
|
||||
landmarks (index) (value) := core.import_sprite ("./sprite/world/landmark/" & folder & "/" & file & ".png", 1, 1);
|
||||
@ -59,6 +56,7 @@ package body world is
|
||||
procedure make (index : in codex; width, height : in natural) 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);
|
||||
@ -84,7 +82,7 @@ package body world is
|
||||
--
|
||||
for object in 0 .. landmark_limit
|
||||
loop
|
||||
map.landmark (object).index := core.random_integer (0, limit (index));
|
||||
map.landmark (object).index := core.random_integer (0, limit (index) - 1);
|
||||
map.landmark (object).x := core.base * core.random_integer (1, map.width - 1);
|
||||
map.landmark (object).y := core.base * core.random_integer (1, map.height - 1);
|
||||
end loop;
|
||||
|
Loading…
Reference in New Issue
Block a user