Minor update to Unit package... Sadly...
This commit is contained in:
parent
388b039671
commit
45b2d4feb8
@ -12,8 +12,6 @@ package body unit is
|
||||
view_height : constant integer := 64;
|
||||
|
||||
base : array (faction.fairy .. faction.imp) of core.sprite;
|
||||
|
||||
--~sprite : array (enumeration) of core.sprite;
|
||||
--~icon : array (enumeration) of core.sprite;
|
||||
--~view : array (enumeration) of core.sprite;
|
||||
|
||||
@ -30,10 +28,14 @@ package body unit is
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
--~procedure draw (index : in enumeration; state : in core.animation; x, y : in integer) is
|
||||
--~begin
|
||||
--~core.draw (sprite (index), x, y, state => state);
|
||||
--~end draw;
|
||||
procedure draw (index : in enumeration; state : in core.animation; x, y : in integer) is
|
||||
begin
|
||||
core.draw (base (trait (index).kind), x, y, state => state);
|
||||
--
|
||||
for slot in equipment.slot loop
|
||||
equipment.draw (trait (index).equipments (slot), state, x, y);
|
||||
end loop;
|
||||
end draw;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
@ -51,17 +53,6 @@ package body unit is
|
||||
--~ui.draw_icon_menu (x, y, view_width + 2 * offset, view_height + 2 * offset);
|
||||
--~end draw_view;
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
|
||||
procedure draw_full (index : in enumeration; state : in core.animation; x, y : in integer) is
|
||||
begin
|
||||
core.draw (base (trait (index).kind), x, y, state => state);
|
||||
--
|
||||
for slot in equipment.slot loop
|
||||
equipment.draw (trait (index).equipments (slot), state, x, y);
|
||||
end loop;
|
||||
end draw_full;
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end unit;
|
||||
|
@ -54,16 +54,16 @@ package unit is
|
||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||
|
||||
trait : constant array (enumeration) of information := (
|
||||
("Dwarf Berserker ", faction.dwarf, (3, 2, 1, 3, 2, 2), 1, (
|
||||
dwarf_berserker => ("Dwarf Berserker ", faction.dwarf, (3, 2, 1, 3, 2, 2), 1, (
|
||||
equipment.blue_tunic, equipment.leather_helmet, equipment.leather_chestplate, equipment.none,
|
||||
equipment.leather_greaves, equipment.none, equipment.iron_axe, equipment.none)),
|
||||
("Dwarf Elite Berserker ", faction.dwarf, (3, 2, 1, 3, 2, 2), 3, (
|
||||
dwarf_elite_berserker => ("Dwarf Elite Berserker ", faction.dwarf, (3, 2, 1, 3, 2, 2), 3, (
|
||||
equipment.cyan_tunic, equipment.mithril_helmet, equipment.mithril_chestplate, equipment.leather_gauntlets,
|
||||
equipment.leather_greaves, equipment.none, equipment.mithril_axe, equipment.none)),
|
||||
("Dwarf Guard ", faction.dwarf, (3, 2, 1, 3, 2, 2), 4, (
|
||||
dwarf_guard => ("Dwarf Guard ", faction.dwarf, (3, 2, 1, 3, 2, 2), 4, (
|
||||
equipment.cyan_tunic, equipment.steel_helmet, equipment.steel_chestplate, equipment.leather_gauntlets,
|
||||
equipment.leather_greaves, equipment.none, equipment.steel_battleaxe, equipment.steel_shield)),
|
||||
("Dwarf Elite Guard ", faction.dwarf, (3, 2, 1, 3, 2, 2), 6, (
|
||||
dwarf_elite_guard => ("Dwarf Elite Guard ", faction.dwarf, (3, 2, 1, 3, 2, 2), 6, (
|
||||
equipment.cyan_tunic, equipment.steel_helmet, equipment.mithril_chestplate, equipment.steel_gauntlets,
|
||||
equipment.steel_greaves, equipment.none, equipment.mithril_axe, equipment.steel_shield))
|
||||
);
|
||||
@ -72,12 +72,11 @@ package unit is
|
||||
|
||||
procedure configure;
|
||||
|
||||
--~procedure draw (index : in enumeration; state : in core.animation; x, y : in integer);
|
||||
procedure draw (index : in enumeration; state : in core.animation; x, y : in integer);
|
||||
|
||||
--~procedure draw_icon (index : in enumeration; x, y : in integer);
|
||||
--~procedure draw_view (index : in enumeration; x, y : in integer);
|
||||
|
||||
procedure draw_full (index : in enumeration; state : in core.animation; x, y : in integer);
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
end unit;
|
||||
|
@ -309,7 +309,7 @@ package body world is
|
||||
--
|
||||
for index in 1 .. unit_limit loop
|
||||
if map.views (map.units (index).x, map.units (index).y) then
|
||||
unit.draw_full (unit.enumeration'val (map.units (index).index),
|
||||
unit.draw (unit.enumeration'val (map.units (index).index),
|
||||
core.animation'val (map.units (index).state),
|
||||
offset.x + (map.units (index).x - core.camera.x) * core.base * core.zoom,
|
||||
offset.y + (map.units (index).y - core.camera.y) * core.base * core.zoom);
|
||||
|
Loading…
Reference in New Issue
Block a user