Browse Source

More rafactoring...

master
Ognjen Milan Robovic 7 months ago
parent
commit
18e256cc6f
14 changed files with 267 additions and 1207 deletions
  1. +0
    -0
      action.ads
  2. +6
    -7
      ammunition.ads
  3. +82
    -83
      animal.ads
  4. +10
    -11
      armour.ads
  5. +3
    -3
      core.adb
  6. +33
    -27
      core.ads
  7. +52
    -53
      item.ads
  8. +6
    -7
      magic.ads
  9. +33
    -41
      main.adb
  10. +2
    -3
      monster.ads
  11. +14
    -15
      plant.ads
  12. +0
    -0
      render.ads
  13. +26
    -27
      weapon.ads
  14. +0
    -930
      xabina.adb

+ 0
- 0
action.ads View File


+ 6
- 7
ammunition.ads View File

@@ -11,7 +11,6 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core;
use core;

package ammunition is

@@ -25,7 +24,7 @@ package ammunition is

------------------------------------------------------------------------------------------

type ammunition_constant_type is new entity_constant_type with
type ammunition_constant_type is new core.entity_constant_type with
record
value : natural := 0;
weight : natural := 0;
@@ -35,7 +34,7 @@ package ammunition is
distance_range : natural := 0;
end record;

type ammunition_variable_type is new entity_variable_type with
type ammunition_variable_type is new core.entity_variable_type with
record
amount : natural := 0;
enchantment : natural := 0;
@@ -47,10 +46,10 @@ package ammunition is
------------------------------------------------------------------------------------------

ammunition_constant_data : constant ammunition_constant_list := (
(ENTITY_AMMUNITION, "Arrows ", '^', COLOUR_RED, EFFECT_NORMAL, 11, 13, false, 23, 7, 67),
(ENTITY_AMMUNITION, "Bolts ", '^', COLOUR_RED, EFFECT_NORMAL, 13, 23, false, 29, 5, 67),
(ENTITY_AMMUNITION, "Slingshots ", '^', COLOUR_RED, EFFECT_NORMAL, 5, 7, true, 43, 7, 67),
(ENTITY_AMMUNITION, "Jarids ", '^', COLOUR_RED, EFFECT_NORMAL, 29, 37, true, 7, 7, 67)
(core.ENTITY_AMMUNITION, "Arrows ", '^', core.colour.red, core.effect.normal, 11, 13, false, 23, 7, 67),
(core.ENTITY_AMMUNITION, "Bolts ", '^', core.colour.red, core.effect.normal, 13, 23, false, 29, 5, 67),
(core.ENTITY_AMMUNITION, "Slingshots ", '^', core.colour.red, core.effect.normal, 5, 7, true, 43, 7, 67),
(core.ENTITY_AMMUNITION, "Jarids ", '^', core.colour.red, core.effect.normal, 29, 37, true, 7, 7, 67)
);

ammunition_variable_data : ammunition_variable_list;


+ 82
- 83
animal.ads View File

@@ -11,7 +11,6 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core;
use core;

package animal is

@@ -35,14 +34,14 @@ package animal is

------------------------------------------------------------------------------------------

type animal_constant_type is new entity_constant_type with
type animal_constant_type is new core.entity_constant_type with
record
health_limit : natural := 0;
attack_range : natural := 0;
defense_range : natural := 0;
end record;

type animal_variable_type is new entity_variable_type with
type animal_variable_type is new core.entity_variable_type with
record
health : natural := 0;
end record;
@@ -53,86 +52,86 @@ package animal is
------------------------------------------------------------------------------------------

