1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-10 11:03:46 +00:00

DbCamera to DebugCamera (#1482)

* better dbCam prefix

* missed some

* PR Suggestions

* alignment

* more debug

* cleanup
This commit is contained in:
engineer124 2023-01-12 16:06:31 -05:00 committed by GitHub
parent 542012efa6
commit 1149530c92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1050 additions and 1076 deletions

View file

@ -761,8 +761,8 @@ u8 CollisionCheck_GetSwordDamage(s32 dmgFlags);
void SaveContext_Init(void);
s32 func_800635D0(s32);
void Regs_Init(void);
void DbCamera_ScreenText(u8 x, u8 y, const char* text);
void DbCamera_ScreenTextColored(u8 x, u8 y, u8 colorIndex, const char* text);
void DebugCamera_ScreenText(u8 x, u8 y, const char* text);
void DebugCamera_ScreenTextColored(u8 x, u8 y, u8 colorIndex, const char* text);
void Regs_UpdateEditor(Input* input);
void Debug_DrawText(GraphicsContext* gfxCtx);
void DebugDisplay_Init(void);
@ -1252,39 +1252,10 @@ u32 Letterbox_GetSize(void);
void Letterbox_Init(void);
void Letterbox_Destroy(void);
void Letterbox_Update(s32 updateRate);
// ? DbCamera_AddVecGeoToVec3f(?);
// ? DbCamera_CalcUpFromPitchYawRoll(?);
// ? DbCamera_SetTextValue(?);
// ? DbCamera_Vec3SToF(?);
// ? DbCamera_Vec3FToS(?);
// ? DbCamera_CopyVec3f(?);
// ? DbCamera_Vec3SToF2(?);
// ? func_800B3F94(?);
// ? func_800B3FF4(?);
// ? func_800B404C(?);
// ? func_800B4088(?);
// ? func_800B41DC(?);
// ? func_800B42C0(?);
// ? func_800B4370(?);
// ? func_800B44E0(?);
// ? DbCamera_PrintPoints(?);
// ? DbCamera_PrintF32Bytes(?);
// ? DbCamera_PrintU16Bytes(?);
// ? DbCamera_PrintS16Bytes(?);
// ? DbCamera_PrintCutBytes(?);
void DbCamera_Init(DbCamera* dbCamera, Camera* cameraPtr);
void DbgCamera_Enable(DbCamera* dbCamera, Camera* cam);
void DbCamera_Update(DbCamera* dbCamera, Camera* cam);
// ? DbCamera_GetFirstAvailableLetter(?);
// ? DbCamera_InitCut(?);
// ? DbCamera_ResetCut(?);
// ? DbCamera_CalcMempakAllocSize(?);
// ? DbCamera_GetMempakAllocSize(?);
// ? DbCamera_DrawSlotLetters(?);
// ? DbCamera_PrintAllCuts(?);
// ? func_800B91B0(?);
void DbCamera_Reset(Camera* cam, DbCamera* dbCam);
// ? DbCamera_UpdateDemoControl(?);
void DebugCamera_Init(DebugCam* debugCam, Camera* cameraPtr);
void DebugCamera_Enable(DebugCam* debugCam, Camera* cam);
void DebugCamera_Update(DebugCam* debugCam, Camera* cam);
void DebugCamera_Reset(Camera* cam, DebugCam* debugCam);
void func_800BB0A0(f32 u, Vec3f* pos, f32* roll, f32* viewAngle, f32* point0, f32* point1, f32* point2, f32* point3);
s32 func_800BB2B4(Vec3f* pos, f32* roll, f32* fov, CutsceneCameraPoint* point, s16* keyFrame, f32* curFrame);
void KaleidoManager_LoadOvl(KaleidoMgrOverlay* ovl);

View file

@ -91,7 +91,7 @@
#define R_CAM_YOFFSET_NORM OREG(46)
#define R_CAM_DATA(type) PREG(0 + (type))
#define R_CAM_PARALLEL_LOCKON_CALC_SLOPE_Y_ADJ PREG(76)
#define R_DBG_CAM_UPDATE PREG(80)
#define R_DEBUG_CAM_UPDATE PREG(80)
#define R_DBG_REG_UPDATE PREG(82)
#define R_RELOAD_CAM_PARAMS QREG(0)
#define R_SCENE_CAM_TYPE YREG(15)

View file

@ -55,7 +55,7 @@ extern EffectSsOverlay gEffectSsOverlayTable[EFFECT_SS_TYPE_MAX];
extern Gfx D_80116280[];
extern ActorOverlay gActorOverlayTable[ACTOR_ID_MAX]; // original name: "actor_dlftbls" 801162A0
extern s32 gMaxActorId; // original name: "MaxProfile"
extern s32 gDbgCamEnabled;
extern s32 gDebugCamEnabled;
extern GameStateOverlay gGameStateOverlayTable[6];
extern u8 gWeatherMode;
extern u8 gLightConfigAfterUnderwater;

View file

@ -1628,7 +1628,7 @@ typedef struct {
/* 0x1046 */ s16 demoCtrlActionIdx; // e (?), s (save), l (load), c (clear)
/* 0x1048 */ s16 demoCtrlToggleSwitch;
/* 0x104A */ Vec3s unk_104A;
} DbCameraSub; // size = 0x1050
} DebugCamSub; // size = 0x1050
typedef struct {
/* 0x00 */ s32 unk_00;
@ -1650,8 +1650,8 @@ typedef struct {
/* 0x6C */ Vec3f unk_6C;
/* 0x78 */ s16 unk_78;
/* 0x7A */ s16 unk_7A;
/* 0x7C */ DbCameraSub sub;
} DbCamera; // size = 0x10CC
/* 0x7C */ DebugCamSub sub;
} DebugCam; // size = 0x10CC
typedef struct {
/* 0x00 */ char letter;
@ -1661,7 +1661,7 @@ typedef struct {
/* 0x08 */ CutsceneCameraPoint* lookAt;
/* 0x0C */ s16 nFrames;
/* 0x0E */ s16 nPoints;
} DbCameraCut; // size = 0x10
} DebugCamCut; // size = 0x10
typedef struct {
/* 0x00 */ f32 curFrame;
@ -1673,17 +1673,17 @@ typedef struct {
/* 0x1C */ Vec3f lookAtPos;
/* 0x28 */ f32 roll;
/* 0x2C */ f32 fov;
} DbCameraAnim; // size = 0x30
} DebugCamAnim; // size = 0x30
typedef enum {
/* 0 */ DBCAMERA_TEXT_YELLOW,
/* 1 */ DBCAMERA_TEXT_PEACH,
/* 2 */ DBCAMERA_TEXT_BROWN,
/* 3 */ DBCAMERA_TEXT_ORANGE,
/* 4 */ DBCAMERA_TEXT_GOLD,
/* 5 */ DBCAMERA_TEXT_WHITE,
/* 6 */ DBCAMERA_TEXT_BLUE,
/* 7 */ DBCAMERA_TEXT_GREEN
} DbCameraTextColor;
/* 0 */ DEBUG_CAM_TEXT_YELLOW,
/* 1 */ DEBUG_CAM_TEXT_PEACH,
/* 2 */ DEBUG_CAM_TEXT_BROWN,
/* 3 */ DEBUG_CAM_TEXT_ORANGE,
/* 4 */ DEBUG_CAM_TEXT_GOLD,
/* 5 */ DEBUG_CAM_TEXT_WHITE,
/* 6 */ DEBUG_CAM_TEXT_BLUE,
/* 7 */ DEBUG_CAM_TEXT_GREEN
} DebugCamTextColor;
#endif

