Skip to content

Commit

Permalink
debug menu progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko committed Feb 17, 2025
1 parent 06ba88f commit 4482bd9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
9 changes: 8 additions & 1 deletion decompile/General/AltMods/DebugMenu/Font.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ void DebugFont_DrawCharacter(int index, int screenPosX, int screenPosY, int lett
unsigned int uVar5;
unsigned int uVar6;

screenPosX += 7 * index;
// specific to DEBUG MENU,
// 8x index, not 7x index
screenPosX += 8 * index;

uVar6 = screenPosX + 7 & 0xffff;
uVar4 = (screenPosY + 7) * 0x10000;
Expand Down Expand Up @@ -97,6 +99,11 @@ void DebugFont_DrawLine(char* text, int posX, int posY, int color)
c = 41;
}

else if (c == '>')
{
c = 38;
}

else if(c >= 'a' && c <= 'z')
{
c -= 'a';
Expand Down
25 changes: 17 additions & 8 deletions decompile/General/AltMods/DebugMenu/Profiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,12 @@ void DebugMenu_Draw(struct DebugMenu* dm)
if(test > primMem->endMin100) return;

void* ot = gGT->pushBuffer_UI.ptrOT;

RECT* r = &dm->posX;
DECOMP_CTR_Box_DrawClearBox(r, 0x808080, 0, ot);



int rowCount = 0;
struct DebugRow* dr;

char text[16];

dr = dm->rowArr;
while(dr->actionFlag != 0)
{
Expand All @@ -228,10 +226,16 @@ void DebugMenu_Draw(struct DebugMenu* dm)
if(dr->subMenu == dm->childMenu)
color = 0x804000;

if(rowCount == 0)
sprintf(text, ">%s", dr->rowText);
else
sprintf(text, " %s", dr->rowText);


DebugFont_DrawLine(
dr->rowText,
dm->posX,
dm->posY + (rowCount * 8),
text,
3 + dm->posX,
3 + dm->posY + (rowCount * 8),
color
);

Expand All @@ -256,4 +260,9 @@ void DebugMenu_Draw(struct DebugMenu* dm)

dr++;
}

#ifndef REBUILD_PC
RECT* r = &dm->posX;
DECOMP_CTR_Box_DrawClearBox(r, 0x808080, 0, ot);
#endif
}
4 changes: 2 additions & 2 deletions include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
//#define USE_HARDER // Difficulty Selector (Arcade)
//#define USE_NEWCUPS // Cup Randomizer
//#define USE_BOOSTBAR // Super's reserve bar
#define USE_PROFILER // Debug profiler from PizzaHut
//#define USE_PROFILER // Debug profiler from PizzaHut

//#define USE_RAMEX // 8mb RAM expansion
//#define USE_BIGQUEUE // Requires RAMEX: Extended loading queue
//#define USE_HIGH1P // Requires BIGQUEUE: All high model drivers
//#define USE_RANDOM // Requires HIGH1P: Character Randomizer
//#define USE_ONLINE // Requires HIGH1P: Online Multiplayer
//#define USE_HIGHMP // Requires RAMEX: Multiplayer Maxed mod
#define USE_DEFRAG // Enables defragged decomp sections (required for ModsMain.c/ModsX.c)
//#define USE_DEFRAG // Enables defragged decomp sections (required for ModsMain.c/ModsX.c)
//#define USE_NEWLEV // Requires RAMEX: Enables custom levels

//#define USE_VR // Virtual Reality
Expand Down

0 comments on commit 4482bd9

Please sign in to comment.