Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
use_moves.c
Go to the documentation of this file.
1#include "common.h"
2#include "ld_addrs.h"
3#include "battle.h"
4
26
48
50 [MOVE_NONE] {},
51 [MOVE_UNUSED_01] {},
52 [MOVE_UNUSED_02] {},
53 [MOVE_HAMMER1] BTL_MOVE(hammer_attack, EVS_UseMove),
54 [MOVE_HAMMER2] BTL_MOVE(hammer_attack, EVS_UseMove),
55 [MOVE_HAMMER3] BTL_MOVE(hammer_attack, EVS_UseMove),
56 [MOVE_FIRST_STRIKE_HAMMER] BTL_MOVE(hammer_attack, EVS_FirstStrike),
57 [MOVE_BERSERKER_HAMMER] BTL_MOVE(hammer_attack, EVS_UseBerserker),
58 [MOVE_SPIN_SMASH] BTL_MOVE(spin_smash, EVS_UseMove),
59 [MOVE_QUAKE_HAMMER] BTL_MOVE(quake_hammer, EVS_UseMove),
60 [MOVE_D_DOWN_POUND] BTL_MOVE(d_down_pound, EVS_UseMove),
61 [MOVE_SMASH_CHARGE0] BTL_MOVE(hammer_charge_0, EVS_UseMove0),
62 [MOVE_UNUSED_HAMMER_0C] BTL_MOVE(hammer_charge_0, EVS_UseMove1),
63 [MOVE_HAMMER_THROW] BTL_MOVE(hammer_throw, EVS_UseMove),
64 [MOVE_MEGA_QUAKE] BTL_MOVE(mega_quake, EVS_UseMove),
65 [MOVE_SMASH_CHARGE] BTL_MOVE(hammer_charge_1, EVS_UseMove0),
66 [MOVE_UNUSED_HAMMER_10] BTL_MOVE(hammer_charge_1, EVS_UseMove1),
67 [MOVE_SUPER_SMASH_CHARGE] BTL_MOVE(hammer_charge_2, EVS_UseMove0),
68 [MOVE_UNUSED_HAMMER_12] BTL_MOVE(hammer_charge_2, EVS_UseMove1),
69 [MOVE_AUTO_SMASH] BTL_MOVE(auto_smash, EVS_UseMove),
70 [MOVE_POWER_QUAKE] BTL_MOVE(power_quake, EVS_UseMove),
71 [MOVE_POWER_SMASH] BTL_MOVE(power_smash, EVS_UseMove),
72 [MOVE_SUPER_SMASH] BTL_MOVE(super_smash, EVS_UseMove),
73 [MOVE_MEGA_SMASH] BTL_MOVE(mega_smash, EVS_UseMove),
74 [MOVE_SHRINK_SMASH] BTL_MOVE(shrink_smash, EVS_UseMove),
75 [MOVE_SHELL_CRACK] BTL_MOVE(shell_crack, EVS_UseMove),
76 [MOVE_JUMP1] BTL_MOVE(jump_attack, EVS_UseMove),
77 [MOVE_JUMP2] BTL_MOVE(jump_attack, EVS_UseMove),
78 [MOVE_JUMP3] BTL_MOVE(jump_attack, EVS_UseMove),
79 [MOVE_FIRST_STRIKE_JUMP] BTL_MOVE(jump_attack, EVS_FirstStrike),
80 [MOVE_BERSERKER_JUMP] BTL_MOVE(jump_attack, EVS_UseBerserker),
81 [MOVE_MULTIBOUNCE] BTL_MOVE(multibounce, EVS_UseMove),
82 [MOVE_POWER_BOUNCE] BTL_MOVE(power_bounce, EVS_UseMove),
83 [MOVE_SLEEP_STOMP] BTL_MOVE(sleep_stomp, EVS_UseMove),
84 [MOVE_DIZZY_STOMP] BTL_MOVE(dizzy_stomp, EVS_UseMove),
85 [MOVE_JUMP_CHARGE0] BTL_MOVE(jump_charge_0, EVS_UseMove0),
86 [MOVE_UNUSED_24] BTL_MOVE(jump_charge_0, EVS_UseMove1),
87 [MOVE_JUMP_CHARGE] BTL_MOVE(jump_charge_1, EVS_UseMove0),
88 [MOVE_UNUSED_26] BTL_MOVE(jump_charge_1, EVS_UseMove1),
89 [MOVE_SUPER_JUMP_CHARGE] BTL_MOVE(jump_charge_2, EVS_UseMove0),
90 [MOVE_UNUSED_28] BTL_MOVE(jump_charge_2, EVS_UseMove1),
91 [MOVE_AUTO_JUMP] BTL_MOVE(auto_jump, EVS_UseMove),
92 [MOVE_AUTO_MULTIBOUNCE] BTL_MOVE(auto_multibounce, EVS_UseMove),
93 [MOVE_POWER_JUMP] BTL_MOVE(power_jump, EVS_UseMove),
94 [MOVE_SUPER_JUMP] BTL_MOVE(super_jump, EVS_UseMove),
95 [MOVE_MEGA_JUMP] BTL_MOVE(mega_jump, EVS_UseMove),
96 [MOVE_D_DOWN_JUMP] BTL_MOVE(d_down_jump, EVS_UseMove),
97 [MOVE_SHRINK_STOMP] BTL_MOVE(shrink_stomp, EVS_UseMove),
98 [MOVE_EARTHQUAKE_JUMP] BTL_MOVE(earthquake_jump, EVS_UseMove),
99};
100
101API_CALLABLE(LoadMoveScript) {
102 BattleStatus* battleStatus = &gBattleStatus;
103 BattleMoveEntry* moveTableEntry = &gMoveScriptTable[battleStatus->selectedMoveID];
104
105 dma_copy(moveTableEntry->romStart, moveTableEntry->romEnd, moveTableEntry->vramStart);
106 script->varTablePtr[0] = moveTableEntry->mainScript;
107
109
112 }
113
114 return ApiStatus_DONE2;
115}
Bytecode EvtScript[]
@ BS_FLAGS2_HAS_RUSH
Definition enums.h:3621
#define ApiStatus_DONE2
Definition evt.h:118
u32 dma_copy(Addr romStart, Addr romEnd, void *vramDest)
Definition 43F0.c:444
void enable_player_blur(void)
void deduct_current_move_fp(void)
Definition 190B20.c:961
EvtScript * mainScript
Definition battle.h:111
#define BTL_MOVE(name, script)
Definition battle.h:114
EvtScript battle_move_quake_hammer_EVS_UseMove
EvtScript battle_move_hammer_charge_1_EVS_UseMove1
EvtScript battle_move_hammer_throw_EVS_UseMove
EvtScript battle_move_shell_crack_EVS_UseMove
EvtScript battle_move_power_smash_EVS_UseMove
EvtScript battle_move_multibounce_EVS_UseMove
EvtScript battle_move_hammer_attack_EVS_UseMove
EvtScript battle_move_jump_attack_EVS_FirstStrike
EvtScript battle_move_jump_charge_2_EVS_UseMove0
EvtScript battle_move_hammer_charge_1_EVS_UseMove0
EvtScript battle_move_auto_multibounce_EVS_UseMove
EvtScript battle_move_power_quake_EVS_UseMove
EvtScript battle_move_mega_smash_EVS_UseMove
EvtScript battle_move_jump_attack_EVS_UseMove
EvtScript battle_move_jump_charge_1_EVS_UseMove0
EvtScript battle_move_hammer_charge_2_EVS_UseMove1
EvtScript battle_move_mega_quake_EVS_UseMove
EvtScript battle_move_d_down_jump_EVS_UseMove
EvtScript battle_move_shrink_stomp_EVS_UseMove
EvtScript battle_move_jump_charge_1_EVS_UseMove1
EvtScript battle_move_jump_charge_0_EVS_UseMove1
EvtScript battle_move_auto_smash_EVS_UseMove
EvtScript battle_move_dizzy_stomp_EVS_UseMove
EvtScript battle_move_super_smash_EVS_UseMove
EvtScript battle_move_hammer_attack_EVS_FirstStrike
EvtScript battle_move_sleep_stomp_EVS_UseMove
EvtScript battle_move_d_down_pound_EVS_UseMove
EvtScript battle_move_power_jump_EVS_UseMove
EvtScript battle_move_hammer_charge_2_EVS_UseMove0
EvtScript battle_move_spin_smash_EVS_UseMove
BattleMoveEntry gMoveScriptTable[]
Definition use_moves.c:49
EvtScript battle_move_hammer_attack_EVS_UseBerserker
EvtScript battle_move_power_bounce_EVS_UseMove
EvtScript battle_move_jump_attack_EVS_UseBerserker
EvtScript battle_move_super_jump_EVS_UseMove
EvtScript battle_move_jump_charge_0_EVS_UseMove0
EvtScript battle_move_mega_jump_EVS_UseMove
EvtScript battle_move_hammer_charge_0_EVS_UseMove0
EvtScript battle_move_auto_jump_EVS_UseMove
EvtScript battle_move_earthquake_jump_EVS_UseMove
EvtScript battle_move_shrink_smash_EVS_UseMove
EvtScript battle_move_hammer_charge_0_EVS_UseMove1
EvtScript battle_move_jump_charge_2_EVS_UseMove1
BattleStatus gBattleStatus
Definition battle.c:11