Added movement arrow sprites and points...
This commit is contained in:
parent
b355ad4db8
commit
cb34d6abf4
@ -53,9 +53,9 @@ package body chad is
|
|||||||
--
|
--
|
||||||
ui.draw_sprite (view (player.index), description (player.index).name, x + offset, y + offset, 0);
|
ui.draw_sprite (view (player.index), description (player.index).name, x + offset, y + offset, 0);
|
||||||
--
|
--
|
||||||
ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 1 * core.icon + offset, 360 - view_width - offset, float (player.health.value) / float (player.health.limit), (127, 0, 0, 255));
|
ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 1 * core.icon + offset, 360 - view_width - offset, float (player.health.value) / float (player.health.limit), (127, 0, 0, 255));
|
||||||
ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 2 * core.icon + offset, 360 - view_width - offset, float (player.mana.value) / float (player.mana.limit), (0, 0, 127, 255));
|
ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 2 * core.icon + offset, 360 - view_width - offset, float (player.mana.value) / float (player.mana.limit), (0, 0, 127, 255));
|
||||||
ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 3 * core.icon + offset, 360 - view_width - offset, float (player.stamina.value) / float (player.stamina.limit), (0, 127, 0, 255));
|
ui.draw_tiny_fill_bar (x + view_width + 2 * offset, y + 3 * core.icon + offset, 360 - view_width - offset, float (player.movement.value) / float (player.movement.limit), (0, 127, 0, 255));
|
||||||
--
|
--
|
||||||
ui.write (text => "Health " & player.health.value'image & " /" & player.health.limit'image,
|
ui.write (text => "Health " & player.health.value'image & " /" & player.health.limit'image,
|
||||||
x => x + view_width + core.icon + 3 * offset,
|
x => x + view_width + core.icon + 3 * offset,
|
||||||
@ -69,7 +69,7 @@ package body chad is
|
|||||||
tint => (127, 127, 255, 255),
|
tint => (127, 127, 255, 255),
|
||||||
size => 15,
|
size => 15,
|
||||||
code => true);
|
code => true);
|
||||||
ui.write (text => "Stamina" & player.stamina.value'image & " /" & player.stamina.limit'image,
|
ui.write (text => "Stamina" & player.movement.value'image & " /" & player.movement.limit'image,
|
||||||
x => x + view_width + core.icon + 3 * offset,
|
x => x + view_width + core.icon + 3 * offset,
|
||||||
y => y + 2 * core.icon + 2 * offset,
|
y => y + 2 * core.icon + 2 * offset,
|
||||||
tint => (127, 255, 127, 255),
|
tint => (127, 255, 127, 255),
|
||||||
@ -138,7 +138,7 @@ package body chad is
|
|||||||
--
|
--
|
||||||
core.save_point (here, data.health);
|
core.save_point (here, data.health);
|
||||||
core.save_point (here, data.mana);
|
core.save_point (here, data.mana);
|
||||||
core.save_point (here, data.stamina);
|
core.save_point (here, data.movement);
|
||||||
--
|
--
|
||||||
attribute.save_points (here, data.attributes);
|
attribute.save_points (here, data.attributes);
|
||||||
skill.save_points (here, data.skills);
|
skill.save_points (here, data.skills);
|
||||||
@ -170,7 +170,7 @@ package body chad is
|
|||||||
--
|
--
|
||||||
core.load_point (here, data.health);
|
core.load_point (here, data.health);
|
||||||
core.load_point (here, data.mana);
|
core.load_point (here, data.mana);
|
||||||
core.load_point (here, data.stamina);
|
core.load_point (here, data.movement);
|
||||||
--
|
--
|
||||||
attribute.load_points (here, data.attributes);
|
attribute.load_points (here, data.attributes);
|
||||||
skill.load_points (here, data.skills);
|
skill.load_points (here, data.skills);
|
||||||
|
@ -33,7 +33,7 @@ package chad is
|
|||||||
y : integer;
|
y : integer;
|
||||||
health : core.point;
|
health : core.point;
|
||||||
mana : core.point;
|
mana : core.point;
|
||||||
stamina : core.point;
|
movement : core.point;
|
||||||
attributes : attribute.points;
|
attributes : attribute.points;
|
||||||
skills : skill.points;
|
skills : skill.points;
|
||||||
resources : resource.points;
|
resources : resource.points;
|
||||||
|
@ -47,6 +47,7 @@ procedure main is
|
|||||||
core.signal_f5 => world.resource_cheat_5'access,
|
core.signal_f5 => world.resource_cheat_5'access,
|
||||||
core.signal_f6 => world.resource_cheat_6'access,
|
core.signal_f6 => world.resource_cheat_6'access,
|
||||||
core.signal_f7 => world.reveal_map'access,
|
core.signal_f7 => world.reveal_map'access,
|
||||||
|
core.signal_f8 => world.restore_points'access,
|
||||||
core.signal_f => core.toggle_fullscreen'access,
|
core.signal_f => core.toggle_fullscreen'access,
|
||||||
others => core.idle_skip'access
|
others => core.idle_skip'access
|
||||||
);
|
);
|
||||||
@ -125,7 +126,7 @@ procedure main is
|
|||||||
y => 0,
|
y => 0,
|
||||||
health => (30, 40),
|
health => (30, 40),
|
||||||
mana => (20, 30),
|
mana => (20, 30),
|
||||||
stamina => (10, 20),
|
movement => (10, 20),
|
||||||
attributes => attribute.default,
|
attributes => attribute.default,
|
||||||
skills => skill.default,
|
skills => skill.default,
|
||||||
resources => ((101, 240), (103, 240), (107, 240), (109, 240), (113, 240), (127, 240)),
|
resources => ((101, 240), (103, 240), (107, 240), (109, 240), (113, 240), (127, 240)),
|
||||||
|
@ -779,12 +779,25 @@ package body world is
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
procedure restore_points is
|
||||||
|
begin
|
||||||
|
map.chads (1).health.value := map.chads (1).health.limit;
|
||||||
|
map.chads (1).mana.value := map.chads (1).mana.limit;
|
||||||
|
map.chads (1).movement.value := map.chads (1).movement.limit;
|
||||||
|
end restore_points;
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure player_up is
|
procedure player_up is
|
||||||
begin
|
begin
|
||||||
core.decrement (map.chads (1).y);
|
core.decrement (map.chads (1).y);
|
||||||
core.clip (map.chads (1).y, 0, map.height - 1);
|
core.clip (map.chads (1).y, 0, map.height - 1);
|
||||||
|
map.chads (1).movement := map.chads (1).movement - 1;
|
||||||
if map.clips (map.chads (1).x, map.chads (1).y) then
|
if map.clips (map.chads (1).x, map.chads (1).y) then
|
||||||
core.increment (map.chads (1).y);
|
core.increment (map.chads (1).y);
|
||||||
|
if map.chads (1).movement.value > 0 then
|
||||||
|
map.chads (1).movement := map.chads (1).movement + 1;
|
||||||
|
end if;
|
||||||
end if;
|
end if;
|
||||||
end player_up;
|
end player_up;
|
||||||
|
|
||||||
@ -794,8 +807,12 @@ package body world is
|
|||||||
begin
|
begin
|
||||||
core.increment (map.chads (1).y);
|
core.increment (map.chads (1).y);
|
||||||
core.clip (map.chads (1).y, 0, map.height - 1);
|
core.clip (map.chads (1).y, 0, map.height - 1);
|
||||||
|
map.chads (1).movement := map.chads (1).movement - 1;
|
||||||
if map.clips (map.chads (1).x, map.chads (1).y) then
|
if map.clips (map.chads (1).x, map.chads (1).y) then
|
||||||
core.decrement (map.chads (1).y);
|
core.decrement (map.chads (1).y);
|
||||||
|
if map.chads (1).movement.value > 0 then
|
||||||
|
map.chads (1).movement := map.chads (1).movement + 1;
|
||||||
|
end if;
|
||||||
end if;
|
end if;
|
||||||
end player_down;
|
end player_down;
|
||||||
|
|
||||||
@ -805,8 +822,12 @@ package body world is
|
|||||||
begin
|
begin
|
||||||
core.decrement (map.chads (1).x);
|
core.decrement (map.chads (1).x);
|
||||||
core.clip (map.chads (1).x, 0, map.width - 1);
|
core.clip (map.chads (1).x, 0, map.width - 1);
|
||||||
|
map.chads (1).movement := map.chads (1).movement - 1;
|
||||||
if map.clips (map.chads (1).x, map.chads (1).y) then
|
if map.clips (map.chads (1).x, map.chads (1).y) then
|
||||||
core.increment (map.chads (1).x);
|
core.increment (map.chads (1).x);
|
||||||
|
if map.chads (1).movement.value > 0 then
|
||||||
|
map.chads (1).movement := map.chads (1).movement + 1;
|
||||||
|
end if;
|
||||||
end if;
|
end if;
|
||||||
end player_left;
|
end player_left;
|
||||||
|
|
||||||
@ -816,8 +837,12 @@ package body world is
|
|||||||
begin
|
begin
|
||||||
core.increment (map.chads (1).x);
|
core.increment (map.chads (1).x);
|
||||||
core.clip (map.chads (1).x, 0, map.width - 1);
|
core.clip (map.chads (1).x, 0, map.width - 1);
|
||||||
|
map.chads (1).movement := map.chads (1).movement - 1;
|
||||||
if map.clips (map.chads (1).x, map.chads (1).y) then
|
if map.clips (map.chads (1).x, map.chads (1).y) then
|
||||||
core.decrement (map.chads (1).x);
|
core.decrement (map.chads (1).x);
|
||||||
|
if map.chads (1).movement.value > 0 then
|
||||||
|
map.chads (1).movement := map.chads (1).movement + 1;
|
||||||
|
end if;
|
||||||
end if;
|
end if;
|
||||||
end player_right;
|
end player_right;
|
||||||
|
|
||||||
|
@ -170,6 +170,7 @@ package world is
|
|||||||
procedure resource_cheat_5;
|
procedure resource_cheat_5;
|
||||||
procedure resource_cheat_6;
|
procedure resource_cheat_6;
|
||||||
procedure reveal_map;
|
procedure reveal_map;
|
||||||
|
procedure restore_points;
|
||||||
|
|
||||||
procedure player_up;
|
procedure player_up;
|
||||||
procedure player_down;
|
procedure player_down;
|
||||||
|
BIN
ui/arrow_e.png
Normal file
BIN
ui/arrow_e.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 163 B |
BIN
ui/arrow_n.png
Normal file
BIN
ui/arrow_n.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 171 B |
BIN
ui/arrow_s.png
Normal file
BIN
ui/arrow_s.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 171 B |
BIN
ui/arrow_w.png
Normal file
BIN
ui/arrow_w.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 164 B |
BIN
ui/place.png
Normal file
BIN
ui/place.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 176 B |
Loading…
Reference in New Issue
Block a user