2019-05-15 14:52:37 +00:00
|
|
|
#include "common.h"
|
|
|
|
#include "patcher.h"
|
2019-10-29 23:12:58 +00:00
|
|
|
#include "General.h"
|
2019-05-15 14:52:37 +00:00
|
|
|
#include "ModelIndices.h"
|
|
|
|
|
|
|
|
#define X(name, var, addr) int16 &var = *(int16*)addr;
|
|
|
|
MODELINDICES
|
|
|
|
#undef X
|
|
|
|
|
|
|
|
void
|
|
|
|
InitModelIndices(void)
|
|
|
|
{
|
|
|
|
#define X(name, var, addr) var = -1;
|
|
|
|
MODELINDICES
|
|
|
|
#undef X
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
MatchModelString(const char *modelname, int16 id)
|
|
|
|
{
|
|
|
|
#define X(name, var, addr) \
|
2019-10-29 23:12:58 +00:00
|
|
|
if(!CGeneral::faststrcmp(name, modelname)){ \
|
2019-05-15 14:52:37 +00:00
|
|
|
var = id; \
|
|
|
|
return; \
|
|
|
|
}
|
|
|
|
MODELINDICES
|
|
|
|
#undef X
|
|
|
|
}
|
|
|
|
|
2019-10-26 18:25:45 +00:00
|
|
|
void
|
|
|
|
TestModelIndices(void)
|
|
|
|
{
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
2019-05-15 14:52:37 +00:00
|
|
|
STARTPATCHES
|
|
|
|
InjectHook(0x48EB60, InitModelIndices, PATCH_JUMP);
|
|
|
|
InjectHook(0x48F030, MatchModelString, PATCH_JUMP);
|
|
|
|
ENDPATCHES
|