mirror of
https://github.com/zeldaret/tmc
synced 2026-08-20 14:15:10 -04:00
asm splitting
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user