Invert Event functions due to deferred inlining
This commit is contained in:
committed by
Timothy O'Barr
parent
074772af83
commit
04eefd63ff
+87
-87
@@ -24,50 +24,63 @@
|
|||||||
// bss
|
// bss
|
||||||
EVENT EventMngSt[50];
|
EVENT EventMngSt[50];
|
||||||
|
|
||||||
void SetEventModelDrawAndHit(MDLMNG* lpMdl, u_char OnOff) {
|
void SetEventFunc(void) {
|
||||||
lpMdl->bErase = OnOff;
|
memset(EventMngSt, 0, sizeof(EventMngSt));
|
||||||
lpMdl->HitOff = OnOff;
|
|
||||||
|
switch (GameSt.sceneNo) {
|
||||||
|
case 1: SetEventFuncS0001(); break;
|
||||||
|
case 2: SetEventFuncS0002(); break;
|
||||||
|
case 6: SetEventFuncS0006(); break;
|
||||||
|
case 8: SetEventFuncS0008(); break;
|
||||||
|
case 9: SetEventFuncS0009(); break;
|
||||||
|
case 10: SetEventFuncS0010(); break;
|
||||||
|
case 31: SetEventFuncS0031(); break;
|
||||||
|
case 32: SetEventFuncS0032(); break;
|
||||||
|
case 33: SetEventFuncS0033(); break;
|
||||||
|
case 34: SetEventFuncS0034(); break;
|
||||||
|
case 35: SetEventFuncS0035(); break;
|
||||||
|
case 40: SetEventFuncS0040(); break;
|
||||||
|
case 41: SetEventFuncS0041(); break;
|
||||||
|
case 51: SetEventFuncS0051(); break;
|
||||||
|
case 83: SetEventFuncS0083(); break;
|
||||||
|
case 85: SetEventFuncS0085();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventEneHitCheck(MDLMNG* lpEne) {
|
void InitEventFunc(void) { // not line matched
|
||||||
|
EVENT* lpEvent; // r16
|
||||||
|
|
||||||
|
lpEvent = EventMngSt;
|
||||||
|
do {
|
||||||
if (lpEne->GravOff == 0) lpEne->Pos[1] += 0.1f;
|
if (lpEvent->InitFunc != NULL) lpEvent->InitFunc(lpEvent);
|
||||||
|
} while (++lpEvent != &EventMngSt[50]);
|
||||||
if (lpEne->MapHitOff == 0) lpEne->HitFlag = CheckHitMapGetMdlMng(lpEne, lpEne->lpHitMap);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EasyEneAppearEx(int CtrlId, u_short AnimId, u_char bLogicFree) {
|
void PlayEventFunc(void) { // not line matched
|
||||||
PARTS* lpParts = GetMapPartsInfoByCtrlId(2, CtrlId);
|
EVENT* lpEvent;
|
||||||
int MdlMngIndex = GetMdlMngIndexByCtrlId(2, CtrlId);
|
|
||||||
MDLMNG* lpMdlMng = &MdlMng[MdlMngIndex + 161];
|
if (GameSt.GameMode == 0) {
|
||||||
int EneNo, EneDataIndex;
|
if (GameSt.Pause == 0) {
|
||||||
EneNo = lpParts->MdlKindId;
|
|
||||||
|
if (Menu_TD_IsPlay() != 0) return;
|
||||||
|
|
||||||
EneDataIndex = GetMdlDataIndexFromMapMdlInfo(2, EneNo);
|
lpEvent = EventMngSt;
|
||||||
|
do
|
||||||
if ((lpParts->Pos != NULL) && (EneDataIndex != -1))
|
{
|
||||||
EneAppear(EneNo, EneDataIndex, lpMdlMng, lpParts->Pos, lpParts->Ang[1], lpParts->Scl, 1, AnimId, bLogicFree, NULL, NULL);
|
if (lpEvent->PlayFunc != NULL) lpEvent->PlayFunc(lpEvent);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} while (++lpEvent != &EventMngSt[50]);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EasyEneAppear(int CtrlId) {
|
void ActiEventFunc(u_int EventNo, u_int Id) {
|
||||||
PARTS* lpParts = GetMapPartsInfoByCtrlId(2, CtrlId);
|
EVENT* lpEvent = &EventMngSt[EventNo];
|
||||||
int MdlMngIndex = GetMdlMngIndexByCtrlId(2, CtrlId);
|
|
||||||
MDLMNG* lpMdlMng = &MdlMng[MdlMngIndex + 161];
|
|
||||||
int EneNo, EneDataIndex;
|
|
||||||
EneNo = lpParts->MdlKindId;
|
|
||||||
|
|
||||||
|
|
||||||
EneDataIndex = GetMdlDataIndexFromMapMdlInfo(2, EneNo);
|
|
||||||
|
|
||||||
if ((lpParts->Pos != NULL) && (EneDataIndex != -1))
|
if (lpEvent->ActiFunc != NULL) lpEvent->ActiFunc(lpEvent, Id);
|
||||||
EneAppear(EneNo, EneDataIndex, lpMdlMng, lpParts->Pos, lpParts->Ang[1], lpParts->Scl, 1, 0xFFFF, 0,NULL, NULL);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int CheckSquareRange(float* Pos, float* Range) {
|
int CheckSquareRange(float* Pos, float* Range) {
|
||||||
@@ -99,61 +112,48 @@ int CheckSquareRange(float* Pos, float* Range) {
|
|||||||
else return 1;
|
else return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActiEventFunc(u_int EventNo, u_int Id) {
|
void EasyEneAppear(int CtrlId) {
|
||||||
EVENT* lpEvent = &EventMngSt[EventNo];
|
PARTS* lpParts = GetMapPartsInfoByCtrlId(2, CtrlId);
|
||||||
|
int MdlMngIndex = GetMdlMngIndexByCtrlId(2, CtrlId);
|
||||||
|
MDLMNG* lpMdlMng = &MdlMng[MdlMngIndex + 161];
|
||||||
|
int EneNo, EneDataIndex;
|
||||||
|
EneNo = lpParts->MdlKindId;
|
||||||
|
|
||||||
|
|
||||||
|
EneDataIndex = GetMdlDataIndexFromMapMdlInfo(2, EneNo);
|
||||||
|
|
||||||
if (lpEvent->ActiFunc != NULL) lpEvent->ActiFunc(lpEvent, Id);
|
if ((lpParts->Pos != NULL) && (EneDataIndex != -1))
|
||||||
}
|
EneAppear(EneNo, EneDataIndex, lpMdlMng, lpParts->Pos, lpParts->Ang[1], lpParts->Scl, 1, 0xFFFF, 0,NULL, NULL);
|
||||||
|
|
||||||
void PlayEventFunc(void) { // not line matched
|
|
||||||
EVENT* lpEvent;
|
|
||||||
|
|
||||||
if (GameSt.GameMode == 0) {
|
|
||||||
if (GameSt.Pause == 0) {
|
|
||||||
|
|
||||||
if (Menu_TD_IsPlay() != 0) return;
|
|
||||||
|
|
||||||
lpEvent = EventMngSt;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
if (lpEvent->PlayFunc != NULL) lpEvent->PlayFunc(lpEvent);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} while (++lpEvent != &EventMngSt[50]);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void InitEventFunc(void) { // not line matched
|
|
||||||
EVENT* lpEvent; // r16
|
|
||||||
|
|
||||||
lpEvent = EventMngSt;
|
|
||||||
do {
|
|
||||||
if (lpEvent->InitFunc != NULL) lpEvent->InitFunc(lpEvent);
|
|
||||||
} while (++lpEvent != &EventMngSt[50]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetEventFunc(void) {
|
void EasyEneAppearEx(int CtrlId, u_short AnimId, u_char bLogicFree) {
|
||||||
memset(EventMngSt, 0, sizeof(EventMngSt));
|
PARTS* lpParts = GetMapPartsInfoByCtrlId(2, CtrlId);
|
||||||
|
int MdlMngIndex = GetMdlMngIndexByCtrlId(2, CtrlId);
|
||||||
|
MDLMNG* lpMdlMng = &MdlMng[MdlMngIndex + 161];
|
||||||
|
int EneNo, EneDataIndex;
|
||||||
|
EneNo = lpParts->MdlKindId;
|
||||||
|
|
||||||
|
|
||||||
switch (GameSt.sceneNo) {
|
EneDataIndex = GetMdlDataIndexFromMapMdlInfo(2, EneNo);
|
||||||
case 1: SetEventFuncS0001(); break;
|
|
||||||
case 2: SetEventFuncS0002(); break;
|
if ((lpParts->Pos != NULL) && (EneDataIndex != -1))
|
||||||
case 6: SetEventFuncS0006(); break;
|
EneAppear(EneNo, EneDataIndex, lpMdlMng, lpParts->Pos, lpParts->Ang[1], lpParts->Scl, 1, AnimId, bLogicFree, NULL, NULL);
|
||||||
case 8: SetEventFuncS0008(); break;
|
|
||||||
case 9: SetEventFuncS0009(); break;
|
|
||||||
case 10: SetEventFuncS0010(); break;
|
}
|
||||||
case 31: SetEventFuncS0031(); break;
|
|
||||||
case 32: SetEventFuncS0032(); break;
|
void EventEneHitCheck(MDLMNG* lpEne) {
|
||||||
case 33: SetEventFuncS0033(); break;
|
|
||||||
case 34: SetEventFuncS0034(); break;
|
|
||||||
case 35: SetEventFuncS0035(); break;
|
|
||||||
case 40: SetEventFuncS0040(); break;
|
if (lpEne->GravOff == 0) lpEne->Pos[1] += 0.1f;
|
||||||
case 41: SetEventFuncS0041(); break;
|
|
||||||
case 51: SetEventFuncS0051(); break;
|
if (lpEne->MapHitOff == 0) lpEne->HitFlag = CheckHitMapGetMdlMng(lpEne, lpEne->lpHitMap);
|
||||||
case 83: SetEventFuncS0083(); break;
|
}
|
||||||
case 85: SetEventFuncS0085();
|
|
||||||
}
|
void SetEventModelDrawAndHit(MDLMNG* lpMdl, u_char OnOff) {
|
||||||
|
lpMdl->bErase = OnOff;
|
||||||
|
lpMdl->HitOff = OnOff;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user