Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
W3DAssetManager Class Reference

#include <W3DAssetManager.h>

Inherits WW3DAssetManager.

Public Member Functions

 W3DAssetManager (void)
 
virtual ~W3DAssetManager (void)
 
virtual RenderObjClassCreate_Render_Obj (const char *name)
 
virtual HAnimClassGet_HAnim (const char *name)
 
virtual bool Load_3D_Assets (const char *filename)
 
virtual TextureClassGet_Texture (const char *filename, MipCountType mip_level_count=MIP_LEVELS_ALL, WW3DFormat texture_format=WW3D_FORMAT_UNKNOWN, bool allow_compression=true, TextureBaseClass::TexAssetType type=TextureBaseClass::TEX_REGULAR, bool allow_reduction=true)
 
void Report_Used_Assets (void)
 
void Report_Used_Prototypes (void)
 
void Report_Used_Textures (void)
 
void Report_Used_Font3DDatas (void)
 
void Report_Used_FontChars (void)
 
virtual RenderObjClassCreate_Render_Obj (const char *name, float scale, const int color, const char *oldTexure=NULL, const char *newTexture=NULL)
 
int replacePrototypeTexture (RenderObjClass *robj, const char *oldname, const char *newname)
 Swaps the specified textures in the render object prototype.
 
- Public Member Functions inherited from WW3DAssetManager
 WW3DAssetManager (void)
 
virtual ~WW3DAssetManager (void)
 
virtual bool Load_3D_Assets (FileClass &assetfile)
 
virtual void Free_Assets (void)
 
virtual void Release_Unused_Assets (void)
 
virtual void Free_Assets_With_Exclusion_List (const DynamicVectorClass< StringClass > &model_exclusion_list)
 
virtual void Create_Asset_List (DynamicVectorClass< StringClass > &model_exclusion_list)
 
virtual bool Render_Obj_Exists (const char *name)
 
virtual RenderObjIteratorCreate_Render_Obj_Iterator (void)
 
virtual void Release_Render_Obj_Iterator (RenderObjIterator *)
 
virtual AssetIteratorCreate_HAnim_Iterator (void)
 
virtual bool Add_Anim (HAnimClass *new_anim)
 
HashTemplateClass< StringClass, TextureClass * > & Texture_Hash ()
 
virtual void Release_All_Textures (void)
 
virtual void Release_Unused_Textures (void)
 
virtual void Release_Texture (TextureClass *)
 
virtual void Load_Procedural_Textures ()
 
virtual MetalMapManagerClassPeek_Metal_Map_Manager ()
 
virtual Font3DInstanceClassGet_Font3DInstance (const char *name)
 
virtual FontCharsClassGet_FontChars (const char *name, int point_size, bool is_bold=false)
 
virtual AssetIteratorCreate_HTree_Iterator (void)
 
virtual HTreeClassGet_HTree (const char *name)
 
virtual void Register_Prototype_Loader (PrototypeLoaderClass *loader)
 
void Add_Prototype (PrototypeClass *newproto)
 
void Remove_Prototype (PrototypeClass *proto)
 
void Remove_Prototype (const char *name)
 
PrototypeClassFind_Prototype (const char *name)
 
bool Get_WW3D_Load_On_Demand (void)
 
void Set_WW3D_Load_On_Demand (bool on_off)
 
bool Get_Activate_Fog_On_Load (void)
 
void Set_Activate_Fog_On_Load (bool on_off)
 
void Log_All_Textures ()
 

Additional Inherited Members

- Static Public Member Functions inherited from WW3DAssetManager
static WW3DAssetManagerGet_Instance (void)
 
static void Delete_This (void)
 
static void Log_Texture_Statistics ()
 
- Protected Types inherited from WW3DAssetManager
enum  { PROTOLOADERS_VECTOR_SIZE = 32 , PROTOLOADERS_GROWTH_RATE = 16 , PROTOTYPES_VECTOR_SIZE = 256 , PROTOTYPES_GROWTH_RATE = 32 }
 
enum  { PROTOTYPE_HASH_TABLE_SIZE = 4096 , PROTOTYPE_HASH_BITS = 12 , PROTOTYPE_HASH_MASK = 0x00000FFF }
 
- Protected Member Functions inherited from WW3DAssetManager
virtual AssetIteratorCreate_Font3DData_Iterator (void)
 
virtual void Add_Font3DData (Font3DDataClass *font)
 
virtual void Remove_Font3DData (Font3DDataClass *font)
 
virtual Font3DDataClassGet_Font3DData (const char *name)
 
virtual void Release_All_Font3DDatas (void)
 
virtual void Release_Unused_Font3DDatas (void)
 
virtual void Release_All_FontChars (void)
 
