2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-16 13:37:02 +00:00

Minor fixes, more CModel RE

This commit is contained in:
2022-02-01 00:14:49 -08:00
parent e48435f11e
commit 3ba2c4bfff
4 changed files with 112 additions and 46 deletions

View File

@@ -10,28 +10,51 @@
namespace metaforce {
class CCubeSurface;
class CCubeModel;
class CCubeModel {
public:
void UnlockTextures() {}
struct SShader {
std::vector<TCachedToken<CTexture>> x0_textures;
CCubeModel* x10_model;
SShader(CCubeModel* model) : x10_model(model) {}
static void MakeTexturesFromMats(const u8* ptr, std::vector<TCachedToken<CTexture>>& texture, bool b1) {}
};
class CModel {
public:
struct SShader {
std::vector<TCachedToken<CTexture>> x0_textures;
const u8* x10_data;
SShader(const u8* data) : x10_data(data) {}
void UnlockTextures() {};
};
private:
static u32 sFrameCounter;
static bool sIsTextureTimeoutEnabled;
static CModel* sThisFrameList;
static CModel* sOneFrameList;
static CModel* sTwoFrameList;
std::unique_ptr<u8[]> x0_data;
u32 x4_dataLen;
std::vector<CCubeSurface*> x8_surfaces;
std::vector<SShader> x18_matSets;
CCubeModel* x28_modelInst;
u16 x2c_;
u16 x2e_;
CModel* x30_next;
CModel* x34_prev;
CCubeModel* x28_modelInst = nullptr;
u16 x2c_ = 0;
u16 x2e_ = 0;
CModel* x30_prev = nullptr;
CModel* x34_next;
u32 x38_lastFrame;
public:
CModel(std::unique_ptr<u8[]> in, u32 dataLen, IObjectStore* store);
void UpdateLastFrame();
void MoveToThisFrameList();
void RemoveFromList();
void VerifyCurrentShader(s32 idx) {};
static void FrameDone();
static void EnableTextureTimeout();
static void DisableTextureTimeout();
};
} // namespace metaforce