mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* All libraries have been isolated from each other, and build into separate artifacts. * Project has been restructured to support isolating libraries. * CCrashHandler now calls a callback on crash (setup from core/dllmain.cpp, this can be setup in any way for any project. This callback is getting called when the apllication crashes. Useful for flushing buffers before closing handles to logging files for example). * Tier0 'CoreMsgV' function now calls a callback sink, which could be set by the user (currently setup to the SDK's internal logger in core/dllmain.cpp). TODO: * Add a batch file to autogenerate all projects. * Add support for dedicated server. * Add support for client dll. Bugs: * Game crashes on the title screen after the UI script compiler has finished (root cause unknown). * Curl error messages are getting logged twice for the dedicated server due to the removal of all "DEDICATED" preprocessor directives to support isolating projects. This has to be fixed properly!
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
#ifndef IMDLCACHE_H
|
|
#define IMDLCACHE_H
|
|
|
|
#define ERROR_MODEL "mdl/error.rmdl"
|
|
#define EMPTY_MODEL "mdl/dev/empty_model.rmdl"
|
|
#define IDSTUDIOHEADER (('T'<<24)+('S'<<16)+('D'<<8)+'I')
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Reference to a loaded studiomdl
|
|
//-----------------------------------------------------------------------------
|
|
typedef unsigned short MDLHandle_t;
|
|
|
|
inline MDLHandle_t VoidPtrToMDLHandle(void* ptr)
|
|
{
|
|
return (MDLHandle_t)(int)(intptr_t)ptr;
|
|
}
|
|
|
|
inline void* MDLHandleToVirtual(MDLHandle_t hndl)
|
|
{
|
|
return (void*)(uintptr_t)hndl;
|
|
}
|
|
|
|
enum
|
|
{
|
|
MDLHANDLE_INVALID = (MDLHandle_t)~0
|
|
};
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Cache data types
|
|
//-----------------------------------------------------------------------------
|
|
enum MDLCacheDataType_t
|
|
{
|
|
MDLCACHE_NONE = -1,
|
|
|
|
// Callbacks to get called when data is loaded or unloaded for these:
|
|
MDLCACHE_STUDIOHDR = 0,
|
|
MDLCACHE_STUDIOHWDATA,
|
|
MDLCACHE_VCOLLIDE,
|
|
|
|
// Callbacks NOT called when data is loaded or unloaded for these:
|
|
MDLCACHE_ANIMBLOCK,
|
|
MDLCACHE_VIRTUALMODEL,
|
|
MDLCACHE_VERTEXES,
|
|
MDLCACHE_DECODEDANIMBLOCK
|
|
};
|
|
#endif // !IMDLCACHE_H
|