asm splitting

This commit is contained in:
theo
2020-05-28 20:51:59 -07:00
parent 731ce9b7a5
commit 7afbda2b4d
86 changed files with 146004 additions and 145626 deletions
+23
View File
@@ -0,0 +1,23 @@
#include "global.h"
#include "stats.h"
extern Stats gStats;
extern u16 gWalletSizes[4];
void ModRupees(s32 rupeeDelta)
{
s32 newRupeeCount;
Stats *s = &gStats;
newRupeeCount = s->rupees + rupeeDelta;
if (newRupeeCount < 0) {
newRupeeCount = 0;
}
else {
if (newRupeeCount > gWalletSizes[s->walletType * 2]) {
newRupeeCount = gWalletSizes[s->walletType * 2];
}
}
s->rupees = newRupeeCount;
}