Skip to content

Commit

Permalink
Match sub_8031138 by making the generated code less efficient. Yay.
Browse files Browse the repository at this point in the history
  • Loading branch information
JaceCear committed Jun 5, 2024
1 parent 822e19b commit df6abf5
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions src/game/stage/results.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,9 +548,7 @@ void sub_80310F0(void)
}
}

// (90.87%) https://decomp.me/scratch/ju0GI
// (91.10%) https://decomp.me/scratch/Gdwj7
NONMATCH("asm/non_matching/game/stage/outro/sub_8031138.inc", void sub_8031138(u16 p0))
void sub_8031138(u16 p0)
{
// u16 p0 = p0;
StageResults *outro = TASK_DATA(gCurTask);
Expand Down Expand Up @@ -608,8 +606,12 @@ NONMATCH("asm/non_matching/game/stage/outro/sub_8031138.inc", void sub_8031138(u
s->x = r4 - p0;
DisplaySprite(s);

StageUI_PrintIntegerAt(outro->timeBonusScore, (r4 - (p0 + 144)),
OUTRO_TIME_BONUS_Y_POS, 0);
{
s16 r4_2 = r4;
s16 pp = p0;
StageUI_PrintIntegerAt(outro->timeBonusScore, r4_2 + 144 - pp,
OUTRO_TIME_BONUS_Y_POS, 0);
}
}
// _0803124C

Expand All @@ -625,8 +627,12 @@ NONMATCH("asm/non_matching/game/stage/outro/sub_8031138.inc", void sub_8031138(u
s->x = r4 - p0;
DisplaySprite(s);

StageUI_PrintIntegerAt(outro->ringBonusScore, (r4 - (p0 + 144)),
OUTRO_RING_BONUS_Y_POS, 0);
{
s16 r4_2 = r4;
s16 pp = p0;
StageUI_PrintIntegerAt(outro->ringBonusScore, r4_2 + 144 - pp,
OUTRO_RING_BONUS_Y_POS, 0);
}
}
// _0803129C

Expand All @@ -645,11 +651,14 @@ NONMATCH("asm/non_matching/game/stage/outro/sub_8031138.inc", void sub_8031138(u
s->x = r4 - p0;
DisplaySprite(s);

StageUI_PrintIntegerAt(outro->spRingBonusScore, (r4 - (p0 + 144)),
OUTRO_SP_RING_BONUS_Y_POS, 0);
{
s16 r4_2 = r4;
s16 pp = p0;
StageUI_PrintIntegerAt(outro->spRingBonusScore, r4_2 + 144 - pp,
OUTRO_SP_RING_BONUS_Y_POS, 0);
}
}
}
END_NONMATCH

void sub_8031314(void)
{
Expand Down

0 comments on commit df6abf5

Please sign in to comment.