Readded player inventory...
This commit is contained in:
parent
8071b8fb81
commit
551608e391
@ -147,13 +147,15 @@ procedure main is
|
|||||||
width : constant integer := side_panel - 2 * core.icon;
|
width : constant integer := side_panel - 2 * core.icon;
|
||||||
height : constant integer := 480;
|
height : constant integer := 480;
|
||||||
offset : constant integer := 8;
|
offset : constant integer := 8;
|
||||||
|
more : constant natural := 10;
|
||||||
|
less : constant natural := 5;
|
||||||
at_x : integer := 0;
|
at_x : integer := 0;
|
||||||
at_y : integer := 0;
|
at_y : integer := 0;
|
||||||
begin
|
begin
|
||||||
ui.draw_frame ("--", x, y, width, height);
|
ui.draw_frame ("--", x, y, width, height);
|
||||||
ui.draw_sprite (chad.view (player_1.index), chad.description (player_1.index).name.all, x + offset, y + offset, 0);
|
ui.draw_sprite (chad.view (player_1.index), chad.description (player_1.index).name.all, x + offset, y + offset, 0);
|
||||||
ui.draw_text_box (x + chad.view_width + offset, y + offset, width - chad.view_width - 2 * offset, core.icon);
|
ui.draw_text_box (x + chad.view_width + offset, y + offset, width - chad.view_width - 2 * offset, core.icon);
|
||||||
ui.write (chad.description (player_1.index).name.all, x + chad.view_width + offset + 5, y + offset + 5);
|
ui.write (chad.description (player_1.index).name.all, x + chad.view_width + offset + less, y + offset + less);
|
||||||
--
|
--
|
||||||
ui.draw_text_box (x => x + chad.view_width + attribute.count * core.icon + offset,
|
ui.draw_text_box (x => x + chad.view_width + attribute.count * core.icon + offset,
|
||||||
y => y + core.icon + offset,
|
y => y + core.icon + offset,
|
||||||
@ -161,8 +163,8 @@ procedure main is
|
|||||||
height => core.icon);
|
height => core.icon);
|
||||||
--
|
--
|
||||||
ui.write (text => chad.description (player_1.index).title.all,
|
ui.write (text => chad.description (player_1.index).title.all,
|
||||||
x => x + chad.view_width + attribute.count * core.icon + offset + 10,
|
x => x + chad.view_width + attribute.count * core.icon + offset + more,
|
||||||
y => y + core.icon + offset + 10,
|
y => y + core.icon + offset + more,
|
||||||
code => true);
|
code => true);
|
||||||
--
|
--
|
||||||
ui.draw_text_box (x => x + chad.view_width + attribute.count * core.icon + offset,
|
ui.draw_text_box (x => x + chad.view_width + attribute.count * core.icon + offset,
|
||||||
@ -171,8 +173,8 @@ procedure main is
|
|||||||
height => core.icon);
|
height => core.icon);
|
||||||
--
|
--
|
||||||
ui.write (text => "Level" & player_1.level'image,
|
ui.write (text => "Level" & player_1.level'image,
|
||||||
x => x + chad.view_width + attribute.count * core.icon + offset + 10,
|
x => x + chad.view_width + attribute.count * core.icon + offset + more,
|
||||||
y => y + 2 * core.icon + offset + 10,
|
y => y + 2 * core.icon + offset + more,
|
||||||
code => true);
|
code => true);
|
||||||
--
|
--
|
||||||
declare move_x : integer := x + chad.view_width + offset;
|
declare move_x : integer := x + chad.view_width + offset;
|
||||||
@ -180,7 +182,7 @@ procedure main is
|
|||||||
for index in attribute.enumeration loop
|
for index in attribute.enumeration loop
|
||||||
ui.draw_icon (attribute.icon (index), attribute.description (index).text.all, move_x, y + core.icon + offset);
|
ui.draw_icon (attribute.icon (index), attribute.description (index).text.all, move_x, y + core.icon + offset);
|
||||||
ui.draw_text_box (move_x, y + 2 * core.icon + offset, core.icon, core.icon);
|
ui.draw_text_box (move_x, y + 2 * core.icon + offset, core.icon, core.icon);
|
||||||
ui.write (player_1.attributes (index).value'image, move_x + 5, y + 2 * core.icon + offset + 10, code => true);
|
ui.write (player_1.attributes (index).value'image, move_x + less, y + 2 * core.icon + offset + more, code => true);
|
||||||
--
|
--
|
||||||
move_x := move_x + core.icon;
|
move_x := move_x + core.icon;
|
||||||
end loop;
|
end loop;
|
||||||
@ -193,9 +195,9 @@ procedure main is
|
|||||||
ui.draw_tiny_fill_bar (at_x, at_y + 1 * core.icon, width - 2 * offset, float (player_1.mana.value) / float (player_1.mana.limit), (0, 0, 127, 255));
|
ui.draw_tiny_fill_bar (at_x, at_y + 1 * core.icon, width - 2 * offset, float (player_1.mana.value) / float (player_1.mana.limit), (0, 0, 127, 255));
|
||||||
ui.draw_tiny_fill_bar (at_x, at_y + 2 * core.icon, width - 2 * offset, float (player_1.movement.value) / float (player_1.movement.limit), (0, 127, 0, 255));
|
ui.draw_tiny_fill_bar (at_x, at_y + 2 * core.icon, width - 2 * offset, float (player_1.movement.value) / float (player_1.movement.limit), (0, 127, 0, 255));
|
||||||
--
|
--
|
||||||
ui.write ("Health " & player_1.health.value'image & " /" & player_1.health.limit'image, at_x + core.icon, at_y - core.icon + 10, code => true);
|
ui.write ("Health " & player_1.health.value'image & " /" & player_1.health.limit'image, at_x + core.icon, at_y - core.icon + more, code => true);
|
||||||
ui.write ("Mana " & player_1.mana.value'image & " /" & player_1.mana.limit'image, at_x + core.icon, at_y + 10, code => true);
|
ui.write ("Mana " & player_1.mana.value'image & " /" & player_1.mana.limit'image, at_x + core.icon, at_y + more, code => true);
|
||||||
ui.write ("Movement" & player_1.movement.value'image & " /" & player_1.movement.limit'image, at_x + core.icon, at_y + core.icon + 10, code => true);
|
ui.write ("Movement" & player_1.movement.value'image & " /" & player_1.movement.limit'image, at_x + core.icon, at_y + core.icon + more, code => true);
|
||||||
--
|
--
|
||||||
at_x := x + offset;
|
at_x := x + offset;
|
||||||
at_y := y + offset + chad.view_height + 3 * core.icon;
|
at_y := y + offset + chad.view_height + 3 * core.icon;
|
||||||
@ -220,18 +222,20 @@ procedure main is
|
|||||||
height => core.icon);
|
height => core.icon);
|
||||||
--
|
--
|
||||||
ui.write (text => "Equipment",
|
ui.write (text => "Equipment",
|
||||||
x => at_x + (equipment.kind'pos (equipment.kind'last) + 1) * core.icon + 10,
|
x => at_x + (equipment.kind'pos (equipment.kind'last) + 1) * core.icon + more,
|
||||||
y => at_y + 10,
|
y => at_y + more,
|
||||||
code => true);
|
code => true);
|
||||||
--
|
--
|
||||||
--~for index_y in 0 .. 3 loop
|
at_y := at_y + core.icon;
|
||||||
--~for index_x in 0 .. 5 loop
|
--
|
||||||
--~ui.draw_icon (data => equipment.icon (player_1.items (6 * index_y + index_x)),
|
for index_y in 0 .. 2 loop
|
||||||
--~text => equipment.description (player_1.items (6 * index_y + index_x)).name.all,
|
for index_x in 0 .. 7 loop
|
||||||
--~x => x + index_x * core.icon,
|
ui.draw_icon (data => equipment.icon (player_1.items (8 * index_y + index_x)),
|
||||||
--~y => y + 96 + 4 * 8 + 2 * core.icon + index_y * core.icon);
|
text => equipment.description (player_1.items (8 * index_y + index_x)).name.all,
|
||||||
--~end loop;
|
x => at_x + index_x * core.icon,
|
||||||
--~end loop;
|
y => at_y + index_y * core.icon);
|
||||||
|
end loop;
|
||||||
|
end loop;
|
||||||
--
|
--
|
||||||
--~declare move_x : integer := x;
|
--~declare move_x : integer := x;
|
||||||
--~move_y : integer := y + 96 + 5 * 8 + 6 * core.icon;
|
--~move_y : integer := y + 96 + 5 * 8 + 6 * core.icon;
|
||||||
|
@ -29,7 +29,7 @@ package material is
|
|||||||
|
|
||||||
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
count : constant natural := enumeration'pos (enumeration'last) + 1;
|
||||||
|
|
||||||
default : constant points := (others => (0, 12));
|
default : constant points := (others => (1, 12));
|
||||||
|
|
||||||
description : constant array (enumeration) of definition := (
|
description : constant array (enumeration) of definition := (
|
||||||
sulphur => (new string'("Sulphur"), 11),
|
sulphur => (new string'("Sulphur"), 11),
|
||||||
|
Loading…
Reference in New Issue
Block a user