Mercurial > molko
diff librpg/rpg/character.h @ 235:fb304a94a05c
rpg: prepare equipment
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 26 Nov 2020 18:00:45 +0100 |
parents | 86b71e1f9dd5 |
children |
line wrap: on
line diff
--- a/librpg/rpg/character.h Thu Nov 26 13:33:31 2020 +0100 +++ b/librpg/rpg/character.h Thu Nov 26 18:00:45 2020 +0100 @@ -45,14 +45,38 @@ /** * \brief Sprites per action. + * + * This enumeration should be synced with \ref equipment_type. */ enum character_sprite { - CHARACTER_SPRITE_WALK, /*!< Sprite for walking. */ + CHARACTER_SPRITE_AXE, /*!< Attacking with axe. */ + CHARACTER_SPRITE_BOW, /*!< Attacking with bow. */ + CHARACTER_SPRITE_CROSSBOW, /*!< Attacking with crossbow. */ + CHARACTER_SPRITE_DAGGER, /*!< Attacking with dagger. */ + CHARACTER_SPRITE_HAMMER, /*!< Attacking with hammer. */ + CHARACTER_SPRITE_NORMAL, /*!< Sprite for walking. */ + CHARACTER_SPRITE_SPIKE, /*!< Attacking with spike. */ CHARACTER_SPRITE_SWORD, /*!< Attacking with sword. */ + CHARACTER_SPRITE_WAND, /*!< Attacking with wand. */ CHARACTER_SPRITE_NUM /*!< Total number of sprites. */ }; /** + * \brief Equipment per character. + * + * This enumeration should be synced with \ref equipment_type. + */ +enum character_equipment { + CHARACTER_EQUIPMENT_GLOVES, /*!< Gloves equiped. */ + CHARACTER_EQUIPMENT_HELMET, /*!< Helmet equiped. */ + CHARACTER_EQUIPMENT_SHIELD, /*!< Shield equiped. */ + CHARACTER_EQUIPMENT_TOP, /*!< Top equiped. */ + CHARACTER_EQUIPMENT_TROUSERS, /*!< Trousers equiped. */ + CHARACTER_EQUIPMENT_WEAPON, /*!< Weapon equiped. */ + CHARACTER_EQUIPMENT_NUM /*!< Total number of equipments equiped. */ +}; + +/** * \brief Character object * * This structure owns the current character statistics used in battle. @@ -83,6 +107,11 @@ struct sprite *sprites[CHARACTER_SPRITE_NUM]; /** + * (+&) Equipments for this character. + */ + const struct equipment *equipments[CHARACTER_EQUIPMENT_NUM]; + + /** * (+&?) List of spells for this character. */ const struct spell *spells[CHARACTER_SPELL_MAX];