diff --git a/src/Engine/Objects/CMakeLists.txt b/src/Engine/Objects/CMakeLists.txt index 5a0c2d48ce40..2d9a7c18313a 100644 --- a/src/Engine/Objects/CMakeLists.txt +++ b/src/Engine/Objects/CMakeLists.txt @@ -22,6 +22,7 @@ set(ENGINE_OBJECTS_HEADERS ItemEnums.h Items.h Monsters.h + MonsterEnums.h NPC.h NPCEnums.h ObjectList.h diff --git a/src/Engine/Objects/Character.h b/src/Engine/Objects/Character.h index aa6da2ed751b..28a51e235cf9 100644 --- a/src/Engine/Objects/Character.h +++ b/src/Engine/Objects/Character.h @@ -11,7 +11,7 @@ #include "Engine/Objects/Items.h" #include "Engine/Objects/ItemEnums.h" #include "Engine/Objects/CharacterEnums.h" -#include "Engine/Objects/Monsters.h" // TODO(captainurist): MonsterEnums.h +#include "Engine/Objects/MonsterEnums.h" #include "Engine/Spells/SpellEnums.h" #include "Engine/Spells/SpellBuff.h" #include "Engine/Tables/BuildingTable.h" diff --git a/src/Engine/Objects/Items.cpp b/src/Engine/Objects/Items.cpp index 33f2393829c8..3da044efcd36 100644 --- a/src/Engine/Objects/Items.cpp +++ b/src/Engine/Objects/Items.cpp @@ -8,7 +8,6 @@ #include "Engine/Engine.h" #include "Engine/Localization.h" #include "Engine/Objects/ItemEnchantment.h" -#include "Engine/Objects/Monsters.h" #include "Engine/Objects/CharacterEnums.h" #include "Engine/Tables/ItemTable.h" #include "Engine/OurMath.h" diff --git a/src/Engine/Objects/MonsterEnums.h b/src/Engine/Objects/MonsterEnums.h new file mode 100644 index 000000000000..1f9a8a70338b --- /dev/null +++ b/src/Engine/Objects/MonsterEnums.h @@ -0,0 +1,129 @@ +#pragma once + +#include + +#include "Utility/Segment.h" + +// TODO(captainurist): Rename to MonsterId? +// TODO(captainurist): codegen enum values. +enum class MONSTER_TYPE { + MONSTER_0 = 0, // TODO(captainurist): MONSTER_INVALID? + MONSTER_1 = 1, + MONSTER_DEVIL_1 = 22, + MONSTER_DEVIL_2 = 23, + MONSTER_DEVIL_3 = 24, + MONSTER_DRAGON_1 = 25, + MONSTER_DRAGON_2 = 26, + MONSTER_DRAGON_3 = 27, + MONSTER_45 = 45, + MONSTER_ELEMENTAL_WATER_1 = 46, + MONSTER_ELEMENTAL_WATER_3 = 48, + MONSTER_ELF_ARCHER_1 = 49, + MONSTER_ELF_ARCHER_3 = 51, + MONSTER_ELF_SPEARMAN_1 = 52, + MONSTER_ELF_SPEARMAN_3 = 54, + MONSTER_GHOST_1 = 70, + MONSTER_GHOST_3 = 72, + MONSTER_HARPY_1 = 85, + MONSTER_HARPY_2 = 86, + MONSTER_HARPY_3 = 87, + MONSTER_LICH_1 = 91, + MONSTER_LICH_3 = 93, + MONSTER_OOZE_1 = 112, + MONSTER_OOZE_2 = 113, + MONSTER_OOZE_3 = 114, + MONSTER_115 = 115, + MONSTER_PEASANT_ELF_FEMALE_1_1 = 133, + MONSTER_PEASANT_ELF_MALE_3_3 = 150, + MONSTER_186 = 186, + MONSTER_SKELETON_1 = 199, + MONSTER_SKELETON_3 = 201, + MONSTER_TITAN_1 = 211, + MONSTER_TITAN_3 = 213, + MONSTER_VAMPIRE_1 = 217, + MONSTER_VAMPIRE_3 = 219, + MONSTER_WIGHT_1 = 223, + MONSTER_WIGHT_3 = 225, + MONSTER_ZOMBIE_1 = 229, + MONSTER_ZOMBIE_3 = 231, + MONSTER_232 = 232, + MONSTER_PEASANT_GOBLIN_MALE_3_3 = 249, + MONSTER_TROLL_1 = 250, + MONSTER_TROLL_2 = 251, + MONSTER_TROLL_3 = 252, + MONSTER_TREANT_1 = 253, + MONSTER_TREANT_3 = 255, + MONSTER_GHOUL_1 = 256, + MONSTER_GHOUL_3 = 258, + + MONSTER_FIRST = MONSTER_1, + MONSTER_LAST = 277, + + MONSTER_FIRST_ARENA = MONSTER_1, + MONSTER_LAST_ARENA = MONSTER_GHOUL_3 +}; +using enum MONSTER_TYPE; + +inline Segment allArenaMonsters() { + return {MONSTER_FIRST_ARENA, MONSTER_LAST_ARENA}; +} + +/* 335 */ +enum class MONSTER_SPECIAL_ABILITY_TYPE { + MONSTER_SPECIAL_ABILITY_NONE = 0x0, + MONSTER_SPECIAL_ABILITY_SHOT = 0x1, + MONSTER_SPECIAL_ABILITY_SUMMON = 0x2, + MONSTER_SPECIAL_ABILITY_EXPLODE = 0x3, +}; +using enum MONSTER_SPECIAL_ABILITY_TYPE; + +enum class MONSTER_MOVEMENT_TYPE { + MONSTER_MOVEMENT_TYPE_SHORT = 0x0, + MONSTER_MOVEMENT_TYPE_MEDIUM = 0x1, + MONSTER_MOVEMENT_TYPE_LONG = 0x2, + MONSTER_MOVEMENT_TYPE_GLOBAL = 0x3, + MONSTER_MOVEMENT_TYPE_FREE = 0x4, + MONSTER_MOVEMENT_TYPE_STATIONARY = 0x5, +}; +using enum MONSTER_MOVEMENT_TYPE; + +/* 336 */ +enum class MONSTER_SUPERTYPE { + MONSTER_SUPERTYPE_UNDEAD = 0x1, + MONSTER_SUPERTYPE_KREEGAN = 0x2, + MONSTER_SUPERTYPE_DRAGON = 0x3, + MONSTER_SUPERTYPE_ELF = 0x4, + MONSTER_SUPERTYPE_WATER_ELEMENTAL = 0x5, + MONSTER_SUPERTYPE_TREANT = 0x6, + MONSTER_SUPERTYPE_TITAN = 0x7, + MONSTER_SUPERTYPE_8 = 0x8, +}; +using enum MONSTER_SUPERTYPE; + +enum class SPECIAL_ATTACK_TYPE : uint8_t { + SPECIAL_ATTACK_NONE = 0, + SPECIAL_ATTACK_CURSE = 1, + SPECIAL_ATTACK_WEAK = 2, + SPECIAL_ATTACK_SLEEP = 3, + SPECIAL_ATTACK_DRUNK = 4, + SPECIAL_ATTACK_INSANE = 5, + SPECIAL_ATTACK_POISON_WEAK = 6, + SPECIAL_ATTACK_POISON_MEDIUM = 7, + SPECIAL_ATTACK_POISON_SEVERE = 8, + SPECIAL_ATTACK_DISEASE_WEAK = 9, + SPECIAL_ATTACK_DISEASE_MEDIUM = 10, + SPECIAL_ATTACK_DISEASE_SEVERE = 11, + SPECIAL_ATTACK_PARALYZED = 12, + SPECIAL_ATTACK_UNCONSCIOUS = 13, + SPECIAL_ATTACK_DEAD = 14, + SPECIAL_ATTACK_PETRIFIED = 15, + SPECIAL_ATTACK_ERADICATED = 16, + SPECIAL_ATTACK_BREAK_ANY = 17, + SPECIAL_ATTACK_BREAK_ARMOR = 18, + SPECIAL_ATTACK_BREAK_WEAPON = 19, + SPECIAL_ATTACK_STEAL = 20, + SPECIAL_ATTACK_AGING = 21, + SPECIAL_ATTACK_MANA_DRAIN = 22, + SPECIAL_ATTACK_FEAR = 23, +}; +using enum SPECIAL_ATTACK_TYPE; diff --git a/src/Engine/Objects/Monsters.cpp b/src/Engine/Objects/Monsters.cpp index 67000dbf219b..09f762fa0e28 100644 --- a/src/Engine/Objects/Monsters.cpp +++ b/src/Engine/Objects/Monsters.cpp @@ -1,4 +1,4 @@ -#include "Engine/Objects/Monsters.h" +#include "Monsters.h" #include #include diff --git a/src/Engine/Objects/Monsters.h b/src/Engine/Objects/Monsters.h index eb868057eaef..05284bdd7899 100644 --- a/src/Engine/Objects/Monsters.h +++ b/src/Engine/Objects/Monsters.h @@ -16,133 +16,10 @@ #include "ActorEnums.h" #include "ItemEnums.h" +#include "MonsterEnums.h" class Blob; -// TODO(captainurist): Rename to MonsterId? -// TODO(captainurist): codegen enum values. -enum class MONSTER_TYPE { - MONSTER_0 = 0, // TODO(captainurist): MONSTER_INVALID? - MONSTER_1 = 1, - MONSTER_DEVIL_1 = 22, - MONSTER_DEVIL_2 = 23, - MONSTER_DEVIL_3 = 24, - MONSTER_DRAGON_1 = 25, - MONSTER_DRAGON_2 = 26, - MONSTER_DRAGON_3 = 27, - MONSTER_45 = 45, - MONSTER_ELEMENTAL_WATER_1 = 46, - MONSTER_ELEMENTAL_WATER_3 = 48, - MONSTER_ELF_ARCHER_1 = 49, - MONSTER_ELF_ARCHER_3 = 51, - MONSTER_ELF_SPEARMAN_1 = 52, - MONSTER_ELF_SPEARMAN_3 = 54, - MONSTER_GHOST_1 = 70, - MONSTER_GHOST_3 = 72, - MONSTER_HARPY_1 = 85, - MONSTER_HARPY_2 = 86, - MONSTER_HARPY_3 = 87, - MONSTER_LICH_1 = 91, - MONSTER_LICH_3 = 93, - MONSTER_OOZE_1 = 112, - MONSTER_OOZE_2 = 113, - MONSTER_OOZE_3 = 114, - MONSTER_115 = 115, - MONSTER_PEASANT_ELF_FEMALE_1_1 = 133, - MONSTER_PEASANT_ELF_MALE_3_3 = 150, - MONSTER_186 = 186, - MONSTER_SKELETON_1 = 199, - MONSTER_SKELETON_3 = 201, - MONSTER_TITAN_1 = 211, - MONSTER_TITAN_3 = 213, - MONSTER_VAMPIRE_1 = 217, - MONSTER_VAMPIRE_3 = 219, - MONSTER_WIGHT_1 = 223, - MONSTER_WIGHT_3 = 225, - MONSTER_ZOMBIE_1 = 229, - MONSTER_ZOMBIE_3 = 231, - MONSTER_232 = 232, - MONSTER_PEASANT_GOBLIN_MALE_3_3 = 249, - MONSTER_TROLL_1 = 250, - MONSTER_TROLL_2 = 251, - MONSTER_TROLL_3 = 252, - MONSTER_TREANT_1 = 253, - MONSTER_TREANT_3 = 255, - MONSTER_GHOUL_1 = 256, - MONSTER_GHOUL_3 = 258, - - MONSTER_FIRST = MONSTER_1, - MONSTER_LAST = 277, - - MONSTER_FIRST_ARENA = MONSTER_1, - MONSTER_LAST_ARENA = MONSTER_GHOUL_3 -}; -using enum MONSTER_TYPE; - -inline Segment allArenaMonsters() { - return {MONSTER_FIRST_ARENA, MONSTER_LAST_ARENA}; -} - -/* 335 */ -enum class MONSTER_SPECIAL_ABILITY_TYPE { - MONSTER_SPECIAL_ABILITY_NONE = 0x0, - MONSTER_SPECIAL_ABILITY_SHOT = 0x1, - MONSTER_SPECIAL_ABILITY_SUMMON = 0x2, - MONSTER_SPECIAL_ABILITY_EXPLODE = 0x3, -}; -using enum MONSTER_SPECIAL_ABILITY_TYPE; - -enum class MONSTER_MOVEMENT_TYPE { - MONSTER_MOVEMENT_TYPE_SHORT = 0x0, - MONSTER_MOVEMENT_TYPE_MEDIUM = 0x1, - MONSTER_MOVEMENT_TYPE_LONG = 0x2, - MONSTER_MOVEMENT_TYPE_GLOBAL = 0x3, - MONSTER_MOVEMENT_TYPE_FREE = 0x4, - MONSTER_MOVEMENT_TYPE_STATIONARY = 0x5, -}; -using enum MONSTER_MOVEMENT_TYPE; - -/* 336 */ -enum class MONSTER_SUPERTYPE { - MONSTER_SUPERTYPE_UNDEAD = 0x1, - MONSTER_SUPERTYPE_KREEGAN = 0x2, - MONSTER_SUPERTYPE_DRAGON = 0x3, - MONSTER_SUPERTYPE_ELF = 0x4, - MONSTER_SUPERTYPE_WATER_ELEMENTAL = 0x5, - MONSTER_SUPERTYPE_TREANT = 0x6, - MONSTER_SUPERTYPE_TITAN = 0x7, - MONSTER_SUPERTYPE_8 = 0x8, -}; -using enum MONSTER_SUPERTYPE; - -enum class SPECIAL_ATTACK_TYPE : uint8_t { - SPECIAL_ATTACK_NONE = 0, - SPECIAL_ATTACK_CURSE = 1, - SPECIAL_ATTACK_WEAK = 2, - SPECIAL_ATTACK_SLEEP = 3, - SPECIAL_ATTACK_DRUNK = 4, - SPECIAL_ATTACK_INSANE = 5, - SPECIAL_ATTACK_POISON_WEAK = 6, - SPECIAL_ATTACK_POISON_MEDIUM = 7, - SPECIAL_ATTACK_POISON_SEVERE = 8, - SPECIAL_ATTACK_DISEASE_WEAK = 9, - SPECIAL_ATTACK_DISEASE_MEDIUM = 10, - SPECIAL_ATTACK_DISEASE_SEVERE = 11, - SPECIAL_ATTACK_PARALYZED = 12, - SPECIAL_ATTACK_UNCONSCIOUS = 13, - SPECIAL_ATTACK_DEAD = 14, - SPECIAL_ATTACK_PETRIFIED = 15, - SPECIAL_ATTACK_ERADICATED = 16, - SPECIAL_ATTACK_BREAK_ANY = 17, - SPECIAL_ATTACK_BREAK_ARMOR = 18, - SPECIAL_ATTACK_BREAK_WEAPON = 19, - SPECIAL_ATTACK_STEAL = 20, - SPECIAL_ATTACK_AGING = 21, - SPECIAL_ATTACK_MANA_DRAIN = 22, - SPECIAL_ATTACK_FEAR = 23, -}; -using enum SPECIAL_ATTACK_TYPE; - struct MonsterInfo { // TODO(captainurist): move into global namespace. enum class HostilityRadius { diff --git a/src/Engine/Tables/NPCTable.h b/src/Engine/Tables/NPCTable.h index e93c754e9936..b3d1592eeceb 100644 --- a/src/Engine/Tables/NPCTable.h +++ b/src/Engine/Tables/NPCTable.h @@ -5,7 +5,7 @@ #include "Engine/Objects/NPCEnums.h" #include "Engine/Objects/CharacterEnums.h" -#include "Engine/Objects/Monsters.h" // TODO(captainurist): MonsterEnums.h +#include "Engine/Objects/MonsterEnums.h" #include "Engine/MapEnums.h" #include "GUI/UI/UIHouseEnums.h" diff --git a/src/GUI/UI/Houses/TownHall.cpp b/src/GUI/UI/Houses/TownHall.cpp index f5418d9bf256..88b09b363644 100644 --- a/src/GUI/UI/Houses/TownHall.cpp +++ b/src/GUI/UI/Houses/TownHall.cpp @@ -11,7 +11,6 @@ #include "Engine/Engine.h" #include "GUI/UI/UIHouses.h" -#include "GUI/GUIMessageQueue.h" #include "GUI/GUIWindow.h" #include "GUI/GUIButton.h" #include "GUI/GUIFont.h" diff --git a/src/GUI/UI/Houses/TownHall.h b/src/GUI/UI/Houses/TownHall.h index 1fb730066d0d..fefccf0172ec 100644 --- a/src/GUI/UI/Houses/TownHall.h +++ b/src/GUI/UI/Houses/TownHall.h @@ -3,7 +3,7 @@ #include #include -#include "Engine/Objects/Monsters.h" // TODO(captainurist): MonsterEnums.h +#include "Engine/Objects/MonsterEnums.h" #include "GUI/UI/UIHouses.h" #include "GUI/UI/UIHouseEnums.h"