File diff suppressed because it is too large Load diff

View file

@ -4062,7 +4062,7 @@ s16 func_80034DD4(Actor* actor, PlayState* play, s16 arg2, f32 arg3) {
Player* player = GET_PLAYER(play);
f32 var;
if ((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) {
if ((play->csCtx.state != CS_STATE_IDLE) || gDebugCamEnabled) {
var = Math_Vec3f_DistXYZ(&actor->world.pos, &play->view.eye) * 0.25f;
} else {
var = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos);
@ -5736,7 +5736,7 @@ s32 Actor_TrackPlayerSetFocusHeight(PlayState* play, Actor* actor, Vec3s* headRo
actor->focus.pos = actor->world.pos;
actor->focus.pos.y += focusHeight;
if (!(((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) &&
if (!(((play->csCtx.state != CS_STATE_IDLE) || gDebugCamEnabled) &&
(gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0))) {
yaw = ABS((s16)(actor->yawTowardsPlayer - actor->shape.rot.y));
if (yaw >= 0x4300) {
@ -5745,7 +5745,7 @@ s32 Actor_TrackPlayerSetFocusHeight(PlayState* play, Actor* actor, Vec3s* headRo
}
}
if (((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) &&
if (((play->csCtx.state != CS_STATE_IDLE) || gDebugCamEnabled) &&
(gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0)) {
target = play->view.eye;
} else {
@ -5780,7 +5780,7 @@ s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* tors
actor->focus.pos = focusPos;
if (!(((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) &&
if (!(((play->csCtx.state != CS_STATE_IDLE) || gDebugCamEnabled) &&
(gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0))) {
yaw = ABS((s16)(actor->yawTowardsPlayer - actor->shape.rot.y));
if (yaw >= 0x4300) {
@ -5789,7 +5789,7 @@ s32 Actor_TrackPlayer(PlayState* play, Actor* actor, Vec3s* headRot, Vec3s* tors
}
}
if (((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) &&
if (((play->csCtx.state != CS_STATE_IDLE) || gDebugCamEnabled) &&
(gSaveContext.entranceIndex == ENTR_KOKIRI_FOREST_0)) {
target = play->view.eye;
} else {

View file

@ -7049,12 +7049,12 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, PlayState
R_CAM_DATA(i) = sCamDataRegsInit[i];
}
DbCamera_Reset(camera, &D_8015BD80);
DebugCamera_Reset(camera, &D_8015BD80);
sInitRegs = false;
PREG(88) = -1;
}
camera->play = D_8015BD7C = play;
DbCamera_Init(&D_8015BD80, camera);
DebugCamera_Init(&D_8015BD80, camera);
curUID = sNextUID;
sNextUID++;
while (curUID != 0) {
@ -7245,7 +7245,7 @@ void Camera_PrintSettings(Camera* camera) {
char sp48[8];
s32 i;
if ((OREG(0) & 1) && (camera->play->activeCamId == camera->camId) && !gDbgCamEnabled) {
if ((OREG(0) & 1) && (camera->play->activeCamId == camera->camId) && !gDebugCamEnabled) {
for (i = 0; i < NUM_CAMS; i++) {
if (camera->play->cameraPtrs[i] == NULL) {
sp58[i] = '-';
@ -7278,15 +7278,15 @@ void Camera_PrintSettings(Camera* camera) {
sp48[i] = '\0';
sp48[camera->play->activeCamId] = 'a';
DbCamera_ScreenTextColored(3, 22, DBCAMERA_TEXT_WHITE, sp58);
DbCamera_ScreenTextColored(3, 22, DBCAMERA_TEXT_PEACH, sp48);
DbCamera_ScreenTextColored(3, 23, DBCAMERA_TEXT_WHITE, "S:");
DbCamera_ScreenTextColored(5, 23, DBCAMERA_TEXT_GOLD, sCameraSettingNames[camera->setting]);
DbCamera_ScreenTextColored(3, 24, DBCAMERA_TEXT_WHITE, "M:");
DbCamera_ScreenTextColored(5, 24, DBCAMERA_TEXT_GOLD, sCameraModeNames[camera->mode]);
DbCamera_ScreenTextColored(3, 25, DBCAMERA_TEXT_WHITE, "F:");
DbCamera_ScreenTextColored(
5, 25, DBCAMERA_TEXT_GOLD,
DebugCamera_ScreenTextColored(3, 22, DEBUG_CAM_TEXT_WHITE, sp58);
DebugCamera_ScreenTextColored(3, 22, DEBUG_CAM_TEXT_PEACH, sp48);
DebugCamera_ScreenTextColored(3, 23, DEBUG_CAM_TEXT_WHITE, "S:");
DebugCamera_ScreenTextColored(5, 23, DEBUG_CAM_TEXT_GOLD, sCameraSettingNames[camera->setting]);
DebugCamera_ScreenTextColored(3, 24, DEBUG_CAM_TEXT_WHITE, "M:");
DebugCamera_ScreenTextColored(5, 24, DEBUG_CAM_TEXT_GOLD, sCameraModeNames[camera->mode]);
DebugCamera_ScreenTextColored(3, 25, DEBUG_CAM_TEXT_WHITE, "F:");
DebugCamera_ScreenTextColored(
5, 25, DEBUG_CAM_TEXT_GOLD,
sCameraFunctionNames[sCameraSettings[camera->setting].cameraModes[camera->mode].funcIdx]);
i = 0;
@ -7311,8 +7311,8 @@ void Camera_PrintSettings(Camera* camera) {
sp50[i++] = ' ';
sp50[i++] = ' ';
sp50[i] = '\0';
DbCamera_ScreenTextColored(3, 26, DBCAMERA_TEXT_WHITE, "I:");
DbCamera_ScreenTextColored(5, 26, DBCAMERA_TEXT_GOLD, sp50);
DebugCamera_ScreenTextColored(3, 26, DEBUG_CAM_TEXT_WHITE, "I:");
DebugCamera_ScreenTextColored(5, 26, DEBUG_CAM_TEXT_GOLD, sp50);
}
}
@ -7451,7 +7451,7 @@ s32 Camera_UpdateHotRoom(Camera* camera) {
s32 Camera_DbgChangeMode(Camera* camera) {
s32 changeDir = 0;
if (!gDbgCamEnabled && camera->play->activeCamId == CAM_ID_MAIN) {
if (!gDebugCamEnabled && camera->play->activeCamId == CAM_ID_MAIN) {
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CUP)) {
osSyncPrintf("attention sound URGENCY\n");
func_80078884(NA_SE_SY_ATTENTION_URGENCY);
@ -7581,12 +7581,12 @@ Vec3s Camera_Update(Camera* camera) {
player = camera->play->cameraPtrs[CAM_ID_MAIN]->player;
if (R_DBG_CAM_UPDATE) {
if (R_DEBUG_CAM_UPDATE) {
osSyncPrintf("camera: in %x\n", camera);
}
if (camera->status == CAM_STAT_CUT) {
if (R_DBG_CAM_UPDATE) {
if (R_DEBUG_CAM_UPDATE) {
osSyncPrintf("camera: cut out %x\n", camera);
}
return camera->inputDir;
@ -7661,7 +7661,7 @@ Vec3s Camera_Update(Camera* camera) {
Camera_DbgChangeMode(camera);
if (camera->status == CAM_STAT_WAIT) {
if (R_DBG_CAM_UPDATE) {
if (R_DEBUG_CAM_UPDATE) {
osSyncPrintf("camera: wait out %x\n", camera);
}
return camera->inputDir;
@ -7671,7 +7671,7 @@ Vec3s Camera_Update(Camera* camera) {
camera->stateFlags &= ~(CAM_STATE_10 | CAM_STATE_5);
camera->stateFlags |= CAM_STATE_4;
if (R_DBG_CAM_UPDATE) {
if (R_DEBUG_CAM_UPDATE) {
osSyncPrintf("camera: engine (%d %d %d) %04x \n", camera->setting, camera->mode,
sCameraSettings[camera->setting].cameraModes[camera->mode].funcIdx, camera->stateFlags);
}
@ -7702,11 +7702,11 @@ Vec3s Camera_Update(Camera* camera) {
}
}
if (R_DBG_CAM_UPDATE) {
if (R_DEBUG_CAM_UPDATE) {
osSyncPrintf("camera: shrink_and_bitem %x(%d)\n", sCameraInterfaceField, camera->play->transitionMode);
}
if (R_DBG_CAM_UPDATE) {
if (R_DEBUG_CAM_UPDATE) {
osSyncPrintf("camera: engine (%s(%d) %s(%d) %s(%d)) ok!\n", &sCameraSettingNames[camera->setting],
camera->setting, &sCameraModeNames[camera->mode], camera->mode,
&sCameraFunctionNames[sCameraSettings[camera->setting].cameraModes[camera->mode].funcIdx],
@ -7715,20 +7715,20 @@ Vec3s Camera_Update(Camera* camera) {
// enable/disable debug cam
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_START)) {
gDbgCamEnabled ^= 1;
if (gDbgCamEnabled) {
DbgCamera_Enable(&D_8015BD80, camera);
gDebugCamEnabled ^= 1;
if (gDebugCamEnabled) {
DebugCamera_Enable(&D_8015BD80, camera);
} else if (camera->play->csCtx.state != CS_STATE_IDLE) {
Cutscene_StopManual(camera->play, &camera->play->csCtx);
}
}
// Debug cam update
if (gDbgCamEnabled) {
if (gDebugCamEnabled) {
camera->play->view.fovy = D_8015BD80.fov;
DbCamera_Update(&D_8015BD80, camera);
DebugCamera_Update(&D_8015BD80, camera);
View_LookAt(&camera->play->view, &D_8015BD80.eye, &D_8015BD80.at, &D_8015BD80.unk_1C);
if (R_DBG_CAM_UPDATE) {
if (R_DEBUG_CAM_UPDATE) {
osSyncPrintf("camera: debug out\n");
}
return D_8015BD80.sub.unk_104A;
@ -7804,7 +7804,7 @@ Vec3s Camera_Update(Camera* camera) {
camera->timer = 0;
}
if (R_DBG_CAM_UPDATE) {
if (R_DEBUG_CAM_UPDATE) {
osSyncPrintf("camera: out (%f %f %f) (%f %f %f)\n", camera->at.x, camera->at.y, camera->at.z, camera->eye.x,
camera->eye.y, camera->eye.z);
osSyncPrintf("camera: dir (%f %d(%f) %d(%f)) (%f)\n", eyeAtAngle.r, eyeAtAngle.pitch,
@ -8105,7 +8105,7 @@ s32 Camera_ChangeBgCamIndex(Camera* camera, s32 bgCamIndex) {
}
Vec3s* Camera_GetInputDir(Vec3s* dst, Camera* camera) {
if (gDbgCamEnabled) {
if (gDebugCamEnabled) {
*dst = D_8015BD80.sub.unk_104A;
return dst;
} else {
@ -8129,7 +8129,7 @@ s16 Camera_GetInputDirYaw(Camera* camera) {
}
Vec3s* Camera_GetCamDir(Vec3s* dst, Camera* camera) {
if (gDbgCamEnabled) {
if (gDebugCamEnabled) {
*dst = D_8015BD80.sub.unk_104A;
return dst;
} else {
@ -8331,8 +8331,8 @@ s32 Camera_Copy(Camera* dstCamera, Camera* srcCamera) {
return true;
}
s32 Camera_GetDbgCamEnabled(void) {
return gDbgCamEnabled;
s32 Camera_IsDebugCamEnabled(void) {
return gDebugCamEnabled;
}
Vec3f* Camera_GetQuakeOffset(Vec3f* quakeOffset, Camera* camera) {

View file

@ -2555,7 +2555,7 @@ s32 (*sCameraFunctions[])(Camera*) = {
s32 sInitRegs = 1;
s32 gDbgCamEnabled = 0;
s32 gDebugCamEnabled = false;
s32 sDbgModeIdx = -1;
s16 sNextUID = 0;
@ -3034,5 +3034,5 @@ s16 D_8011DAFC[] = {
};
PlayState* D_8015BD7C;
DbCamera D_8015BD80;
DebugCam D_8015BD80;
CollisionPoly* playerFloorPoly;

View file

@ -1,32 +1,32 @@
#include "global.h"
typedef struct {
u8 x;
u8 y;
u8 colorIndex;
char text[21];
} DbCameraTextBufferEntry; // size = 0x18
/* 0x0 */ u8 x;
/* 0x1 */ u8 y;
/* 0x2 */ u8 colorIndex;
/* 0x3 */ char text[21];
} DebugCamTextBufferEntry; // size = 0x18
typedef struct {
u16 hold;
u16 press;
/* 0x0 */ u16 hold;
/* 0x2 */ u16 press;
} InputCombo; // size = 0x4
RegEditor* gRegEditor;
DbCameraTextBufferEntry sDbCameraTextBuffer[22];
DebugCamTextBufferEntry sDebugCamTextBuffer[22];
s16 sDbCameraTextEntryCount = 0;
s16 sDebugCamTextEntryCount = 0;
Color_RGBA8 sDbCameraTextColors[] = {
{ 255, 255, 32, 192 }, // DBCAMERA_TEXT_YELLOW
{ 255, 150, 128, 192 }, // DBCAMERA_TEXT_PEACH
{ 128, 96, 0, 64 }, // DBCAMERA_TEXT_BROWN
{ 192, 128, 16, 128 }, // DBCAMERA_TEXT_ORANGE
{ 255, 192, 32, 128 }, // DBCAMERA_TEXT_GOLD
{ 230, 230, 220, 64 }, // DBCAMERA_TEXT_WHITE
{ 128, 150, 255, 128 }, // DBCAMERA_TEXT_BLUE
{ 128, 255, 32, 128 }, // DBCAMERA_TEXT_GREEN
Color_RGBA8 sDebugCamTextColors[] = {
{ 255, 255, 32, 192 }, // DEBUG_CAM_TEXT_YELLOW
{ 255, 150, 128, 192 }, // DEBUG_CAM_TEXT_PEACH
{ 128, 96, 0, 64 }, // DEBUG_CAM_TEXT_BROWN
{ 192, 128, 16, 128 }, // DEBUG_CAM_TEXT_ORANGE
{ 255, 192, 32, 128 }, // DEBUG_CAM_TEXT_GOLD
{ 230, 230, 220, 64 }, // DEBUG_CAM_TEXT_WHITE
{ 128, 150, 255, 128 }, // DEBUG_CAM_TEXT_BLUE
{ 128, 255, 32, 128 }, // DEBUG_CAM_TEXT_GREEN
};
InputCombo sRegGroupInputCombos[REG_GROUPS] = {
@ -108,16 +108,16 @@ void Regs_Init(void) {
}
}
// Function is stubbed. Name is assumed by similarities in signature to `DbCamera_ScreenTextColored` and usage.
void DbCamera_ScreenText(u8 x, u8 y, const char* text) {
// Function is stubbed. Name is assumed by similarities in signature to `DebugCamera_ScreenTextColored` and usage.
void DebugCamera_ScreenText(u8 x, u8 y, const char* text) {
}
void DbCamera_ScreenTextColored(u8 x, u8 y, u8 colorIndex, const char* text) {
DbCameraTextBufferEntry* entry = &sDbCameraTextBuffer[sDbCameraTextEntryCount];
void DebugCamera_ScreenTextColored(u8 x, u8 y, u8 colorIndex, const char* text) {
DebugCamTextBufferEntry* entry = &sDebugCamTextBuffer[sDebugCamTextEntryCount];
char* textDest;
s16 charCount;
if (sDbCameraTextEntryCount < ARRAY_COUNT(sDbCameraTextBuffer)) {
if (sDebugCamTextEntryCount < ARRAY_COUNT(sDebugCamTextBuffer)) {
entry->x = x;
entry->y = y;
entry->colorIndex = colorIndex;
@ -134,18 +134,18 @@ void DbCamera_ScreenTextColored(u8 x, u8 y, u8 colorIndex, const char* text) {
*textDest = '\0';
sDbCameraTextEntryCount++;
sDebugCamTextEntryCount++;
}
}
void DbCamera_DrawScreenText(GfxPrint* printer) {
void DebugCamera_DrawScreenText(GfxPrint* printer) {
s32 i;
Color_RGBA8* color;
DbCameraTextBufferEntry* entry;
DebugCamTextBufferEntry* entry;
for (i = 0; i < sDbCameraTextEntryCount; i++) {
entry = &sDbCameraTextBuffer[i];
color = &sDbCameraTextColors[entry->colorIndex];
for (i = 0; i < sDebugCamTextEntryCount; i++) {
entry = &sDebugCamTextBuffer[i];
color = &sDebugCamTextColors[entry->colorIndex];
GfxPrint_SetColor(printer, color->r, color->g, color->b, color->a);
GfxPrint_SetPos(printer, entry->x, entry->y);
@ -288,14 +288,14 @@ void Debug_DrawText(GraphicsContext* gfxCtx) {
GfxPrint_Open(&printer, gfx);
if ((OREG(0) == 1) || (OREG(0) == 8)) {
DbCamera_DrawScreenText(&printer);
DebugCamera_DrawScreenText(&printer);
}
if (gRegEditor->regPage != 0) {
Regs_DrawEditor(&printer);
}
sDbCameraTextEntryCount = 0;
sDebugCamTextEntryCount = 0;
gfx = GfxPrint_Close(&printer);
gSPEndDisplayList(gfx++);

View file

@ -182,7 +182,7 @@ void Cutscene_UpdateScripted(PlayState* play, CutsceneContext* csCtx) {
}
if (CHECK_BTN_ALL(input->press.button, BTN_DUP) && (csCtx->state == CS_STATE_IDLE) && IS_CUTSCENE_LAYER &&
!gDbgCamEnabled) {
!gDebugCamEnabled) {
gUseCutsceneCam = true;
gSaveContext.cutsceneIndex = 0xFFFD;
gSaveContext.cutsceneTrigger = 1;

View file

@ -988,7 +988,7 @@ void Play_Update(PlayState* this) {
skip:
PLAY_LOG(3801);
if ((sp80 == 0) || gDbgCamEnabled) {
if ((sp80 == 0) || gDebugCamEnabled) {
s32 pad3[5];
s32 i;

View file

@ -155,7 +155,7 @@ void func_80A58DD4(EnHoll* this, PlayState* play) {
// Horizontal Planes
void func_80A59014(EnHoll* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 useViewEye = gDbgCamEnabled || play->csCtx.state != CS_STATE_IDLE;
s32 useViewEye = gDebugCamEnabled || play->csCtx.state != CS_STATE_IDLE;
Vec3f vec;
s32 temp;
f32 planeHalfWidth;

View file

@ -957,7 +957,7 @@ s32 EnKo_AdultSaved(EnKo* this, PlayState* play) {
void func_80A9877C(EnKo* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((play->csCtx.state != 0) || (gDbgCamEnabled != 0)) {
if ((play->csCtx.state != 0) || gDebugCamEnabled) {
this->interactInfo.trackPos = play->view.eye;
this->interactInfo.yOffset = 40.0f;
if (ENKO_TYPE != ENKO_TYPE_CHILD_0) {
@ -1097,7 +1097,7 @@ void func_80A98DB4(EnKo* this, PlayState* play) {
this->modelAlpha = 255.0f;
return;
}
if (play->csCtx.state != 0 || gDbgCamEnabled != 0) {
if ((play->csCtx.state != CS_STATE_IDLE) || gDebugCamEnabled) {
dist = Math_Vec3f_DistXYZ(&this->actor.world.pos, &play->view.eye) * 0.25f;
} else {
dist = this->actor.xzDistToPlayer;

View file

@ -568,7 +568,7 @@ void func_80AAB158(EnMd* this, PlayState* play) {
temp2 = 1;
}
if ((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) {
if ((play->csCtx.state != CS_STATE_IDLE) || gDebugCamEnabled) {
this->interactInfo.trackPos = play->view.eye;
this->interactInfo.yOffset = 40.0f;
trackingMode = NPC_TRACKING_HEAD_AND_TORSO;

View file

@ -13195,7 +13195,7 @@ s32 func_8084FCAC(Player* this, PlayState* play) {
speed = 20.0f;
}
DbCamera_ScreenText(3, 2, "DEBUG MODE");
DebugCamera_ScreenText(3, 2, "DEBUG MODE");
if (!CHECK_BTN_ALL(sControlInput->cur.button, BTN_L)) {
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) {