Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
peach_focus.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "message_ids.h"
4#include "sprite/player.h"
5
6#define NAMESPACE battle_move_peach_focus
7
9
10enum N(ActorVars) {
13};
14
15API_CALLABLE(N(IncreaseTwinkDefense)) {
16 // a pointer to Twink's DefenseTable is stored in his actorVar1 in twink.c
17 // it has now been copied to this script var, where we can retrieve it
18 s32* twinkDefenseTable = script->varTablePtr[0];
19
20 // increment the value of the first key in the defense table
22 return ApiStatus_DONE2;
23}
24
27 Wait(10)
30 Add(LVar0, 16)
36 Wait(1)
38 Wait(1)
40 Wait(1)
42 Wait(1)
44 Wait(1)
47 Call(SetBattleCamTarget, -105, -7, 0)
50 Wait(10)
54 Add(LVar1, 20)
58 IfEq(LVar0, 0)
60 EndIf
61 Wait(20)
63 Wait(10)
67 Wait(30)
70 Add(LVar0, 1)
75 Wait(10)
78 Wait(1)
80 Wait(1)
82 Wait(1)
84 Wait(1)
86 Wait(1)
88 Wait(1)
91 Wait(15)
97 Return
98 End
99};
BSS s32 PopupMenu_SelectedIndex
Bytecode EvtScript[]
@ BTL_CAM_DEFAULT
Definition enums.h:4823
@ BTL_CAM_REPOSITION
Definition enums.h:4840
@ BTL_CAM_PLAYER_WISH
Definition enums.h:4890
@ SOUND_BEGIN_WISH
Definition enums.h:963
@ SOUND_WISH_ASCENDING
Definition enums.h:1382
@ SOUND_STAR_POWER_RECOVERY
Definition enums.h:1384
@ ACTOR_PLAYER
Definition enums.h:2085
@ ACTOR_PARTNER
Definition enums.h:2086
@ ACTOR_SELF
Definition enums.h:2084
#define ApiStatus_DONE2
Definition evt.h:118
ApiStatus PlaySound(Evt *script, b32 isInitialCall)
ApiStatus FadeBackgroundLighten(Evt *script, b32 isInitialCall)
ApiStatus FadeBackgroundDarken(Evt *script, b32 isInitialCall)
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Add(VAR, INT_VALUE)
Definition macros.h:376
#define Float(DOUBLE)
Definition macros.h:51
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define LVar0
Definition macros.h:148
#define Return
Kills the current EVT thread.
Definition macros.h:217