diff --git a/src/aicommands.def b/src/aicommands.def index 45e38b0b..6c53cda5 100644 --- a/src/aicommands.def +++ b/src/aicommands.def @@ -10051,6 +10051,11 @@ _AI_CMD( _AI_CMD( { +#ifdef PORT + if (getenv("GE_D160")) + osSyncPrintf("D160: AI EndLevel/exit_level cmd chr=%p cameraBufferToggle=%d\n", + (void *)ChrEntityp, (int)cameraBufferToggle); +#endif if (cameraBufferToggle) { if (cameraFrameCounter2 == FALSE) @@ -10172,6 +10177,10 @@ _AI_CMD( g_CameraLookAtBondPad = (PadRecord *) &g_CurrentSetup.boundpads[getBoundPadNum(padnum)]; } set_camera_mode(CAMERAMODE_POSEND); +#ifdef PORT + if (getenv("GE_D160")) + osSyncPrintf("D160: AI CameraLookAtBondFromPad -> POSEND\n"); +#endif Offset += CAT(CAT(AI_, CMDNAME), _LENGTH); break; }) @@ -10223,8 +10232,21 @@ _AI_CMD( dword_CODE_bss_80079A18 = CharArrayTo16(ai->val,1); dword_CODE_bss_80079A1C = CharArrayTo16(ai->val,3); set_camera_mode(CAMERAMODE_POSEND); +#ifdef PORT + if (getenv("GE_D160")) + osSyncPrintf("D160: AI CameraSwitch tag=%d cdef=%p -> POSEND\n", + (int)ai->val[0], (void *)cdef); +#endif } +#ifdef PORT + else if (getenv("GE_D160")) + osSyncPrintf("D160: AI CameraSwitch tag=%d TagIndex<0 (no cutscene)\n", (int)ai->val[0]); +#endif } +#ifdef PORT + else if (getenv("GE_D160")) + osSyncPrintf("D160: AI CameraSwitch tag=%d NOT FOUND\n", (int)ai->val[0]); +#endif Offset += CAT(CAT(AI_, CMDNAME), _LENGTH); break; }) diff --git a/src/boss.c b/src/boss.c index cb249044..3412c57b 100644 --- a/src/boss.c +++ b/src/boss.c @@ -741,6 +741,11 @@ void bossReturnTitleStage(void) { objectivestatusDisableStatusDisplay(); #endif #ifdef PORT + if (getenv("GE_D160")) { + osSyncPrintf("D160: bossReturnTitleStage ENTER stage=%d allComplete=%d caller=%p\n", + (int)bossGetStageNum(), (int)objectiveIsAllComplete(), + __builtin_return_address(0)); + } if (getenv("GE_SAVELOG")) { extern int g_savelogObjOnce; g_savelogObjOnce = 1; diff --git a/src/game/bondview2.c b/src/game/bondview2.c index 412d757f..0e45f537 100644 --- a/src/game/bondview2.c +++ b/src/game/bondview2.c @@ -787,6 +787,14 @@ void bondviewSetCameraMode(s32 arg0) g_CameraMode = arg0; g_CameraAfterCinema = 0; +#ifdef PORT + if (getenv("GE_D160")) { + osSyncPrintf("D160: bondviewSetCameraMode(%d) stage=%d IntroSwirl=%d introAnimIdx=%d caller=%p\n", + (int)arg0, (int)bossGetStageNum(), (int)g_IntroSwirl, + (int)g_IntroAnimationIndex, __builtin_return_address(0)); + } +#endif + if (g_CameraMode == CAMERAMODE_INTRO) { if ((ptr_random06cam_entry != NULL) && (get_recording_ramrom_flag() == 0) && (get_is_ramrom_flag() == 0)) diff --git a/src/game/chrai.c b/src/game/chrai.c index ee198605..d0334c96 100644 --- a/src/game/chrai.c +++ b/src/game/chrai.c @@ -33,6 +33,9 @@ #include #include #include +#ifdef PORT +#include +#endif // hack? used to match as called with 2 args, but decompiled code takes 1 extern s32 objectiveGetStatus_WEAK(s32 objectiveNum, s32);