mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(component): initialize prep functions
This commit is contained in:
parent
8b418a68b1
commit
d2dfa27f4a
@ -13,6 +13,7 @@ st_race* CCharacterComponent::s_chrVarArray;
|
|||||||
uint32_t CCharacterComponent::s_chrVarArrayLength;
|
uint32_t CCharacterComponent::s_chrVarArrayLength;
|
||||||
EGxTexFormat CCharacterComponent::s_gxFormat;
|
EGxTexFormat CCharacterComponent::s_gxFormat;
|
||||||
uint32_t CCharacterComponent::s_mipLevels;
|
uint32_t CCharacterComponent::s_mipLevels;
|
||||||
|
PREP_FUNC* CCharacterComponent::s_prepFunc[];
|
||||||
MipBits* CCharacterComponent::s_textureBuffer;
|
MipBits* CCharacterComponent::s_textureBuffer;
|
||||||
MipBits* CCharacterComponent::s_textureBufferCompressed;
|
MipBits* CCharacterComponent::s_textureBufferCompressed;
|
||||||
uint32_t CCharacterComponent::s_textureSize;
|
uint32_t CCharacterComponent::s_textureSize;
|
||||||
@ -40,6 +41,17 @@ void CCharacterComponent::Initialize(EGxTexFormat textureFormat, uint32_t textur
|
|||||||
|
|
||||||
s_pathEnd = s_path;
|
s_pathEnd = s_path;
|
||||||
|
|
||||||
|
CCharacterComponent::s_prepFunc[SECTION_ARM_UPPER] = &CCharacterComponent::RenderPrepAU;
|
||||||
|
CCharacterComponent::s_prepFunc[SECTION_ARM_LOWER] = &CCharacterComponent::RenderPrepAL;
|
||||||
|
CCharacterComponent::s_prepFunc[SECTION_HAND] = &CCharacterComponent::RenderPrepHA;
|
||||||
|
CCharacterComponent::s_prepFunc[SECTION_TORSO_UPPER] = &CCharacterComponent::RenderPrepTU;
|
||||||
|
CCharacterComponent::s_prepFunc[SECTION_TORSO_LOWER] = &CCharacterComponent::RenderPrepTL;
|
||||||
|
CCharacterComponent::s_prepFunc[SECTION_LEG_UPPER] = &CCharacterComponent::RenderPrepLU;
|
||||||
|
CCharacterComponent::s_prepFunc[SECTION_LEG_LOWER] = &CCharacterComponent::RenderPrepLL;
|
||||||
|
CCharacterComponent::s_prepFunc[SECTION_FOOT] = &CCharacterComponent::RenderPrepFO;
|
||||||
|
CCharacterComponent::s_prepFunc[SECTION_HEAD_UPPER] = &CCharacterComponent::RenderPrepHU;
|
||||||
|
CCharacterComponent::s_prepFunc[SECTION_HEAD_LOWER] = &CCharacterComponent::RenderPrepHL;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
// Clamp mip levels between 6 and 9
|
// Clamp mip levels between 6 and 9
|
||||||
@ -80,6 +92,46 @@ void CCharacterComponent::InitDbData() {
|
|||||||
// TODO CountFacialFeatures(varArrayLength, &CCharacterComponent::s_characterFacialHairStylesList);
|
// TODO CountFacialFeatures(varArrayLength, &CCharacterComponent::s_characterFacialHairStylesList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::RenderPrepAL(CCharacterComponent* component) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::RenderPrepAU(CCharacterComponent* component) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::RenderPrepFO(CCharacterComponent* component) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::RenderPrepHA(CCharacterComponent* component) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::RenderPrepHL(CCharacterComponent* component) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::RenderPrepHU(CCharacterComponent* component) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::RenderPrepLL(CCharacterComponent* component) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::RenderPrepLU(CCharacterComponent* component) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::RenderPrepTL(CCharacterComponent* component) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void CCharacterComponent::RenderPrepTU(CCharacterComponent* component) {
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
void CCharacterComponent::UpdateBaseTexture(EGxTexCommand cmd, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipLevel, void* userArg, uint32_t& texelStrideInBytes, const void*& texels) {
|
void CCharacterComponent::UpdateBaseTexture(EGxTexCommand cmd, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipLevel, void* userArg, uint32_t& texelStrideInBytes, const void*& texels) {
|
||||||
auto component = static_cast<CCharacterComponent*>(userArg);
|
auto component = static_cast<CCharacterComponent*>(userArg);
|
||||||
|
|
||||||
|
|||||||
@ -6,12 +6,15 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
class CACHEENTRY;
|
class CACHEENTRY;
|
||||||
|
class CCharacterComponent;
|
||||||
class CharSectionsRec;
|
class CharSectionsRec;
|
||||||
class CM2Model;
|
class CM2Model;
|
||||||
|
|
||||||
struct MipBits;
|
struct MipBits;
|
||||||
struct st_race;
|
struct st_race;
|
||||||
|
|
||||||
|
typedef void (PREP_FUNC)(CCharacterComponent* component);
|
||||||
|
|
||||||
struct ComponentData {
|
struct ComponentData {
|
||||||
int32_t raceID = 0;
|
int32_t raceID = 0;
|
||||||
int32_t sexID = 0;
|
int32_t sexID = 0;
|
||||||
@ -55,6 +58,7 @@ class CCharacterComponent {
|
|||||||
static uint32_t s_chrVarArrayLength;
|
static uint32_t s_chrVarArrayLength;
|
||||||
static EGxTexFormat s_gxFormat;
|
static EGxTexFormat s_gxFormat;
|
||||||
static uint32_t s_mipLevels;
|
static uint32_t s_mipLevels;
|
||||||
|
static PREP_FUNC* s_prepFunc[NUM_COMPONENT_SECTIONS];
|
||||||
static MipBits* s_textureBuffer;
|
static MipBits* s_textureBuffer;
|
||||||
static MipBits* s_textureBufferCompressed;
|
static MipBits* s_textureBufferCompressed;
|
||||||
static uint32_t s_textureSize;
|
static uint32_t s_textureSize;
|
||||||
@ -64,6 +68,16 @@ class CCharacterComponent {
|
|||||||
static void Initialize();
|
static void Initialize();
|
||||||
static void Initialize(EGxTexFormat textureFormat, uint32_t textureLevel, int32_t thread, int32_t compress);
|
static void Initialize(EGxTexFormat textureFormat, uint32_t textureLevel, int32_t thread, int32_t compress);
|
||||||
static void InitDbData();
|
static void InitDbData();
|
||||||
|
static void RenderPrepAL(CCharacterComponent* component);
|
||||||
|
static void RenderPrepAU(CCharacterComponent* component);
|
||||||
|
static void RenderPrepFO(CCharacterComponent* component);
|
||||||
|
static void RenderPrepHA(CCharacterComponent* component);
|
||||||
|
static void RenderPrepHL(CCharacterComponent* component);
|
||||||
|
static void RenderPrepHU(CCharacterComponent* component);
|
||||||
|
static void RenderPrepLL(CCharacterComponent* component);
|
||||||
|
static void RenderPrepLU(CCharacterComponent* component);
|
||||||
|
static void RenderPrepTL(CCharacterComponent* component);
|
||||||
|
static void RenderPrepTU(CCharacterComponent* component);
|
||||||
static void UpdateBaseTexture(EGxTexCommand cmd, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipLevel, void* userArg, uint32_t& texelStrideInBytes, const void*& texels);
|
static void UpdateBaseTexture(EGxTexCommand cmd, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipLevel, void* userArg, uint32_t& texelStrideInBytes, const void*& texels);
|
||||||
|
|
||||||
// Member variables
|
// Member variables
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user