Isle
Loading...
Searching...
No Matches
modeldb.h File Reference
#include "decomp.h"
#include "mxlist.h"
#include "mxstring.h"
#include "mxtypes.h"
#include <stdio.h>
Include dependency graph for modeldb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ModelDbPart
 [AI] Represents a single part within a 3D model database entry, including its name and data offsets in a file. More...
 
class  ModelDbPartList
 [AI] Collection class representing a list of ModelDbPart pointers with custom comparison logic. More...
 
class  ModelDbPartListCursor
 [AI] Iterator for traversing ModelDbPartList contents (ModelDbPart pointers). More...
 
struct  ModelDbModel
 [AI] Represents a 3D model entry in a model database, including metadata and spatial transform info. More...
 
struct  ModelDbWorld
 [AI] Represents a world/scene in the model database, containing its parts and models. More...
 

Functions

MxResult ReadModelDbWorlds (FILE *p_file, ModelDbWorld *&p_worlds, MxS32 &p_numWorlds)
 [AI] Reads the collection of worlds (ModelDbWorld) from a model database file. More...
 
void FreeModelDbWorlds (ModelDbWorld *&p_worlds, MxS32 p_numWorlds)
 [AI] Frees all resources related to ModelDbWorlds previously allocated by ReadModelDbWorlds. More...
 

Function Documentation

◆ FreeModelDbWorlds()

void FreeModelDbWorlds ( ModelDbWorld *&  p_worlds,
MxS32  p_numWorlds 
)

[AI] Frees all resources related to ModelDbWorlds previously allocated by ReadModelDbWorlds.

[AI] Deallocates all world names, part lists/parts, model presenter/model names, and the worlds array itself.

Parameters
p_worldsReference to worlds array pointer, which is set to NULL after deletion. [AI]
p_numWorldsNumber of worlds in the array, needed for cleanup. [AI]

Definition at line 149 of file modeldb.cpp.

◆ ReadModelDbWorlds()

MxResult ReadModelDbWorlds ( FILE *  p_file,
ModelDbWorld *&  p_worlds,
MxS32 p_numWorlds 
)

[AI] Reads the collection of worlds (ModelDbWorld) from a model database file.

[AI] Allocates and loads the specified number of worlds, each containing their names, part lists, and models. Populates p_worlds and p_numWorlds accordingly. The caller is responsible for freeing with FreeModelDbWorlds.

Parameters
p_fileThe file pointer to read from. [AI]
p_worldsReference to pointer where the array of worlds will be stored. [AI]
p_numWorldsReference to int to store the number of worlds read. [AI]
Returns
SUCCESS on successful load, FAILURE on error. [AI]

Definition at line 90 of file modeldb.cpp.