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
}
PopupMenu_SelectedIndex
BSS s32 PopupMenu_SelectedIndex
Definition
8a860_len_3f30.c:84
PlayerData
Definition
common_structs.h:309
ApiStatus_DONE2
#define ApiStatus_DONE2
Definition
evt.h:118
evt_get_variable
s32 evt_get_variable(Evt *script, Bytecode var)
Definition
evt.c:1689
gPlayerData
PlayerData gPlayerData
Definition
77480.c:40
src
common
AddFP.inc.c
Generated by
1.10.0