-- Copyright (c) 2024 - Ognjen 'xolatile' Milan Robovic -- -- GNU General Public Licence (version 3 or later) with core, equipment, unit, construction, chad; package world is ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ type biome is ( ash, sand, grass, rough, snow, swamp ); ------------------------------------------------------------------------------------------ type landmark_index is ( dead_tree, mossy_rock, palm_tree, pine_tree, pine_forest, reeds, rock, snowed_pine_tree, snowed_rock, spiky_rock, wooden_sign, wooden_arrow_sign, rune_stone, snowed_rune_stone, mossy_rune_stone, snowed_pine_forest, hyacinths, orchids, asters, daffodils, royal_grave, grave, humble_grave, wooden_wide_sign ); type landmark_trait is record name : core.short_string; spawn : biome; clip : boolean; frames : integer; end record; type entity_trait is record index : natural; x, y : integer; end record; type tile_array is array (natural range <>, natural range <>) of integer; type clip_array is array (natural range <>, natural range <>) of boolean; type view_array is array (natural range <>, natural range <>) of boolean; type entity_array is array (natural range <>) of entity_trait; type information is record kind : biome; width : natural; height : natural; tiles : access tile_array; clips : access clip_array; views : access view_array; landmarks : access entity_array; constructions : access entity_array; equipments : access entity_array; units : access entity_array; chads : access entity_array; chad_data : access chad.data_list; end record; ------------------------------------------------------------------------------------------ biome_count : constant natural := biome'pos (biome'last) + 1; landmarks : array (landmark_index) of core.sprite; landmark_limit : constant integer := 360; landmark_count : constant natural := landmark_index'pos (landmark_index'last) + 1; trait : constant array (landmark_index) of landmark_trait := ( dead_tree => ("Dead Tree ", ash, true, 1), mossy_rock => ("Mossy Rock ", swamp, true, 1), palm_tree => ("Palm Tree ", sand, true, 4), pine_tree => ("Pine Tree ", grass, true, 4), pine_forest => ("Pine Forest ", grass, true, 4), reeds => ("Reeds ", swamp, false, 4), rock => ("Rock ", sand, true, 1), snowed_pine_tree => ("Snowed Pine Tree ", snow, true, 4), snowed_rock => ("Snowed Rock ", snow, true, 1), spiky_rock => ("Spiky Rock ", ash, true, 1), wooden_sign => ("Wooden Sign ", grass, false, 1), wooden_arrow_sign => ("Wooden Arrow Sign ", grass, false, 1), rune_stone => ("Rune Stone ", grass, true, 4), snowed_rune_stone => ("Snowed Rune Stone ", snow, true, 1), mossy_rune_stone => ("Mossy Rune Stone ", swamp, true, 4), snowed_pine_forest => ("Snowed Pine Forest ", snow, true, 4), hyacinths => ("Hyacinths ", grass, false, 1), orchids => ("Orchids ", grass, false, 1), asters => ("Asters ", grass, false, 1), daffodils => ("Daffodils ", grass, false, 1), royal_grave => ("Royal Grave ", ash, true, 1), grave => ("Grave ", ash, true, 1), humble_grave => ("Humble Grave ", ash, true, 1), wooden_wide_sign => ("Wooden Wide Sign ", grass, false, 1) ); map : information; ------------------------------------------------------------------------------------------ procedure configure; procedure make (index : in biome; width, height : in natural); procedure draw; procedure mapshot (file_path : in string); procedure reveal_map; procedure add_chad (data : in chad.data; entity : in entity_trait); ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ end world;