void Free (void)
 
PrototypeLoaderClassFind_Prototype_Loader (int chunk_id)
 
bool Load_Prototype (ChunkLoadClass &cload)
 
- Protected Attributes inherited from WW3DAssetManager
DynamicVectorClass< PrototypeLoaderClass * > PrototypeLoaders
 
DynamicVectorClass< PrototypeClass * > Prototypes
 
PrototypeClass ** PrototypeHashTable
 
HTreeManagerClass HTreeManager
 
HAnimManagerClass HAnimManager
 
TextureFileCache * TextureCache
 
SList< Font3DDataClassFont3DDatas
 
SimpleDynVecClass< FontCharsClass * > FontCharsList
 
bool WW3D_Load_On_Demand
 
bool Activate_Fog_On_Load
 
MetalMapManagerClassMetalManager
 
HashTemplateClass< StringClass, TextureClass * > TextureHash
 
- Static Protected Attributes inherited from WW3DAssetManager
static WW3DAssetManagerTheInstance = NULL
 

Detailed Description

Definition at line 59 of file W3DAssetManager.h.

Constructor & Destructor Documentation

◆ W3DAssetManager()

W3DAssetManager::W3DAssetManager ( void )

Definition at line 153 of file W3DAssetManager.cpp.

◆ ~W3DAssetManager()

W3DAssetManager::~W3DAssetManager ( void )
virtual

Definition at line 161 of file W3DAssetManager.cpp.

Member Function Documentation

◆ Create_Render_Obj() [1/2]

RenderObjClass * W3DAssetManager::Create_Render_Obj ( const char * name)
virtual

Reimplemented from WW3DAssetManager.

Definition at line 276 of file W3DAssetManager.cpp.

◆ Create_Render_Obj() [2/2]

RenderObjClass * W3DAssetManager::Create_Render_Obj ( const char * name,
float scale,
const int color,
const char * oldTexture = NULL,
const char * newTexture = NULL )
virtual

Generals specific code to generate customized render objects for each team color Scale==1.0, color==0x00000000, and oldTexure==NULL are defaults that do nothing.

Definition at line 719 of file W3DAssetManager.cpp.

◆ Get_HAnim()

HAnimClass * W3DAssetManager::Get_HAnim ( const char * name)
virtual

Reimplemented from WW3DAssetManager.

Definition at line 1113 of file W3DAssetManager.cpp.

◆ Get_Texture()

TextureClass * W3DAssetManager::Get_Texture ( const char * filename,
MipCountType mip_level_count = MIP_LEVELS_ALL,
WW3DFormat texture_format = WW3D_FORMAT_UNKNOWN,
bool allow_compression = true,
TextureBaseClass::TexAssetType type = TextureBaseClass::TEX_REGULAR,
bool allow_reduction = true )
virtual

Reimplemented from WW3DAssetManager.

Definition at line 172 of file W3DAssetManager.cpp.

◆ Load_3D_Assets()

bool W3DAssetManager::Load_3D_Assets ( const char * filename)
virtual

Reimplemented from WW3DAssetManager.

Definition at line 1011 of file W3DAssetManager.cpp.

◆ replacePrototypeTexture()

int W3DAssetManager::replacePrototypeTexture ( RenderObjClass * robj,
const char * oldname,
const char * newname )

Swaps the specified textures in the render object prototype.

Replaces all references to old texture with new texture. Operation is performed on asset prototype so it will affect most instances of this object. Objects which have been customized with house color will not be affected unless they are created after this function is called.

Definition at line 363 of file W3DAssetManager.cpp.

◆ Report_Used_Assets()

void W3DAssetManager::Report_Used_Assets ( void )

Report any assets with reference counts > 1. This means they are still referenced by something besides the asset manager.

Todo
: Report unfreed skeletons and animations

Definition at line 1279 of file W3DAssetManager.cpp.

◆ Report_Used_Font3DDatas()

void W3DAssetManager::Report_Used_Font3DDatas ( void )

Report all used fonts

Definition at line 1348 of file W3DAssetManager.cpp.

◆ Report_Used_FontChars()

void W3DAssetManager::Report_Used_FontChars ( void )

Definition at line 1293 of file W3DAssetManager.cpp.

◆ Report_Used_Prototypes()

void W3DAssetManager::Report_Used_Prototypes ( void )

Report prototypes that have all assets with reference count equal to 1

Definition at line 1263 of file W3DAssetManager.cpp.

◆ Report_Used_Textures()

void W3DAssetManager::Report_Used_Textures ( void )

Report all textures with refcounts >= 1

Definition at line 1310 of file W3DAssetManager.cpp.


The documentation for this class was generated from the following files: