2023-10-15 11:00:07 -04:00
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- 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.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2023-10-15 12:35:38 -04:00
with core ;
2023-10-15 11:00:07 -04:00
2023-10-15 12:15:04 -04:00
package body map is
2023-10-15 11:00:07 -04:00
------------------------------------------------------------------------------------------
2023-10-15 12:15:04 -04:00
procedure generate is
begin
for y in height
loop
for x in width
loop
2023-10-15 13:35:03 -04:00
matrical_data ( y , x ) := ( wooden_floor , constant_data ( wooden_floor ) . condition_limit ) ;
2023-10-15 12:15:04 -04:00
end loop ;
end loop ;
end generate ;
procedure render is
symbol : character := ' ' ;
colour : character := core . colour . white ;
effect : character := core . effect . normal ;
begin
2023-10-15 12:35:38 -04:00
for y in core . screen_height
2023-10-15 12:15:04 -04:00
loop
2023-10-15 12:35:38 -04:00
for x in core . screen_width
2023-10-15 12:15:04 -04:00
loop
2023-10-15 12:35:38 -04:00
symbol := constant_data ( matrical_data ( height ( y ) , width ( x ) ) . map ) . symbol ;
colour := constant_data ( matrical_data ( height ( y ) , width ( x ) ) . map ) . colour ;
effect := constant_data ( matrical_data ( height ( y ) , width ( x ) ) . map ) . effect ;
core . render_character ( symbol , colour , effect , y , x ) ;
2023-10-15 12:15:04 -04:00
end loop ;
end loop ;
end render ;
2023-10-15 11:00:07 -04:00
------------------------------------------------------------------------------------------
2023-10-15 12:15:04 -04:00
end map ;