mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-18 14:09:22 +00:00
CModelInfo done
This commit is contained in:
parent
381d0b4e3e
commit
b89dd7f0e3
4 changed files with 111 additions and 22 deletions
|
@ -11,9 +11,12 @@
|
|||
#include "XtraCompsModelInfo.h"
|
||||
#include "templates.h"
|
||||
|
||||
extern C2dEffect *gp2dEffects;
|
||||
|
||||
class CModelInfo
|
||||
{
|
||||
static CBaseModelInfo *ms_modelInfoPtrs[MODELINFOSIZE];
|
||||
static CBaseModelInfo **ms_modelInfoPtrs;
|
||||
static int32 msNumModelInfos;
|
||||
static CStore<CSimpleModelInfo, SIMPLEMODELSIZE> ms_simpleModelStore;
|
||||
static CStore<CTimeModelInfo, TIMEMODELSIZE> ms_timeModelStore;
|
||||
static CStore<CWeaponModelInfo, WEAPONMODELSIZE> ms_weaponModelStore;
|
||||
|
@ -22,6 +25,9 @@ class CModelInfo
|
|||
static CStore<CVehicleModelInfo, VEHICLEMODELSIZE> ms_vehicleModelStore;
|
||||
static CStore<C2dEffect, TWODFXSIZE> ms_2dEffectStore;
|
||||
|
||||
// these fields are in the resource image
|
||||
int32 resNumModelInfos;
|
||||
CBaseModelInfo **resModelInfoPtrs;
|
||||
public:
|
||||
static void Initialise(void);
|
||||
static void ShutDown(void);
|
||||
|
@ -34,12 +40,17 @@ public:
|
|||
static CVehicleModelInfo *AddVehicleModel(int id);
|
||||
|
||||
static CStore<C2dEffect, TWODFXSIZE> &Get2dEffectStore(void) { return ms_2dEffectStore; }
|
||||
static C2dEffect *Get2dEffect(int32 id) { return &gp2dEffects[id]; }
|
||||
static int32 Get2dEffectIndex(C2dEffect *effect) { return effect - gp2dEffects; }
|
||||
|
||||
static CBaseModelInfo *GetModelInfo(const char *name, int *id);
|
||||
static CBaseModelInfo *GetModelInfo(int id){
|
||||
if(id < 0 || id >= msNumModelInfos)
|
||||
return nil;
|
||||
return ms_modelInfoPtrs[id];
|
||||
}
|
||||
static CBaseModelInfo *GetModelInfo(const char *name, int minIndex, int maxIndex);
|
||||
static CBaseModelInfo *GetModelInfoFromHashKey(uint32 hashKey, int *id);
|
||||
static CColModel *GetColModel(int id){
|
||||
return ms_modelInfoPtrs[id]->GetColModel();
|
||||
}
|
||||
|
@ -47,7 +58,12 @@ public:
|
|||
static bool IsBoatModel(int32 id);
|
||||
static bool IsBikeModel(int32 id);
|
||||
static bool IsCarModel(int32 id);
|
||||
static bool IsTrainModel(int32 id);
|
||||
static bool IsHeliModel(int32 id);
|
||||
static bool IsPlaneModel(int32 id);
|
||||
static void ReInit2dEffects();
|
||||
|
||||
static void Load(uint32 numModelInfos, CBaseModelInfo **modelInfos);
|
||||
static void Load2dEffects(uint32 numEffects, C2dEffect *effects);
|
||||
CModelInfo *Write(base::cRelocatableChunkWriter &writer);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue