Commiting again...
This commit is contained in:
parent
a70503303b
commit
ce4e496107
3
main.adb
3
main.adb
@ -26,8 +26,7 @@ begin
|
|||||||
|
|
||||||
map.generate;
|
map.generate;
|
||||||
item.generate;
|
item.generate;
|
||||||
|
weapon.generate;
|
||||||
weapon.create (weapon.iron_mace, 2, 2);
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
32
weapon.adb
32
weapon.adb
@ -12,26 +12,32 @@ package body weapon is
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure create (this : list;
|
procedure generate is
|
||||||
y : map.height;
|
y : natural := 0;
|
||||||
x : map.width) is
|
x : natural := 0;
|
||||||
|
identifier : natural := 0;
|
||||||
begin
|
begin
|
||||||
map.variable_data (1) := (2, 2, core.weapon, list'pos (this));
|
for this in map.mark
|
||||||
end create;
|
loop
|
||||||
|
y := core.randomize (0, natural (map.height'last));
|
||||||
|
x := core.randomize (0, natural (map.width'last));
|
||||||
|
identifier := core.randomize (0, natural (list'size));
|
||||||
|
map.variable_data (this) := (integer (y), integer (x), core.weapon, identifier);
|
||||||
|
end loop;
|
||||||
|
end generate;
|
||||||
|
|
||||||
procedure render is
|
procedure render is
|
||||||
symbol : character := ' ';
|
symbol : character := ' ';
|
||||||
colour : character := core.colour.white;
|
colour : character := core.colour.white;
|
||||||
effect : character := core.effect.normal;
|
effect : character := core.effect.normal;
|
||||||
begin
|
begin
|
||||||
symbol := constant_data (list'val (map.variable_data (1).identifier)).symbol;
|
for this in map.mark
|
||||||
colour := constant_data (list'val (map.variable_data (1).identifier)).colour;
|
loop
|
||||||
effect := constant_data (list'val (map.variable_data (1).identifier)).effect;
|
symbol := constant_data (list'val (map.variable_data (this).identifier)).symbol;
|
||||||
core.render_character (symbol, colour, effect, core.screen_height (map.variable_data (1).y), core.screen_width (map.variable_data (1).x));
|
colour := constant_data (list'val (map.variable_data (this).identifier)).colour;
|
||||||
--~for this in mark
|
effect := constant_data (list'val (map.variable_data (this).identifier)).effect;
|
||||||
--~loop
|
core.render_character (symbol, colour, effect, core.screen_height (map.variable_data (this).y), core.screen_width (map.variable_data (this).x));
|
||||||
--~core.render_character ('@', core.colour.cyan, core.effect.bold, core.screen_height (map.variable_data (0)), core.screen_width (map.variable_data (0)));
|
end loop;
|
||||||
--~end loop;
|
|
||||||
end render;
|
end render;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
@ -74,10 +74,7 @@ package weapon is
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure create (this : list;
|
procedure generate;
|
||||||
y : map.height;
|
|
||||||
x : map.width);
|
|
||||||
|
|
||||||
procedure render;
|
procedure render;
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user