Refactoring...
This commit is contained in:
parent
a6f73e4ee7
commit
6490314fd7
62
xabina.adb
62
xabina.adb
@ -20,7 +20,7 @@ function xabina return integer is
|
|||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- System
|
-- System
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
type subrange is
|
type subrange is
|
||||||
record
|
record
|
||||||
@ -37,34 +37,14 @@ function xabina return integer is
|
|||||||
EFFECT_NORMAL, EFFECT_BOLD, EFFECT_ITALIC, EFFECT_UNDERLINE, EFFECT_BLINK, EFFECT_REVERSE
|
EFFECT_NORMAL, EFFECT_BOLD, EFFECT_ITALIC, EFFECT_UNDERLINE, EFFECT_BLINK, EFFECT_REVERSE
|
||||||
);
|
);
|
||||||
|
|
||||||
type entity_id is (
|
|
||||||
ENTITY_NONE, ENTITY_MENU, ENTITY_MAP, ENTITY_ITEM, ENTITY_PLANT, ENTITY_ANIMAL, ENTITY_GOBLIN, ENTITY_PLAYER
|
|
||||||
);
|
|
||||||
|
|
||||||
type map_id is (
|
|
||||||
MAP_NONE, MAP_VOID, MAP_WALL, MAP_FLOOR, MAP_HOLE, MAP_STAIRS_DOWN, MAP_STAIRS_UP, MAP_DOOR
|
|
||||||
);
|
|
||||||
|
|
||||||
type item_id is (
|
|
||||||
ITEM_NONE, ITEM_AMMUNITION, ITEM_WEAPON, ITEM_ARMOUR, ITEM_SCROLL, ITEM_POTION, ITEM_CONSUMABLE, ITEM_NOTE
|
|
||||||
);
|
|
||||||
|
|
||||||
type plant_id is (
|
|
||||||
PLANT_NONE, PLANT_GRASS, PLANT_REED, PLANT_BUSH, PLANT_APPLE_TREE, PLANT_LEMON_TREE, PLANT_OAK_TREE, PLANT_PINE_TREE
|
|
||||||
);
|
|
||||||
|
|
||||||
type animal_id is (
|
|
||||||
ANIMAL_NONE, ANIMAL_RAT, ANIMAL_BAT, ANIMAL_SPIDER, ANIMAL_LIZARD, ANIMAL_SNAIL, ANIMAL_WORM, ANIMAL_MOLE
|
|
||||||
);
|
|
||||||
|
|
||||||
type goblin_id is (
|
|
||||||
GOBLIN_NONE, GOBLIN_WORKER, GOBLIN_WARRIOR, GOBLIN_BOAR_RIDER, GOBLIN_SHAMAN, GOBLIN_CHIEF, GOBLIN_KING, GOBLIN_OGRE
|
|
||||||
);
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- Entity
|
-- Entity
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
type entity_id is (
|
||||||
|
ENTITY_NONE, ENTITY_MENU, ENTITY_MAP, ENTITY_ITEM, ENTITY_PLANT, ENTITY_ANIMAL, ENTITY_GOBLIN, ENTITY_PLAYER
|
||||||
|
);
|
||||||
|
|
||||||
type entity_constant_type is tagged
|
type entity_constant_type is tagged
|
||||||
record
|
record
|
||||||
entity : entity_id := ENTITY_NONE; -- Entity identifier.
|
entity : entity_id := ENTITY_NONE; -- Entity identifier.
|
||||||
@ -86,6 +66,10 @@ function xabina return integer is
|
|||||||
-- -- Map data is only constant, not variable, since X and Y coordinates are determined by player, camera or global position.
|
-- -- Map data is only constant, not variable, since X and Y coordinates are determined by player, camera or global position.
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
type map_id is (
|
||||||
|
MAP_NONE, MAP_VOID, MAP_WALL, MAP_FLOOR, MAP_HOLE, MAP_STAIRS_DOWN, MAP_STAIRS_UP, MAP_DOOR
|
||||||
|
);
|
||||||
|
|
||||||
type map_list_id is (
|
type map_list_id is (
|
||||||
STONE_WALL, WOODEN_WALL, STONE_FLOOR, WOODEN_FLOOR
|
STONE_WALL, WOODEN_WALL, STONE_FLOOR, WOODEN_FLOOR
|
||||||
);
|
);
|
||||||
@ -106,9 +90,37 @@ function xabina return integer is
|
|||||||
);
|
);
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
-- Item
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
type item_id is (
|
||||||
|
ITEM_NONE, ITEM_AMMUNITION, ITEM_WEAPON, ITEM_ARMOUR, ITEM_SCROLL, ITEM_POTION, ITEM_CONSUMABLE, ITEM_NOTE
|
||||||
|
);
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
-- Plant
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
type plant_id is (
|
||||||
|
PLANT_NONE, PLANT_GRASS, PLANT_REED, PLANT_BUSH, PLANT_APPLE_TREE, PLANT_LEMON_TREE, PLANT_OAK_TREE, PLANT_PINE_TREE
|
||||||
|
);
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
-- Animal
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
type animal_id is (
|
||||||
|
ANIMAL_NONE, ANIMAL_RAT, ANIMAL_BAT, ANIMAL_SPIDER, ANIMAL_LIZARD, ANIMAL_SNAIL, ANIMAL_WORM, ANIMAL_MOLE
|
||||||
|
);
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- Goblin
|
-- Goblin
|
||||||
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
type goblin_id is (
|
||||||
|
GOBLIN_NONE, 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
|
type goblin_constant_type is new entity_constant_type with
|
||||||
record
|
record
|
||||||
attack_range : subrange := (0, 0, 0);
|
attack_range : subrange := (0, 0, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user