rename CUSTOM_DEBUG, add comments (#275)

This commit is contained in:
Reonu
2021-12-30 15:35:37 +00:00
committed by GitHub
parent fde55ad6ef
commit c228f8583f
6 changed files with 12 additions and 28 deletions

View File

@@ -4,7 +4,7 @@
* DEBUG SETTINGS *
******************/
// Enables most debug options
// Enables most debug options, including PUPPYPRINT_DEBUG.
// #define DEBUG_ALL
// Disables all debug options (except PUPPYPRINT)
@@ -22,11 +22,15 @@
// Enable debug free move (DPad up to enter, A to exit).
#define ENABLE_DEBUG_FREE_MOVE
// Include a custom, enhanced performance profiler (Enables PUPPYPRINT by default in config_safeguards).
// Include a custom, enhanced performance profiler. (Enables PUPPYPRINT by default in config_safeguards).
// #define PUPPYPRINT_DEBUG 1
// Use cycles instead of microseconds in Puppyprint debug output.
//#define PUPPYPRINT_DEBUG_CYCLES
// #define PUPPYPRINT_DEBUG_CYCLES
// A vanilla style debug mode. It doesn't rely on a text engine, but it's much less powerful that PUPPYPRINT_DEBUG.
// Press DPAD left to show the debug UI.
// #define VANILLA_STYLE_CUSTOM_DEBUG
// Visual debug enables some collision visuals. Tapping Right on the dpad will cycle between visual hitboxes, visual surfaces, both, and neither.
// If puppyprint is enabled, then this can be cycled only while the screen is active.
@@ -39,9 +43,6 @@
// This will not overwrite existing save file data unless you save over it.
// #define COMPLETE_SAVE_FILE
// Custom debug mode. Press DPAD left to show the debug UI. Press DPAD right to enter the noclip mode.
// #define CUSTOM_DEBUG
// Removes the limit on FPS
// #define UNLOCK_FPS

View File

@@ -72,7 +72,7 @@
#undef DEBUG_LEVEL_SELECT
#undef ENABLE_DEBUG_FREE_MOVE
#undef VANILLA_DEBUG
#undef CUSTOM_DEBUG
#undef VANILLA_STYLE_CUSTOM_DEBUG
#undef PUPPYPRINT_DEBUG
#undef PUPPYPRINT_DEBUG_CYCLES
#undef VISUAL_DEBUG

View File

@@ -45,7 +45,7 @@ OSContPad gControllerPads[4];
u8 gControllerBits;
u8 gIsConsole = TRUE; // Needs to be initialized before audio_reset_session is called
u8 gBorderHeight;
#ifdef CUSTOM_DEBUG
#ifdef VANILLA_STYLE_CUSTOM_DEBUG
u8 gCustomDebugMode;
#endif
#ifdef EEP

View File

@@ -49,7 +49,7 @@ extern struct GfxPool *gGfxPool;
extern u8 gControllerBits;
extern u8 gIsConsole;
extern u8 gBorderHeight;
#ifdef CUSTOM_DEBUG
#ifdef VANILLA_STYLE_CUSTOM_DEBUG
extern u8 gCustomDebugMode;
#endif
extern u8 *gAreaSkyboxStart[AREA_COUNT];

View File

@@ -399,7 +399,7 @@ void render_hud_mario_lives(void) {
print_text_fmt_int(GFX_DIMENSIONS_RECT_FROM_LEFT_EDGE(54), HUD_TOP_Y, "%d", gHudDisplay.lives);
}
#ifdef CUSTOM_DEBUG
#ifdef VANILLA_STYLE_CUSTOM_DEBUG
void render_debug_mode(void) {
print_text(180, 40, "DEBUG MODE");
print_text_fmt_int(5, 20, "Z %d", gMarioState->pos[2]);
@@ -603,7 +603,7 @@ void render_hud(void) {
if (gSurfacePoolError & NOT_ENOUGH_ROOM_FOR_SURFACES) print_text(10, 40, "SURFACE POOL FULL");
if (gSurfacePoolError & NOT_ENOUGH_ROOM_FOR_NODES) print_text(10, 60, "SURFACE NODE POOL FULL");
#ifdef CUSTOM_DEBUG
#ifdef VANILLA_STYLE_CUSTOM_DEBUG
if (gCustomDebugMode) {
render_debug_mode();
}

View File

@@ -1213,23 +1213,6 @@ void update_mario_button_inputs(struct MarioState *m) {
if (m->controller->buttonPressed & A_BUTTON) m->input |= INPUT_A_PRESSED;
if (m->controller->buttonDown & A_BUTTON) m->input |= INPUT_A_DOWN;
#ifdef CUSTOM_DEBUG
if (m->controller->buttonPressed & L_JPAD) {
gCustomDebugMode ^= 1;
}
if (gCustomDebugMode) {
if (m->controller->buttonPressed & R_JPAD) {
if (gMarioState->action == ACT_DEBUG_FREE_MOVE) {
set_mario_action(gMarioState, ACT_IDLE, 0);
} else {
set_mario_action(gMarioState, ACT_DEBUG_FREE_MOVE, 0);
}
}
} else if (gMarioState->action == ACT_DEBUG_FREE_MOVE) {
set_mario_action(gMarioState, ACT_IDLE, 0);
}
#endif
// Don't update for these buttons if squished.
if (m->squishTimer == 0) {
if (m->controller->buttonDown & B_BUTTON) m->input |= INPUT_B_DOWN;