action commands (#853)

* reorg done

* warning

* PR comments
This commit is contained in:
Unnunu 2022-11-08 16:01:42 +03:00 committed by GitHub
parent 922a953691
commit b9502a1ac4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
116 changed files with 2646 additions and 3012 deletions

View File

@ -863,8 +863,8 @@ typedef struct BattleStatus {
/* 0x07D */ s8 menuStatus[4]; ///< -1 = automatically pick the first move, 0 = disabled, 1 = enabled
/* 0x081 */ s8 actionSuccess;
/* 0x082 */ char unk_82;
/* 0x083 */ s8 unk_83;
/* 0x084 */ s8 unk_84;
/* 0x083 */ s8 actionCommandMode;
/* 0x084 */ s8 actionResult;
/* 0x085 */ s8 unk_85;
/* 0x086 */ s8 unk_86;
/* 0x087 */ s8 blockResult; /* 0 = fail, 1 = success, -1 = mashed */
@ -965,7 +965,7 @@ typedef struct BattleStatus {
/* 0x431 */ s8 inputBufferPos;
/* 0x432 */ s8 unk_432;
/* 0x433 */ u8 unk_433;
/* 0x434 */ s32* unk_434;
/* 0x434 */ s32* actionCmdDifficultyTable;
/* 0x438 */ struct Stage* currentStage;
/* 0x43C */ struct EffectInstance* buffEffect;
/* 0x440 */ u8 tattleFlags[28];
@ -2294,42 +2294,6 @@ typedef struct VirtualEntity {
typedef VirtualEntity* VirtualEntityList[0x40];
typedef struct ActionCommandStatus {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 hudElements[15];
/* 0x40 */ char unk_40[0x4];
/* 0x44 */ s16 barFillLevel;
/* 0x46 */ s16 unk_46;
/* 0x48 */ s16 unk_48;
/* 0x4A */ s16 actionCommandID; // current action command id?
/* 0x4C */ s16 state;
/* 0x4E */ s16 unk_4E;
/* 0x50 */ s16 unk_50;
/* 0x52 */ s16 unk_52;
/* 0x54 */ s16 unk_54;
/* 0x56 */ s16 hudElementX;
/* 0x58 */ s16 hudElementY;
/* 0x5A */ s16 unk_5A;
/* 0x5C */ s8 unk_5C;
/* 0x5D */ s8 unk_5D;
/* 0x5E */ s8 autoSucceed;
/* 0x5F */ s8 unk_5F;
/* 0x60 */ s8 unk_60;
/* 0x61 */ s8 unk_61;
/* 0x62 */ s8 unk_62;
/* 0x63 */ s8 unk_63;
/* 0x64 */ s16 easyVersion;
/* 0x66 */ s16 unk_66;
/* 0x68 */ s16 unk_68;
/* 0x6A */ s16 unk_6A;
/* 0x6C */ s16 unk_6C;
/* 0x6E */ s16 hitsTakenIsMax;
/* 0x70 */ s16 unk_70;
/* 0x72 */ s16 unk_72;
/* 0x74 */ s16 mashMeterCutoffs[6]; // upper bounds for each interval
/* 0x80 */ s8 mashMeterIntervals;
} ActionCommandStatus;
typedef struct Message {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;

View File

@ -852,9 +852,6 @@ void func_800EF300(void);
void func_800EF314(void);
void func_800EF43C(void);
void func_800EF3E4(void);
void func_80268858(void);
void func_80269118(void);
s32 func_80268224(s32);
void enable_player_shadow(void);
s32 get_msg_lines(s32 messageID);
void set_window_properties(s32 panelID, s32 posX, s32 posY, s32 width, s32 height, u8, void* drawContents, void* drawContentsArg, s8 parent);
@ -863,9 +860,6 @@ void set_windows_visible(s32 groupIdx);
void partner_disable_input(void);
void partner_set_goal_pos(s32 x, s32 z);
void func_80268798(s32, s32, s32, s32);
void func_8026880C(s32, s32, s32);
void func_802687E4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
void close_message(MessagePrintState* msgPrintState);
void show_foreground_models_unchecked(void);
void hide_foreground_models_unchecked(void);
@ -1051,11 +1045,6 @@ void func_80266970(Actor*);
void func_80266ADC(Actor*);
void func_80266AF8(Actor*);
void func_80266E14(ActorPart*);
void func_80268770(s32, s32, s32);
void func_80268C9C(void);
void func_80268E88(void);
s32 check_block_input(s32 buttonMask);
void func_80269160(void);
void func_800E24F8(void);
void load_tattle_flags(s32);
s32 use_consumable(s32 invSlot);

View File

@ -5,6 +5,7 @@
#include "evt.h"
#include "script_api/common.h"
#include "battle/action_cmd.h"
ApiStatus EnablePartnerBlur(Evt* script, s32 isInitialCall);
ApiStatus DisablePartnerBlur(Evt* script, s32 isInitialCall);
@ -54,13 +55,6 @@ ApiStatus StartRumbleWithParams(Evt* script, s32 isInitialCall);
ApiStatus LoadItemScript(Evt* script, s32 isInitialCall);
ApiStatus LoadFreeItemScript(Evt* script, s32 isInitialCall);
ApiStatus LoadMoveScript(Evt* script, s32 isInitialCall);
ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall);
ApiStatus GetActionSuccess(Evt* script, s32 isInitialCall);
ApiStatus SetActionSuccess(Evt* script, s32 isInitialCall);
ApiStatus GetActionSuccessCopy(Evt* script, s32 isInitialCall);
ApiStatus GetBlockResult(Evt* script, s32 isInitialCall);
ApiStatus CloseActionCommandInfo(Evt* script, s32 isInitialCall);
ApiStatus func_80269470(Evt* script, s32 isInitialCall);
ApiStatus LoadBattleSection(Evt* script, s32 isInitialCall);
ApiStatus GetBattlePhase(Evt* script, s32 isInitialCall);
ApiStatus GetLastElement(Evt* script, s32 isInitialCall);
@ -295,12 +289,7 @@ ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall);
ApiStatus func_8024CE9C(Evt* script, s32 isInitialCall);
ApiStatus func_802CABE8(Evt* script, s32 isInitialCall);
ApiStatus func_802CAE50(Evt* script, s32 isInitialCall);
ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall);
ApiStatus func_802807D0(Evt* script, s32 isInitialCall);
ApiStatus func_802694A4(Evt* script, s32 isInitialCall);
ApiStatus func_80269524(Evt* script, s32 isInitialCall);
ApiStatus func_80269550(Evt* script, s32 isInitialCall);
ApiStatus func_8026919C(Evt* script, s32 isInitialCall);
ApiStatus PartnerYieldTurn(Evt* script, s32 isInitialCall); ///< YieldTurn copy
ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall);
ApiStatus UseBattleCamPresetImmediately(Evt* script, s32 isInitialCall);
@ -313,14 +302,8 @@ ApiStatus func_80276EFC(Evt* script, s32 isInitialCall);
ApiStatus ShowStartRecoveryShimmer(Evt* script, s32 isInitialCall);
ApiStatus ShowRecoveryShimmer(Evt* script, s32 isInitialCall);
ApiStatus func_80273444(Evt* script, s32 isInitialCall);
ApiStatus GetActionCommandMode(Evt* script, s32 isInitialCall);
ApiStatus func_80269344(Evt* script, s32 isInitialCall);
ApiStatus SetActionCommandMode(Evt* script, s32 isInitialCall);
ApiStatus SetCommandAutoSuccess(Evt* script, s32 isInitialCall);
ApiStatus func_802693F0(Evt* script, s32 isInitialCall);
ApiStatus WaitForState(Evt* script, s32 isInitialCall);
ApiStatus func_8026E020(Evt* script, s32 isInitialCall);
ApiStatus GetActionResult(Evt* script, s32 isInitialCall);
ApiStatus SetBattleState(Evt* script, s32 isInitialCall);
ApiStatus func_8027D434(Evt* script, s32 isInitialCall);
ApiStatus func_8026F1A0(Evt* script, s32 isInitialCall);
@ -328,9 +311,6 @@ ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall);
ApiStatus StopLoopingSoundAtActor(Evt* script, s32 isInitialCall);
ApiStatus func_8026ED20(Evt* script, s32 isInitialCall);
ApiStatus func_8026EBF8(Evt* script, s32 isInitialCall);
ApiStatus SetupMashMeter(Evt* script, s32 isInitialCall);
ApiStatus SetActionResult(Evt* script, s32 isInitialCall);
ApiStatus func_80269600(Evt* script, s32 isInitialCall);
ApiStatus BattleCamTargetActorPart(Evt* script, s32 isInitialCall);
ApiStatus func_802537C0(Evt* script, s32 isInitialCall);
ApiStatus CancelEnemyTurn(Evt* script, s32 isInitialCall);

View File

@ -32,8 +32,6 @@ extern s32 D_800DC4F0;
extern struct Battle* D_800DC4F4;
extern s32 D_800DC4F8;
extern ActionCommandStatus gActionCommandStatus;
extern s32 D_802DAC98;
extern EntityList gWorldEntityList;

View File

