#define RWPS2RESHEADERFROMRESENTRY(resEntry) \ ((rwPS2ResEntryHeader *)(resEntry + 1)) #define rpObjectGetMeshCacheMacro(_mshChRf, _nmMsh) \ ( ((NULL != *_mshChRf) && ((*_mshChRf)->lengthOfMeshesArray == _nmMsh)) ? \ (_mshChRf): \ (rpObjectGetMeshCacheResize(_mshChRf, _nmMsh)) ) #if (! (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) ) #define rpObjectGetMeshCache rpObjectGetMeshCacheMacro #define rpGeometryGetMeshCache(_geometry, _numMeshes) \ (*rpObjectGetMeshCache(&RWMESHCACHEFROMGEOMETRY(_geometry), _numMeshes)) #define rpAtomicGetMeshCache(_atomic, _numMeshes) \ (*rpObjectGetMeshCache(&RWMESHCACHEFROMATOMIC(_atomic), _numMeshes)) #define rpWorldSectorGetMeshCache(_sector, _numMeshes) \ (*rpObjectGetMeshCache(&RWMESHCACHEFROMWORLDSECTOR(_sector), _numMeshes)) #define rwMeshCacheGetEntryRef(_cache, _index) (&(_cache)->meshes[_index]) #endif /* (! (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) ) */ #if (defined(__cplusplus)) extern "C" { #endif /* (defined(__cplusplus)) */ #if (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) extern RwMeshCache * rpGeometryGetMeshCache(RpGeometry *geometry, RwUInt32 numMeshes); extern RwMeshCache * rpAtomicGetMeshCache(RpAtomic *atomic, RwUInt32 numMeshes); extern RwMeshCache * rpWorldSectorGetMeshCache(RpWorldSector *worldSector, RwUInt32 numMeshes); extern RwResEntry ** rwMeshCacheGetEntryRef(const RwMeshCache * meshCache, RwUInt32 meshIndex); extern RwMeshCache ** rpObjectGetMeshCache(RwMeshCache **meshCacheRef, RwUInt32 numMeshes); #endif /* (defined(RWDEBUG) || defined(RWSUPPRESSINLINE)) */ extern RwMeshCache ** rpObjectGetMeshCacheResize(RwMeshCache **meshCacheRef, RwUInt32 numMeshes); extern void rpObjectDestroyMeshCache(RwMeshCache *meshCache); #if (defined(__cplusplus)) } #endif /* (defined(__cplusplus)) */