animal_constant_data : constant animal_constant_list := (
(ENTITY_ANIMAL, "Pig ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Cow ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Chicken ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Sheep ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Boar ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Goat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Auroch ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Duck ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Dog ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Cat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Rabbit ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Hamster ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Horse ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Donkey ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Camel ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Elephant ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Owl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Hawk ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Pigeon ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Vulture ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Crow ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Pheasant ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Sparrow ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Albatross ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Sardine ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Herring ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Catfish ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Carp ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Whale ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Shark ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Squid ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Sawfish ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Worm ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Bee ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Centipede ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Spider ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Frog ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Rat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Bat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Mole ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Wolf ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Fox ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Bear ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Mammoth ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Elk ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Moose ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Deer ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Peebles ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Lion ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Hyena ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Bison ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Zebra ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giraffe ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Crocodile ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Monkey ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Gnu ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Caribou ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Seal ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Morse ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Penguin ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Turtle ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Cayman ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Otter ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Snake ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Lizard ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Daeodon ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Slime ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Axolotl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Hedgehog ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Caterpillar ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Crab ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Scorpion ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Lizard ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Centipede ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Spider ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Sloth ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Owl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Scorpion ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Axolotl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Worm ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11)
(core.ENTITY_ANIMAL, "Pig ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Cow ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Chicken ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Sheep ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Boar ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Goat ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Auroch ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Duck ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Dog ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Cat ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Rabbit ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Hamster ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Horse ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Donkey ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Camel ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Elephant ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Owl ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Hawk ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Pigeon ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Vulture ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Crow ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Pheasant ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Sparrow ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Albatross ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Sardine ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Herring ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Catfish ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Carp ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Whale ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Shark ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Squid ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Sawfish ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Worm ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Bee ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Centipede ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Spider ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Frog ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Rat ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Bat ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Mole ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Wolf ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Fox ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Bear ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Mammoth ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Elk ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Moose ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Deer ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Peebles ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Lion ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Hyena ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Bison ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Zebra ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Giraffe ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Crocodile ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Monkey ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Gnu ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Caribou ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Seal ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Morse ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Penguin ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Turtle ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Cayman ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Otter ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Snake ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Lizard ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Daeodon ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Slime ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Axolotl ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Hedgehog ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Caterpillar ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Crab ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Scorpion ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Giant Lizard ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Giant Centipede ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Giant Spider ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Giant Sloth ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Giant Owl ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Giant Scorpion ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Giant Axolotl ", 'a', core.colour.green, core.effect.normal, 11, 11, 11),
(core.ENTITY_ANIMAL, "Giant Worm ", 'a', core.colour.green, core.effect.normal, 11, 11, 11)
);

animal_variable_data : animal_variable_list;


+ 10
- 11
armour.ads View File

@@ -11,7 +11,6 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core;
use core;

package armour is

@@ -25,14 +24,14 @@ package armour is

------------------------------------------------------------------------------------------

type armour_constant_type is new entity_constant_type with
type armour_constant_type is new core.entity_constant_type with
record
value : natural := 0;
weight : natural := 0;
defense_range : natural := 0;
end record;

type armour_variable_type is new entity_variable_type with
type armour_variable_type is new core.entity_variable_type with
record
enchantment : natural := 0;
condition : natural := 0;
@@ -44,14 +43,14 @@ package armour is
------------------------------------------------------------------------------------------

armour_constant_data : constant armour_constant_list := (
(ENTITY_ARMOUR, "Iron Helmet ", 'm', COLOUR_YELLOW, EFFECT_NORMAL, 11, 31, 7),
(ENTITY_ARMOUR, "Iron Chestplate ", 'M', COLOUR_YELLOW, EFFECT_BOLD, 23, 67, 11),
(ENTITY_ARMOUR, "Iron Gauntlets ", 'i', COLOUR_YELLOW, EFFECT_NORMAL, 13, 43, 7),
(ENTITY_ARMOUR, "Iron Greaves ", 'I', COLOUR_YELLOW, EFFECT_NORMAL, 19, 73, 13),
(ENTITY_ARMOUR, "Iron Cuisse ", 'Y', COLOUR_YELLOW, EFFECT_BOLD, 17, 53, 10),
(ENTITY_ARMOUR, "Iron Fauld ", '-', COLOUR_YELLOW, EFFECT_NORMAL, 13, 37, 3),
(ENTITY_ARMOUR, "Iron Gardbrace ", 'v', COLOUR_YELLOW, EFFECT_NORMAL, 11, 41, 8),
(ENTITY_ARMOUR, "Iron Rerebrace ", 'V', COLOUR_YELLOW, EFFECT_NORMAL, 13, 47, 7)
(core.ENTITY_ARMOUR, "Iron Helmet ", 'm', core.colour.yellow, core.effect.normal, 11, 31, 7),
(core.ENTITY_ARMOUR, "Iron Chestplate ", 'M', core.colour.yellow, core.effect.bold, 23, 67, 11),
(core.ENTITY_ARMOUR, "Iron Gauntlets ", 'i', core.colour.yellow, core.effect.normal, 13, 43, 7),
(core.ENTITY_ARMOUR, "Iron Greaves ", 'I', core.colour.yellow, core.effect.normal, 19, 73, 13),
(core.ENTITY_ARMOUR, "Iron Cuisse ", 'Y', core.colour.yellow, core.effect.bold, 17, 53, 10),
(core.ENTITY_ARMOUR, "Iron Fauld ", '-', core.colour.yellow, core.effect.normal, 13, 37, 3),
(core.ENTITY_ARMOUR, "Iron Gardbrace ", 'v', core.colour.yellow, core.effect.normal, 11, 41, 8),
(core.ENTITY_ARMOUR, "Iron Rerebrace ", 'V', core.colour.yellow, core.effect.normal, 13, 47, 7)
);

armour_variable_data : armour_variable_list;


+ 3
- 3
core.adb View File

@@ -40,8 +40,8 @@ package body core is
procedure render_realignment is begin put (CARRIAGE_RETURN & LINE_FEED); end render_realignment;

procedure render_character (symbol : character := ' ';
colour : character := COLOUR_WHITE;
effect : character := EFFECT_NORMAL;
colour : character := '7';
effect : character := '0';
y : screen_height := 0;
x : screen_width := 0) is
begin
@@ -75,7 +75,7 @@ package body core is

procedure render_player is
begin
render_character ('@', COLOUR_CYAN, EFFECT_BOLD, screen_height (player.y), screen_width (player.x));
render_character ('@', core.colour.cyan, core.effect.bold, screen_height (player.y), screen_width (player.x));
end render_player;

end core;

+ 33
- 27
core.ads View File

@@ -13,27 +13,29 @@
with ada.text_io;
use ada.text_io;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

package core is

COLOUR_GREY : constant character := '0';
COLOUR_RED : constant character := '1';
COLOUR_GREEN : constant character := '2';
COLOUR_YELLOW : constant character := '3';
COLOUR_BLUE : constant character := '4';
COLOUR_PINK : constant character := '5';
COLOUR_CYAN : constant character := '6';
COLOUR_WHITE : constant character := '7';

EFFECT_NORMAL : constant character := '0';
EFFECT_BOLD : constant character := '1';
EFFECT_ITALIC : constant character := '3';
EFFECT_UNDERLINE : constant character := '4';
EFFECT_BLINK : constant character := '5';
EFFECT_REVERSE : constant character := '7';
type colour_type is
record
grey : character := '0';
red : character := '1';
green : character := '2';
yellow : character := '3';
blue : character := '4';
pink : character := '5';
cyan : character := '6';
white : character := '7';
end record;

type effect_type is
record
normal : character := '0';
bold : character := '1';
italic : character := '3';
underline : character := '4';
blink : character := '5';
contra : character := '7';
end record;

CANCEL : constant character := character'val (24);
CARRIAGE_RETURN : constant character := character'val (10);
@@ -61,7 +63,7 @@ package core is

type entity_list is (
ENTITY_NULL, ENTITY_MENU, ENTITY_MAP, ENTITY_ITEM, ENTITY_MAGIC, ENTITY_AMMUNITION, ENTITY_WEAPON, ENTITY_ARMOUR,
ENTITY_SCROLL, ENTITY_POTION, ENTITY_CONSUMABLE, ENTITY_NOTE, ENTITY_PLANT, ENTITY_ANIMAL, ENTITY_GOBLIN, ENTITY_PLAYER
ENTITY_SCROLL, ENTITY_POTION, ENTITY_CONSUMABLE, ENTITY_NOTE, ENTITY_PLANT, ENTITY_ANIMAL, ENTITY_MONSTER, ENTITY_PLAYER
);

------------------------------------------------------------------------------------------
@@ -71,8 +73,8 @@ package core is
entity : entity_list := ENTITY_NULL; -- Entity identifier.
name : string (1 .. 20) := "- "; -- Entity general name.
symbol : character := ' '; -- Entity ASCII character representation.
colour : character := COLOUR_WHITE; -- Entity VT100 escape sequence colour.
effect : character := EFFECT_NORMAL; -- Entity VT100 escape sequence effect.
colour : character := '7'; -- Entity VT100 escape sequence colour.
effect : character := '0'; -- Entity VT100 escape sequence effect.
end record;

type entity_variable_type is tagged
@@ -122,8 +124,11 @@ package core is
action_list : action_type := (others => action_idle'access);

screen_symbol : screen_type := (others => (others => CANCEL));
screen_colour : screen_type := (others => (others => COLOUR_WHITE));
screen_effect : screen_type := (others => (others => EFFECT_NORMAL));
screen_colour : screen_type := (others => (others => '7'));
screen_effect : screen_type := (others => (others => '0'));

colour : colour_type;
effect : effect_type;

------------------------------------------------------------------------------------------

@@ -133,8 +138,8 @@ package core is
--~action_list := (others => action_idle'access);

--~screen_symbol := (others => (others => CANCEL));
--~screen_colour := (others => (others => COLOUR_WHITE));
--~screen_effect := (others => (others => EFFECT_NORMAL));
--~screen_colour := (others => (others => colour.white));
--~screen_effect := (others => (others => effect.normal));

------------------------------------------------------------------------------------------

@@ -167,8 +172,8 @@ package core is
procedure render_realignment;

procedure render_character (symbol : character := ' ';
colour : character := COLOUR_WHITE;
effect : character := EFFECT_NORMAL;
colour : character := '7';
effect : character := '0';
y : screen_height := 0;
x : screen_width := 0);



+ 52
- 53
item.ads View File

@@ -11,7 +11,6 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core;
use core;

package item is

@@ -31,13 +30,13 @@ package item is

------------------------------------------------------------------------------------------

type item_constant_type is new entity_constant_type with
type item_constant_type is new core.entity_constant_type with
record
value : natural := 0;
weight : natural := 0;
end record;

type item_variable_type is new entity_variable_type with
type item_variable_type is new core.entity_variable_type with
record
owner : natural := 0;
end record;
@@ -48,56 +47,56 @@ package item is
------------------------------------------------------------------------------------------

item_constant_data : constant item_constant_list := (
(ENTITY_ITEM, "Wood ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 2),
(ENTITY_ITEM, "Bark ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 2),
(ENTITY_ITEM, "Flax ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 1),
(ENTITY_ITEM, "Plank ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 2),
(ENTITY_ITEM, "Stick ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 2),
(ENTITY_ITEM, "Braces ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1),
(ENTITY_ITEM, "Nails ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1),
(ENTITY_ITEM, "Linen ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 1),
(ENTITY_ITEM, "Chamomile ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 1),
(ENTITY_ITEM, "Mint ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 1),
(ENTITY_ITEM, "Wax ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 7, 1),
(ENTITY_ITEM, "Salt ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 1),
(ENTITY_ITEM, "Sugar ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 17, 1),
(ENTITY_ITEM, "Pepper ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 1),
(ENTITY_ITEM, "Cinnamon ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 1),
(ENTITY_ITEM, "Yeast ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 1),
(ENTITY_ITEM, "Skull ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1),
(ENTITY_ITEM, "Bone ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1),
(ENTITY_ITEM, "Intestines ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1),
(ENTITY_ITEM, "Fur ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 7, 2),
(ENTITY_ITEM, "Leather ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 1),
(ENTITY_ITEM, "Fat ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1),
(ENTITY_ITEM, "Horn ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1),
(ENTITY_ITEM, "Tusk ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 5),
(ENTITY_ITEM, "Copper Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 7),
(ENTITY_ITEM, "Iron Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 7, 11),
(ENTITY_ITEM, "Silver Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 17, 7),
(ENTITY_ITEM, "Gold Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 7),
(ENTITY_ITEM, "Coal Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 7),
(ENTITY_ITEM, "Tin Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 7),
(ENTITY_ITEM, "Zinc Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 7),
(ENTITY_ITEM, "Lead Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 13),
(ENTITY_ITEM, "Copper ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 17, 5),
(ENTITY_ITEM, "Iron ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 19, 7),
(ENTITY_ITEM, "Silver ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 5),
(ENTITY_ITEM, "Gold ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 29, 5),
(ENTITY_ITEM, "Coal ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 19, 5),
(ENTITY_ITEM, "Tin ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 5),
(ENTITY_ITEM, "Zinc ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 5),
(ENTITY_ITEM, "Lead ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 47, 7),
(ENTITY_ITEM, "Bronze ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 61, 5),
(ENTITY_ITEM, "Brass ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 67, 5),
(ENTITY_ITEM, "Steel ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 71, 7),
(ENTITY_ITEM, "Mercury ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 97, 11),
(ENTITY_ITEM, "Oil ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 1),
(ENTITY_ITEM, "Ink ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 1),
(ENTITY_ITEM, "Venom ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 1),
(ENTITY_ITEM, "Silk ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 1),
(ENTITY_ITEM, "Papers ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1),
(ENTITY_ITEM, "Paperweight ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1)
(core.ENTITY_ITEM, "Wood ", '+', core.colour.yellow, core.effect.normal, 2, 2),
(core.ENTITY_ITEM, "Bark ", '+', core.colour.yellow, core.effect.normal, 1, 2),
(core.ENTITY_ITEM, "Flax ", '+', core.colour.yellow, core.effect.normal, 3, 1),
(core.ENTITY_ITEM, "Plank ", '+', core.colour.yellow, core.effect.normal, 2, 2),
(core.ENTITY_ITEM, "Stick ", '+', core.colour.yellow, core.effect.normal, 2, 2),
(core.ENTITY_ITEM, "Braces ", '+', core.colour.yellow, core.effect.normal, 2, 1),
(core.ENTITY_ITEM, "Nails ", '+', core.colour.yellow, core.effect.normal, 1, 1),
(core.ENTITY_ITEM, "Linen ", '+', core.colour.yellow, core.effect.normal, 23, 1),
(core.ENTITY_ITEM, "Chamomile ", '+', core.colour.yellow, core.effect.normal, 3, 1),
(core.ENTITY_ITEM, "Mint ", '+', core.colour.yellow, core.effect.normal, 5, 1),
(core.ENTITY_ITEM, "Wax ", '+', core.colour.yellow, core.effect.normal, 7, 1),
(core.ENTITY_ITEM, "Salt ", '+', core.colour.yellow, core.effect.normal, 13, 1),
(core.ENTITY_ITEM, "Sugar ", '+', core.colour.yellow, core.effect.normal, 17, 1),
(core.ENTITY_ITEM, "Pepper ", '+', core.colour.yellow, core.effect.normal, 11, 1),
(core.ENTITY_ITEM, "Cinnamon ", '+', core.colour.yellow, core.effect.normal, 23, 1),
(core.ENTITY_ITEM, "Yeast ", '+', core.colour.yellow, core.effect.normal, 5, 1),
(core.ENTITY_ITEM, "Skull ", '+', core.colour.yellow, core.effect.normal, 2, 1),
(core.ENTITY_ITEM, "Bone ", '+', core.colour.yellow, core.effect.normal, 1, 1),
(core.ENTITY_ITEM, "Intestines ", '+', core.colour.yellow, core.effect.normal, 1, 1),
(core.ENTITY_ITEM, "Fur ", '+', core.colour.yellow, core.effect.normal, 7, 2),
(core.ENTITY_ITEM, "Leather ", '+', core.colour.yellow, core.effect.normal, 3, 1),
(core.ENTITY_ITEM, "Fat ", '+', core.colour.yellow, core.effect.normal, 1, 1),
(core.ENTITY_ITEM, "Horn ", '+', core.colour.yellow, core.effect.normal, 2, 1),
(core.ENTITY_ITEM, "Tusk ", '+', core.colour.yellow, core.effect.normal, 3, 5),
(core.ENTITY_ITEM, "Copper Ore ", '+', core.colour.yellow, core.effect.normal, 5, 7),
(core.ENTITY_ITEM, "Iron Ore ", '+', core.colour.yellow, core.effect.normal, 7, 11),
(core.ENTITY_ITEM, "Silver Ore ", '+', core.colour.yellow, core.effect.normal, 17, 7),
(core.ENTITY_ITEM, "Gold Ore ", '+', core.colour.yellow, core.effect.normal, 23, 7),
(core.ENTITY_ITEM, "Coal Ore ", '+', core.colour.yellow, core.effect.normal, 2, 7),
(core.ENTITY_ITEM, "Tin Ore ", '+', core.colour.yellow, core.effect.normal, 13, 7),
(core.ENTITY_ITEM, "Zinc Ore ", '+', core.colour.yellow, core.effect.normal, 13, 7),
(core.ENTITY_ITEM, "Lead Ore ", '+', core.colour.yellow, core.effect.normal, 11, 13),
(core.ENTITY_ITEM, "Copper ", '+', core.colour.yellow, core.effect.normal, 17, 5),
(core.ENTITY_ITEM, "Iron ", '+', core.colour.yellow, core.effect.normal, 19, 7),
(core.ENTITY_ITEM, "Silver ", '+', core.colour.yellow, core.effect.normal, 23, 5),
(core.ENTITY_ITEM, "Gold ", '+', core.colour.yellow, core.effect.normal, 29, 5),
(core.ENTITY_ITEM, "Coal ", '+', core.colour.yellow, core.effect.normal, 19, 5),
(core.ENTITY_ITEM, "Tin ", '+', core.colour.yellow, core.effect.normal, 11, 5),
(core.ENTITY_ITEM, "Zinc ", '+', core.colour.yellow, core.effect.normal, 13, 5),
(core.ENTITY_ITEM, "Lead ", '+', core.colour.yellow, core.effect.normal, 47, 7),
(core.ENTITY_ITEM, "Bronze ", '+', core.colour.yellow, core.effect.normal, 61, 5),
(core.ENTITY_ITEM, "Brass ", '+', core.colour.yellow, core.effect.normal, 67, 5),
(core.ENTITY_ITEM, "Steel ", '+', core.colour.yellow, core.effect.normal, 71, 7),
(core.ENTITY_ITEM, "Mercury ", '+', core.colour.yellow, core.effect.normal, 97, 11),
(core.ENTITY_ITEM, "Oil ", '+', core.colour.yellow, core.effect.normal, 5, 1),
(core.ENTITY_ITEM, "Ink ", '+', core.colour.yellow, core.effect.normal, 13, 1),
(core.ENTITY_ITEM, "Venom ", '+', core.colour.yellow, core.effect.normal, 11, 1),
(core.ENTITY_ITEM, "Silk ", '+', core.colour.yellow, core.effect.normal, 13, 1),
(core.ENTITY_ITEM, "Papers ", '+', core.colour.yellow, core.effect.normal, 1, 1),
(core.ENTITY_ITEM, "Paperweight ", '+', core.colour.yellow, core.effect.normal, 2, 1)
);

item_variable_data : item_variable_list;


+ 6
- 7
magic.ads View File

@@ -11,7 +11,6 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core;
use core;

package magic is

@@ -25,7 +24,7 @@ package magic is

------------------------------------------------------------------------------------------

type magic_constant_type is new entity_constant_type with
type magic_constant_type is new core.entity_constant_type with
record
self : boolean := false;
health : integer := 0;
@@ -36,7 +35,7 @@ package magic is
tribute : natural := 0;
end record;

type magic_variable_type is new entity_variable_type with
type magic_variable_type is new core.entity_variable_type with
record
enchantment : natural := 0;
end record;
@@ -47,10 +46,10 @@ package magic is
------------------------------------------------------------------------------------------

magic_constant_data : constant magic_constant_list := (
(ENTITY_MAGIC, "Ignite ", '*', COLOUR_YELLOW, EFFECT_ITALIC, false, -3, 0, 0, -1, 7, 1),
(ENTITY_MAGIC, "Illuminate ", '*', COLOUR_YELLOW, EFFECT_ITALIC, false, 0, 0, 0, -1, 13, 1),
(ENTITY_MAGIC, "Bladecharm ", '*', COLOUR_RED, EFFECT_ITALIC, true, 0, -3, 0, -1, 7, 3),
(ENTITY_MAGIC, "Battlecry ", '*', COLOUR_RED, EFFECT_ITALIC, true, -1, -1, 0, -1, 7, 2)
(core.ENTITY_MAGIC, "Ignite ", '*', core.colour.yellow, core.effect.italic, false, -3, 0, 0, -1, 7, 1),
(core.ENTITY_MAGIC, "Illuminate ", '*', core.colour.yellow, core.effect.italic, false, 0, 0, 0, -1, 13, 1),
(core.ENTITY_MAGIC, "Bladecharm ", '*', core.colour.red, core.effect.italic, true, 0, -3, 0, -1, 7, 3),
(core.ENTITY_MAGIC, "Battlecry ", '*', core.colour.red, core.effect.italic, true, -1, -1, 0, -1, 7, 2)
);

magic_variable_data : magic_variable_list;


+ 33
- 41
main.adb View File

@@ -11,21 +11,11 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with ada.text_io;
use ada.text_io;

with core, item, plant, animal, monster;
use core, item, plant, animal, monster;
with core, item, magic, ammunition, weapon, armour, plant, animal, monster;

function main return integer is

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type map_list is (
MAP_STONE_WALL, MAP_WOODEN_WALL, MAP_STONE_FLOOR, MAP_WOODEN_FLOOR, MAP_WATER_SHALLOW, MAP_WATER_DEEP, MAP_SWAMP_SHALLOW, MAP_SWAMP_DEEP
);
@@ -36,16 +26,16 @@ function main return integer is
type map_width is mod 120;
type map_height is mod 40;

type map_constant_type is new entity_constant_type with
type map_constant_type is new core.entity_constant_type with
record
collide : boolean := false;
condition_limit : natural := 0;
end record;

type map_variable_type is new entity_variable_type with
type map_variable_type is new core.entity_variable_type with
record
entity : entity_list := ENTITY_NULL;
identifier : natural := 0;
entity : core.entity_list := core.ENTITY_NULL;
identifier : natural := 0;
end record;

type map_matrical_type is
@@ -61,14 +51,14 @@ function main return integer is
------------------------------------------------------------------------------------------

map_constant_data : constant map_constant_list := (
(ENTITY_MAP, "Stone Wall ", '#', COLOUR_GREY, EFFECT_BOLD, true, 59),
(ENTITY_MAP, "Wooden Wall ", '#', COLOUR_YELLOW, EFFECT_NORMAL, false, 23),
(ENTITY_MAP, "Stone Floor ", '.', COLOUR_GREY, EFFECT_BOLD, true, 47),
(ENTITY_MAP, "Wooden Floor ", '.', COLOUR_YELLOW, EFFECT_NORMAL, false, 11),
(ENTITY_MAP, "Water (shallow) ", '~', COLOUR_BLUE, EFFECT_NORMAL, false, 0),
(ENTITY_MAP, "Water (deep) ", '~', COLOUR_BLUE, EFFECT_BOLD, true, 0),
(ENTITY_MAP, "Swamp (shallow) ", '~', COLOUR_GREEN, EFFECT_NORMAL, false, 0),
(ENTITY_MAP, "Swamp (deep) ", '~', COLOUR_GREEN, EFFECT_BOLD, true, 0)
(core.ENTITY_MAP, "Stone Wall ", '#', core.colour.grey, core.effect.bold, true, 59),
(core.ENTITY_MAP, "Wooden Wall ", '#', core.colour.yellow, core.effect.normal, false, 23),
(core.ENTITY_MAP, "Stone Floor ", '.', core.colour.grey, core.effect.bold, true, 47),
(core.ENTITY_MAP, "Wooden Floor ", '.', core.colour.yellow, core.effect.normal, false, 11),
(core.ENTITY_MAP, "Water (shallow) ", '~', core.colour.blue, core.effect.normal, false, 0),
(core.ENTITY_MAP, "Water (deep) ", '~', core.colour.blue, core.effect.bold, true, 0),
(core.ENTITY_MAP, "Swamp (shallow) ", '~', core.colour.green, core.effect.normal, false, 0),
(core.ENTITY_MAP, "Swamp (deep) ", '~', core.colour.green, core.effect.bold, true, 0)
);

map_variable_data : map_variable_list;
@@ -89,17 +79,17 @@ function main return integer is

procedure render_map is
symbol : character := ' ';
colour : character := COLOUR_WHITE;
effect : character := EFFECT_NORMAL;
colour : character := core.colour.white;
effect : character := core.effect.normal;
begin
for y in screen_height
for y in core.screen_height
loop
for x in screen_width
for x in core.screen_width
loop
symbol := map_constant_data (map_matrical_data (map_height (y), map_width (x)).map).symbol;
colour := map_constant_data (map_matrical_data (map_height (y), map_width (x)).map).colour;
effect := map_constant_data (map_matrical_data (map_height (y), map_width (x)).map).effect;
render_character (symbol, colour, effect, y, x);
core.render_character (symbol, colour, effect, y, x);
end loop;
end loop;
end render_map;
@@ -108,33 +98,33 @@ begin

------------------------------------------------------------------------------------------

bind ('q', action_exit'access);
bind ('w', action_move_up'access);
bind ('s', action_move_down'access);
bind ('a', action_move_left'access);
bind ('d', action_move_right'access);
core.bind ('q', core.action_exit'access);
core.bind ('w', core.action_move_up'access);
core.bind ('s', core.action_move_down'access);
core.bind ('a', core.action_move_left'access);
core.bind ('d', core.action_move_right'access);

render_screen_delete;
render_screen_offset;
render_cursor_hide;
core.render_screen_delete;
core.render_screen_offset;
core.render_cursor_hide;

generate_map;

------------------------------------------------------------------------------------------

loop
signal := CANCEL;
core.signal := core.CANCEL;
render_map;
render_player;
render_screen;
get_immediate (signal);
action_list (character'pos (signal)).all;
exit when active = false;
core.render_player;
core.render_screen;
ada.text_io.get_immediate (core.signal);
core.action_list (character'pos (core.signal)).all;
exit when core.active = false;
end loop;

------------------------------------------------------------------------------------------

render_cursor_show;
core.render_cursor_show;

return 0;



+ 2
- 3
monster.ads View File

@@ -11,7 +11,6 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core;
use core;

package monster is

@@ -25,7 +24,7 @@ package monster is

------------------------------------------------------------------------------------------

type goblin_constant_type is new entity_constant_type with
type goblin_constant_type is new core.entity_constant_type with
record
health_limit : natural := 0;
armour_limit : natural := 0;
@@ -34,7 +33,7 @@ package monster is
attack_range : natural := 0;
end record;

type goblin_variable_type is new entity_variable_type with
type goblin_variable_type is new core.entity_variable_type with
record
health : natural := 0;
armour : natural := 0;


+ 14
- 15
plant.ads View File

@@ -11,7 +11,6 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core;
use core;

package plant is

@@ -26,12 +25,12 @@ package plant is

------------------------------------------------------------------------------------------

type plant_constant_type is new entity_constant_type with
type plant_constant_type is new core.entity_constant_type with
record
health_limit : natural := 0;
end record;

type plant_variable_type is new entity_variable_type with
type plant_variable_type is new core.entity_variable_type with
record
health : natural := 0;
end record;
@@ -42,18 +41,18 @@ package plant is
------------------------------------------------------------------------------------------

plant_constant_data : constant plant_constant_list := (
(ENTITY_PLANT, "Oak Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 11),
(ENTITY_PLANT, "Pine Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 23),
(ENTITY_PLANT, "Birch Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 13),
(ENTITY_PLANT, "Acacia Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 19),
(ENTITY_PLANT, "Apple Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 17),
(ENTITY_PLANT, "Peach Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 13),
(ENTITY_PLANT, "Orange Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 11),
(ENTITY_PLANT, "Pear Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 13),
(ENTITY_PLANT, "Bush ", '&', COLOUR_GREEN, EFFECT_NORMAL, 5),
(ENTITY_PLANT, "Thorny Bush ", '&', COLOUR_GREEN, EFFECT_NORMAL, 7),
(ENTITY_PLANT, "Tall Grass ", '%', COLOUR_GREEN, EFFECT_NORMAL, 3),
(ENTITY_PLANT, "Reed ", '%', COLOUR_GREEN, EFFECT_NORMAL, 3)
(core.ENTITY_PLANT, "Oak Tree ", 'T', core.colour.green, core.effect.bold, 11),
(core.ENTITY_PLANT, "Pine Tree ", 'T', core.colour.green, core.effect.bold, 23),
(core.ENTITY_PLANT, "Birch Tree ", 'T', core.colour.green, core.effect.bold, 13),
(core.ENTITY_PLANT, "Acacia Tree ", 'T', core.colour.green, core.effect.bold, 19),
(core.ENTITY_PLANT, "Apple Tree ", 'T', core.colour.green, core.effect.bold, 17),
(core.ENTITY_PLANT, "Peach Tree ", 'T', core.colour.green, core.effect.bold, 13),
(core.ENTITY_PLANT, "Orange Tree ", 'T', core.colour.green, core.effect.bold, 11),
(core.ENTITY_PLANT, "Pear Tree ", 'T', core.colour.green, core.effect.bold, 13),
(core.ENTITY_PLANT, "Bush ", '&', core.colour.green, core.effect.normal, 5),
(core.ENTITY_PLANT, "Thorny Bush ", '&', core.colour.green, core.effect.normal, 7),
(core.ENTITY_PLANT, "Tall Grass ", '%', core.colour.green, core.effect.normal, 3),
(core.ENTITY_PLANT, "Reed ", '%', core.colour.green, core.effect.normal, 3)
);

plant_variable_data : plant_variable_list;


+ 0
- 0
render.ads View File


+ 26
- 27
weapon.ads View File

@@ -11,7 +11,6 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with core;
use core;

package weapon is

@@ -27,7 +26,7 @@ package weapon is

------------------------------------------------------------------------------------------

type weapon_constant_type is new entity_constant_type with
type weapon_constant_type is new core.entity_constant_type with
record
dual_wield : boolean := false;
value : natural := 0;
@@ -37,7 +36,7 @@ package weapon is
distance_range : natural := 0;
end record;

type weapon_variable_type is new entity_variable_type with
type weapon_variable_type is new core.entity_variable_type with
record
enchantment : natural := 0;
condition : natural := 0;
@@ -49,30 +48,30 @@ package weapon is
------------------------------------------------------------------------------------------

weapon_constant_data : constant weapon_constant_list := (
(ENTITY_WEAPON, "Iron Sword ", 'l', COLOUR_RED, EFFECT_NORMAL, true, 11, 31, 7, 2, 1),
(ENTITY_WEAPON, "Iron Greatsword ", 'L', COLOUR_RED, EFFECT_BOLD, false, 23, 67, 11, 3, 2),
(ENTITY_WEAPON, "Iron Axe ", 'r', COLOUR_RED, EFFECT_NORMAL, true, 13, 43, 7, 2, 1),
(ENTITY_WEAPON, "Iron Battleaxe ", 'T', COLOUR_RED, EFFECT_BOLD, false, 19, 73, 13, 2, 2),
(ENTITY_WEAPON, "Iron Spear ", 'I', COLOUR_RED, EFFECT_BOLD, false, 17, 53, 10, 4, 2),
(ENTITY_WEAPON, "Iron Shield ", 'o', COLOUR_RED, EFFECT_NORMAL, true, 13, 37, 3, 9, 1),
(ENTITY_WEAPON, "Iron Mace ", 'i', COLOUR_RED, EFFECT_NORMAL, true, 11, 41, 8, 2, 1),
(ENTITY_WEAPON, "Iron Hammer ", 't', COLOUR_RED, EFFECT_NORMAL, true, 13, 47, 7, 3, 1),
(ENTITY_WEAPON, "Bronze Sword ", 'l', COLOUR_RED, EFFECT_NORMAL, true, 11, 31, 7, 2, 1),
(ENTITY_WEAPON, "Bronze Greatsword ", 'L', COLOUR_RED, EFFECT_BOLD, false, 23, 67, 11, 3, 2),
(ENTITY_WEAPON, "Bronze Axe ", 'r', COLOUR_RED, EFFECT_NORMAL, true, 13, 43, 7, 2, 1),
(ENTITY_WEAPON, "Bronze Battleaxe ", 'T', COLOUR_RED, EFFECT_BOLD, false, 19, 73, 13, 2, 2),
(ENTITY_WEAPON, "Bronze Spear ", 'I', COLOUR_RED, EFFECT_BOLD, false, 17, 53, 10, 4, 2),
(ENTITY_WEAPON, "Bronze Shield ", 'o', COLOUR_RED, EFFECT_NORMAL, true, 13, 37, 3, 9, 1),
(ENTITY_WEAPON, "Bronze Mace ", 'i', COLOUR_RED, EFFECT_NORMAL, true, 11, 41, 8, 2, 1),
(ENTITY_WEAPON, "Bronze Hammer ", 't', COLOUR_RED, EFFECT_NORMAL, true, 13, 47, 7, 3, 1),
(ENTITY_WEAPON, "Brass Sword ", 'l', COLOUR_RED, EFFECT_NORMAL, true, 11, 31, 7, 2, 1),
(ENTITY_WEAPON, "Brass Greatsword ", 'L', COLOUR_RED, EFFECT_BOLD, false, 23, 67, 11, 3, 2),
(ENTITY_WEAPON, "Brass Axe ", 'r', COLOUR_RED, EFFECT_NORMAL, true, 13, 43, 7, 2, 1),
(ENTITY_WEAPON, "Brass Battleaxe ", 'T', COLOUR_RED, EFFECT_BOLD, false, 19, 73, 13, 2, 2),
(ENTITY_WEAPON, "Brass Spear ", 'I', COLOUR_RED, EFFECT_BOLD, false, 17, 53, 10, 4, 2),
(ENTITY_WEAPON, "Brass Shield ", 'o', COLOUR_RED, EFFECT_NORMAL, true, 13, 37, 3, 9, 1),
(ENTITY_WEAPON, "Brass Mace ", 'i', COLOUR_RED, EFFECT_NORMAL, true, 11, 41, 8, 2, 1),
(ENTITY_WEAPON, "Brass Hammer ", 't', COLOUR_RED, EFFECT_NORMAL, true, 13, 47, 7, 3, 1)
(core.ENTITY_WEAPON, "Iron Sword ", 'l', core.colour.red, core.effect.normal, true, 11, 31, 7, 2, 1),
(core.ENTITY_WEAPON, "Iron Greatsword ", 'L', core.colour.red, core.effect.bold, false, 23, 67, 11, 3, 2),
(core.ENTITY_WEAPON, "Iron Axe ", 'r', core.colour.red, core.effect.normal, true, 13, 43, 7, 2, 1),
(core.ENTITY_WEAPON, "Iron Battleaxe ", 'T', core.colour.red, core.effect.bold, false, 19, 73, 13, 2, 2),
(core.ENTITY_WEAPON, "Iron Spear ", 'I', core.colour.red, core.effect.bold, false, 17, 53, 10, 4, 2),
(core.ENTITY_WEAPON, "Iron Shield ", 'o', core.colour.red, core.effect.normal, true, 13, 37, 3, 9, 1),
(core.ENTITY_WEAPON, "Iron Mace ", 'i', core.colour.red, core.effect.normal, true, 11, 41, 8, 2, 1),
(core.ENTITY_WEAPON, "Iron Hammer ", 't', core.colour.red, core.effect.normal, true, 13, 47, 7, 3, 1),
(core.ENTITY_WEAPON, "Bronze Sword ", 'l', core.colour.red, core.effect.normal, true, 11, 31, 7, 2, 1),
(core.ENTITY_WEAPON, "Bronze Greatsword ", 'L', core.colour.red, core.effect.bold, false, 23, 67, 11, 3, 2),
(core.ENTITY_WEAPON, "Bronze Axe ", 'r', core.colour.red, core.effect.normal, true, 13, 43, 7, 2, 1),
(core.ENTITY_WEAPON, "Bronze Battleaxe ", 'T', core.colour.red, core.effect.bold, false, 19, 73, 13, 2, 2),
(core.ENTITY_WEAPON, "Bronze Spear ", 'I', core.colour.red, core.effect.bold, false, 17, 53, 10, 4, 2),
(core.ENTITY_WEAPON, "Bronze Shield ", 'o', core.colour.red, core.effect.normal, true, 13, 37, 3, 9, 1),
(core.ENTITY_WEAPON, "Bronze Mace ", 'i', core.colour.red, core.effect.normal, true, 11, 41, 8, 2, 1),
(core.ENTITY_WEAPON, "Bronze Hammer ", 't', core.colour.red, core.effect.normal, true, 13, 47, 7, 3, 1),
(core.ENTITY_WEAPON, "Brass Sword ", 'l', core.colour.red, core.effect.normal, true, 11, 31, 7, 2, 1),
(core.ENTITY_WEAPON, "Brass Greatsword ", 'L', core.colour.red, core.effect.bold, false, 23, 67, 11, 3, 2),
(core.ENTITY_WEAPON, "Brass Axe ", 'r', core.colour.red, core.effect.normal, true, 13, 43, 7, 2, 1),
(core.ENTITY_WEAPON, "Brass Battleaxe ", 'T', core.colour.red, core.effect.bold, false, 19, 73, 13, 2, 2),
(core.ENTITY_WEAPON, "Brass Spear ", 'I', core.colour.red, core.effect.bold, false, 17, 53, 10, 4, 2),
(core.ENTITY_WEAPON, "Brass Shield ", 'o', core.colour.red, core.effect.normal, true, 13, 37, 3, 9, 1),
(core.ENTITY_WEAPON, "Brass Mace ", 'i', core.colour.red, core.effect.normal, true, 11, 41, 8, 2, 1),
(core.ENTITY_WEAPON, "Brass Hammer ", 't', core.colour.red, core.effect.normal, true, 13, 47, 7, 3, 1)
);

weapon_variable_data : weapon_variable_list;


+ 0
- 930
xabina.adb View File

@@ -1,960 +0,0 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

with ada.text_io;
use ada.text_io;


function xabina return integer is

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

COLOUR_GREY : constant character := '0';
COLOUR_RED : constant character := '1';
COLOUR_GREEN : constant character := '2';
COLOUR_YELLOW : constant character := '3';
COLOUR_BLUE : constant character := '4';
COLOUR_PINK : constant character := '5';
COLOUR_CYAN : constant character := '6';
COLOUR_WHITE : constant character := '7';

EFFECT_NORMAL : constant character := '0';
EFFECT_BOLD : constant character := '1';
EFFECT_ITALIC : constant character := '3';
EFFECT_UNDERLINE : constant character := '4';
EFFECT_BLINK : constant character := '5';
EFFECT_REVERSE : constant character := '7';

CANCEL : constant character := character'val (24);
CARRIAGE_RETURN : constant character := character'val (10);
LINE_FEED : constant character := character'val (13);
ESCAPE : constant character := character'val (27);

------------------------------------------------------------------------------------------

procedure action_idle;

type procedure_pointer is access procedure;
type ascii_range is mod 2 ** 8;
type action_data is array (ascii_range) of procedure_pointer;

type screen_width is mod 120;
type screen_height is mod 40;

type screen_type is array (screen_height, screen_width) of character;

type description is new string (1 .. 144);

------------------------------------------------------------------------------------------

active : boolean := true;
signal : character := ' ';

action_list : action_data := (others => action_idle'access);

screen_symbol : screen_type := (others => (others => CANCEL));
screen_colour : screen_type := (others => (others => COLOUR_WHITE));
screen_effect : screen_type := (others => (others => EFFECT_NORMAL));

------------------------------------------------------------------------------------------

procedure bind (symbol : character := CANCEL;
action : procedure_pointer := action_idle'access) is
begin
action_list (character'pos (symbol)) := action;
end bind;

procedure unbind (symbol : character := CANCEL) is
begin
action_list (character'pos (symbol)) := action_idle'access;
end unbind;

procedure action_idle is begin null; end action_idle;
procedure action_exit is begin active := false; end action_exit;

procedure render_screen_delete is begin put (ESCAPE & "[2J"); end render_screen_delete;
procedure render_screen_offset is begin put (ESCAPE & "[H"); end render_screen_offset;
procedure render_cursor_hide is begin put (ESCAPE & "[?25l"); end render_cursor_hide;
procedure render_cursor_show is begin put (ESCAPE & "[?25h"); end render_cursor_show;
procedure render_realignment is begin put (CARRIAGE_RETURN & LINE_FEED); end render_realignment;

procedure render_character (symbol : character := ' ';
colour : character := COLOUR_WHITE;
effect : character := EFFECT_NORMAL;
y : screen_height := 0;
x : screen_width := 0) is
begin
screen_symbol (y, x) := symbol;
screen_colour (y, x) := colour;
screen_effect (y, x) := effect;
end render_character;

procedure render_screen is
format : string (1 .. 12) := ESCAPE & "[E;3CmS" & ESCAPE & "[0m";
begin
render_screen_offset;
for y in screen_height
loop
for x in screen_width
loop
format (8) := screen_symbol (y, x);
format (6) := screen_colour (y, x);
format (3) := screen_effect (y, x);
put (format);
end loop;
render_realignment;
end loop;
end render_screen;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type entity_list is (
ENTITY_NULL, ENTITY_MENU, ENTITY_MAP, ENTITY_ITEM, ENTITY_MAGIC, ENTITY_AMMUNITION, ENTITY_WEAPON, ENTITY_ARMOUR,
ENTITY_SCROLL, ENTITY_POTION, ENTITY_CONSUMABLE, ENTITY_NOTE, ENTITY_PLANT, ENTITY_ANIMAL, ENTITY_GOBLIN, ENTITY_PLAYER
);

------------------------------------------------------------------------------------------

type entity_constant_type is tagged
record
entity : entity_list := ENTITY_NULL; -- Entity identifier.
name : string (1 .. 20) := "- "; -- Entity general name.
symbol : character := ' '; -- Entity ASCII character representation.
colour : character := COLOUR_WHITE; -- Entity VT100 escape sequence colour.
effect : character := EFFECT_NORMAL; -- Entity VT100 escape sequence effect.
end record;

type entity_variable_type is tagged
record
x : integer := 0; -- Global X coordinate.
y : integer := 0; -- Global Y coordinate.
end record;

type soul_type is
record
envy : natural := 0;
gluttony : natural := 0;
greed : natural := 0;
lust : natural := 0;
pride : natural := 0;
sloth : natural := 0;
wrath : natural := 0;
end record;

type mind_type is
record
fear : natural := 0;
pain : natural := 0;
thirst : natural := 0;
hunger : natural := 0;
exhaustion : natural := 0;
solitude : natural := 0;
faith : natural := 0;
end record;

type body_type is
record
head : natural := 0;
chest : natural := 0;
stomach : natural := 0;
left_arm : natural := 0;
right_arm : natural := 0;
left_leg : natural := 0;
right_leg : natural := 0;
end record;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type map_list is (
MAP_STONE_WALL, MAP_WOODEN_WALL, MAP_STONE_FLOOR, MAP_WOODEN_FLOOR, MAP_WATER_SHALLOW, MAP_WATER_DEEP, MAP_SWAMP_SHALLOW, MAP_SWAMP_DEEP
);

------------------------------------------------------------------------------------------

type map_mark is mod 72;
type map_width is mod 120;
type map_height is mod 40;

type map_constant_type is new entity_constant_type with
record
collide : boolean := false;
condition_limit : natural := 0;
end record;

type map_variable_type is new entity_variable_type with
record
entity : entity_list := ENTITY_NULL;
identifier : natural := 0;
end record;

type map_matrical_type is
record
map : map_list := MAP_STONE_FLOOR;
condition : natural := 0;
end record;

type map_constant_list is array (map_list) of map_constant_type;
type map_variable_list is array (map_mark) of map_variable_type;
type map_matrical_list is array (map_height, map_width) of map_matrical_type;

------------------------------------------------------------------------------------------

map_constant_data : constant map_constant_list := (
(ENTITY_MAP, "Stone Wall ", '#', COLOUR_GREY, EFFECT_BOLD, true, 59),
(ENTITY_MAP, "Wooden Wall ", '#', COLOUR_YELLOW, EFFECT_NORMAL, false, 23),
(ENTITY_MAP, "Stone Floor ", '.', COLOUR_GREY, EFFECT_BOLD, true, 47),
(ENTITY_MAP, "Wooden Floor ", '.', COLOUR_YELLOW, EFFECT_NORMAL, false, 11),
(ENTITY_MAP, "Water (shallow) ", '~', COLOUR_BLUE, EFFECT_NORMAL, false, 0),
(ENTITY_MAP, "Water (deep) ", '~', COLOUR_BLUE, EFFECT_BOLD, true, 0),
(ENTITY_MAP, "Swamp (shallow) ", '~', COLOUR_GREEN, EFFECT_NORMAL, false, 0),
(ENTITY_MAP, "Swamp (deep) ", '~', COLOUR_GREEN, EFFECT_BOLD, true, 0)
);

map_variable_data : map_variable_list;
map_matrical_data : map_matrical_list;

------------------------------------------------------------------------------------------

procedure generate_map is
begin
for y in map_height
loop
for x in map_width
loop
map_matrical_data (y, x) := (MAP_WOODEN_FLOOR, map_constant_data (MAP_WOODEN_FLOOR).condition_limit);
end loop;
end loop;
end generate_map;

procedure render_map is
symbol : character := ' ';
colour : character := COLOUR_WHITE;
effect : character := EFFECT_NORMAL;
begin
for y in screen_height
loop
for x in screen_width
loop
symbol := map_constant_data (map_matrical_data (map_height (y), map_width (x)).map).symbol;
colour := map_constant_data (map_matrical_data (map_height (y), map_width (x)).map).colour;
effect := map_constant_data (map_matrical_data (map_height (y), map_width (x)).map).effect;
render_character (symbol, colour, effect, y, x);
end loop;
end loop;
end render_map;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type item_list is (
WOOD, BARK, FLAX, PLANK, STICK, BRACES, NAILS, LINEN,
CHAMOMILE, MINT, WAX, SALT, SUGAR, PEPPER, CINNAMON, YEAST,
SKULL, BONE, INTESTINES, FUR, LEATHER, FAT, HORN, TUSK,
COPPER_ORE, IRON_ORE, SILVER_ORE, GOLD_ORE, COAL_ORE, TIN_ORE, ZINC_ORE, LEAD_ORE,
COPPER, IRON, SILVER, GOLD, COAL, TIN, ZINC, LEAD,
BRONZE, BRASS, STEEL, MERCURY, OIL, INK, VENOM, SILK,
PAPERS, PAPERWEIGHT
);

------------------------------------------------------------------------------------------

type item_mark is mod 72;

type item_constant_type is new entity_constant_type with
record
value : natural := 0;
weight : natural := 0;
end record;

type item_variable_type is new entity_variable_type with
record
owner : natural := 0;
end record;

type item_constant_list is array (item_list) of item_constant_type;
type item_variable_list is array (item_mark) of item_variable_type;

------------------------------------------------------------------------------------------

item_constant_data : constant item_constant_list := (
(ENTITY_ITEM, "Wood ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 2),
(ENTITY_ITEM, "Bark ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 2),
(ENTITY_ITEM, "Flax ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 1),
(ENTITY_ITEM, "Plank ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 2),
(ENTITY_ITEM, "Stick ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 2),
(ENTITY_ITEM, "Braces ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1),
(ENTITY_ITEM, "Nails ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1),
(ENTITY_ITEM, "Linen ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 1),
(ENTITY_ITEM, "Chamomile ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 1),
(ENTITY_ITEM, "Mint ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 1),
(ENTITY_ITEM, "Wax ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 7, 1),
(ENTITY_ITEM, "Salt ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 1),
(ENTITY_ITEM, "Sugar ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 17, 1),
(ENTITY_ITEM, "Pepper ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 1),
(ENTITY_ITEM, "Cinnamon ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 1),
(ENTITY_ITEM, "Yeast ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 1),
(ENTITY_ITEM, "Skull ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1),
(ENTITY_ITEM, "Bone ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1),
(ENTITY_ITEM, "Intestines ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1),
(ENTITY_ITEM, "Fur ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 7, 2),
(ENTITY_ITEM, "Leather ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 1),
(ENTITY_ITEM, "Fat ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1),
(ENTITY_ITEM, "Horn ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1),
(ENTITY_ITEM, "Tusk ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 3, 5),
(ENTITY_ITEM, "Copper Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 7),
(ENTITY_ITEM, "Iron Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 7, 11),
(ENTITY_ITEM, "Silver Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 17, 7),
(ENTITY_ITEM, "Gold Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 7),
(ENTITY_ITEM, "Coal Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 7),
(ENTITY_ITEM, "Tin Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 7),
(ENTITY_ITEM, "Zinc Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 7),
(ENTITY_ITEM, "Lead Ore ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 13),
(ENTITY_ITEM, "Copper ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 17, 5),
(ENTITY_ITEM, "Iron ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 19, 7),
(ENTITY_ITEM, "Silver ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 23, 5),
(ENTITY_ITEM, "Gold ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 29, 5),
(ENTITY_ITEM, "Coal ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 19, 5),
(ENTITY_ITEM, "Tin ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 5),
(ENTITY_ITEM, "Zinc ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 5),
(ENTITY_ITEM, "Lead ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 47, 7),
(ENTITY_ITEM, "Bronze ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 61, 5),
(ENTITY_ITEM, "Brass ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 67, 5),
(ENTITY_ITEM, "Steel ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 71, 7),
(ENTITY_ITEM, "Mercury ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 97, 11),
(ENTITY_ITEM, "Oil ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 5, 1),
(ENTITY_ITEM, "Ink ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 1),
(ENTITY_ITEM, "Venom ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 11, 1),
(ENTITY_ITEM, "Silk ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 13, 1),
(ENTITY_ITEM, "Papers ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 1, 1),
(ENTITY_ITEM, "Paperweight ", '+', COLOUR_YELLOW, EFFECT_NORMAL, 2, 1)
);

item_variable_data : item_variable_list;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type magic_list is (
IGNITE, ILLUMINATE, BLADECHARM, BATTLECRY
);

------------------------------------------------------------------------------------------

type magic_mark is mod 72;

type magic_constant_type is new entity_constant_type with
record
self : boolean := false;
health : integer := 0;
armour : integer := 0;
mana : integer := 0;
stamina : integer := 0;
distance : integer := 0;
tribute : natural := 0;
end record;

type magic_variable_type is new entity_variable_type with
record
enchantment : natural := 0;
end record;

type magic_constant_list is array (magic_list) of magic_constant_type;
type magic_variable_list is array (magic_mark) of magic_variable_type;

------------------------------------------------------------------------------------------

magic_constant_data : constant magic_constant_list := (
(ENTITY_MAGIC, "Ignite ", '*', COLOUR_YELLOW, EFFECT_ITALIC, false, -3, 0, 0, -1, 7, 1),
(ENTITY_MAGIC, "Illuminate ", '*', COLOUR_YELLOW, EFFECT_ITALIC, false, 0, 0, 0, -1, 13, 1),
(ENTITY_MAGIC, "Bladecharm ", '*', COLOUR_RED, EFFECT_ITALIC, true, 0, -3, 0, -1, 7, 3),
(ENTITY_MAGIC, "Battlecry ", '*', COLOUR_RED, EFFECT_ITALIC, true, -1, -1, 0, -1, 7, 2)
);

magic_variable_data : magic_variable_list;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type ammunition_list is (
ARROWS, BOLTS, SLINGSHOTS, JARIDS
);

------------------------------------------------------------------------------------------

type ammunition_mark is mod 72;

type ammunition_constant_type is new entity_constant_type with
record
value : natural := 0;
weight : natural := 0;
dual_wield : boolean := false;
amount_limit : natural := 0;
attack_range : natural := 0;
distance_range : natural := 0;
end record;

type ammunition_variable_type is new entity_variable_type with
record
amount : natural := 0;
enchantment : natural := 0;
end record;

type ammunition_constant_list is array (ammunition_list) of ammunition_constant_type;
type ammunition_variable_list is array (ammunition_mark) of ammunition_variable_type;

------------------------------------------------------------------------------------------

ammunition_constant_data : constant ammunition_constant_list := (
(ENTITY_AMMUNITION, "Arrows ", '^', COLOUR_RED, EFFECT_NORMAL, 11, 13, false, 23, 7, 67),
(ENTITY_AMMUNITION, "Bolts ", '^', COLOUR_RED, EFFECT_NORMAL, 13, 23, false, 29, 5, 67),
(ENTITY_AMMUNITION, "Slingshots ", '^', COLOUR_RED, EFFECT_NORMAL, 5, 7, true, 43, 7, 67),
(ENTITY_AMMUNITION, "Jarids ", '^', COLOUR_RED, EFFECT_NORMAL, 29, 37, true, 7, 7, 67)
);

ammunition_variable_data : ammunition_variable_list;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type weapon_list is (
IRON_SWORD, IRON_GREATSWORD, IRON_AXE, IRON_BATTLEAXE, IRON_SPEAR, IRON_SHIELD, IRON_MACE, IRON_HAMMER,
BRONZE_SWORD, BRONZE_GREATSWORD, BRONZE_AXE, BRONZE_BATTLEAXE, BRONZE_SPEAR, BRONZE_SHIELD, BRONZE_MACE, BRONZE_HAMMER,
BRASS_SWORD, BRASS_GREATSWORD, BRASS_AXE, BRASS_BATTLEAXE, BRASS_SPEAR, BRASS_SHIELD, BRASS_MACE, BRASS_HAMMER
);

------------------------------------------------------------------------------------------

type weapon_mark is mod 72;

type weapon_constant_type is new entity_constant_type with
record
dual_wield : boolean := false;
value : natural := 0;
weight : natural := 0;
attack_range : natural := 0;
defense_range : natural := 0;
distance_range : natural := 0;
end record;

type weapon_variable_type is new entity_variable_type with
record
enchantment : natural := 0;
condition : natural := 0;
end record;

type weapon_constant_list is array (weapon_list) of weapon_constant_type;
type weapon_variable_list is array (weapon_mark) of weapon_variable_type;

------------------------------------------------------------------------------------------

weapon_constant_data : constant weapon_constant_list := (
(ENTITY_WEAPON, "Iron Sword ", 'l', COLOUR_RED, EFFECT_NORMAL, true, 11, 31, 7, 2, 1),
(ENTITY_WEAPON, "Iron Greatsword ", 'L', COLOUR_RED, EFFECT_BOLD, false, 23, 67, 11, 3, 2),
(ENTITY_WEAPON, "Iron Axe ", 'r', COLOUR_RED, EFFECT_NORMAL, true, 13, 43, 7, 2, 1),
(ENTITY_WEAPON, "Iron Battleaxe ", 'T', COLOUR_RED, EFFECT_BOLD, false, 19, 73, 13, 2, 2),
(ENTITY_WEAPON, "Iron Spear ", 'I', COLOUR_RED, EFFECT_BOLD, false, 17, 53, 10, 4, 2),
(ENTITY_WEAPON, "Iron Shield ", 'o', COLOUR_RED, EFFECT_NORMAL, true, 13, 37, 3, 9, 1),
(ENTITY_WEAPON, "Iron Mace ", 'i', COLOUR_RED, EFFECT_NORMAL, true, 11, 41, 8, 2, 1),
(ENTITY_WEAPON, "Iron Hammer ", 't', COLOUR_RED, EFFECT_NORMAL, true, 13, 47, 7, 3, 1),
(ENTITY_WEAPON, "Bronze Sword ", 'l', COLOUR_RED, EFFECT_NORMAL, true, 11, 31, 7, 2, 1),
(ENTITY_WEAPON, "Bronze Greatsword ", 'L', COLOUR_RED, EFFECT_BOLD, false, 23, 67, 11, 3, 2),
(ENTITY_WEAPON, "Bronze Axe ", 'r', COLOUR_RED, EFFECT_NORMAL, true, 13, 43, 7, 2, 1),
(ENTITY_WEAPON, "Bronze Battleaxe ", 'T', COLOUR_RED, EFFECT_BOLD, false, 19, 73, 13, 2, 2),
(ENTITY_WEAPON, "Bronze Spear ", 'I', COLOUR_RED, EFFECT_BOLD, false, 17, 53, 10, 4, 2),
(ENTITY_WEAPON, "Bronze Shield ", 'o', COLOUR_RED, EFFECT_NORMAL, true, 13, 37, 3, 9, 1),
(ENTITY_WEAPON, "Bronze Mace ", 'i', COLOUR_RED, EFFECT_NORMAL, true, 11, 41, 8, 2, 1),
(ENTITY_WEAPON, "Bronze Hammer ", 't', COLOUR_RED, EFFECT_NORMAL, true, 13, 47, 7, 3, 1),
(ENTITY_WEAPON, "Brass Sword ", 'l', COLOUR_RED, EFFECT_NORMAL, true, 11, 31, 7, 2, 1),
(ENTITY_WEAPON, "Brass Greatsword ", 'L', COLOUR_RED, EFFECT_BOLD, false, 23, 67, 11, 3, 2),
(ENTITY_WEAPON, "Brass Axe ", 'r', COLOUR_RED, EFFECT_NORMAL, true, 13, 43, 7, 2, 1),
(ENTITY_WEAPON, "Brass Battleaxe ", 'T', COLOUR_RED, EFFECT_BOLD, false, 19, 73, 13, 2, 2),
(ENTITY_WEAPON, "Brass Spear ", 'I', COLOUR_RED, EFFECT_BOLD, false, 17, 53, 10, 4, 2),
(ENTITY_WEAPON, "Brass Shield ", 'o', COLOUR_RED, EFFECT_NORMAL, true, 13, 37, 3, 9, 1),
(ENTITY_WEAPON, "Brass Mace ", 'i', COLOUR_RED, EFFECT_NORMAL, true, 11, 41, 8, 2, 1),
(ENTITY_WEAPON, "Brass Hammer ", 't', COLOUR_RED, EFFECT_NORMAL, true, 13, 47, 7, 3, 1)
);

weapon_variable_data : weapon_variable_list;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type armour_list is (
IRON_HELMET, IRON_CHESTPLATE, IRON_GAUNTLETS, IRON_GREAVES, IRON_CUISSE, IRON_FAULD, IRON_GARDBRACE, IRON_REREBRACE
);

------------------------------------------------------------------------------------------

type armour_mark is mod 72;

type armour_constant_type is new entity_constant_type with
record
value : natural := 0;
weight : natural := 0;
defense_range : natural := 0;
end record;

type armour_variable_type is new entity_variable_type with
record
enchantment : natural := 0;
condition : natural := 0;
end record;

type armour_constant_list is array (armour_list) of armour_constant_type;
type armour_variable_list is array (armour_mark) of armour_variable_type;

------------------------------------------------------------------------------------------

armour_constant_data : constant armour_constant_list := (
(ENTITY_ARMOUR, "Iron Helmet ", 'm', COLOUR_YELLOW, EFFECT_NORMAL, 11, 31, 7),
(ENTITY_ARMOUR, "Iron Chestplate ", 'M', COLOUR_YELLOW, EFFECT_BOLD, 23, 67, 11),
(ENTITY_ARMOUR, "Iron Gauntlets ", 'i', COLOUR_YELLOW, EFFECT_NORMAL, 13, 43, 7),
(ENTITY_ARMOUR, "Iron Greaves ", 'I', COLOUR_YELLOW, EFFECT_NORMAL, 19, 73, 13),
(ENTITY_ARMOUR, "Iron Cuisse ", 'Y', COLOUR_YELLOW, EFFECT_BOLD, 17, 53, 10),
(ENTITY_ARMOUR, "Iron Fauld ", '-', COLOUR_YELLOW, EFFECT_NORMAL, 13, 37, 3),
(ENTITY_ARMOUR, "Iron Gardbrace ", 'v', COLOUR_YELLOW, EFFECT_NORMAL, 11, 41, 8),
(ENTITY_ARMOUR, "Iron Rerebrace ", 'V', COLOUR_YELLOW, EFFECT_NORMAL, 13, 47, 7)
);

armour_variable_data : armour_variable_list;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type plant_list is (
OAK_TREE, PINE_TREE, BIRCH_TREE, ACACIA_TREE, APPLE_TREE, PEACH_TREE, ORANGE_TREE, PEAR_TREE,
BUSH, THORNY_BUSH, TALL_GRASS, REED
);

------------------------------------------------------------------------------------------

type plant_mark is mod 72;

type plant_constant_type is new entity_constant_type with
record
health_limit : natural := 0;
end record;

type plant_variable_type is new entity_variable_type with
record
health : natural := 0;
end record;

type plant_constant_list is array (plant_list) of plant_constant_type;
type plant_variable_list is array (plant_mark) of plant_variable_type;

------------------------------------------------------------------------------------------

plant_constant_data : constant plant_constant_list := (
(ENTITY_PLANT, "Oak Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 11),
(ENTITY_PLANT, "Pine Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 23),
(ENTITY_PLANT, "Birch Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 13),
(ENTITY_PLANT, "Acacia Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 19),
(ENTITY_PLANT, "Apple Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 17),
(ENTITY_PLANT, "Peach Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 13),
(ENTITY_PLANT, "Orange Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 11),
(ENTITY_PLANT, "Pear Tree ", 'T', COLOUR_GREEN, EFFECT_BOLD, 13),
(ENTITY_PLANT, "Bush ", '&', COLOUR_GREEN, EFFECT_NORMAL, 5),
(ENTITY_PLANT, "Thorny Bush ", '&', COLOUR_GREEN, EFFECT_NORMAL, 7),
(ENTITY_PLANT, "Tall Grass ", '%', COLOUR_GREEN, EFFECT_NORMAL, 3),
(ENTITY_PLANT, "Reed ", '%', COLOUR_GREEN, EFFECT_NORMAL, 3)
);

plant_variable_data : plant_variable_list;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type animal_list is (
ANIMAL_PIG, ANIMAL_COW, ANIMAL_CHICKEN, ANIMAL_SHEEP, ANIMAL_BOAR, ANIMAL_GOAT, ANIMAL_AUROCH, ANIMAL_DUCK,
ANIMAL_DOG, ANIMAL_CAT, ANIMAL_RABBIT, ANIMAL_HAMSTER, ANIMAL_HORSE, ANIMAL_DONKEY, ANIMAL_CAMEL, ANIMAL_ELEPHANT,
ANIMAL_OWL, ANIMAL_HAWK, ANIMAL_PIGEON, ANIMAL_VULTURE, ANIMAL_CROW, ANIMAL_PHEASANT, ANIMAL_SPARROW, ANIMAL_ALBATROSS,
ANIMAL_SARDINE, ANIMAL_HERRING, ANIMAL_CATFISH, ANIMAL_CARP, ANIMAL_WHALE, ANIMAL_SHARK, ANIMAL_SQUID, ANIMAL_SAWFISH,
ANIMAL_WORM, ANIMAL_BEE, ANIMAL_CENTIPEDE, ANIMAL_SPIDER, ANIMAL_FROG, ANIMAL_RAT, ANIMAL_BAT, ANIMAL_MOLE,
ANIMAL_WOLF, ANIMAL_FOX, ANIMAL_BEAR, ANIMAL_MAMMOTH, ANIMAL_ELK, ANIMAL_MOOSE, ANIMAL_DEER, ANIMAL_PEEBLES,
ANIMAL_LION, ANIMAL_HYENA, ANIMAL_BISON, ANIMAL_ZEBRA, ANIMAL_GIRAFFE, ANIMAL_CROCODILE, ANIMAL_MONKEY, ANIMAL_GNU,
ANIMAL_CARIBOU, ANIMAL_SEAL, ANIMAL_MORSE, ANIMAL_PENGUIN, ANIMAL_TURTLE, ANIMAL_CAYMAN, ANIMAL_OTTER, ANIMAL_SNAKE,
ANIMAL_LIZARD, ANIMAL_DAEODON, ANIMAL_SLIME, ANIMAL_AXOLOTL, ANIMAL_HEDGEHOG, ANIMAL_CATERPILLAR, ANIMAL_CRAB, ANIMAL_SCORPION,
ANIMAL_GIANT_LIZARD, ANIMAL_GIANT_CENTIPEDE, ANIMAL_GIANT_SPIDER, ANIMAL_GIANT_SLOTH,
ANIMAL_GIANT_OWL, ANIMAL_GIANT_SCORPION, ANIMAL_GIANT_AXOLOTL, ANIMAL_GIANT_WORM
);

------------------------------------------------------------------------------------------

type animal_mark is mod 72;

type animal_constant_type is new entity_constant_type with
record
health_limit : natural := 0;
attack_range : natural := 0;
defense_range : natural := 0;
end record;

type animal_variable_type is new entity_variable_type with
record
health : natural := 0;
end record;

type animal_constant_list is array (animal_list) of animal_constant_type;
type animal_variable_list is array (animal_mark) of animal_variable_type;

------------------------------------------------------------------------------------------

animal_constant_data : constant animal_constant_list := (
(ENTITY_ANIMAL, "Pig ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Cow ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Chicken ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Sheep ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Boar ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Goat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Auroch ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Duck ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Dog ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Cat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Rabbit ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Hamster ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Horse ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Donkey ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Camel ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Elephant ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Owl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Hawk ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Pigeon ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Vulture ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Crow ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Pheasant ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Sparrow ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Albatross ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Sardine ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Herring ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Catfish ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Carp ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Whale ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Shark ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Squid ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Sawfish ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Worm ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Bee ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Centipede ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Spider ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Frog ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Rat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Bat ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Mole ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Wolf ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Fox ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Bear ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Mammoth ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Elk ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Moose ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Deer ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Peebles ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Lion ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Hyena ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Bison ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Zebra ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giraffe ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Crocodile ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Monkey ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Gnu ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Caribou ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Seal ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Morse ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Penguin ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Turtle ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Cayman ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Otter ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Snake ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Lizard ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Daeodon ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Slime ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Axolotl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Hedgehog ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Caterpillar ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Crab ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Scorpion ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Lizard ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Centipede ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Spider ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Sloth ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Owl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Scorpion ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Axolotl ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11),
(ENTITY_ANIMAL, "Giant Worm ", 'a', COLOUR_GREEN, EFFECT_NORMAL, 11, 11, 11)
);

animal_variable_data : animal_variable_list;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type goblin_list is (
GOBLIN_SLAVE, GOBLIN_WORKER, GOBLIN_WARRIOR, GOBLIN_BOAR_RIDER, GOBLIN_SHAMAN, GOBLIN_CHIEF, GOBLIN_KING, GOBLIN_OGRE
);

------------------------------------------------------------------------------------------

type goblin_constant_type is new entity_constant_type with
record
health_limit : natural := 0;
armour_limit : natural := 0;
mana_limit : natural := 0;
stamina_limit : natural := 0;
attack_range : natural := 0;
end record;

type goblin_variable_type is new entity_variable_type with
record
health : natural := 0;
armour : natural := 0;
mana : natural := 0;
stamina : natural := 0;
end record;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

type trait_list is (
TRAIT_STRENGTH, TRAIT_PERCEPTION, TRAIT_EDURANCE, TRAIT_CHARISMA, TRAIT_INTELLIGENCE, TRAIT_AGILITY, TRAIT_LUCK, TRAIT_AUTISM
);

type skill_list is (
-- Combat skills.
SKILL_BLADES, SKILL_AXES, SKILL_MACES, SKILL_POLEARMS, SKILL_SHIELDS, SKILL_BOWS, SKILL_CROSSBOWS, SKILL_HANDS,
SKILL_ONEHANDED, SKILL_TWOHANDED, SKILL_PRECISION, SKILL_THRUST, SKILL_ATHLETICS, SKILL_EQUITATION, SKILL_TACTICS, SKILL_SKIRMISH,
-- Magic skills.
SKILL_FIRE_MAGIC, SKILL_WATER_MAGIC, SKILL_EARTH_MAGIC, SKILL_WIND_MAGIC, SKILL_NATURE_MAGIC, SKILL_VENOM_MAGIC, SKILL_SHADOW_MAGIC, SKILL_BONE_MAGIC,
SKILL_RUNE_MAGIC, SKILL_PUPPET_MAGIC, SKILL_SUMMON_MAGIC, SKILL_INSECT_MAGIC, SKILL_RITUAL_MAGIC, SKILL_ROT_MAGIC, SKILL_TABBOO_MAGIC, SKILL_ABYSS_MAGIC,
-- Trait skills.
SKILL_WISDOM, SKILL_PATIENCE, SKILL_RELIGION, SKILL_SPEECH, SKILL_REFLECTION, SKILL_REFRACTION, SKILL_AUTHORITY, SKILL_DECEPTION,
SKILL_LIFE_FORCE, SKILL_MANA_FORCE, SKILL_REGENERATION, SKILL_RESTORATION, SKILL_SPELLCRAFT, SKILL_PROTECTION, SKILL_SYNTHESIS, SKILL_EVOCATION,
-- Knowledge skills.
SKILL_MEDICINE, SKILL_MERCANTILE, SKILL_EDUCATION, SKILL_NAVIGATION, SKILL_CONJURATION, SKILL_ALTERATION, SKILL_ENCHANEMENT, SKILL_TELEPORTATION,
SKILL_ASTRONOMY, SKILL_OCCULTISM, SKILL_MYSTICISM, SKILL_SURVIVAL, SKILL_EVASION, SKILL_STEALTH, SKILL_DETECTION, SKILL_IDENTIFICATION,
-- Work skills.
SKILL_BLACKSMITH, SKILL_WHITESMITH, SKILL_LIGHT_CRAFT, SKILL_HEAVY_CRAFT, SKILL_LIGHT_WORKS, SKILL_HEAVY_WORKS, SKILL_LEATHER, SKILL_CONSTRUCTION,
SKILL_WEAPONS, SKILL_ARMOURS, SKILL_ENGINEER, SKILL_ALCHEMY, SKILL_RITUAL, SKILL_EXPERIENCE, SKILL_NECROMANCY, SKILL_REINCARNATION
);

type title_list is (
TITLE_HERO, TITLE_DEMON_LORD, TITLE_DRAGON_SLAYER,TITLE_GOBLIN_SLAYER
);

type player_data is
record
x : map_width := 0;
y : map_height := 0;
health : natural := 0;
armour : natural := 0;
mana : natural := 0;
stamina : natural := 0;
end record;

------------------------------------------------------------------------------------------

trait_info : constant array (trait_list) of description := (
" ",
" ",
" ",
" ",
" ",
" ",
" ",
" "
);

skill_info : constant array (skill_list) of description := (
"Blades: Master the art of wielding sharp-edged weapons like swords and daggers to deliver swift and precise strikes. ",
"Axes: Become adept at swinging heavy battle axes and hatchets, crushing your enemies with sheer brute force. ",
"Maces: Hone your skill with blunt weapons like maces and hammers, shattering bones and armor with powerful blows. ",
"Polearms: Command long-reaching weapons like spears and halberds, keeping your foes at bay with deadly thrusts and sweeps. ",
"Shields: Learn to effectively block and parry incoming attacks using different types of shields, ensuring your defense remains intact. ",
"Bows: Master the art of archery, using bows to launch arrows with deadly accuracy from a distance. ",
"Crossbows: Handle crossbows, powerful ranged weapons that can deliver devastating bolts to penetrate even the toughest armor. ",
"Hands: Refine your unarmed combat skills, unleashing a flurry of punches, kicks, and grapples to overpower your opponents. ",
"One-handed: Develop proficiency in wielding one-handed weapons, granting you versatility in combat with a free hand for defense or utility. ",
"Two-handed: Embrace the raw power of massive two-handed weapons like greatswords and battle axes, obliterating foes with mighty strikes. ",
"Precision: Cultivate your precision, increasing your chances of landing critical hits and striking vital points for maximum damage. ",
"Thrust: Focus on the art of thrusting attacks, gaining the ability to pierce armor and penetrate deep into your adversaries' defenses. ",
"Athletics: Strengthen your physical prowess, enhancing your speed, stamina, and agility for swift maneuvers and resilience in combat. ",
"Equitation: Master the art of horse riding, enabling you to swiftly navigate the battlefield and engage enemies from mounted advantage. ",
"Tactics: Develop strategic thinking and decision-making skills, enabling you to plan your actions and exploit your enemies' weaknesses. ",
"Skirmish: Become adept in hit-and-run tactics, excelling in quick engagements where mobility, agility, and surprise are key to victory. ",
"Fire Magic: Harness the power of flames, incinerating foes and wreaking havoc with infernal spells, but beware not to harm yourself. ",
"Water Magic: Manipulate the currents of water and create it from the void, casting torrents and freezing enemies with chilling precision. ",
"Earth Magic: Command the strength of the earth, crushing adversaries with seismic shocks and sturdy defenses. ",
"Wind Magic: Control the swift breeze, unleashing gusts and tearing through enemies with razor-sharp projectiles or increase your speed. ",
"Nature Magic: Channel the essence of the natural world, nurturing allies and summoning creatures of the wilderness. ",
"Venom Magic: Inflict deadly toxins and poisons, weakening enemies and watching them succumb to vile venom, or weaken them and run away. ",
"Shadow Magic: Embrace the darkness, concealing yourself in the shadows and draining life energy with sinister shadow spells. ",
"Bone Magic: Manipulate the skeletal remnants of the deceased, raising undead minions and casting bone-shattering spells or healing ones. ",
"Rune Magic: Inscribe and activate ancient runes, unleashing elemental forces and unraveling unseen and destructive ancient magical barriers. ",
"Puppet Magic: Seize control of minds, bending the will of your enemies and forcing them to do your bidding or create a puppet to do it. ",
"Summon Magic: Conjure ethereal allies and mythical creatures, bolstering your forces and overwhelming your foes. ",
"Insect Magic: Command swarms of insects, inflicting agonizing stings and unleashing plague-like devastation, making allies of former foes. ",
"Ritual Magic: Perform intricate and powerful sacrificial rituals to exchange life force for items, magic, scrolls, gold or power. ",
"Rot Magic: Embrace decay and putrefaction, corroding the flesh of your enemies and spreading pestilence and plague. ",
"Taboo Magic: Seek forbidden arts, delving into dark rituals and wielding forbidden spells with dire consequences, but be very careful. ",
"Abyss Magic: Harness the eldritch forces from the depths of the abyss, unraveling reality and engulfing enemies in chaos. ",
"Wisdom: Acquire profound knowledge and insight to navigate challenges wisely. ",
"Patience: Endure and persevere through trials with calmness and resilience. ",
"Religion: Channel divine power through faith and devotion to overcome obstacles. ",
"Speech: Persuasively communicate thoughts and ideas, influencing others effectively. ",
"Reflection: Engage in self-analysis, learning from experiences for personal growth. ",
"Refraction: Bend and manipulate the flow of energy to alter its course. ",
"Authority: Command respect, possess leadership skills, and wield influence. ",
"Deception: Master the art of trickery and illusion to deceive opponents cunningly. ",
"Life Force: Harness the essence of vitality to sustain and strengthen oneself. ",
"Mana Force: Manipulate and control magical energy for various purposes. ",
"Regeneration: Restore health and vitality gradually and naturally over time. ",
"Restoration: Mend and heal wounds, restoring physical and spiritual well-being. ",
"Spellcraft: Master the intricate art of casting spells with precision and expertise. ",
"Protection: Shield oneself and allies, providing defense against harm and danger. ",
"Synthesis: Combine elements harmoniously, creating powerful and synergistic effects. ",
"Evocation: Summon and command mystical forces, unleashing their power and potential. ",
"Medicine: Heal wounds and cure ailments, preserving health and vitality. ",
"Mercantile: Master the art of trade and negotiation, obtaining valuable resources and goods. ",
"Education: Expand knowledge and gain expertise in various subjects, unlocking new possibilities. ",
"Navigation: Navigate through treacherous terrains, uncovering hidden paths and shortcuts. ",
"Conjuration: Summon and command ethereal beings and objects to aid in battle and exploration. ",
"Alteration: Manipulate and reshape the physical world, bending it to your will. ",
"Enchantment: Infuse objects with magical properties, enhancing their abilities and powers. ",
"Teleportation: Instantly transport yourself across distances, bypassing obstacles and traps. ",
"Astronomy: Study celestial bodies and their movements, unlocking celestial insights and abilities. ",
"Occultism: Harness forbidden knowledge and practices, tapping into dark and mysterious forces. ",
"Mysticism: Connect with spiritual realms, accessing mystical powers and ancient wisdom. ",
"Survival: Thrive in harsh environments, utilizing nature's resources and adapting to challenges. ",
"Evasion: Evade and dodge attacks with exceptional reflexes and agility. ",
"Stealth: Move silently and remain undetected, infiltrating enemy territories with stealth and precision. ",
"Detection: Uncover hidden secrets and traps, perceive hidden objects and enemies. ",
"Identification: Identify and analyze unknown items and artifacts, revealing their true nature and potential. ",
"Blacksmith: Master the art of forging and shaping metals, crafting powerful weapons and armor. ",
"Whitesmith: Refine and enhance crafted items, imbuing them with special properties and bonuses. ",
"Light Craft: Create delicate and intricate objects, such as jewelry and trinkets, with finesse and precision. ",
"Heavy Craft: Construct robust and durable structures, fortifying defenses and creating formidable tools. ",
"Light Works: Skillfully manipulate light and optics, creating illusions and harnessing blinding brilliance. ",
"Heavy Works: Command elemental forces and harness their raw power, shaping them for destruction or creation. ",
"Leather: Tame and work with animal hides, fashioning resilient armor and accessories. ",
"Construction: Design and erect structures, fortresses, and defenses in an efficient and strategic manner. ",
"Weapons: Wield a wide array of lethal weapons, mastering various combat styles and techniques. ",
"Armours: Forge resilient armor and protective gear, shielding against incoming threats and attacks. ",
"Engineer: Innovate and create mechanical wonders, building intricate contraptions and mechanisms. ",
"Alchemy: Transmute and brew potent elixirs and potions, unlocking the power of transformative substances. ",
"Ritual: Perform ancient rituals, invoking otherworldly energies to manipulate reality itself. ",
"Experience: Draw upon accumulated knowledge and insights, gaining wisdom and enhancing abilities. ",
"Necromancy: Command the forces of death and undeath, bending the deceased to your will. ",
"Reincarnation: Manipulate the cycle of life and death, granting second chances and renewed existence. "
);

title_info : constant array (title_list) of description := (
" ",
" ",
" ",
" "
);

player : player_data;

------------------------------------------------------------------------------------------

procedure render_player is
begin
render_character ('@', COLOUR_CYAN, EFFECT_BOLD, screen_height (player.y), screen_width (player.x));
end render_player;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

procedure action_move_up is begin player.y := player.y - 1; end action_move_up;
procedure action_move_down is begin player.y := player.y + 1; end action_move_down;
procedure action_move_left is begin player.x := player.x - 1; end action_move_left;
procedure action_move_right is begin player.x := player.x + 1; end action_move_right;

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

begin

------------------------------------------------------------------------------------------

bind ('q', action_exit'access);
bind ('w', action_move_up'access);
bind ('s', action_move_down'access);
bind ('a', action_move_left'access);
bind ('d', action_move_right'access);

render_screen_delete;
render_screen_offset;
render_cursor_hide;

generate_map;

------------------------------------------------------------------------------------------

loop
signal := CANCEL;
render_map;
render_player;
render_screen;
get_immediate (signal);
action_list (character'pos (signal)).all;
exit when active = false;
end loop;

------------------------------------------------------------------------------------------

render_cursor_show;

return 0;

end xabina;

Loading…
Cancel
Save