Work in progress on equipment, works so far...
This commit is contained in:
parent
2cd60b068e
commit
bcbc66d8e1
@ -83,8 +83,18 @@ package body chad is
|
|||||||
size => 15,
|
size => 15,
|
||||||
code => true);
|
code => true);
|
||||||
--
|
--
|
||||||
--~attribute.draw_points (player.attributes, x, y, true);
|
attribute.draw_points (player.attributes, x, y + 96 + 2 * offset, false);
|
||||||
--~skill.draw_points (player.skills, x + core.icon * 3, y, true);
|
--~skill.draw_points (player.skills, x + core.icon * 3, y, true);
|
||||||
|
--
|
||||||
|
for index_y in 0 .. 3 loop
|
||||||
|
for index_x in 0 .. 5 loop
|
||||||
|
ui.draw_icon (data => equipment.icon_sprite (player.items (6 * index_y + index_x)),
|
||||||
|
text => equipment.trait (player.items (6 * index_y + index_x)).name,
|
||||||
|
x => x + index_x * core.icon,
|
||||||
|
y => y + 96 + 3 * offset + 2 * core.icon + index_y * core.icon);
|
||||||
|
--~equipment.draw_icon (player.items (), x + index_x * core.icon, y + 96 + 3 * offset + 2 * core.icon + index_y * core.icon);
|
||||||
|
end loop;
|
||||||
|
end loop;
|
||||||
end draw_data;
|
end draw_data;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
@ -17,6 +17,7 @@ package body equipment is
|
|||||||
file : constant string := core.lowercase (enumeration'image (index));
|
file : constant string := core.lowercase (enumeration'image (index));
|
||||||
begin
|
begin
|
||||||
sprite (index) := core.import_sprite ("./sprite/equipment/" & folder & "/" & file & ".png", 4, 6);
|
sprite (index) := core.import_sprite ("./sprite/equipment/" & folder & "/" & file & ".png", 4, 6);
|
||||||
|
icon_sprite (index) := core.import_sprite ("./sprite/equipment/icon/" & file & ".png", 1, 1);
|
||||||
end;
|
end;
|
||||||
end loop;
|
end loop;
|
||||||
end configure;
|
end configure;
|
||||||
@ -25,9 +26,9 @@ package body equipment is
|
|||||||
|
|
||||||
procedure draw (index : in enumeration; state : in core.animation; x, y : in integer) is
|
procedure draw (index : in enumeration; state : in core.animation; x, y : in integer) is
|
||||||
begin
|
begin
|
||||||
if index = none then
|
--~if index = none then
|
||||||
return;
|
--~return;
|
||||||
end if;
|
--~end if;
|
||||||
--
|
--
|
||||||
core.draw (sprite (index), x, y, state => state);
|
core.draw (sprite (index), x, y, state => state);
|
||||||
end draw;
|
end draw;
|
||||||
@ -43,6 +44,13 @@ package body equipment is
|
|||||||
end if;
|
end if;
|
||||||
end draw_plus;
|
end draw_plus;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--~procedure draw_icon (index : in enumeration; x, y : in integer) is
|
||||||
|
--~begin
|
||||||
|
--~core.draw (icon_sprite (index), x, y, factor => 1);
|
||||||
|
--~end draw_icon;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
end equipment;
|
end equipment;
|
||||||
|
@ -196,6 +196,7 @@ package equipment is
|
|||||||
);
|
);
|
||||||
|
|
||||||
sprite : array (enumeration) of core.sprite;
|
sprite : array (enumeration) of core.sprite;
|
||||||
|
icon_sprite : array (enumeration) of core.sprite;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -203,6 +204,7 @@ package equipment is
|
|||||||
|
|
||||||
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_plus (index : in enumeration; state : in core.animation; x, y : in integer);
|
procedure draw_plus (index : in enumeration; state : in core.animation; x, y : in integer);
|
||||||
|
--~procedure draw_icon (index : in enumeration; x, y : in integer);
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ begin
|
|||||||
--
|
--
|
||||||
if view_list (status_preview_panel) then
|
if view_list (status_preview_panel) then
|
||||||
ui.draw_tiny_menu (preview_width, 0, side_panel, preview_height);
|
ui.draw_tiny_menu (preview_width, 0, side_panel, preview_height);
|
||||||
chad.draw_data (player, preview_width + 32, 32);
|
chad.draw_data (world.map.chad_data (1), preview_width + 32, 32);
|
||||||
--~ui.draw_state_box (preview_width + 32, 32);
|
--~ui.draw_state_box (preview_width + 32, 32);
|
||||||
end if;
|
end if;
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user