feat(component): create texture buffer in CCharacterComponent::Initialize

This commit is contained in:
fallenoak 2025-10-20 23:02:02 -05:00
parent bcf6f34e81
commit 5bd90ecf29
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 12 additions and 0 deletions

View File

@ -2,6 +2,7 @@
#include "component/Texture.hpp" #include "component/Texture.hpp"
#include "component/Util.hpp" #include "component/Util.hpp"
#include "db/Db.hpp" #include "db/Db.hpp"
#include "gx/Texture.hpp"
#include "model/CM2Model.hpp" #include "model/CM2Model.hpp"
#include "object/Types.hpp" #include "object/Types.hpp"
#include <storm/Memory.hpp> #include <storm/Memory.hpp>
@ -11,6 +12,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;
MipBits* CCharacterComponent::s_textureBuffer;
uint32_t CCharacterComponent::s_textureSize; uint32_t CCharacterComponent::s_textureSize;
int32_t s_bInRenderPrep = 0; int32_t s_bInRenderPrep = 0;
@ -58,6 +60,14 @@ void CCharacterComponent::Initialize(EGxTexFormat textureFormat, uint32_t textur
CCharacterComponent::InitDbData(); CCharacterComponent::InitDbData();
// TODO // TODO
CCharacterComponent::s_textureBuffer = TextureAllocMippedImg(
PIXEL_ARGB8888,
CCharacterComponent::s_textureSize,
CCharacterComponent::s_textureSize
);
// TODO
} }
void CCharacterComponent::InitDbData() { void CCharacterComponent::InitDbData() {

View File

@ -9,6 +9,7 @@ class CACHEENTRY;
class CharSectionsRec; class CharSectionsRec;
class CM2Model; class CM2Model;
struct MipBits;
struct st_race; struct st_race;
struct ComponentData { struct ComponentData {
@ -54,6 +55,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 MipBits* s_textureBuffer;
static uint32_t s_textureSize; static uint32_t s_textureSize;
// Static functions // Static functions