#ifndef _CMODEL #define _CMODEL #include #include #include #include #include #include class CModelFlags; class IObjectStore; class CCubeSurface; class CModel { struct SShader { rstl::vector< TCachedToken< CTexture > > x0_textures; uchar* x10_data; SShader(uchar* data) : x10_data(data) {}; void UnlockTextures(); }; static uint sTotalMemory; static CModel* sThisFrameList; static CModel* sOneFrameList; static CModel* sTwoFrameList; public: CModel(const rstl::auto_ptr< uchar >& data, int length, IObjectStore& store); void Touch(int) const; void Draw(const CModelFlags&) const; bool IsLoaded(int matIdx) const; const float* GetPositions() const; const float* GetNormals() const; void UpdateLastFrame() const; const CCubeModel* GetCubeModel() const { return x28_modelInstance.get(); } static void FrameDone(); static void AddToTotal(uint amt) { sTotalMemory += amt; } static void RemoveFromTotal(uint amt) { sTotalMemory -= amt; } static uint GetTotalMemory() { return sTotalMemory; } private: rstl::auto_ptr< uchar > x0_data; uint x4_dataLen; rstl::vector< void* > x8_surfaces; rstl::vector< SShader > x18_matSets; rstl::single_ptr< CCubeModel > x28_modelInstance; ushort x2c_currentMatxIdx; ushort x2e_lastMaterialFrame; CModel* x30_prev; CModel* x34_next; uint x38_lastFrame; }; #endif // _CMODEL