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
|
||||
base : core.point;
|
||||
name : access string;
|
||||
text : access string;
|
||||
base : core.point := (0, 0);
|
||||
name : access string := new string'("--");
|
||||
text : access string := new string'("--");
|
||||
end record;
|
||||
|
||||
type points is array (enumeration) of core.point;
|
||||
|
@ -15,17 +15,17 @@ package chad is
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
type definition is record
|
||||
name : access string;
|
||||
title : access string;
|
||||
kind : faction.enumeration;
|
||||
bonus_attribute : attribute.enumeration;
|
||||
bonus_skill : skill.enumeration;
|
||||
bonus_resource : resource.enumeration;
|
||||
name : access string := new string'("--");
|
||||
title : access string := new string'("--");
|
||||
kind : faction.enumeration := faction.neutral;
|
||||
bonus_attribute : attribute.enumeration := attribute.enumeration'first;
|
||||
bonus_skill : skill.enumeration := skill.enumeration'first;
|
||||
bonus_resource : resource.enumeration := resource.enumeration'first;
|
||||
end record;
|
||||
|
||||
type information is record
|
||||
index : enumeration := ada;
|
||||
state : core.animation := core.idle;
|
||||
index : enumeration := enumeration'first;
|
||||
state : core.animation := core.animation'first;
|
||||
level : natural := 1;
|
||||
x : integer := 0;
|
||||
y : integer := 0;
|
||||
|
@ -15,17 +15,17 @@ package construction is
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
type definition is record
|
||||
name : access string;
|
||||
kind : faction.enumeration;
|
||||
price : resource.price;
|
||||
frames : natural;
|
||||
evoke : effect.information;
|
||||
name : access string := new string'("--");
|
||||
kind : faction.enumeration := faction.neutral;
|
||||
price : resource.price := (others => 0);
|
||||
frames : natural := 0;
|
||||
evoke : effect.information := effect.none;
|
||||
end record;
|
||||
|
||||
type information is record
|
||||
index : enumeration;
|
||||
x : integer;
|
||||
y : integer;
|
||||
index : enumeration := enumeration'first;
|
||||
x : integer := 0;
|
||||
y : integer := 0;
|
||||
end record;
|
||||
|
||||
type informations is array (natural range <>) of information;
|
||||
|
@ -57,7 +57,8 @@ package core is
|
||||
type song is record index : integer; end record;
|
||||
|
||||
type point is record
|
||||
value, limit : natural;
|
||||
value : natural := 0;
|
||||
limit : natural := 0;
|
||||
end record;
|
||||
|
||||
type string_box_data is record
|
||||
|
@ -17,12 +17,12 @@ package deity is
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
type definition is record
|
||||
name : access string;
|
||||
favor : integer;
|
||||
loved_faction : faction.enumeration;
|
||||
bonus_attribute : attribute.enumeration;
|
||||
bonus_skill : skill.enumeration;
|
||||
bonus_resource : resource.enumeration;
|
||||
name : access string := new string'("--");
|
||||
favor : integer := 0;
|
||||
loved_faction : faction.enumeration := faction.neutral;
|
||||
bonus_attribute : attribute.enumeration := attribute.enumeration'first;
|
||||
bonus_skill : skill.enumeration := skill.enumeration'first;
|
||||
bonus_resource : resource.enumeration := resource.enumeration'first;
|
||||
end record;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
@ -43,7 +43,7 @@ package deity is
|
||||
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
|
||||
kind : enumeration := idle;
|
||||
kind : enumeration := enumeration'first;
|
||||
modifier : integer := 0;
|
||||
amount : integer := 0;
|
||||
permanent : boolean := false;
|
||||
|
@ -53,9 +53,9 @@ package equipment is
|
||||
end record;
|
||||
|
||||
type information is record
|
||||
index : enumeration;
|
||||
x : integer;
|
||||
y : integer;
|
||||
index : enumeration := enumeration'first;
|
||||
x : integer := 0;
|
||||
y : integer := 0;
|
||||
end record;
|
||||
|
||||
type informations is array (natural range <>) of information;
|
||||
|
@ -16,10 +16,10 @@ package faction is
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
type definition is record
|
||||
name : access string;
|
||||
bonus_attribute : attribute.enumeration;
|
||||
bonus_skill : skill.enumeration;
|
||||
bonus_resource : resource.enumeration;
|
||||
name : access string := new string'("--");
|
||||
bonus_attribute : attribute.enumeration := attribute.enumeration'first;
|
||||
bonus_skill : skill.enumeration := skill.enumeration'first;
|
||||
bonus_resource : resource.enumeration := resource.enumeration'first;
|
||||
end record;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
@ -39,7 +39,8 @@ package faction is
|
||||
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
|
||||
name : access string;
|
||||
spawn : biome.enumeration;
|
||||
clip : boolean;
|
||||
frames : integer;
|
||||
name : access string := new string'("--");
|
||||
spawn : biome.enumeration := biome.enumeration'first;
|
||||
clip : boolean := false;
|
||||
frames : integer := 0;
|
||||
end record;
|
||||
|
||||
type information is record
|
||||
index : enumeration;
|
||||
x : integer;
|
||||
y : integer;
|
||||
index : enumeration := enumeration'first;
|
||||
x : integer := 0;
|
||||
y : integer := 0;
|
||||
end record;
|
||||
|
||||
type informations is array (natural range <>) of information;
|
||||
|
@ -17,17 +17,17 @@ package location is
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
type definition is record
|
||||
name : access string;
|
||||
clip : boolean;
|
||||
frames : integer;
|
||||
evoke : effect.information;
|
||||
name : access string := new string'("--");
|
||||
clip : boolean := false;
|
||||
frames : integer := 0;
|
||||
evoke : effect.information := effect.none;
|
||||
end record;
|
||||
|
||||
type information is record
|
||||
index : enumeration;
|
||||
used : boolean;
|
||||
x : integer;
|
||||
y : integer;
|
||||
index : enumeration := enumeration'first;
|
||||
used : boolean := false;
|
||||
x : integer := 0;
|
||||
y : integer := 0;
|
||||
end record;
|
||||
|
||||
type informations is array (natural range <>) of information;
|
||||
|
@ -25,7 +25,7 @@ package material is
|
||||
end record;
|
||||
|
||||
type point is record
|
||||
index : enumeration := none;
|
||||
index : enumeration := enumeration'first;
|
||||
value : natural := 0;
|
||||
limit : natural := 0;
|
||||
end record;
|
||||
|
@ -15,9 +15,9 @@ package resource is
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
type definition is record
|
||||
base : core.point;
|
||||
name : access string;
|
||||
text : access string;
|
||||
base : core.point := (0, 0);
|
||||
name : access string := new string'("--");
|
||||
text : access string := new string'("--");
|
||||
end record;
|
||||
|
||||
type points is array (enumeration) of core.point;
|
||||
|
@ -24,7 +24,7 @@ package skill is
|
||||
end record;
|
||||
|
||||
type point is record
|
||||
index : enumeration := none;
|
||||
index : enumeration := enumeration'first;
|
||||
value : natural := 0;
|
||||
limit : natural := 0;
|
||||
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 := (
|
||||
main => (127, 127, 127, 255),
|
||||
fairy => ( 0, 127, 255, 255),
|
||||
|
@ -29,7 +29,7 @@ package unit is
|
||||
end record;
|
||||
|
||||
type information is record
|
||||
index : enumeration := none;
|
||||
index : enumeration := enumeration'first;
|
||||
state : core.animation := core.idle;
|
||||
x : integer := 0;
|
||||
y : integer := 0;
|
||||
|
@ -160,7 +160,7 @@ package body world is
|
||||
core.echo (core.comment, "Configuring" & deity.count'image & " deity components...");
|
||||
--
|
||||
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;
|
||||
--
|
||||
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 definition is record
|
||||
kind : biome.enumeration;
|
||||
width : natural;
|
||||
height : natural;
|
||||
tiles : access integer_matrix;
|
||||
clips : access boolean_matrix;
|
||||
views : access boolean_matrix;
|
||||
landmark_count : core.point;
|
||||
location_count : core.point;
|
||||
construction_count : core.point;
|
||||
equipment_count : core.point;
|
||||
unit_count : core.point;
|
||||
chad_count : core.point;
|
||||
landmarks : access landmark.informations;
|
||||
locations : access location.informations;
|
||||
constructions : access construction.informations;
|
||||
equipments : access equipment.informations;
|
||||
units : access unit.informations;
|
||||
chads : access chad.informations;
|
||||
kind : biome.enumeration := biome.enumeration'first;
|
||||
width : natural := 0;
|
||||
height : natural := 0;
|
||||
tiles : access integer_matrix := null;
|
||||
clips : access boolean_matrix := null;
|
||||
views : access boolean_matrix := null;
|
||||
landmark_count : core.point := (0, 0);
|
||||
location_count : core.point := (0, 0);
|
||||
construction_count : core.point := (0, 0);
|
||||
equipment_count : core.point := (0, 0);
|
||||
unit_count : core.point := (0, 0);
|
||||
chad_count : core.point := (0, 0);
|
||||
landmarks : access landmark.informations := null;
|
||||
locations : access location.informations := null;
|
||||
constructions : access construction.informations := null;
|
||||
equipments : access equipment.informations := null;
|
||||
units : access unit.informations := null;
|
||||
chads : access chad.informations := null;
|
||||
end record;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user