Autistic naming changes, version 666...
This commit is contained in:
parent
93a8898b56
commit
25ab404c92
@ -8,7 +8,7 @@ package body attribute is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sprite : array (codex) of core.sprite;
|
||||
sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -16,9 +16,9 @@ package body attribute is
|
||||
begin
|
||||
core.echo (core.comment, "Configuring attribute components...");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
sprite (index) := core.import_sprite ("./sprite/attribute/" & core.lowercase (codex'image (index)) & ".png", 1, 1);
|
||||
sprite (index) := core.import_sprite ("./sprite/attribute/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
|
||||
end loop;
|
||||
end configure;
|
||||
|
||||
@ -34,10 +34,10 @@ package body attribute is
|
||||
ui.draw_tiny_menu (move_x, move_y, width, height, true);
|
||||
ui.draw_title_bar (move_x, move_y, width, "Attributes");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
ui.draw_icon (sprite (index), trait (index).text, move_x + offset, move_y + offset + codex'pos (index) * core.icon);
|
||||
ui.write (trait (index).name, move_x + offset + core.icon, move_y + offset + codex'pos (index) * core.icon);
|
||||
ui.draw_icon (sprite (index), trait (index).text, move_x + offset, move_y + offset + enumeration'pos (index) * core.icon);
|
||||
ui.write (trait (index).name, move_x + offset + core.icon, move_y + offset + enumeration'pos (index) * core.icon);
|
||||
end loop;
|
||||
end menu;
|
||||
|
||||
|
@ -8,7 +8,7 @@ package attribute is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
offense, defense, wisdom, stamina, speed, reach
|
||||
);
|
||||
|
||||
@ -23,13 +23,13 @@ package attribute is
|
||||
text : core.long_string;
|
||||
end record;
|
||||
|
||||
type points is array (codex) of base_limit;
|
||||
type points is array (enumeration) of base_limit;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Offense ", 0, "- "),
|
||||
("Defense ", 0, "- "),
|
||||
("Wisdom ", 0, "- "),
|
||||
|
@ -8,7 +8,7 @@ package body chad is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sprite : array (codex) of core.sprite;
|
||||
sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -16,16 +16,16 @@ package body chad is
|
||||
begin
|
||||
core.echo (core.comment, "Configuring chad components...");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
--~sprite (index) := core.import_sprite ("./sprite/chad/" & core.lowercase (codex'image (index)) & ".png", 1, 1);
|
||||
--~sprite (index) := core.import_sprite ("./sprite/chad/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
|
||||
null;
|
||||
end loop;
|
||||
end configure;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (index : in codex; x, y : in integer) is
|
||||
procedure draw (index : in enumeration; x, y : in integer) is
|
||||
begin
|
||||
core.draw (sprite (index), x, y);
|
||||
end draw;
|
||||
|
@ -8,7 +8,7 @@ package chad is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
ada, richard, ognjen, wouter, john, marina
|
||||
);
|
||||
|
||||
@ -17,15 +17,15 @@ package chad is
|
||||
type information is
|
||||
record
|
||||
name : core.short_string;
|
||||
kind : faction.codex;
|
||||
bonus_attribute : attribute.codex;
|
||||
bonus_skill : skill.codex;
|
||||
bonus_resource : resource.codex;
|
||||
kind : faction.enumeration;
|
||||
bonus_attribute : attribute.enumeration;
|
||||
bonus_skill : skill.enumeration;
|
||||
bonus_resource : resource.enumeration;
|
||||
end record;
|
||||
|
||||
type data is
|
||||
record
|
||||
index : codex;
|
||||
index : enumeration;
|
||||
attributes : attribute.points;
|
||||
skills : skill.points;
|
||||
resources : resource.points;
|
||||
@ -33,9 +33,9 @@ package chad is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Ada Augusta King ", faction.fairy, attribute.defense, skill.diplomacy, resource.steel),
|
||||
("Richard Martin Stallman ", faction.dwarf, attribute.offense, skill.leadership, resource.wood),
|
||||
("Ognjen Milan Robovic ", faction.gnoll, attribute.stamina, skill.archery, resource.leather),
|
||||
@ -48,7 +48,7 @@ package chad is
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure draw (index : in codex; x, y : in integer);
|
||||
procedure draw (index : in enumeration; x, y : in integer);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -8,7 +8,7 @@ package body construction is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sprite : array (codex) of core.sprite;
|
||||
sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -16,11 +16,11 @@ package body construction is
|
||||
begin
|
||||
core.echo (core.comment, "Configuring construction components...");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
declare
|
||||
folder : constant string := core.lowercase (faction.codex'image (trait (index).kind));
|
||||
file : constant string := core.lowercase (codex'image (index));
|
||||
folder : constant string := core.lowercase (faction.enumeration'image (trait (index).kind));
|
||||
file : constant string := core.lowercase (enumeration'image (index));
|
||||
begin
|
||||
sprite (index) := core.import_sprite ("./sprite/construction/" & folder & "/" & file & ".png", trait (index).frames, 1);
|
||||
end;
|
||||
@ -29,7 +29,7 @@ package body construction is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (index : in codex; x, y : in integer) is
|
||||
procedure draw (index : in enumeration; x, y : in integer) is
|
||||
begin
|
||||
core.move (sprite (index), x, y, trait (index).frames, 1);
|
||||
end draw;
|
||||
|
@ -8,7 +8,7 @@ package construction is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
a, b, c, d, e, f
|
||||
);
|
||||
|
||||
@ -17,17 +17,17 @@ package construction is
|
||||
type information is
|
||||
record
|
||||
name : core.short_string;
|
||||
kind : faction.codex;
|
||||
kind : faction.enumeration;
|
||||
price : resource.points;
|
||||
frames : integer;
|
||||
evoke : effect.codex;
|
||||
evoke : effect.enumeration;
|
||||
end record;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("A ", faction.dwarf, (others => 0), 1, effect.none),
|
||||
("B ", faction.fairy, (others => 0), 1, effect.none),
|
||||
("C ", faction.gnoll, (others => 0), 1, effect.none),
|
||||
@ -40,7 +40,7 @@ package construction is
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure draw (index : in codex; x, y : in integer);
|
||||
procedure draw (index : in enumeration; x, y : in integer);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -8,11 +8,11 @@ package body deity is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sprite : array (codex) of core.sprite;
|
||||
sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (value : in codex; x, y : in integer) is
|
||||
procedure draw (value : in enumeration; x, y : in integer) is
|
||||
begin
|
||||
null;
|
||||
end draw;
|
||||
|
@ -8,7 +8,7 @@ package deity is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
svarog, dabog, svetovid, gozag, ru, xom,
|
||||
sheigarath, ornhul, khuganagoth, vel_sheina, deigehen, geazhul
|
||||
);
|
||||
@ -25,9 +25,9 @@ package deity is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Svarog the Lawful ", 3), -- Serbia
|
||||
("Dabog the Lonely ", -3),
|
||||
("Svetovid the Awakened ", 0),
|
||||
@ -44,7 +44,7 @@ package deity is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (value : in codex; x, y : in integer);
|
||||
procedure draw (value : in enumeration; x, y : in integer);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -8,11 +8,11 @@ package body effect is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sprite : array (codex) of core.sprite;
|
||||
sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (value : in codex; x, y : in integer) is
|
||||
procedure draw (value : in enumeration; x, y : in integer) is
|
||||
begin
|
||||
null;
|
||||
end draw;
|
||||
|
@ -8,7 +8,7 @@ package effect is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
none, one
|
||||
);
|
||||
|
||||
@ -22,16 +22,16 @@ package effect is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("- ", true),
|
||||
("- ", true)
|
||||
);
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (value : in codex; x, y : in integer);
|
||||
procedure draw (value : in enumeration; x, y : in integer);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -8,11 +8,11 @@ package body faction is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sprite : array (codex) of core.sprite;
|
||||
sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (value : in codex; x, y : in integer) is
|
||||
procedure draw (value : in enumeration; x, y : in integer) is
|
||||
begin
|
||||
null;
|
||||
end draw;
|
||||
|
@ -8,7 +8,7 @@ package faction is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
fairy, dwarf, gnoll, kobold, goblin, imp,
|
||||
neutral
|
||||
);
|
||||
@ -18,16 +18,16 @@ package faction is
|
||||
type information is
|
||||
record
|
||||
name : core.short_string;
|
||||
bonus_attribute : attribute.codex;
|
||||
bonus_skill : skill.codex;
|
||||
bonus_resource : resource.codex;
|
||||
bonus_attribute : attribute.enumeration;
|
||||
bonus_skill : skill.enumeration;
|
||||
bonus_resource : resource.enumeration;
|
||||
end record;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Fairy Kingdom ", attribute.speed, skill.mysticism, resource.gold),
|
||||
("Dwarf Kingdom ", attribute.defense, skill.estates, resource.stone),
|
||||
("Gnoll Kingdom ", attribute.stamina, skill.logistics, resource.leather),
|
||||
@ -39,7 +39,7 @@ package faction is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (value : in codex; x, y : in integer);
|
||||
procedure draw (value : in enumeration; x, y : in integer);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -8,7 +8,7 @@ package body item is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sprite : array (codex) of core.sprite;
|
||||
sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -16,11 +16,11 @@ package body item is
|
||||
begin
|
||||
core.echo (core.comment, "Configuring item components...");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
declare
|
||||
folder : constant string := core.lowercase (slot'image (trait (index).kind));
|
||||
file : constant string := core.lowercase (codex'image (index));
|
||||
file : constant string := core.lowercase (enumeration'image (index));
|
||||
begin
|
||||
sprite (index) := core.import_sprite ("./sprite/item/" & folder & "/" & file & ".png", 1, 1);
|
||||
end;
|
||||
@ -29,7 +29,7 @@ package body item is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (index : in codex; x, y : in integer) is
|
||||
procedure draw (index : in enumeration; x, y : in integer) is
|
||||
begin
|
||||
core.draw (sprite (index), x, y);
|
||||
end draw;
|
||||
|
@ -2,7 +2,7 @@
|
||||
--
|
||||
-- GNU General Public Licence (version 3 or later)
|
||||
|
||||
with core, effect, attribute, skill;
|
||||
with core, effect, attribute, skill, faction;
|
||||
|
||||
package item is
|
||||
|
||||
@ -13,9 +13,9 @@ package item is
|
||||
neck, main_hand, off_hand, bag, cloak, additional
|
||||
);
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
iron_chestplate, iron_greaves, grey_tunic, iron_gauntlets, iron_helmet, iron_sword,
|
||||
golden_necklace, iron_round_shield, ginger_long_beard, ginger_short_hair, head_runic_tattoo
|
||||
golden_necklace, iron_round_shield
|
||||
);
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
@ -24,33 +24,31 @@ package item is
|
||||
name : core.short_string;
|
||||
kind : slot;
|
||||
attributes : attribute.points;
|
||||
bonus_skill : skill.codex;
|
||||
evoke : effect.codex;
|
||||
bonus_skill : skill.enumeration;
|
||||
favor : faction.enumeration;
|
||||
evoke : effect.enumeration;
|
||||
end record;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
("Iron Chestplate ", chest, (0, 3, 0, 0, 0, 0), skill.leadership, effect.none),
|
||||
("Iron Greaves ", feet, (0, 1, 0, 0, 0, 0), skill.logistics, effect.none),
|
||||
("Grey Tunic ", full_body, (0, 1, 0, 1, 0, 0), skill.exploration, effect.none),
|
||||
("Iron Gauntlets ", hands, (0, 1, 0, 0, 0, 0), skill.logistics, effect.none),
|
||||
("Iron Helmet ", head, (0, 1, 0, 0, 0, 0), skill.leadership, effect.none),
|
||||
("Iron Sword ", main_hand, (1, 0, 0, 0, 1, 2), skill.tactics, effect.none),
|
||||
("Golden Necklace ", neck, (0, 0, 0, 0, 0, 0), skill.estates, effect.none),
|
||||
("Iron Round Shield ", off_hand, (0, 2, 0, 0, 0, 1), skill.tactics, effect.none),
|
||||
("Ginger Long Beard ", with_body, (0, 0, 0, 0, 0, 0), skill.mercantile, effect.none),
|
||||
("Ginger Short Hair ", with_body, (0, 0, 0, 0, 0, 0), skill.mercantile, effect.none),
|
||||
("Head Runic Tattoo ", with_body, (0, 0, 1, 0, 0, 0), skill.mysticism, effect.none)
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Iron Chestplate ", chest, (0, 3, 0, 0, 0, 0), skill.leadership, faction.gnoll, effect.none),
|
||||
("Iron Greaves ", feet, (0, 1, 0, 0, 0, 0), skill.logistics, faction.gnoll, effect.none),
|
||||
("Grey Tunic ", full_body, (0, 1, 0, 1, 0, 0), skill.exploration, faction.neutral, effect.none),
|
||||
("Iron Gauntlets ", hands, (0, 1, 0, 0, 0, 0), skill.logistics, faction.gnoll, effect.none),
|
||||
("Iron Helmet ", head, (0, 1, 0, 0, 0, 0), skill.leadership, faction.gnoll, effect.none),
|
||||
("Iron Sword ", main_hand, (1, 0, 0, 0, 1, 2), skill.tactics, faction.gnoll, effect.none),
|
||||
("Golden Necklace ", neck, (0, 0, 0, 0, 0, 0), skill.estates, faction.fairy, effect.none),
|
||||
("Iron Round Shield ", off_hand, (0, 2, 0, 0, 0, 1), skill.tactics, faction.gnoll, effect.none)
|
||||
);
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure draw (index : in codex; x, y : in integer);
|
||||
procedure draw (index : in enumeration; x, y : in integer);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -11,8 +11,8 @@ package body magic is
|
||||
view_width : constant natural := 90;
|
||||
view_height : constant natural := 90;
|
||||
|
||||
view_sprite : array (codex) of core.sprite;
|
||||
icon_sprite : array (codex) of core.sprite;
|
||||
view_sprite : array (enumeration) of core.sprite;
|
||||
icon_sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -20,11 +20,11 @@ package body magic is
|
||||
begin
|
||||
core.echo (core.comment, "Configuring magic components...");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
declare
|
||||
folder : constant string := core.lowercase (school'image (trait (index).kind));
|
||||
file : constant string := core.lowercase (codex'image (index));
|
||||
file : constant string := core.lowercase (enumeration'image (index));
|
||||
begin
|
||||
view_sprite (index) := core.import_sprite ("./sprite/magic/" & folder & "/" & file & ".png", 1, 1);
|
||||
icon_sprite (index) := core.import_sprite ("./sprite/magic/icon/" & file & ".png", 1, 1);
|
||||
@ -34,7 +34,7 @@ package body magic is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure icon (index : in codex; x, y : in integer) is
|
||||
procedure icon (index : in enumeration; x, y : in integer) is
|
||||
begin
|
||||
core.draw (icon_sprite (index), x + 2, y + 2);
|
||||
ui.draw_overicon (trait (index).text, x, y);
|
||||
@ -42,7 +42,7 @@ package body magic is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure view (index : in codex; x, y : in integer) is
|
||||
procedure view (index : in enumeration; x, y : in integer) is
|
||||
offset : constant integer := 4;
|
||||
begin
|
||||
core.draw (view_sprite (index), x + offset, y + offset);
|
||||
@ -63,7 +63,7 @@ package body magic is
|
||||
ui.draw_tiny_menu (move_x, move_y, width, height, true);
|
||||
ui.draw_title_bar (move_x, move_y, width, "Magic Abilities");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
icon (index, move_x + offset + school'pos (trait (index).kind) * 168, move_y + offset + next (school'pos (trait (index).kind)) * core.icon);
|
||||
ui.write (trait (index).name, move_x + offset + school'pos (trait (index).kind) * 168 + core.icon, move_y + offset + next (school'pos (trait (index).kind)) * core.icon);
|
||||
|
@ -13,7 +13,7 @@ package magic is
|
||||
prime, water
|
||||
);
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
-- Neutral
|
||||
magic_arrow, chain_magic_arrow,
|
||||
-- Air
|
||||
@ -48,15 +48,15 @@ package magic is
|
||||
name : core.short_string;
|
||||
kind : school;
|
||||
level : level_limit;
|
||||
evoke : effect.codex;
|
||||
evoke : effect.enumeration;
|
||||
text : core.long_string;
|
||||
end record;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Magic Arrow ", neutral, 0, effect.none, "Primary spell that channels mana through the air in order to do damage. "),
|
||||
("Chain Magic Arrow ", neutral, 0, effect.none, "Advanced primary spell that chains mana to damage multiple foes. "),
|
||||
("Blow Away ", air, 0, effect.none, "Weak spell that creates a strong gust of wind to knock back enemies. "),
|
||||
@ -137,8 +137,8 @@ package magic is
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure icon (index : in codex; x, y : in integer);
|
||||
procedure view (index : in codex; x, y : in integer);
|
||||
procedure icon (index : in enumeration; x, y : in integer);
|
||||
procedure view (index : in enumeration; x, y : in integer);
|
||||
|
||||
procedure menu (x, y : in integer; center : in boolean);
|
||||
|
||||
|
@ -11,8 +11,8 @@ package body might is
|
||||
view_width : constant integer := 90;
|
||||
view_height : constant integer := 90;
|
||||
|
||||
view_sprite : array (codex) of core.sprite;
|
||||
icon_sprite : array (codex) of core.sprite;
|
||||
view_sprite : array (enumeration) of core.sprite;
|
||||
icon_sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -20,11 +20,11 @@ package body might is
|
||||
begin
|
||||
core.echo (core.comment, "Configuring might components...");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
declare
|
||||
folder : constant string := core.lowercase (school'image (trait (index).kind));
|
||||
file : constant string := core.lowercase (codex'image (index));
|
||||
file : constant string := core.lowercase (enumeration'image (index));
|
||||
begin
|
||||
view_sprite (index) := core.import_sprite ("./sprite/might/" & folder & "/" & file & ".png", 1, 1);
|
||||
icon_sprite (index) := core.import_sprite ("./sprite/might/icon/" & file & ".png", 1, 1);
|
||||
@ -34,7 +34,7 @@ package body might is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure icon (index : in codex; x, y : in integer) is
|
||||
procedure icon (index : in enumeration; x, y : in integer) is
|
||||
begin
|
||||
core.draw (icon_sprite (index), x + 2, y + 2);
|
||||
ui.draw_overicon (trait (index).text, x, y);
|
||||
@ -42,7 +42,7 @@ package body might is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure view (index : in codex; x, y : in integer) is
|
||||
procedure view (index : in enumeration; x, y : in integer) is
|
||||
offset : constant integer := 4;
|
||||
begin
|
||||
core.draw (view_sprite (index), x + offset, y + offset);
|
||||
@ -63,7 +63,7 @@ package body might is
|
||||
ui.draw_tiny_menu (move_x, move_y, width, height, true);
|
||||
ui.draw_title_bar (move_x, move_y, width, "Might Abilities");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
icon (index, move_x + offset + school'pos (trait (index).kind) * 168, move_y + offset + next (school'pos (trait (index).kind)) * core.icon);
|
||||
ui.write (trait (index).name, move_x + offset + school'pos (trait (index).kind) * 168 + core.icon, move_y + offset + next (school'pos (trait (index).kind)) * core.icon);
|
||||
|
@ -13,7 +13,7 @@ package might is
|
||||
offense, tactics
|
||||
);
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
-- Neutral
|
||||
-- Archery
|
||||
cover, evasive_maneuvers, focused_fire, magic_ammunition, piercing_bolt, precision,
|
||||
@ -47,15 +47,15 @@ package might is
|
||||
name : core.short_string;
|
||||
kind : school;
|
||||
level : level_limit;
|
||||
evoke : effect.codex;
|
||||
evoke : effect.enumeration;
|
||||
text : core.long_string;
|
||||
end record;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Cover ", archery, 0, effect.none, "Provides temporary protection from enemy attacks. "),
|
||||
("Evasive Maneuvers ", archery, 0, effect.none, "Allows the user to dodge and avoid incoming attacks more effectively. "),
|
||||
("Focused Fire ", archery, 0, effect.none, "Increases accuracy and damage output towards a single target. "),
|
||||
@ -122,8 +122,8 @@ package might is
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure icon (index : in codex; x, y : in integer);
|
||||
procedure view (index : in codex; x, y : in integer);
|
||||
procedure icon (index : in enumeration; x, y : in integer);
|
||||
procedure view (index : in enumeration; x, y : in integer);
|
||||
|
||||
procedure menu (x, y : in integer; center : in boolean);
|
||||
|
||||
|
@ -8,7 +8,7 @@ package body resource is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sprite : array (codex) of core.sprite;
|
||||
sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -16,9 +16,9 @@ package body resource is
|
||||
begin
|
||||
core.echo (core.comment, "Configuring resource components...");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
sprite (index) := core.import_sprite ("./sprite/resource/" & core.lowercase (codex'image (index)) & ".png", 1, 1);
|
||||
sprite (index) := core.import_sprite ("./sprite/resource/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
|
||||
end loop;
|
||||
end configure;
|
||||
|
||||
@ -34,10 +34,10 @@ package body resource is
|
||||
ui.draw_tiny_menu (move_x, move_y, width, height, true);
|
||||
ui.draw_title_bar (move_x, move_y, width, "Resources");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
ui.draw_icon (sprite (index), trait (index).text, move_x + offset, move_y + offset + codex'pos (index) * core.icon);
|
||||
ui.write (trait (index).name, move_x + offset + core.icon, move_y + offset + codex'pos (index) * core.icon);
|
||||
ui.draw_icon (sprite (index), trait (index).text, move_x + offset, move_y + offset + enumeration'pos (index) * core.icon);
|
||||
ui.write (trait (index).name, move_x + offset + core.icon, move_y + offset + enumeration'pos (index) * core.icon);
|
||||
end loop;
|
||||
end menu;
|
||||
|
||||
|
@ -8,7 +8,7 @@ package resource is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
gold, wood, stone, steel, leather, crystal
|
||||
);
|
||||
|
||||
@ -23,13 +23,13 @@ package resource is
|
||||
text : core.long_string;
|
||||
end record;
|
||||
|
||||
type points is array (codex) of base_limit;
|
||||
type points is array (enumeration) of base_limit;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Gold ", 0, "- "),
|
||||
("Wood ", 0, "- "),
|
||||
("Stone ", 0, "- "),
|
||||
|
@ -8,7 +8,7 @@ package body skill is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sprite : array (codex) of core.sprite;
|
||||
sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -16,9 +16,9 @@ package body skill is
|
||||
begin
|
||||
core.echo (core.comment, "Configuring skill components...");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
sprite (index) := core.import_sprite ("./sprite/skill/" & core.lowercase (codex'image (index)) & ".png", 1, 1);
|
||||
sprite (index) := core.import_sprite ("./sprite/skill/" & core.lowercase (enumeration'image (index)) & ".png", 1, 1);
|
||||
end loop;
|
||||
end configure;
|
||||
|
||||
@ -35,10 +35,10 @@ package body skill is
|
||||
ui.draw_tiny_menu (move_x, move_y, width, height, true);
|
||||
ui.draw_title_bar (move_x, move_y, width, "Skills");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
ui.draw_icon (sprite (index), trait (index).text, move_x + 216 * (codex'pos (index) mod column) + offset, move_y + core.icon * (codex'pos (index) / column) + offset);
|
||||
ui.write (trait (index).name, move_x + 216 * (codex'pos (index) mod column) + offset + core.icon, move_y + core.icon * (codex'pos (index) / column) + offset);
|
||||
ui.draw_icon (sprite (index), trait (index).text, move_x + 216 * (enumeration'pos (index) mod column) + offset, move_y + core.icon * (enumeration'pos (index) / column) + offset);
|
||||
ui.write (trait (index).name, move_x + 216 * (enumeration'pos (index) mod column) + offset + core.icon, move_y + core.icon * (enumeration'pos (index) / column) + offset);
|
||||
end loop;
|
||||
end menu;
|
||||
|
||||
|
@ -8,7 +8,7 @@ package skill is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
archery, diplomacy, estates, exploration, leadership, logistics,
|
||||
medicine, mercantile, mysticism, necromancy, sorcery, tactics
|
||||
);
|
||||
@ -24,13 +24,13 @@ package skill is
|
||||
text : core.long_string;
|
||||
end record;
|
||||
|
||||
type points is array (codex) of base_limit;
|
||||
type points is array (enumeration) of base_limit;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Archery ", 0, "- "),
|
||||
("Diplomacy ", 0, "- "),
|
||||
("Estates ", 0, "- "),
|
||||
|
@ -8,7 +8,7 @@ package body ui is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
sprite : array (style, codex) of core.sprite;
|
||||
sprite : array (style, enumeration) of core.sprite;
|
||||
glyphs : array (style) of core.glyphs;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
@ -23,7 +23,7 @@ package body ui is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (index : in codex; x, y : in integer) is
|
||||
procedure draw (index : in enumeration; x, y : in integer) is
|
||||
begin
|
||||
core.zoom := 1.0;
|
||||
core.draw (sprite (active, index), x, y);
|
||||
@ -32,7 +32,7 @@ package body ui is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure crop (index : in codex; x, y, u, v, width, height : in integer) is
|
||||
procedure crop (index : in enumeration; x, y, u, v, width, height : in integer) is
|
||||
begin
|
||||
core.zoom := 1.0;
|
||||
core.crop (sprite (active, index), x, y, u, v, width, height);
|
||||
@ -41,7 +41,7 @@ package body ui is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_horizontally (index : in codex; x, y, width : in integer) is
|
||||
procedure draw_horizontally (index : in enumeration; x, y, width : in integer) is
|
||||
base : constant integer := sprite (active, index).width;
|
||||
begin
|
||||
for move in 0 .. width / base - 1
|
||||
@ -54,7 +54,7 @@ package body ui is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_vertically (index : in codex; x, y, height : in integer) is
|
||||
procedure draw_vertically (index : in enumeration; x, y, height : in integer) is
|
||||
base : constant integer := sprite (active, index).height;
|
||||
begin
|
||||
for move in 0 .. height / base - 1
|
||||
@ -67,7 +67,7 @@ package body ui is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_background (index : in codex; x, y, width, height : in integer) is
|
||||
procedure draw_background (index : in enumeration; x, y, width, height : in integer) is
|
||||
base_width : integer := sprite (active, index).width;
|
||||
base_height : integer := sprite (active, index).height;
|
||||
crop_width : integer := width mod base_width;
|
||||
@ -98,9 +98,9 @@ package body ui is
|
||||
begin
|
||||
glyphs (index) := core.import_glyphs ("./sprite/ui/" & folder_path & "/font.png", (if index = default then 16 else 24), 0);
|
||||
--
|
||||
for this in codex
|
||||
for this in enumeration
|
||||
loop
|
||||
sprite (index, this) := core.import_sprite ("./sprite/ui/" & folder_path & core.lowercase (codex'image (this)) & ".png", 1, 1);
|
||||
sprite (index, this) := core.import_sprite ("./sprite/ui/" & folder_path & core.lowercase (enumeration'image (this)) & ".png", 1, 1);
|
||||
end loop;
|
||||
end load_ui;
|
||||
begin
|
||||
|
@ -12,7 +12,7 @@ package ui is
|
||||
default, steam
|
||||
);
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
none,
|
||||
main_background,
|
||||
corner_upper_left, corner_upper_right, corner_lower_left, corner_lower_right,
|
||||
|
@ -11,9 +11,9 @@ package body unit is
|
||||
view_width : constant integer := 48;
|
||||
view_height : constant integer := 64;
|
||||
|
||||
sprite : array (codex) of core.sprite;
|
||||
icon_sprite : array (codex) of core.sprite;
|
||||
view_sprite : array (codex) of core.sprite;
|
||||
sprite : array (enumeration) of core.sprite;
|
||||
icon_sprite : array (enumeration) of core.sprite;
|
||||
view_sprite : array (enumeration) of core.sprite;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -21,11 +21,11 @@ package body unit is
|
||||
begin
|
||||
core.echo (core.comment, "Configuring unit components...");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
declare
|
||||
folder : constant string := core.lowercase (faction.codex'image (trait (index).kind));
|
||||
file : constant string := core.lowercase (codex'image (index));
|
||||
folder : constant string := core.lowercase (faction.enumeration'image (trait (index).kind));
|
||||
file : constant string := core.lowercase (enumeration'image (index));
|
||||
begin
|
||||
sprite (index) := core.import_sprite ("./sprite/unit/" & folder & "/" & file & ".png", 4, 6);
|
||||
icon_sprite (index) := core.import_sprite ("./sprite/unit/icon/" & file & ".png", 1, 1);
|
||||
@ -36,14 +36,14 @@ package body unit is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw (index : in codex; state : in animation; x, y : in integer) is
|
||||
procedure draw (index : in enumeration; state : in animation; x, y : in integer) is
|
||||
begin
|
||||
core.move (sprite (index), x, y, 6, animation'pos (state));
|
||||
end draw;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure icon (index : in codex; x, y : in integer) is
|
||||
procedure icon (index : in enumeration; x, y : in integer) is
|
||||
begin
|
||||
core.draw (icon_sprite (index), x + 2, y + 2);
|
||||
ui.draw_overicon (trait (index).text, x, y);
|
||||
@ -51,7 +51,7 @@ package body unit is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure view (index : in codex; x, y : in integer) is
|
||||
procedure view (index : in enumeration; x, y : in integer) is
|
||||
offset : constant integer := 4;
|
||||
begin
|
||||
core.draw (view_sprite (index), x + offset, y + offset);
|
||||
@ -71,18 +71,18 @@ package body unit is
|
||||
ui.draw_tiny_menu (move_x, move_y, width, height, true);
|
||||
ui.draw_title_bar (move_x, move_y, width, "Units");
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
move := faction.codex'pos (trait (index).kind) * 168;
|
||||
move := faction.enumeration'pos (trait (index).kind) * 168;
|
||||
--
|
||||
icon (index, move_x + offset + move, move_y + offset + (codex'pos (index) mod 14) * core.icon);
|
||||
ui.write (trait (index).name, move_x + offset + move + core.icon, move_y + offset + (codex'pos (index) mod 14) * core.icon);
|
||||
icon (index, move_x + offset + move, move_y + offset + (enumeration'pos (index) mod 14) * core.icon);
|
||||
ui.write (trait (index).name, move_x + offset + move + core.icon, move_y + offset + (enumeration'pos (index) mod 14) * core.icon);
|
||||
end loop;
|
||||
end menu;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure stat (index : in codex; x, y : in integer; center : in boolean) is
|
||||
procedure stat (index : in enumeration; x, y : in integer; center : in boolean) is
|
||||
offset : constant integer := 16;
|
||||
width : constant integer := 10 + offset + 6 * (sprite (index).width + 8);
|
||||
height : constant integer := attribute.count * core.icon + 2 * offset + 10 + sprite (index).height;
|
||||
@ -95,9 +95,9 @@ package body unit is
|
||||
--
|
||||
view (index, move_x + offset, move_y + offset);
|
||||
--
|
||||
--~for data in attribute.codex
|
||||
--~for data in attribute.enumeration
|
||||
--~loop
|
||||
--~move := attribute.codex'pos (data) * core.icon;
|
||||
--~move := attribute.enumeration'pos (data) * core.icon;
|
||||
--~--
|
||||
--~ui.draw_icon (attribute.sprite (data), attribute.trait (data).text, move_x + view_width + 12 + offset, move_y + offset + move);
|
||||
--~--
|
||||
|
@ -12,7 +12,7 @@ package unit is
|
||||
idle, walk, melee, shoot, wounded, dead
|
||||
);
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
dwarf_male, fairy_male, gnoll_male, goblin_male, imp_male, kobold_male
|
||||
);
|
||||
|
||||
@ -21,17 +21,17 @@ package unit is
|
||||
type information is
|
||||
record
|
||||
name : core.short_string;
|
||||
kind : faction.codex;
|
||||
kind : faction.enumeration;
|
||||
attributes : attribute.points;
|
||||
evoke : effect.codex;
|
||||
evoke : effect.enumeration;
|
||||
text : core.long_string;
|
||||
end record;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
count : constant natural := codex'pos (codex'last) + 1;
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (codex) of information := (
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Dwarf ", faction.dwarf, (others => 1), effect.none, " "),
|
||||
("Fairy ", faction.fairy, (others => 1), effect.none, " "),
|
||||
("Gnoll ", faction.gnoll, (others => 1), effect.none, " "),
|
||||
@ -44,13 +44,13 @@ package unit is
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure draw (index : in codex; state : in animation; x, y : in integer);
|
||||
procedure icon (index : in codex; x, y : in integer);
|
||||
procedure view (index : in codex; x, y : in integer);
|
||||
procedure draw (index : in enumeration; state : in animation; x, y : in integer);
|
||||
procedure icon (index : in enumeration; x, y : in integer);
|
||||
procedure view (index : in enumeration; x, y : in integer);
|
||||
|
||||
procedure menu (x, y : in integer; center : in boolean);
|
||||
|
||||
procedure stat (index : in codex; x, y : in integer; center : in boolean);
|
||||
procedure stat (index : in enumeration; x, y : in integer; center : in boolean);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -12,9 +12,9 @@ package body world is
|
||||
|
||||
type world_array is array (natural range <>) of access information;
|
||||
|
||||
type limit_array is array (codex) of integer;
|
||||
type limit_array is array (enumeration) of integer;
|
||||
|
||||
type landmark_sprite_array is array (codex) of access sprite_array;
|
||||
type landmark_sprite_array is array (enumeration) of access sprite_array;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -35,14 +35,14 @@ package body world is
|
||||
--
|
||||
blocks := core.import_sprite ("./sprite/world/terrain/terrain.png", 1, 1);
|
||||
--
|
||||
for index in codex
|
||||
for index in enumeration
|
||||
loop
|
||||
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));
|
||||
folder : constant string := core.lowercase (enumeration'image (index));
|
||||
file : constant string := value'image;
|
||||
begin
|
||||
landmarks (index) (value) := core.import_sprite ("./sprite/world/landmark/" & folder & "/" & file & ".png", 1, 1);
|
||||
@ -53,7 +53,7 @@ package body world is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure make (index : in codex; width, height : in natural) is
|
||||
procedure make (index : in enumeration; width, height : in natural) is
|
||||
begin
|
||||
core.echo (core.comment, "-- Procedurally generating new map...");
|
||||
--
|
||||
@ -89,14 +89,14 @@ package body world is
|
||||
--
|
||||
for object in 0 .. construction_limit
|
||||
loop
|
||||
map.construction (object).index := core.random (0, construction.codex'pos (construction.codex'last));
|
||||
map.construction (object).index := core.random (0, construction.enumeration'pos (construction.enumeration'last));
|
||||
map.construction (object).x := core.base * core.random (1, map.width - 1);
|
||||
map.construction (object).y := core.base * core.random (1, map.height - 1);
|
||||
end loop;
|
||||
--
|
||||
for object in 0 .. item_limit
|
||||
loop
|
||||
map.item (object).index := core.random (0, item.codex'pos (item.codex'last));
|
||||
map.item (object).index := core.random (0, item.enumeration'pos (item.enumeration'last));
|
||||
map.item (object).x := core.base * core.random (1, map.width - 1);
|
||||
map.item (object).y := core.base * core.random (1, map.height - 1);
|
||||
end loop;
|
||||
@ -115,13 +115,13 @@ package body world is
|
||||
loop
|
||||
for move_x in 0 .. + width / core.base - 1
|
||||
loop
|
||||
u := core.base * codex'pos (map.terrain) * 4;
|
||||
u := core.base * enumeration'pos (map.terrain) * 4;
|
||||
v := core.base * map.block (core.camera.x + move_x, core.camera.y + move_y);
|
||||
--
|
||||
core.crop (blocks, x + move_x * core.base, y + move_y * core.base, u, v, core.base, core.base);
|
||||
end loop;
|
||||
--
|
||||
u := core.base * codex'pos (map.terrain) * 4;
|
||||
u := core.base * enumeration'pos (map.terrain) * 4;
|
||||
v := core.base * map.block (width / core.base, core.camera.y + move_y);
|
||||
--
|
||||
core.crop (blocks, x + width - crop_width, y + move_y * core.base, u, v, crop_width, core.base);
|
||||
@ -129,13 +129,13 @@ package body world is
|
||||
--
|
||||
for move_x in 0 .. width / core.base - 1
|
||||
loop
|
||||
u := core.base * codex'pos (map.terrain) * 4;
|
||||
u := core.base * enumeration'pos (map.terrain) * 4;
|
||||
v := core.base * map.block (core.camera.x + move_x, height / core.base);
|
||||
--
|
||||
core.crop (blocks, x + move_x * core.base, y + height - crop_height, u, v, core.base, crop_height);
|
||||
end loop;
|
||||
--
|
||||
u := core.base * codex'pos (map.terrain) * 4;
|
||||
u := core.base * enumeration'pos (map.terrain) * 4;
|
||||
v := core.base * map.block (width / core.base, height / core.base);
|
||||
--
|
||||
core.crop (blocks, x + width - crop_width, y + height - crop_height, u, v, crop_width, crop_height);
|
||||
@ -160,7 +160,7 @@ package body world is
|
||||
goto skip_drawing_out_of_view_construction;
|
||||
end if;
|
||||
--
|
||||
construction.draw (construction.codex'val (map.construction (object).index),
|
||||
construction.draw (construction.enumeration'val (map.construction (object).index),
|
||||
map.construction (object).x - core.camera.x * core.base,
|
||||
map.construction (object).y - core.camera.y * core.base);
|
||||
--
|
||||
@ -174,7 +174,7 @@ package body world is
|
||||
goto skip_drawing_out_of_view_item;
|
||||
end if;
|
||||
--
|
||||
item.draw (item.codex'val (map.item (object).index),
|
||||
item.draw (item.enumeration'val (map.item (object).index),
|
||||
map.item (object).x - core.camera.x * core.base,
|
||||
map.item (object).y - core.camera.y * core.base);
|
||||
--
|
||||
|
@ -8,7 +8,7 @@ package world is
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
type codex is (
|
||||
type enumeration is (
|
||||
ash, cave, grass, rough, snow, swamp
|
||||
);
|
||||
|
||||
@ -24,7 +24,7 @@ package world is
|
||||
|
||||
type information is
|
||||
record
|
||||
terrain : codex;
|
||||
terrain : enumeration;
|
||||
width : natural;
|
||||
height : natural;
|
||||
block : access block_array;
|
||||
@ -41,7 +41,7 @@ package world is
|
||||
|
||||
procedure configure;
|
||||
|
||||
procedure make (index : in codex; width, height : in natural);
|
||||
procedure make (index : in enumeration; width, height : in natural);
|
||||
|
||||
procedure draw (x, y, width, height : in integer; show_grid : in boolean);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user