4#define NAMESPACE action_command_flee
10API_CALLABLE(N(
init)) {
23 actionCommandStatus->
state = 0;
28 actionCommandStatus->
unk_5C = 1;
32 actionCommandStatus->
hudPosX = -48;
34 actionCommandStatus->
hudPosY = 80;
60 xOffset = 29 - ((100 - actionCommandStatus->
thresholdLevel) * 60) / 100;
73API_CALLABLE(N(start)) {
87 battleStatus->
flags1 &= ~BS_FLAGS1_FREE_ACTION_COMMAND;
88 actionCommandStatus->
state = 10;
98 switch (actionCommandStatus->
state) {
102 if (actionCommandStatus->
showHud) {
108 if (actionCommandStatus->
showHud) {
114 if (actionCommandStatus->
showHud) {
120 if (actionCommandStatus->
showHud) {
124 actionCommandStatus->
state = 1;
127 actionCommandStatus->
hudPosX += 20;
128 if (actionCommandStatus->
hudPosX > 50) {
129 actionCommandStatus->
hudPosX = 50;
142 actionCommandStatus->
state = 11;
166 actionCommandStatus->
state = 12;
180 switch (actionCommandStatus->
state) {
184 temp = actionCommandStatus->
unk_5A == 0 ? 7 : 8;
185 if (actionCommandStatus->
unk_5C == 0) {
189 actionCommandStatus->
unk_5C = 1;
196 actionCommandStatus->
unk_5C = 0;
212 x = 60 - temp_v1 / 100;
BSS ActionCommandStatus gActionCommandStatus
void action_command_free(void)
void draw_mash_meter_multicolor_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor)
s32 adjust_action_command_difficulty(s32 arg0)
void draw_mash_meter_blink(s32 posX, s32 posY, s32 fillValue)
void action_command_init_status(void)
HudScript HES_MashAButton
@ ACTION_COMMAND_MODE_NOT_LEARNED
HudScript HES_RunningAway
s32 evt_get_variable(Evt *script, Bytecode var)
void hud_element_get_render_pos(s32 id, s32 *x, s32 *y)
void hud_element_set_alpha(s32 id, s32 opacity)
void hud_element_set_script(s32 id, HudScript *anim)
void hud_element_set_render_depth(s32 id, s32 z)
void hud_element_set_render_pos(s32 id, s32 x, s32 y)
s32 hud_element_create(HudScript *anim)
Creates a new HUD element and returns its ID.
void hud_element_set_flags(s32 id, s32 flags)
Turns on the given flags.
void hud_element_clear_flags(s32 id, s32 flags)
Turns off the given flags.
void hud_element_draw_clipped(s32 id)
void hud_element_free(s32 id)
@ HUD_ELEMENT_FLAG_DISABLED
s32 * actionCmdDifficultyTable
BattleStatus gBattleStatus
void N init(Npc *bombette)