summaryrefslogtreecommitdiff
path: root/src/code/z_debug.c
diff options
context:
space:
mode:
authorengineer124 <47598039+engineer124@users.noreply.github.com>2023-01-12 16:06:31 -0500
committerGitHub <noreply@github.com>2023-01-12 16:06:31 -0500
commit1149530c92419eb808861496671f1dfaf85e00fb (patch)
treeea1d5c6473b6f9276336a94e67c7da7bbf7db093 /src/code/z_debug.c
parent542012efa68d110d6b631f9d149f6e5f4e68cc8e (diff)
DbCamera to DebugCamera (#1482)
* better dbCam prefix * missed some * PR Suggestions * alignment * more debug * cleanup
Diffstat (limited to 'src/code/z_debug.c')
-rw-r--r--src/code/z_debug.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/code/z_debug.c b/src/code/z_debug.c
index 63f2eb432..bc46c5a72 100644
--- a/src/code/z_debug.c
+++ b/src/code/z_debug.c
@@ -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++);