From 068b32435e1d23c845c3e1634177a33f8703cab5 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Mon, 27 Oct 2025 19:30:12 -0500 Subject: [PATCH] chore(component): move ComponentData to types header --- src/component/CCharacterComponent.hpp | 39 ------------------------- src/component/Types.hpp | 41 +++++++++++++++++++++++++++ src/component/Util.cpp | 2 +- 3 files changed, 42 insertions(+), 40 deletions(-) diff --git a/src/component/CCharacterComponent.hpp b/src/component/CCharacterComponent.hpp index adbcc70..67a559a 100644 --- a/src/component/CCharacterComponent.hpp +++ b/src/component/CCharacterComponent.hpp @@ -3,14 +3,11 @@ #include "component/Types.hpp" #include "gx/Texture.hpp" -#include #include -#include class CACHEENTRY; class CCharacterComponent; class CharSectionsRec; -class CM2Model; struct BlpPalPixel; struct MipBits; @@ -19,42 +16,6 @@ struct TCTEXTUREINFO; typedef void (PREP_FUNC)(CCharacterComponent* component); -struct ComponentData { - int32_t raceID = 0; - int32_t sexID = 0; - int32_t classID = 0; - int32_t hairColorID = 0; - int32_t skinColorID = 0; - int32_t faceID = 0; - int32_t facialHairStyleID = 0; - int32_t hairStyleID = 0; - CM2Model* model = nullptr; - uint32_t flags = 0x0; - char npcBakedTexturePath[STORM_MAX_PATH] = { '\0' }; - - uint32_t geosets[NUM_GEOSET] = { - 001, - 101, - 201, - 301, - 401, - 501, - 601, - 702, - 801, - 901, - 1001, - 1101, - 1201, - 1301, - 1401, - 1501, - 1601, - 1701, - 1801, - }; -}; - struct CompSectionInfo { C2iVector pos; C2iVector size; diff --git a/src/component/Types.hpp b/src/component/Types.hpp index 32ed665..8046c0b 100644 --- a/src/component/Types.hpp +++ b/src/component/Types.hpp @@ -1,6 +1,11 @@ #ifndef COMPONENT_TYPES_HPP #define COMPONENT_TYPES_HPP +#include +#include + +class CM2Model; + enum COMPONENT_GEOSET { GEOSET_HEAD = 0, GEOSET_BEARD = 1, @@ -63,4 +68,40 @@ enum ITEM_SLOT { NUM_ITEM_SLOT }; +struct ComponentData { + int32_t raceID = 0; + int32_t sexID = 0; + int32_t classID = 0; + int32_t hairColorID = 0; + int32_t skinColorID = 0; + int32_t faceID = 0; + int32_t facialHairStyleID = 0; + int32_t hairStyleID = 0; + CM2Model* model = nullptr; + uint32_t flags = 0x0; + char npcBakedTexturePath[STORM_MAX_PATH] = { '\0' }; + + uint32_t geosets[NUM_GEOSET] = { + 001, + 101, + 201, + 301, + 401, + 501, + 601, + 702, + 801, + 901, + 1001, + 1101, + 1201, + 1301, + 1401, + 1501, + 1601, + 1701, + 1801, + }; +}; + #endif diff --git a/src/component/Util.cpp b/src/component/Util.cpp index 2740879..1d22f58 100644 --- a/src/component/Util.cpp +++ b/src/component/Util.cpp @@ -1,5 +1,5 @@ #include "component/Util.hpp" -#include "component/CCharacterComponent.hpp" +#include "component/Types.hpp" #include "db/Db.hpp" #include "object/Types.hpp" #include