Skip to content

Commit

Permalink
optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko committed Oct 15, 2024
1 parent 909e4c3 commit 66bf4f4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions decompile/General/230/230_50_MM_Characters_MenuProc.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ void DECOMP_MM_Characters_MenuProc(struct RectMenu* unused)
}
}

posX = D230.ptrTransitionMeta[15].currX;
posY = D230.ptrTransitionMeta[15].currY;

switch(D230.characterSelectIconLayout)
{
// 3P character selection
Expand All @@ -129,17 +132,17 @@ void DECOMP_MM_Characters_MenuProc(struct RectMenu* unused)
DECOMP_DecalFont_DrawLine
(
sdata->lngStrings[96],
D230.ptrTransitionMeta[15].currX + 0x9c,
D230.ptrTransitionMeta[15].currY + 0x14,
posX + 0x9c,
posY + 0x14,
FONT_BIG, (JUSTIFY_CENTER | ORANGE)
);
characterSelectType = FONT_BIG;

// CHARACTER
characterSelectString = sdata->lngStrings[97];

posX = D230.ptrTransitionMeta[15].currX + 0x9c;
posY = D230.ptrTransitionMeta[15].currY + 0x26;
posX = posX + 0x9c;
posY = posY + 0x26;
break;

// 4P character selection
Expand All @@ -152,17 +155,17 @@ void DECOMP_MM_Characters_MenuProc(struct RectMenu* unused)
DECOMP_DecalFont_DrawLine
(
sdata->lngStrings[96],
D230.ptrTransitionMeta[15].currX + 0xfc,
D230.ptrTransitionMeta[15].currY + 8,
posX + 0xfc,
posY + 8,
FONT_CREDITS, (JUSTIFY_CENTER | ORANGE)
);
characterSelectType = FONT_CREDITS;

// CHARACTER
characterSelectString = sdata->lngStrings[97];

posX = D230.ptrTransitionMeta[15].currX + 0xfc;
posY = D230.ptrTransitionMeta[15].currY + 0x18;
posX = posX + 0xfc;
posY = posY + 0x18;
break;

// If you are in 1P or 2P character selection,
Expand All @@ -174,16 +177,17 @@ void DECOMP_MM_Characters_MenuProc(struct RectMenu* unused)
// SELECT CHARACTER
characterSelectString = sdata->lngStrings[95];

posX = D230.ptrTransitionMeta[15].currX + 0xfc;
posY = D230.ptrTransitionMeta[15].currY + 10;
posX = posX + 0xfc;
posY = posY + 10;
break;

default:
goto dontDrawSelectCharacter;
}

// Draw String
DECOMP_DecalFont_DrawLine(characterSelectString, posX, posY, characterSelectType, (JUSTIFY_CENTER | ORANGE));
DECOMP_DecalFont_DrawLine(
characterSelectString, posX, posY, characterSelectType, (JUSTIFY_CENTER | ORANGE));

dontDrawSelectCharacter:

Expand Down Expand Up @@ -661,9 +665,6 @@ void DECOMP_MM_Characters_MenuProc(struct RectMenu* unused)
}
}

// if number of players is not zero
if (gGT->numPlyrNextGame != 0)
{
psVar22 = D230.characterSelect_ptrWindowXY;

for (i = 0; i < gGT->numPlyrNextGame; i++)
Expand Down Expand Up @@ -731,6 +732,5 @@ void DECOMP_MM_Characters_MenuProc(struct RectMenu* unused)
&gGT->pushBuffer[i].ptrOT[0x3ff], &gGT->backBuffer->primMem
);
}
}
return;
}

0 comments on commit 66bf4f4

Please sign in to comment.