Skip to content

Commit b0c6629

Browse files
author
Niko
committed
bitshift optimizations AH_HintMenu and RaceFlag_LoadingString
1 parent 57538e8 commit b0c6629

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

decompile/General/232/232_29_AH_HintMenu_MenuProc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ void DECOMP_AH_HintMenu_MenuProc(struct RectMenu* menu)
117117

118118
iVar10 = DECOMP_DecalFont_GetLineWidth(strExit, 1);
119119

120-
iVar7 = (iVar10 + 6) * 0x10000;
121-
box.x = 0xff - (short)((iVar7 >> 0x10) - (iVar7 >> 0x1f) >> 1);
122-
box.w = (short)(iVar10 + 6);
120+
iVar7 = (iVar10 + 6);
121+
box.x = 0xff - (iVar7 >> 1);
122+
box.w = iVar7;
123123
box.y = (short)iVar11 + 0x4e;
124124
box.h = 0x11;
125125

decompile/General/RaceFlag/RaceFlag_12_DrawLoadingString.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,12 @@ void DECOMP_RaceFlag_DrawLoadingString(void)
4747
}
4848

4949
iVar10 =
50-
(sdata->RaceFlag_Transition & 0xffff) -
51-
(
52-
(
53-
((iVar3 << 0x10) >> 0x10) -
54-
((iVar3 << 0x10) >> 0x1f)
55-
) >> 1
56-
);
50+
(sdata->RaceFlag_Transition & 0xffff) - (iVar3 >> 1);
5751

5852
iVar3 = FPS_HALF(sdata->RaceFlag_LoadingTextAnimFrame);
5953

6054
if (0 < iVar2)
6155
{
62-
6356
iVar9 = iVar3 * -0x3c + 0x23c;
6457

6558
// for iVar6 = 0; iVar6 < strlen("LOADING..."); iVar6++)

0 commit comments

Comments
 (0)