Skip to content

Commit

Permalink
Update pauseMenu.c
Browse files Browse the repository at this point in the history
fighting with the lint system
  • Loading branch information
ThothWhatsThis authored Jan 21, 2024
1 parent cf72e7b commit 299ca4a
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/menu/pauseMenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1232,8 +1232,8 @@ bool32 sub_080A5F24(void) {
return result;
}

typedef union{
struct{
typedef union {
struct {
s32 v1;
s32 v2;
} values;
Expand All @@ -1243,8 +1243,8 @@ typedef union{
void sub_080A5F48(Item item, u32 offset) {
// this funcitons signature allows the div function to return a u64 (2x 32 bit registers)
// with the result in one register and the remainder in the other
typedef u64 DivRem (u32, u32);
typedef u64 DivRem(u32, u32);

s32 ammoCount;
s32 onesDigit;
s32 tensDigit;
Expand All @@ -1260,7 +1260,7 @@ void sub_080A5F48(Item item, u32 offset) {
case ITEM_BOTTLE4:
item = gSave.stats.bottles[item - ITEM_BOTTLE1];
}

dest = OBJ_VRAM0 + (offset * 0x20);
index = gSpriteAnimations_322[item]->index;
temp2 = &gMoreSpritePtrs[1][index * 2];
Expand All @@ -1278,14 +1278,14 @@ void sub_080A5F48(Item item, u32 offset) {
break;
}

if (ammoCount < 0)
return;
ret.raw = ((DivRem*)Div)(ammoCount,10); // by casting to DivRem, we can recover the remainder from the Div call
if (ammoCount < 0)
return;

ret.raw = ((DivRem*)Div)(ammoCount, 10); // by casting to DivRem, we can recover the remainder from the Div call
onesDigit = ret.values.v2;
tensDigit = ret.values.v1;

if (tensDigit >= 10)
if (tensDigit >= 10)
tensDigit = 9;

DmaCopy32(3, gUnk_085C4620 + tensDigit * 0x8, dest, 0x8 * 4);
Expand Down

0 comments on commit 299ca4a

Please sign in to comment.