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
3
API_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
}
PlayerData::curMaxFP
s8 curMaxFP
Definition
common_structs.h:315
PlayerData::curFP
s8 curFP
Definition
common_structs.h:314
PlayerData
Definition
common_structs.h:308
ApiStatus_DONE2
#define ApiStatus_DONE2
Definition
evt.h:118
evt_get_variable
s32 evt_get_variable(Evt *script, Bytecode var)
Definition
evt.c:1690
gPlayerData
PlayerData gPlayerData
Definition
77480.c:40
src
common
AddFP.inc.c
Generated by
1.10.0