40 lines
2.3 KiB
Ada
40 lines
2.3 KiB
Ada
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
-- Copyright (c) 2023 - Ognjen 'xolatile' Milan Robovic
|
||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
-- Xabina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either
|
||
|
-- version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
|
||
|
-- implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||
|
|
||
|
with core, map;
|
||
|
|
||
|
package body item is
|
||
|
|
||
|
------------------------------------------------------------------------------------------
|
||
|
|
||
|
procedure create (this : list;
|
||
|
y : map.height;
|
||
|
x : map.width) is
|
||
|
begin
|
||
|
map.variable_data (0) := (1, 1, core.item, list'pos (this));
|
||
|
end create;
|
||
|
|
||
|
procedure render is
|
||
|
symbol : character := ' ';
|
||
|
colour : character := core.colour.white;
|
||
|
effect : character := core.effect.normal;
|
||
|
begin
|
||
|
symbol := constant_data (list'val (map.variable_data (0).identifier)).symbol;
|
||
|
colour := constant_data (list'val (map.variable_data (0).identifier)).colour;
|
||
|
effect := constant_data (list'val (map.variable_data (0).identifier)).effect;
|
||
|
core.render_character (symbol, colour, effect, core.screen_height (map.variable_data (0).y), core.screen_width (map.variable_data (0).x));
|
||
|
--~for this in mark
|
||
|
--~loop
|
||
|
--~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 render;
|
||
|
|
||
|
------------------------------------------------------------------------------------------
|
||
|
|
||
|
end item;
|