Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
AddFP.inc.c
Go to the documentation of this file.
1#include "common.h"
2
3API_CALLABLE(N(AddFP)) {
4 PlayerData* playerData = &gPlayerData;
5
6 s32 amt = evt_get_variable(script, *script->ptrReadPos);
7 s32 newFP = playerData->curFP + amt;
8
9 if (newFP > playerData->curMaxFP) {
10 newFP = playerData->curMaxFP;
11 }
12
13 playerData->curFP = newFP;
14
15 return ApiStatus_DONE2;
16}
#define ApiStatus_DONE2
Definition evt.h:118
s32 evt_get_variable(Evt *script, Bytecode var)
Definition evt.c:1690
PlayerData gPlayerData
Definition 77480.c:40