Consistency related factoring, default record values and more...
This commit is contained in:
parent
b58a2f0529
commit
8329dffae2
@ -15,9 +15,9 @@ package attribute is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type definition is record
|
type definition is record
|
||||||
base : core.point;
|
base : core.point := (0, 0);
|
||||||
name : access string;
|
name : access string := new string'("--");
|
||||||
text : access string;
|
text : access string := new string'("--");
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type points is array (enumeration) of core.point;
|
type points is array (enumeration) of core.point;
|
||||||
|
@ -15,17 +15,17 @@ package chad is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type definition is record
|
type definition is record
|
||||||
name : access string;
|
name : access string := new string'("--");
|
||||||
title : access string;
|
title : access string := new string'("--");
|
||||||
kind : faction.enumeration;
|
kind : faction.enumeration := faction.neutral;
|
||||||
bonus_attribute : attribute.enumeration;
|
bonus_attribute : attribute.enumeration := attribute.enumeration'first;
|
||||||
bonus_skill : skill.enumeration;
|
bonus_skill : skill.enumeration := skill.enumeration'first;
|
||||||
bonus_resource : resource.enumeration;
|
bonus_resource : resource.enumeration := resource.enumeration'first;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type information is record
|
type information is record
|
||||||
index : enumeration := ada;
|
index : enumeration := enumeration'first;
|
||||||
state : core.animation := core.idle;
|
state : core.animation := core.animation'first;
|
||||||
level : natural := 1;
|
level : natural := 1;
|
||||||
x : integer := 0;
|
x : integer := 0;
|
||||||
y : integer := 0;
|
y : integer := 0;
|
||||||
|
@ -15,17 +15,17 @@ package construction is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type definition is record
|
type definition is record
|
||||||
name : access string;
|
name : access string := new string'("--");
|
||||||
kind : faction.enumeration;
|
kind : faction.enumeration := faction.neutral;
|
||||||
price : resource.price;
|
price : resource.price := (others => 0);
|
||||||
frames : natural;
|
frames : natural := 0;
|
||||||
evoke : effect.information;
|
evoke : effect.information := effect.none;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type information is record
|
type information is record
|
||||||
index : enumeration;
|
index : enumeration := enumeration'first;
|
||||||
x : integer;
|
x : integer := 0;
|
||||||
y : integer;
|
y : integer := 0;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type informations is array (natural range <>) of information;
|
type informations is array (natural range <>) of information;
|
||||||
|
@ -57,7 +57,8 @@ package core is
|
|||||||
type song is record index : integer; end record;
|
type song is record index : integer; end record;
|
||||||
|
|
||||||
type point is record
|
type point is record
|
||||||
value, limit : natural;
|
value : natural := 0;
|
||||||
|
limit : natural := 0;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type string_box_data is record
|
type string_box_data is record
|
||||||
|
@ -17,12 +17,12 @@ package deity is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type definition is record
|
type definition is record
|
||||||
name : access string;
|
name : access string := new string'("--");
|
||||||
favor : integer;
|
favor : integer := 0;
|
||||||
loved_faction : faction.enumeration;
|
loved_faction : faction.enumeration := faction.neutral;
|
||||||
bonus_attribute : attribute.enumeration;
|
bonus_attribute : attribute.enumeration := attribute.enumeration'first;
|
||||||
bonus_skill : skill.enumeration;
|
bonus_skill : skill.enumeration := skill.enumeration'first;
|
||||||
bonus_resource : resource.enumeration;
|
bonus_resource : resource.enumeration := resource.enumeration'first;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
@ -43,7 +43,7 @@ package deity is
|
|||||||
XORANA => (new string'("Xorana"), -120, faction.neutral, attribute.wisdom, skill.eremnokinesis, resource.metal)
|
XORANA => (new string'("Xorana"), -120, faction.neutral, attribute.wisdom, skill.eremnokinesis, resource.metal)
|
||||||
);
|
);
|
||||||
|
|
||||||
sprite : array (enumeration) of core.sprite;
|
game : array (enumeration) of core.sprite;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ package effect is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type information is record
|
type information is record
|
||||||
kind : enumeration := idle;
|
kind : enumeration := enumeration'first;
|
||||||
modifier : integer := 0;
|
modifier : integer := 0;
|
||||||
amount : integer := 0;
|
amount : integer := 0;
|
||||||
permanent : boolean := false;
|
permanent : boolean := false;
|
||||||
|
@ -53,9 +53,9 @@ package equipment is
|
|||||||
end record;
|
end record;
|
||||||
|
|
||||||
type information is record
|
type information is record
|
||||||
index : enumeration;
|
index : enumeration := enumeration'first;
|
||||||
x : integer;
|
x : integer := 0;
|
||||||
y : integer;
|
y : integer := 0;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type informations is array (natural range <>) of information;
|
type informations is array (natural range <>) of information;
|
||||||
|
@ -16,10 +16,10 @@ package faction is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type definition is record
|
type definition is record
|
||||||
name : access string;
|
name : access string := new string'("--");
|
||||||
bonus_attribute : attribute.enumeration;
|
bonus_attribute : attribute.enumeration := attribute.enumeration'first;
|
||||||
bonus_skill : skill.enumeration;
|
bonus_skill : skill.enumeration := skill.enumeration'first;
|
||||||
bonus_resource : resource.enumeration;
|
bonus_resource : resource.enumeration := resource.enumeration'first;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
@ -39,7 +39,8 @@ package faction is
|
|||||||
neutral => (new string'("Neutral"), attribute.offense, skill.archery, resource.gold)
|
neutral => (new string'("Neutral"), attribute.offense, skill.archery, resource.gold)
|
||||||
);
|
);
|
||||||
|
|
||||||
sprite : array (enumeration) of core.sprite;
|
icon : array (enumeration) of core.sprite;
|
||||||
|
view : array (enumeration) of core.sprite;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -19,16 +19,16 @@ package landmark is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type definition is record
|
type definition is record
|
||||||
name : access string;
|
name : access string := new string'("--");
|
||||||
spawn : biome.enumeration;
|
spawn : biome.enumeration := biome.enumeration'first;
|
||||||
clip : boolean;
|
clip : boolean := false;
|
||||||
frames : integer;
|
frames : integer := 0;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type information is record
|
type information is record
|
||||||
index : enumeration;
|
index : enumeration := enumeration'first;
|
||||||
x : integer;
|
x : integer := 0;
|
||||||
y : integer;
|
y : integer := 0;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type informations is array (natural range <>) of information;
|
type informations is array (natural range <>) of information;
|
||||||
|
@ -17,17 +17,17 @@ package location is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type definition is record
|
type definition is record
|
||||||
name : access string;
|
name : access string := new string'("--");
|
||||||
clip : boolean;
|
clip : boolean := false;
|
||||||
frames : integer;
|
frames : integer := 0;
|
||||||
evoke : effect.information;
|
evoke : effect.information := effect.none;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type information is record
|
type information is record
|
||||||
index : enumeration;
|
index : enumeration := enumeration'first;
|
||||||
used : boolean;
|
used : boolean := false;
|
||||||
x : integer;
|
x : integer := 0;
|
||||||
y : integer;
|
y : integer := 0;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type informations is array (natural range <>) of information;
|
type informations is array (natural range <>) of information;
|
||||||
|
@ -25,7 +25,7 @@ package material is
|
|||||||
end record;
|
end record;
|
||||||
|
|
||||||
type point is record
|
type point is record
|
||||||
index : enumeration := none;
|
index : enumeration := enumeration'first;
|
||||||
value : natural := 0;
|
value : natural := 0;
|
||||||
limit : natural := 0;
|
limit : natural := 0;
|
||||||
end record;
|
end record;
|
||||||
|
@ -15,9 +15,9 @@ package resource is
|
|||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type definition is record
|
type definition is record
|
||||||
base : core.point;
|
base : core.point := (0, 0);
|
||||||
name : access string;
|
name : access string := new string'("--");
|
||||||
text : access string;
|
text : access string := new string'("--");
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
type points is array (enumeration) of core.point;
|
type points is array (enumeration) of core.point;
|
||||||
|
@ -24,7 +24,7 @@ package skill is
|
|||||||
end record;
|
end record;
|
||||||
|
|
||||||
type point is record
|
type point is record
|
||||||
index : enumeration := none;
|
index : enumeration := enumeration'first;
|
||||||
value : natural := 0;
|
value : natural := 0;
|
||||||
limit : natural := 0;
|
limit : natural := 0;
|
||||||
end record;
|
end record;
|
||||||
|
@ -47,12 +47,6 @@ package body ui is
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type rectangle is record
|
|
||||||
x, y, width, height : integer;
|
|
||||||
end record;
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
font_tint : array (style) of core.colour := (
|
font_tint : array (style) of core.colour := (
|
||||||
main => (127, 127, 127, 255),
|
main => (127, 127, 127, 255),
|
||||||
fairy => ( 0, 127, 255, 255),
|
fairy => ( 0, 127, 255, 255),
|
||||||
|
@ -29,7 +29,7 @@ package unit is
|
|||||||
end record;
|
end record;
|
||||||
|
|
||||||
type information is record
|
type information is record
|
||||||
index : enumeration := none;
|
index : enumeration := enumeration'first;
|
||||||
state : core.animation := core.idle;
|
state : core.animation := core.idle;
|
||||||
x : integer := 0;
|
x : integer := 0;
|
||||||
y : integer := 0;
|
y : integer := 0;
|
||||||
|
@ -160,7 +160,7 @@ package body world is
|
|||||||
core.echo (core.comment, "Configuring" & deity.count'image & " deity components...");
|
core.echo (core.comment, "Configuring" & deity.count'image & " deity components...");
|
||||||
--
|
--
|
||||||
for index in deity.enumeration loop
|
for index in deity.enumeration loop
|
||||||
deity.sprite (index) := core.import_sprite (core.folder & "/game/deity/" & deity.enumeration'image (index) & ".png", 4, 1);
|
deity.game (index) := core.import_sprite (core.folder & "/game/deity/" & deity.enumeration'image (index) & ".png", 4, 1);
|
||||||
end loop;
|
end loop;
|
||||||
--
|
--
|
||||||
core.echo (core.comment, "Configuring" & construction.count'image & " construction components...");
|
core.echo (core.comment, "Configuring" & construction.count'image & " construction components...");
|
||||||
|
@ -17,24 +17,24 @@ package world is
|
|||||||
type boolean_matrix is array (natural range <>, natural range <>) of boolean;
|
type boolean_matrix is array (natural range <>, natural range <>) of boolean;
|
||||||
|
|
||||||
type definition is record
|
type definition is record
|
||||||
kind : biome.enumeration;
|
kind : biome.enumeration := biome.enumeration'first;
|
||||||
width : natural;
|
width : natural := 0;
|
||||||
height : natural;
|
height : natural := 0;
|
||||||
tiles : access integer_matrix;
|
tiles : access integer_matrix := null;
|
||||||
clips : access boolean_matrix;
|
clips : access boolean_matrix := null;
|
||||||
views : access boolean_matrix;
|
views : access boolean_matrix := null;
|
||||||
landmark_count : core.point;
|
landmark_count : core.point := (0, 0);
|
||||||
location_count : core.point;
|
location_count : core.point := (0, 0);
|
||||||
construction_count : core.point;
|
construction_count : core.point := (0, 0);
|
||||||
equipment_count : core.point;
|
equipment_count : core.point := (0, 0);
|
||||||
unit_count : core.point;
|
unit_count : core.point := (0, 0);
|
||||||
chad_count : core.point;
|
chad_count : core.point := (0, 0);
|
||||||
landmarks : access landmark.informations;
|
landmarks : access landmark.informations := null;
|
||||||
locations : access location.informations;
|
locations : access location.informations := null;
|
||||||
constructions : access construction.informations;
|
constructions : access construction.informations := null;
|
||||||
equipments : access equipment.informations;
|
equipments : access equipment.informations := null;
|
||||||
units : access unit.informations;
|
units : access unit.informations := null;
|
||||||
chads : access chad.informations;
|
chads : access chad.informations := null;
|
||||||
end record;
|
end record;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user