Open emoose opened 2 years ago
Same thing for PC 1.1.0 EXE, for comparison:
void __cdecl Flags_DEBUG_UnsetBit(DEBUG_FLAG a1)
*((_DWORD *)&pG->flags_DEBUG_0_60 + (a1 >> 5)) &= ~(0x80000000 >> (a1 & 0x1F));
DWORD __cdecl Flags_DEBUG_CheckBit(DEBUG_FLAG a1)
return *(&pG->flags_DEBUG_0_60 + (a1 >> 5)) & (0x80000000 >> (a1 & 0x1F));
void __cdecl em10_R0_Init(cEm10 *a1)
if ( (pG->flags_DEBUG_3_6C & DBG_NO_PARASITE) != 0 )
void __thiscall cEm25::move(int this)
if ( (pG->flags_DEBUG_2_68 & DBG_EM_NO_DEATH) == 0 && *(float *)(this + 0x790) > 0.0 )
int CameraMove()
if ( (pG->flags_STATUS_0_501C & 0x100) != 0 && (pG->flags_DEBUG_0_60 & DBG_DBG_CAM) == 0 )
char __thiscall cLog::vmes(_BYTE *this, char a2, char a3, char *Format, va_list ArgList)
if ( (pG->flags_DEBUG_3_6C & DBG_LOG_OFF) == 0 )
GLOBAL_WK *__stdcall cLog::verr(char a1, int a2, char *Format, va_list ArgList)
if ( (pG->flags_DEBUG_3_6C & DBG_LOG_OFF) == 0 )
GLOBAL_WK *__stdcall cLog::vwarn(char a1, int a2, char *Format, va_list ArgList)
if ( (pG->flags_DEBUG_3_6C & DBG_LOG_OFF) == 0 )
GLOBAL_WK *cLog::verr_0(int a1, char a2, int a3, char *Format, ...)
if ( (pG->flags_DEBUG_3_6C & DBG_LOG_OFF) == 0 )
GLOBAL_WK *cLog::vwarn_0(int a1, char a2, int a3, char *Format, ...)
if ( (pG->flags_DEBUG_3_6C & DBG_LOG_OFF) == 0 )
void __cdecl Flags_DEBUG_SetBit(DEBUG_FLAG a1)
*((_DWORD *)&pG->flags_DEBUG_0_60 + (a1 >> 5)) |= 0x80000000 >> (a1 & 0x1F);
char __cdecl move(int a1)
pG->flags_DEBUG_0_60 &= ~DBG_TEST_MODE;
pG->flags_DEBUG_0_60 &= ~DBG_TEST_MODE;
pG->flags_DEBUG_0_60 &= ~DBG_TEST_MODE;
char *DbMenuExec()
pG->flags_DEBUG_0_60 |= DBG_TEST_MODE;
GLOBAL_WK *DbMenuExitAfterCheck_unused()
if ( (pG->flags_DEBUG_2_68 & DBG_TEST_MODE_CK) != 0 )
if ( (pG->flags_DEBUG_0_60 & DBG_TEST_MODE) == 0 )
pG->flags_DEBUG_2_68 &= ~DBG_TEST_MODE_CK;
if ( (pG->flags_DEBUG_0_60 & DBG_TEST_MODE) != 0 )
pG->flags_DEBUG_2_68 |= DBG_TEST_MODE_CK;
int __cdecl efmRegist(int a1, int a2, int a3, int a4, unsigned __int8 a5)
if ( (pG->flags_DEBUG_3_6C & DBG_EFF_NUM_DISP) != 0 )
int __cdecl RoomEfmRegist(int a1, unsigned __int8 a2)
if ( (pG->flags_DEBUG_3_6C & DBG_EFF_NUM_DISP) != 0 )
int __cdecl RoomEfmRegist_0(int a1, int a2, unsigned __int8 a3)
if ( (pG->flags_DEBUG_3_6C & DBG_EFF_NUM_DISP) != 0 )
int EspTrans()
else if ( (pG->flags_DEBUG_0_60 & DBG_TEST_MODE) == 0 )
void __thiscall Event::ExeBeginEvt(_DWORD *this, int a2, int a3)
pG->flags_DEBUG_3_6C &= ~DBG_FOG_FAR_GREEN;
void __thiscall Event::ExeEndEvt(Event *this, Event *a2, int a3)
pG->flags_DEBUG_3_6C |= DBG_FOG_FAR_GREEN;
GLOBAL_WK *gameDoordemo()
if ( (pG->flags_DEBUG_2_68 & DBG_ROOMJMP) == 0 )
if ( (pG->flags_DEBUG_2_68 & DBG_ROOMJMP) == 0 && (pG->Flags_SYSTEM_0_54 & 0x80000) == 0 )
GLOBAL_WK *gameRoomMemInit()
pG->flags_DEBUG_0_60 = 0;
pG->flags_DEBUG_1_64 = 0;
if ( (pG->flags_DEBUG_3_6C & DBG_DOOR_SET_MODE) != 0 )
pG->flags_DEBUG_0_60 |= DBG_TEST_MODE;
void __usercall gameRoomInit(int a1@<esi>)
pG->flags_DEBUG_2_68 |= DBG_NO_DEATH;
pG->flags_DEBUG_3_6C |= DBG_INF_BULLET2;
pG->flags_DEBUG_3_6C |= DBG_LOG_OFF;
pG->flags_DEBUG_3_6C |= DBG_NO_DEATH2;
pG->flags_DEBUG_3_6C |= DBG_INF_BULLET2;
pG->flags_DEBUG_2_68 |= DBG_BGM_STOP;
pG->flags_DEBUG_3_6C |= DBG_NO_PARASITE;
pG->flags_DEBUG_3_6C &= ~DBG_FOG_FAR_GREEN;
pG->flags_DEBUG_2_68 &= ~DBG_ROOMJMP;
GLOBAL_WK *gameMainLoop()
result->flags_DEBUG_3_6C &= ~DBG_FOG_FAR_GREEN;
GLOBAL_WK *systemRestartInit()
pG->flags_DEBUG_3_6C |= DBG_FOG_FAR_GREEN;
int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
pG->flags_DEBUG_3_6C &= ~DBG_FOG_FAR_GREEN;
j_bzero(&pG->flags_DEBUG_0_60, DBG_LIGHT_TOOL);
if ( (pG->flags_DEBUG_0_60 & DBG_CINESCO_OFF) == 0 )
unsigned __int8 __thiscall Render_done(void *this)
if ( (pG->flags_DEBUG_2_68 & DBG_SLOW_MODE) != 0 )
char __cdecl PlWepLockCtrl(cPlayer *a1)
if ( (pG->flags_DEBUG_2_68 & DBG_PL_LOCK_FOLLOW) != 0 && byte_C66BA4 )
GLOBAL_WK *__cdecl roomJumpExec(_BYTE *a1)
pG->flags_DEBUG_2_68 |= DBG_ROOMJMP;
void __cdecl __noreturn roomJumpExit(int a1)
pG->flags_DEBUG_0_60 &= ~DBG_TEST_MODE;
void __cdecl __noreturn roomJumpExit2(int a1)
pG->flags_DEBUG_0_60 &= ~DBG_TEST_MODE;
GLOBAL_WK *__thiscall SceAtCheck(void *this)
if ( (pG->flags_DEBUG_2_68 & DBG_NO_SCE_EXE) != 0 )
__int16 ScenarioRoomInit()
if ( (pG->flags_DEBUG_2_68 & DBG_NO_SCE_EXE) == 0 )
void __stdcall ScenarioMove()
if ( (pG->flags_DEBUG_2_68 & DBG_NO_SCE_EXE) == 0 )
cObj *__cdecl SmdGetObjPtr(unsigned int a1)
Flags_DEBUG_0 flags_DEBUG_0_60; // eax
flags_DEBUG_0_60 = pG->flags_DEBUG_0_60;
if ( (flags_DEBUG_0_60 & DBG_TEST_MODE) != 0 && (flags_DEBUG_0_60 & 0x2000000) == 0 )
v5 = pG->flags_DEBUG_0_60;
if ( (v5 & DBG_TEST_MODE) == 0 || (v5 & 0x2000000) != 0 )
__int16 __cdecl readEmList(__int16 a1)
&& ((v1->flags_DEBUG_2_68 & DBG_ROOMJMP) == 0 || v4 == v3) )
__int16 StageSet()
if ( (pG->flags_DEBUG_3_6C & DBG_DOOR_SET_MODE) == 0 )
if ( (pG->flags_DEBUG_3_6C & DBG_DOOR_SET_MODE) == 0 )
void __usercall FlagEdit_init(_DWORD *a1@<eax>)
pG->flags_DEBUG_0_60 |= DBG_TEST_MODE;
void __noreturn FlagEdit_die()
pG->flags_DEBUG_0_60 &= ~DBG_TEST_MODE;
void __noreturn FlagEdit()
pG->flags_DEBUG_0_60 |= DBG_TEST_MODE;
int R518Init()
pG->flags_DEBUG_1_64 |= DBG_WARN_LEVEL_LOW;
int R519Init()
pG->flags_DEBUG_1_64 |= DBG_WARN_LEVEL_LOW;
void R320Init()
pG->flags_DEBUG_1_64 |= DBG_WARN_LEVEL_LOW;
char R321Init()
pG->flags_DEBUG_1_64 |= DBG_WARN_LEVEL_LOW;
GLOBAL_WK *__thiscall j_j_cLog::err(_BYTE *this, const char *a2, int a3)
if ( (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
char __thiscall cEmWrap::setEm(__int16 *this, unsigned int a2, int a3, char a4, char a5, char a6)
if ( a4 == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
char __thiscall cEmWrap::setPtr_0(__int16 *this, int a2, char a3)
if ( a3 == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
int __thiscall cEmWrap::destroy(int *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setTrans(__int16 *this, char a2)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
bool __thiscall cEmWrap::isTrans(__int16 *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setMove(__int16 *this, char a2)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
bool __thiscall cEmWrap::isMove(__int16 *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setBeFlag(__int16 *this, int a2, char a3)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
bool __thiscall cEmWrap::isBeFlag(__int16 *this, int a2)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
bool __thiscall cEmWrap::isDamage(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
_BYTE *__thiscall cEmWrap::setNoSuspend(_BYTE *this, unsigned __int8 a2)
if ( result[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
bool __thiscall cEmWrap::isNoSuspend(__int16 *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setRno(__int16 *this, char a2, char a3, char a4, char a5)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
char __thiscall cEmWrap::ckRno01(__int16 *this, char a2, char a3)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setHp(__int16 *this, __int16 a2)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
__int16 __thiscall cEmWrap::getHp(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
__int16 __thiscall cEmWrap::getHpMax(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
char __thiscall cEmWrap::getType(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
char __thiscall cEmWrap::Character(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setCharacter(__int16 *this, char a2)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
double __thiscall cEmWrap::Guard_r(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setGuard_r(__int16 *this, float a2)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
bool __thiscall cEmWrap::checkStatus(_BYTE *this, char a2)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setPos(_BYTE *this, Vec *a2)
else if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setAng(_BYTE *this, Vec *a2)
else if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setSca(int **this, Vec *a2)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setFlag(__int16 *this, int a2)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
bool __thiscall cEmWrap::setFlag_0(_BYTE *this, int a2)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
float *__thiscall cEmWrap::getPos(__int16 *this, float *a2)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
double __thiscall cEmWrap::getPosX(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
double __thiscall cEmWrap::getPosY(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
double __thiscall cEmWrap::getPosZ(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
float *__thiscall cEmWrap::getAng(__int16 *this, float *a2)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
double __thiscall cEmWrap::getAngX(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
double __thiscall cEmWrap::getAngY(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
double __thiscall cEmWrap::getAngZ(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::motionSet(
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
_BYTE *__thiscall cEmWrap::motionMove(_BYTE *this)
if ( result[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
cModel *__thiscall cEmWrap::motionPause(cModel *this)
if ( LOBYTE(result->nextUnit_8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
_BYTE *__thiscall cEmWrap::addModel(_BYTE *this, int32_t a2)
if ( result[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setParent(_DWORD *this, cModel *a2, Vec *a3, Vec *a4)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
_DWORD *__thiscall cEmWrap::setParent_unused(_DWORD *this, int a2, int a3, _DWORD *a4, _DWORD *a5)
if ( *((_BYTE *)result + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::beginEvent(__int16 *this)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::endEvent(__int16 *this)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::matCalc(__int16 *this)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setGotoSwitch(_DWORD *this, int a2, int a3, Vec *a4)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setGoto(_DWORD *this, Vec *a2, int a3)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
int __thiscall cEmWrap::ckGoto(_DWORD *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
int __thiscall cEmWrap::ckResetEnable(_DWORD *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setReset_0(_DWORD *this)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setReset(__int16 *this, Vec *a2, Vec *a3)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
int __thiscall cEmWrap::ckFindPL(int *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::setFindPL(_DWORD *this)
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
else if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
double __thiscall cEmWrap::get_l_pl(__int16 *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __thiscall cEmWrap::clearFindPL(_BYTE *this)
if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
else if ( this[8] == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
int __thiscall cEmWrap::ckBowgunFire(_DWORD *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
int __thiscall cEmWrap::ckParasite(_DWORD *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
void __cdecl EmSetSub(int a1, unsigned int a2, int a3, int a4)
else if ( (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
char __thiscall cEmWrap::setPtr(__int16 *this, int a2, int a3, char a4)
if ( v5 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
int __thiscall cEmWrap::getPtr(__int16 *this)
if ( *((_BYTE *)this + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
int __cdecl EmFarDelete(int a1, int a2, int a3, int *a4)
else if ( *((_BYTE *)v4 + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
else if ( *((_BYTE *)v4 + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
else if ( *((_BYTE *)v4 + 8) == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
int __cdecl setEm(unsigned int a1, int a2, char a3, char a4, char a5)
if ( v8 == 1 && (pG->flags_DEBUG_1_64 & DBG_UNK_46) == 0 )
char __cdecl SndStrReq_0(int a1, int a2, __int16 a3, int a4)
if ( (pG->flags_DEBUG_2_68 & DBG_BGM_STOP) != 0 )
void __stdcall SndAllStopMovie()
if ( LOBYTE(v0[i + 0xC]) && (pG->flags_DEBUG_2_68 & DBG_BGM_STOP) == 0 )
char __cdecl SndStrReq_2(int a1, __int16 a2, int a3)
if ( (pG->flags_DEBUG_2_68 & DBG_BGM_STOP) != 0 )
GLOBAL_WK *SndAllStop()
if ( (pG->flags_DEBUG_2_68 & DBG_BGM_STOP) == 0 )
void __cdecl SndEventStrStop(int a1)
if ( (pG->flags_DEBUG_2_68 & DBG_BGM_STOP) != 0 )
void R348Init()
pG->flags_DEBUG_1_64 |= DBG_WARN_LEVEL_LOW;
char R349Init()
pG->flags_DEBUG_1_64 |= DBG_WARN_LEVEL_LOW;
Wrote a quick script to extract debug flag uses from the GC debug build, will probably come in handy for reimplementing them. This doesn't include any uses inside .REL files (yet?), so there's probably a lot missing from here, these should be the most important though.