------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- 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. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ -- Experimental minimal terminal rogue-like game in Ada programming language. I used to write a lot of Ada programs some time ago, then went in full C and assembly mode, and came -- back to Ada, but realized that I keep my folders messy... Since it's bothersome to find my old Ada projects and share them here, I decided that the most easy thing to do is to -- write a new program in Ada, a tiny game. Work in progress, it's messy and ugly for now... ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ with core; package body map is ------------------------------------------------------------------------------------------ procedure generate is begin for y in height loop for x in width loop matrical_data (y, x) := (wooden_floor, constant_data (wooden_floor).condition_limit); end loop; end loop; end generate; procedure render is symbol : character := ' '; colour : character := core.colour.white; effect : character := core.effect.normal; begin for y in core.screen_height loop for x in core.screen_width loop 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); end loop; end loop; end render; ------------------------------------------------------------------------------------------ end map;