@ -251,12 +251,12 @@ void btl_state_update_normal_start(void) {
battleStatus->incrementStarPointDelay = 0;
battleStatus->damageTaken = 0;
battleStatus->nextMerleeSpellType = 0;
battleStatus->unk_83 = 0;
battleStatus->actionCommandMode = ACTION_COMMAND_MODE_NOT_LEARNED;
gCameras[CAM_DEFAULT].flags |= CAMERA_FLAGS_ENABLED;
gCameras[CAM_BATTLE].flags |= CAMERA_FLAGS_ENABLED;
gCameras[CAM_TATTLE].flags |= CAMERA_FLAGS_ENABLED;
if (is_ability_active(ABILITY_MYSTERY_SCROLL)) {
battleStatus->unk_83 = 1;
battleStatus->actionCommandMode = ACTION_COMMAND_MODE_LEARNED;
}
battleStatus->actionSuccess = 0;
battleStatus->unk_82 = 0;
@ -704,8 +704,8 @@ void btl_state_update_begin_player_turn(void) {
if (gBattleState2 == BATTLE_STATE2_UNK_64 && btl_cam_is_moving_done()) {
gBattleStatus.flags1 &= ~BS_FLAGS1_80000;
reset_actor_turn_info();
battleStatus->unk_86 = 0x7F;
battleStatus->blockResult = 0x7F;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->selectedMoveID = 0;
gBattleStatus.flags1 |= BS_FLAGS1_8;
gBattleStatus.flags2 &= ~BS_FLAGS2_1000000;
@ -1032,8 +1032,8 @@ void btl_state_update_switch_to_player(void) {
gBattleStatus.flags1 &= ~BS_FLAGS1_80000;
reset_actor_turn_info();
gBattleStatus.selectedMoveID = MOVE_NONE;
gBattleStatus.unk_86 = 0x7F;
gBattleStatus.blockResult = 0x7F;
gBattleStatus.unk_86 = 127;
gBattleStatus.blockResult = 127;
gBattleStatus.flags1 |= BS_FLAGS1_8;
player->flags |= ACTOR_FLAG_8000000;
if (partner != NULL) {
@ -1086,8 +1086,8 @@ void btl_state_update_begin_partner_turn(void) {
D_8029F258 = 0;
reset_actor_turn_info();
partner = battleStatus->partnerActor;
battleStatus->unk_86 = 0x7F;
battleStatus->blockResult = 0x7F;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
D_8029F254 = 0;
gBattleStatus.flags1 |= BS_FLAGS1_80000;
gBattleStatus.flags2 |= BS_FLAGS1_100000;
@ -1180,8 +1180,8 @@ void btl_state_update_switch_to_partner(void) {
reset_actor_turn_info();
gBattleStatus.flags1 |= BS_FLAGS1_80000;
gBattleStatus.selectedMoveID = MOVE_NONE;
gBattleStatus.unk_86 = 0x7F;
gBattleStatus.blockResult = 0x7F;
gBattleStatus.unk_86 = 127;
gBattleStatus.blockResult = 127;
gBattleStatus.flags1 |= BS_FLAGS1_8;
player->flags |= (ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000);
partner->flags |= ACTOR_FLAG_8000000;
@ -2546,8 +2546,8 @@ void btl_state_update_player_move(void) {
s32 i;
if (gBattleState2 == BATTLE_STATE2_UNK_0) {
battleStatus->unk_86 = 0x7F;
battleStatus->blockResult = 0x7F;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->unk_8C = 0;
battleStatus->lastAttackDamage = 0;
battleStatus->unk_19A = 0;
@ -3082,8 +3082,8 @@ void btl_state_update_partner_move(void) {
btl_set_state(BATTLE_STATE_9);
} else {
battleStatus->unk_8C = 0;
battleStatus->unk_86 = 0x7F;
battleStatus->blockResult = 0x7F;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->unk_19A = 0;
gBattleStatus.flags1 &= ~BS_FLAGS1_1000;
gBattleStatus.flags1 &= ~BS_FLAGS1_2;
@ -3486,8 +3486,8 @@ void btl_state_update_enemy_move(void) {
battleStatus->unk_8C = 0;
battleStatus->lastAttackDamage = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0x7F;
battleStatus->blockResult = 0x7F;
battleStatus->unk_86 = 127;
battleStatus->blockResult = 127;
battleStatus->unk_19A = 0;
reset_actor_turn_info();
gBattleStatus.flags1 |= BS_FLAGS1_100;

View File

@ -5,6 +5,7 @@
#include "hud_element.h"
#include "entity.h"
#include "ld_addrs.h"
#include "battle/action_cmd.h"
extern IMG_BIN ui_battle_menu_spirits_png[];
extern PAL_BIN ui_battle_menu_spirits_pal[];
@ -2544,11 +2545,8 @@ BSS s16 D_8029F64C;
BSS s16 D_8029F64E;
BSS s16 D_8029F650;
extern HudScript HES_AButton;
extern HudScript HES_AButtonDown;
extern HudScript HES_AimReticle;
extern HudScript HES_AimTarget;
extern HudScript HES_BButton;
extern HudScript HES_CDownButton;
extern HudScript HES_CLeftButton;
extern HudScript HES_CRightButton;
@ -2560,24 +2558,16 @@ extern HudScript HES_Item_Hammer1;
extern HudScript HES_Item_Hammer2;
extern HudScript HES_Item_Hammer3;
extern HudScript HES_Item_Items;
extern HudScript HES_MashAButton;
extern HudScript HES_MashBButton1;
extern HudScript HES_MashBButton2;
extern HudScript HES_MashCDownButton1;
extern HudScript HES_MashCLeftButton;
extern HudScript HES_MashCRightButton1;
extern HudScript HES_MashCUpButton;
extern HudScript HES_PressAButton;
extern HudScript HES_PressBButton;
extern HudScript HES_PressCDownButton;
extern HudScript HES_RotateStickCW;
extern HudScript HES_StickBackAndForth;
extern HudScript HES_StickMashLeft;
extern HudScript HES_StickNeutral;
extern HudScript HES_StickTapLeft;
extern HudScript HES_StickTapRight;
extern HudScript HES_TimingBlink;
extern HudScript HES_TimingReady;
void func_8024F394(void* data);
void func_8024F5AC(void* data);
@ -3085,9 +3075,9 @@ void func_8024FB3C(void* data) {
case 0x40:
case 0x41:
case 0x42:
temp_a0 = battleStatus->unk_83;
temp_a0 = battleStatus->actionCommandMode;
D_8029F64A = TRUE;
if (temp_a0 == 0) {
if (temp_a0 == ACTION_COMMAND_MODE_NOT_LEARNED) {
D_8029F64A = FALSE;
shouldDisposeWindow = TRUE;
break;

View File

@ -2,7 +2,6 @@
#include "effects.h"
#include "hud_element.h"
#include "ld_addrs.h"
#include "pause/pause_common.h"
#include "script_api/battle.h"
#include "entity.h"
#include "sprite/npc/BattleGoombario.h"
@ -16,6 +15,7 @@
#include "sprite/npc/BattleBow.h"
extern HudScript HES_ProjectorBeam;
extern IconHudScriptPair gItemHudScripts[];
BSS s32 D_8029FA80[4];
BSS s32 D_8029FA90[3][7];

View File

@ -4,6 +4,7 @@
#include "script_api/battle.h"
#include "sprite/npc/Twink.h"
#include "sprite/npc/BattleMerlee.h"
#include "battle/action_cmd/flee.h"
extern HudScript HES_Happy;
extern HudScript HES_HPDrain;
@ -13,8 +14,6 @@ extern EvtScript D_802988F0;
extern EvtScript D_80298724;
extern EvtScript D_80298948;
ApiStatus func_802749F8(Evt* script, s32 isInitialCall);
ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall);
ApiStatus func_802A92A0_422D70(Evt* script, s32 isInitialCall);
BSS s32 D_8029FB90;
BSS f32 D_8029FB94;
@ -1099,15 +1098,15 @@ EvtScript D_80286228 = {
EvtScript RunAwayStart = {
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(GetActionCommandMode, LVar2)
EVT_IF_EQ(LVar2, 0)
EVT_IF_EQ(LVar2, ACTION_COMMAND_MODE_NOT_LEARNED)
EVT_EXEC_WAIT(D_80286228)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, TRUE)
EVT_RETURN
EVT_END_IF
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(GetActorVar, ACTOR_SELF, 0, LVar0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_FLEE)
EVT_CALL(func_802A9000_422AD0, LVar0)
EVT_CALL(action_command_flee_init, LVar0)
EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0)
EVT_CALL(func_80260E38)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_50000)
@ -1124,7 +1123,7 @@ EvtScript RunAwayStart = {
EVT_WAIT(1)
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180)
EVT_WAIT(5)
EVT_CALL(func_802A92A0_422D70, 0, 60, 3)
EVT_CALL(action_command_flee_start, 0, 60, 3)
EVT_CALL(func_80260E5C)
EVT_WAIT(5)
EVT_CALL(AddActorPos, 0, 2, 0, 0)

View File

@ -1817,7 +1817,7 @@ ApiStatus func_80274A18(Evt* script, s32 isInitialCall) {
}
break;
case 2:
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
return ApiStatus_DONE2;
}
playerState->moveTime = 1;

View File

@ -1,103 +1,58 @@
#include "common.h"
#include "battle/action_cmd/jump.h"
#include "battle/action_cmd/hammer.h"
#include "battle/action_cmd/flee.h"
#include "battle/action_cmd/break_free.h"
#include "battle/action_cmd/whirlwind.h"
#include "battle/action_cmd/stop_leech.h"
#include "battle/action_cmd/07.h"
#include "battle/action_cmd/dizzy_shell.h"
#include "battle/action_cmd/fire_shell.h"
#include "battle/action_cmd/0A.h"
#include "battle/action_cmd/bomb.h"
#include "battle/action_cmd/body_slam.h"
#include "battle/action_cmd/air_lift.h"
#include "battle/action_cmd/air_raid.h"
#include "battle/action_cmd/squirt.h"
#include "battle/action_cmd/power_shock.h"
#include "battle/action_cmd/mega_shock.h"
#include "battle/action_cmd/smack.h"
#include "battle/action_cmd/spiny_surge.h"
#include "battle/action_cmd/hurricane.h"
#include "battle/action_cmd/spook.h"
#include "battle/action_cmd/water_block.h"
#include "battle/action_cmd/tidal_wave.h"
#include "action_cmd.h"
#include "ld_addrs.h"
s8 D_80294190[5][3] = {
{ 0x21, 0x21, 0x75 },
{ 0x1D, 0x23, 0xA3 },
{ 0x46, 0x0C, 0xB4 },
{ 0x6B, 0x00, 0x78 },
{ 0x73, 0x0D, 0x13 }
u8 mashMeter_bgColors[15] = {
33, 33, 117,
29, 35, 163,
70, 12, 180,
107, 0, 120,
115, 13, 19,
};
s8 D_802941A0[5][3] = {
{ 0x00, 0xE4, 0x86 },
{ 0x2E, 0xB4, 0xF2 },
{ 0x75, 0x70, 0xFF },
{ 0xF3, 0x04, 0xBC },
{ 0xF7, 0x0D, 0x05 }
u8 mashMeter_fillColors[15] = {
0, 228, 134,
46, 180, 242,
117, 112, 255,
243, 4, 188,
247, 13, 5,
};
s8 D_802941B0[5][3] = {
{ 0x2D, 0x38, 0xD2 },
{ 0x54, 0x28, 0xD1 },
{ 0x7D, 0x2C, 0xB5 },
{ 0xA1, 0x1B, 0x55 },
{ 0xFF, 0xFF, 0xFF }
u8 mashMeter_cutOffColors[15] = {
45, 56, 210,
84, 40, 209,
125, 44, 181,
161, 27, 85,
255, 255, 255,
};
s32 D_802941C0[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
s32 D_802941E0[] = { 11, 10, 9, 8, 7, 6, 5, 4 };
s32 D_80294200[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294220[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294240[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294260[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294280[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_802942A0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_802942C0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_802942E0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294300[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294320[] = { 9, 8, 7, 6, 5, 4, 3, 2 };
s32 D_80294340[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294360[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294380[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_802943A0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_802943C0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_802943E0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294400[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294420[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294440[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 D_80294460[] = { 6, 3, 5, 3, 4, 3, 2, 3, 1, 3, 0, 3, 0, 2, 0, 1 };
s32 D_802944A0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableJump[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
s32 actionCmdTableHammer[] = { 11, 10, 9, 8, 7, 6, 5, 4 };
s32 actionCmdTableFlee[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableBreakFree[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableWhirlwind[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableStopLeech[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTable07[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableDizzyShell[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableFireShell[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTable0A[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableBomb[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableBodySlam[] = { 9, 8, 7, 6, 5, 4, 3, 2 };
s32 actionCmdTableAirLift[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableAirRaid[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableSquirt[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTablePowerShock[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableMegaShock[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableSmack[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableSpinySurge[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableHurricane[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableSpook[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
s32 actionCmdTableWaterBlock[] = { 6, 3, 5, 3, 4, 3, 2, 3, 1, 3, 0, 3, 0, 2, 0, 1 };
s32 actionCmdTableTidalWave[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
#define AC_TBL_ENTRY(name) \
action_cmd_ ## name ## _ROM_START, action_cmd_ ## name ## _ROM_END, action_cmd_ ## name ## _VRAM
// TODO: move to src/battle/action_cmd.c
void* actionCommandDmaTable[] = {
NULL, NULL, NULL,
AC_TBL_ENTRY(jump),
@ -125,57 +80,12 @@ void* actionCommandDmaTable[] = {
AC_TBL_ENTRY(tidal_wave),
};
BSS s32 D_8029FBC0;
BSS s32 D_8029FBC4[3]; // unused?
BSS s32 sMashMeterSmoothDivisor;
BSS s32 D_8029FBC4_pad[3];
// TODO move to actor_api
BSS s32 D_8029FBD0;
BSS s8 D_8029FBD4;
void action_command_jump_draw_hud_elements(void);
void action_command_hammer_draw_hud_elements(void);
void action_command_flee_draw_hud_elements(void);
void action_command_break_free_draw_hud_elements(void);
void action_command_whirlwind_draw_hud_elements(void);
void action_command_stop_leech_draw_hud_elements(void);
void action_command_07_draw_hud_elements(void);
void action_command_dizzy_shell_draw_hud_elements(void);
void action_command_fire_shell_draw_hud_elements(void);
void action_command_0A_draw_hud_elements(void);
void action_command_bomb_draw_hud_elements(void);
void action_command_body_slam_draw_hud_elements(void);
void action_command_air_lift_draw_hud_elements(void);
void action_command_air_raid_draw_hud_elements(void);
void action_command_squirt_draw_hud_elements(void);
void action_command_power_shock_draw_hud_elements(void);
void action_command_mega_shock_draw_hud_elements(void);
void action_command_smack_draw_hud_elements(void);
void action_command_spiny_surge_draw_hud_elements(void);
void action_command_hurricane_draw_hud_elements(void);
void action_command_spook_draw_hud_elements(void);
void action_command_water_block_draw_hud_elements(void);
void action_command_tidal_wave_draw_hud_elements(void);
void action_command_jump_free_hud_elements(void);
void action_command_hammer_free_hud_elements(void);
void action_command_flee_free_hud_elements(void);
void action_command_break_free_free_hud_elements(void);
void action_command_whirlwind_free_hud_elements(void);
void action_command_07_free_hud_elements(void);
void action_command_dizzy_shell_free_hud_elements(void);
void action_command_fire_shell_free_hud_elements(void);
void action_command_0A_free_hud_elements(void);
void action_command_bomb_free_hud_elements(void);
void action_command_body_slam_free_hud_elements(void);
void action_command_air_lift_free_hud_elements(void);
void action_command_air_raid_free_hud_elements(void);
void action_command_squirt_free_hud_elements(void);
void action_command_power_shock_free_hud_elements(void);
void action_command_mega_shock_free_hud_elements(void);
void action_command_smack_free_hud_elements(void);
void action_command_spiny_surge_free_hud_elements(void);
void action_command_hurricane_free_hud_elements(void);
void action_command_spook_free_hud_elements(void);
void action_command_water_block_free_hud_elements(void);
void action_command_tidal_wave_free_hud_elements(void);
ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 cmd = evt_get_variable(script, *args++);
@ -184,7 +94,7 @@ ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
s32 func_80268224(s32 arg0) {
s32 adjust_action_command_difficulty(s32 arg0) {
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) {
arg0 -= is_ability_active(ABILITY_DODGE_MASTER) * 3;
}
@ -199,44 +109,151 @@ s32 func_80268224(s32 arg0) {
return arg0;
}
void func_80268284(s32, s32, s32, s32);
INCLUDE_ASM(s32, "196AA0", func_80268284);
void draw_mash_meter(s32 posX, s32 posY, s32 fillValue, s32 colorMode) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 maxCutOff;
s32 i;
s32 cutOff;
s32 width;
s32 offsetX;
s32 filledWidth;
s32 r, g, b;
void func_80268770(s32 arg0, s32 arg1, s32 arg2) {
D_8029FBC0 = 2;
func_80268284(arg0, arg1, arg2, 0);
if (!actionCommandStatus->showHud) {
return;
}
posX -= 28;
posY -= 4;
maxCutOff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
if (fillValue < 0) {
fillValue = 0;
}
width = 0;
for (i = 0; i < actionCommandStatus->mashMeterIntervals; i++) {
cutOff = actionCommandStatus->mashMeterCutoffs[i + 1];
if (cutOff > fillValue) {
cutOff = fillValue;
}
width = (cutOff * 60 / maxCutOff) * 100;
if (fillValue == cutOff) {
break;
}
}
//difference between current and previous filled value
offsetX = width - actionCommandStatus->barFillWidth;
if (abs(offsetX) >= sMashMeterSmoothDivisor * 100) {
actionCommandStatus->barFillWidth += offsetX / sMashMeterSmoothDivisor;
} else {
actionCommandStatus->barFillWidth = width;
}
offsetX = 0;
for (i = 0; i < actionCommandStatus->mashMeterIntervals; i++) {
cutOff = actionCommandStatus->mashMeterCutoffs[i + 1];
width = (cutOff * 60 / maxCutOff) - offsetX;
r = mashMeter_bgColors[3 * i + 0];
g = mashMeter_bgColors[3 * i + 1];
b = mashMeter_bgColors[3 * i + 2];
startup_draw_prim_rect_COPY(posX + offsetX, posY, posX + offsetX + width, posY + 5, r, g, b, 255);
if (i < actionCommandStatus->mashMeterIntervals - 1) {
r = mashMeter_cutOffColors[3 * i + 0];
g = mashMeter_cutOffColors[3 * i + 1];
b = mashMeter_cutOffColors[3 * i + 2];
startup_draw_prim_rect_COPY(posX + offsetX + width - 1, posY, posX + offsetX + width, posY + 5, r, g, b, 255);
offsetX += width;
} else {
break;
}
}
offsetX = 0;
for (i = 0; i < actionCommandStatus->mashMeterIntervals; i++) {
if (colorMode == 0) {
r = mashMeter_fillColors[3 * i + 0];
g = mashMeter_fillColors[3 * i + 1];
b = mashMeter_fillColors[3 * i + 2];
} else if (colorMode > 0) {
r = 224;
g = 63;
b = 0;
} else if (gGameStatusPtr->frameCounter % 2 != 0){
r = mashMeter_fillColors[3 * i + 0];
g = mashMeter_fillColors[3 * i + 1];
b = mashMeter_fillColors[3 * i + 2];
} else {
r = 250;
g = 175;
b = 0;
}
cutOff = actionCommandStatus->mashMeterCutoffs[i + 1];
if (cutOff > fillValue) {
cutOff = fillValue;
}
filledWidth = cutOff * 60 / maxCutOff - offsetX;
width = actionCommandStatus->barFillWidth / 100 - offsetX;
if (width < 0) {
break;
}
if (filledWidth == 0) {
filledWidth = width;
} else if (cutOff == fillValue) {
filledWidth = width;
} else if (width > filledWidth) {
width = filledWidth;
}
startup_draw_prim_rect_COPY(posX + offsetX, posY, posX + offsetX + width, posY + 5, r, g, b, 255);
offsetX += filledWidth;
if (i >= actionCommandStatus->mashMeterIntervals - 1) {
break;
}
}
}
void func_80268798(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
D_8029FBC0 = arg3;
func_80268284(arg0, arg1, arg2, 0);
void draw_mash_meter_multicolor(s32 posX, s32 posY, s32 fillValue) {
sMashMeterSmoothDivisor = 2;
draw_mash_meter(posX, posY, fillValue, MASH_METER_MODE_MULTI_COLOR);
}
void func_802687BC(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
D_8029FBC0 = 2;
func_80268284(arg0, arg1, arg2, arg3);
void draw_mash_meter_multicolor_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor) {
sMashMeterSmoothDivisor = divisor;
draw_mash_meter(posX, posY, fillValue, MASH_METER_MODE_MULTI_COLOR);
}
void func_802687E4(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4) {
D_8029FBC0 = arg3;
func_80268284(arg0, arg1, arg2, arg4);
void draw_mash_meter_mode(s32 posX, s32 posY, s32 fillValue, s32 colorMode) {
sMashMeterSmoothDivisor = 2;
draw_mash_meter(posX, posY, fillValue, colorMode);
}
void func_8026880C(s32 arg0, s32 arg1, s32 arg2) {
D_8029FBC0 = 2;
func_80268284(arg0, arg1, arg2, -1);
void draw_mash_meter_mode_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor, s32 colorMode) {
sMashMeterSmoothDivisor = divisor;
draw_mash_meter(posX, posY, fillValue, colorMode);
}
void func_80268834(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
D_8029FBC0 = arg3;
func_80268284(arg0, arg1, arg2, -1);
void draw_mash_meter_blink(s32 posX, s32 posY, s32 fillValue) {
sMashMeterSmoothDivisor = 2;
draw_mash_meter(posX, posY, fillValue, MASH_METER_MODE_BLINK);
}
void func_80268858(void) {
void draw_mash_meter_blink_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor) {
sMashMeterSmoothDivisor = divisor;
draw_mash_meter(posX, posY, fillValue, MASH_METER_MODE_BLINK);
}
void action_command_init_status(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
actionCommandStatus->autoSucceed = FALSE;
actionCommandStatus->unk_6A = FALSE;
actionCommandStatus->berserkerEnabled = FALSE;
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) {
if (is_ability_active(ABILITY_RIGHT_ON)) {
@ -244,8 +261,8 @@ void func_80268858(void) {
}
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000) && is_ability_active(ABILITY_BERSERKER)) {
actionCommandStatus->unk_61 = FALSE;
actionCommandStatus->unk_6A = TRUE;
actionCommandStatus->showHud = FALSE;
actionCommandStatus->berserkerEnabled = TRUE;
if (rand_int(100) < 25) {
actionCommandStatus->autoSucceed = TRUE;
@ -259,15 +276,15 @@ void func_80268858(void) {
if (gBattleStatus.flags1 & BS_FLAGS1_1000) {
actionCommandStatus->autoSucceed = TRUE;
actionCommandStatus->unk_61 = FALSE;
actionCommandStatus->showHud = FALSE;
}
}
void func_80268938(void) {
void action_command_update(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
if (gBattleStatus.flags1 & BS_FLAGS1_8000) {
func_80268C9C();
action_command_free();
}
switch (actionCommandStatus->actionCommandID) {
@ -277,67 +294,67 @@ void func_80268938(void) {
action_command_jump_update();
break;
case ACTION_COMMAND_SMASH:
func_802A936C_42236C();
action_command_hammer_update();
break;
case ACTION_COMMAND_FLEE:
func_802A9378_422E48();
action_command_flee_update();
break;
case ACTION_COMMAND_BREAK_FREE:
func_802A92DC_4236CC();
action_command_break_free_update();
break;
case ACTION_COMMAND_WHIRLWIND:
func_802A92F0_423F60();
action_command_whirlwind_update();
break;
case ACTION_COMMAND_STOP_LEECH:
func_802A91F8_425788();
action_command_stop_leech_update();
break;
case ACTION_COMMAND_07:
func_802A9228_425D78();
action_command_07_update();
break;
case ACTION_COMMAND_DIZZY_SHELL:
func_802A928C_4263FC();
action_command_dizzy_shell_update();
break;
case ACTION_COMMAND_FIRE_SHELL:
func_802A9294_426C64();
action_command_fire_shell_update();
break;
case ACTION_COMMAND_0A:
func_802A928C_42763C();
action_command_0A_update();
break;
case ACTION_COMMAND_BOMB:
func_802A928C_427CFC();
action_command_bomb_update();
break;
case ACTION_COMMAND_BODY_SLAM:
func_802A92D4_4285B4();
action_command_body_slam_update();
break;
case ACTION_COMMAND_AIR_LIFT:
func_802A9278_428CE8();
action_command_air_lift_update();
break;
case ACTION_COMMAND_AIR_RAID:
func_802A9294_4295B4();
action_command_air_raid_update();
break;
case ACTION_COMMAND_SQUIRT:
func_802A9208_429F28();
action_command_squirt_update();
break;
case ACTION_COMMAND_POWER_SHOCK:
func_802A9310_42D220();
action_command_power_shock_update();
break;
case ACTION_COMMAND_MEGA_SHOCK:
func_802A92A0_42DCB0();
action_command_mega_shock_update();
break;
case ACTION_COMMAND_SMACK:
func_802A9298_42E638();
action_command_smack_update();
break;
case ACTION_COMMAND_SPINY_SURGE:
func_802A9254_42F074();
action_command_spiny_surge_update();
break;
case ACTION_COMMAND_HURRICANE:
func_802A92A0_42F980();
action_command_hurricane_update();
break;
case ACTION_COMMAND_SPOOK:
func_802A9298_4302B8();
action_command_spook_update();
break;
case ACTION_COMMAND_WATER_BLOCK:
func_802A948C_42A97C();
action_command_water_block_update();
break;
case ACTION_COMMAND_TIDAL_WAVE:
action_command_tidal_wave_update();
@ -347,155 +364,155 @@ void func_80268938(void) {
}
}
void func_80268AF8(void) {
void action_command_draw(void) {
switch (gActionCommandStatus.actionCommandID) {
case ACTION_COMMAND_NONE:
break;
case ACTION_COMMAND_JUMP:
action_command_jump_draw_hud_elements();
action_command_jump_draw();
break;
case ACTION_COMMAND_SMASH:
action_command_hammer_draw_hud_elements();
action_command_hammer_draw();
break;
case ACTION_COMMAND_FLEE:
action_command_flee_draw_hud_elements();
action_command_flee_draw();
break;
case ACTION_COMMAND_BREAK_FREE:
action_command_break_free_draw_hud_elements();
action_command_break_free_draw();
break;
case ACTION_COMMAND_WHIRLWIND:
action_command_whirlwind_draw_hud_elements();
action_command_whirlwind_draw();
break;
case ACTION_COMMAND_STOP_LEECH:
action_command_stop_leech_draw_hud_elements();
action_command_stop_leech_draw();
break;
case ACTION_COMMAND_07:
action_command_07_draw_hud_elements();
action_command_07_draw();
break;
case ACTION_COMMAND_DIZZY_SHELL:
action_command_dizzy_shell_draw_hud_elements();
action_command_dizzy_shell_draw();
break;
case ACTION_COMMAND_FIRE_SHELL:
action_command_fire_shell_draw_hud_elements();
action_command_fire_shell_draw();
break;
case ACTION_COMMAND_0A:
action_command_0A_draw_hud_elements();
action_command_0A_draw();
break;
case ACTION_COMMAND_BOMB:
action_command_bomb_draw_hud_elements();
action_command_bomb_draw();
break;
case ACTION_COMMAND_BODY_SLAM:
action_command_body_slam_draw_hud_elements();
action_command_body_slam_draw();
break;
case ACTION_COMMAND_AIR_LIFT:
action_command_air_lift_draw_hud_elements();
action_command_air_lift_draw();
break;
case ACTION_COMMAND_AIR_RAID:
action_command_air_raid_draw_hud_elements();
action_command_air_raid_draw();
break;
case ACTION_COMMAND_SQUIRT:
action_command_squirt_draw_hud_elements();
action_command_squirt_draw();
break;
case ACTION_COMMAND_POWER_SHOCK:
action_command_power_shock_draw_hud_elements();
action_command_power_shock_draw();
break;
case ACTION_COMMAND_MEGA_SHOCK:
action_command_mega_shock_draw_hud_elements();
action_command_mega_shock_draw();
break;
case ACTION_COMMAND_SMACK:
action_command_smack_draw_hud_elements();
action_command_smack_draw();
break;
case ACTION_COMMAND_SPINY_SURGE:
action_command_spiny_surge_draw_hud_elements();
action_command_spiny_surge_draw();
break;
case ACTION_COMMAND_HURRICANE:
action_command_hurricane_draw_hud_elements();
action_command_hurricane_draw();
break;
case ACTION_COMMAND_SPOOK:
action_command_spook_draw_hud_elements();
action_command_spook_draw();
break;
case ACTION_COMMAND_WATER_BLOCK:
action_command_water_block_draw_hud_elements();
action_command_water_block_draw();
break;
case ACTION_COMMAND_TIDAL_WAVE:
action_command_tidal_wave_draw_hud_elements();
action_command_tidal_wave_draw();
}
}
void func_80268C9C(void) {
void action_command_free(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
switch (actionCommandStatus->actionCommandID) {
case ACTION_COMMAND_NONE:
break;
case ACTION_COMMAND_JUMP:
action_command_jump_free_hud_elements();
action_command_jump_free();
break;
case ACTION_COMMAND_SMASH:
action_command_hammer_free_hud_elements();
action_command_hammer_free();
break;
case ACTION_COMMAND_FLEE:
action_command_flee_free_hud_elements();
action_command_flee_free();
break;
case ACTION_COMMAND_BREAK_FREE:
action_command_break_free_free_hud_elements();
action_command_break_free_free();
break;
case ACTION_COMMAND_WHIRLWIND:
action_command_whirlwind_free_hud_elements();
action_command_whirlwind_free();
break;
case ACTION_COMMAND_STOP_LEECH:
action_command_jump_draw_hud_elements();
action_command_jump_draw();
break;
case ACTION_COMMAND_07:
action_command_07_free_hud_elements();
action_command_07_free();
break;
case ACTION_COMMAND_DIZZY_SHELL:
action_command_dizzy_shell_free_hud_elements();
action_command_dizzy_shell_free();
break;
case ACTION_COMMAND_FIRE_SHELL:
action_command_fire_shell_free_hud_elements();
action_command_fire_shell_free();
break;
case ACTION_COMMAND_0A:
action_command_0A_free_hud_elements();
action_command_0A_free();
break;
case ACTION_COMMAND_BOMB:
action_command_bomb_free_hud_elements();
action_command_bomb_free();
break;
case ACTION_COMMAND_BODY_SLAM:
action_command_body_slam_free_hud_elements();
action_command_body_slam_free();
break;
case ACTION_COMMAND_AIR_LIFT:
action_command_air_lift_free_hud_elements();
action_command_air_lift_free();
break;
case ACTION_COMMAND_AIR_RAID:
action_command_air_raid_free_hud_elements();
action_command_air_raid_free();
break;
case ACTION_COMMAND_SQUIRT:
action_command_squirt_free_hud_elements();
action_command_squirt_free();
break;
case ACTION_COMMAND_POWER_SHOCK:
action_command_power_shock_free_hud_elements();
action_command_power_shock_free();
break;
case ACTION_COMMAND_MEGA_SHOCK:
action_command_mega_shock_free_hud_elements();
action_command_mega_shock_free();
break;
case ACTION_COMMAND_SMACK:
action_command_smack_free_hud_elements();
action_command_smack_free();
break;
case ACTION_COMMAND_SPINY_SURGE:
action_command_spiny_surge_free_hud_elements();
action_command_spiny_surge_free();
break;
case ACTION_COMMAND_HURRICANE:
action_command_hurricane_free_hud_elements();
action_command_hurricane_free();
break;
case ACTION_COMMAND_SPOOK:
action_command_spook_free_hud_elements();
action_command_spook_free();
break;
case ACTION_COMMAND_WATER_BLOCK:
action_command_water_block_free_hud_elements();
action_command_water_block_free();
break;
case ACTION_COMMAND_TIDAL_WAVE:
action_command_tidal_wave_free_hud_elements();
action_command_tidal_wave_free();
break;
}
@ -509,7 +526,7 @@ void func_80268C9C(void) {
void func_80268E88(void) {
ActionCommandStatus* actionCmdStatus = &gActionCommandStatus;
actionCmdStatus->unk_00 = create_generic_entity_frontUI(func_80268938, func_80268AF8);
actionCmdStatus->workerID = create_generic_entity_frontUI(action_command_update, action_command_draw);
actionCmdStatus->actionCommandID = 0;
}
@ -527,12 +544,12 @@ s32 check_block_input(s32 buttonMask) {
battleStatus->blockResult = 0; // Fail
if (battleStatus->unk_83 == -1 && (battleStatus->flags1 & BS_FLAGS1_2000000)) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_TUTORIAL_BLOCK && (battleStatus->flags1 & BS_FLAGS1_2000000)) {
battleStatus->blockResult = 1;
return TRUE;
}
if (!battleStatus->unk_83 || (gGameStatusPtr->demoFlags & 1)) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED || (gGameStatusPtr->demoFlags & 1)) {
return FALSE;
}
@ -639,8 +656,8 @@ void func_80269160(void) {
}
}
ApiStatus func_8026919C(Evt* script, s32 isInitialCall) {
gBattleStatus.unk_434 = (s32*) evt_get_variable(script, *script->ptrReadPos);
ApiStatus SetActionDifficultyTable(Evt* script, s32 isInitialCall) {
gBattleStatus.actionCmdDifficultyTable = (s32*) evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
@ -667,17 +684,17 @@ ApiStatus SetActionSuccess(Evt* script, s32 isInitialCall) {
}
ApiStatus SetActionCommandMode(Evt* script, s32 isInitialCall) {
gBattleStatus.unk_83 = evt_get_variable(script, *script->ptrReadPos);
gBattleStatus.actionCommandMode = evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
ApiStatus GetActionCommandMode(Evt* script, s32 isInitialCall) {
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.unk_83);
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionCommandMode);
return ApiStatus_DONE2;
}
ApiStatus func_80269344(Evt* script, s32 isInitialCall) {
gActionCommandStatus.unk_6C = evt_get_variable(script, *script->ptrReadPos);
ApiStatus SetActionHudPrepareTime(Evt* script, s32 isInitialCall) {
gActionCommandStatus.hudPrepareTime = evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
@ -711,7 +728,7 @@ ApiStatus CloseActionCommandInfo(Evt* script, s32 isInitialCall) {
case ACTION_COMMAND_STOP_LEECH:
return ApiStatus_DONE2;
default:
func_80268C9C();
action_command_free();
return ApiStatus_BLOCK;
}
}
@ -724,7 +741,7 @@ ApiStatus CloseActionCommandInfo(Evt* script, s32 isInitialCall) {
ApiStatus func_80269470(Evt* script, s32 isInitialCall) {
if (isInitialCall) {
func_80268C9C();
action_command_free();
return ApiStatus_BLOCK;
}
@ -732,13 +749,13 @@ ApiStatus func_80269470(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_802694A4(Evt* script, s32 isInitialCall) {
ApiStatus ShowActionHud(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
if (evt_get_variable(script, *script->ptrReadPos) == 0) {
actionCommandStatus->unk_61 = FALSE;
actionCommandStatus->showHud = FALSE;
} else {
actionCommandStatus->unk_61 = TRUE;
actionCommandStatus->showHud = TRUE;
}
return ApiStatus_DONE2;
}
@ -764,12 +781,12 @@ ApiStatus GetBlockResult(Evt* script, s32 isInitialCall) {
}
ApiStatus GetActionResult(Evt* script, s32 isInitialCall) {
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.unk_84);
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionResult);
return ApiStatus_DONE2;
}
ApiStatus SetActionResult(Evt* script, s32 isInitialCall) {
gBattleStatus.unk_84 = evt_get_variable(script, *script->ptrReadPos);
gBattleStatus.actionResult = evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}

175
src/battle/action_cmd.h Normal file
View File

@ -0,0 +1,175 @@
#ifndef _BATTLE_ACTION_CMD_H_
#define _BATTLE_ACTION_CMD_H_
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd/jump.h"
#include "battle/action_cmd/hammer.h"
#include "battle/action_cmd/flee.h"
#include "battle/action_cmd/break_free.h"
#include "battle/action_cmd/whirlwind.h"
#include "battle/action_cmd/stop_leech.h"
#include "battle/action_cmd/07.h"
#include "battle/action_cmd/dizzy_shell.h"
#include "battle/action_cmd/fire_shell.h"
#include "battle/action_cmd/0A.h"
#include "battle/action_cmd/bomb.h"
#include "battle/action_cmd/body_slam.h"
#include "battle/action_cmd/air_lift.h"
#include "battle/action_cmd/air_raid.h"
#include "battle/action_cmd/squirt.h"
#include "battle/action_cmd/power_shock.h"
#include "battle/action_cmd/mega_shock.h"
#include "battle/action_cmd/smack.h"
#include "battle/action_cmd/spiny_surge.h"
#include "battle/action_cmd/hurricane.h"
#include "battle/action_cmd/spook.h"
#include "battle/action_cmd/water_block.h"
#include "battle/action_cmd/tidal_wave.h"
enum MashMeterColorModes {
MASH_METER_MODE_BLINK = -1,
MASH_METER_MODE_MULTI_COLOR = 0,
MASH_METER_MODE_ONE_COLOR = 1,
};
enum ActionCommandModes {
ACTION_COMMAND_MODE_TUTORIAL_BLOCK = -1,
ACTION_COMMAND_MODE_NOT_LEARNED = 0,
ACTION_COMMAND_MODE_LEARNED = 1,
ACTION_COMMAND_MODE_TUTORIAL = 2,
ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT = 3,
};
typedef struct ActionCommandStatus {
/* 0x00 */ s32 workerID;
/* 0x04 */ s32 hudElements[16];
/* 0x44 */ s16 barFillLevel; // full = 10000
/* 0x46 */ s16 thresholdLevel;
/* 0x48 */ s16 barFillWidth; // X100
/* 0x4A */ s16 actionCommandID;
/* 0x4C */ s16 state;
/* 0x4E */ s16 prepareTime;
/* 0x50 */ s16 difficulty; // values from 0 to 7
/* 0x52 */ s16 duration;
/* 0x54 */ s16 frameCounter;
/* 0x56 */ s16 hudPosX;
/* 0x58 */ s16 hudPosY;
/* 0x5A */ s16 unk_5A;
/* 0x5C */ s8 unk_5C;
/* 0x5D */ s8 unk_5D;
/* 0x5E */ s8 autoSucceed;
/* 0x5F */ s8 hammerMissedStart;
/* 0x60 */ s8 wrongButtonPressed;
/* 0x61 */ s8 showHud;
/* 0x62 */ s8 playHammerSounds;
/* 0x63 */ s8 unk_63;
/* 0x64 */ s16 targetWeakness; // chance of applying special status, the more the easier it is to fill the bar
/* 0x66 */ s16 thresholdMoveDir;
/* 0x68 */ s16 isBarFilled;
/* 0x6A */ s16 berserkerEnabled;
/* 0x6C */ s16 hudPrepareTime;
/* 0x6E */ s16 hitsTakenIsMax;
/* 0x70 */ s16 lookBackCounter;
/* 0x72 */ s16 wrongInputFrameCounter;
/* 0x74 */ s16 mashMeterCutoffs[6]; // upper bounds for each interval
/* 0x80 */ s8 mashMeterIntervals;
} ActionCommandStatus;
extern ActionCommandStatus gActionCommandStatus; // TODO BSS?
extern s32 actionCmdTableJump[];
extern s32 actionCmdTableHammer[];
extern s32 actionCmdTableFlee[];
extern s32 actionCmdTableBreakFree[];
extern s32 actionCmdTableWhirlwind[];
extern s32 actionCmdTableStopLeech[];
extern s32 actionCmdTable07[];
extern s32 actionCmdTableDizzyShell[];
extern s32 actionCmdTableFireShell[];
extern s32 actionCmdTable0A[];
extern s32 actionCmdTableBomb[];
extern s32 actionCmdTableBodySlam[];
extern s32 actionCmdTableAirLift[];
extern s32 actionCmdTableAirRaid[];
extern s32 actionCmdTableSquirt[];
extern s32 actionCmdTablePowerShock[];
extern s32 actionCmdTableMegaShock[];
extern s32 actionCmdTableSmack[];
extern s32 actionCmdTableSpinySurge[];
extern s32 actionCmdTableHurricane[];
extern s32 actionCmdTableSpook[];
extern s32 actionCmdTableWaterBlock[];
extern s32 actionCmdTableTidalWave[];
extern HudScript HES_100pct;
extern HudScript HES_AButton;
extern HudScript HES_AButtonDown;
extern HudScript HES_BButton;
extern HudScript HES_BButtonHeld;
extern HudScript HES_BlueMeter;
extern HudScript HES_CDownButtonHeld;
extern HudScript HES_FillGaugeResult;
extern HudScript HES_MashAButton;
extern HudScript HES_MashBButton1;
extern HudScript HES_PressAButton;
extern HudScript HES_PressBButton;
extern HudScript HES_PressCDownButton;
extern HudScript HES_RightOn;
extern HudScript HES_RunningAway;
extern HudScript HES_RunAwayOK;
extern HudScript HES_StickHoldLeft;
extern HudScript HES_StickMashLeft;
extern HudScript HES_StickNeutral;
extern HudScript HES_StickTapNeutral;
extern HudScript HES_TimingBar1Chance;
extern HudScript HES_TimingBar3Chances;
extern HudScript HES_TimingCharge1;
extern HudScript HES_TimingCharge2;
extern HudScript HES_TimingCharge3;
extern HudScript HES_TimingCharge4a;
extern HudScript HES_TimingCharge4b;
extern HudScript HES_TimingCharge4c;
extern HudScript HES_TimingOK;
extern HudScript HES_TimingMiss;
extern HudScript HES_TimingReady;
extern HudScript HES_TimingWait;
void action_command_init_status(void);
void action_command_free(void);
void func_80268E88(void);
void func_80269118(void);
void func_80269160(void);
void draw_mash_meter_multicolor_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor);
void draw_mash_meter_blink(s32 posX, s32 posY, s32 fillValue);
void draw_mash_meter_multicolor(s32 posX, s32 posY, s32 fillValue);
void draw_mash_meter_mode_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor, s32 colorMode);
void draw_mash_meter_blink_with_divisor(s32 posX, s32 posY, s32 fillValue, s32 divisor);
s32 adjust_action_command_difficulty(s32 arg0);
s32 check_block_input(s32 buttonMask);
API_CALLABLE(LoadActionCommand);
API_CALLABLE(SetActionDifficultyTable);
API_CALLABLE(SetupMashMeter);
API_CALLABLE(GetActionSuccess);
API_CALLABLE(SetActionSuccess);
API_CALLABLE(SetActionCommandMode);
API_CALLABLE(GetActionCommandMode);
API_CALLABLE(SetActionHudPrepareTime);
API_CALLABLE(GetCommandAutoSuccess);
API_CALLABLE(SetCommandAutoSuccess);
API_CALLABLE(func_802693F0);
API_CALLABLE(CloseActionCommandInfo);
API_CALLABLE(func_80269470);
API_CALLABLE(ShowActionHud);
API_CALLABLE(GetActionSuccessCopy);
API_CALLABLE(func_80269524);
API_CALLABLE(func_80269550);
API_CALLABLE(GetBlockResult);
API_CALLABLE(GetActionResult);
API_CALLABLE(SetActionResult);
API_CALLABLE(func_80269600);
API_CALLABLE(func_8026962C);
#endif

View File

@ -1,18 +1,13 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_07
extern s32 D_80294280;
extern s32 D_802A9620;
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern HudScript HES_MashAButton;
extern HudScript HES_RunAwayOK;
BSS s32 D_802A9620;
s32 func_8024FAFC(s32);
void func_8024FAFC(void);
ApiStatus func_802A9000_425B50(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
@ -20,38 +15,38 @@ ApiStatus func_802A9000_425B50(Evt* script, s32 isInitialCall) {
s32 hudElementTemp;
battleStatus->unk_82 = 5;
battleStatus->unk_434 = &D_80294280;
battleStatus->actionCmdDifficultyTable = actionCmdTable07;
actionCommandStatus->autoSucceed = 0;
actionCommandStatus->actionCommandID = 7;
actionCommandStatus->actionCommandID = ACTION_COMMAND_07;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = evt_get_variable(script, *args);
actionCommandStatus->hudElementX = -48;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->barFillWidth = 0;
D_802A9620 = 0;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosY = 80;
hudElement = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
// Weird use of an extra temp settles regalloc here.
hudElementTemp = hud_element_create(&HES_BlueMeter);
hudElement = hudElementTemp;
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_RunAwayOK);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
@ -60,30 +55,30 @@ ApiStatus func_802A9000_425B50(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_802A916C_425CBC(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32* args = script->ptrReadPos;
s32 mask;
actionCommandStatus->autoSucceed = 0;
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_8024FAFC(battleStatus->flags1);
func_8024FAFC();
actionCommandStatus->state = 10;
return ApiStatus_DONE2;
}
void func_802A9228_425D78(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -93,20 +88,20 @@ void func_802A9228_425D78(void) {
btl_set_popup_duration(99);
id = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[2];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
@ -115,20 +110,20 @@ void func_802A9228_425D78(void) {
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 31, actionCommandStatus->hudElementY + 14);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudPosX + 31, actionCommandStatus->hudPosY + 14);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
@ -136,14 +131,14 @@ void func_802A9228_425D78(void) {
battleStatus->actionSuccess = 0;
D_802A9620 = 1;
actionCommandStatus->unk_5D = 0;
actionCommandStatus->state = 0xB;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->state = 11;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
// fallthrough
case 11:
btl_set_popup_duration(99);
if (battleStatus->currentButtonsPressed & BUTTON_A) {
s32 fillAmt = battleStatus->unk_434[actionCommandStatus->unk_50] * 6;
s32 fillAmt = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 6;
if (actionCommandStatus->unk_5D == 0) {
actionCommandStatus->barFillLevel += fillAmt;
@ -163,27 +158,27 @@ void func_802A9228_425D78(void) {
}
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->state = 0xC;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 hudX;
s32 hudY;
@ -195,9 +190,9 @@ void N(draw_hud_elements)(void) {
hud_element_get_render_pos(hudElement1, &hudX, &hudY);
if (D_802A9620 == 0) {
func_80268798(hudX, hudY, actionCommandStatus->barFillLevel / 100, 1);
draw_mash_meter_multicolor_with_divisor(hudX, hudY, actionCommandStatus->barFillLevel / 100, 1);
} else {
func_80268798(hudX, hudY, actionCommandStatus->barFillLevel / 100, 2);
draw_mash_meter_multicolor_with_divisor(hudX, hudY, actionCommandStatus->barFillLevel / 100, 2);
}
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);

View File

@ -3,6 +3,10 @@
#include "common_structs.h"
void func_802A9228_425D78(void);
ApiStatus action_command_07_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_07_start(Evt* script, s32 isInitialCall);
void action_command_07_update(void);
void action_command_07_draw(void);
void action_command_07_free(void);
#endif

View File

@ -1,65 +1,59 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_0A
extern s32 D_802942E0;
extern HudScript HES_MashAButton;
extern HudScript HES_100pct;
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
ApiStatus func_802A9000_4273B0(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 hudElement;
battleStatus->unk_82 = 100;
battleStatus->unk_434 = &D_802942E0;
battleStatus->actionCmdDifficultyTable = actionCmdTable0A;
battleStatus->unk_86 = 127;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = 10;
actionCommandStatus->unk_61 = 1;
actionCommandStatus->actionCommandID = ACTION_COMMAND_0A;
actionCommandStatus->showHud = TRUE;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
hudElement = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
#include "common/MashActionCommandInit.inc.c"
#include "common/MashActionCommandStart.inc.c"
void func_802A928C_42763C(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -71,13 +65,13 @@ void func_802A928C_42763C(void) {
id = actionCommandStatus->hudElements[0];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
@ -86,46 +80,46 @@ void func_802A928C_42763C(void) {
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->state = 0xB;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->state = 11;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
// fallthrough
case 11:
btl_set_popup_duration(99);
if (battleStatus->currentButtonsPressed & BUTTON_A) {
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] * 15;
actionCommandStatus->barFillLevel += battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 15;
}
if (actionCommandStatus->barFillLevel >= 10000) {
id = actionCommandStatus->hudElements[2];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(id, 2);
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
@ -147,15 +141,15 @@ void func_802A928C_42763C(void) {
}
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->state = 0xC;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}

View File

@ -3,6 +3,10 @@
#include "common_structs.h"
void func_802A928C_42763C(void);
ApiStatus action_command_0A_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_0A_start(Evt* script, s32 isInitialCall);
void action_command_0A_update(void);
void action_command_0A_draw(void);
void action_command_0A_free(void);
#endif

View File

@ -1,83 +1,74 @@
#include "common.h"
#include "effects.h"
#include "battle/battle.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_air_lift
void func_80268834(s32, s32, s16, s32);
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern HudScript HES_MashAButton;
extern HudScript HES_100pct;
extern s32 D_80294340;
s32 D_802A9852_4292C0[] = { 0, 25, 50, 75, 75, 0, 0, 0 };
BSS s32 air_lift_bss_0;
ApiStatus func_802A9000_428A70(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
s32 *args = script->ptrReadPos;
BattleStatus* battleStatus = &gBattleStatus;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 hudElement;
battleStatus->unk_434 = &D_80294340;
battleStatus->actionCmdDifficultyTable = actionCmdTableAirLift;
battleStatus->unk_82 = 0;
battleStatus->unk_86 = 127;
func_80268858();
action_command_init_status();
actionCommandStatus->unk_5A = evt_get_variable(script, *args++);
actionCommandStatus->actionCommandID = ACTION_COMMAND_AIR_LIFT;
actionCommandStatus->unk_61 = 1;
actionCommandStatus->showHud = TRUE;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_84 = 0;
actionCommandStatus->unk_6C = 30;
actionCommandStatus->hudElementX = -48;
battleStatus->actionResult = 0;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->hudPosX = -48;
air_lift_bss_0 = 0;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosY = 80;
hudElement = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
ApiStatus func_802A9184_428BF4(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
u8 mashMeterCutoff;
func_80268858();
action_command_init_status();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->easyVersion = evt_get_variable(script, *args++);
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->targetWeakness = evt_get_variable(script, *args++);
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 127;
@ -93,7 +84,7 @@ ApiStatus func_802A9184_428BF4(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
void func_802A9278_428CE8(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -104,13 +95,13 @@ void func_802A9278_428CE8(void) {
id = actionCommandStatus->hudElements[0];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
@ -119,36 +110,36 @@ void func_802A9278_428CE8(void) {
case 1:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_6C != 0) {
actionCommandStatus->unk_6C--;
if (actionCommandStatus->hudPrepareTime != 0) {
actionCommandStatus->hudPrepareTime--;
return;
}
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
air_lift_bss_0 = 1;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 0xB;
actionCommandStatus->state = 11;
// fallthrough
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
if (actionCommandStatus->unk_5A != 0) {
s32 a = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
@ -164,9 +155,9 @@ void func_802A9278_428CE8(void) {
}
}
if (battleStatus->unk_83 != 0 && (battleStatus->currentButtonsPressed & BUTTON_A)) {
if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_NOT_LEARNED && (battleStatus->currentButtonsPressed & BUTTON_A)) {
if (actionCommandStatus->unk_5A != 0) {
s32 a = battleStatus->unk_434[actionCommandStatus->unk_50];
s32 a = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
s32 b = actionCommandStatus->unk_5A * 820;
actionCommandStatus->barFillLevel += (a * b) / 10000;
@ -181,28 +172,28 @@ void func_802A9278_428CE8(void) {
if (actionCommandStatus->barFillLevel > 10000) {
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
actionCommandStatus->isBarFilled = TRUE;
id = actionCommandStatus->hudElements[2];
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(id, 2);
}
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
if (battleStatus->unk_84 < battleStatus->actionSuccess) {
battleStatus->unk_84 = battleStatus->actionSuccess;
if (battleStatus->actionResult < battleStatus->actionSuccess) {
battleStatus->actionResult = battleStatus->actionSuccess;
}
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->actionSuccess * 12);
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionSuccess * 12);
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
if (actionCommandStatus->unk_5A == 0) {
battleStatus->unk_84 = 0;
battleStatus->actionResult = 0;
}
battleStatus->actionSuccess = battleStatus->unk_84;
battleStatus->actionSuccess = battleStatus->actionResult;
if (rand_int(99) < battleStatus->actionSuccess) {
battleStatus->unk_86 = 1;
battleStatus->actionSuccess = 1;
@ -216,8 +207,8 @@ void func_802A9278_428CE8(void) {
}
btl_set_popup_duration(0);
sfx_stop_sound(SOUND_80000041);
actionCommandStatus->unk_54 = 20;
actionCommandStatus->state = 0xC;
actionCommandStatus->frameCounter = 20;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->unk_5A == 0) {
@ -226,22 +217,22 @@ void func_802A9278_428CE8(void) {
actionCommandStatus->barFillLevel = 0;
}
}
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 hudX;
s32 hudY;
s32 hudElement1;
if (gBattleStatus.unk_83 != 0) {
if (gBattleStatus.actionCommandMode != ACTION_COMMAND_MODE_NOT_LEARNED) {
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
}
@ -250,11 +241,11 @@ void N(draw_hud_elements)(void) {
hud_element_get_render_pos(hudElement1, &hudX, &hudY);
if (air_lift_bss_0 == 0) {
func_80268798(hudX, hudY, actionCommandStatus->barFillLevel / 100, 1);
} else if (actionCommandStatus->unk_68 == 0) {
func_80268798(hudX, hudY, actionCommandStatus->barFillLevel / 100, 4);
draw_mash_meter_multicolor_with_divisor(hudX, hudY, actionCommandStatus->barFillLevel / 100, 1);
} else if (!actionCommandStatus->isBarFilled) {
draw_mash_meter_multicolor_with_divisor(hudX, hudY, actionCommandStatus->barFillLevel / 100, 4);
} else {
func_80268834(hudX, hudY, actionCommandStatus->barFillLevel / 100, 4);
draw_mash_meter_blink_with_divisor(hudX, hudY, actionCommandStatus->barFillLevel / 100, 4);
}
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);

View File

@ -3,8 +3,10 @@
#include "common_structs.h"
ApiStatus func_802A9000_428A70(Evt* script, s32 isInitialCall);
ApiStatus func_802A9184_428BF4(Evt* script, s32 isInitialCall);
void func_802A9278_428CE8(void);
ApiStatus action_command_air_lift_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_air_lift_start(Evt* script, s32 isInitialCall);
void action_command_air_lift_update(void);
void action_command_air_lift_draw(void);
void action_command_air_lift_free(void);
#endif

View File

@ -1,73 +1,66 @@
#include "common.h"
#include "battle/battle.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_air_raid
extern HudScript HES_BlueMeter;
extern HudScript HES_StickNeutral;
extern HudScript HES_100pct;
extern HudScript HES_StickMashLeft;
extern s32 D_80294360;
s32 D_802A9970_429C90[] = { 0, 25, 50, 75, 75, };
s32 D_802A9984_429CA4[] = { 40, 70, 99, 200, };
s32 D_802A9994_429CB4[] = { 35, 60, 80, 99, 200, };
s32 D_802A99A8_429CC8[] = { 35, 35, 60, 80, 99, 200, };
ApiStatus func_802A9000_429320(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 hudElement;
battleStatus->unk_82 = 100;
battleStatus->unk_434 = &D_80294360;
battleStatus->actionCmdDifficultyTable = actionCmdTableAirRaid;
battleStatus->unk_86 = 127;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = 14;
actionCommandStatus->unk_61 = 1;
actionCommandStatus->unk_6C = 30;
actionCommandStatus->actionCommandID = ACTION_COMMAND_AIR_RAID;
actionCommandStatus->showHud = TRUE;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
hudElement = hud_element_create(&HES_StickNeutral);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
#include "common/MashActionCommandInit.inc.c"
#include "common/MashActionCommandStart.inc.c"
void func_802A9294_4295B4(Evt* script, s32 isInitialCall) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Actor* partner = battleStatus->partnerActor;
@ -80,13 +73,13 @@ void func_802A9294_4295B4(Evt* script, s32 isInitialCall) {
id = actionCommandStatus->hudElements[0];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
@ -95,24 +88,24 @@ void func_802A9294_4295B4(Evt* script, s32 isInitialCall) {
case 1:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_6C != 0) {
actionCommandStatus->unk_6C--;
if (actionCommandStatus->hudPrepareTime != 0) {
actionCommandStatus->hudPrepareTime--;
return;
}
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
@ -120,13 +113,13 @@ void func_802A9294_4295B4(Evt* script, s32 isInitialCall) {
actionCommandStatus->barFillLevel = 0;
battleStatus->unk_85 = 0;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
// fallthrough
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
actionCommandStatus->barFillLevel -= D_802A9970_429C90[actionCommandStatus->barFillLevel / cutoff / 20];
@ -134,17 +127,17 @@ void func_802A9294_4295B4(Evt* script, s32 isInitialCall) {
actionCommandStatus->barFillLevel = 0;
}
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
if ( // todo remove assignment from conditional
(!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) || (actionCommandStatus->unk_5C = 1, !(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT))) &&
(actionCommandStatus->unk_5C != 0))
{
actionCommandStatus->barFillLevel += (battleStatus->unk_434[actionCommandStatus->unk_50] * 850) / 100;
actionCommandStatus->barFillLevel += (battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 850) / 100;
actionCommandStatus->unk_5C = 0;
}
if (battleStatus->currentButtonsPressed & BUTTON_STICK_RIGHT) {
actionCommandStatus->barFillLevel -= (battleStatus->unk_434[actionCommandStatus->unk_50] * 850) / 100;
actionCommandStatus->barFillLevel -= (battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 850) / 100;
}
}
}
@ -156,44 +149,44 @@ void func_802A9294_4295B4(Evt* script, s32 isInitialCall) {
if (actionCommandStatus->barFillLevel > 10000) {
id = actionCommandStatus->hudElements[2];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(id, 2);
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionResult * 12);
switch (partner->actorBlueprint->level) {
case 0:
if (battleStatus->unk_84 >= D_802A9984_429CA4[battleStatus->unk_85]) {
if (battleStatus->actionResult >= D_802A9984_429CA4[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && battleStatus->unk_84 < D_802A9984_429CA4[battleStatus->unk_85 - 1]) {
if (battleStatus->unk_85 > 0 && battleStatus->actionResult < D_802A9984_429CA4[battleStatus->unk_85 - 1]) {
battleStatus->unk_85--;
}
break;
case 1:
if (battleStatus->unk_84 >= D_802A9994_429CB4[battleStatus->unk_85]) {
if (battleStatus->actionResult >= D_802A9994_429CB4[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && battleStatus->unk_84 < D_802A9994_429CB4[battleStatus->unk_85 - 1]) {
if (battleStatus->unk_85 > 0 && battleStatus->actionResult < D_802A9994_429CB4[battleStatus->unk_85 - 1]) {
battleStatus->unk_85--;
}
break;
case 2:
if (battleStatus->unk_84 >= D_802A99A8_429CC8[battleStatus->unk_85]) {
if (battleStatus->actionResult >= D_802A99A8_429CC8[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && battleStatus->unk_84 < D_802A99A8_429CC8[battleStatus->unk_85 - 1]) {
if (battleStatus->unk_85 > 0 && battleStatus->actionResult < D_802A99A8_429CC8[battleStatus->unk_85 - 1]) {
battleStatus->unk_85--;
}
break;
}
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
@ -216,15 +209,15 @@ void func_802A9294_4295B4(Evt* script, s32 isInitialCall) {
btl_set_popup_duration(0);
sfx_stop_sound(SOUND_80000041);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}

View File

@ -3,8 +3,10 @@
#include "common_structs.h"
ApiStatus func_802A9000_429320(Evt* script, s32 isInitialCall);
ApiStatus action_command_air_raid_MashActionCommandInit(Evt* script, s32 isInitialCall);
void func_802A9294_4295B4(void);
ApiStatus action_command_air_raid_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_air_raid_start(Evt* script, s32 isInitialCall);
void action_command_air_raid_update(void);
void action_command_air_raid_draw(void);
void action_command_air_raid_free(void);
#endif

View File

@ -1,70 +1,62 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_body_slam
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern HudScript HES_AButtonDown;
extern HudScript HES_TimingWait;
extern HudScript HES_TimingReady;
extern HudScript HES_FillGaugeResult;
extern s32 D_80294320;
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
battleStatus->unk_82 = 100;
battleStatus->unk_434 = &D_80294320;
battleStatus->actionCmdDifficultyTable = actionCmdTableBodySlam;
battleStatus->unk_86 = 127;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_BODY_SLAM;
actionCommandStatus->unk_61 = 1;
actionCommandStatus->showHud = TRUE;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_FillGaugeResult);
actionCommandStatus->hudElements[3] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_TimingWait);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 41, actionCommandStatus->hudPosY + 22);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
return ApiStatus_DONE2;
}
#include "common/MashActionCommandInit.inc.c"
#include "common/MashActionCommandStart.inc.c"
void func_802A92D4_4285B4(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -76,25 +68,25 @@ void func_802A92D4_4285B4(void) {
id = actionCommandStatus->hudElements[0];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[2];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[3];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
@ -102,25 +94,25 @@ void func_802A92D4_4285B4(void) {
break;
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX + 42, actionCommandStatus->hudElementY + 24);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudPosX + 41, actionCommandStatus->hudPosY + 22);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudPosX + 42, actionCommandStatus->hudPosY + 24);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_AButtonDown);
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_46 = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->thresholdLevel = 0;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
case 11:
@ -128,32 +120,32 @@ void func_802A92D4_4285B4(void) {
if (battleStatus->currentButtonsDown & BUTTON_A) {
actionCommandStatus->barFillLevel += 154;
actionCommandStatus->unk_46 += 154;
actionCommandStatus->thresholdLevel += 154;
} else {
actionCommandStatus->unk_54 = 0;
actionCommandStatus->frameCounter = 0;
}
if (actionCommandStatus->barFillLevel >= 10000) {
actionCommandStatus->barFillLevel = 10000;
hud_element_set_script(actionCommandStatus->hudElements[2], &HES_TimingReady);
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_AButton);
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
sfx_play_sound(SOUND_234);
actionCommandStatus->unk_68 = 1;
actionCommandStatus->isBarFilled = TRUE;
}
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionResult * 12);
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
do {
if (actionCommandStatus->unk_46 < 10000) {
if (actionCommandStatus->thresholdLevel < 10000) {
battleStatus->actionSuccess = -1;
} else if (actionCommandStatus->unk_46 - (battleStatus->unk_434[actionCommandStatus->unk_50] * 154) >= 10309) {
} else if (actionCommandStatus->thresholdLevel - (battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 154) >= 10309) {
battleStatus->actionSuccess = -1;
} else {
battleStatus->actionSuccess = 1;
@ -166,20 +158,20 @@ void func_802A92D4_4285B4(void) {
}
btl_set_popup_duration(0);
sfx_stop_sound(SOUND_80000041);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
s32 x, y;
s32 hudElement;
@ -188,11 +180,11 @@ void N(draw_hud_elements)(void) {
hud_element_draw_clipped(hudElement);
hud_element_get_render_pos(hudElement, &x, &y);
hud_element_draw_clipped(gActionCommandStatus.hudElements[3]);
func_80268770(x, y, gActionCommandStatus.barFillLevel / 100);
draw_mash_meter_multicolor(x, y, gActionCommandStatus.barFillLevel / 100);
hud_element_draw_clipped(gActionCommandStatus.hudElements[2]);
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
hud_element_free(gActionCommandStatus.hudElements[2]);

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
void func_802A92D4_4285B4(void);
ApiStatus action_command_body_slam_CreateHudElements(Evt* script, s32 isInitialCall);
ApiStatus action_command_body_slam_MashActionCommandInit(Evt* script, s32 isInitialCall);
ApiStatus action_command_body_slam_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_body_slam_start(Evt* script, s32 isInitialCall);
void action_command_body_slam_update(void);
void action_command_body_slam_draw(void);
void action_command_body_slam_free(void);
#endif

View File

@ -1,68 +1,61 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_bomb
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern HudScript HES_100pct;
extern s32 D_80294300;
extern HudScript HES_MashAButton;
s32 D_802A9810_428280[] = { 0, 25, 50, 75, 75, 0, 0, 0 };
ApiStatus func_802A9000_427A70(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 hudElement;
battleStatus->unk_82 = 100;
battleStatus->unk_434 = &D_80294300;
battleStatus->actionCmdDifficultyTable = actionCmdTableBomb;
battleStatus->unk_86 = 127;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->actionCommandID = 0xB;
actionCommandStatus->unk_61 = TRUE;
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_BOMB;
actionCommandStatus->showHud = TRUE;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = FALSE;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
hudElement = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
#include "common/MashActionCommandInit.inc.c"
#include "common/MashActionCommandStart.inc.c"
void func_802A928C_427CFC(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 hudElement;
@ -73,13 +66,13 @@ void func_802A928C_427CFC(void) {
btl_set_popup_duration(99);
hudElement = actionCommandStatus->hudElements[0];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->unk_61) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->unk_61) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
@ -88,34 +81,34 @@ void func_802A928C_427CFC(void) {
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
break;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
// fallthrough
case 11:
btl_set_popup_duration(99);
if (!actionCommandStatus->unk_68) {
if (!actionCommandStatus->isBarFilled) {
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
actionCommandStatus->barFillLevel -=
D_802A9810_428280[actionCommandStatus->barFillLevel / mashMeterCutoff / 20];
@ -126,17 +119,17 @@ void func_802A928C_427CFC(void) {
}
if (battleStatus->currentButtonsPressed & BUTTON_A) {
switch (actionCommandStatus->easyVersion) {
switch (actionCommandStatus->targetWeakness) {
case 0: {
s32 fillOffset = battleStatus->unk_434[actionCommandStatus->unk_50] * 235 * 4;
s32 fillOffset = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 235 * 4;
actionCommandStatus->barFillLevel += fillOffset / 100;
break;
}
case 1:
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] * 8;
actionCommandStatus->barFillLevel += battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 8;
break;
case 2: {
s32 fillOffset = battleStatus->unk_434[actionCommandStatus->unk_50] * 185 * 4;
s32 fillOffset = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 185 * 4;
actionCommandStatus->barFillLevel += fillOffset / 100;
break;
}
@ -146,16 +139,16 @@ void func_802A928C_427CFC(void) {
if (actionCommandStatus->barFillLevel > 10000) {
hudElement = actionCommandStatus->hudElements[2];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50,
actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionResult * 12);
if (actionCommandStatus->unk_54 == 0) {
if (actionCommandStatus->frameCounter == 0) {
if (actionCommandStatus->barFillLevel == 0) {
battleStatus->actionSuccess = -1;
} else {
@ -175,17 +168,17 @@ void func_802A928C_427CFC(void) {
sfx_stop_sound(SOUND_80000041);
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
} else {
actionCommandStatus->unk_54--;
actionCommandStatus->frameCounter--;
}
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
} else {
func_80268C9C();
action_command_free();
}
break;
}

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
void func_802A928C_427CFC(void);
ApiStatus func_802A9000_427A70(Evt* script, s32 isInitialCall);
ApiStatus action_command_bomb_MashActionCommandInit(Evt* script, s32 isInitialCall);
ApiStatus action_command_bomb_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_bomb_start(Evt* script, s32 isInitialCall);
void action_command_bomb_update(void);
void action_command_bomb_draw(void);
void action_command_bomb_free(void);
#endif

View File

@ -1,96 +1,89 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_break_free
extern s32 D_80294220;
extern HudScript HES_AButton;
extern HudScript HES_MashAButton;
extern HudScript HES_BlueMeter;
extern HudScript HES_RunningAway;
extern HudScript HES_RunAwayOK;
ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
battleStatus->unk_82 = 0;
battleStatus->unk_434 = &D_80294220;
battleStatus->actionCmdDifficultyTable = actionCmdTableBreakFree;
battleStatus->unk_86 = 127;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_BREAK_FREE;
actionCommandStatus->unk_61 = 1;
actionCommandStatus->showHud = TRUE;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_46 = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->thresholdLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_RunningAway);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_RunAwayOK);
actionCommandStatus->hudElements[3] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
ApiStatus func_802A91B0_4235A0(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->unk_5A = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_46 = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->thresholdLevel = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0x7F;
battleStatus->unk_82 = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
actionCommandStatus->unk_46 = rand_int(actionCommandStatus->unk_5A);
actionCommandStatus->thresholdLevel = rand_int(actionCommandStatus->unk_5A);
actionCommandStatus->unk_5C = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
@ -98,7 +91,7 @@ ApiStatus func_802A91B0_4235A0(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
void func_802A92DC_4236CC(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -109,25 +102,25 @@ void func_802A92DC_4236CC(void) {
id = actionCommandStatus->hudElements[0];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[2];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[3];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
@ -135,43 +128,43 @@ void func_802A92DC_4236CC(void) {
break;
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 31, actionCommandStatus->hudElementY - 1);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX + 31, actionCommandStatus->hudElementY + 17);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudPosX + 31, actionCommandStatus->hudPosY - 1);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudPosX + 31, actionCommandStatus->hudPosY + 17);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
actionCommandStatus->state = 11;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_5C == 0) {
actionCommandStatus->unk_46++;
if (actionCommandStatus->unk_46 >= actionCommandStatus->unk_5A) {
actionCommandStatus->unk_46 = actionCommandStatus->unk_5A;
actionCommandStatus->thresholdLevel++;
if (actionCommandStatus->thresholdLevel >= actionCommandStatus->unk_5A) {
actionCommandStatus->thresholdLevel = actionCommandStatus->unk_5A;
actionCommandStatus->unk_5C = 1;
}
} else {
actionCommandStatus->unk_46--;
if (actionCommandStatus->unk_46 <= 0) {
actionCommandStatus->unk_46 = 0;
actionCommandStatus->thresholdLevel--;
if (actionCommandStatus->thresholdLevel <= 0) {
actionCommandStatus->thresholdLevel = 0;
actionCommandStatus->unk_5C = 0;
}
}
if (actionCommandStatus->unk_6A == 0) {
if (!actionCommandStatus->berserkerEnabled) {
s32 inputBufPos = battleStatus->inputBufferPos;
s32 temp_a2 = actionCommandStatus->unk_52 - actionCommandStatus->unk_54;
s32 temp_a2 = actionCommandStatus->duration - actionCommandStatus->frameCounter;
s32 i;
actionCommandStatus->barFillLevel = 0;
@ -186,21 +179,21 @@ void func_802A92DC_4236CC(void) {
inputBufPos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
}
if (battleStatus->pushInputBuffer[inputBufPos] & BUTTON_A) {
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50];
actionCommandStatus->barFillLevel += battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
}
}
} else {
actionCommandStatus->barFillLevel += (battleStatus->unk_434[actionCommandStatus->unk_50]) / 4;
actionCommandStatus->barFillLevel += rand_int(battleStatus->unk_434[actionCommandStatus->unk_50] / 4);
actionCommandStatus->barFillLevel += (battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty]) / 4;
actionCommandStatus->barFillLevel += rand_int(battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] / 4);
}
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
if (battleStatus->actionSuccess >= actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals] - actionCommandStatus->unk_46) {
if (battleStatus->actionSuccess >= actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals] - actionCommandStatus->thresholdLevel) {
battleStatus->unk_86 = 1;
battleStatus->actionSuccess = 1;
} else {
@ -209,20 +202,20 @@ void func_802A92DC_4236CC(void) {
}
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 20;
actionCommandStatus->frameCounter = 20;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32* hudElements = actionCommandStatus->hudElements;
s32 hudX;
@ -232,16 +225,16 @@ void N(draw_hud_elements)(void) {
s32 thirtyOne;
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
hudX = 60 - ((mashMeterCutoff - actionCommandStatus->unk_46) * 60 / mashMeterCutoff);
hudX = 60 - ((mashMeterCutoff - actionCommandStatus->thresholdLevel) * 60 / mashMeterCutoff);
// Putting 31 into a variable manually fixes regalloc, so perhaps this was a constant defined somewhere?
thirtyOne = 31;
hud_element_set_render_pos(hudElements[3], actionCommandStatus->hudElementX - (hudX - thirtyOne),
actionCommandStatus->hudElementY + 17);
hud_element_set_render_pos(hudElements[2], actionCommandStatus->hudElementX - (hudX - thirtyOne),
actionCommandStatus->hudElementY - 1);
hud_element_set_render_pos(hudElements[3], actionCommandStatus->hudPosX - (hudX - thirtyOne),
actionCommandStatus->hudPosY + 17);
hud_element_set_render_pos(hudElements[2], actionCommandStatus->hudPosX - (hudX - thirtyOne),
actionCommandStatus->hudPosY - 1);
if (actionCommandStatus->unk_6A == 0) {
if (!actionCommandStatus->berserkerEnabled) {
hud_element_draw_clipped(hudElements[0]);
}
@ -249,12 +242,12 @@ void N(draw_hud_elements)(void) {
hud_element_draw_clipped(id);
hud_element_get_render_pos(id, &hudX, &hudY);
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
draw_mash_meter_multicolor(hudX, hudY, actionCommandStatus->barFillLevel / 100);
hud_element_draw_clipped(hudElements[2]);
hud_element_draw_clipped(hudElements[3]);
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
hud_element_free(gActionCommandStatus.hudElements[2]);

View File

@ -3,8 +3,10 @@
#include "common_structs.h"
void func_802A92DC_4236CC(void);
ApiStatus func_802A91B0_4235A0(Evt* script, s32 isInitialCall);
ApiStatus action_command_break_free_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_break_free_start(Evt* script, s32 isInitialCall);
void action_command_break_free_update(void);
void action_command_break_free_draw(void);
void action_command_break_free_free(void);
#endif

View File

@ -1,24 +1,24 @@
ApiStatus N(MashActionCommandInit)(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
u8 mashMeterCutoff;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (!battleStatus->unk_83) {
if (battleStatus->actionCommandMode == 0) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->easyVersion = evt_get_variable(script, *args++);
actionCommandStatus->unk_60 = 0;
action_command_init_status();
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->targetWeakness = evt_get_variable(script, *args++);
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 127;
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[(actionCommandStatus->mashMeterIntervals - 1)];

View File

@ -1,6 +1,6 @@
#include "common.h"
void N(draw_hud_elements)(void) {
void N(draw)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 hudX;
@ -14,10 +14,10 @@ void N(draw_hud_elements)(void) {
hud_element_draw_clipped(hudElement);
hud_element_get_render_pos(hudElement, &hudX, &hudY);
if (actionCommandStatus->unk_68 == 0) {
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
if (!actionCommandStatus->isBarFilled) {
draw_mash_meter_multicolor(hudX, hudY, actionCommandStatus->barFillLevel / 100);
} else {
func_8026880C(hudX, hudY, actionCommandStatus->barFillLevel / 100);
draw_mash_meter_blink(hudX, hudY, actionCommandStatus->barFillLevel / 100);
}
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);

View File

@ -1,6 +1,6 @@
#include "common.h"
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
hud_element_free(gActionCommandStatus.hudElements[2]);

View File

@ -1,67 +1,61 @@
#include "common.h"
#include "hud_element.h"
#include "audio/public.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_dizzy_shell
extern s32 D_802942A0;
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern HudScript HES_MashAButton;
extern HudScript HES_100pct;
s32 D_802A9800_426970[8] = { 0, 25, 50, 75, 75, 0, 0, 0 };
ApiStatus func_802A9000_426170(void) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
battleStatus->unk_82 = 100;
battleStatus->unk_434 = &D_802942A0;
battleStatus->actionCmdDifficultyTable = actionCmdTableDizzyShell;
battleStatus->unk_86 = 127;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->actionCommandID = 8;
actionCommandStatus->unk_61 = 1;
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_DIZZY_SHELL;
actionCommandStatus->showHud = TRUE;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
#include "common/MashActionCommandInit.inc.c"
#include "common/MashActionCommandStart.inc.c"
void func_802A928C_4263FC(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -74,13 +68,13 @@ void func_802A928C_4263FC(void) {
id = actionCommandStatus->hudElements[0];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
@ -88,28 +82,28 @@ void func_802A928C_4263FC(void) {
break;
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_68 == 0) {
if (actionCommandStatus->easyVersion != 0) {
if (!actionCommandStatus->isBarFilled) {
if (actionCommandStatus->targetWeakness != 0) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
actionCommandStatus->barFillLevel -= D_802A9800_426970[actionCommandStatus->barFillLevel / cutoff / 20];
@ -125,8 +119,8 @@ void func_802A928C_4263FC(void) {
}
if (battleStatus->currentButtonsPressed & A_BUTTON) {
s32 a = battleStatus->unk_434[actionCommandStatus->unk_50];
s32 b = actionCommandStatus->easyVersion * 850;
s32 a = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
s32 b = actionCommandStatus->targetWeakness * 850;
s32 temp_v1_2 = (a * b) / 10000;
if (temp_v1_2 != 0) {
@ -142,21 +136,21 @@ void func_802A928C_4263FC(void) {
if (actionCommandStatus->barFillLevel >= 10000) {
id = actionCommandStatus->hudElements[2];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(id, 2);
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionResult * 12);
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
fillLevel = actionCommandStatus->barFillLevel;
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
fillLevel = 0;
}
@ -179,22 +173,22 @@ void func_802A928C_4263FC(void) {
}
sfx_stop_sound(SOUND_80000041);
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
actionCommandStatus->barFillLevel -= 100;
if (actionCommandStatus->barFillLevel < 0) {
actionCommandStatus->barFillLevel = 0;
}
}
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
void func_802A928C_4263FC(void);
ApiStatus func_802A9000_426170(Evt* script, s32 isInitialCall);
ApiStatus action_command_dizzy_shell_MashActionCommandInit(Evt* script, s32 isInitialCall);
ApiStatus action_command_dizzy_shell_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_dizzy_shell_start(Evt* script, s32 isInitialCall);
void action_command_dizzy_shell_update(void);
void action_command_dizzy_shell_draw(void);
void action_command_dizzy_shell_free(void);
#endif

View File

@ -1,71 +1,65 @@
#include "common.h"
#include "hud_element.h"
#include "battle/battle.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_fire_shell
extern s32 D_802942C0;
extern HudScript HES_StickMashLeft;
extern HudScript HES_StickNeutral;
extern HudScript HES_BlueMeter;
extern HudScript HES_100pct;
s32 D_802A9950_427320[5] = { 0, 25, 50, 75, 75 };
s32 D_802A9964_427334[4] = { 40, 70, 99, 200 };
s32 D_802A9974_427344[5] = { 35, 60, 80, 99, 200 };
s32 D_802A9988_427358[6] = { 35, 35, 60, 80, 99, 200 };
ApiStatus func_802A9000_4269D0(void) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
battleStatus->unk_82 = 100;
battleStatus->unk_434 = &D_802942C0;
battleStatus->actionCmdDifficultyTable = actionCmdTableFireShell;
battleStatus->unk_86 = 127;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = 9;
actionCommandStatus->unk_61 = 1;
actionCommandStatus->unk_6C = 0x1E;
actionCommandStatus->actionCommandID = ACTION_COMMAND_FIRE_SHELL;
actionCommandStatus->showHud = TRUE;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_StickNeutral);
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
#include "common/MashActionCommandInit.inc.c"
#include "common/MashActionCommandStart.inc.c"
void func_802A9294_426C64(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Actor* partner = battleStatus->partnerActor;
@ -79,13 +73,13 @@ void func_802A9294_426C64(void) {
id = actionCommandStatus->hudElements[0];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
@ -93,47 +87,47 @@ void func_802A9294_426C64(void) {
break;
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_StickMashLeft);
actionCommandStatus->barFillLevel = 0;
battleStatus->unk_85 = 0;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
actionCommandStatus->barFillLevel -= D_802A9950_427320[actionCommandStatus->barFillLevel / cutoff / 20];
if (actionCommandStatus->barFillLevel < 0) {
actionCommandStatus->barFillLevel = 0;
}
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
if (battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) {
actionCommandStatus->unk_5C = 1;
}
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && (actionCommandStatus->unk_5C != 0)) {
actionCommandStatus->barFillLevel += (battleStatus->unk_434[actionCommandStatus->unk_50] * 950) / 100;
actionCommandStatus->barFillLevel += (battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 950) / 100;
actionCommandStatus->unk_5C = 0;
}
if (battleStatus->currentButtonsPressed & BUTTON_STICK_RIGHT) {
actionCommandStatus->barFillLevel -= (battleStatus->unk_434[actionCommandStatus->unk_50] * 950) / 100;
actionCommandStatus->barFillLevel -= (battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 950) / 100;
}
}
}
@ -145,42 +139,42 @@ void func_802A9294_426C64(void) {
if (actionCommandStatus->barFillLevel > 10000) {
id = actionCommandStatus->hudElements[2];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(id, 2);
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionResult * 12);
switch (partner->actorBlueprint->level) {
case 0:
if (battleStatus->unk_84 >= D_802A9964_427334[battleStatus->unk_85]) {
if (battleStatus->actionResult >= D_802A9964_427334[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && (battleStatus->unk_84 < D_802A9964_427334[battleStatus->unk_85 - 1])) {
if (battleStatus->unk_85 > 0 && (battleStatus->actionResult < D_802A9964_427334[battleStatus->unk_85 - 1])) {
battleStatus->unk_85--;
}
break;
case 1:
if (battleStatus->unk_84 >= D_802A9974_427344[battleStatus->unk_85]) {
if (battleStatus->actionResult >= D_802A9974_427344[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && (battleStatus->unk_84 < D_802A9974_427344[battleStatus->unk_85 - 1])) {
if (battleStatus->unk_85 > 0 && (battleStatus->actionResult < D_802A9974_427344[battleStatus->unk_85 - 1])) {
battleStatus->unk_85--;
}
break;
case 2:
if (battleStatus->unk_84 >= D_802A9988_427358[battleStatus->unk_85]) {
if (battleStatus->actionResult >= D_802A9988_427358[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0 && (battleStatus->unk_84 < D_802A9988_427358[battleStatus->unk_85 - 1])) {
if (battleStatus->unk_85 > 0 && (battleStatus->actionResult < D_802A9988_427358[battleStatus->unk_85 - 1])) {
battleStatus->unk_85--;
}
break;
}
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
@ -202,15 +196,15 @@ void func_802A9294_426C64(void) {
}
sfx_stop_sound(SOUND_80000041);
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
void func_802A9294_426C64(void);
ApiStatus func_802A9000_4269D0(Evt* script, s32 isInitialCall);
ApiStatus action_command_fire_shell_MashActionCommandInit(Evt* script, s32 isInitialCall);
ApiStatus action_command_fire_shell_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_fire_shell_start(Evt* script, s32 isInitialCall);
void action_command_fire_shell_update(void);
void action_command_fire_shell_draw(void);
void action_command_fire_shell_free(void);
#endif

View File

@ -1,18 +1,11 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_flee
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern HudScript HES_RunAwayOK;
extern HudScript HES_RunningAway;
extern HudScript HES_100pct;
extern s32 D_80294200;
extern s32 D_802A9920;
extern HudScript HES_MashAButton;
BSS s32 D_802A9920;
ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
@ -20,72 +13,72 @@ ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) {
s32 hudElement;
battleStatus->unk_82 = 0;
battleStatus->unk_434 = &D_80294200;
battleStatus->actionCmdDifficultyTable = actionCmdTableFlee;
battleStatus->unk_86 = 127;
func_80268858();
action_command_init_status();
actionCommandStatus->unk_5A = evt_get_variable(script, *args++);
actionCommandStatus->actionCommandID = ACTION_COMMAND_FLEE;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = actionCommandStatus->unk_5A * 100;
actionCommandStatus->unk_46 = rand_int(50);
actionCommandStatus->unk_48 = 0;
actionCommandStatus->thresholdLevel = rand_int(50);
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->unk_5C = 1;
actionCommandStatus->unk_5A = rand_int(1);
actionCommandStatus->unk_68 = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudPosX = -48;
D_802A9920 = 0;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosY = 80;
hudElement = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_RunningAway);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_RunAwayOK);
actionCommandStatus->hudElements[3] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
xOffset = 29 - ((100 - actionCommandStatus->unk_46) * 60) / 100;
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY + 17);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY - 1);
xOffset = 29 - ((100 - actionCommandStatus->thresholdLevel) * 60) / 100;
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudPosX - xOffset, actionCommandStatus->hudPosY + 17);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudPosX - xOffset, actionCommandStatus->hudPosY - 1);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[4] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
ApiStatus func_802A92A0_422D70(Evt* script) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
func_80268858();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->unk_60 = 0;
action_command_init_status();
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->wrongButtonPressed = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 127;
battleStatus->unk_82 = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
@ -94,7 +87,7 @@ ApiStatus func_802A92A0_422D70(Evt* script) {
return ApiStatus_DONE2;
}
void func_802A9378_422E48(void) {
void N(update)(void) {
s32 temp;
s32 hudElement;
BattleStatus* battleStatus = &gBattleStatus;
@ -104,81 +97,81 @@ void func_802A9378_422E48(void) {
case 0:
hudElement = actionCommandStatus->hudElements[0];
hud_element_set_alpha(hudElement, 0xFF);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 0xFF);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
hudElement = actionCommandStatus->hudElements[2];
hud_element_set_alpha(hudElement, 0xFF);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
hudElement = actionCommandStatus->hudElements[3];
hud_element_set_alpha(hudElement, 0xFF);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
actionCommandStatus->state = 1;
break;
case 1:
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
break;
case 10:
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
break;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
D_802A9920 = 1;
actionCommandStatus->state = 11;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
case 11:
if ((battleStatus->unk_83 != 0) && (battleStatus->currentButtonsPressed & BUTTON_A)) {
actionCommandStatus->barFillLevel += (battleStatus->unk_434[actionCommandStatus->unk_50] * 180 / 100);
if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_NOT_LEARNED && (battleStatus->currentButtonsPressed & BUTTON_A)) {
actionCommandStatus->barFillLevel += (battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 180 / 100);
}
if (actionCommandStatus->barFillLevel >= 10000) {
hudElement = actionCommandStatus->hudElements[4];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->unk_54 == 0) {
if (battleStatus->actionSuccess >= (100 - actionCommandStatus->unk_46)) {
if (actionCommandStatus->frameCounter == 0) {
if (battleStatus->actionSuccess >= (100 - actionCommandStatus->thresholdLevel)) {
battleStatus->unk_86 = 1;
battleStatus->actionSuccess = 1;
} else {
battleStatus->unk_86 = -2;
battleStatus->actionSuccess = -1;
}
actionCommandStatus->unk_54 = 20;
actionCommandStatus->frameCounter = 20;
actionCommandStatus->state = 12;
} else {
actionCommandStatus->unk_54--;
actionCommandStatus->frameCounter--;
}
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
break;
}
func_80268C9C();
action_command_free();
break;
}
@ -188,22 +181,22 @@ void func_802A9378_422E48(void) {
case 11:
temp = actionCommandStatus->unk_5A == 0 ? 7 : 8;
if (actionCommandStatus->unk_5C == 0) {
actionCommandStatus->unk_46 += temp;
if (actionCommandStatus->unk_46 >= 100) {
actionCommandStatus->unk_46 = 100;
actionCommandStatus->thresholdLevel += temp;
if (actionCommandStatus->thresholdLevel >= 100) {
actionCommandStatus->thresholdLevel = 100;
actionCommandStatus->unk_5C = 1;
}
break;
}
actionCommandStatus->unk_46 -= temp;
if (actionCommandStatus->unk_46 <= 0) {
actionCommandStatus->unk_46 = 0;
actionCommandStatus->thresholdLevel -= temp;
if (actionCommandStatus->thresholdLevel <= 0) {
actionCommandStatus->thresholdLevel = 0;
actionCommandStatus->unk_5C = 0;
}
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
s32 y;
s32 x;
s32 temp_a1;
@ -213,14 +206,14 @@ void N(draw_hud_elements)(void) {
BattleStatus* battleStatus = &gBattleStatus;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
temp_v1 = (100 - actionCommandStatus->unk_46) * 60;
temp_v1 = (100 - actionCommandStatus->thresholdLevel) * 60;
x = 60 - temp_v1 / 100;
temp_a1 = x - 31;
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - temp_a1, actionCommandStatus->hudElementY + 17);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 31 - x, actionCommandStatus->hudElementY - 1);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudPosX - temp_a1, actionCommandStatus->hudPosY + 17);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudPosX + 31 - x, actionCommandStatus->hudPosY - 1);
if (battleStatus->unk_83 != 0) {
if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_NOT_LEARNED) {
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
}
@ -229,12 +222,12 @@ void N(draw_hud_elements)(void) {
hud_element_get_render_pos(hudElement, &x, &y);
if (D_802A9920 == 0) {
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
draw_mash_meter_multicolor_with_divisor(x, y, actionCommandStatus->barFillLevel / 100, 1);
} else {
if (actionCommandStatus->unk_68 == 0) {
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 4);
if (!actionCommandStatus->isBarFilled) {
draw_mash_meter_multicolor_with_divisor(x, y, actionCommandStatus->barFillLevel / 100, 4);
} else {
func_8026880C(x, y, actionCommandStatus->barFillLevel / 100);
draw_mash_meter_blink(x, y, actionCommandStatus->barFillLevel / 100);
}
}
@ -243,7 +236,7 @@ void N(draw_hud_elements)(void) {
hud_element_draw_clipped(actionCommandStatus->hudElements[4]);
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
hud_element_free(gActionCommandStatus.hudElements[2]);

View File

@ -3,6 +3,10 @@
#include "common_structs.h"
void func_802A9378_422E48(void);
ApiStatus action_command_flee_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_flee_start(Evt* script, s32 isInitialCall);
void action_command_flee_update(void);
void action_command_flee_draw(void);
void action_command_flee_free(void);
#endif

View File

@ -1,118 +1,102 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_hammer
// icon indexes for hud elements
extern HudScript HES_TimingBar1Chance;
extern HudScript HES_TimingWait;
extern HudScript HES_TimingCharge1;
extern HudScript HES_TimingCharge2;
extern HudScript HES_TimingCharge3;
extern HudScript HES_TimingCharge4a;
extern HudScript HES_TimingCharge4b;
extern HudScript HES_TimingCharge4c;
extern HudScript HES_StickHoldLeft;
extern HudScript HES_StickTapNeutral;
extern HudScript HES_RightOn;
extern HudScript HES_TimingReady;
extern s32 D_802941E0[];
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
battleStatus->unk_82 = 1;
battleStatus->unk_434 = D_802941E0;
battleStatus->actionCmdDifficultyTable = actionCmdTableHammer;
battleStatus->unk_86 = 0;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
battleStatus->unk_84 = 0;
battleStatus->actionResult = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_SMASH;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->hudElementY = 96;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->hudPosY = 96;
id = hud_element_create(&HES_TimingBar1Chance);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 10);
id = hud_element_create(&HES_TimingWait);
actionCommandStatus->hudElements[1] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_TimingCharge4a);
actionCommandStatus->hudElements[2] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_TimingCharge4b);
actionCommandStatus->hudElements[3] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_TimingCharge4c);
actionCommandStatus->hudElements[4] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_StickHoldLeft);
actionCommandStatus->hudElements[5] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_RightOn);
actionCommandStatus->hudElements[6] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_alpha(id, 0xFF);
return ApiStatus_DONE2;
}
ApiStatus func_802A9258_422258(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
battleStatus->unk_84 = 0;
battleStatus->actionResult = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->unk_60 = 0;
actionCommandStatus->unk_62 = 1;
if (actionCommandStatus->unk_4E < 0) {
actionCommandStatus->unk_4E = 0;
actionCommandStatus->unk_62 = 0;
action_command_init_status();
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->playHammerSounds = TRUE;
if (actionCommandStatus->prepareTime < 0) {
actionCommandStatus->prepareTime = 0;
actionCommandStatus->playHammerSounds = FALSE;
}
actionCommandStatus->unk_5F = 0;
actionCommandStatus->hammerMissedStart = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_84 = 0;
battleStatus->actionResult = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
@ -120,7 +104,7 @@ ApiStatus func_802A9258_422258(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
void func_802A936C_42236C(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Actor* partner = battleStatus->partnerActor;
@ -135,37 +119,37 @@ void func_802A936C_42236C(void) {
btl_set_popup_duration(99);
id = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[1];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[2];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[3];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[4];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[5];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
hud_element_set_alpha(id, 255);
@ -174,20 +158,20 @@ void func_802A936C_42236C(void) {
break;
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX + 21, actionCommandStatus->hudElementY - 3);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 5, actionCommandStatus->hudElementY + 1);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - 7, actionCommandStatus->hudElementY + 1);
hud_element_set_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudElementX - 19, actionCommandStatus->hudElementY + 1);
hud_element_set_render_pos(actionCommandStatus->hudElements[5], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY - 23);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX + 21, actionCommandStatus->hudPosY - 3);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudPosX + 5, actionCommandStatus->hudPosY + 1);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudPosX - 7, actionCommandStatus->hudPosY + 1);
hud_element_set_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudPosX - 19, actionCommandStatus->hudPosY + 1);
hud_element_set_render_pos(actionCommandStatus->hudElements[5], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY - 23);
if (actionCommandStatus->autoSucceed != 0) {
id = actionCommandStatus->hudElements[6];
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY);
if (actionCommandStatus->unk_61 != 0) {
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
break;
}
@ -195,7 +179,7 @@ void func_802A936C_42236C(void) {
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E < 15) {
if (actionCommandStatus->prepareTime < 15) {
hud_element_set_alpha(actionCommandStatus->hudElements[0], 255);
hud_element_set_alpha(actionCommandStatus->hudElements[1], 255);
hud_element_set_alpha(actionCommandStatus->hudElements[2], 255);
@ -204,66 +188,66 @@ void func_802A936C_42236C(void) {
hud_element_set_alpha(actionCommandStatus->hudElements[5], 255);
}
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
actionCommandStatus->unk_54 = 0;
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && battleStatus->unk_83 < 2) {
actionCommandStatus->unk_5F = 1;
actionCommandStatus->frameCounter = 0;
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && battleStatus->actionCommandMode < ACTION_COMMAND_MODE_TUTORIAL) {
actionCommandStatus->hammerMissedStart = TRUE;
}
actionCommandStatus->state = 11;
case 11:
btl_set_popup_duration(99);
if (battleStatus->unk_83 < 0) {
if (battleStatus->actionCommandMode <= ACTION_COMMAND_MODE_TUTORIAL_BLOCK) {
return;
}
phi_s0 = battleStatus->unk_434[actionCommandStatus->unk_50];
phi_s0 = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
new_var = phi_s0 + 2;
temp_f20 = (actionCommandStatus->unk_52 - new_var) / 3;
temp_f20 = (actionCommandStatus->duration - new_var) / 3;
if (actionCommandStatus->unk_54 < temp_f20) {
if (actionCommandStatus->frameCounter < temp_f20) {
hud_element_set_script(actionCommandStatus->hudElements[4], &HES_TimingCharge3);
battleStatus->unk_84 = 0;
if (actionCommandStatus->unk_54 == 0 && actionCommandStatus->unk_62 != 0) {
battleStatus->actionResult = 0;
if (actionCommandStatus->frameCounter == 0 && actionCommandStatus->playHammerSounds) {
sfx_play_sound(SOUND_233);
}
} else if (actionCommandStatus->unk_54 < temp_f20 * 2) {
} else if (actionCommandStatus->frameCounter < temp_f20 * 2) {
hud_element_set_script(actionCommandStatus->hudElements[3], &HES_TimingCharge2);
battleStatus->unk_84 = 1;
if (actionCommandStatus->unk_54 == temp_f20) {
if (actionCommandStatus->unk_62 != 0) {
battleStatus->actionResult = 1;
if (actionCommandStatus->frameCounter == temp_f20) {
if (actionCommandStatus->playHammerSounds) {
sfx_play_sound(SOUND_233);
}
}
} else if (actionCommandStatus->unk_54 < temp_f20 * 3.0f) {
} else if (actionCommandStatus->frameCounter < temp_f20 * 3.0f) {
hud_element_set_script(actionCommandStatus->hudElements[2], &HES_TimingCharge1);
battleStatus->unk_84 = 2;
if (actionCommandStatus->unk_54 == temp_f20 * 2) {
if (actionCommandStatus->unk_62 != 0) {
battleStatus->actionResult = 2;
if (actionCommandStatus->frameCounter == temp_f20 * 2) {
if (actionCommandStatus->playHammerSounds) {
sfx_play_sound(SOUND_233);
}
}
}
if (actionCommandStatus->unk_54 == (~phi_s0 + actionCommandStatus->unk_52)) {
battleStatus->unk_84 = 3;
if (actionCommandStatus->frameCounter == (~phi_s0 + actionCommandStatus->duration)) {
battleStatus->actionResult = 3;
hud_element_set_script(actionCommandStatus->hudElements[1], &HES_TimingReady);
hud_element_set_script(actionCommandStatus->hudElements[5], &HES_StickTapNeutral);
if (actionCommandStatus->unk_62 != 0) {
if (actionCommandStatus->playHammerSounds) {
sfx_play_sound(SOUND_234);
}
if (actionCommandStatus->autoSucceed != 0 && actionCommandStatus->autoSucceed != 2) {
actionCommandStatus->autoSucceed = 2;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52 - 4;
actionCommandStatus->frameCounter = actionCommandStatus->duration - 4;
}
}
a = actionCommandStatus->unk_52 - actionCommandStatus->unk_54;
phi_s0 = battleStatus->unk_434[actionCommandStatus->unk_50] - a + 3;
a = actionCommandStatus->duration - actionCommandStatus->frameCounter;
phi_s0 = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] - a + 3;
if (phi_s0 < 0) {
phi_s0 = 0;
}
@ -271,11 +255,11 @@ void func_802A936C_42236C(void) {
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) &&
phi_s0 == 0 &&
actionCommandStatus->autoSucceed == 0 &&
battleStatus->unk_83 < 2)
battleStatus->actionCommandMode < ACTION_COMMAND_MODE_TUTORIAL)
{
battleStatus->actionSuccess = -1;
battleStatus->unk_86 = -1;
func_80268C9C();
action_command_free();
} else {
s32 i;
s32 bufferPos;
@ -302,9 +286,9 @@ void func_802A936C_42236C(void) {
}
}
if (battleStatus->unk_83 < 2 || actionCommandStatus->unk_54 != actionCommandStatus->unk_52) {
actionCommandStatus->unk_54++;
if (actionCommandStatus->unk_52 < actionCommandStatus->unk_54) {
if (battleStatus->actionCommandMode < ACTION_COMMAND_MODE_TUTORIAL || actionCommandStatus->frameCounter != actionCommandStatus->duration) {
actionCommandStatus->frameCounter++;
if (actionCommandStatus->duration < actionCommandStatus->frameCounter) {
if (battleStatus->actionSuccess == 0) {
battleStatus->actionSuccess = -1;
}
@ -314,23 +298,23 @@ void func_802A936C_42236C(void) {
}
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
}
}
}
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
hud_element_draw_clipped(gActionCommandStatus.hudElements[0]);
hud_element_draw_clipped(gActionCommandStatus.hudElements[1]);
hud_element_draw_clipped(gActionCommandStatus.hudElements[2]);
@ -340,7 +324,7 @@ void N(draw_hud_elements)(void) {
hud_element_draw_clipped(gActionCommandStatus.hudElements[6]);
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
hud_element_free(gActionCommandStatus.hudElements[2]);

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
void func_802A936C_42236C(void);
ApiStatus action_command_hammer_CreateHudElements(Evt* script, s32 isInitialCall);
ApiStatus func_802A9258_422258(Evt* script, s32 isInitialCall);
ApiStatus action_command_hammer_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_hammer_start(Evt* script, s32 isInitialCall);
void action_command_hammer_update(void);
void action_command_hammer_draw(void);
void action_command_hammer_free(void);
#endif

View File

@ -1,90 +1,82 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_hurricane
extern s32 D_80294420;
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern HudScript HES_MashAButton;
extern HudScript HES_BButton;
extern HudScript HES_MashBButton1;
extern HudScript HES_100pct;
s32 D_802A98E0_42FFC0[8] = { 0, 25, 50, 75, 75, 0, 0, 0 };
ApiStatus func_802A9000_42F6E0(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
battleStatus->unk_82 = 5;
battleStatus->unk_434 = &D_80294420;
if (battleStatus->unk_83 == 0) {
battleStatus->actionCmdDifficultyTable = actionCmdTableHurricane;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = 20;
actionCommandStatus->unk_6C = 30;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->actionCommandID = ACTION_COMMAND_HURRICANE;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_BButton);
actionCommandStatus->hudElements[2] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[4] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
ApiStatus func_802A91A0_42F880(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->easyVersion = evt_get_variable(script, *args++);
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->targetWeakness = evt_get_variable(script, *args++);
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
@ -95,8 +87,8 @@ ApiStatus func_802A91A0_42F880(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
// Almost identical to func_802A92A0_42DCB0 (mega_shock)
void func_802A92A0_42F980(void) {
// Almost identical to action_command_mega_shock_update (mega_shock)
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
@ -114,20 +106,20 @@ void func_802A92A0_42F980(void) {
btl_set_popup_duration(99);
hudElement = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
hud_element_set_alpha(hudElement, 255);
hudElement = actionCommandStatus->hudElements[2];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
hud_element_set_alpha(hudElement, 255);
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
@ -135,42 +127,42 @@ void func_802A92A0_42F980(void) {
break;
case 1:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_6C != 0) {
actionCommandStatus->unk_6C--;
if (actionCommandStatus->hudPrepareTime != 0) {
actionCommandStatus->hudPrepareTime--;
break;
}
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX - 17,
actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 23,
actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX - 17,
actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudPosX + 23,
actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
break;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
hud_element_set_script(actionCommandStatus->hudElements[2], &HES_MashBButton1);
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
actionCommandStatus->state = 11;
// fallthrough
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
s16 newFillLevel;
if (actionCommandStatus->easyVersion != 0) {
if (actionCommandStatus->targetWeakness != 0) {
s8 mashMeterIntervals = actionCommandStatus->mashMeterIntervals;
s16* mashMeterCutoffs = actionCommandStatus->mashMeterCutoffs;
s32 index;
@ -208,11 +200,11 @@ void func_802A92A0_42F980(void) {
buttonsAB = BUTTON_A | BUTTON_B;
if ((buttonsPushed & buttonsAB) == buttonsAB) {
if (actionCommandStatus->easyVersion != 0) {
if (actionCommandStatus->targetWeakness != 0) {
s32 fillLevel;
fillLevel = actionCommandStatus->easyVersion * 650;
fillLevel = fillLevel / 100 * battleStatus->unk_434[actionCommandStatus->unk_50];
fillLevel = actionCommandStatus->targetWeakness * 650;
fillLevel = fillLevel / 100 * battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
// Perplexing reuse of buttonsPushed here, but it fixes register allocation. Likely another
// subexpression from above can be put into a variable and reused instead.
@ -249,24 +241,24 @@ void func_802A92A0_42F980(void) {
if (actionCommandStatus->barFillLevel > 10000) {
hudElement = actionCommandStatus->hudElements[4];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50,
actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
adjustedFillLevel = actionCommandStatus->barFillLevel / 100;
battleStatus->unk_84 = adjustedFillLevel;
battleStatus->actionResult = adjustedFillLevel;
if (actionCommandStatus->unk_54 == 0) {
if (actionCommandStatus->frameCounter == 0) {
s16 threshold;
// Again, reusing buttonsPushed specifically for reg-alloc. See above.
//
// TODO: Find a way to avoid reusing buttonsPushed.
buttonsPushed = actionCommandStatus->barFillLevel;
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
buttonsPushed = 0;
}
@ -280,7 +272,7 @@ void func_802A92A0_42F980(void) {
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[mashMeterIndex];
threshold = mashMeterCutoff / 2;
if (battleStatus->unk_84 <= threshold) {
if (battleStatus->actionResult <= threshold) {
battleStatus->unk_86 = -4;
} else {
battleStatus->unk_86 = 1;
@ -291,30 +283,30 @@ void func_802A92A0_42F980(void) {
}
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
} else {
actionCommandStatus->unk_54 -= 1;
actionCommandStatus->frameCounter -= 1;
}
break;
case 12:
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
actionCommandStatus->barFillLevel -= 100;
if (actionCommandStatus->barFillLevel < 0) {
actionCommandStatus->barFillLevel = 0;
}
}
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54 -= 1;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter -= 1;
} else {
func_80268C9C();
action_command_free();
}
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 hudY;
s32 hudX;
@ -327,16 +319,16 @@ void N(draw_hud_elements)(void) {
hud_element_draw_clipped(id);
hud_element_get_render_pos(id, &hudX, &hudY);
if (actionCommandStatus->unk_68 == 0) {
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
if (!actionCommandStatus->isBarFilled) {
draw_mash_meter_multicolor(hudX, hudY, actionCommandStatus->barFillLevel / 100);
} else {
func_8026880C(hudX, hudY, actionCommandStatus->barFillLevel / 100);
draw_mash_meter_blink(hudX, hudY, actionCommandStatus->barFillLevel / 100);
}
hud_element_draw_clipped(actionCommandStatus->hudElements[4]);
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
hud_element_free(gActionCommandStatus.hudElements[2]);

View File

@ -3,8 +3,10 @@
#include "common_structs.h"
ApiStatus func_802A9000_42F6E0(Evt* script, s32 isInitialCall);
ApiStatus func_802A91A0_42F880(Evt* script, s32 isInitialCall);
void func_802A92A0_42F980(void);
ApiStatus action_command_hurricane_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_hurricane_start(Evt* script, s32 isInitialCall);
void action_command_hurricane_update(void);
void action_command_hurricane_draw(void);
void action_command_hurricane_free(void);
#endif

View File

@ -1,76 +1,69 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_jump
extern s32 D_802941C0[];
// icon IDs for hud elements
extern HudScript HES_AButton;
extern HudScript HES_RightOn;
extern HudScript HES_AButtonDown;
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
s32 hudElement;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
gBattleStatus.unk_82 = 1;
gBattleStatus.unk_434 = D_802941C0;
gBattleStatus.actionCmdDifficultyTable = actionCmdTableJump;
gBattleStatus.unk_86 = 0;
if (gBattleStatus.unk_83 == 0) {
if (gBattleStatus.actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
gBattleStatus.actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_JUMP;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->hudPosY = 80;
hudElement = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_alpha(hudElement, 0xFF);
hud_element_set_alpha(hudElement, 255);
hudElement = hud_element_create(&HES_RightOn);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_alpha(hudElement, 0xFF);
hud_element_set_alpha(hudElement, 255);
return ApiStatus_DONE2;
}
ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
s32 hudElement;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
} else {
func_80268858();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->unk_60 = 0;
action_command_init_status();
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->wrongButtonPressed = FALSE;
battleStatus->actionSuccess = 0;
hudElement = actionCommandStatus->hudElements[0];
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX = 50;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
battleStatus->flags1 &= ~BS_FLAGS1_2000;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
if (actionCommandStatus->unk_61 != 0) {
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
@ -89,69 +82,69 @@ void N(update)(void) {
switch (actionCommandStatus->state) {
case 0:
if (battleStatus->unk_83 == 2) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_TUTORIAL) {
btl_set_popup_duration(99);
}
actionCommandStatus->state = 1;
break;
case 1:
if (battleStatus->unk_83 == 2) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_TUTORIAL) {
btl_set_popup_duration(99);
}
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hudElement = actionCommandStatus->hudElements[0];
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
if (actionCommandStatus->unk_61) {
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
if (actionCommandStatus->autoSucceed) {
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY);
if (actionCommandStatus->unk_61) {
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY);
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
break;
}
}
break;
case 10:
if (battleStatus->unk_83 == 2) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_TUTORIAL) {
btl_set_popup_duration(99);
}
temp_s0_3 = battleStatus->unk_434[actionCommandStatus->unk_50];
if (((actionCommandStatus->unk_4E - temp_s0_3) - 2) <= 0) {
temp_s0_3 = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
if (((actionCommandStatus->prepareTime - temp_s0_3) - 2) <= 0) {
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_AButtonDown);
}
if ((battleStatus->currentButtonsPressed & BUTTON_A) && (actionCommandStatus->autoSucceed == 0)) {
actionCommandStatus->unk_60 = 1;
actionCommandStatus->wrongButtonPressed = TRUE;
battleStatus->unk_86 = -1;
}
if ((actionCommandStatus->unk_4E - temp_s0_3) > 0) {
actionCommandStatus->unk_4E -= 1;
if ((actionCommandStatus->prepareTime - temp_s0_3) > 0) {
actionCommandStatus->prepareTime -= 1;
break;
}
actionCommandStatus->unk_54 = battleStatus->unk_434[actionCommandStatus->unk_50];
actionCommandStatus->frameCounter = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
battleStatus->actionSuccess = -1;
actionCommandStatus->state = 11;
case 11:
if (battleStatus->unk_83 == 2) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_TUTORIAL) {
btl_set_popup_duration(99);
}
if (battleStatus->unk_83 >= 2) {
if (actionCommandStatus->unk_54 == 0) {
if (battleStatus->actionCommandMode >= ACTION_COMMAND_MODE_TUTORIAL) {
if (actionCommandStatus->frameCounter == 0) {
break;
}
} else {
if (battleStatus->actionSuccess >= 0) {
hudElement = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
}
@ -159,7 +152,7 @@ void N(update)(void) {
if (battleStatus->actionSuccess < 0) {
if (((battleStatus->currentButtonsPressed & BUTTON_A)&&
(actionCommandStatus->unk_60 == 0)) ||
!actionCommandStatus->wrongButtonPressed) ||
(actionCommandStatus->autoSucceed != 0)) {
battleStatus->actionSuccess = 1;
battleStatus->unk_86 = 1;
@ -167,37 +160,37 @@ void N(update)(void) {
}
}
if (actionCommandStatus->unk_54 == 0) {
if (actionCommandStatus->frameCounter == 0) {
if (battleStatus->actionSuccess == 1) {
func_80269160();
}
if (battleStatus->unk_83 == 2) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_TUTORIAL) {
btl_set_popup_duration(0);
}
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
}
actionCommandStatus->unk_54 -= 1;
actionCommandStatus->frameCounter -= 1;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54 -= 1;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter -= 1;
break;
}
func_80268C9C();
action_command_free();
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
hud_element_draw_clipped(gActionCommandStatus.hudElements[0]);
if (!(gGameStatusPtr->demoFlags & 1)) {
hud_element_draw_clipped(gActionCommandStatus.hudElements[1]);
}
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
}

View File

@ -3,8 +3,10 @@
#include "common_structs.h"
ApiStatus action_command_jump_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_jump_start(Evt* script, s32 isInitialCall);
void action_command_jump_update(void);
ApiStatus action_command_jump_CreateHudElements(Evt* script, s32 isInitialCall);
void action_command_jump_draw(void);
void action_command_jump_free(void);
#endif

View File

@ -1,71 +1,62 @@
#include "common.h"
#include "hud_element.h"
#include "audio/public.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_mega_shock
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern HudScript HES_BButton;
extern HudScript HES_100pct;
extern s32 D_802943C0;
extern HudScript HES_MashAButton[];
extern HudScript HES_MashBButton1[];
s32 D_802A9930_42E340[] = { 0, 25, 50, 75, 75, 0, 0, 0 };
ApiStatus func_802A9000_42DA10(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 elementID;
battleStatus->unk_82 = 5;
battleStatus->unk_434 = &D_802943C0;
if (battleStatus->unk_83 == 0) {
battleStatus->actionCmdDifficultyTable = actionCmdTableMegaShock;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_MEGA_SHOCK;
actionCommandStatus->state = 0;
actionCommandStatus->unk_6C = 0x1E;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->hudElementX = -0x30;
actionCommandStatus->hudElementY = 0x50;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
elementID = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(elementID, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(elementID, 0);
elementID = hud_element_create(&HES_BButton);
actionCommandStatus->hudElements[2] = elementID;
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(elementID, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(elementID, 0);
elementID = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = elementID;
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C);
hud_element_set_render_pos(elementID, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 0x1C);
hud_element_set_render_depth(elementID, 0);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
elementID = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[4] = elementID;
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C);
hud_element_set_render_pos(elementID, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 0x1C);
hud_element_set_render_depth(elementID, 0);
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
ApiStatus func_802A91A0_42DBB0(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
Bytecode* readPos = script->ptrReadPos;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
@ -73,36 +64,36 @@ ApiStatus func_802A91A0_42DBB0(Evt* script, s32 isInitialCall) {
s16 arg;
ApiStatus result;
if (battleStatus->unk_83 != 0) {
func_80268858();
if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_NOT_LEARNED) {
action_command_init_status();
actionCommandStatus->unk_4E = evt_get_variable(script, *readPos++);
actionCommandStatus->unk_52 = evt_get_variable(script, *readPos++);
actionCommandStatus->prepareTime = evt_get_variable(script, *readPos++);
actionCommandStatus->duration = evt_get_variable(script, *readPos++);
arg = evt_get_variable(script, *readPos++);
actionCommandStatus->unk_50 = arg;
actionCommandStatus->unk_50 = func_80268224(arg);
actionCommandStatus->easyVersion = evt_get_variable(script, *readPos++);
actionCommandStatus->unk_60 = 0;
actionCommandStatus->difficulty = arg;
actionCommandStatus->difficulty = adjust_action_command_difficulty(arg);
actionCommandStatus->targetWeakness = evt_get_variable(script, *readPos++);
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 0xA;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
func_80269118();
result = 2;
result = ApiStatus_DONE2;
} else {
battleStatus->actionSuccess = 0;
result = 2;
result = ApiStatus_DONE2;
}
return result;
}
void func_802A92A0_42DCB0(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
@ -120,20 +111,20 @@ void func_802A92A0_42DCB0(void) {
btl_set_popup_duration(99);
hudElement = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
hud_element_set_alpha(hudElement, 255);
hudElement = actionCommandStatus->hudElements[2];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
hud_element_set_alpha(hudElement, 255);
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
@ -141,42 +132,42 @@ void func_802A92A0_42DCB0(void) {
break;
case 1:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_6C != 0) {
actionCommandStatus->unk_6C--;
if (actionCommandStatus->hudPrepareTime != 0) {
actionCommandStatus->hudPrepareTime--;
break;
}
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX - 17,
actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 23,
actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX - 17,
actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudPosX + 23,
actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
break;
}
hud_element_set_script(actionCommandStatus->hudElements[0], HES_MashAButton);
hud_element_set_script(actionCommandStatus->hudElements[2], HES_MashBButton1);
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
hud_element_set_script(actionCommandStatus->hudElements[2], &HES_MashBButton1);
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
s16 newFillLevel;
if (actionCommandStatus->easyVersion != 0) {
if (actionCommandStatus->targetWeakness != 0) {
s8 mashMeterIntervals = actionCommandStatus->mashMeterIntervals;
s16* mashMeterCutoffs = actionCommandStatus->mashMeterCutoffs;
s32 index;
@ -214,11 +205,11 @@ void func_802A92A0_42DCB0(void) {
buttonsAB = BUTTON_A | BUTTON_B;
if ((buttonsPushed & buttonsAB) == buttonsAB) {
if (actionCommandStatus->easyVersion != 0) {
if (actionCommandStatus->targetWeakness != 0) {
s32 fillLevel;
fillLevel = actionCommandStatus->easyVersion * 780;
fillLevel = fillLevel / 100 * battleStatus->unk_434[actionCommandStatus->unk_50];
fillLevel = actionCommandStatus->targetWeakness * 780;
fillLevel = fillLevel / 100 * battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
// Perplexing reuse of buttonsPushed here, but it fixes register allocation. Likely another
// subexpression from above can be put into a variable and reused instead.
@ -255,25 +246,25 @@ void func_802A92A0_42DCB0(void) {
if (actionCommandStatus->barFillLevel > 10000) {
hudElement = actionCommandStatus->hudElements[4];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50,
actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
adjustedFillLevel = actionCommandStatus->barFillLevel / 100;
battleStatus->unk_84 = adjustedFillLevel;
sfx_adjust_env_sound_params(0x80000041, 0, 0, adjustedFillLevel * 12);
battleStatus->actionResult = adjustedFillLevel;
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, adjustedFillLevel * 12);
if (actionCommandStatus->unk_54 == 0) {
if (actionCommandStatus->frameCounter == 0) {
s16 threshold;
// Again, reusing buttonsPushed specifically for reg-alloc. See above.
//
// TODO: Find a way to avoid reusing buttonsPushed.
buttonsPushed = actionCommandStatus->barFillLevel;
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
buttonsPushed = 0;
}
@ -287,7 +278,7 @@ void func_802A92A0_42DCB0(void) {
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[mashMeterIndex];
threshold = mashMeterCutoff / 2;
if (battleStatus->unk_84 <= threshold) {
if (battleStatus->actionResult <= threshold) {
battleStatus->unk_86 = -4;
} else {
battleStatus->unk_86 = 1;
@ -299,30 +290,30 @@ void func_802A92A0_42DCB0(void) {
sfx_stop_sound(SOUND_80000041);
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
} else {
actionCommandStatus->unk_54 -= 1;
actionCommandStatus->frameCounter -= 1;
}
break;
case 12:
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
actionCommandStatus->barFillLevel -= 100;
if (actionCommandStatus->barFillLevel < 0) {
actionCommandStatus->barFillLevel = 0;
}
}
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54 -= 1;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter -= 1;
} else {
func_80268C9C();
action_command_free();
}
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 hudElement;
@ -336,16 +327,16 @@ void N(draw_hud_elements)(void) {
hud_element_draw_clipped(hudElement);
hud_element_get_render_pos(hudElement, &hudElementX, &hudElementY);
if (actionCommandStatus->unk_68 == 0) {
func_80268770(hudElementX, hudElementY, actionCommandStatus->barFillLevel / 100);
if (!actionCommandStatus->isBarFilled) {
draw_mash_meter_multicolor(hudElementX, hudElementY, actionCommandStatus->barFillLevel / 100);
} else {
func_8026880C(hudElementX, hudElementY, actionCommandStatus->barFillLevel / 100);
draw_mash_meter_blink(hudElementX, hudElementY, actionCommandStatus->barFillLevel / 100);
}
hud_element_draw_clipped(actionCommandStatus->hudElements[4]);
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
hud_element_free(gActionCommandStatus.hudElements[2]);

View File

@ -3,8 +3,10 @@
#include "common_structs.h"
ApiStatus func_802A9000_42DA10(Evt* script, s32 isInitialCall);
ApiStatus func_802A91A0_42DBB0(Evt* script, s32 isInitialCall);
void func_802A92A0_42DCB0(void);
ApiStatus action_command_mega_shock_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_mega_shock_start(Evt* script, s32 isInitialCall);
void action_command_mega_shock_update(void);
void action_command_mega_shock_draw(void);
void action_command_mega_shock_free(void);
#endif

View File

@ -1,97 +1,90 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_power_shock
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern HudScript HES_MashAButton;
extern HudScript HES_RunAwayOK;
extern HudScript HES_100pct;
extern s32 D_802943A0[];
s32 D_802A9AA0_42D9B0[] = { 0, 25, 50, 75, 75, 0, 0, 0};
extern s32 D_802A9B00;
void func_80268834(s32, s32, s32, s32);
static s32 D_802A9B00;
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
s32 temp_v1;
battleStatus->unk_82 = 100;
battleStatus->unk_434 = D_802943A0;
battleStatus->actionCmdDifficultyTable = actionCmdTablePowerShock;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_POWER_SHOCK;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_46 = rand_int(100);
actionCommandStatus->unk_6C = 30;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->unk_66 = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->thresholdLevel = rand_int(100);
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->isBarFilled = FALSE;
actionCommandStatus->thresholdMoveDir = 0;
D_802A9B00 = 0;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[3] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_RunAwayOK);
actionCommandStatus->hudElements[4] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
temp_v1 = (100 - actionCommandStatus->unk_46) * 60;
temp_v1 = (100 - actionCommandStatus->thresholdLevel) * 60;
temp_v1 /= 100;
temp_v1 = 29 - temp_v1;
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - temp_v1, actionCommandStatus->hudElementY + 17);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudPosX - temp_v1, actionCommandStatus->hudPosY + 17);
return ApiStatus_DONE2;
}
ApiStatus func_802A9210_42D120(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->easyVersion = evt_get_variable(script, *args++);
actionCommandStatus->unk_60 = 0;
action_command_init_status();
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->targetWeakness = evt_get_variable(script, *args++);
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
@ -100,7 +93,7 @@ ApiStatus func_802A9210_42D120(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
void func_802A9310_42D220(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -112,67 +105,67 @@ void func_802A9310_42D220(void) {
case 0:
btl_set_popup_duration(99);
id = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
id = actionCommandStatus->hudElements[4];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
actionCommandStatus->state = 1;
break;
case 1:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_6C != 0) {
actionCommandStatus->unk_6C--;
if (actionCommandStatus->hudPrepareTime != 0) {
actionCommandStatus->hudPrepareTime--;
} else {
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(
actionCommandStatus->hudElements[0],
actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY);
actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY);
hud_element_set_render_pos(
actionCommandStatus->hudElements[1],
actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY + 28);
actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
phi_a1 = 100 - actionCommandStatus->unk_46;
phi_a1 = 100 - actionCommandStatus->thresholdLevel;
new_var = 29 - (phi_a1 * 60) / 100;
hud_element_set_render_pos(
actionCommandStatus->hudElements[4],
actionCommandStatus->hudElementX - new_var,
actionCommandStatus->hudElementY + 17);
actionCommandStatus->hudPosX - new_var,
actionCommandStatus->hudPosY + 17);
}
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
break;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_5C = 0;
D_802A9B00 = 1;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
// fallthrough
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_68 == 0) {
if (actionCommandStatus->easyVersion != 0) {
if (!actionCommandStatus->isBarFilled) {
if (actionCommandStatus->targetWeakness != 0) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
actionCommandStatus->barFillLevel -= D_802A9AA0_42D9B0[actionCommandStatus->barFillLevel / cutoff / 20];
if (actionCommandStatus->barFillLevel < 0) {
@ -187,10 +180,9 @@ void func_802A9310_42D220(void) {
}
if (battleStatus->currentButtonsPressed & BUTTON_A) {
phi_a1 = actionCommandStatus->easyVersion;
phi_a1 = actionCommandStatus->targetWeakness;
if (phi_a1 != 0) {
// unk_434 = array of scaling values based on attack difficulty (unk_50).
s32 a = battleStatus->unk_434[actionCommandStatus->unk_50];
s32 a = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
phi_a1 = (((a * 850) / 100) * phi_a1) / 100;
actionCommandStatus->barFillLevel += phi_a1;
@ -204,35 +196,35 @@ void func_802A9310_42D220(void) {
if (actionCommandStatus->barFillLevel > 10000) {
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
actionCommandStatus->isBarFilled = TRUE;
id = actionCommandStatus->hudElements[3];
hud_element_set_render_pos(
id,
actionCommandStatus->hudElementX + 50,
actionCommandStatus->hudElementY + 28);
actionCommandStatus->hudPosX + 50,
actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionResult * 12);
if (actionCommandStatus->unk_54 == 0) {
if (actionCommandStatus->frameCounter == 0) {
phi_a1 = actionCommandStatus->barFillLevel;
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
phi_a1 = 0;
}
battleStatus->unk_84 = phi_a1 / 100;
battleStatus->actionResult = phi_a1 / 100;
if (phi_a1 == 0) {
battleStatus->actionSuccess = -1;
} else if (battleStatus->unk_84 >= actionCommandStatus->unk_46) {
} else if (battleStatus->actionResult >= actionCommandStatus->thresholdLevel) {
battleStatus->actionSuccess = 1;
} else {
battleStatus->actionSuccess = 0;
}
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (cutoff / 2 < battleStatus->unk_84) {
if (cutoff / 2 < battleStatus->actionResult) {
battleStatus->unk_86 = 1;
} else {
battleStatus->unk_86 = -4;
@ -244,24 +236,24 @@ void func_802A9310_42D220(void) {
sfx_stop_sound(SOUND_80000041);
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
} else {
actionCommandStatus->unk_54--;
actionCommandStatus->frameCounter--;
}
break;
case 12:
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
actionCommandStatus->barFillLevel -= 100;
if (actionCommandStatus->barFillLevel < 0) {
actionCommandStatus->barFillLevel = 0;
}
}
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
break;
}
func_80268C9C();
action_command_free();
break;
}
@ -271,23 +263,23 @@ void func_802A9310_42D220(void) {
case 1:
case 10:
case 11:
if (actionCommandStatus->unk_66 == 0) {
actionCommandStatus->unk_46 += 7;
if (actionCommandStatus->unk_46 >= 100) {
actionCommandStatus->unk_46 = 100;
actionCommandStatus->unk_66 = 1;
if (actionCommandStatus->thresholdMoveDir == 0) {
actionCommandStatus->thresholdLevel += 7;
if (actionCommandStatus->thresholdLevel >= 100) {
actionCommandStatus->thresholdLevel = 100;
actionCommandStatus->thresholdMoveDir = 1;
}
} else {
actionCommandStatus->unk_46 -= 7;
if (actionCommandStatus->unk_46 <= 0) {
actionCommandStatus->unk_46 = 0;
actionCommandStatus->unk_66 = 0;
actionCommandStatus->thresholdLevel -= 7;
if (actionCommandStatus->thresholdLevel <= 0) {
actionCommandStatus->thresholdLevel = 0;
actionCommandStatus->thresholdMoveDir = 0;
}
}
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 y;
s32 x;
@ -295,10 +287,10 @@ void N(draw_hud_elements)(void) {
s32 temp_a1;
s32 temp_v0;
temp_v0 = actionCommandStatus->unk_46 * 60;
temp_v0 = actionCommandStatus->thresholdLevel * 60;
x = 60 - temp_v0 / 100;
temp_a1 = x - 31;
hud_element_set_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudElementX - temp_a1, actionCommandStatus->hudElementY + 17);
hud_element_set_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudPosX - temp_a1, actionCommandStatus->hudPosY + 17);
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
id = actionCommandStatus->hudElements[1];
@ -308,17 +300,17 @@ void N(draw_hud_elements)(void) {
hud_element_get_render_pos(id, &x, &y);
if (D_802A9B00 == 0) {
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
} else if (actionCommandStatus->unk_68 == 0) {
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 4);
draw_mash_meter_multicolor_with_divisor(x, y, actionCommandStatus->barFillLevel / 100, 1);
} else if (!actionCommandStatus->isBarFilled) {
draw_mash_meter_multicolor_with_divisor(x, y, actionCommandStatus->barFillLevel / 100, 4);
} else {
func_80268834(x, y, actionCommandStatus->barFillLevel / 100, 4);
draw_mash_meter_blink_with_divisor(x, y, actionCommandStatus->barFillLevel / 100, 4);
}
id = actionCommandStatus->hudElements[3];
hud_element_draw_clipped(id);
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
hud_element_free(gActionCommandStatus.hudElements[3]);

View File

@ -3,8 +3,10 @@
#include "common_structs.h"
ApiStatus action_command_power_shock_CreateHudElements(Evt* script, s32 isInitialCall);
ApiStatus func_802A9210_42D120(Evt* script, s32 isInitialCall);
void func_802A9310_42D220(void);
ApiStatus action_command_power_shock_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_power_shock_start(Evt* script, s32 isInitialCall);
void action_command_power_shock_update(void);
void action_command_power_shock_draw(void);
void action_command_power_shock_free(void);
#endif

View File

@ -1,15 +1,9 @@
#include "common.h"
#include "battle/battle.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_smack
extern HudScript HES_BlueMeter;
extern HudScript HES_StickNeutral;
extern HudScript HES_100pct;
extern HudScript HES_StickMashLeft;
extern s32 D_802943E0;
typedef struct UnkVec2s {
/* 0x00 */ s16 unk_0;
/* 0x02 */ s16 unk_2;
@ -39,56 +33,56 @@ s32 D_802A9A20_42EDC0[] = {
0x23, 0x3C, 0x50, 0x63, 0xC8, 0x00,
};
ApiStatus func_802A9000_42E3A0(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 hudElement;
battleStatus->unk_82 = 100;
battleStatus->unk_434 = &D_802943E0;
battleStatus->actionCmdDifficultyTable = actionCmdTableSmack;
battleStatus->unk_86 = 127;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_SMACK;
actionCommandStatus->unk_61 = 1;
actionCommandStatus->unk_6C = 30;
actionCommandStatus->showHud = TRUE;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_84 = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
battleStatus->actionResult = 0;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
hudElement = hud_element_create(&HES_StickNeutral);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hudElement = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
#include "common/MashActionCommandInit.inc.c"
#include "common/MashActionCommandStart.inc.c"
void func_802A9298_42E638(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Actor* partnerActor = battleStatus->partnerActor;
@ -101,51 +95,51 @@ void func_802A9298_42E638(void) {
btl_set_popup_duration(99);
hudElement = actionCommandStatus->hudElements[0];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
actionCommandStatus->state = 1;
break;
case 1:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_6C != 0) {
actionCommandStatus->unk_6C--;
if (actionCommandStatus->hudPrepareTime != 0) {
actionCommandStatus->hudPrepareTime--;
break;
}
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
break;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_StickMashLeft);
actionCommandStatus->barFillLevel = 0;
battleStatus->unk_85 = 0;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
// fallthrough
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
s32 index;
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
actionCommandStatus->barFillLevel -=
@ -155,23 +149,23 @@ void func_802A9298_42E638(void) {
actionCommandStatus->barFillLevel = 0;
}
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
if (battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) {
actionCommandStatus->unk_5C = TRUE;
}
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && actionCommandStatus->unk_5C) {
if (actionCommandStatus->easyVersion == 0) {
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] * 13;
if (actionCommandStatus->targetWeakness == 0) {
actionCommandStatus->barFillLevel += battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 13;
} else {
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] * 850 / 100;
actionCommandStatus->barFillLevel += battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 850 / 100;
}
actionCommandStatus->unk_5C = 0;
}
if (battleStatus->currentButtonsPressed & BUTTON_STICK_RIGHT) {
actionCommandStatus->barFillLevel -= battleStatus->unk_434[actionCommandStatus->unk_50] * 11;
actionCommandStatus->barFillLevel -= battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 11;
}
}
}
@ -183,60 +177,60 @@ void func_802A9298_42E638(void) {
if (actionCommandStatus->barFillLevel > 10000) {
hudElement = actionCommandStatus->hudElements[2];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX + 50,
actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionResult * 12);
switch (partnerActor->actorBlueprint->level) {
case 0:
if (battleStatus->unk_84 >= D_802A99E4_42ED84[battleStatus->unk_85]) {
if (battleStatus->actionResult >= D_802A99E4_42ED84[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0) {
s32 index = battleStatus->unk_85 - 1;
if (battleStatus->unk_84 < D_802A99E4_42ED84[index]) {
if (battleStatus->actionResult < D_802A99E4_42ED84[index]) {
battleStatus->unk_85--;
}
}
break;
case 1:
if (battleStatus->unk_84 >= D_802A99F4_42ED94[battleStatus->unk_85]) {
if (battleStatus->actionResult >= D_802A99F4_42ED94[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0) {
s32 index = battleStatus->unk_85 - 1;
if (battleStatus->unk_84 < D_802A99F4_42ED94[index]) {
if (battleStatus->actionResult < D_802A99F4_42ED94[index]) {
battleStatus->unk_85--;
}
}
break;
case 2:
if (actionCommandStatus->easyVersion == 0) {
if (battleStatus->unk_84 >= D_802A9A08_42EDA8[battleStatus->unk_85]) {
if (actionCommandStatus->targetWeakness == 0) {
if (battleStatus->actionResult >= D_802A9A08_42EDA8[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0) {
s32 index = battleStatus->unk_85 - 1;
if (battleStatus->unk_84 < D_802A9A08_42EDA8[index]) {
if (battleStatus->actionResult < D_802A9A08_42EDA8[index]) {
battleStatus->unk_85--;
}
}
} else {
if (battleStatus->unk_84 >= D_802A9A20_42EDC0[battleStatus->unk_85]) {
if (battleStatus->actionResult >= D_802A9A20_42EDC0[battleStatus->unk_85]) {
battleStatus->unk_85++;
}
if (battleStatus->unk_85 > 0) {
s32 index = battleStatus->unk_85 - 1;
if (battleStatus->unk_84 < D_802A9A20_42EDC0[index]) {
if (battleStatus->actionResult < D_802A9A20_42EDC0[index]) {
battleStatus->unk_85--;
}
}
@ -244,7 +238,7 @@ void func_802A9298_42E638(void) {
break;
}
if (actionCommandStatus->unk_54 == 0) {
if (actionCommandStatus->frameCounter == 0) {
s32 mashMeterCutoff;
if (actionCommandStatus->barFillLevel == 0) {
@ -267,19 +261,19 @@ void func_802A9298_42E638(void) {
btl_set_popup_duration(0);
sfx_stop_sound(SOUND_80000041);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
}
actionCommandStatus->unk_54--;
actionCommandStatus->frameCounter--;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
break;
}
func_80268C9C();
action_command_free();
break;
}
}

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
ApiStatus func_802A9000_42E3A0(Evt* script, s32 isInitialCall);
ApiStatus action_command_smack_MashActionCommandInit(Evt* script, s32 isInitialCall);
void func_802A9298_42E638(void);
ApiStatus action_command_smack_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_smack_start(Evt* script, s32 isInitialCall);
void action_command_smack_update(void);
void action_command_smack_draw(void);
void action_command_smack_free(void);
#endif

View File

@ -1,85 +1,80 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_spiny_surge
extern s32 D_80294400;
extern HudScript HES_BlueMeter;
extern HudScript HES_StickNeutral;
extern HudScript HES_StickMashLeft;
extern HudScript HES_100pct;
s32 D_802A9860_42F680[8] = { 0, 25, 50, 75, 75, 0, 0, 0 };
extern s32 D_802A98C0; // bss?
ApiStatus func_802A9000_42EE20(Evt* script, s32 isInitialCall) {
BSS s32 D_802A98C0;
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
battleStatus->unk_82 = 0x10;
battleStatus->unk_434 = &D_80294400;
battleStatus->unk_82 = 16;
battleStatus->actionCmdDifficultyTable = actionCmdTableSpinySurge;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = 19;
actionCommandStatus->actionCommandID = ACTION_COMMAND_SPINY_SURGE;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->unk_6C = 30;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_StickNeutral);
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
ApiStatus func_802A916C_42EF8C(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
@ -89,7 +84,7 @@ ApiStatus func_802A916C_42EF8C(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
void func_802A9254_42F074(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -101,13 +96,13 @@ void func_802A9254_42F074(void) {
id = actionCommandStatus->hudElements[0];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
@ -116,40 +111,40 @@ void func_802A9254_42F074(void) {
case 1:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_6C != 0) {
actionCommandStatus->unk_6C--;
if (actionCommandStatus->hudPrepareTime != 0) {
actionCommandStatus->hudPrepareTime--;
break;
}
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
break;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_StickMashLeft);
actionCommandStatus->unk_5C = 0;
D_802A98C0 = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
// fallthrough
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
actionCommandStatus->barFillLevel -=
D_802A9860_42F680[actionCommandStatus->barFillLevel / cutoff / 20];
@ -158,12 +153,12 @@ void func_802A9254_42F074(void) {
actionCommandStatus->barFillLevel = 0;
}
if (actionCommandStatus->unk_68 == 0) {
if (!actionCommandStatus->isBarFilled) {
if (battleStatus->currentButtonsPressed & BUTTON_STICK_LEFT) {
actionCommandStatus->barFillLevel += (battleStatus->unk_434[actionCommandStatus->unk_50] * 1250) / 100;
actionCommandStatus->barFillLevel += (battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 1250) / 100;
}
if (battleStatus->currentButtonsPressed & BUTTON_STICK_RIGHT) {
actionCommandStatus->barFillLevel -= (battleStatus->unk_434[actionCommandStatus->unk_50] * 1250) / 100;
actionCommandStatus->barFillLevel -= (battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 1250) / 100;
}
}
}
@ -175,8 +170,8 @@ void func_802A9254_42F074(void) {
if (actionCommandStatus->barFillLevel > 10000) {
id = actionCommandStatus->hudElements[2];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(id, 2);
}
@ -195,12 +190,12 @@ void func_802A9254_42F074(void) {
}
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
D_802A98C0 = battleStatus->currentButtonsDown;
battleStatus->unk_84 = actionCommandStatus->unk_5C;
battleStatus->actionResult = actionCommandStatus->unk_5C;
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->actionSuccess * 12);
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionSuccess * 12);
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
@ -223,14 +218,14 @@ void func_802A9254_42F074(void) {
btl_set_popup_duration(0);
sfx_stop_sound(SOUND_80000041);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
} else {
func_80268C9C();
action_command_free();
}
break;
}

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
ApiStatus func_802A9000_42EE20(Evt* script, s32 isInitialCall);
ApiStatus func_802A916C_42EF8C(Evt* script, s32 isInitialCall);
void func_802A9254_42F074(void);
ApiStatus action_command_spiny_surge_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_spiny_surge_start(Evt* script, s32 isInitialCall);
void action_command_spiny_surge_update(void);
void action_command_spiny_surge_draw(void);
void action_command_spiny_surge_free(void);
#endif

View File

@ -1,67 +1,61 @@
#include "common.h"
#include "hud_element.h"
#include "audio/public.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_spook
extern HudScript HES_BlueMeter;
extern HudScript HES_StickNeutral;
extern HudScript HES_StickMashLeft;
extern HudScript HES_100pct;
extern s32 D_80294440;
s32 D_802A9920_430940[8] = { 0, 25, 50, 75, 75, 0, 0, 0 };
ApiStatus func_802A9000_430020(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
battleStatus->unk_82 = 100;
battleStatus->unk_434 = &D_80294440;
battleStatus->actionCmdDifficultyTable = actionCmdTableSpook;
battleStatus->unk_86 = 127;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_SPOOK;
actionCommandStatus->unk_61 = 1;
actionCommandStatus->unk_6C = 30;
actionCommandStatus->showHud = TRUE;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->unk_68 = 0;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->isBarFilled = FALSE;
battleStatus->actionSuccess = 0;
battleStatus->unk_84 = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
battleStatus->actionResult = 0;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_StickNeutral);
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_100pct);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
#include "common/MashActionCommandInit.inc.c"
#include "common/MashActionCommandStart.inc.c"
void func_802A9298_4302B8(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -74,13 +68,13 @@ void func_802A9298_4302B8(void) {
id = actionCommandStatus->hudElements[0];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
@ -88,30 +82,30 @@ void func_802A9298_4302B8(void) {
break;
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_StickMashLeft);
actionCommandStatus->barFillLevel = 0;
battleStatus->unk_84 = 0;
battleStatus->actionResult = 0;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_68 == 0) {
if (actionCommandStatus->easyVersion != 0) {
if (!actionCommandStatus->isBarFilled) {
if (actionCommandStatus->targetWeakness != 0) {
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
actionCommandStatus->barFillLevel -= D_802A9920_430940[actionCommandStatus->barFillLevel / cutoff / 20];
@ -125,24 +119,24 @@ void func_802A9298_4302B8(void) {
}
}
if (actionCommandStatus->unk_68 == 0) {
if (actionCommandStatus->easyVersion != 0) {
if (!actionCommandStatus->isBarFilled) {
if (actionCommandStatus->targetWeakness != 0) {
if (battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) {
actionCommandStatus->unk_5C = TRUE;
}
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && actionCommandStatus->unk_5C) {
s32 a = battleStatus->unk_434[actionCommandStatus->unk_50];
s32 b = actionCommandStatus->easyVersion * 850;
s32 a = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
s32 b = actionCommandStatus->targetWeakness * 850;
actionCommandStatus->barFillLevel += (a * b) / 10000;
actionCommandStatus->unk_5C = 0;
}
if (battleStatus->currentButtonsPressed & BUTTON_STICK_RIGHT) {
s32 a = battleStatus->unk_434[actionCommandStatus->unk_50];
s32 b = actionCommandStatus->easyVersion * 850;
s32 a = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
s32 b = actionCommandStatus->targetWeakness * 850;
actionCommandStatus->barFillLevel -= (a * b) / 10000;
}
@ -172,21 +166,21 @@ void func_802A9298_4302B8(void) {
if (actionCommandStatus->barFillLevel > 10000) {
id = actionCommandStatus->hudElements[2];
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_68 = 1;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
actionCommandStatus->isBarFilled = TRUE;
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 50, actionCommandStatus->hudPosY + 28);
hud_element_clear_flags(id, 2);
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionResult * 12);
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
fillLevel = actionCommandStatus->barFillLevel;
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
fillLevel = 0;
}
@ -209,22 +203,22 @@ void func_802A9298_4302B8(void) {
}
btl_set_popup_duration(0);
sfx_stop_sound(SOUND_80000041);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
actionCommandStatus->barFillLevel -= 100;
if (actionCommandStatus->barFillLevel < 0) {
actionCommandStatus->barFillLevel = 0;
}
}
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
ApiStatus func_802A9000_430020(Evt* script, s32 isInitialCall);
ApiStatus action_command_spook_MashActionCommandInit(Evt* script, s32 isInitialCall);
void func_802A9298_4302B8(void);
ApiStatus action_command_spook_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_spook_start(Evt* script, s32 isInitialCall);
void action_command_spook_update(void);
void action_command_spook_draw(void);
void action_command_spook_free(void);
#endif

View File

@ -1,73 +1,67 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_squirt
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern HudScript HES_AButtonDown;
extern HudScript HES_PressAButton;
extern s32 D_80294380;
s32 D_802A9760_42A480[] = { 300, 300, 265, 220, 175, 175, };
s32 D_802A9778_42A498[] = { 300, 300, 265, 220, 175, 175, };
ApiStatus func_802A9000_429D20(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
battleStatus->unk_82 = 5;
battleStatus->unk_434 = &D_80294380;
if (battleStatus->unk_83 == 0) {
battleStatus->actionCmdDifficultyTable = actionCmdTableSquirt;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_SQUIRT;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
battleStatus->unk_84 = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionResult = 0;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
ApiStatus func_802A911C_429E3C(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->unk_60 = 0;
action_command_init_status();
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
@ -76,7 +70,7 @@ ApiStatus func_802A911C_429E3C(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
void func_802A9208_429F28(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -89,14 +83,14 @@ void func_802A9208_429F28(void) {
btl_set_popup_duration(99);
id = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
@ -105,28 +99,28 @@ void func_802A9208_429F28(void) {
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX,
actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
break;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_AButtonDown);
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
sfx_play_sound_with_params(SOUND_80000041, 0, 0, 0);
actionCommandStatus->state = 11;
// fallthrough
@ -141,7 +135,7 @@ void func_802A9208_429F28(void) {
actionCommandStatus->barFillLevel = 0;
}
} else {
actionCommandStatus->barFillLevel += D_802A9778_42A498[temp / 20] * battleStatus->unk_434[actionCommandStatus->unk_50] / 100;
actionCommandStatus->barFillLevel += D_802A9778_42A498[temp / 20] * battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] / 100;
if (actionCommandStatus->barFillLevel > 10000) {
actionCommandStatus->barFillLevel = 10000;
actionCommandStatus->unk_5C = 1;
@ -155,8 +149,8 @@ void func_802A9208_429F28(void) {
}
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
sfx_adjust_env_sound_params(SOUND_80000041, 0, 0, battleStatus->actionResult * 12);
id = actionCommandStatus->hudElements[0];
if (temp < 80) {
if (hud_element_get_script(id) != &HES_AButtonDown) {
@ -168,19 +162,19 @@ void func_802A9208_429F28(void) {
}
}
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
if (actionCommandStatus->barFillLevel == 0) {
battleStatus->actionSuccess = -1;
} else {
battleStatus->actionSuccess = battleStatus->unk_84;
battleStatus->actionSuccess = battleStatus->actionResult;
}
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
if (cutoff / 2 < battleStatus->unk_84) {
if (cutoff / 2 < battleStatus->actionResult) {
battleStatus->unk_86 = 1;
} else {
battleStatus->unk_86 = -4;
@ -191,20 +185,20 @@ void func_802A9208_429F28(void) {
}
btl_set_popup_duration(0);
sfx_stop_sound(SOUND_80000041);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
} else {
func_80268C9C();
action_command_free();
}
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
s32 x, y;
s32 id;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
@ -214,13 +208,13 @@ void N(draw_hud_elements)(void) {
hud_element_draw_clipped(id);
hud_element_get_render_pos(id, &x, &y);
if (actionCommandStatus->unk_5C == 0) {
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
draw_mash_meter_multicolor_with_divisor(x, y, actionCommandStatus->barFillLevel / 100, 1);
} else {
func_802687E4(x, y, actionCommandStatus->barFillLevel / 100, 1, 1);
draw_mash_meter_mode_with_divisor(x, y, actionCommandStatus->barFillLevel / 100, 1, MASH_METER_MODE_ONE_COLOR);
}
}
void N(free_hud_elements)(void) {
void N(free)(void) {
sfx_stop_sound(SOUND_80000041);
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
ApiStatus func_802A9000_429D20(Evt* script, s32 isInitialCall);
ApiStatus func_802A911C_429E3C(Evt* script, s32 isInitialCall);
void func_802A9208_429F28(void);
ApiStatus action_command_squirt_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_squirt_start(Evt* script, s32 isInitialCall);
void action_command_squirt_update(void);
void action_command_squirt_draw(void);
void action_command_squirt_free(void);
#endif

View File

@ -1,66 +1,61 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_stop_leech
extern HudScript HES_MashAButton;
extern HudScript HES_BlueMeter;
extern HudScript HES_AButton;
extern s32 D_80294260;
ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 hudElement;
battleStatus->unk_82 = 5;
battleStatus->unk_434 = &D_80294260;
if (battleStatus->unk_83 == 0) {
battleStatus->actionCmdDifficultyTable = actionCmdTableStopLeech;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_STOP_LEECH;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->hudPosY = 80;
hudElement = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = hudElement;
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(hudElement, 0);
hudElement = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = hudElement;
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(hudElement, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(hudElement, 0);
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
ApiStatus func_802A9110_4256A0(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->unk_60 = 0;
action_command_init_status();
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
@ -69,7 +64,7 @@ ApiStatus func_802A9110_4256A0(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
void func_802A91F8_425788(void) {
void N(update)(void) {
BattleStatus* battleStatus = &gBattleStatus;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 hudElement;
@ -79,89 +74,89 @@ void func_802A91F8_425788(void) {
case 0:
btl_set_popup_duration(99);
hudElement = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
hud_element_set_alpha(hudElement, 0xFF);
hudElement = actionCommandStatus->hudElements[1];
hud_element_set_alpha(hudElement, 0xFF);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
}
actionCommandStatus->state = 1;
break;
case 1:
btl_set_popup_duration(99);
hudElementX = actionCommandStatus->hudElementX + 20;
actionCommandStatus->hudElementX = hudElementX;
hudElementX = actionCommandStatus->hudPosX + 20;
actionCommandStatus->hudPosX = hudElementX;
if (hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E -= 1;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime -= 1;
break;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->state = 11;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_6A == 0) {
if (!actionCommandStatus->berserkerEnabled) {
if (battleStatus->currentButtonsPressed & BUTTON_A) {
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50];
actionCommandStatus->barFillLevel += battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty];
}
} else {
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] / 6;
actionCommandStatus->barFillLevel += rand_int((battleStatus->unk_434[actionCommandStatus->unk_50]) / 6);
actionCommandStatus->barFillLevel += battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] / 6;
actionCommandStatus->barFillLevel += rand_int((battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty]) / 6);
}
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals] <= battleStatus->unk_84) {
actionCommandStatus->unk_54 = 0;
battleStatus->actionResult = actionCommandStatus->barFillLevel / 100;
if (actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals] <= battleStatus->actionResult) {
actionCommandStatus->frameCounter = 0;
}
if (actionCommandStatus->unk_54 == 0) {
if (actionCommandStatus->frameCounter == 0) {
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
}
actionCommandStatus->unk_54 -= 1;
actionCommandStatus->frameCounter -= 1;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54 -= 1;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter -= 1;
break;
}
battleStatus->actionSuccess = 1;
battleStatus->unk_86 = 127;
func_80268C9C();
action_command_free();
default:
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
s32 x, y;
s32 hudElement;
if (actionCommandStatus->unk_6A == 0) {
if (!actionCommandStatus->berserkerEnabled) {
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
}
hudElement = actionCommandStatus->hudElements[1];
hud_element_draw_clipped(hudElement);
hud_element_get_render_pos(hudElement, &x, &y);
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 2);
draw_mash_meter_multicolor_with_divisor(x, y, actionCommandStatus->barFillLevel / 100, 2);
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
}

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
void func_802A91F8_425788(void);
ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall);
ApiStatus func_802A9110_4256A0(Evt* script, s32 isInitialCall);
ApiStatus action_command_stop_leech_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_stop_leech_start(Evt* script, s32 isInitialCall);
void action_command_stop_leech_update(void);
void action_command_stop_leech_draw(void);
void action_command_stop_leech_free(void);
#endif

View File

@ -1,54 +1,44 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_tidal_wave
extern HudScript HES_BlueMeter;
extern HudScript HES_PressAButton;
extern HudScript HES_PressBButton;
extern HudScript HES_BButtonHeld;
extern HudScript HES_CDownButtonHeld;
extern HudScript HES_PressCDownButton;
extern HudScript HES_AButton;
extern HudScript HES_AButtonDown;
extern s32 D_802944A0;
HudScript* D_802A97C0_42CEB0[3] = { &HES_PressAButton, &HES_PressBButton, &HES_PressCDownButton };
HudScript* D_802A97CC_42CEBC[3] = { &HES_AButtonDown, &HES_BButtonHeld, &HES_CDownButtonHeld };
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
s32 i;
battleStatus->unk_82 = 5;
battleStatus->unk_434 = &D_802944A0;
battleStatus->actionCmdDifficultyTable = actionCmdTableTidalWave;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
} else {
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_TIDAL_WAVE;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
battleStatus->unk_84 = 0;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionResult = 0;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[0] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
for (i = 1; i < ARRAY_COUNT(actionCommandStatus->hudElements); i++) {
for (i = 1; i < 15; i++) {
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[i] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
}
@ -57,26 +47,26 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
}
}
ApiStatus func_802A9138_42C828(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->unk_60 = 0;
action_command_init_status();
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_84 = 0;
battleStatus->actionResult = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
battleStatus->flags1 &= ~BS_FLAGS1_8000;
@ -100,7 +90,7 @@ void N(update)(void) {
case 0:
btl_set_popup_duration(99);
id = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
}
hud_element_set_alpha(id, 255);
@ -108,26 +98,26 @@ void N(update)(void) {
break;
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(
actionCommandStatus->hudElements[0],
actionCommandStatus->hudElementX + 21,
actionCommandStatus->hudElementY + 28);
actionCommandStatus->hudPosX + 21,
actionCommandStatus->hudPosY + 28);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
break;
}
actionCommandStatus->unk_5D = 1;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
actionCommandStatus->unk_5C = rand_int(2);
actionCommandStatus->state = 11;
actionCommandStatus->unk_72 = 0;
actionCommandStatus->wrongInputFrameCounter = 0;
// fallthrough
case 11:
btl_set_popup_duration(99);
@ -144,16 +134,16 @@ void N(update)(void) {
id, D_802A97C0_42CEB0[newButton]);
hud_element_set_render_pos(
id,
actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20) + 16,
actionCommandStatus->hudElementY);
actionCommandStatus->hudPosX + ((actionCommandStatus->unk_5D - 1) * 20) + 16,
actionCommandStatus->hudPosY);
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
sfx_play_sound(SOUND_233);
actionCommandStatus->unk_70 = 1;
actionCommandStatus->lookBackCounter = 1;
actionCommandStatus->state = 12;
// fallthrough
case 12:
btl_set_popup_duration(99);
if (--actionCommandStatus->unk_54 == 0) {
if (--actionCommandStatus->frameCounter == 0) {
actionCommandStatus->state = 13;
break;
}
@ -165,13 +155,13 @@ void N(update)(void) {
// Number of frames until input possible (if negative, used to look backward;
// allows correct presses to be buffered after an incorrect press).
actionCommandStatus->unk_70--;
actionCommandStatus->lookBackCounter--;
// Wrong-input lockout frame counter
actionCommandStatus->unk_72--;
actionCommandStatus->wrongInputFrameCounter--;
if (actionCommandStatus->unk_70 <= 0) {
if (actionCommandStatus->lookBackCounter <= 0) {
// Determine number of frames to look back in input buffer (up to 20).
numLookbackFrames = abs(actionCommandStatus->unk_70);
numLookbackFrames = abs(actionCommandStatus->lookBackCounter);
if (numLookbackFrames > 20) {
numLookbackFrames = 20;
}
@ -194,12 +184,12 @@ void N(update)(void) {
}
// If not locked out from previous wrong press...
if (actionCommandStatus->unk_72 > 0) {
if (actionCommandStatus->wrongInputFrameCounter > 0) {
break;
};
success = FALSE;
actionCommandStatus->unk_60 = FALSE;
actionCommandStatus->wrongButtonPressed = FALSE;
// Check for presses of the current button.
switch (actionCommandStatus->unk_5C) {
@ -210,7 +200,7 @@ void N(update)(void) {
buttonsPressed = battleStatus->pushInputBuffer[bufferPos];
if (buttonsPressed != 0) {
if (buttonsPressed & ~BUTTON_A) {
actionCommandStatus->unk_60 = TRUE;
actionCommandStatus->wrongButtonPressed = TRUE;
} else {
success = TRUE;
}
@ -224,7 +214,7 @@ void N(update)(void) {
buttonsPressed = battleStatus->pushInputBuffer[bufferPos];
if (buttonsPressed != 0) {
if (buttonsPressed & ~BUTTON_B) {
actionCommandStatus->unk_60 = TRUE;
actionCommandStatus->wrongButtonPressed = TRUE;
} else {
success = TRUE;
}
@ -238,7 +228,7 @@ void N(update)(void) {
buttonsPressed = battleStatus->pushInputBuffer[bufferPos];
if (buttonsPressed != 0) {
if (buttonsPressed & ~BUTTON_C_DOWN) {
actionCommandStatus->unk_60 = TRUE;
actionCommandStatus->wrongButtonPressed = TRUE;
} else {
success = TRUE;
}
@ -247,11 +237,11 @@ void N(update)(void) {
break;
}
if (actionCommandStatus->unk_60) {
if (actionCommandStatus->wrongButtonPressed) {
// Wrong; prevent successful inputs for 10 frames.
actionCommandStatus->unk_72 = 10;
actionCommandStatus->wrongInputFrameCounter = 10;
sfx_play_sound(SOUND_MENU_ERROR);
actionCommandStatus->unk_70 = 0;
actionCommandStatus->lookBackCounter = 0;
}
if (success) {
@ -261,16 +251,16 @@ void N(update)(void) {
hud_element_set_scale(id, 0.5f);
hud_element_set_render_pos(
id,
actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20),
actionCommandStatus->hudElementY + 7);
actionCommandStatus->hudPosX + ((actionCommandStatus->unk_5D - 1) * 20),
actionCommandStatus->hudPosY + 7);
actionCommandStatus->unk_5D++;
actionCommandStatus->barFillLevel +=
battleStatus->unk_434[actionCommandStatus->unk_50] * 0x12;
battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 0x12;
if (actionCommandStatus->barFillLevel > 10000) {
actionCommandStatus->barFillLevel = 10000;
}
actionCommandStatus->state = 11;
battleStatus->unk_84++;
battleStatus->actionResult++;
sfx_play_sound(SOUND_21C);
return;
}
@ -280,30 +270,30 @@ void N(update)(void) {
}
break;
case 13:
if (battleStatus->unk_84 == 0) {
if (battleStatus->actionResult == 0) {
battleStatus->actionSuccess = -1;
} else {
battleStatus->actionSuccess = battleStatus->unk_84;
battleStatus->actionSuccess = battleStatus->actionResult;
}
battleStatus->unk_86 = 1;
if (battleStatus->actionSuccess >= 10) {
func_80269160();
}
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 14;
break;
case 14:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
} else {
func_80268C9C();
action_command_free();
}
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
s32 i;
for (i = 1; i < 15; i++) {
@ -311,7 +301,7 @@ void N(draw_hud_elements)(void) {
}
}
void N(free_hud_elements)(void) {
void N(free)(void) {
s32 i;
hud_element_free(gActionCommandStatus.hudElements[0]);

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
ApiStatus action_command_tidal_wave_CreateHudElements(Evt* script, s32 isInitialCall);
ApiStatus func_802A9138_42C828(Evt* script, s32 isInitialCall);
ApiStatus action_command_tidal_wave_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_tidal_wave_start(Evt* script, s32 isInitialCall);
void action_command_tidal_wave_update(void);
void action_command_tidal_wave_draw(void);
void action_command_tidal_wave_free(void);
#endif

View File

@ -1,5 +1,5 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#define NAMESPACE action_command_water_block
@ -107,107 +107,93 @@ HudScript* D_802AB184_42C674[] = {
&HES_WaterBlock1, &HES_WaterBlock2, &HES_WaterBlock3, &HES_WaterBlock4, &HES_WaterBlock4, &HES_WaterBlock4, &HES_WaterBlock4, &HES_WaterBlock4, &HES_WaterBlock4, 0, 0
};
extern s32 D_80294460;
extern HudScript HES_AButton;
extern HudScript HES_AButtonDown;
extern HudScript HES_TimingBar3Chances;
extern HudScript HES_TimingCharge2;
extern HudScript HES_TimingCharge3;
extern HudScript HES_TimingCharge4b;
extern HudScript HES_TimingCharge4c;
extern HudScript HES_TimingOK;
extern HudScript HES_TimingMiss;
extern HudScript HES_TimingWait;
extern HudScript HES_TimingReady;
ApiStatus func_802A9000_42A4F0(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
s32 id;
battleStatus->unk_82 = 5;
battleStatus->unk_434 = &D_80294460;
battleStatus->actionCmdDifficultyTable = actionCmdTableWaterBlock;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
action_command_init_status();
actionCommandStatus->actionCommandID = ACTION_COMMAND_WATER_BLOCK;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->easyVersion = evt_get_variable(script, *args++);
battleStatus->unk_84 = 1;
actionCommandStatus->unk_6C = 30;
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->barFillWidth = 0;
actionCommandStatus->targetWeakness = evt_get_variable(script, *args++);
battleStatus->actionResult = 1;
actionCommandStatus->hudPrepareTime = 30;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_TimingBar3Chances);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_TimingWait);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_TimingWait);
actionCommandStatus->hudElements[3] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_TimingWait);
actionCommandStatus->hudElements[4] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_TimingOK);
actionCommandStatus->hudElements[6] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_TimingOK);
actionCommandStatus->hudElements[7] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_TimingOK);
actionCommandStatus->hudElements[8] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
actionCommandStatus->hudElements[10] = hud_element_create(D_802AB184_42C674[0]);
hud_element_set_render_pos(actionCommandStatus->hudElements[10],
actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
actionCommandStatus->hudElements[11] = hud_element_create(&HES_TimingCharge4c);
hud_element_set_render_pos(actionCommandStatus->hudElements[11],
actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
id = hud_element_create(&HES_TimingCharge4b);
actionCommandStatus->hudElements[12] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
switch (actionCommandStatus->easyVersion) {
switch (actionCommandStatus->targetWeakness) {
case 0:
actionCommandStatus->hudElements[13] = hud_element_create(&HES_WaterBlockBlock);
id = actionCommandStatus->hudElements[13];
@ -222,29 +208,29 @@ ApiStatus func_802A9000_42A4F0(Evt* script, s32 isInitialCall) {
break;
}
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
return ApiStatus_DONE2;
}
ApiStatus func_802A9398_42A888(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->unk_60 = 0;
action_command_init_status();
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
battleStatus->unk_84 = 1;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionResult = 1;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
actionCommandStatus->state = 10;
@ -253,7 +239,7 @@ ApiStatus func_802A9398_42A888(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
void func_802A948C_42A97C(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 pos;
@ -265,127 +251,127 @@ void func_802A948C_42A97C(void) {
case 0:
btl_set_popup_duration(99);
id = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[2];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[3];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[4];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[10];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[11];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[12];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[13];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
actionCommandStatus->state = 1;
break;
case 1:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_6C != 0) {
actionCommandStatus->unk_6C--;
if (actionCommandStatus->hudPrepareTime != 0) {
actionCommandStatus->hudPrepareTime--;
return;
}
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX + 28, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 21, actionCommandStatus->hudElementY + 24);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 24);
hud_element_set_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudElementX + 61, actionCommandStatus->hudElementY + 24);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX + 28, actionCommandStatus->hudPosY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudPosX + 21, actionCommandStatus->hudPosY + 24);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudPosX + 41, actionCommandStatus->hudPosY + 24);
hud_element_set_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudPosX + 61, actionCommandStatus->hudPosY + 24);
id = actionCommandStatus->hudElements[10];
switch (actionCommandStatus->easyVersion) {
switch (actionCommandStatus->targetWeakness) {
case 0:
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 91, actionCommandStatus->hudElementY + 7);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 91, actionCommandStatus->hudPosY + 7);
break;
case 1:
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 91, actionCommandStatus->hudElementY + 13);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 91, actionCommandStatus->hudPosY + 13);
break;
case 2:
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 91, actionCommandStatus->hudElementY + 13);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 91, actionCommandStatus->hudPosY + 13);
break;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[11], actionCommandStatus->hudElementX - 5, actionCommandStatus->hudElementY + 29);
hud_element_set_render_pos(actionCommandStatus->hudElements[12], actionCommandStatus->hudElementX + 7, actionCommandStatus->hudElementY + 29);
hud_element_set_render_pos(actionCommandStatus->hudElements[13], actionCommandStatus->hudElementX + 92, actionCommandStatus->hudElementY + 23);
hud_element_set_render_pos(actionCommandStatus->hudElements[11], actionCommandStatus->hudPosX - 5, actionCommandStatus->hudPosY + 29);
hud_element_set_render_pos(actionCommandStatus->hudElements[12], actionCommandStatus->hudPosX + 7, actionCommandStatus->hudPosY + 29);
hud_element_set_render_pos(actionCommandStatus->hudElements[13], actionCommandStatus->hudPosX + 92, actionCommandStatus->hudPosY + 23);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
actionCommandStatus->unk_54 = actionCommandStatus->unk_52 - 60;
if (actionCommandStatus->unk_54 < 42) {
actionCommandStatus->unk_54 = 42;
actionCommandStatus->frameCounter = actionCommandStatus->duration - 60;
if (actionCommandStatus->frameCounter < 42) {
actionCommandStatus->frameCounter = 42;
}
actionCommandStatus->state = 11;
// fallthrough
case 11:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_54 == 42) {
if (actionCommandStatus->frameCounter == 42) {
hud_element_set_script(actionCommandStatus->hudElements[11], &HES_TimingCharge3);
sfx_play_sound(SOUND_233);
}
if (actionCommandStatus->unk_54 == 22) {
if (actionCommandStatus->frameCounter == 22) {
hud_element_set_script(actionCommandStatus->hudElements[12], &HES_TimingCharge2);
sfx_play_sound(SOUND_233);
}
if (actionCommandStatus->unk_54 == 2) {
if (actionCommandStatus->frameCounter == 2) {
hud_element_set_script(actionCommandStatus->hudElements[2], &HES_TimingReady);
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_AButtonDown);
sfx_play_sound(SOUND_234);
}
actionCommandStatus->unk_54--;
if (actionCommandStatus->unk_54 == 0) {
actionCommandStatus->unk_54 = 20;
actionCommandStatus->frameCounter--;
if (actionCommandStatus->frameCounter == 0) {
actionCommandStatus->frameCounter = 20;
actionCommandStatus->unk_5D = 0;
actionCommandStatus->state = 12;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
}
break;
case 12:
btl_set_popup_duration(99);
if ((actionCommandStatus->unk_60 == 0) && (actionCommandStatus->unk_5C == 0) && (actionCommandStatus->unk_5D >= -5)) {
limit = battleStatus->unk_434[actionCommandStatus->unk_50 * 2] +
battleStatus->unk_434[actionCommandStatus->unk_50 * 2 + 1] +
if (!actionCommandStatus->wrongButtonPressed && (actionCommandStatus->unk_5C == 0) && (actionCommandStatus->unk_5D >= -5)) {
limit = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty * 2] +
battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty * 2 + 1] +
5;
pos = battleStatus->inputBufferPos;
pos -= limit;
@ -402,26 +388,26 @@ void func_802A948C_42A97C(void) {
}
if (i < 5 && (battleStatus->pushInputBuffer[pos] & BUTTON_A)) {
actionCommandStatus->unk_60 = 1;
actionCommandStatus->wrongButtonPressed = TRUE;
}
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !(actionCommandStatus->unk_60 != 0)) ||
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !actionCommandStatus->wrongButtonPressed) ||
(actionCommandStatus->autoSucceed != 0)) {
actionCommandStatus->unk_5C = 1;
battleStatus->unk_84++;
battleStatus->actionResult++;
break;
}
}
}
if ((actionCommandStatus->unk_5D >= -4) && ((actionCommandStatus->unk_60 != 0) || (actionCommandStatus->unk_5C != 0))) {
if ((actionCommandStatus->unk_5D >= -4) && (actionCommandStatus->wrongButtonPressed || (actionCommandStatus->unk_5C != 0))) {
id = actionCommandStatus->hudElements[6];
if (actionCommandStatus->unk_5C != 0) {
hud_element_set_script(id, &HES_TimingOK);
} else {
hud_element_set_script(id, &HES_TimingMiss);
}
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 28, actionCommandStatus->hudElementY + 38);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 28, actionCommandStatus->hudPosY + 38);
hud_element_clear_flags(id, 2);
}
@ -432,30 +418,30 @@ void func_802A948C_42A97C(void) {
} else {
hud_element_set_script(id, &HES_TimingMiss);
}
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 28, actionCommandStatus->hudElementY + 38);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 28, actionCommandStatus->hudPosY + 38);
hud_element_clear_flags(id, 2);
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_AButton);
}
actionCommandStatus->unk_5D--;
if (actionCommandStatus->unk_54 == 2) {
if (actionCommandStatus->frameCounter == 2) {
hud_element_set_script(actionCommandStatus->hudElements[3], &HES_TimingReady);
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_AButtonDown);
sfx_play_sound(SOUND_234);
}
actionCommandStatus->unk_54--;
if (actionCommandStatus->unk_54 == 0) {
actionCommandStatus->unk_54 = 20;
actionCommandStatus->frameCounter--;
if (actionCommandStatus->frameCounter == 0) {
actionCommandStatus->frameCounter = 20;
actionCommandStatus->unk_5D = 0;
actionCommandStatus->state = 13;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
}
break;
case 13:
btl_set_popup_duration(99);
if ((actionCommandStatus->unk_60 == 0) && (actionCommandStatus->unk_5C == 0) && (actionCommandStatus->unk_5D >= -5)) {
limit = battleStatus->unk_434[actionCommandStatus->unk_50 * 2] +
battleStatus->unk_434[actionCommandStatus->unk_50 * 2 + 1] +
if (!actionCommandStatus->wrongButtonPressed && (actionCommandStatus->unk_5C == 0) && (actionCommandStatus->unk_5D >= -5)) {
limit = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty * 2] +
battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty * 2 + 1] +
4;
if (limit < 6) {
limit = 6;
@ -476,27 +462,27 @@ void func_802A948C_42A97C(void) {
if (i < 5) {
if (battleStatus->pushInputBuffer[pos] & BUTTON_A) {
actionCommandStatus->unk_60 = 1;
actionCommandStatus->wrongButtonPressed = TRUE;
}
}
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !(actionCommandStatus->unk_60 != 0)) ||
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !actionCommandStatus->wrongButtonPressed) ||
(actionCommandStatus->autoSucceed != 0)) {
actionCommandStatus->unk_5C = 1;
battleStatus->unk_84++;
battleStatus->actionResult++;
break;
}
}
}
if ((actionCommandStatus->unk_5D >= -4) && ((actionCommandStatus->unk_60 != 0) || (actionCommandStatus->unk_5C != 0))) {
if ((actionCommandStatus->unk_5D >= -4) && (actionCommandStatus->wrongButtonPressed || (actionCommandStatus->unk_5C != 0))) {
id = actionCommandStatus->hudElements[7];
if (actionCommandStatus->unk_5C != 0) {
hud_element_set_script(id, &HES_TimingOK);
} else {
hud_element_set_script(id, &HES_TimingMiss);
}
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 48, actionCommandStatus->hudElementY + 38);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 48, actionCommandStatus->hudPosY + 38);
hud_element_clear_flags(id, 2);
}
if (actionCommandStatus->unk_5D == -5) {
@ -506,30 +492,30 @@ void func_802A948C_42A97C(void) {
} else {
hud_element_set_script(id, &HES_TimingMiss);
}
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 48, actionCommandStatus->hudElementY + 38);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 48, actionCommandStatus->hudPosY + 38);
hud_element_clear_flags(id, 2);
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_AButton);
}
actionCommandStatus->unk_5D--;
if (actionCommandStatus->unk_54 == 2) {
if (actionCommandStatus->frameCounter == 2) {
hud_element_set_script(actionCommandStatus->hudElements[4], &HES_TimingReady);
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_AButtonDown);
sfx_play_sound(SOUND_234);
}
actionCommandStatus->unk_54--;
if (actionCommandStatus->unk_54 == 0) {
actionCommandStatus->unk_54 = 20;
actionCommandStatus->frameCounter--;
if (actionCommandStatus->frameCounter == 0) {
actionCommandStatus->frameCounter = 20;
actionCommandStatus->unk_5D = 0;
actionCommandStatus->state = 14;
actionCommandStatus->unk_5C = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
}
break;
case 14:
btl_set_popup_duration(99);
if ((actionCommandStatus->unk_60 == 0) && (actionCommandStatus->unk_5C == 0) && (actionCommandStatus->unk_5D >= -5)) {
limit = battleStatus->unk_434[actionCommandStatus->unk_50 * 2] +
battleStatus->unk_434[actionCommandStatus->unk_50 * 2 + 1] +
if (!actionCommandStatus->wrongButtonPressed && (actionCommandStatus->unk_5C == 0) && (actionCommandStatus->unk_5D >= -5)) {
limit = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty * 2] +
battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty * 2 + 1] +
3;
if (limit < 6) {
limit = 6;
@ -550,27 +536,27 @@ void func_802A948C_42A97C(void) {
if (i < 5) {
if (battleStatus->pushInputBuffer[pos] & BUTTON_A) {
actionCommandStatus->unk_60 = 1;
actionCommandStatus->wrongButtonPressed = TRUE;
}
}
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !(actionCommandStatus->unk_60 != 0)) ||
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !actionCommandStatus->wrongButtonPressed) ||
(actionCommandStatus->autoSucceed != 0)) {
actionCommandStatus->unk_5C = 1;
battleStatus->unk_84++;
battleStatus->actionResult++;
break;
}
}
}
if (actionCommandStatus->unk_5D >= -4) {
if ((actionCommandStatus->unk_60 != 0) || (actionCommandStatus->unk_5C != 0)) {
if (actionCommandStatus->wrongButtonPressed || (actionCommandStatus->unk_5C != 0)) {
id = actionCommandStatus->hudElements[8];
if (actionCommandStatus->unk_5C != 0) {
hud_element_set_script(id, &HES_TimingOK);
} else {
hud_element_set_script(id, &HES_TimingMiss);
}
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 68, actionCommandStatus->hudElementY + 38);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 68, actionCommandStatus->hudPosY + 38);
hud_element_clear_flags(id, 2);
}
}
@ -581,7 +567,7 @@ void func_802A948C_42A97C(void) {
} else {
hud_element_set_script(id, &HES_TimingMiss);
}
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 68, actionCommandStatus->hudElementY + 38);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 68, actionCommandStatus->hudPosY + 38);
hud_element_clear_flags(id, 2);
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_AButton);
actionCommandStatus->state = 16;
@ -590,30 +576,30 @@ void func_802A948C_42A97C(void) {
actionCommandStatus->unk_5D--;
break;
case 16:
if (battleStatus->unk_84 == 0) {
if (battleStatus->actionResult == 0) {
battleStatus->actionSuccess = -1;
} else {
battleStatus->actionSuccess = battleStatus->unk_84;
battleStatus->actionSuccess = battleStatus->actionResult;
}
battleStatus->unk_86 = 1;
if (battleStatus->actionSuccess == 3) {
func_80269160();
}
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 17;
break;
case 17:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
s32 hudElement;
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
@ -629,8 +615,8 @@ void N(draw_hud_elements)(void) {
hud_element_draw_clipped(actionCommandStatus->hudElements[13]);
hudElement = actionCommandStatus->hudElements[10];
if (hud_element_get_script(hudElement) != D_802AB180_42C670[battleStatus->unk_84]) {
hud_element_set_script(hudElement, D_802AB180_42C670[battleStatus->unk_84]);
if (hud_element_get_script(hudElement) != D_802AB180_42C670[battleStatus->actionResult]) {
hud_element_set_script(hudElement, D_802AB180_42C670[battleStatus->actionResult]);
}
hud_element_draw_clipped(hudElement);
@ -638,7 +624,7 @@ void N(draw_hud_elements)(void) {
hud_element_draw_clipped(actionCommandStatus->hudElements[12]);
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
hud_element_free(gActionCommandStatus.hudElements[2]);

View File

@ -3,8 +3,10 @@
#include "common_structs.h"
ApiStatus func_802A9000_42A4F0(Evt* script, s32 isInitialCall);
ApiStatus func_802A9398_42A888(Evt* script, s32 isInitialCall);
void func_802A948C_42A97C(void);
ApiStatus action_command_water_block_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_water_block_start(Evt* script, s32 isInitialCall);
void action_command_water_block_update(void);
void action_command_water_block_draw(void);
void action_command_water_block_free(void);
#endif

View File

@ -1,15 +1,9 @@
#include "common.h"
#include "hud_element.h"
#include "battle/action_cmd.h"
#include "battle/action_cmd/whirlwind_bubble.png.h"
#define NAMESPACE action_command_whirlwind
extern HudScript HES_BlueMeter;
extern HudScript HES_MashAButton;
extern HudScript HES_AButton;
extern s32 D_80294240;
#include "battle/action_cmd/whirlwind_1.png.inc.c"
#include "battle/action_cmd/whirlwind_1.pal.inc.c"
@ -65,7 +59,7 @@ HudScript* D_802AA8A0_425510[] = {
s32 D_802AA8B4_425524[] = { 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1 };
ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) {
ApiStatus N(init)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
@ -73,85 +67,85 @@ ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) {
s32 id;
battleStatus->unk_82 = 5;
battleStatus->unk_434 = &D_80294240;
if (battleStatus->unk_83 == 0) {
battleStatus->actionCmdDifficultyTable = actionCmdTableWhirlwind;
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->easyVersion = evt_get_variable(script, *args++);
action_command_init_status();
actionCommandStatus->targetWeakness = evt_get_variable(script, *args++);
actionCommandStatus->actionCommandID = ACTION_COMMAND_WHIRLWIND;
actionCommandStatus->state = 0;
actionCommandStatus->unk_60 = 0;
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
if (actionCommandStatus->easyVersion == 0) {
battleStatus->unk_84 = 0;
actionCommandStatus->barFillWidth = 0;
if (actionCommandStatus->targetWeakness == 0) {
battleStatus->actionResult = 0;
} else {
battleStatus->unk_84 = 3;
battleStatus->actionResult = 3;
}
actionCommandStatus->hudElementX = -48;
actionCommandStatus->hudElementY = 80;
actionCommandStatus->hudPosX = -48;
actionCommandStatus->hudPosY = 80;
id = hud_element_create(&HES_AButton);
actionCommandStatus->hudElements[0] = id;
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_depth(id, 0);
id = hud_element_create(&HES_BlueMeter);
actionCommandStatus->hudElements[1] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_Whirlwind7);
actionCommandStatus->hudElements[2] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 54, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 54, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
id = hud_element_create(&HES_WhirlwindBubble);
actionCommandStatus->hudElements[3] = id;
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 60, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(id, actionCommandStatus->hudPosX + 60, actionCommandStatus->hudPosY + 28);
hud_element_set_render_depth(id, 0);
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
return ApiStatus_DONE2;
}
ApiStatus func_802A91E0_423E50(Evt* script, s32 isInitialCall) {
ApiStatus N(start)(Evt* script, s32 isInitialCall) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
Bytecode* args = script->ptrReadPos;
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
battleStatus->actionSuccess = 0;
return ApiStatus_DONE2;
}
func_80268858();
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
actionCommandStatus->unk_60 = 0;
action_command_init_status();
actionCommandStatus->prepareTime = evt_get_variable(script, *args++);
actionCommandStatus->duration = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = evt_get_variable(script, *args++);
actionCommandStatus->difficulty = adjust_action_command_difficulty(actionCommandStatus->difficulty);
actionCommandStatus->wrongButtonPressed = FALSE;
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->unk_48 = 0;
actionCommandStatus->barFillWidth = 0;
battleStatus->actionSuccess = 0;
battleStatus->unk_86 = 0;
if (actionCommandStatus->easyVersion == 0) {
battleStatus->unk_84 = 0;
if (actionCommandStatus->targetWeakness == 0) {
battleStatus->actionResult = 0;
} else {
battleStatus->unk_84 = 3;
battleStatus->actionResult = 3;
}
actionCommandStatus->state = 10;
gBattleStatus.flags1 &= ~BS_FLAGS1_8000;
return ApiStatus_DONE2;
}
void func_802A92F0_423F60(void) {
void N(update)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 id;
@ -164,26 +158,26 @@ void func_802A92F0_423F60(void) {
btl_set_popup_duration(99);
id = actionCommandStatus->hudElements[0];
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
hud_element_set_alpha(id, 255);
id = actionCommandStatus->hudElements[1];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[2];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
id = actionCommandStatus->hudElements[3];
hud_element_set_alpha(id, 255);
if (actionCommandStatus->unk_61 != 0) {
if (actionCommandStatus->showHud) {
hud_element_clear_flags(id, 2);
}
@ -191,30 +185,30 @@ void func_802A92F0_423F60(void) {
break;
case 1:
btl_set_popup_duration(99);
actionCommandStatus->hudElementX += 20;
if (actionCommandStatus->hudElementX > 50) {
actionCommandStatus->hudElementX = 50;
actionCommandStatus->hudPosX += 20;
if (actionCommandStatus->hudPosX > 50) {
actionCommandStatus->hudPosX = 50;
}
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 54, actionCommandStatus->hudElementY + 23);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX + 60, actionCommandStatus->hudElementY + 23);
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY);
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudPosX, actionCommandStatus->hudPosY + 28);
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudPosX + 54, actionCommandStatus->hudPosY + 23);
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudPosX + 60, actionCommandStatus->hudPosY + 23);
break;
case 10:
btl_set_popup_duration(99);
if (actionCommandStatus->unk_4E != 0) {
actionCommandStatus->unk_4E--;
if (actionCommandStatus->prepareTime != 0) {
actionCommandStatus->prepareTime--;
return;
}
hud_element_set_script(actionCommandStatus->hudElements[0], &HES_MashAButton);
actionCommandStatus->barFillLevel = 0;
actionCommandStatus->state = 11;
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
actionCommandStatus->frameCounter = actionCommandStatus->duration;
case 11:
btl_set_popup_duration(99);
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
temp = actionCommandStatus->barFillLevel / cutoff;
if (actionCommandStatus->easyVersion == 0) {
if (actionCommandStatus->targetWeakness == 0) {
amt = D_802AA844_4254B4[temp / 20];
} else {
amt = D_802AA85C_4254CC[temp / 10];
@ -225,80 +219,80 @@ void func_802A92F0_423F60(void) {
actionCommandStatus->barFillLevel = 0;
}
if (actionCommandStatus->unk_6A == 0) {
if (!actionCommandStatus->berserkerEnabled) {
if (battleStatus->currentButtonsPressed & BUTTON_A) {
s32 amt;
if (actionCommandStatus->easyVersion == 0) {
amt = battleStatus->unk_434[actionCommandStatus->unk_50] * 5;
if (actionCommandStatus->targetWeakness == 0) {
amt = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 5;
} else {
amt = battleStatus->unk_434[actionCommandStatus->unk_50] * 6;
amt = battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] * 6;
}
actionCommandStatus->barFillLevel += amt;
}
} else {
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] / 4;
actionCommandStatus->barFillLevel += rand_int(battleStatus->unk_434[actionCommandStatus->unk_50] / 4);
actionCommandStatus->barFillLevel += battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] / 4;
actionCommandStatus->barFillLevel += rand_int(battleStatus->actionCmdDifficultyTable[actionCommandStatus->difficulty] / 4);
}
if (actionCommandStatus->barFillLevel > cutoff * 100) {
actionCommandStatus->barFillLevel = cutoff * 100;
}
if (!actionCommandStatus->easyVersion) {
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 2000;
if (!actionCommandStatus->targetWeakness) {
battleStatus->actionResult = actionCommandStatus->barFillLevel / 2000;
} else {
battleStatus->unk_84 = D_802AA8B4_425524[actionCommandStatus->barFillLevel / 1000];
battleStatus->actionResult = D_802AA8B4_425524[actionCommandStatus->barFillLevel / 1000];
}
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
battleStatus->unk_86 = 127;
battleStatus->actionSuccess = battleStatus->unk_84;
battleStatus->actionSuccess = battleStatus->actionResult;
btl_set_popup_duration(0);
actionCommandStatus->unk_54 = 5;
actionCommandStatus->frameCounter = 5;
actionCommandStatus->state = 12;
break;
case 12:
if (actionCommandStatus->unk_54 != 0) {
actionCommandStatus->unk_54--;
if (actionCommandStatus->frameCounter != 0) {
actionCommandStatus->frameCounter--;
return;
}
func_80268C9C();
action_command_free();
break;
}
}
void N(draw_hud_elements)(void) {
void N(draw)(void) {
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
BattleStatus* battleStatus = &gBattleStatus;
s32 x, y;
s32 id;
if (actionCommandStatus->unk_6A == 0) {
if (!actionCommandStatus->berserkerEnabled) {
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
}
id = actionCommandStatus->hudElements[1];
hud_element_draw_clipped(id);
hud_element_get_render_pos(id, &x, &y);
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
draw_mash_meter_multicolor_with_divisor(x, y, actionCommandStatus->barFillLevel / 100, 1);
hud_element_draw_clipped(actionCommandStatus->hudElements[3]);
id = actionCommandStatus->hudElements[2];
if (!actionCommandStatus->easyVersion) {
if (D_802AA888_4254F8[battleStatus->unk_84] != hud_element_get_script(id)) {
hud_element_set_script(id, D_802AA888_4254F8[battleStatus->unk_84]);
if (!actionCommandStatus->targetWeakness) {
if (D_802AA888_4254F8[battleStatus->actionResult] != hud_element_get_script(id)) {
hud_element_set_script(id, D_802AA888_4254F8[battleStatus->actionResult]);
}
} else {
if (D_802AA8A0_425510[battleStatus->unk_84] != hud_element_get_script(id)) {
hud_element_set_script(id, D_802AA8A0_425510[battleStatus->unk_84]);
if (D_802AA8A0_425510[battleStatus->actionResult] != hud_element_get_script(id)) {
hud_element_set_script(id, D_802AA8A0_425510[battleStatus->actionResult]);
}
}
hud_element_draw_clipped(id);
}
void N(free_hud_elements)(void) {
void N(free)(void) {
hud_element_free(gActionCommandStatus.hudElements[0]);
hud_element_free(gActionCommandStatus.hudElements[1]);
hud_element_free(gActionCommandStatus.hudElements[2]);

View File

@ -3,9 +3,10 @@
#include "common_structs.h"
void func_802A92F0_423F60(void);
ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall);
ApiStatus func_802A91E0_423E50(Evt* script, s32 isInitialCall);
ApiStatus action_command_whirlwind_init(Evt* script, s32 isInitialCall);
ApiStatus action_command_whirlwind_start(Evt* script, s32 isInitialCall);
void action_command_whirlwind_update(void);
void action_command_whirlwind_draw(void);
void action_command_whirlwind_free(void);
#endif

View File

@ -2039,13 +2039,13 @@ EvtScript N(attackWindBreath) = {
EVT_CALL(GetStatusFlags, ACTOR_PLAYER, LVar0)
EVT_IF_NOT_FLAG(LVar0, STATUS_FLAG_STONE)
EVT_CALL(ShowMessageBox, 49, 180)
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WHIRLWIND)
EVT_CALL(func_802A9000_423C70, 0)
EVT_CALL(action_command_whirlwind_init, 0)
EVT_CALL(SetupMashMeter, 5, 20, 40, 60, 80, 100)
EVT_WAIT(10)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(func_802A91E0_423E50, 0, 200, 3)
EVT_CALL(action_command_whirlwind_start, 0, 200, 3)
EVT_THREAD
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_SCALE_X), LVar2)
EVT_SET(LVar3, LVar2)
@ -5131,13 +5131,13 @@ EvtScript N(attackTuffPuffs) = {
EVT_END_LOOP
EVT_ELSE
EVT_CALL(ShowMessageBox, 49, 180)
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH)
EVT_CALL(func_802A9000_425590)
EVT_CALL(action_command_stop_leech_init)
EVT_CALL(SetupMashMeter, 1, 25, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(func_802A9110_4256A0, 0, 32767, 3)
EVT_CALL(action_command_stop_leech_start, 0, 32767, 3)
EVT_SET(LVarB, LVarA)
EVT_DIV(LVarB, 2)
EVT_WAIT(LVarB)

View File

@ -2,6 +2,7 @@
#include "battle/battle.h"
#include "script_api/battle.h"
#include "battle/action_cmd/jump.h"
#include "battle/action_cmd.h"
#include "sprite/npc/BattleGoombario.h"
#define NAMESPACE b_area_hos_goombario_tutor
@ -121,9 +122,9 @@ EvtScript N(handleEvent_802191E0) = {
EVT_CALL(RandInt, 2, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(ActorSpeak, 655405, -127, 1, 589834, 589826)
EVT_CALL(ActorSpeak, MSG_HOS_002D, -127, 1, 589834, 589826)
EVT_CASE_EQ(1)
EVT_CALL(ActorSpeak, 655406, -127, 1, 589834, 589826)
EVT_CALL(ActorSpeak, MSG_HOS_002E, -127, 1, 589834, 589826)
EVT_CASE_EQ(2)
EVT_END_SWITCH
EVT_END_IF
@ -199,11 +200,11 @@ EvtScript N(takeTurn_80219444) = {
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleGoombario_Headbonk)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(LoadActionCommand, 1)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 1)
EVT_WAIT(10)
EVT_CALL(func_802A9120_421B10, 12, 3)
EVT_CALL(action_command_jump_start, 12, 3)
EVT_END_THREAD
EVT_CALL(PlaySound, SOUND_JUMP_3E2)
EVT_CALL(JumpToGoal, ACTOR_SELF, 22, FALSE, TRUE, FALSE)
@ -213,11 +214,11 @@ EvtScript N(takeTurn_80219444) = {
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3), EVT_FLOAT(0.5), EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(SetActionCommandMode, 3)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
@ -284,7 +285,7 @@ ApiStatus func_80218000_47F0B0(Evt* script, s32 isInitialCall) {
EvtScript N(80219C74) = {
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_2000000, 1)
EVT_CALL(func_802535B4, 0)
EVT_CALL(WaitForState, 13)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU)
EVT_WAIT(15)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(EnableIdleScript, ACTOR_PARTNER, 0)
@ -293,19 +294,19 @@ EvtScript N(80219C74) = {
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, FALSE, FALSE)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655385, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_0019, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(func_8026E020, 1)
EVT_CALL(SetActionCommandMode, 2)
EVT_CALL(WaitForState, 18)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(15)
EVT_CALL(SetGoalPos, ACTOR_PARTNER, -73, 40, 202)
EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 20, 10)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655386, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_001A, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActionCommandMode, 1)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(SetMessageBoxDuration, -1)
EVT_THREAD
@ -317,18 +318,18 @@ EvtScript N(80219C74) = {
EVT_WAIT(15)
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 20, 10)
EVT_CALL(SetActionCommandMode, 2)
EVT_CALL(WaitForState, 0)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(WaitForState, BATTLE_STATE_0)
EVT_CALL(SetBattleFlagBits2, 512, 1)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_NE(LVar0, 2)
EVT_IF_NE(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655387, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_001B, 256, 1, 2097161, 2097157)
EVT_LOOP(0)
EVT_CALL(CheckButtonDown, 32768, LVar0)
EVT_IF_EQ(LVar0, 0)
@ -346,30 +347,30 @@ EvtScript N(80219C74) = {
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActionSuccess, 1)
EVT_CALL(SetActionCommandMode, 1)
EVT_CALL(WaitForState, 8)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(15)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655389, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_001D, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(WaitForState, 9)
EVT_CALL(WaitForState, BATTLE_STATE_9)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(15)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655390, 512, 1, 589839, 589825)
EVT_CALL(ActorSpeak, MSG_HOS_001E, 512, 1, 589839, 589825)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActionCommandMode, 2)
EVT_CALL(WaitForState, 0)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(WaitForState, BATTLE_STATE_0)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_NE(LVar0, 2)
EVT_IF_NE(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655391, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_001F, 256, 1, 2097161, 2097157)
EVT_LOOP(0)
EVT_CALL(CheckButtonDown, 32768, LVar0)
EVT_IF_EQ(LVar0, 0)
@ -387,20 +388,20 @@ EvtScript N(80219C74) = {
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActionSuccess, 1)
EVT_CALL(SetActionCommandMode, -1)
EVT_CALL(WaitForState, 6)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_BLOCK)
EVT_CALL(WaitForState, BATTLE_STATE_END_TURN)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(15)
EVT_CALL(SetActionCommandMode, 1)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655392, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_0020, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(WaitForState, 13)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU)
EVT_CALL(func_8026E020, 2)
EVT_CALL(SetActionCommandMode, 2)
EVT_CALL(WaitForState, 18)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655394, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_0022, 256, 1, 2097161, 2097157)
EVT_LOOP(0)
EVT_CALL(CheckButtonDown, 262144, LVar0)
EVT_IF_EQ(LVar0, 0)
@ -417,21 +418,21 @@ EvtScript N(80219C74) = {
EVT_END_LOOP
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActionCommandMode, 1)
EVT_CALL(WaitForState, 0)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(WaitForState, BATTLE_STATE_0)
EVT_WAIT(5)
EVT_CALL(SetActionCommandMode, 2)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_NE(LVar0, 2)
EVT_IF_NE(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(CheckButtonDown, 262144, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(SetActionCommandMode, -1)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_BLOCK)
EVT_CALL(PauseTakeTurn, 0)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655395, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_0023, 256, 1, 2097161, 2097157)
EVT_LOOP(0)
EVT_CALL(CheckButtonPress, 262144, LVar0)
EVT_IF_EQ(LVar0, 1)
@ -441,7 +442,7 @@ EvtScript N(80219C74) = {
EVT_END_LOOP
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActionCommandMode, 2)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(ResumeTakeTurn, 0)
EVT_END_IF
EVT_WAIT(1)
@ -454,7 +455,7 @@ EvtScript N(80219C74) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655396, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_0024, 256, 1, 2097161, 2097157)
EVT_LOOP(0)
EVT_CALL(CheckButtonDown, 262144, LVar0)
EVT_IF_EQ(LVar0, 0)
@ -465,70 +466,70 @@ EvtScript N(80219C74) = {
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActionSuccess, 1)
EVT_CALL(SetActionCommandMode, 1)
EVT_CALL(WaitForState, 8)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_C)
EVT_WAIT(15)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655397, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_0025, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActorFlagBits, ACTOR_ENEMY0, ACTOR_FLAG_NO_ATTACK, 1)
EVT_CALL(WaitForState, 0)
EVT_CALL(WaitForState, 13)
EVT_CALL(WaitForState, BATTLE_STATE_0)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU)
EVT_CALL(ShowBattleChoice, 1966109)
EVT_CALL(EndActorSpeech, 256, 1, 2097161, 2097157)
EVT_IF_EQ(LVar0, 1)
EVT_CALL(ActorSpeak, 655399, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_0027, 256, 1, 2097161, 2097157)
EVT_GOTO(100)
EVT_END_IF
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655400, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_0028, 256, 1, 2097161, 2097157)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetActorVar, -127, 0, 0)
EVT_CALL(SetBattleFlagBits2, 512, 0)
EVT_LABEL(10)
EVT_CALL(func_8026E020, 131)
EVT_CALL(SetActionCommandMode, 2)
EVT_CALL(WaitForState, 18)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar0, 7)
EVT_GOTO(99)
EVT_END_IF
EVT_CALL(SetActionCommandMode, 1)
EVT_CALL(WaitForState, 8)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(WaitForState, BATTLE_STATE_BEGIN_PARTNER_TURN)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(func_80269524, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(-1)
EVT_CALL(ActorSpeak, 655402, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_002A, 256, 1, 2097161, 2097157)
EVT_CASE_EQ(0)
EVT_CALL(ActorSpeak, 655403, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_002B, 256, 1, 2097161, 2097157)
EVT_CASE_EQ(1)
EVT_CALL(ActorSpeak, 655401, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_0029, 256, 1, 2097161, 2097157)
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(SetEnemyHP, 512, 99)
EVT_CALL(SetActorFlagBits, ACTOR_ENEMY0, ACTOR_FLAG_NO_ATTACK, 0)
EVT_CALL(SetActionCommandMode, 1)
EVT_CALL(WaitForState, 6)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(WaitForState, BATTLE_STATE_END_TURN)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(GetBlockResult, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(-1)
EVT_CALL(ActorSpeak, 655402, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_002A, 256, 1, 2097161, 2097157)
EVT_CASE_EQ(0)
EVT_CALL(ActorSpeak, 655403, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_002B, 256, 1, 2097161, 2097157)
EVT_CASE_EQ(1)
EVT_CALL(ActorSpeak, 655401, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_0029, 256, 1, 2097161, 2097157)
EVT_END_SWITCH
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, TRUE)
EVT_CALL(WaitForState, 13)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU)
EVT_GOTO(10)
EVT_LABEL(99)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(ActorSpeak, 655404, 256, 1, 2097161, 2097157)
EVT_CALL(ActorSpeak, MSG_HOS_002C, 256, 1, 2097161, 2097157)
EVT_LABEL(100)
EVT_CALL(WaitForState, 0)
EVT_CALL(WaitForState, BATTLE_STATE_0)
EVT_CALL(SetBattleState, 30)
EVT_CALL(func_80218000_47F0B0)
EVT_WAIT(10000)

View File

@ -360,9 +360,9 @@ EvtScript N(8021BEBC) = {
EVT_CASE_DEFAULT
EVT_CALL(SetTargetActor, ACTOR_SELF, ACTOR_PARTNER)
EVT_CALL(ShowMessageBox, 65, 90)
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WHIRLWIND)
EVT_CALL(func_802A9000_423C70, 1)
EVT_CALL(action_command_whirlwind_init, 1)
EVT_CALL(SetupMashMeter, 3, 40, 70, 100, 0, 0)
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Buzzar_Anim11)
@ -371,7 +371,7 @@ EvtScript N(8021BEBC) = {
EVT_WAIT(6)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20F0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(func_802A91E0_423E50, 0, 88, 3)
EVT_CALL(action_command_whirlwind_start, 0, 88, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamTarget, -25, 60, 0)
EVT_CALL(SetBattleCamZoom, 460)
@ -425,9 +425,9 @@ EvtScript N(8021BEBC) = {
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_CALL(ShowMessageBox, 65, 90)
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WHIRLWIND)
EVT_CALL(func_802A9000_423C70, 1)
EVT_CALL(action_command_whirlwind_init, 1)
EVT_CALL(SetupMashMeter, 3, 40, 70, 100, 0, 0)
EVT_WAIT(8)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Buzzar_Anim11)
@ -436,7 +436,7 @@ EvtScript N(8021BEBC) = {
EVT_WAIT(6)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20F0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(func_802A91E0_423E50, 0, 88, 3)
EVT_CALL(action_command_whirlwind_start, 0, 88, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamTarget, -25, 60, 0)
EVT_CALL(SetBattleCamZoom, 460)
@ -917,7 +917,7 @@ EvtScript N(8021DF2C) = {
EVT_END_THREAD
EVT_WAIT(20)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_BREAK_FREE)
EVT_CALL(func_802A9000_423C70)
EVT_CALL(action_command_whirlwind_init)
EVT_CALL(SetupMashMeter, 1, 30, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Buzzar_Anim17)
@ -927,8 +927,8 @@ EvtScript N(8021DF2C) = {
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 60)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(func_802694A4, 1)
EVT_CALL(func_802A91B0_4235A0, 0, 60, 30, 3)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(action_command_break_free_start, 0, 60, 30, 3)
EVT_EXEC_GET_TID(N(8021DCB8), LVarA)
EVT_WAIT(62)
EVT_CALL(GetActionSuccessCopy, LVar0)

View File

@ -427,13 +427,13 @@ EvtScript N(leechAttack) = {
EVT_END_LOOP
EVT_ELSE
EVT_CALL(ShowMessageBox, 49, 32767)
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH)
EVT_CALL(func_802A9000_425590)
EVT_CALL(action_command_stop_leech_init)
EVT_CALL(SetupMashMeter, 1, 23, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(func_802A9110_4256A0, 0, 32767, 3)
EVT_CALL(action_command_stop_leech_start, 0, 32767, 3)
EVT_SET(LVarD, 0)
EVT_LOOP(5)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)

View File

@ -470,13 +470,13 @@ EvtScript N(takeTurn) = {
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BabyBlooper_Anim08)
EVT_CALL(ShowMessageBox, 49, 32767)
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH)
EVT_CALL(func_802A9000_425590)
EVT_CALL(action_command_stop_leech_init)
EVT_CALL(SetupMashMeter, 1, 15, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(func_802A9110_4256A0, 0, 32767, 3)
EVT_CALL(action_command_stop_leech_start, 0, 32767, 3)
EVT_LOOP(5)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000C)

View File

@ -204,7 +204,7 @@ EvtScript N(takeTurn_80218414) = {
EvtScript N(80218424) = {
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_2000000, 1)
EVT_CALL(func_80218158_4CF308)
EVT_CALL(WaitForState, 13)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MENU)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_10002)
EVT_WAIT(15)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
@ -236,7 +236,7 @@ EvtScript N(80218424) = {
EVT_WAIT(10)
EVT_CALL(func_8026E020, 256)
EVT_CALL(func_8026E038, 2)
EVT_CALL(WaitForState, 18)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE)
EVT_SET(LVar0, 255)
EVT_LOOP(10)
EVT_SUB(LVar0, 25)
@ -251,7 +251,7 @@ EvtScript N(80218424) = {
EVT_THREAD
EVT_CALL(func_80218170_4CF320)
EVT_END_THREAD
EVT_CALL(WaitForState, 22)
EVT_CALL(WaitForState, BATTLE_STATE_END_PLAYER_TURN)
EVT_SET(LVar0, 0)
EVT_LOOP(10)
EVT_ADD(LVar0, 25)
@ -274,7 +274,7 @@ EvtScript N(80218424) = {
EVT_CALL(ActorSpeak, MSG_CH1_0118, ACTOR_SELF, 1, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle)
EVT_WAIT(10)
EVT_CALL(SetBattleState, 6)
EVT_CALL(WaitForState, 5)
EVT_CALL(WaitForState, BATTLE_STATE_BEGIN_TURN)
EVT_WAIT(20)
EVT_CALL(ActorSpeak, MSG_CH1_0119, ACTOR_SELF, 1, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle)
EVT_WAIT(10)
@ -304,7 +304,7 @@ EvtScript N(80218424) = {
EVT_CALL(func_8026E020, 256)
EVT_CALL(func_8026E038, 1)
EVT_CALL(func_80218158_4CF308)
EVT_CALL(WaitForState, 18)
EVT_CALL(WaitForState, BATTLE_STATE_PLAYER_MOVE)
EVT_SET(LVar0, 255)
EVT_LOOP(10)
EVT_SUB(LVar0, 25)
@ -319,7 +319,7 @@ EvtScript N(80218424) = {
EVT_THREAD
EVT_CALL(func_80218170_4CF320)
EVT_END_THREAD
EVT_CALL(WaitForState, 22)
EVT_CALL(WaitForState, BATTLE_STATE_END_PLAYER_TURN)
EVT_SET(LVar0, 0)
EVT_LOOP(10)
EVT_ADD(LVar0, 25)
@ -340,7 +340,7 @@ EvtScript N(80218424) = {
EVT_CALL(func_802180E8_4CF298)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_10002)
EVT_CALL(ActorSpeak, MSG_CH1_011D, ACTOR_SELF, 1, ANIM_WorldEldstar_Wave, ANIM_WorldEldstar_Idle)
EVT_CALL(WaitForState, 0)
EVT_CALL(WaitForState, BATTLE_STATE_0)
EVT_CALL(SetBattleState, 30)
EVT_WAIT(10000)
EVT_RETURN

View File

@ -551,13 +551,13 @@ EvtScript N(takeTurn_flying) = {
EVT_END_LOOP
EVT_ELSE
EVT_CALL(ShowMessageBox, 49, 32767)
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH)
EVT_CALL(func_802A9000_425590)
EVT_CALL(action_command_stop_leech_init)
EVT_CALL(SetupMashMeter, 1, 30, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(func_802A9110_4256A0, 0, 32767, 3)
EVT_CALL(action_command_stop_leech_start, 0, 32767, 3)
EVT_SET(LVarD, 0)
EVT_LOOP(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Swooper_Gray_Anim02)
@ -1001,13 +1001,13 @@ EvtScript N(takeTurn) = {
EVT_END_LOOP
EVT_ELSE
EVT_CALL(ShowMessageBox, 49, 32767)
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_STOP_LEECH)
EVT_CALL(func_802A9000_425590)
EVT_CALL(action_command_stop_leech_init)
EVT_CALL(SetupMashMeter, 1, 30, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(func_802A9110_4256A0, 0, 32767, 3)
EVT_CALL(action_command_stop_leech_start, 0, 32767, 3)
EVT_SET(LVarD, 0)
EVT_LOOP(5)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_Swooper_Gray_Anim02)

View File

@ -2,10 +2,11 @@
#include "effects.h"
#include "ld_addrs.h"
#include "battle/item/mystery.png.h"
#include "pause/pause_common.h"
#include "ItemRefund.inc.c"
extern IconHudScriptPair gItemHudScripts[];
extern s32 D_802A25C8[7];
extern s32 D_802A25E4;
extern s32 D_802A25E8;

View File

@ -1,6 +1,5 @@
#include "strange_cake.h"
#include "effects.h"
#include "pause/pause_common.h"
#include "hud_element.h"
#include "battle/item/strange_cake1.png.h"
#include "battle/item/strange_cake2.png.h"

View File

@ -287,10 +287,10 @@ EvtScript D_802A1FEC_766C0C = {
EvtScript D_802A2184_766DA4 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(D_802A11AC_765DCC)
EVT_EXEC_WAIT(D_802A1320_765F40)
EVT_CALL(func_802A9120_421B10, LVarA, 3)
EVT_CALL(action_command_jump_start, LVarA, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidair, 196608)
@ -301,14 +301,14 @@ EvtScript D_802A2184_766DA4 = {
EvtScript D_802A2230 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(D_802A11AC_765DCC)
EVT_CALL(InitTargetIterator)
EVT_EXEC_WAIT(D_802A1408_766028)
EVT_SET(LVarB, LVarA)
EVT_ADD(LVarB, 14)
EVT_ADD(LVarB, -3)
EVT_CALL(func_802A9120_421B10, LVarB, 3)
EVT_CALL(action_command_jump_start, LVarB, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_37)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_1000A, ANIM_Mario_1000B)
@ -327,14 +327,14 @@ EvtScript D_802A2230 = {
EvtScript D_802A2384 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(D_802A11AC_765DCC)
EVT_EXEC_WAIT(D_802A14F0_766110)
EVT_CALL(func_8026919C, EVT_PTR(N(D_802A10F0)))
EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(D_802A10F0)))
EVT_SET(LVarB, LVarA)
EVT_SUB(LVarB, 4)
EVT_ADD(LVarB, -3)
EVT_CALL(func_802A9120_421B10, LVarB, 3)
EVT_CALL(action_command_jump_start, LVarB, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_38)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, 524288, 196608)
@ -350,15 +350,15 @@ EvtScript D_802A2384 = {
EVT_WAIT(2)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802A9120_421B10, 13, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(action_command_jump_start, 13, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_39)
EVT_CALL(func_80275F00, 15, 2)
EVT_GOTO(10)
EVT_ELSE
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802A9120_421B10, 2, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(action_command_jump_start, 2, 3)
EVT_CALL(func_80275F00, 4, 1)
EVT_GOTO(10)
EVT_END_IF
@ -369,7 +369,7 @@ EvtScript D_802A2384 = {
EvtScript N(main) = {
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_1000, 1)
EVT_CALL(func_802694A4, 0)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_100, 1)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar1)
@ -387,11 +387,11 @@ EvtScript N(main) = {
EvtScript D_802A26BC_7672DC = {
EVT_EXEC_WAIT(D_802A2184_766DA4)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(SetActionCommandMode, 3)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
@ -431,9 +431,9 @@ EvtScript D_802A26BC_7672DC = {
EVT_CALL(func_80269524, LVarF)
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 24, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 24, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidair, 65548)
EVT_CALL(func_80274A18, 24, 3)
@ -482,9 +482,9 @@ EvtScript D_802A2A30_767650 = {
EVT_END_CHILD_THREAD
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 37, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 37, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(EnablePlayerBlur, 1)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, 65546, 65547)
@ -537,9 +537,9 @@ EvtScript D_802A2D5C_76797C = {
EVT_END_CHILD_THREAD
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 25, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 25, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(EnablePlayerBlur, 1)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidairStill, ANIM_Mario_1000C)

View File

@ -287,10 +287,10 @@ EvtScript N(D_802A1FEC) = {
EvtScript N(D_802A2184) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(D_802A11AC))
EVT_EXEC_WAIT(N(D_802A1320))
EVT_CALL(func_802A9120_421B10, LVarA, 3)
EVT_CALL(action_command_jump_start, LVarA, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidair, ANIM_Mario_30000 )
@ -301,14 +301,14 @@ EvtScript N(D_802A2184) = {
EvtScript N(D_802A2230) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(D_802A11AC))
EVT_CALL(InitTargetIterator)
EVT_EXEC_WAIT(N(D_802A1408))
EVT_SET(LVarB, LVarA)
EVT_ADD(LVarB, 14)
EVT_ADD(LVarB, -3)
EVT_CALL(func_802A9120_421B10, LVarB, 3)
EVT_CALL(action_command_jump_start, LVarB, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_37)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_1000A, ANIM_Mario_1000B)
@ -327,14 +327,14 @@ EvtScript N(D_802A2230) = {
EvtScript N(D_802A2384) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(D_802A11AC))
EVT_EXEC_WAIT(N(D_802A14F0))
EVT_CALL(func_8026919C, EVT_PTR(N(D_802A10F0)))
EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(D_802A10F0)))
EVT_SET(LVarB, LVarA)
EVT_SUB(LVarB, 4)
EVT_ADD(LVarB, -3)
EVT_CALL(func_802A9120_421B10, LVarB, 3)
EVT_CALL(action_command_jump_start, LVarB, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_38)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, 524288, 196608)
@ -350,15 +350,15 @@ EvtScript N(D_802A2384) = {
EVT_WAIT(2)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802A9120_421B10, 13, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(action_command_jump_start, 13, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_39)
EVT_CALL(func_80275F00, 15, 2)
EVT_GOTO(10)
EVT_ELSE
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802A9120_421B10, 2, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(action_command_jump_start, 2, 3)
EVT_CALL(func_80275F00, 4, 1)
EVT_GOTO(10)
EVT_END_IF
@ -368,7 +368,7 @@ EvtScript N(D_802A2384) = {
};
EvtScript N(main) = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_1000, 1)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar1)
@ -441,15 +441,15 @@ EvtScript N(D_802A26A8) = {
EVT_END_IF
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_IF_EQ(LocalFlag(0), 1)
EVT_CALL(func_802694A4, 0)
EVT_CALL(ShowActionHud, 0)
EVT_END_IF
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_EXEC_WAIT(N(D_802A1320))
EVT_ADD(LVarA, 5)
EVT_CALL(func_802A9120_421B10, LVarA, 3)
EVT_CALL(action_command_jump_start, LVarA, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidair, ANIM_Mario_1000C)
EVT_IF_EQ(LVarF, 1)
@ -583,12 +583,12 @@ EvtScript N(D_802A2EC0) = {
EVT_END_IF
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_IF_EQ(LocalFlag(0), 1)
EVT_CALL(func_802694A4, 0)
EVT_CALL(ShowActionHud, 0)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_40)
EVT_CALL(func_802A9120_421B10, 37, 3)
EVT_CALL(action_command_jump_start, 37, 3)
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
@ -730,12 +730,12 @@ EvtScript N(D_802A372C) = {
EVT_END_IF
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_IF_EQ(LocalFlag(0), 1)
EVT_CALL(func_802694A4, 0)
EVT_CALL(ShowActionHud, 0)
EVT_END_IF
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_40)
EVT_CALL(func_802A9120_421B10, 25, 3)
EVT_CALL(action_command_jump_start, 25, 3)
EVT_CALL(ChooseNextTarget, 0, LVar0)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidairStill, ANIM_Mario_1000C)

View File

@ -137,7 +137,7 @@ EvtScript D_802A1690_00734C30 = {
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, 0x10B)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000E)
EVT_WAIT(4)
EVT_CALL(func_802A9258_422258, 0, 36, 3)
EVT_CALL(action_command_hammer_start, 0, 36, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000F)
EVT_SET(LVar1, 0)
@ -222,7 +222,7 @@ EvtScript D_802A1A64_00735004 = {
EvtScript N(D_802A1B40) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A10B0_734650)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -235,10 +235,10 @@ EvtScript N(D_802A1B40) = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000E)
EVT_WAIT(4)
EVT_CALL(N(IsBerserkerEquipped))
EVT_IF_NE(LVar0, 0)
EVT_IF_NE(LVar0, ACTION_COMMAND_MODE_NOT_LEARNED)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000F)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(N(IsRightOnEquipped))
EVT_IF_EQ(LVar0, 0)
EVT_LOOP(45)
@ -251,7 +251,7 @@ EvtScript N(D_802A1B40) = {
EVT_END_IF
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -270,7 +270,7 @@ EvtScript N(D_802A1B40) = {
EVT_END_LOOP
EVT_LABEL(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_WAIT(1)
EVT_CALL(GetActionSuccess, LVar0)
EVT_IF_EQ(LVar0, 0)
@ -278,7 +278,7 @@ EvtScript N(D_802A1B40) = {
EVT_END_IF
EVT_END_IF
EVT_ELSE
EVT_CALL(func_802A9258_422258, 0, LVar1, 3)
EVT_CALL(action_command_hammer_start, 0, LVar1, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000F)
EVT_SUB(LVar1, 10)
@ -287,11 +287,11 @@ EvtScript N(D_802A1B40) = {
EVT_WAIT(5)
EVT_END_IF
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(SetActionCommandMode, 3)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
@ -308,7 +308,7 @@ EvtScript N(D_802A1B40) = {
EvtScript D_802A2000_007355A0 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A10B0_734650)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -321,7 +321,7 @@ EvtScript D_802A2000_007355A0 = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_30015)
EVT_WAIT(4)
EVT_CALL(N(IsBerserkerEquipped))
EVT_IF_EQ(LVar0, 1)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_30016)
EVT_CALL(N(IsRightOnEquipped))
EVT_IF_EQ(LVar0, 0)
@ -334,7 +334,7 @@ EvtScript D_802A2000_007355A0 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -358,7 +358,7 @@ EvtScript D_802A2000_007355A0 = {
EVT_GOTO(0)
EVT_END_IF
EVT_ELSE
EVT_CALL(func_802A9258_422258, 0, LVar1, 3)
EVT_CALL(action_command_hammer_start, 0, LVar1, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_30016)
EVT_SUB(LVar1, 10)
@ -377,7 +377,7 @@ EvtScript D_802A2000_007355A0 = {
EvtScript D_802A23E8_735988 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A10B0_734650)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -390,7 +390,7 @@ EvtScript D_802A23E8_735988 = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3001C)
EVT_WAIT(4)
EVT_CALL(N(IsBerserkerEquipped))
EVT_IF_EQ(LVar0, 1)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3001D)
EVT_CALL(N(IsRightOnEquipped))
EVT_IF_EQ(LVar0, 0)
@ -403,7 +403,7 @@ EvtScript D_802A23E8_735988 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -427,7 +427,7 @@ EvtScript D_802A23E8_735988 = {
EVT_GOTO(0)
EVT_END_IF
EVT_ELSE
EVT_CALL(func_802A9258_422258, 0, LVar1, 3)
EVT_CALL(action_command_hammer_start, 0, LVar1, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3001D)
EVT_SUB(LVar1, 10)
@ -447,7 +447,7 @@ EvtScript D_802A23E8_735988 = {
EvtScript N(D_802A27D0) = {
EVT_CALL(ChooseNextTarget, 10, LVar0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A118C_0073472C)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -470,7 +470,7 @@ EvtScript N(D_802A27D0) = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -505,7 +505,7 @@ EvtScript N(D_802A27D0) = {
EvtScript D_802A2AFC_0073609C = {
EVT_CALL(ChooseNextTarget, 10, LVar0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A118C_0073472C)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -528,7 +528,7 @@ EvtScript D_802A2AFC_0073609C = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_LOOP(60)
EVT_WAIT(1)
EVT_CALL(CheckButtonDown, 0x40000, LVar0)
@ -554,7 +554,7 @@ EvtScript D_802A2AFC_0073609C = {
EvtScript D_802A2DA0_00736340 = {
EVT_CALL(ChooseNextTarget, 10, LVar0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A118C_0073472C)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -577,7 +577,7 @@ EvtScript D_802A2DA0_00736340 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_LOOP(60)
EVT_WAIT(1)
EVT_CALL(CheckButtonDown, 0x40000, LVar0)
@ -601,7 +601,7 @@ EvtScript D_802A2DA0_00736340 = {
};
EvtScript battle_move_hammer_802A3044 = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar1)
EVT_CASE_EQ(0)
@ -797,7 +797,7 @@ EvtScript battle_move_hammer_802A369C = {
};
EvtScript battle_move_hammer_802A3B28 = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar1)
EVT_CASE_EQ(0)

View File

@ -296,10 +296,10 @@ EvtScript D_802A203C_73E89C = {
EvtScript D_802A21D4_73EA34 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(MoveToJump))
EVT_EXEC_WAIT(D_802A1370_73DBD0)
EVT_CALL(func_802A9120_421B10, LVarA, 3)
EVT_CALL(action_command_jump_start, LVarA, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidair, ANIM_Mario_30000)
@ -310,14 +310,14 @@ EvtScript D_802A21D4_73EA34 = {
EvtScript D_802A2280 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(MoveToJump))
EVT_CALL(InitTargetIterator)
EVT_EXEC_WAIT(D_802A1458_73DCB8)
EVT_SET(LVarB, LVarA)
EVT_ADD(LVarB, 14)
EVT_ADD(LVarB, -3)
EVT_CALL(func_802A9120_421B10, LVarB, 3)
EVT_CALL(action_command_jump_start, LVarB, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_37)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_1000A, ANIM_Mario_1000B)
@ -336,14 +336,14 @@ EvtScript D_802A2280 = {
EvtScript D_802A23D4_73EC34 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(MoveToJump))
EVT_EXEC_WAIT(D_802A1540_73DDA0)
EVT_CALL(func_8026919C, EVT_PTR(D_802A1140_73D9A0))
EVT_CALL(SetActionDifficultyTable, EVT_PTR(D_802A1140_73D9A0))
EVT_SET(LVarB, LVarA)
EVT_SUB(LVarB, 4)
EVT_ADD(LVarB, -3)
EVT_CALL(func_802A9120_421B10, LVarB, 3)
EVT_CALL(action_command_jump_start, LVarB, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_38)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, 524288, ANIM_Mario_30000)
@ -359,15 +359,15 @@ EvtScript D_802A23D4_73EC34 = {
EVT_WAIT(2)
EVT_CALL(SetActorDispOffset, ACTOR_SELF, 0, 0, 0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802A9120_421B10, 13, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(action_command_jump_start, 13, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_39)
EVT_CALL(func_80275F00, 15, 2)
EVT_GOTO(10)
EVT_ELSE
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802A9120_421B10, 2, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(action_command_jump_start, 2, 3)
EVT_CALL(func_80275F00, 4, 1)
EVT_GOTO(10)
EVT_END_IF
@ -377,7 +377,7 @@ EvtScript D_802A23D4_73EC34 = {
};
EvtScript N(802A2650) = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(GetBattleFlags2, LVar0)
EVT_IF_FLAG(LVar0, BS_FLAGS2_200)
EVT_EXEC_WAIT(D_802A4018_740878)
@ -399,11 +399,11 @@ EvtScript N(802A2650) = {
EvtScript D_802A2720_73EF80 = {
EVT_EXEC_WAIT(D_802A21D4_73EA34)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(SetActionCommandMode, 3)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
@ -415,7 +415,7 @@ EvtScript D_802A2720_73EF80 = {
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_GT(LVar0, 0)
EVT_IF_GT(LVar0, ACTION_COMMAND_MODE_NOT_LEARNED)
EVT_WAIT(1)
EVT_END_IF
EVT_CALL(DidActionSucceed, LVar0)
@ -446,9 +446,9 @@ EvtScript D_802A2720_73EF80 = {
EVT_CALL(func_80269524, LVarF)
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 24, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 24, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidair, ANIM_Mario_1000C)
EVT_CALL(func_80274A18, 24, 3)
@ -497,9 +497,9 @@ EvtScript D_802A2ABC_73F31C = {
EVT_END_CHILD_THREAD
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 37, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 37, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(EnablePlayerBlur, 1)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_1000A, ANIM_Mario_1000B)
@ -552,9 +552,9 @@ EvtScript D_802A2DE8_73F648 = {
EVT_END_CHILD_THREAD
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 25, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 25, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(EnablePlayerBlur, 1)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidairStill, ANIM_Mario_1000C)
@ -570,7 +570,7 @@ EvtScript D_802A2DE8_73F648 = {
};
EvtScript N(802A30F4) = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar1)
EVT_CASE_EQ(0)
@ -676,7 +676,7 @@ EvtScript D_802A34EC_73FD4C = {
};
EvtScript N(802A3644) = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar1)
EVT_CASE_EQ(0)
@ -726,9 +726,9 @@ EvtScript D_802A36D8_73FF38 = {
EVT_CALL(func_80269524, LVarF)
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 24, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 24, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidair, ANIM_Mario_1000C)
EVT_CALL(func_80274A18, 24, 3)
@ -777,9 +777,9 @@ EvtScript D_802A39C4_740224 = {
EVT_END_CHILD_THREAD
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 37, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 37, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(EnablePlayerBlur, 1)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_1000A, ANIM_Mario_1000B)
@ -834,9 +834,9 @@ EvtScript D_802A3CF0_740550 = {
EVT_END_CHILD_THREAD
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 25, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 25, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(EnablePlayerBlur, 1)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidairStill, ANIM_Mario_1000C)
@ -853,21 +853,21 @@ EvtScript D_802A3CF0_740550 = {
EvtScript D_802A4018_740878 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(MoveToJump))
EVT_EXEC_WAIT(D_802A1370_73DBD0)
EVT_CALL(func_802A9120_421B10, LVarA, 3)
EVT_CALL(action_command_jump_start, LVarA, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_34)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, -5, 10, 0)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidair, ANIM_Mario_30000)
EVT_CALL(func_80274A18, LVarA, 0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(SetActionCommandMode, 3)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
@ -879,7 +879,7 @@ EvtScript D_802A4018_740878 = {
EVT_RETURN
EVT_END_IF
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_GT(LVar0, 0)
EVT_IF_GT(LVar0, ACTION_COMMAND_MODE_NOT_LEARNED)
EVT_WAIT(1)
EVT_END_IF
EVT_CALL(DidActionSucceed, LVar0)
@ -910,9 +910,9 @@ EvtScript D_802A4018_740878 = {
EVT_CALL(func_80269524, LVarF)
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 24, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 24, 3)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario_AnimMidairStill, ANIM_Mario_AnimMidair, ANIM_Mario_1000C)
EVT_CALL(func_80274A18, 24, 3)

View File

@ -1,5 +1,6 @@
#include "common.h"
#include "effects.h"
#include "battle/action_cmd.h"
#define NAMESPACE battle_move_jump_charge_0

View File

@ -136,7 +136,7 @@ EvtScript D_802A1690_0073B560 = {
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, 0x10B)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x03000E)
EVT_WAIT(4)
EVT_CALL(func_802A9258_422258, 0, 36, 3)
EVT_CALL(action_command_hammer_start, 0, 36, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x03000F)
EVT_SET(LVar1, 0)
@ -221,7 +221,7 @@ EvtScript D_802A1A64_0073B934 = {
EvtScript D_802A1B40 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A10B0_73AF80)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -234,10 +234,10 @@ EvtScript D_802A1B40 = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x03000E)
EVT_WAIT(4)
EVT_CALL(N(IsBerserkerEquipped))
EVT_IF_NE(LVar0, 0)
EVT_IF_NE(LVar0, ACTION_COMMAND_MODE_NOT_LEARNED)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x03000F)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(N(IsRightOnEquipped))
EVT_IF_EQ(LVar0, 0)
EVT_LOOP(45)
@ -250,7 +250,7 @@ EvtScript D_802A1B40 = {
EVT_END_IF
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -269,7 +269,7 @@ EvtScript D_802A1B40 = {
EVT_END_LOOP
EVT_LABEL(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_WAIT(1)
EVT_CALL(GetActionSuccess, LVar0)
EVT_IF_EQ(LVar0, 0)
@ -277,7 +277,7 @@ EvtScript D_802A1B40 = {
EVT_END_IF
EVT_END_IF
EVT_ELSE
EVT_CALL(func_802A9258_422258, 0, LVar1, 3)
EVT_CALL(action_command_hammer_start, 0, LVar1, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x03000F)
EVT_SUB(LVar1, 10)
@ -286,11 +286,11 @@ EvtScript D_802A1B40 = {
EVT_WAIT(5)
EVT_END_IF
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(SetActionCommandMode, 3)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
@ -307,7 +307,7 @@ EvtScript D_802A1B40 = {
EvtScript D_802A2000_0073BED0 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A10B0_73AF80)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -320,7 +320,7 @@ EvtScript D_802A2000_0073BED0 = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x030015)
EVT_WAIT(4)
EVT_CALL(N(IsBerserkerEquipped))
EVT_IF_EQ(LVar0, 1)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x030016)
EVT_CALL(N(IsRightOnEquipped))
EVT_IF_EQ(LVar0, 0)
@ -333,7 +333,7 @@ EvtScript D_802A2000_0073BED0 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -357,7 +357,7 @@ EvtScript D_802A2000_0073BED0 = {
EVT_GOTO(0)
EVT_END_IF
EVT_ELSE
EVT_CALL(func_802A9258_422258, 0, LVar1, 3)
EVT_CALL(action_command_hammer_start, 0, LVar1, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x030016)
EVT_SUB(LVar1, 10)
@ -376,7 +376,7 @@ EvtScript D_802A2000_0073BED0 = {
EvtScript D_802A23E8 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A10B0_73AF80)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -389,7 +389,7 @@ EvtScript D_802A23E8 = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x03001C)
EVT_WAIT(4)
EVT_CALL(N(IsBerserkerEquipped))
EVT_IF_EQ(LVar0, 1)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x03001D)
EVT_CALL(N(IsRightOnEquipped))
EVT_IF_EQ(LVar0, 0)
@ -402,7 +402,7 @@ EvtScript D_802A23E8 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -426,7 +426,7 @@ EvtScript D_802A23E8 = {
EVT_GOTO(0)
EVT_END_IF
EVT_ELSE
EVT_CALL(func_802A9258_422258, 0, LVar1, 3)
EVT_CALL(action_command_hammer_start, 0, LVar1, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x03001D)
EVT_SUB(LVar1, 10)
@ -446,7 +446,7 @@ EvtScript D_802A23E8 = {
EvtScript D_802A27D0 = {
EVT_CALL(ChooseNextTarget, 10, LVar0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A118C_0073B05C)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -469,7 +469,7 @@ EvtScript D_802A27D0 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -504,7 +504,7 @@ EvtScript D_802A27D0 = {
EvtScript D_802A2AFC_0073C9CC = {
EVT_CALL(ChooseNextTarget, 10, LVar0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A118C_0073B05C)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -527,7 +527,7 @@ EvtScript D_802A2AFC_0073C9CC = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_LOOP(60)
EVT_WAIT(1)
EVT_CALL(CheckButtonDown, 262144, LVar0)
@ -553,7 +553,7 @@ EvtScript D_802A2AFC_0073C9CC = {
EvtScript D_802A2DA0_0073CC70 = {
EVT_CALL(ChooseNextTarget, 10, LVar0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A118C_0073B05C)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -576,7 +576,7 @@ EvtScript D_802A2DA0_0073CC70 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_LOOP(60)
EVT_WAIT(1)
EVT_CALL(CheckButtonDown, 262144, LVar0)
@ -600,7 +600,7 @@ EvtScript D_802A2DA0_0073CC70 = {
};
EvtScript battle_move_quake_hammer_main = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar1)
EVT_CASE_EQ(0)

View File

@ -1,6 +1,7 @@
#include "common.h"
#include "effects.h"
#include "script_api/battle.h"
#include "battle/action_cmd.h"
#include "battle/action_cmd/hammer.h"
#define NAMESPACE battle_move_spin_smash
@ -162,7 +163,7 @@ EvtScript D_802A1770_738000 = {
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, 0x10B)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000E)
EVT_WAIT(4)
EVT_CALL(func_802A9258_422258, 0, 36, 3)
EVT_CALL(action_command_hammer_start, 0, 36, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000F)
EVT_SET(LVar1, 0)
@ -247,7 +248,7 @@ EvtScript D_802A1B44_7383D4 = {
EvtScript D_802A1C20_7384B0 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A1190_737A20)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -260,10 +261,10 @@ EvtScript D_802A1C20_7384B0 = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000E)
EVT_WAIT(4)
EVT_CALL(battle_move_spin_smash_IsBerserkerEquipped)
EVT_IF_NE(LVar0, 0)
EVT_IF_NE(LVar0, ACTION_COMMAND_MODE_NOT_LEARNED)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000F)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(battle_move_spin_smash_IsRightOnEquipped)
EVT_IF_EQ(LVar0, 0)
EVT_LOOP(45)
@ -276,7 +277,7 @@ EvtScript D_802A1C20_7384B0 = {
EVT_END_IF
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -295,7 +296,7 @@ EvtScript D_802A1C20_7384B0 = {
EVT_END_LOOP
EVT_LABEL(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_WAIT(1)
EVT_CALL(GetActionSuccess, LVar0)
EVT_IF_EQ(LVar0, 0)
@ -303,7 +304,7 @@ EvtScript D_802A1C20_7384B0 = {
EVT_END_IF
EVT_END_IF
EVT_ELSE
EVT_CALL(func_802A9258_422258, 0, LVar1, 3)
EVT_CALL(action_command_hammer_start, 0, LVar1, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3000F)
EVT_SUB(LVar1, 10)
@ -312,11 +313,11 @@ EvtScript D_802A1C20_7384B0 = {
EVT_WAIT(5)
EVT_END_IF
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(SetActionCommandMode, 3)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_CALL(SetActionCommandMode, ACTION_COMMAND_MODE_TUTORIAL_WAIT_INPUT)
EVT_LOOP(0)
EVT_CALL(GetActionCommandMode, LVar0)
EVT_IF_LT(LVar0, 2)
EVT_IF_LT(LVar0, ACTION_COMMAND_MODE_TUTORIAL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
@ -333,7 +334,7 @@ EvtScript D_802A1C20_7384B0 = {
EvtScript D_802A20E0_738970 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A1190_737A20)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -346,7 +347,7 @@ EvtScript D_802A20E0_738970 = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_30015)
EVT_WAIT(4)
EVT_CALL(battle_move_spin_smash_IsBerserkerEquipped)
EVT_IF_EQ(LVar0, 1)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_30016)
EVT_CALL(battle_move_spin_smash_IsRightOnEquipped)
EVT_IF_EQ(LVar0, 0)
@ -359,7 +360,7 @@ EvtScript D_802A20E0_738970 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -383,7 +384,7 @@ EvtScript D_802A20E0_738970 = {
EVT_GOTO(0)
EVT_END_IF
EVT_ELSE
EVT_CALL(func_802A9258_422258, 0, LVar1, 3)
EVT_CALL(action_command_hammer_start, 0, LVar1, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_30016)
EVT_SUB(LVar1, 10)
@ -402,7 +403,7 @@ EvtScript D_802A20E0_738970 = {
EvtScript D_802A24C8_738D58 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A1190_737A20)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -415,7 +416,7 @@ EvtScript D_802A24C8_738D58 = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3001C)
EVT_WAIT(4)
EVT_CALL(battle_move_spin_smash_IsBerserkerEquipped)
EVT_IF_EQ(LVar0, 1)
EVT_IF_EQ(LVar0, ACTION_COMMAND_MODE_LEARNED)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3001D)
EVT_CALL(battle_move_spin_smash_IsRightOnEquipped)
EVT_IF_EQ(LVar0, 0)
@ -428,7 +429,7 @@ EvtScript D_802A24C8_738D58 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -452,7 +453,7 @@ EvtScript D_802A24C8_738D58 = {
EVT_GOTO(0)
EVT_END_IF
EVT_ELSE
EVT_CALL(func_802A9258_422258, 0, LVar1, 3)
EVT_CALL(action_command_hammer_start, 0, LVar1, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_3001D)
EVT_SUB(LVar1, 10)
@ -472,7 +473,7 @@ EvtScript D_802A24C8_738D58 = {
EvtScript D_802A28B0_739140 = {
EVT_CALL(ChooseNextTarget, 10, LVar0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A126C_737AFC)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -495,7 +496,7 @@ EvtScript D_802A28B0_739140 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -530,7 +531,7 @@ EvtScript D_802A28B0_739140 = {
EvtScript D_802A2BDC_73946C = {
EVT_CALL(ChooseNextTarget, 10, LVar0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A126C_737AFC)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -553,7 +554,7 @@ EvtScript D_802A2BDC_73946C = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_LOOP(60)
EVT_WAIT(1)
EVT_CALL(CheckButtonDown, 0x00040000, LVar0)
@ -579,7 +580,7 @@ EvtScript D_802A2BDC_73946C = {
EvtScript D_802A2E80_739710 = {
EVT_CALL(ChooseNextTarget, 10, LVar0)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(D_802A126C_737AFC)
EVT_CALL(SetGoalToTarget, ACTOR_PLAYER)
EVT_CALL(AddGoalPos, ACTOR_PLAYER, 0, 0, 0)
@ -602,7 +603,7 @@ EvtScript D_802A2E80_739710 = {
EVT_END_LOOP
EVT_END_IF
EVT_ADD(LVarD, 6)
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_LOOP(60)
EVT_WAIT(1)
EVT_CALL(CheckButtonDown, 0x00040000, LVar0)
@ -626,7 +627,7 @@ EvtScript D_802A2E80_739710 = {
};
EvtScript battle_move_spin_smash_main = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(func_80269EAC, 2)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar1)
@ -652,7 +653,7 @@ EvtScript battle_move_spin_smash_main = {
EvtScript D_802A3258_739AE8 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_CALL(InitTargetIterator)
EVT_EXEC_WAIT(D_802A1190_737A20)
EVT_SET(LVar1, 0)
@ -698,7 +699,7 @@ EvtScript D_802A3258_739AE8 = {
EVT_END_IF
EVT_END_LOOP
EVT_END_IF
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -775,7 +776,7 @@ EvtScript D_802A3258_739AE8 = {
EvtScript D_802A3920_73A1B0 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_CALL(InitTargetIterator)
EVT_EXEC_WAIT(D_802A1190_737A20)
EVT_SET(LVar1, 0)
@ -820,7 +821,7 @@ EvtScript D_802A3920_73A1B0 = {
EVT_END_IF
EVT_END_LOOP
EVT_END_IF
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)
@ -897,7 +898,7 @@ EvtScript D_802A3920_73A1B0 = {
EvtScript D_802A3FC4_73A854 = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_CALL(InitTargetIterator)
EVT_EXEC_WAIT(D_802A1190_737A20)
EVT_SET(LVar1, 0)
@ -940,7 +941,7 @@ EvtScript D_802A3FC4_73A854 = {
EVT_END_IF
EVT_END_LOOP
EVT_END_IF
EVT_CALL(func_802A9258_422258, 0, LVarD, 3)
EVT_CALL(action_command_hammer_start, 0, LVarD, 3)
EVT_CALL(SetActionResult, 0)
EVT_SET(LVar1, 0)
EVT_LOOP(30)

View File

@ -617,7 +617,7 @@ EvtScript N(celebrate) = {
};
EvtScript N(executeAction) = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar0)
@ -800,7 +800,7 @@ EvtScript N(animHold) = {
EvtScript N(bodySlam) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_BODY_SLAM)
EVT_CALL(action_command_body_slam_CreateHudElements)
EVT_CALL(action_command_body_slam_init)
EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_48)
@ -818,7 +818,7 @@ EvtScript N(bodySlam) = {
EVT_END_LOOP
EVT_CALL(MoveBattleCamOver, 65)
EVT_IF_EQ(LF_MashStarted, 1)
EVT_CALL(action_command_body_slam_MashActionCommandInit, 0, 92, 3, 0)
EVT_CALL(action_command_body_slam_start, 0, 92, 3, 0)
EVT_SET(LF_MashEnded, 0)
EVT_EXEC_GET_TID(N(runToTarget), LVarA)
EVT_LOOP(35)
@ -869,7 +869,7 @@ EvtScript N(bodySlam) = {
EVT_CALL(CheckButtonDown, BUTTON_A, LVar0)
EVT_IF_NE(LVar0, FALSE)
EVT_IF_EQ(LF_MashStarted, 0)
EVT_CALL(action_command_body_slam_MashActionCommandInit, 0, 92, 3, 0)
EVT_CALL(action_command_body_slam_start, 0, 92, 3, 0)
EVT_SET(LF_MashStarted, 1)
EVT_END_IF
EVT_END_IF
@ -891,7 +891,7 @@ EvtScript N(bodySlam) = {
EVT_CALL(CheckButtonDown, BUTTON_A, LVar0)
EVT_IF_NE(LVar0, FALSE)
EVT_IF_EQ(LF_MashStarted, 0)
EVT_CALL(action_command_body_slam_MashActionCommandInit, 0, 92, 3, 0)
EVT_CALL(action_command_body_slam_start, 0, 92, 3, 0)
EVT_SET(LF_MashStarted, 1)
EVT_END_IF
EVT_END_IF
@ -1013,7 +1013,7 @@ EvtScript N(bodySlam) = {
EvtScript N(bomb) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_BOMB)
EVT_CALL(func_802A9000_427A70)
EVT_CALL(action_command_bomb_init)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar2)
EVT_CASE_EQ(MOVE_BOMB)
@ -1058,11 +1058,11 @@ EvtScript N(bomb) = {
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar2)
EVT_CASE_EQ(MOVE_BOMB)
EVT_CALL(action_command_bomb_MashActionCommandInit, 0, 57, 3, 0)
EVT_CALL(action_command_bomb_start, 0, 57, 3, 0)
EVT_CASE_EQ(MOVE_POWER_BOMB)
EVT_CALL(action_command_bomb_MashActionCommandInit, 0, 72, 3, 1)
EVT_CALL(action_command_bomb_start, 0, 72, 3, 1)
EVT_CASE_EQ(MOVE_MEGA_BOMB)
EVT_CALL(action_command_bomb_MashActionCommandInit, 0, 87, 3, 2)
EVT_CALL(action_command_bomb_start, 0, 87, 3, 2)
EVT_END_SWITCH
EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_287)
EVT_CHILD_THREAD

View File

@ -364,7 +364,7 @@ EvtScript N(nextTurn) = {
};
EvtScript N(executeAction) = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(8)
@ -463,8 +463,8 @@ EvtScript N(80238EE0) = {
EvtScript N(smack) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMACK)
EVT_CALL(func_802A9000_42E3A0)
EVT_CALL(func_80269344, 0)
EVT_CALL(action_command_smack_init)
EVT_CALL(SetActionHudPrepareTime, 0)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar2)
EVT_CASE_EQ(MOVE_SMACK1)
@ -485,7 +485,7 @@ EvtScript N(smack) = {
EVT_WAIT(10)
EVT_SET(LVar0, LVarB)
EVT_ADD(LVar0, -3)
EVT_CALL(action_command_smack_MashActionCommandInit, 0, LVar0, 3, 0)
EVT_CALL(action_command_smack_start, 0, LVar0, 3, 0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_VANISH)
@ -749,9 +749,9 @@ EvtScript N(hidePlayer) = {
EvtScript N(spook) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SPOOK)
EVT_CALL(func_802A9000_430020)
EVT_CALL(action_command_spook_init)
EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0)
EVT_CALL(func_80269344, 20)
EVT_CALL(SetActionHudPrepareTime, 20)
EVT_WAIT(10)
EVT_THREAD
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_15)
@ -791,7 +791,7 @@ EvtScript N(spook) = {
EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 0, 0)
EVT_END_THREAD
EVT_CALL(N(AverageSpookChance))
EVT_CALL(action_command_spook_MashActionCommandInit, 0, 87, 3, LVar0)
EVT_CALL(action_command_spook_start, 0, 87, 3, LVar0)
EVT_CALL(GetActionResult, LVar1)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleBow_Conceal)
EVT_SET(LVar1, 0)
@ -987,8 +987,8 @@ EvtScript N(spook) = {
EvtScript N(fanSmack) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMACK)
EVT_CALL(func_802A9000_42E3A0)
EVT_CALL(func_80269344, 0)
EVT_CALL(action_command_smack_init)
EVT_CALL(SetActionHudPrepareTime, 0)
EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100)
EVT_SET(LVarB, 90)
EVT_SET(LVarC, 2)
@ -997,7 +997,7 @@ EvtScript N(fanSmack) = {
EVT_WAIT(10)
EVT_SET(LVar0, LVarB)
EVT_ADD(LVar0, -3)
EVT_CALL(action_command_smack_MashActionCommandInit, 0, LVar0, 3, 1)
EVT_CALL(action_command_smack_start, 0, LVar0, 3, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_BOO_VANISH)

View File

@ -46,7 +46,7 @@ ApiStatus N(GetReturnMoveTime)(Evt* script, s32 isInitialCall) {
script->varTable[0] = 20;
}
if (battleStatus->unk_83 != 0) {
if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_NOT_LEARNED) {
if (script->varTable[0] < 10) {
script->varTable[0] = 10;
}
@ -206,7 +206,7 @@ ApiStatus N(JumpOnTarget)(Evt* script, s32 isInitialCall) {
}
break;
case 2:
if (battleStatus->unk_83 == 0) {
if (battleStatus->actionCommandMode == ACTION_COMMAND_MODE_NOT_LEARNED) {
return ApiStatus_DONE2;
}
state->moveTime = 1;
@ -668,7 +668,7 @@ EvtScript N(celebrate) = {
EvtScript N(executeAction) = {
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(8)
@ -925,7 +925,7 @@ EvtScript N(calcJumpTime) = {
EvtScript N(headbonk1) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(runToTarget))
EVT_EXEC_WAIT(N(calcJumpTime))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleGoombario_PreHeadbonk)
@ -934,7 +934,7 @@ EvtScript N(headbonk1) = {
EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
EVT_WAIT(1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52)
EVT_CALL(func_802A9120_421B10, LVarA, 3)
EVT_CALL(action_command_jump_start, LVarA, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleGoombario_Headbonk)
EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0)
@ -993,9 +993,9 @@ EvtScript N(headbonk1) = {
EVT_CALL(func_80269524, LVarF)
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 24, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 24, 3)
EVT_SET(LVarA, 24)
EVT_THREAD
EVT_WAIT(4)
@ -1030,7 +1030,7 @@ EvtScript N(headbonk1) = {
EvtScript N(headbonk2) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(runToTarget))
EVT_EXEC_WAIT(N(calcJumpTime))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleGoombario_PreHeadbonk)
@ -1039,7 +1039,7 @@ EvtScript N(headbonk2) = {
EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
EVT_WAIT(1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52)
EVT_CALL(func_802A9120_421B10, LVarA, 3)
EVT_CALL(action_command_jump_start, LVarA, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleGoombario_Headbonk)
EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0)
@ -1098,9 +1098,9 @@ EvtScript N(headbonk2) = {
EVT_CALL(func_80269524, LVarF)
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 24, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 24, 3)
EVT_SET(LVarA, 24)
EVT_THREAD
EVT_WAIT(4)
@ -1137,7 +1137,7 @@ EvtScript N(headbonk2) = {
EvtScript N(headbonk3) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(runToTarget))
EVT_EXEC_WAIT(N(calcJumpTime))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleGoombario_PreHeadbonk)
@ -1146,7 +1146,7 @@ EvtScript N(headbonk3) = {
EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
EVT_WAIT(1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52)
EVT_CALL(func_802A9120_421B10, LVarA, 3)
EVT_CALL(action_command_jump_start, LVarA, 3)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleGoombario_Headbonk)
EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0)
@ -1205,9 +1205,9 @@ EvtScript N(headbonk3) = {
EVT_CALL(func_80269524, LVarF)
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_802694A4, 0)
EVT_CALL(func_802A9120_421B10, 24, 3)
EVT_CALL(action_command_jump_init)
EVT_CALL(ShowActionHud, 0)
EVT_CALL(action_command_jump_start, 24, 3)
EVT_SET(LVarA, 24)
EVT_THREAD
EVT_WAIT(4)
@ -1257,7 +1257,7 @@ s32 N(powerBounceChance) = 200;
EvtScript N(multibonk) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_EXEC_WAIT(N(runToTarget))
EVT_EXEC_WAIT(N(calcJumpTime))
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleGoombario_PreHeadbonk)
@ -1266,7 +1266,7 @@ EvtScript N(multibonk) = {
EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 19, 0)
EVT_WAIT(1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52)
EVT_CALL(func_802A9120_421B10, LVarA, 1)
EVT_CALL(action_command_jump_start, LVarA, 1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52)
EVT_CALL(SetAnimation, ACTOR_SELF, 1, ANIM_BattleGoombario_Headbonk)
EVT_CALL(SetActorDispOffset, ACTOR_PARTNER, 0, 9, 0)
@ -1334,21 +1334,21 @@ EvtScript N(multibonk) = {
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_53)
EVT_END_THREAD
EVT_CALL(CloseActionCommandInfo)
EVT_CALL(func_8026919C, EVT_PTR(N(actionCommandTable)))
EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(actionCommandTable)))
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(action_command_jump_init)
EVT_SET(LVarA, 24)
EVT_SWITCH(LVarF)
EVT_CASE_EQ(0)
EVT_CALL(func_802A9120_421B10, LVarA, 1)
EVT_CALL(action_command_jump_start, LVarA, 1)
EVT_CASE_EQ(1)
EVT_CALL(func_802A9120_421B10, LVarA, 2)
EVT_CALL(action_command_jump_start, LVarA, 2)
EVT_CASE_EQ(2)
EVT_CALL(func_802A9120_421B10, LVarA, 3)
EVT_CALL(action_command_jump_start, LVarA, 3)
EVT_CASE_EQ(3)
EVT_CALL(func_802A9120_421B10, LVarA, 4)
EVT_CALL(action_command_jump_start, LVarA, 4)
EVT_CASE_DEFAULT
EVT_CALL(func_802A9120_421B10, LVarA, 5)
EVT_CALL(action_command_jump_start, LVarA, 5)
EVT_END_SWITCH
EVT_THREAD
EVT_WAIT(4)

View File

@ -394,7 +394,7 @@ EvtScript N(nextTurn) = {
};
EvtScript N(executeAction) = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar0)
@ -533,7 +533,7 @@ EvtScript N(getShellTossMoveTime) = {
EvtScript N(shellToss) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_CALL(InitTargetIterator)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
@ -553,7 +553,7 @@ EvtScript N(shellToss) = {
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(func_802A9258_422258, 0, 47, 3)
EVT_CALL(action_command_hammer_start, 0, 47, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_200C)
@ -690,7 +690,7 @@ EvtScript N(shellToss) = {
EvtScript N(powerShell) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_CALL(GetActorLevel, ACTOR_PARTNER, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
@ -723,7 +723,7 @@ EvtScript N(powerShell) = {
EVT_END_IF
EVT_END_LOOP
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_59)
EVT_CALL(func_802A9258_422258, 0, 47, 3)
EVT_CALL(action_command_hammer_start, 0, 47, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_200C)
@ -869,7 +869,7 @@ EvtScript N(powerShell) = {
EvtScript N(dizzyShell) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_DIZZY_SHELL)
EVT_CALL(func_802A9000_426170)
EVT_CALL(action_command_dizzy_shell_init)
EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0)
EVT_CALL(InitTargetIterator)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
@ -889,7 +889,7 @@ EvtScript N(dizzyShell) = {
EVT_SET(LVarA, LVarD)
EVT_ADD(LVarA, -3)
EVT_CALL(battle_partner_kooper_AverageTargetDizzyChance)
EVT_CALL(action_command_dizzy_shell_MashActionCommandInit, 0, LVarA, 3, LVar0)
EVT_CALL(action_command_dizzy_shell_start, 0, LVarA, 3, LVar0)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)
EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_200C)
@ -1040,7 +1040,7 @@ EvtScript N(dizzyShell) = {
EvtScript N(fireShell) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_FIRE_SHELL)
EVT_CALL(func_802A9000_4269D0)
EVT_CALL(action_command_fire_shell_init)
EVT_CALL(SetupMashMeter, 5, 35, 60, 80, 99, 100)
EVT_CALL(InitTargetIterator)
EVT_CALL(GetActorPos, ACTOR_PLAYER, LVar0, LVar1, LVar2)
@ -1059,7 +1059,7 @@ EvtScript N(fireShell) = {
EVT_SET(LVarD, 75)
EVT_SET(LVarC, LVarD)
EVT_ADD(LVarC, -3)
EVT_CALL(action_command_fire_shell_MashActionCommandInit, 0, LVarC, 3)
EVT_CALL(action_command_fire_shell_start, 0, LVarC, 3)
EVT_CALL(SetActorVar, ACTOR_SELF, 1, 0)
EVT_SET(LVarA, EVT_FLOAT(8.0))
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleKooper_ShellSpinSlowest)

View File

@ -71,7 +71,6 @@ static s32 D_8023D338;
extern HudScript HES_AimBlinkA;
extern HudScript HES_AimReticle;
extern HudScript HES_AimTarget;
extern HudScript HES_StickNeutral;
extern HudScript HES_StickTapRight;
ApiStatus N(SpinyFlipUpdatePopup)(Evt* script, s32 isInitialCall) {
@ -317,7 +316,7 @@ EvtScript N(nextTurn) = {
EvtScript N(executeAction) = {
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(8)
EVT_CALL(LoadStarPowerScript)
@ -947,7 +946,7 @@ EvtScript N(spinyFlip) = {
EvtScript N(spinySurge) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SPINY_SURGE)
EVT_CALL(func_802A9000_42EE20)
EVT_CALL(action_command_spiny_surge_init)
EVT_CALL(GetActorLevel, ACTOR_PARTNER, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
@ -957,7 +956,7 @@ EvtScript N(spinySurge) = {
EVT_CASE_EQ(2)
EVT_CALL(SetupMashMeter, 4, 40, 70, 99, 100, 0)
EVT_END_SWITCH
EVT_CALL(func_80269344, 10)
EVT_CALL(SetActionHudPrepareTime, 10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamTarget, 45, 60, 0)
EVT_CALL(SetBattleCamOffsetZ, 0)
@ -981,7 +980,7 @@ EvtScript N(spinySurge) = {
EVT_END_SWITCH
EVT_SET(LVarB, LVarA)
EVT_ADD(LVarB, -3)
EVT_CALL(func_802A916C_42EF8C, 0, LVarB, 3)
EVT_CALL(action_command_spiny_surge_start, 0, LVarB, 3)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(InitTargetIterator)
EVT_CALL(SetActorVar, ACTOR_PARTNER, 0, 0)
@ -1102,8 +1101,8 @@ EvtScript N(cloudNine_normal) = {
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_8, 0)
EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_20000000, 1)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK)
EVT_CALL(func_802A9000_42A4F0, 2)
EVT_CALL(func_80269344, 50)
EVT_CALL(action_command_water_block_init, 2)
EVT_CALL(SetActionHudPrepareTime, 50)
EVT_CALL(InitTargetIterator)
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_10)
@ -1143,7 +1142,7 @@ EvtScript N(cloudNine_normal) = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_ReadyJump)
EVT_WAIT(3)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_10002)
EVT_CALL(func_802A9398_42A888, 0, 97, 3)
EVT_CALL(action_command_water_block_start, 0, 97, 3)
EVT_CALL(AddBattleCamZoom, -75)
EVT_CALL(MoveBattleCamOver, 100)
EVT_CALL(func_8024ECF8, 0, 0, 1)
@ -1221,8 +1220,8 @@ EvtScript N(cloudNine_normal) = {
EvtScript N(cloudNine_immobile) = {
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK)
EVT_CALL(func_802A9000_42A4F0, 2)
EVT_CALL(func_80269344, 50)
EVT_CALL(action_command_water_block_init, 2)
EVT_CALL(SetActionHudPrepareTime, 50)
EVT_CALL(N(RemoveCloudNineFX))
EVT_CALL(InitTargetIterator)
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
@ -1258,7 +1257,7 @@ EvtScript N(cloudNine_immobile) = {
EVT_ADD(LVar1, 40)
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(FlyToGoal, ACTOR_PARTNER, 20, 0, 10)
EVT_CALL(func_802A9398_42A888, 0, 97, 3)
EVT_CALL(action_command_water_block_start, 0, 97, 3)
EVT_CALL(AddBattleCamZoom, -75)
EVT_CALL(MoveBattleCamOver, 100)
EVT_CALL(func_8024ECF8, 0, 0, 1)
@ -1689,9 +1688,9 @@ ApiStatus N(IsHurricaneActive)(Evt* script, s32 isInitialCall) {
EvtScript N(hurricane) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_HURRICANE)
EVT_CALL(func_802A9000_42F6E0)
EVT_CALL(action_command_hurricane_init)
EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0)
EVT_CALL(func_80269344, 15)
EVT_CALL(SetActionHudPrepareTime, 15)
EVT_CALL(func_80269EAC, 20)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamTarget, -45, 54, 0)
@ -1706,7 +1705,7 @@ EvtScript N(hurricane) = {
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleLakilester_Idle)
EVT_WAIT(15)
EVT_CALL(N(InitHurricane))
EVT_CALL(func_802A91A0_42F880, 0, 147, 3, LVar0)
EVT_CALL(action_command_hurricane_start, 0, 147, 3, LVar0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 20, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)

View File

@ -37,8 +37,6 @@ extern HudScript HES_AimShimmerD;
extern HudScript HES_AimShimmerE;
extern HudScript HES_AimShimmerF;
extern HudScript HES_AimTarget;
extern HudScript HES_StickHoldLeft;
extern HudScript HES_StickNeutral;
extern EvtScript N(handleEvent);
extern EvtScript N(idle);
@ -191,7 +189,7 @@ ApiStatus N(ShellShotActionCommand)(Evt* evt, s32 isInitialCall) {
shellShotTimer = 90;
state->velocity = 3.0f;
battleStatus->unk_86 = 0;
func_80268858();
action_command_init_status();
func_80269118();
evt->functionTemp[0] = 1;
break;
@ -265,14 +263,14 @@ ApiStatus N(ShellShotActionCommand)(Evt* evt, s32 isInitialCall) {
} else {
battleStatus->unk_86 = 0;
}
battleStatus->unk_84 = 0;
battleStatus->actionResult = 0;
if (aimAngle < 7.0f) {
battleStatus->unk_84 = 1;
battleStatus->actionResult = 1;
battleStatus->unk_86 = 1;
func_80269160();
} else if (state->angle < state->bounceDivisor) {
battleStatus->unk_84 = -1;
battleStatus->actionResult = -1;
}
for (i = 0; i < ARRAY_COUNT(hudMarkers); i++) {
@ -442,7 +440,7 @@ ApiStatus N(CarryAway)(Evt* evt, s32 isInitialCall) {
}
if (parakarry->state.currentPos.x > 240.0f) {
battleStatus->unk_84 = temp_s4;
battleStatus->actionResult = temp_s4;
return ApiStatus_DONE2;
}
break;
@ -805,7 +803,7 @@ EvtScript N(celebrate) = {
};
EvtScript N(executeAction) = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(8)
@ -929,8 +927,8 @@ EvtScript N(skyDive) = {
EVT_CALL(EnableIdleScript, ACTOR_PARTNER, 0)
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_JUMP)
EVT_CALL(action_command_jump_CreateHudElements)
EVT_CALL(func_8026919C, EVT_PTR(N(actionCommandTable)))
EVT_CALL(action_command_jump_init)
EVT_CALL(SetActionDifficultyTable, EVT_PTR(N(actionCommandTable)))
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(InitTargetIterator)
@ -941,7 +939,7 @@ EvtScript N(skyDive) = {
EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, -10, 10)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Still)
EVT_WAIT(3)
EVT_CALL(func_802A9120_421B10, 32, 3)
EVT_CALL(action_command_jump_start, 32, 3)
EVT_CALL(PlaySoundAtActor, ACTOR_PARTNER, SOUND_2004)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_52)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_FlyFast)
@ -1093,9 +1091,9 @@ EvtScript N(airLift) = {
EVT_CALL(InitTargetIterator)
EVT_CALL(N(AirLiftChance))
EVT_CALL(LoadActionCommand, ACTION_COMMAND_AIR_LIFT)
EVT_CALL(func_802A9000_428A70, LVar0)
EVT_CALL(action_command_air_lift_init, LVar0)
EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0)
EVT_CALL(func_80269344, 0)
EVT_CALL(SetActionHudPrepareTime, 0)
EVT_CALL(InitTargetIterator)
EVT_CALL(SetGoalToTarget, ACTOR_PARTNER)
EVT_CALL(GetDistanceToGoal, ACTOR_PARTNER, LVar0)
@ -1107,7 +1105,7 @@ EvtScript N(airLift) = {
EVT_IF_LT(LVar0, 0)
EVT_SET(LVar0, 0)
EVT_END_IF
EVT_CALL(func_80269344, LVar0)
EVT_CALL(SetActionHudPrepareTime, LVar0)
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(5.0))
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run)
EVT_CALL(FlyToGoal, ACTOR_PARTNER, 0, -4, 10)
@ -1143,7 +1141,7 @@ EvtScript N(airLift) = {
EVT_CALL(PartnerTestEnemy, LVar0, DAMAGE_TYPE_AIR_LIFT, ATTACK_EVENT_FLAG_4, 0, 0, BS_FLAGS1_10 | BS_FLAGS1_SP_EVT_ACTIVE)
EVT_CALL(N(AirLiftChance))
EVT_IF_NE(LVar0, -1)
EVT_CALL(func_802A9184_428BF4, 0, 87, 3, 0)
EVT_CALL(action_command_air_lift_start, 0, 87, 3, 0)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CHILD_THREAD
EVT_WAIT(1)
@ -1204,9 +1202,9 @@ EvtScript N(airLift) = {
EvtScript N(airRaid) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_AIR_RAID)
EVT_CALL(func_802A9000_429320)
EVT_CALL(action_command_air_raid_init)
EVT_CALL(SetupMashMeter, 4, 25, 50, 75, 100, 0)
EVT_CALL(func_80269344, 0)
EVT_CALL(SetActionHudPrepareTime, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_14)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 30)
@ -1216,7 +1214,7 @@ EvtScript N(airRaid) = {
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Run)
EVT_CALL(FlyToGoal, ACTOR_PARTNER, 15, -2, 0)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_Idle)
EVT_CALL(action_command_air_raid_MashActionCommandInit, 0, 90, 3)
EVT_CALL(action_command_air_raid_start, 0, 90, 3)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_WAIT(2)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleParakarry_PreDive)

View File

@ -595,7 +595,7 @@ EvtScript N(nextTurn) = {
};
EvtScript N(executeAction) = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar0)
@ -731,7 +731,7 @@ EvtScript N(getJumpTime) = {
EvtScript N(bellyFlop) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SMASH)
EVT_CALL(action_command_hammer_CreateHudElements)
EVT_CALL(action_command_hammer_init)
EVT_EXEC_WAIT(N(runToTarget))
EVT_EXEC_WAIT(N(getJumpTime))
EVT_LOOP(30)
@ -741,7 +741,7 @@ EvtScript N(bellyFlop) = {
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(func_802A9258_422258, 0, 57, 3)
EVT_CALL(action_command_hammer_start, 0, 57, 3)
EVT_CALL(SetActionResult, 0)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Tense1)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_59)
@ -933,7 +933,7 @@ EvtScript N(bellyFlop) = {
EvtScript N(squirt) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_SQUIRT)
EVT_CALL(func_802A9000_429D20)
EVT_CALL(action_command_squirt_init)
EVT_CALL(GetActorLevel, ACTOR_PARTNER, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
@ -960,7 +960,7 @@ EvtScript N(squirt) = {
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Inhale)
EVT_CALL(AddBattleCamZoom, -80)
EVT_CALL(MoveBattleCamOver, 90)
EVT_CALL(func_802A911C_429E3C, 0, 87, 3)
EVT_CALL(action_command_squirt_start, 0, 87, 3)
EVT_LOOP(90)
EVT_CALL(GetActionResult, LVar0)
EVT_IF_EQ(LVar0, 0)
@ -1046,8 +1046,8 @@ EvtScript N(waterBlock) = {
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(JumpToGoal, ACTOR_PARTNER, 10, FALSE, TRUE, FALSE)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK)
EVT_CALL(func_802A9000_42A4F0, 0)
EVT_CALL(func_80269344, 0)
EVT_CALL(action_command_water_block_init, 0)
EVT_CALL(SetActionHudPrepareTime, 0)
EVT_SET(LVar0, 0)
EVT_LOOP(4)
EVT_ADD(LVar0, 45)
@ -1055,7 +1055,7 @@ EvtScript N(waterBlock) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_WAIT(4)
EVT_CALL(func_802A9398_42A888, 0, 100, 3)
EVT_CALL(action_command_water_block_start, 0, 100, 3)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_HoldWater)
EVT_WAIT(110)
EVT_CALL(GetActionCommandResult, LVar0)
@ -1137,7 +1137,7 @@ EvtScript N(waterBlock) = {
EvtScript N(tidalWave) = {
EVT_CALL(UseIdleAnimation, ACTOR_PARTNER, FALSE)
EVT_CALL(LoadActionCommand, ACTION_COMMAND_TIDAL_WAVE)
EVT_CALL(action_command_tidal_wave_CreateHudElements)
EVT_CALL(action_command_tidal_wave_init)
EVT_CALL(SetupMashMeter, 5, 20, 30, 60, 80, 100)
EVT_CALL(InitTargetIterator)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
@ -1155,7 +1155,7 @@ EvtScript N(tidalWave) = {
EVT_CALL(JumpToGoal, ACTOR_PARTNER, 15, FALSE, TRUE, FALSE)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_Idle)
EVT_CALL(SetAnimation, ACTOR_PARTNER, -1, ANIM_BattleSushie_HoldWater)
EVT_CALL(func_802A9138_42C828, 0, 100, 3)
EVT_CALL(action_command_tidal_wave_start, 0, 100, 3)
EVT_CALL(SetActorRotationOffset, ACTOR_PARTNER, 0, 12, 0)
EVT_THREAD
EVT_WAIT(54)

View File

@ -677,7 +677,7 @@ EvtScript N(nextTurn) = {
};
EvtScript N(executeAction) = {
EVT_CALL(func_802694A4, 1)
EVT_CALL(ShowActionHud, 1)
EVT_CALL(SetBattleFlagBits, BS_FLAGS1_4000, 0)
EVT_CALL(GetMenuSelection, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar0)
@ -767,7 +767,7 @@ EvtScript N(electroDash_wait) = {
EvtScript N(electroDash) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_BODY_SLAM)
EVT_CALL(action_command_body_slam_CreateHudElements)
EVT_CALL(action_command_body_slam_init)
EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_48)
@ -785,7 +785,7 @@ EvtScript N(electroDash) = {
EVT_END_LOOP
EVT_CALL(MoveBattleCamOver, 75)
EVT_IF_EQ(LocalFlag(2), 1)
EVT_CALL(action_command_body_slam_MashActionCommandInit, 0, 102, 3, 1)
EVT_CALL(action_command_body_slam_start, 0, 102, 3, 1)
EVT_SET(LocalFlag(0), 0)
EVT_EXEC_GET_TID(N(dashToTarget), LVarA)
EVT_LOOP(20)
@ -837,7 +837,7 @@ EvtScript N(electroDash) = {
EVT_CALL(CheckButtonDown, BUTTON_A, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_IF_EQ(LocalFlag(2), 0)
EVT_CALL(action_command_body_slam_MashActionCommandInit, 0, 92, 3, 1)
EVT_CALL(action_command_body_slam_start, 0, 92, 3, 1)
EVT_SET(LocalFlag(2), 1)
EVT_END_IF
EVT_END_IF
@ -860,7 +860,7 @@ EvtScript N(electroDash) = {
EVT_CALL(CheckButtonDown, BUTTON_A, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_IF_EQ(LocalFlag(2), 0)
EVT_CALL(action_command_body_slam_MashActionCommandInit, 0, 92, 3, 1)
EVT_CALL(action_command_body_slam_start, 0, 92, 3, 1)
EVT_SET(LocalFlag(2), 1)
EVT_END_IF
EVT_END_IF
@ -961,9 +961,9 @@ EvtScript N(electroDash) = {
EvtScript N(powerShock) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_POWER_SHOCK)
EVT_CALL(action_command_power_shock_CreateHudElements)
EVT_CALL(action_command_power_shock_init)
EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0)
EVT_CALL(func_80269344, 0)
EVT_CALL(SetActionHudPrepareTime, 0)
EVT_SET(LocalFlag(15), 0)
EVT_CALL(GetOwnerTarget, LVarA, LVarB)
EVT_CALL(GetActorFlags, LVarA, LVar0)
@ -984,7 +984,7 @@ EvtScript N(powerShock) = {
EVT_CALL(MoveBattleCamOver, 80)
EVT_CALL(N(WattFXDisable))
EVT_CALL(N(TargetParalyzeChance))
EVT_CALL(func_802A9210_42D120, 0, 72, 3, LVar0)
EVT_CALL(action_command_power_shock_start, 0, 72, 3, LVar0)
EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 15)
EVT_ADD(LVar2, 5)
@ -1084,8 +1084,8 @@ EvtScript N(powerShock) = {
EvtScript N(8023AE8C) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK)
EVT_CALL(func_802A9000_42A4F0, 1)
EVT_CALL(func_80269344, 0)
EVT_CALL(action_command_water_block_init, 1)
EVT_CALL(SetActionHudPrepareTime, 0)
EVT_CALL(SetActorFlagBits, ACTOR_PLAYER, ACTOR_FLAG_20000000, 1)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario_GotItem)
@ -1107,7 +1107,7 @@ EvtScript N(8023AE8C) = {
EVT_WAIT(1)
EVT_CALL(SetActorYaw, ACTOR_PARTNER, 180)
EVT_WAIT(10)
EVT_CALL(func_802A9398_42A888, 0, 100, 3)
EVT_CALL(action_command_water_block_start, 0, 100, 3)
EVT_CALL(AddBattleCamZoom, -75)
EVT_CALL(MoveBattleCamOver, 100)
EVT_CALL(func_8024ECF8, 0, 0, 1)
@ -1169,8 +1169,8 @@ EvtScript N(8023AE8C) = {
EvtScript N(8023B450) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_WATER_BLOCK)
EVT_CALL(func_802A9000_42A4F0, 1)
EVT_CALL(func_80269344, 0)
EVT_CALL(action_command_water_block_init, 1)
EVT_CALL(SetActionHudPrepareTime, 0)
EVT_CALL(UseIdleAnimation, ACTOR_PLAYER, FALSE)
EVT_WAIT(5)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
@ -1190,7 +1190,7 @@ EvtScript N(8023B450) = {
EVT_WAIT(1)
EVT_CALL(SetActorYaw, ACTOR_PARTNER, 180)
EVT_WAIT(10)
EVT_CALL(func_802A9398_42A888, 0, 100, 3)
EVT_CALL(action_command_water_block_start, 0, 100, 3)
EVT_CALL(AddBattleCamZoom, -100)
EVT_CALL(MoveBattleCamOver, 100)
EVT_CALL(func_8024ECF8, 0, 0, 1)
@ -1253,9 +1253,9 @@ s32 D_8023B948_707438[] = { 3, 3, 4, 7, 10, 13, 16, 16, 16, 16, };
EvtScript N(megaShock) = {
EVT_CALL(LoadActionCommand, ACTION_COMMAND_MEGA_SHOCK)
EVT_CALL(func_802A9000_42DA10)
EVT_CALL(action_command_mega_shock_init)
EVT_CALL(SetupMashMeter, 1, 100, 0, 0, 0, 0)
EVT_CALL(func_80269344, 0)
EVT_CALL(SetActionHudPrepareTime, 0)
EVT_CALL(UseBattleCamPreset, BTL_CAM_PRESET_19)
EVT_CALL(SetBattleCamTarget, -54, 63, 10)
EVT_CALL(SetBattleCamOffsetZ, 15)
@ -1278,7 +1278,7 @@ EvtScript N(megaShock) = {
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(N(AverageTargetParalyzeChance))
EVT_CALL(func_802A91A0_42DBB0, 0, 87, 3, LVar0)
EVT_CALL(action_command_mega_shock_start, 0, 87, 3, LVar0)
EVT_CALL(GetActorPos, ACTOR_PARTNER, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 15)
EVT_ADD(LVar2, 5)

View File

@ -1,12 +1,13 @@
#include "common.h"
#include "npc.h"
#include "battle/action_cmd.h"
ApiStatus N(IsBerserkerEquipped)(Evt* script, s32 isInitialCall) {
script->varTable[0] = gBattleStatus.unk_83;
script->varTable[0] = gBattleStatus.actionCommandMode;
script->varTable[1] = 15;
if (is_ability_active(ABILITY_BERSERKER)) {
script->varTable[0] = 0;
script->varTable[0] = ACTION_COMMAND_MODE_NOT_LEARNED;
script->varTable[1] = 40;
}

View File

@ -1,5 +1,6 @@
#include "common.h"
#include "npc.h"
#include "battle/action_cmd.h"
ApiStatus N(UnkMoveFunc1)(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
@ -17,7 +18,7 @@ ApiStatus N(UnkMoveFunc1)(Evt* script, s32 isInitialCall) {
script->varTable[0] = 20;
}
if (battleStatus->unk_83 != 0) {
if (battleStatus->actionCommandMode != ACTION_COMMAND_MODE_NOT_LEARNED) {
if (script->varTable[0] < 6) {
script->varTable[0] = 6;
}

File diff suppressed because one or more lines are too long

View File

@ -30,16 +30,16 @@ dlabel D_802A20CC_7829EC
.word 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0001000C, 0x00000043, 0x00000001, PlayerLandJump, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x0001000C, 0x00000008, 0x00000001, 0x00000002, 0x00000058, 0x00000000, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000005, 0xF24A7E80, 0x00000059, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00000162, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010030, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010031, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000003, SetBattleFlagBits, 0x00000100, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000003, 0x00000043, 0x00000001, func_802693F0, 0x00000043, 0x00000002, EnablePlayerBlur, 0xFFFFFFFF, 0x00000043, 0x00000001, func_80276EFC, 0x00000043, 0x00000002, SetGoalToHome, 0x00000000, 0x00000043, 0x00000003, SetActorSpeed, 0x00000000, 0xF24A9A80, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010005, 0x00000043, 0x00000002, PlayerRunToGoal, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010002, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802A2264_782B84
.word 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000046, 0x00000001, D_802A128C_781BAC, 0x00000046, 0x00000001, D_802A1400_781D20, 0x00000043, 0x00000003, func_802A9120_421B10, 0xFE363C8A, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000022, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00030000, 0x00000043, 0x00000003, func_80274A18, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000046, 0x00000001, D_802A128C_781BAC, 0x00000043, 0x00000001, InitTargetIterator, 0x00000046, 0x00000001, D_802A14E8_781E08, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C8B, 0x0000000E, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, func_802A9120_421B10, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000025, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x0001000A, 0x0001000B, 0x00000043, 0x00000003, func_802752AC, 0xFE363C8A, 0x00000000, 0x00000008, 0x00000001, 0x00000007, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000003, 0x00000001, 0x0000001C, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000005, 0x00000001, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000046, 0x00000001, D_802A128C_781BAC, 0x00000046, 0x00000001, D_802A15D0_781EF0, 0x00000043, 0x00000002, func_8026919C, D_802A11D0_781AF0, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000028, 0x00000002, 0xFE363C8B, 0x00000004, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, func_802A9120_421B10, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000026, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00080000, 0x00030000, 0x00000043, 0x00000003, func_80275F00, 0xFE363C8A, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x0000000D, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C89, 0x00000001, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00030000, 0x00000043, 0x00000005, SetActorRotation, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x00000008, 0x00000001, 0x00000002, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000003, func_802A9120_421B10, 0x0000000D, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000027, 0x00000043, 0x00000003, func_80275F00, 0x0000000F, 0x00000002, 0x00000004, 0x00000001, 0x0000000A, 0x00000012, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000003, func_802A9120_421B10, 0x00000002, 0x00000003, 0x00000043, 0x00000003, func_80275F00, 0x00000004, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000046, 0x00000001, D_802A128C_781BAC, 0x00000046, 0x00000001, D_802A1400_781D20, 0x00000043, 0x00000003, action_command_jump_start, 0xFE363C8A, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000022, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00030000, 0x00000043, 0x00000003, func_80274A18, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000046, 0x00000001, D_802A128C_781BAC, 0x00000043, 0x00000001, InitTargetIterator, 0x00000046, 0x00000001, D_802A14E8_781E08, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C8B, 0x0000000E, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, action_command_jump_start, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000025, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x0001000A, 0x0001000B, 0x00000043, 0x00000003, func_802752AC, 0xFE363C8A, 0x00000000, 0x00000008, 0x00000001, 0x00000007, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000003, 0x00000001, 0x0000001C, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000005, 0x00000001, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000046, 0x00000001, D_802A128C_781BAC, 0x00000046, 0x00000001, D_802A15D0_781EF0, 0x00000043, 0x00000002, SetActionDifficultyTable, D_802A11D0_781AF0, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000028, 0x00000002, 0xFE363C8B, 0x00000004, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, action_command_jump_start, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000026, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00080000, 0x00030000, 0x00000043, 0x00000003, func_80275F00, 0xFE363C8A, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x0000000D, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C89, 0x00000001, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00030000, 0x00000043, 0x00000005, SetActorRotation, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x00000008, 0x00000001, 0x00000002, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000003, action_command_jump_start, 0x0000000D, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000027, 0x00000043, 0x00000003, func_80275F00, 0x0000000F, 0x00000002, 0x00000004, 0x00000001, 0x0000000A, 0x00000012, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000003, action_command_jump_start, 0x00000002, 0x00000003, 0x00000043, 0x00000003, func_80275F00, 0x00000004, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel battle_move_d_down_jump_main
.word 0x00000043, 0x00000002, func_802694A4, 0x00000001, 0x00000043, 0x00000002, func_80269EAC, 0x00000004, 0x00000043, 0x00000004, GetMenuSelection, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000014, 0x00000001, 0xFE363C81, 0x00000016, 0x00000001, 0x00000000, 0x00000046, 0x00000001, D_802A2784_7830A4, 0x00000016, 0x00000001, 0x00000001, 0x00000046, 0x00000001, D_802A2B24_783444, 0x00000016, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A2EE0_783800, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000043, 0x00000002, ShowActionHud, 0x00000001, 0x00000043, 0x00000002, func_80269EAC, 0x00000004, 0x00000043, 0x00000004, GetMenuSelection, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000014, 0x00000001, 0xFE363C81, 0x00000016, 0x00000001, 0x00000000, 0x00000046, 0x00000001, D_802A2784_7830A4, 0x00000016, 0x00000001, 0x00000001, 0x00000046, 0x00000001, D_802A2B24_783444, 0x00000016, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A2EE0_783800, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802A2784_7830A4
.word 0x00000046, 0x00000001, D_802A2264_782B84, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A20CC_7829EC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C8A, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210A, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000015A, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000001, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000001, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A1A90_7823B0, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001B, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000002, func_802694A4, 0x00000000, 0x00000043, 0x00000003, func_802A9120_421B10, 0x00000018, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x0001000C, 0x00000043, 0x00000003, func_80274A18, 0x00000018, 0x00000003, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210A, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000001, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A16B8_781FD8, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000046, 0x00000001, D_802A2264_782B84, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A20CC_7829EC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C8A, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210A, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000015A, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000001, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000001, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A1A90_7823B0, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001B, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000002, ShowActionHud, 0x00000000, 0x00000043, 0x00000003, action_command_jump_start, 0x00000018, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x0001000C, 0x00000043, 0x00000003, func_80274A18, 0x00000018, 0x00000003, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210A, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000001, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A16B8_781FD8, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802A2B24_783444
.word 0x00000046, 0x00000001, D_802A2264_782B84, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A20CC_7829EC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210B, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000002, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000002, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A1A90_7823B0, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001B, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000002, func_802694A4, 0x00000000, 0x00000043, 0x00000003, func_802A9120_421B10, 0x00000025, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000001, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x0001000A, 0x0001000B, 0x00000043, 0x00000003, func_802752AC, 0x00000014, 0x00000004, 0x00000008, 0x00000001, 0x00000007, 0x00000043, 0x00000003, func_802752AC, 0x00000003, 0x00000005, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210B, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000002, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A16B8_781FD8, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000046, 0x00000001, D_802A2264_782B84, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A20CC_7829EC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210B, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000002, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000002, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A1A90_7823B0, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001B, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000002, ShowActionHud, 0x00000000, 0x00000043, 0x00000003, action_command_jump_start, 0x00000025, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000001, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x0001000A, 0x0001000B, 0x00000043, 0x00000003, func_802752AC, 0x00000014, 0x00000004, 0x00000008, 0x00000001, 0x00000007, 0x00000043, 0x00000003, func_802752AC, 0x00000003, 0x00000005, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210B, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000002, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A16B8_781FD8, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802A2EE0_783800
.word 0x00000046, 0x00000001, D_802A2264_782B84, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A20CC_7829EC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210C, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000003, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000003, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A1A90_7823B0, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001C, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000002, func_802694A4, 0x00000000, 0x00000043, 0x00000003, func_802A9120_421B10, 0x00000019, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000001, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010007, 0x0001000C, 0x00000043, 0x00000003, func_80275F00, 0x00000019, 0x00000004, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210C, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000003, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A16B8_781FD8, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000
.word 0x00000046, 0x00000001, D_802A2264_782B84, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A20CC_7829EC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210C, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000003, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000003, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A1A90_7823B0, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001C, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000002, ShowActionHud, 0x00000000, 0x00000043, 0x00000003, action_command_jump_start, 0x00000019, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000001, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010007, 0x0001000C, 0x00000043, 0x00000003, func_80275F00, 0x00000019, 0x00000004, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000000, 0x00000043, 0x00000005, GetActorPos, 0x00000000, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, func_802A10E4_781A04, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x0000210C, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x08000080, 0x00000000, 0x00000000, 0x00000003, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A16B8_781FD8, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000

File diff suppressed because one or more lines are too long

View File

@ -30,16 +30,16 @@ dlabel D_802A1FEC_749DBC
.word 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0001000C, 0x00000043, 0x00000001, PlayerLandJump, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x0001000C, 0x00000008, 0x00000001, 0x00000002, 0x00000058, 0x00000000, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000005, 0xF24A7E80, 0x00000059, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00000162, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010030, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010031, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000003, SetBattleFlagBits, 0x00000100, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000003, 0x00000043, 0x00000001, func_802693F0, 0x00000043, 0x00000002, EnablePlayerBlur, 0xFFFFFFFF, 0x00000043, 0x00000001, func_80276EFC, 0x00000043, 0x00000002, SetGoalToHome, 0x00000000, 0x00000043, 0x00000003, SetActorSpeed, 0x00000000, 0xF24A9A80, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010005, 0x00000043, 0x00000002, PlayerRunToGoal, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010002, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802A2184_749F54
.word 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000046, 0x00000001, D_802A11AC_748F7C, 0x00000046, 0x00000001, D_802A1320_7490F0, 0x00000043, 0x00000003, func_802A9120_421B10, 0xFE363C8A, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000022, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00030000, 0x00000043, 0x00000003, func_80274A18, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000046, 0x00000001, D_802A11AC_748F7C, 0x00000043, 0x00000001, InitTargetIterator, 0x00000046, 0x00000001, D_802A1408_7491D8, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C8B, 0x0000000E, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, func_802A9120_421B10, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000025, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x0001000A, 0x0001000B, 0x00000043, 0x00000003, func_802752AC, 0xFE363C8A, 0x00000000, 0x00000008, 0x00000001, 0x00000007, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000003, 0x00000001, 0x0000001C, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000005, 0x00000001, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000046, 0x00000001, D_802A11AC_748F7C, 0x00000046, 0x00000001, D_802A14F0_7492C0, 0x00000043, 0x00000002, func_8026919C, D_802A10F0_748EC0, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000028, 0x00000002, 0xFE363C8B, 0x00000004, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, func_802A9120_421B10, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000026, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00080000, 0x00030000, 0x00000043, 0x00000003, func_80275F00, 0xFE363C8A, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x0000000D, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C89, 0x00000001, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00030000, 0x00000043, 0x00000005, SetActorRotation, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x00000008, 0x00000001, 0x00000002, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000003, func_802A9120_421B10, 0x0000000D, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000027, 0x00000043, 0x00000003, func_80275F00, 0x0000000F, 0x00000002, 0x00000004, 0x00000001, 0x0000000A, 0x00000012, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000003, func_802A9120_421B10, 0x00000002, 0x00000003, 0x00000043, 0x00000003, func_80275F00, 0x00000004, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000046, 0x00000001, D_802A11AC_748F7C, 0x00000046, 0x00000001, D_802A1320_7490F0, 0x00000043, 0x00000003, action_command_jump_start, 0xFE363C8A, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000022, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00030000, 0x00000043, 0x00000003, func_80274A18, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000046, 0x00000001, D_802A11AC_748F7C, 0x00000043, 0x00000001, InitTargetIterator, 0x00000046, 0x00000001, D_802A1408_7491D8, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C8B, 0x0000000E, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, action_command_jump_start, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000025, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x0001000A, 0x0001000B, 0x00000043, 0x00000003, func_802752AC, 0xFE363C8A, 0x00000000, 0x00000008, 0x00000001, 0x00000007, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000003, 0x00000001, 0x0000001C, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000005, 0x00000001, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000046, 0x00000001, D_802A11AC_748F7C, 0x00000046, 0x00000001, D_802A14F0_7492C0, 0x00000043, 0x00000002, SetActionDifficultyTable, D_802A10F0_748EC0, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000028, 0x00000002, 0xFE363C8B, 0x00000004, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, action_command_jump_start, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000026, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00080000, 0x00030000, 0x00000043, 0x00000003, func_80275F00, 0xFE363C8A, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x0000000D, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C89, 0x00000001, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00030000, 0x00000043, 0x00000005, SetActorRotation, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x00000008, 0x00000001, 0x00000002, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000003, action_command_jump_start, 0x0000000D, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000027, 0x00000043, 0x00000003, func_80275F00, 0x0000000F, 0x00000002, 0x00000004, 0x00000001, 0x0000000A, 0x00000012, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000003, action_command_jump_start, 0x00000002, 0x00000003, 0x00000043, 0x00000003, func_80275F00, 0x00000004, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel battle_move_dizzy_stomp_main
.word 0x00000043, 0x00000002, func_802694A4, 0x00000001, 0x00000043, 0x00000004, GetMenuSelection, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000014, 0x00000001, 0xFE363C81, 0x00000016, 0x00000001, 0x00000000, 0x00000046, 0x00000001, D_802A2694_74A464, 0x00000016, 0x00000001, 0x00000001, 0x00000046, 0x00000001, D_802A2980_74A750, 0x00000016, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A2CAC_74AA7C, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000043, 0x00000002, ShowActionHud, 0x00000001, 0x00000043, 0x00000004, GetMenuSelection, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000014, 0x00000001, 0xFE363C81, 0x00000016, 0x00000001, 0x00000000, 0x00000046, 0x00000001, D_802A2694_74A464, 0x00000016, 0x00000001, 0x00000001, 0x00000046, 0x00000001, D_802A2980_74A750, 0x00000016, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A2CAC_74AA7C, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802A2694_74A464
.word 0x00000046, 0x00000001, D_802A2184_749F54, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A1FEC_749DBC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000001, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000001, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A19B0_749780, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001B, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000002, func_802694A4, 0x00000000, 0x00000043, 0x00000003, func_802A9120_421B10, 0x00000018, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x0001000C, 0x00000043, 0x00000003, func_80274A18, 0x00000018, 0x00000003, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x80040364, 0x00000001, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A15D8_7493A8, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000046, 0x00000001, D_802A2184_749F54, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A1FEC_749DBC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000001, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000001, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A19B0_749780, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001B, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000002, ShowActionHud, 0x00000000, 0x00000043, 0x00000003, action_command_jump_start, 0x00000018, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x0001000C, 0x00000043, 0x00000003, func_80274A18, 0x00000018, 0x00000003, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015A, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x80040364, 0x00000001, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A15D8_7493A8, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802A2980_74A750
.word 0x00000046, 0x00000001, D_802A2184_749F54, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A1FEC_749DBC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000002, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000002, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A19B0_749780, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001B, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000002, func_802694A4, 0x00000000, 0x00000043, 0x00000003, func_802A9120_421B10, 0x00000025, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000001, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x0001000A, 0x0001000B, 0x00000043, 0x00000003, func_802752AC, 0x00000014, 0x00000004, 0x00000008, 0x00000001, 0x00000007, 0x00000043, 0x00000003, func_802752AC, 0x00000003, 0x00000005, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x80040364, 0x00000002, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A15D8_7493A8, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000046, 0x00000001, D_802A2184_749F54, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A1FEC_749DBC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000002, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000002, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A19B0_749780, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001B, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000002, ShowActionHud, 0x00000000, 0x00000043, 0x00000003, action_command_jump_start, 0x00000025, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000001, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x0001000A, 0x0001000B, 0x00000043, 0x00000003, func_802752AC, 0x00000014, 0x00000004, 0x00000008, 0x00000001, 0x00000007, 0x00000043, 0x00000003, func_802752AC, 0x00000003, 0x00000005, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015B, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x80040364, 0x00000002, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A15D8_7493A8, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802A2CAC_74AA7C
.word 0x00000046, 0x00000001, D_802A2184_749F54, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A1FEC_749DBC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000003, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000003, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A19B0_749780, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001C, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000002, func_802694A4, 0x00000000, 0x00000043, 0x00000003, func_802A9120_421B10, 0x00000019, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000001, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010007, 0x0001000C, 0x00000043, 0x00000003, func_80275F00, 0x00000019, 0x00000004, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x80040364, 0x00000003, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A15D8_7493A8, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000
.word 0x00000046, 0x00000001, D_802A2184_749F54, 0x00000043, 0x00000007, PlayerTestEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000006, 0x00000046, 0x00000001, D_802A1FEC_749DBC, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000003, 0x00000050, 0x0000001C, 0x00000000, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x8004034B, 0x00000003, 0x00000030, 0x00000023, 0x00000000, 0x00000014, 0x00000001, 0xFE363C80, 0x0000001D, 0x00000001, 0x00000000, 0x0000001D, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A19B0_749780, 0x00000002, 0x00000000, 0x00000020, 0x00000000, 0x0000001D, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000003, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000043, 0x00000002, func_80269524, 0xFE363C8F, 0x00000058, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x0000001C, 0x00000008, 0x00000001, 0x00000005, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000023, 0x00000059, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000002, ShowActionHud, 0x00000000, 0x00000043, 0x00000003, action_command_jump_start, 0x00000019, 0x00000003, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000001, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010007, 0x0001000C, 0x00000043, 0x00000003, func_80275F00, 0x00000019, 0x00000004, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000043, 0x00000005, SetActorSounds, 0x00000000, 0x00000003, 0x0000015C, 0x00000000, 0x00000043, 0x00000007, PlayerDamageEnemy, 0xFE363C80, 0x00000080, 0x00000000, 0x80040364, 0x00000003, 0x000000E0, 0x00000043, 0x00000002, func_80269550, 0xFE363C8F, 0x00000046, 0x00000001, D_802A15D8_7493A8, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -30,10 +30,10 @@ dlabel D_802A1FEC_771F1C
.word 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0001000C, 0x00000043, 0x00000001, PlayerLandJump, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x0001000C, 0x00000008, 0x00000001, 0x00000002, 0x00000058, 0x00000000, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000005, 0xF24A7E80, 0x00000059, 0x00000000, 0x00000043, 0x00000003, PlaySoundAtActor, 0x00000000, 0x00000162, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010030, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010031, 0x00000008, 0x00000001, 0x00000014, 0x00000043, 0x00000003, SetBattleFlagBits, 0x00000100, 0x00000000, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000003, 0x00000043, 0x00000001, func_802693F0, 0x00000043, 0x00000002, EnablePlayerBlur, 0xFFFFFFFF, 0x00000043, 0x00000001, func_80276EFC, 0x00000043, 0x00000002, SetGoalToHome, 0x00000000, 0x00000043, 0x00000003, SetActorSpeed, 0x00000000, 0xF24A9A80, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010005, 0x00000043, 0x00000002, PlayerRunToGoal, 0x00000000, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00010002, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802A2184_7720B4
.word 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000046, 0x00000001, D_802A11AC_7710DC, 0x00000046, 0x00000001, D_802A1320_771250, 0x00000043, 0x00000003, func_802A9120_421B10, 0xFE363C8A, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000022, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00030000, 0x00000043, 0x00000003, func_80274A18, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000046, 0x00000001, D_802A11AC_7710DC, 0x00000043, 0x00000001, InitTargetIterator, 0x00000046, 0x00000001, D_802A1408_771338, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C8B, 0x0000000E, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, func_802A9120_421B10, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000025, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x0001000A, 0x0001000B, 0x00000043, 0x00000003, func_802752AC, 0xFE363C8A, 0x00000000, 0x00000008, 0x00000001, 0x00000007, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000003, 0x00000001, 0x0000001C, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000005, 0x00000001, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000046, 0x00000001, D_802A11AC_7710DC, 0x00000046, 0x00000001, D_802A14F0_771420, 0x00000043, 0x00000002, func_8026919C, D_802A10F0_771020, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000028, 0x00000002, 0xFE363C8B, 0x00000004, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, func_802A9120_421B10, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000026, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00080000, 0x00030000, 0x00000043, 0x00000003, func_80275F00, 0xFE363C8A, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x0000000D, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C89, 0x00000001, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00030000, 0x00000043, 0x00000005, SetActorRotation, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x00000008, 0x00000001, 0x00000002, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000003, func_802A9120_421B10, 0x0000000D, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000027, 0x00000043, 0x00000003, func_80275F00, 0x0000000F, 0x00000002, 0x00000004, 0x00000001, 0x0000000A, 0x00000012, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_CreateHudElements, 0x00000043, 0x00000003, func_802A9120_421B10, 0x00000002, 0x00000003, 0x00000043, 0x00000003, func_80275F00, 0x00000004, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000046, 0x00000001, D_802A11AC_7710DC, 0x00000046, 0x00000001, D_802A1320_771250, 0x00000043, 0x00000003, action_command_jump_start, 0xFE363C8A, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000022, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00010008, 0x00030000, 0x00000043, 0x00000003, func_80274A18, 0xFE363C8A, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000046, 0x00000001, D_802A11AC_7710DC, 0x00000043, 0x00000001, InitTargetIterator, 0x00000046, 0x00000001, D_802A1408_771338, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000027, 0x00000002, 0xFE363C8B, 0x0000000E, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, action_command_jump_start, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000025, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x0001000A, 0x0001000B, 0x00000043, 0x00000003, func_802752AC, 0xFE363C8A, 0x00000000, 0x00000008, 0x00000001, 0x00000007, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000019, 0x00000001, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000003, 0x00000001, 0x0000001C, 0x00000000, 0x00000043, 0x00000003, func_802752AC, 0x00000005, 0x00000001, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000046, 0x00000001, D_802A11AC_7710DC, 0x00000046, 0x00000001, D_802A14F0_771420, 0x00000043, 0x00000002, SetActionDifficultyTable, D_802A10F0_771020, 0x00000024, 0x00000002, 0xFE363C8B, 0xFE363C8A, 0x00000028, 0x00000002, 0xFE363C8B, 0x00000004, 0x00000027, 0x00000002, 0xFE363C8B, 0xFFFFFFFD, 0x00000043, 0x00000003, action_command_jump_start, 0xFE363C8B, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000026, 0x00000043, 0x00000002, SetGoalToTarget, 0x00000000, 0x00000043, 0x00000006, SetJumpAnimations, 0x00000000, 0x00000000, 0x00010007, 0x00080000, 0x00030000, 0x00000043, 0x00000003, func_80275F00, 0xFE363C8A, 0x00000000, 0x00000043, 0x00000001, CloseActionCommandInfo, 0x00000024, 0x00000002, 0xFE363C89, 0x00000000, 0x00000043, 0x00000002, DidActionSucceed, 0xFE363C80, 0x0000000D, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C89, 0x00000001, 0x00000043, 0x00000004, SetAnimation, 0x00000000, 0x00000000, 0x00030000, 0x00000043, 0x00000005, SetActorRotation, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x00000008, 0x00000001, 0x00000002, 0x00000043, 0x00000005, SetActorDispOffset, 0xFFFFFF81, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000003, action_command_jump_start, 0x0000000D, 0x00000003, 0x00000043, 0x00000002, UseBattleCamPreset, 0x00000027, 0x00000043, 0x00000003, func_80275F00, 0x0000000F, 0x00000002, 0x00000004, 0x00000001, 0x0000000A, 0x00000012, 0x00000000, 0x00000043, 0x00000002, LoadActionCommand, 0x00000001, 0x00000043, 0x00000001, action_command_jump_init, 0x00000043, 0x00000003, action_command_jump_start, 0x00000002, 0x00000003, 0x00000043, 0x00000003, func_80275F00, 0x00000004, 0x00000001, 0x00000004, 0x00000001, 0x0000000A, 0x00000013, 0x00000000, 0x00000003, 0x00000001, 0x0000000A, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel battle_move_mega_jump_main
.word 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000001, 0x00000043, 0x00000002, func_802694A4, 0x00000001, 0x00000043, 0x00000004, GetMenuSelection, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000014, 0x00000001, 0xFE363C81, 0x00000016, 0x00000001, 0x00000000, 0x00000046, 0x00000001, D_802A27FC_77272C, 0x00000016, 0x00000001, 0x00000001, 0x00000046, 0x00000001, D_802A2978_7728A8, 0x00000016, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A2AF4_772A24, 0x00000023, 0x00000000, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
.word 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000001, 0x00000043, 0x00000002, ShowActionHud, 0x00000001, 0x00000043, 0x00000004, GetMenuSelection, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000014, 0x00000001, 0xFE363C81, 0x00000016, 0x00000001, 0x00000000, 0x00000046, 0x00000001, D_802A27FC_77272C, 0x00000016, 0x00000001, 0x00000001, 0x00000046, 0x00000001, D_802A2978_7728A8, 0x00000016, 0x00000001, 0x00000002, 0x00000046, 0x00000001, D_802A2AF4_772A24, 0x00000023, 0x00000000, 0x00000043, 0x00000002, EnablePlayerBlur, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
dlabel D_802A26B4_7725E4
.word 0x00000043, 0x00000002, StartRumble, 0x0000000B, 0x00000056, 0x00000000, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000002, 0xF24A7E80, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000002, 0xF24A8680, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000002, 0xF24A9280, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000002, 0xF24A8E80, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000002, 0xF24A8A80, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000002, 0xF24A8680, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000002, 0xF24A8280, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000002, 0xF24A7E80, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000002, 0xF24A7C80, 0x00000043, 0x00000005, ShakeCam, 0x00000001, 0x00000000, 0x00000002, 0xF24A7B4D, 0x00000057, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More