chore(component): move ComponentData to types header

This commit is contained in:
fallenoak 2025-10-27 19:30:12 -05:00
parent 2964e51030
commit 068b32435e
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
3 changed files with 42 additions and 40 deletions

View File

@ -3,14 +3,11 @@
#include "component/Types.hpp"
#include "gx/Texture.hpp"
#include <storm/String.hpp>
#include <tempest/Vector.hpp>
#include <cstdint>
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;

View File

@ -1,6 +1,11 @@
#ifndef COMPONENT_TYPES_HPP
#define COMPONENT_TYPES_HPP
#include <cstdint>
#include <storm/String.hpp>
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

View File

@ -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 <storm/Memory.hpp>