mirror of https://github.com/zeldaret/tmc.git
parent
cf72e7b2d3
commit
299ca4abd6
|
|
@ -1232,8 +1232,8 @@ bool32 sub_080A5F24(void) {
|
|||
return result;
|
||||
}
|
||||
|
||||
typedef union{
|
||||
struct{
|
||||
typedef union {
|
||||
struct {
|
||||
s32 v1;
|
||||
s32 v2;
|
||||
} values;
|
||||
|
|
@ -1243,7 +1243,7 @@ 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;
|
||||
|
|
@ -1281,7 +1281,7 @@ void sub_080A5F48(Item item, u32 offset) {
|
|||
if (ammoCount < 0)
|
||||
return;
|
||||
|
||||
ret.raw = ((DivRem*)Div)(ammoCount,10); // by casting to DivRem, we can recover the remainder from the Div call
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue