mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 00:42:34 +01:00
Disassemble Star Power scripts (#584)
* fix diff_evt.py * document UW/UF based on @SeekyCt's advice * fix star_rod_idx_to_c.py * migrate battle/star/focus data * use N() where possible * rm data.s * update symbol_addrs * refresh * lullaby * star storm * chill out * fix float problems (sad) * smooch * time out * up and away * star beam * peach beam * peach focus * peach dash * rm old data * Assorted Decomp Across The Galaxy (#574) * popup_menu_update & other * a bunch of 190B20 * starting load_player_actor * load_player_actor * blorp * load_partner_actor * fx_11_main * fx_11 done * cleanup * fx_12 * 3 encounter_api funcs * encounter_api done * some 20ec0 funcs * clean * PR comments, warnings * name btl_actorHomePositions * PR comments * merge * Introduce SPRITE_PIXEL_SCALE (#580) * fix func_80273444 warns * make end of data explicit in splat.yaml * lol Co-authored-by: Ethan Roseman <ethteck@gmail.com> Co-authored-by: Alexander Faßbender <31699028+Brotenko@users.noreply.github.com>
This commit is contained in:
parent
70c2c679a4
commit
d22bd18f98
@ -4,10 +4,12 @@ import argparse
|
||||
import queue
|
||||
import time
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
from diff import Display, debounced_fs_watch
|
||||
from colorama import Fore, Back, Style
|
||||
|
||||
sys.path.append("tools")
|
||||
from tools.update_evts import parse_symbol_addrs
|
||||
from tools.disasm_script import ScriptDisassembler, get_constants
|
||||
|
||||
|
@ -286,8 +286,15 @@ ApiStatus func_80269550(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8026919C(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80280818(Evt* script, s32 isInitialCall); ///< YieldTurn copy
|
||||
ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8024E664(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8027D32C(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetActionCommandResult(Evt* script, s32 isInitialCall);
|
||||
ApiStatus CreateNpc(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802535B4(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80276EFC(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80273444(Evt *script, s32 isInitialCall);
|
||||
|
||||
extern EvtSource PlayerScriptDispatcher;
|
||||
extern EvtSource PeachScriptDispatcher;
|
||||
|
@ -274,6 +274,8 @@ ApiStatus SetVirtualEntityPosition(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetVirtualEntityScale(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetVirtualEntityRotation(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetVirtualEntityJumpGravity(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall);
|
||||
ApiStatus VirtualEntityJumpTo(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D2884(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D2C14(Evt* script, s32 isInitialCall);
|
||||
@ -302,6 +304,8 @@ ApiStatus SetNpcPaletteSwapMode(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetNpcPaletteSwapping(Evt* script, s32 isInitialCall);
|
||||
ApiStatus MakeTransformGroup(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus Spawn802D9D50(Evt* script, s32 isInitialCall);
|
||||
|
||||
extern EvtSource EnemyNpcHit;
|
||||
extern EvtSource EnemyNpcDefeat;
|
||||
|
||||
|
@ -83,8 +83,7 @@
|
||||
/// Used for almost all savefile state.
|
||||
#define GSW(INDEX) (((((INDEX)) - 170000000))
|
||||
|
||||
// TODO(docs): figure out what 'U' might stand for in UW and UF
|
||||
/// **Array** Word. A variable stored within the current thread's array.
|
||||
/// User Word. A variable stored within the current thread's array.
|
||||
/// You can load an array with EVT_USE_ARRAY or temporarily allocate one with EVT_MALLOC_ARRAY, then get/set values with
|
||||
/// the `UW(index)` macro.
|
||||
///
|
||||
@ -92,7 +91,7 @@
|
||||
/// Star Rod equivalent: `*Array[v]`.
|
||||
#define UW(INDEX) ((((INDEX)) - 190000000))
|
||||
|
||||
/// **Array** Flag. A boolean variable stored within the current thread's flag array.
|
||||
/// User Flag. A boolean variable stored within the current thread's flag array.
|
||||
/// The flag array is distinct from the word array (unlike EVT_USE_BUF and EVT_USE_FBUF).
|
||||
///
|
||||
/// Range: `0 <= v`
|
||||
|
@ -7,8 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_dried_shroom
|
||||
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A12FC_71CFDC)(Evt* script, s32 isInitialCall);
|
||||
|
||||
|
@ -7,9 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_electro_pop
|
||||
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_802A123C_7307DC)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A14F0_730A90)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A133C_7308DC)(Evt* script, s32 isInitialCall);
|
||||
|
@ -7,11 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_food
|
||||
|
||||
ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_802A123C_73330C)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A12EC_7333BC)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A15A0_733670)(Evt* script, s32 isInitialCall);
|
||||
|
@ -7,7 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_hustle_drink
|
||||
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A12C4_726224)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A123C_72619C)(Evt* script, s32 isInitialCall);
|
||||
|
||||
|
@ -7,11 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_life_shroom
|
||||
|
||||
ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_802A123C_72E76C)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A12EC_72E81C)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A1484_72E9B4)(Evt* script, s32 isInitialCall);
|
||||
|
@ -7,11 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_mushroom
|
||||
|
||||
ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_802A123C_715A8C)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A12EC_715B3C)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A15A0_715DF0)(Evt* script, s32 isInitialCall);
|
||||
|
@ -7,8 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_please_come_back
|
||||
|
||||
ApiStatus func_80273444(Evt* script, s32 isInitialCall);
|
||||
|
||||
EvtSource N(UseItemWithEffect);
|
||||
|
||||
#endif
|
||||
|
@ -7,7 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_pow_block
|
||||
|
||||
ApiStatus func_80273444(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80269EAC(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_802A1318_718B68)(Evt* script, s32 isInitialCall);
|
||||
|
@ -7,7 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_sleepy_sheep
|
||||
|
||||
ApiStatus func_80273444(Evt* script, s32 isInitialCall);
|
||||
ApiStatus SetVirtualEntityMoveSpeed(Evt* script, s32 isInitialCall);
|
||||
ApiStatus VirtualEntityMoveTo(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_80252B3C(Evt* script, s32 isInitialCall);
|
||||
|
@ -7,9 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_strange_cake
|
||||
|
||||
ApiStatus func_802D75D8(Evt *script, s32 isInitialCall);
|
||||
ApiStatus func_802D7520(Evt *script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_802A1A8C_731D8C)(Evt *script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A18D8_731BD8)(Evt *script, s32 isInitialCall);
|
||||
ApiStatus N(AddFP)(Evt *script, s32 isInitialCall);
|
||||
|
@ -7,11 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_super_soda
|
||||
|
||||
ApiStatus SetVirtualEntityFlags(Evt* script, s32 isInitialCall);
|
||||
ApiStatus GetVirtualEntityPosition(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_802A123C_724F1C)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A12EC_724FCC)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A1418_7250F8)(Evt* script, s32 isInitialCall);
|
||||
|
@ -7,9 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_tasty_tonic
|
||||
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall);
|
||||
|
||||
EvtSource N(UseItemWithEffect);
|
||||
|
@ -7,9 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_ultra_shroom
|
||||
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_802A123C_7239BC)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A12FC_723A7C)(Evt* script, s32 isInitialCall);
|
||||
|
||||
|
@ -7,9 +7,6 @@
|
||||
#undef NAMESPACE
|
||||
#define NAMESPACE battle_item_unknown_item
|
||||
|
||||
ApiStatus func_802D7520(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_802D75D8(Evt* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_802A123C_72447C)(Evt* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A12FC_72453C)(Evt* script, s32 isInitialCall);
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "common.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/battle_muskular.h"
|
||||
|
||||
#define NAMESPACE battle_star_chill_out
|
||||
|
||||
@ -49,4 +51,331 @@ ApiStatus func_802A163C_79070C(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus func_802A16F4_7907C4(Evt* script, s32 isInitialCall);
|
||||
INCLUDE_ASM(s32, "battle/star/chill_out/7900D0", func_802A16F4_7907C4);
|
||||
|
||||
EvtSource N(802A18F0) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1C88) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A2020) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A222C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A267C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_CALL(func_802A1518_7905E8)
|
||||
EVT_EXEC_WAIT(N(802A18F0))
|
||||
EVT_SET_CONST(LW(0), NPC_ANIM_battle_muskular_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(N(802A2020))
|
||||
EVT_CALL(SetNpcAnimation, 100, NPC_ANIM_battle_muskular_Palette_00_Anim_2)
|
||||
EVT_WAIT_FRAMES(16)
|
||||
EVT_CALL(UseBattleCamPreset, 3)
|
||||
EVT_CALL(PlaySound, 0x244)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(ItemCheckHit, LW(0), 0, 0, 0, 0)
|
||||
EVT_IF_EQ(LW(0), 6)
|
||||
EVT_GOTO(11)
|
||||
EVT_END_IF
|
||||
EVT_CALL(func_802A163C_79070C)
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(GetOwnerTarget, LW(10), LW(11))
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.1005859375), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.2001953125), EVT_FLOAT(0.9501953125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.30078125), EVT_FLOAT(0.900390625), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.3505859375), EVT_FLOAT(0.8505859375), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.380859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.400390625), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.30078125), EVT_FLOAT(0.8505859375), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.2001953125), EVT_FLOAT(0.900390625), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.1005859375), EVT_FLOAT(0.9501953125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorScaleModifier, LW(10), EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_END_THREAD
|
||||
EVT_END_IF
|
||||
EVT_LABEL(11)
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_LOOP(30)
|
||||
EVT_CALL(func_802A153C_79060C)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(ChooseNextTarget, -1, 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(ItemCheckHit, LW(0), 0, 0, 0, 0)
|
||||
EVT_IF_EQ(LW(0), 6)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(func_802A163C_79070C)
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(func_802A16F4_7907C4)
|
||||
EVT_ELSE
|
||||
EVT_CALL(PlayerDamageEnemy, LW(0), 0, 65535, 0, 0, 2080)
|
||||
EVT_END_IF
|
||||
EVT_LABEL(1)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(func_802A1528_7905F8)
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(ShowMessageBox, 44, 60)
|
||||
EVT_END_IF
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_EXEC_WAIT(N(802A222C))
|
||||
EVT_EXEC_WAIT(N(802A267C))
|
||||
EVT_CALL(func_802A1528_7905F8)
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_CALL(WaitForMessageBoxDone)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "script_api/battle.h"
|
||||
|
||||
#define NAMESPACE battle_star_focus
|
||||
|
||||
@ -46,3 +47,292 @@ ApiStatus func_802A15B0_78A410(Evt* script, s32 isInitialCall) {
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtSource N(802A1630) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A19C8) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1D60) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1F6C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A23BC) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_EXEC_WAIT(N(802A1630))
|
||||
EVT_CALL(func_802535B4, 1)
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(PlaySound, 0x2053)
|
||||
EVT_CALL(func_802A1518_78A378)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(ShowMessageBox, 26, 60)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(ShowMessageBox, 27, 60)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(ShowMessageBox, 28, 60)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(WaitForMessageBoxDone)
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(PlaySound, 0x2053)
|
||||
EVT_CALL(func_802A15B0_78A410)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(ShowMessageBox, 26, 60)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(ShowMessageBox, 27, 60)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(ShowMessageBox, 28, 60)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(WaitForMessageBoxDone)
|
||||
EVT_CALL(func_80280818)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "common.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/battle_mamar.h"
|
||||
|
||||
#define NAMESPACE battle_star_lullaby
|
||||
|
||||
@ -31,3 +33,274 @@ ApiStatus func_802A1518_78D668(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
EvtSource N(802A1620) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A19B8) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1D50) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1F5C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A23AC) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_EXEC_WAIT(N(802A1620))
|
||||
EVT_SET_CONST(LW(0), NPC_ANIM_battle_mamar_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(N(802A1D50))
|
||||
EVT_CALL(SetNpcAnimation, 100, NPC_ANIM_battle_mamar_Palette_00_Anim_2)
|
||||
EVT_WAIT_FRAMES(16)
|
||||
EVT_CALL(UseBattleCamPreset, 3)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(PlaySound, 0x3F4)
|
||||
EVT_CALL(func_802A1518_78D668)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(ItemCheckHit, LW(0), 0, 0, 0, 0)
|
||||
EVT_IF_EQ(LW(0), 6)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(ItemDamageEnemy, LW(0), 1879048192, 0x80001364, 0, 32)
|
||||
EVT_LABEL(1)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_EXEC_WAIT(N(802A1F5C))
|
||||
EVT_EXEC_WAIT(N(802A23AC))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,9 +1,11 @@
|
||||
#include "common.h"
|
||||
#include "script_api/battle.h"
|
||||
|
||||
#define NAMESPACE battle_star_peach_beam
|
||||
|
||||
#include "common/StarPower.inc.c"
|
||||
|
||||
ApiStatus func_802A1518_799CC8(Evt* script, s32 isInitialCall);
|
||||
INCLUDE_ASM(s32, "battle/star/peach_beam/7997B0", func_802A1518_799CC8);
|
||||
|
||||
ApiStatus func_802A2468_79AC18(Evt* script, s32 isInitialCall) {
|
||||
@ -28,3 +30,312 @@ ApiStatus func_802A247C_79AC2C(Evt* script, s32 isInitialCall) {
|
||||
}
|
||||
|
||||
// this file is identical in c code to star beam
|
||||
// TODO: consider .inc.c?
|
||||
|
||||
EvtSource N(802A24F0) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A2888) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A2C20) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A2E2C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A327C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A33A8) = {
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlayEffect, 0x38, 0, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 100, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlayEffect, 0x38, 0, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 100, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_IF_EQ(LW(10), 1)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlayEffect, 0x38, 0, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 100, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlayEffect, 0x52, 4, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(D_802A3514_7FCCC4)[] = {
|
||||
0x00000023, 0x00000000, 0x00000005, 0x0000000A, 0x0000000F, 0x00000014, 0x00000019, 0x0000001E,
|
||||
};
|
||||
|
||||
s32 N(D_802A3534_7FCCE4)[] = {
|
||||
0x00000023, 0x00000000, 0x00000005, 0x0000000A, 0x0000000F, 0x00000014, 0x00000019, 0x0000001E,
|
||||
};
|
||||
|
||||
s32 N(D_802A3554_7FCD04)[] = {
|
||||
0x42B20000, 0x43340000, 0x00000000, 0xC2100000, 0x43340000, 0x00000000, 0x434C0000, 0x43340000,
|
||||
0x00000000, 0x41F00000, 0x42C20000, 0x43EE8000, 0x43660000, 0x42A20000, 0x00000000, 0x43010000,
|
||||
0x43340000, 0x00000000, 0xC2700000, 0x43340000, 0x00000000, 0xC36A0000, 0x421C0000, 0x00000000,
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_EXEC_WAIT(N(802A2888))
|
||||
EVT_CALL(AddBattleCamZoom, 100)
|
||||
EVT_CALL(MoveBattleCamOver, 20)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_THREAD
|
||||
EVT_CALL(func_802A1518_799CC8, 1)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(func_802A2468_79AC18)
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(ItemDamageEnemy, LW(0), 1082130432, 0, 0, 32)
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(func_802A2468_79AC18)
|
||||
EVT_IF_EQ(LW(0), 2)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(func_802A247C_79AC2C)
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_EXEC_WAIT(N(802A327C))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "script_api/battle.h"
|
||||
|
||||
#define NAMESPACE battle_star_peach_dash
|
||||
|
||||
@ -23,3 +24,276 @@ ApiStatus func_802A1518_79DDB8(Evt* script, s32 isInitialCall) {
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtSource N(802A15B0) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1948) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1CE0) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1EEC) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A233C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0C0010)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0D000F)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0C000C)
|
||||
EVT_CALL(func_802A1518_79DDB8)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0A0003)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0A0001)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,10 +1,327 @@
|
||||
#include "common.h"
|
||||
#include "script_api/battle.h"
|
||||
|
||||
#define NAMESPACE battle_star_peach_focus
|
||||
|
||||
#include "common/StarPower.inc.c"
|
||||
|
||||
ApiStatus func_802A1518_79C4B8(Evt* script, s32 isInitialCall) {
|
||||
((s32*)script->varTable[0])[1]++; // TODO replace with actual struct when we know what this is
|
||||
// TODO: replace with actual struct when we know what it is
|
||||
// varTable[0] is Twink's actorVar[0]
|
||||
((s32*)script->varTable[0])[1]++;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtSource N(802A1530) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A18C8) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1C60) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1E6C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A22BC) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0A0003)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0C000D)
|
||||
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 30)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 60)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 90)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 120)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 150)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_PLAYER, 180)
|
||||
EVT_CALL(UseBattleCamPreset, 19)
|
||||
EVT_CALL(SetBattleCamTarget, -105, -7, 0)
|
||||
EVT_CALL(SetBattleCamZoom, 213)
|
||||
EVT_CALL(MoveBattleCamOver, 60)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0D000F)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_CALL(GetActorVar, 256, 0, LW(0))
|
||||
EVT_IF_EQ(LW(0), 0)
|
||||
EVT_CALL(ActorSpeak, 1245334, 0, 0, 851983, 851983)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0A0001)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(PlaySound, 0x2053)
|
||||
EVT_CALL(GetActorVar, ACTOR_PARTNER, 0, LW(0))
|
||||
EVT_ADD(LW(0), 1)
|
||||
EVT_CALL(SetActorVar, ACTOR_PARTNER, 0, LW(0))
|
||||
EVT_CALL(ModifyActorDecoration, 256, 1, 0, LW(0), 0, 0, 0)
|
||||
EVT_CALL(GetActorVar, ACTOR_PARTNER, 1, LW(0))
|
||||
EVT_CALL(func_802A1518_79C4B8)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 150)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 120)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 90)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 60)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 30)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorYaw, ACTOR_SELF, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0A0003)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x0A0002)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,10 +1,13 @@
|
||||
#include "common.h"
|
||||
#include "hud_element.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/battle_eldstar.h"
|
||||
|
||||
#define NAMESPACE battle_star_refresh
|
||||
|
||||
#include "common/StarPower.inc.c"
|
||||
|
||||
ApiStatus func_802A1518_78BB18(Evt* script, s32 isInitialCall);
|
||||
INCLUDE_ASM(s32, "battle/star/refresh/78B600", func_802A1518_78BB18);
|
||||
|
||||
ApiStatus func_802A17D4_78BDD4(Evt* script, s32 isInitialCall) {
|
||||
@ -53,3 +56,277 @@ ApiStatus func_802A19A8_78BFA8(Evt* script, s32 isInitialCall) {
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtSource N(802A1A70) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1E08) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A21A0) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A23AC) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A27FC) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_EXEC_WAIT(N(802A1A70))
|
||||
EVT_SET_CONST(LW(0), NPC_ANIM_battle_eldstar_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(N(802A21A0))
|
||||
EVT_CALL(SetNpcAnimation, 100, NPC_ANIM_battle_eldstar_Palette_00_Anim_2)
|
||||
EVT_WAIT_FRAMES(16)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySound, 0x242)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_CALL(func_802A1518_78BB18, 100)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 0)
|
||||
EVT_ADD(LW(1), 35)
|
||||
EVT_CALL(func_802A18E8_78BEE8, LW(0), LW(1), LW(2), 5)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 20)
|
||||
EVT_ADD(LW(1), 25)
|
||||
EVT_CALL(func_802A19A8_78BFA8, LW(0), LW(1), LW(2), 5)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 25)
|
||||
EVT_CALL(func_802D7520, LW(0), LW(1), LW(2), 5)
|
||||
EVT_CALL(N(AddHP), 5)
|
||||
EVT_CALL(N(AddFP), 5)
|
||||
EVT_CALL(func_802A17D4_78BDD4)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_EXEC_WAIT(N(802A27FC))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "common.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/battle_misstar.h"
|
||||
|
||||
#define NAMESPACE battle_star_smooch
|
||||
|
||||
@ -17,3 +19,390 @@ ApiStatus func_802A156C_7922FC(Evt* script, s32 isInitialCall) {
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtSource N(802A1630) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A19C8) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1D60) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1F6C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A23BC) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
s32 N(intTable_802A24E8)[] = {
|
||||
0x0000000F, 0x0000000F, 0xFFFFFFDF, 0x0000001B, 0xFFFFFFEA, 0xFFFFFFE6, 0x0000000A, 0xFFFFFFDD,
|
||||
0x00000023, 0x00000000,
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_EXEC_WAIT(N(802A1630))
|
||||
EVT_SET_CONST(LW(0), NPC_ANIM_battle_misstar_Palette_00_Anim_0)
|
||||
EVT_EXEC_WAIT(N(802A1D60))
|
||||
EVT_WAIT_FRAMES(16)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, 180, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, 150, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, 120, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, 90, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, 60, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, 30, 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 25)
|
||||
EVT_ADD(LW(0), 30)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 20, 0, 10)
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetNpcAnimation, 100, NPC_ANIM_battle_misstar_Palette_00_Anim_1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 15)
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_ADD(LW(2), -5)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 10, 0, 10)
|
||||
EVT_CALL(PlaySound, 0x245)
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlayEffect, 0x40, 2, LW(0), LW(1), LW(2), 1, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_USE_BUF(EVT_ADDR(N(intTable_802A24E8)))
|
||||
EVT_LOOP(5)
|
||||
EVT_BUF_READ2(LW(5), LW(6))
|
||||
EVT_SET(LW(3), LW(0))
|
||||
EVT_SET(LW(4), LW(1))
|
||||
EVT_ADD(LW(3), LW(5))
|
||||
EVT_ADD(LW(4), LW(6))
|
||||
EVT_CALL(PlayEffect, 0x40, 2, LW(3), LW(4), LW(2), 1, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(2)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_ADD(LW(0), 5)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 20)
|
||||
EVT_ADD(LW(0), 25)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 10, 0, 10)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002E)
|
||||
EVT_WAIT_FRAMES(12)
|
||||
EVT_THREAD
|
||||
EVT_EXEC_WAIT(N(802A1F6C))
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_LOOP(2)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2001953125), EVT_FLOAT(0.9501953125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.900390625), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3505859375), EVT_FLOAT(0.8505859375), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.380859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.400390625), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.8505859375), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2001953125), EVT_FLOAT(0.900390625), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(0.9501953125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.1005859375), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.2001953125), EVT_FLOAT(0.9501953125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.30078125), EVT_FLOAT(0.900390625), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.3505859375), EVT_FLOAT(0.8505859375), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.380859375), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.400390625), EVT_FLOAT(0.80078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.900390625), EVT_FLOAT(1.30078125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.900390625), EVT_FLOAT(1.2001953125), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(0.9501953125), EVT_FLOAT(1.1005859375), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FLOAT(1.0), EVT_FLOAT(1.0), EVT_FLOAT(1.0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_END_THREAD
|
||||
EVT_LOOP(10)
|
||||
EVT_WAIT_FRAMES(3)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 0)
|
||||
EVT_ADD(LW(1), 35)
|
||||
EVT_CALL(func_802A156C_7922FC, LW(0), LW(1), LW(2), 20)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 25)
|
||||
EVT_CALL(func_802D7520, LW(0), LW(1), LW(2), 20)
|
||||
EVT_CALL(N(AddHP), 20)
|
||||
EVT_THREAD
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, 0x160)
|
||||
EVT_CALL(SetActorJumpGravity, ACTOR_PLAYER, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(1.0))
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_MIDAIR_STILL, ANIM_MIDAIR, ANIM_10009)
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(func_80273444, 20, 0, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10009)
|
||||
EVT_WAIT_FRAMES(4)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,9 +1,11 @@
|
||||
#include "common.h"
|
||||
#include "script_api/battle.h"
|
||||
|
||||
#define NAMESPACE battle_star_star_beam
|
||||
|
||||
#include "common/StarPower.inc.c"
|
||||
|
||||
ApiStatus func_802A1518_7974D8(Evt* script, s32 isInitialCall);
|
||||
INCLUDE_ASM(s32, "battle/star/star_beam/796FC0", func_802A1518_7974D8);
|
||||
|
||||
ApiStatus func_802A2468_798428(Evt* script, s32 isInitialCall) {
|
||||
@ -26,3 +28,312 @@ ApiStatus func_802A247C_79843C(Evt* script, s32 isInitialCall) {
|
||||
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
EvtSource N(802A24F0) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A2888) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A2C20) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A2E2C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A327C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A33A8) = {
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlayEffect, 0x38, 0, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 100, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlayEffect, 0x38, 0, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 100, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_IF_EQ(LW(10), 1)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlayEffect, 0x38, 0, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 100, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlayEffect, 0x52, 4, LW(0), LW(1), LW(2), EVT_FLOAT(1.0), 30, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
// TODO: type this data used by func_802A1518_7974D8
|
||||
s32 D_802A3514_7994D4[] = {
|
||||
0x00000023, 0x00000000, 0x00000005, 0x0000000A, 0x0000000F, 0x00000014, 0x00000019, 0x0000001E,
|
||||
};
|
||||
|
||||
s32 D_802A3534_7994F4[] = {
|
||||
0x00000023, 0x00000000, 0x00000005, 0x0000000A, 0x0000000F, 0x00000014, 0x00000019, 0x0000001E,
|
||||
};
|
||||
|
||||
s32 D_802A3554_799514[] = {
|
||||
0x42B20000, 0x43340000, 0x00000000, 0xC2100000, 0x43340000, 0x00000000, 0x434C0000, 0x43340000,
|
||||
0x00000000, 0x41F00000, 0x42C20000, 0x43EE8000, 0x43660000, 0x42A20000, 0x00000000, 0x43010000,
|
||||
0x43340000, 0x00000000, 0xC2700000, 0x43340000, 0x00000000, 0xC36A0000, 0x421C0000, 0x00000000,
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_EXEC_WAIT(N(802A2888))
|
||||
EVT_CALL(AddBattleCamZoom, 100)
|
||||
EVT_CALL(MoveBattleCamOver, 20)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_THREAD
|
||||
EVT_CALL(func_802A1518_7974D8, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(func_802A2468_798428)
|
||||
EVT_IF_EQ(LW(0), 1)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(ItemDamageEnemy, LW(0), 1077936128, 0, 0, 32)
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_LOOP(0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_CALL(func_802A2468_798428)
|
||||
EVT_IF_EQ(LW(0), 2)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(func_802A247C_79843C)
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_EXEC_WAIT(N(802A327C))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,4 +1,6 @@
|
||||
#include "common.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/battle_skolar.h"
|
||||
|
||||
#define NAMESPACE battle_star_star_storm
|
||||
|
||||
@ -31,3 +33,305 @@ ApiStatus func_802A1628_78EDF8(Evt* script, s32 isInitialCall) {
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtSource N(802A16F0) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1A88) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1E20) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A202C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A247C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_EXEC_WAIT(N(802A16F0))
|
||||
EVT_SET_CONST(LW(0), NPC_ANIM_battle_skolar_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(N(802A1E20))
|
||||
EVT_CALL(SetNpcAnimation, 100, NPC_ANIM_battle_skolar_Palette_00_Anim_2)
|
||||
EVT_WAIT_FRAMES(16)
|
||||
EVT_CALL(UseBattleCamPreset, 3)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(10)
|
||||
EVT_CALL(PlaySound, SOUND_259)
|
||||
EVT_CALL(func_802A1518_78ECE8)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_ADD(LW(0), 1)
|
||||
EVT_CALL(PlaySound, SOUND_25A)
|
||||
EVT_CALL(func_802A1518_78ECE8)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_ADD(LW(0), 1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_WAIT_FRAMES(50)
|
||||
EVT_LOOP(10)
|
||||
EVT_CALL(PlaySound, SOUND_25C)
|
||||
EVT_ADD(LW(0), 1)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(PlaySound, SOUND_25D)
|
||||
EVT_ADD(LW(0), 1)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_LOOP(10)
|
||||
EVT_WAIT_FRAMES(7)
|
||||
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FLOAT(1.0))
|
||||
EVT_CALL(StartRumble, 8)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT_FRAMES(90)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(ItemCheckHit, LW(0), 0, 0, 0, 0)
|
||||
EVT_IF_EQ(LW(0), 6)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(GetGoalPos, ACTOR_SELF, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(func_802A1628_78EDF8, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(ItemDamageEnemy, LW(0), 939524352, 0, 7, 32)
|
||||
EVT_LABEL(1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_EXEC_WAIT(N(802A202C))
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_EXEC_WAIT(N(802A247C))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,5 +1,278 @@
|
||||
#include "common.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/battle_klevar.h"
|
||||
|
||||
#define NAMESPACE battle_star_time_out
|
||||
|
||||
#include "common/StarPower.inc.c"
|
||||
|
||||
EvtSource N(802A1520) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A18B8) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1C50) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1E5C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A22AC) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_EXEC_WAIT(N(802A1520))
|
||||
EVT_SET_CONST(LW(0), NPC_ANIM_battle_klevar_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(N(802A1C50))
|
||||
EVT_CALL(SetNpcAnimation, 100, NPC_ANIM_battle_klevar_Palette_00_Anim_2)
|
||||
EVT_WAIT_FRAMES(16)
|
||||
EVT_CALL(UseBattleCamPreset, 3)
|
||||
EVT_CALL(PlaySound, SOUND_246)
|
||||
EVT_CALL(PlayEffect, 0x62, 0, 0, 0, 0, EVT_FLOAT(1.0), 200, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_246)
|
||||
EVT_WAIT_FRAMES(200)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(ItemCheckHit, LW(0), 0, 0, 0, 0)
|
||||
EVT_IF_EQ(LW(0), 6)
|
||||
EVT_GOTO(1)
|
||||
EVT_END_IF
|
||||
EVT_CALL(ItemDamageEnemy, LW(0), 1879048192, 0x80200564, 0, 32)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_LABEL(1)
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_EXEC_WAIT(N(802A1E5C))
|
||||
EVT_EXEC_WAIT(N(802A22AC))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -1,5 +1,7 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
#include "script_api/battle.h"
|
||||
#include "sprite/npc/battle_kalmar.h"
|
||||
|
||||
#define NAMESPACE battle_star_up_and_away
|
||||
|
||||
@ -55,5 +57,351 @@ ApiStatus func_802A1628_795908(Evt* script, s32 isInitialCall) {
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
#else
|
||||
ApiStatus func_802A1628_795908(Evt* script, s32 isInitialCall);
|
||||
INCLUDE_ASM(s32, "battle/star/up_and_away/7952E0", func_802A1628_795908);
|
||||
#endif
|
||||
|
||||
EvtSource N(802A16D0) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(FadeBackgroundToBlack))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1A68) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PRAY)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, 0x01002A)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(N(UnkStarFunc), 0)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(0), 16)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetGoalPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0, FALSE)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(PlaySound, 0x241)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 15)
|
||||
EVT_CALL(N(UnkStarFunc1), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkBackgroundFunc2))
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(PlaySound, 0x2051)
|
||||
EVT_CALL(N(UnkStarFunc), 1)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(GetActorPos, ACTOR_PARTNER, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc2), LW(0), LW(1), LW(2))
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A1E00) = {
|
||||
EVT_WAIT_FRAMES(8)
|
||||
EVT_CALL(SetForegroundModelsVisible, 0)
|
||||
EVT_CALL(func_8024E664, 73)
|
||||
EVT_CALL(MoveBattleCamOver, 1)
|
||||
EVT_CALL(PlaySound, 0x2041)
|
||||
EVT_CALL(CreateNpc, 100, LW(0))
|
||||
EVT_CALL(N(SetNpcCollision32))
|
||||
EVT_CALL(SetNpcFlagBits, 100, ((NPC_FLAG_40000)), TRUE)
|
||||
EVT_CALL(SetNpcPos, 100, -75, 150, 0)
|
||||
EVT_CALL(SetNpcDecoration, 100, 0, 5)
|
||||
EVT_CALL(N(UnkStarFunc3), -75, 167, 0)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(8)
|
||||
EVT_ADD(LW(0), 67)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_THREAD
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(UseBattleCamPreset, 69)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetActorPos, ACTOR_PLAYER, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 50)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 30, 0, 10)
|
||||
EVT_CALL(SetForegroundModelsVisible, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A200C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2047)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_ELSE
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_CALL(PlaySound, 0x2045)
|
||||
EVT_THREAD
|
||||
EVT_LOOP(5)
|
||||
EVT_WAIT_FRAMES(6)
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_CALL(N(UnkStarFunc4), LW(0), LW(1), LW(2))
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(EnableNpcBlur, 100, 1)
|
||||
EVT_THREAD
|
||||
EVT_SET(LW(2), 0)
|
||||
EVT_SET(LW(3), 720)
|
||||
EVT_CALL(MakeLerp, LW(2), LW(3), 30, 2)
|
||||
EVT_LOOP(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(SetNpcRotation, 100, 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_IF_EQ(LW(1), 0)
|
||||
EVT_BREAK_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(GetNpcPos, 100, LW(0), LW(1), LW(2))
|
||||
EVT_ADD(LW(1), 60)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_ADD(LW(1), 140)
|
||||
EVT_CALL(NpcFlyTo, 100, LW(0), LW(1), LW(2), 15, 0, 10)
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(EnableNpcBlur, 100, 0)
|
||||
EVT_CALL(DeleteNpc, 100)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(802A245C) = {
|
||||
EVT_CALL(GetOwnerID, LW(10))
|
||||
EVT_IF_EQ(LW(10), 0)
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PLAYER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PLAYER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_RUNNING)
|
||||
EVT_CALL(PlayerRunToGoal, 0)
|
||||
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
|
||||
EVT_ELSE
|
||||
EVT_CALL(N(UnkBackgroundFunc))
|
||||
EVT_WAIT_FRAMES(15)
|
||||
EVT_CALL(SetGoalToHome, ACTOR_PARTNER)
|
||||
EVT_CALL(SetActorSpeed, ACTOR_PARTNER, EVT_FLOAT(8.0))
|
||||
EVT_CALL(N(UnkStarFunc), 3)
|
||||
EVT_CALL(RunToGoal, ACTOR_PARTNER, 0)
|
||||
EVT_CALL(N(UnkStarFunc), 4)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtSource N(usePower) = {
|
||||
EVT_EXEC_WAIT(N(802A16D0))
|
||||
EVT_SET_CONST(LW(0), NPC_ANIM_battle_kalmar_Palette_00_Anim_1)
|
||||
EVT_EXEC_WAIT(N(802A1E00))
|
||||
EVT_CALL(SetNpcAnimation, 100, NPC_ANIM_battle_kalmar_Palette_00_Anim_2)
|
||||
EVT_CALL(UseBattleCamPreset, 2)
|
||||
EVT_WAIT_FRAMES(20)
|
||||
EVT_CALL(Spawn802D9D50, 0, 0, 0, 320, 240, 128, 10)
|
||||
EVT_CALL(func_802A1518_7957F8)
|
||||
EVT_CALL(PlaySound, 0x247)
|
||||
EVT_CALL(PlayEffect, 0x39, 0, 0, 20, 0, EVT_FLOAT(1.0), 90, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(30)
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlayEffect, 0x3A, 0, 0, 50, 0, 300, 100, 10, 40, 0, 0, 0, 0, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlayEffect, 0x39, 0, 0, 20, 0, EVT_FLOAT(1.0), 90, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_WAIT_FRAMES(75)
|
||||
EVT_CALL(Spawn802D9D50, 0, 0, 0, 320, 240, 0, 10)
|
||||
EVT_CALL(InitTargetIterator)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(SetGoalToTarget, ACTOR_SELF)
|
||||
EVT_CALL(func_802A1628_795908)
|
||||
EVT_SET(LF(0), 0)
|
||||
EVT_CALL(ItemCheckHit, LW(1), 0, 0, 0, 0)
|
||||
EVT_IF_EQ(LW(1), 6)
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_SET(LF(0), 1)
|
||||
EVT_END_IF
|
||||
EVT_SWITCH(LW(0))
|
||||
EVT_CASE_GT(0)
|
||||
EVT_CALL(GetOwnerTarget, LW(0), LW(1))
|
||||
EVT_CALL(DispatchEvent, LW(0), 61)
|
||||
EVT_CALL(SetActorRotationOffset, LW(0), 0, 10, 0)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetOwnerTarget, LW(11), LW(1))
|
||||
EVT_WAIT_FRAMES(10)
|
||||
EVT_CALL(CreateVirtualEntity, LW(10), 0x80283EE8)
|
||||
EVT_CALL(GetActorPos, LW(11), LW(0), LW(1), LW(2))
|
||||
EVT_SET(LW(13), LW(0))
|
||||
EVT_SET(LW(14), LW(1))
|
||||
EVT_SET(LW(15), LW(2))
|
||||
EVT_CALL(SetVirtualEntityPosition, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_SETF(LW(0), EVT_FLOAT(0.2001953125))
|
||||
EVT_CALL(SetVirtualEntityScale, LW(10), LW(0), LW(0), LW(0))
|
||||
EVT_LOOP(4)
|
||||
EVT_ADDF(LW(0), EVT_FLOAT(0.2001953125))
|
||||
EVT_CALL(SetVirtualEntityScale, LW(10), LW(0), LW(0), LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_SET(LW(0), 0)
|
||||
EVT_LOOP(5)
|
||||
EVT_ADD(LW(0), 72)
|
||||
EVT_CALL(SetVirtualEntityRotation, LW(10), 0, LW(0), 0)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(PlaySound, 0x2052)
|
||||
EVT_SET(LW(0), LW(13))
|
||||
EVT_SET(LW(1), LW(14))
|
||||
EVT_SET(LW(2), LW(15))
|
||||
EVT_SET(LW(3), 0)
|
||||
EVT_LOOP(50)
|
||||
EVT_CALL(SetVirtualEntityPosition, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_CALL(SetVirtualEntityRotation, LW(10), 0, LW(3), 0)
|
||||
EVT_ADD(LW(1), 6)
|
||||
EVT_ADD(LW(3), 45)
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlaySound, 0x2071)
|
||||
EVT_CALL(GetOwnerTarget, LW(10), LW(1))
|
||||
EVT_CALL(SetActorFlagBits, LW(10), 4, 1)
|
||||
EVT_SETF(LW(0), EVT_FLOAT(1.0))
|
||||
EVT_LOOP(18)
|
||||
EVT_SUBF(LW(0), EVT_FLOAT(0.05078125))
|
||||
EVT_CALL(SetActorScale, LW(10), LW(0), LW(0), LW(0))
|
||||
EVT_WAIT_FRAMES(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetActorPos, LW(10), 0, -1000, 0)
|
||||
EVT_CALL(GetActorPos, LW(10), LW(0), LW(1), LW(2))
|
||||
EVT_LOOP(10)
|
||||
EVT_CALL(PlayEffect, 0x11, 1, LW(0), LW(1), LW(2), 20, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_ADD(LW(1), 30)
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(SetBattleFlagBits, 16777216, 1)
|
||||
EVT_CALL(RemoveActor, LW(10))
|
||||
EVT_END_THREAD
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_IF_EQ(LF(0), 0)
|
||||
EVT_CALL(PlayerDamageEnemy, LW(0), 0, 65535, 0, 0, 2080)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_WAIT_FRAMES(5)
|
||||
EVT_CALL(ChooseNextTarget, 0, LW(0))
|
||||
EVT_IF_NE(LW(0), -1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_WAIT_FRAMES(70)
|
||||
EVT_CALL(func_802A15B4_795894)
|
||||
EVT_EXEC_WAIT(N(802A200C))
|
||||
EVT_CALL(func_80276EFC)
|
||||
EVT_EXEC_WAIT(N(802A245C))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
@ -49,3 +49,5 @@ ApiStatus N(UnkStarFunc4)(Evt* script, s32 isInitialCall) {
|
||||
#include "common/UnkStarFunc.inc.c"
|
||||
|
||||
#include "common/SetNpcCollision32.inc.c"
|
||||
|
||||
// possibly 2 scripts here
|
||||
|
@ -55,6 +55,7 @@ def script_lib(offset):
|
||||
_script_lib[vaddr] = []
|
||||
_script_lib[vaddr].append([int(raddr, 16), name])
|
||||
|
||||
"""
|
||||
# Sort the symbols for each vram address by the difference
|
||||
# between their rom address and the offset passed in.
|
||||
# If offset - rom address goes below 0, it's part of the
|
||||
@ -66,17 +67,48 @@ def script_lib(offset):
|
||||
entry[0] = 0xFFFFFFFF if diff < 0 else diff
|
||||
_script_lib[k][i][0] = entry[0]
|
||||
_script_lib[k] = sorted(_script_lib[k], key=lambda x: x[0])
|
||||
"""
|
||||
return _script_lib
|
||||
|
||||
|
||||
def extend_symbol_map(a, b):
|
||||
for k in b:
|
||||
if k not in a:
|
||||
a[k] = b[k]
|
||||
else:
|
||||
a[k] += b[k]
|
||||
|
||||
return a
|
||||
|
||||
def round_fixed(f: float) -> float:
|
||||
"""
|
||||
g = f * 100.0
|
||||
whole = round(g)
|
||||
if abs(g - whole) <= 100.0/1024.0:
|
||||
f = whole / 100.0
|
||||
"""
|
||||
return f
|
||||
|
||||
|
||||
def find_symbol_in_overlay(symbol_map, overlay_rom_addr, symbol_ram_addr):
|
||||
if not symbol_ram_addr in symbol_map:
|
||||
return None
|
||||
|
||||
lowest_delta = None
|
||||
lowest_symbol_name = None
|
||||
|
||||
for rom_addr, symbol_name in symbol_map[symbol_ram_addr]:
|
||||
delta = rom_addr - overlay_rom_addr
|
||||
|
||||
if delta >= 0 and (lowest_delta is None or delta <= lowest_delta):
|
||||
lowest_delta = delta
|
||||
lowest_symbol_name = symbol_name
|
||||
|
||||
if lowest_symbol_name:
|
||||
return lowest_symbol_name
|
||||
|
||||
return symbol_map[symbol_ram_addr][0][1]
|
||||
|
||||
# Grab CONSTANTS from the include/ folder to save manual work
|
||||
CONSTANTS = {}
|
||||
SAVE_VARS = set()
|
||||
@ -210,7 +242,11 @@ def fix_args(self, func, args, info):
|
||||
if "_" in arg:
|
||||
new_args.append(f"{arg}")
|
||||
continue
|
||||
argNum = int(arg, 0)
|
||||
try:
|
||||
argNum = int(arg, 0)
|
||||
except ValueError:
|
||||
new_args.append(f"{arg}")
|
||||
continue
|
||||
|
||||
if info[i] == "Bool":
|
||||
new_args.append(f"{'TRUE' if argNum == True else 'FALSE'}")
|
||||
@ -225,20 +261,23 @@ def fix_args(self, func, args, info):
|
||||
# new_args.append(f"0x{argNum:X}")
|
||||
# continue
|
||||
|
||||
if func == "SetAnimation" and int(new_args[1], 10) == 0:
|
||||
call = f"{CONSTANTS['PlayerAnims'][argNum]}"
|
||||
elif "EVT_" not in args[0] and int(args[0]) >= 0 and CONSTANTS["MAP_NPCS"].get(int(args[0])) == "NPC_PLAYER":
|
||||
if sprite == 0:
|
||||
print(f"Func {func} arg {i} ({CONSTANTS['MAP_NPCS'][int(args[0])]}) -- sprite was 0, is this really valid? Arg 0x{argNum:X} -- sprite: {sprite}, palette: {palette}, anim: {anim}")
|
||||
call = f"0x{argNum:X}"
|
||||
else:
|
||||
try:
|
||||
if func == "SetAnimation" and int(new_args[1], 10) == 0:
|
||||
call = f"{CONSTANTS['PlayerAnims'][argNum]}"
|
||||
else:
|
||||
if sprite == 0:
|
||||
print(f"Func {func} arg {i} -- sprite was 0, is this really valid? Arg 0x{argNum:X} -- sprite: {sprite}, palette: {palette}, anim: {anim}")
|
||||
call = f"0x{argNum:X}"
|
||||
elif "EVT_" not in args[0] and int(args[0]) >= 0 and CONSTANTS["MAP_NPCS"].get(int(args[0])) == "NPC_PLAYER":
|
||||
if sprite == 0:
|
||||
print(f"Func {func} arg {i} ({CONSTANTS['MAP_NPCS'][int(args[0])]}) -- sprite was 0, is this really valid? Arg 0x{argNum:X} -- sprite: {sprite}, palette: {palette}, anim: {anim}")
|
||||
call = f"0x{argNum:X}"
|
||||
else:
|
||||
call = f"{CONSTANTS['PlayerAnims'][argNum]}"
|
||||
else:
|
||||
call = make_anim_macro(self, sprite, palette, anim)
|
||||
if sprite == 0:
|
||||
print(f"Func {func} arg {i} -- sprite was 0, is this really valid? Arg 0x{argNum:X} -- sprite: {sprite}, palette: {palette}, anim: {anim}")
|
||||
call = f"0x{argNum:X}"
|
||||
else:
|
||||
call = make_anim_macro(self, sprite, palette, anim)
|
||||
except KeyError:
|
||||
call = f"0x{argNum:06X}"
|
||||
new_args.append(call)
|
||||
elif info[i] == "CustomMsg":
|
||||
type_ = (argNum & 0xFF0000) >> 16
|
||||
@ -437,13 +476,14 @@ def replace_constants(self, func, args):
|
||||
|
||||
|
||||
class ScriptDisassembler:
|
||||
def __init__(self, bytes, script_name = "script", symbol_map = {}, romstart = 0, INCLUDES_NEEDED = {"forward": [], "sprites": set(), "npcs": []}, INCLUDED = {"functions": set(), "includes": set()}, prelude = True):
|
||||
def __init__(self, bytes, script_name = "script", symbol_map = {}, romstart = 0, INCLUDES_NEEDED = {"forward": [], "sprites": set(), "npcs": []}, INCLUDED = {"functions": set(), "includes": set()}, prelude = True, transform_symbol_name=None):
|
||||
self.bytes = bytes
|
||||
self.script_name = script_name
|
||||
self.prelude = prelude
|
||||
|
||||
self.symbol_map = { **script_lib(self.bytes.tell()), **symbol_map }
|
||||
self.symbol_map = extend_symbol_map(symbol_map, script_lib(self.bytes.tell()))
|
||||
self.romstart = romstart
|
||||
self.transform_symbol_name = transform_symbol_name
|
||||
self.INCLUDES_NEEDED = INCLUDES_NEEDED
|
||||
self.INCLUDED = INCLUDED
|
||||
|
||||
@ -467,7 +507,7 @@ class ScriptDisassembler:
|
||||
#print(f"Op {opcode:X}, argc {argc}")
|
||||
|
||||
if opcode > 0xFF or argc > 0xFF:
|
||||
raise Exception(f"script '{self.script_name}' is malformed")
|
||||
raise Exception(f"script '{self.script_name}' is malformed (opcode {opcode:X}, argc {argc:X})")
|
||||
|
||||
argv = []
|
||||
for i in range(0, argc):
|
||||
@ -501,21 +541,21 @@ class ScriptDisassembler:
|
||||
def var(self, arg, prefer_hex = False, use_evt_ptr = True):
|
||||
if arg in self.symbol_map:
|
||||
s = self.symbol_map[arg][0][1]
|
||||
return f"EVT_PTR({s})" if use_evt_ptr else s
|
||||
return f"EVT_ADDR({s})" if use_evt_ptr else s
|
||||
|
||||
v = arg - 2**32 # convert to s32
|
||||
if v > -250000000:
|
||||
if v <= -220000000: return f"EVT_FIXED({round_fixed((v + 230000000) / 1024)})"
|
||||
elif v <= -200000000: return f"EVT_ARRAY_FLAG({v + 210000000})"
|
||||
elif v <= -180000000: return f"EVT_ARRAY({v + 190000000})"
|
||||
elif v <= -160000000: return f"EVT_SAVE_VAR({v + 170000000})"
|
||||
elif v <= -140000000: return f"EVT_AREA_VAR({v + 150000000})"
|
||||
elif v <= -120000000: return f"EVT_SAVE_FLAG({v + 130000000})"
|
||||
elif v <= -100000000: return f"EVT_AREA_FLAG({v + 110000000})"
|
||||
elif v <= -80000000: return f"EVT_MAP_FLAG({v + 90000000})"
|
||||
elif v <= -60000000: return f"EVT_FLAG({v + 70000000})"
|
||||
elif v <= -40000000: return f"EVT_MAP_VAR({v + 50000000})"
|
||||
elif v <= -20000000: return f"EVT_VAR({v + 30000000})"
|
||||
if v <= -220000000: return f"EVT_FLOAT({round_fixed((v + 230000000) / 1024)})"
|
||||
elif v <= -200000000: return f"UF({v + 210000000})"
|
||||
elif v <= -180000000: return f"UW({v + 190000000})"
|
||||
elif v <= -160000000: return f"GSW({v + 170000000})"
|
||||
elif v <= -140000000: return f"LSW({v + 150000000})"
|
||||
elif v <= -120000000: return f"GSWF({v + 130000000})"
|
||||
elif v <= -100000000: return f"LSWF({v + 110000000})"
|
||||
elif v <= -80000000: return f"GF({v + 90000000})"
|
||||
elif v <= -60000000: return f"LF({v + 70000000})"
|
||||
elif v <= -40000000: return f"GW({v + 50000000})"
|
||||
elif v <= -20000000: return f"LW({v + 30000000})"
|
||||
|
||||
if arg == 0xFFFFFFFF:
|
||||
return "-1"
|
||||
@ -537,7 +577,9 @@ class ScriptDisassembler:
|
||||
if type(addr) is str:
|
||||
return addr
|
||||
if addr > 0x80000000 and addr in self.symbol_map:
|
||||
name = self.symbol_map[addr][0][1]
|
||||
name = find_symbol_in_overlay(self.symbol_map, self.romstart, addr)
|
||||
if self.transform_symbol_name:
|
||||
name = self.transform_symbol_name(name)
|
||||
toReplace = True
|
||||
suffix = ""
|
||||
if False and name.startswith("N(func_"):
|
||||
|
@ -9,7 +9,7 @@ script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
syms = {}
|
||||
|
||||
for version in ["us", "jp"]:
|
||||
file_path = os.path.join(script_dir, f"ver/{version}/symbol_addrs.txt")
|
||||
file_path = os.path.join(script_dir, f"../ver/{version}/symbol_addrs.txt")
|
||||
|
||||
with open(file_path) as f:
|
||||
symbol_lines = f.readlines()
|
||||
|
@ -117,7 +117,7 @@ def read_ptr(addr: int, symbol_map: dict, needs_ampersand: bool = False) -> str:
|
||||
else:
|
||||
return f"(void*) 0x{addr:08X}"
|
||||
|
||||
def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0, namespace=None):
|
||||
global INCLUDES_NEEDED, INCLUDED
|
||||
out = ""
|
||||
|
||||
@ -128,6 +128,11 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
afterHeader = False
|
||||
treePrint = False
|
||||
|
||||
def transform_symbol_name(symbol):
|
||||
if namespace and symbol.startswith(namespace + "_"):
|
||||
return "N(" + symbol[len(namespace)+1:] + ")"
|
||||
return symbol
|
||||
|
||||
while len(midx) > 0:
|
||||
struct = midx.pop(0)
|
||||
|
||||
@ -143,7 +148,7 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
out += f"// rodata: {struct['name']}\n"
|
||||
|
||||
# format struct
|
||||
if struct["type"].startswith("EvtSource"):
|
||||
if struct["type"].startswith("Script"):
|
||||
if struct["type"] == "Script_Main":
|
||||
name = "N(main)"
|
||||
INCLUDES_NEEDED["forward"].append(f"EvtSource " + name + ";")
|
||||
@ -154,16 +159,10 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
# INCLUDES_NEEDED["forward"].append(f"EvtSource " + name + ";")
|
||||
# afterHeader = False
|
||||
|
||||
pos = bytes.tell()
|
||||
try_replace = False
|
||||
try:
|
||||
script_text = disasm_script.ScriptDSLDisassembler(bytes, name, symbol_map, romstart, INCLUDES_NEEDED, INCLUDED).disassemble()
|
||||
try_replace = True
|
||||
except disasm_script.UnsupportedScript as e:
|
||||
script_text = f"// Unable to use DSL: {e}\n"
|
||||
|
||||
bytes.seek(pos)
|
||||
script_text += disasm_script.ScriptDisassembler(bytes, name, symbol_map, romstart, INCLUDES_NEEDED, INCLUDED).disassemble()
|
||||
script_text = disasm_script.ScriptDisassembler(
|
||||
bytes, name, symbol_map, romstart, INCLUDES_NEEDED, INCLUDED,
|
||||
transform_symbol_name=transform_symbol_name,
|
||||
).disassemble()
|
||||
|
||||
if "shakeTree" in name or "searchBush" in name:
|
||||
symbol_map[struct["vaddr"]][0][1] = name.split("_",1)[0] + ")"
|
||||
@ -174,7 +173,7 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
treePrint = True
|
||||
continue
|
||||
|
||||
if try_replace and "exitWalk" in name:
|
||||
if "exitWalk" in name:
|
||||
script_text = script_text.splitlines()
|
||||
walkDistance = exitIdx = map_ = entryIdx = ""
|
||||
if "UseExitHeading" in script_text[2]:
|
||||
@ -955,7 +954,7 @@ def parse_midx(file, prefix="", vram=0x80240000):
|
||||
|
||||
for line in file.readlines():
|
||||
s = line.split("#")
|
||||
if len(s) == 5:
|
||||
if len(s) == 5 or len(s) == 6:
|
||||
if s[0] == "$Start": continue
|
||||
if s[0] == "$End": continue
|
||||
|
||||
@ -991,6 +990,8 @@ def parse_midx(file, prefix="", vram=0x80240000):
|
||||
"length": end - start,
|
||||
"end": end,
|
||||
})
|
||||
else:
|
||||
raise Exception(str(s))
|
||||
|
||||
structs.sort(key=lambda s: s["start"])
|
||||
return structs
|
||||
@ -1026,6 +1027,7 @@ def name_struct(s):
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Converts split data to C using a Star Rod idx file")
|
||||
parser.add_argument("idxfile", help="Input .*idx file from Star Rod dump")
|
||||
parser.add_argument("namespace", nargs='?', help="Value of NAMESPACE macro")
|
||||
parser.add_argument("--comments", action="store_true", help="Write offset/vaddr comments")
|
||||
|
||||
args = parser.parse_args()
|
||||
@ -1041,12 +1043,29 @@ if __name__ == "__main__":
|
||||
|
||||
if "partner" in base:
|
||||
segment_name = f"battle/partners/{battle_area}"
|
||||
elif "/starpower/src/" in args.idxfile:
|
||||
segment_name = (
|
||||
f"battle/star/{battle_area}"
|
||||
.replace("starstorm", "star_storm")
|
||||
.replace("chillout", "chill_out")
|
||||
.replace("timeout", "time_out")
|
||||
.replace("upandaway", "up_and_away")
|
||||
.replace("starbeam", "star_beam")
|
||||
.replace("peachbeam", "peach_beam")
|
||||
.replace("peachfocus", "peach_focus")
|
||||
.replace("peachdash", "peach_dash")
|
||||
)
|
||||
else:
|
||||
segment_name = f"battle_partner_{battle_area}"
|
||||
|
||||
is_battle = True
|
||||
|
||||
symbol_map = {}
|
||||
def add_to_symbol_map(addr, pair):
|
||||
if addr in symbol_map:
|
||||
symbol_map[addr].append(pair)
|
||||
else:
|
||||
symbol_map[addr] = [pair]
|
||||
|
||||
disasm_script.get_constants()
|
||||
|
||||
@ -1116,16 +1135,16 @@ if __name__ == "__main__":
|
||||
string_data = string_data[:-1]
|
||||
|
||||
string_literal = json.dumps(string_data)
|
||||
symbol_map[struct["vaddr"]] = [[struct["vaddr"], string_literal]]
|
||||
add_to_symbol_map(struct["vaddr"], [struct["vaddr"], string_literal])
|
||||
elif struct["type"] == "SJIS":
|
||||
string_data = sjis.decode(romfile.read(struct["length"]))
|
||||
|
||||
string_literal = '"' + string_data + '"'
|
||||
symbol_map[struct["vaddr"]] = [[struct["vaddr"], string_literal]]
|
||||
add_to_symbol_map(struct["vaddr"], [struct["vaddr"], string_literal])
|
||||
elif struct["type"] == "ConstDouble":
|
||||
double = unpack_from(">d", romfile.read(struct["length"]), 0)[0]
|
||||
double_literal = f"{double}"
|
||||
symbol_map[struct["vaddr"]] = [[struct["vaddr"], double_literal]]
|
||||
add_to_symbol_map(struct["vaddr"], [struct["vaddr"], double_literal])
|
||||
elif struct["type"] == "NpcGroup":
|
||||
for z in range(struct["length"]//0x1F0):
|
||||
npc = romfile.read(0x1F0)
|
||||
@ -1137,9 +1156,9 @@ if __name__ == "__main__":
|
||||
sprite = disasm_script.CONSTANTS["NPC_SPRITE"][sprite_id]["name"].upper()
|
||||
if npc_id not in total_npc_counts:
|
||||
total_npc_counts[npc_id] = sprite
|
||||
symbol_map[struct["vaddr"]] = [[struct["vaddr"], struct["name"]]]
|
||||
add_to_symbol_map(struct["vaddr"], [struct["vaddr"], struct["name"]])
|
||||
else:
|
||||
symbol_map[struct["vaddr"]] = [[struct["vaddr"], struct["name"]]]
|
||||
add_to_symbol_map(struct["vaddr"], [struct["vaddr"], struct["name"]])
|
||||
|
||||
# fix NPC names
|
||||
curr_counts = {}
|
||||
@ -1159,7 +1178,7 @@ if __name__ == "__main__":
|
||||
|
||||
romfile.seek(rom_offset, 0)
|
||||
|
||||
disasm = disassemble(romfile, midx, symbol_map, args.comments, rom_offset)
|
||||
disasm = disassemble(romfile, midx, symbol_map, args.comments, rom_offset, namespace=args.namespace)
|
||||
|
||||
print("========== Includes needed: ===========\n")
|
||||
if is_battle:
|
||||
@ -1169,7 +1188,7 @@ if __name__ == "__main__":
|
||||
print(f"#include \"message_ids.h\"")
|
||||
if INCLUDES_NEEDED["sprites"]:
|
||||
for npc in sorted(INCLUDES_NEEDED["sprites"]):
|
||||
print(f"#include \"sprite/npc/{npc}.h\"")
|
||||
print(f"#include \"sprite/npc/{npc}\"")
|
||||
print()
|
||||
|
||||
if INCLUDES_NEEDED["forward"]:
|
||||
|
@ -113,7 +113,7 @@ def read_symbol_addrs():
|
||||
|
||||
def read_elf():
|
||||
try:
|
||||
result = subprocess.run(['objdump', '-x', elf_path], stdout=subprocess.PIPE)
|
||||
result = subprocess.run(['mips-linux-gnu-objdump', '-x', elf_path], stdout=subprocess.PIPE)
|
||||
objdump_lines = result.stdout.decode().split("\n")
|
||||
except:
|
||||
print(f"Error: Could not run objdump on {elf_path} - make sure that the project is built")
|
||||
@ -131,6 +131,7 @@ def read_elf():
|
||||
name in ignores or \
|
||||
name.startswith("_") or \
|
||||
name.startswith("jtbl_") or \
|
||||
name.endswith(".o") or \
|
||||
re.match(r"L[0-9A-F]{8}", name):
|
||||
continue
|
||||
|
||||
|
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
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 it is too large
Load Diff
@ -1,6 +1,11 @@
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
|
||||
.section .rodata
|
||||
dlabel jtbl_802A3790_799750
|
||||
.word .L802A18B0_797870, .L802A1A00_7979C0, .L802A1A88_797A48, .L802A1AB8_797A78, .L802A1B54_797B14, .L802A1E34_797DF4, .L802A1F0C_797ECC, .L802A1FC8_797F88, .L802A1FE8_797FA8, .L802A2040_798000, .L802A2080_798040, .L802A241C_7983DC, .L802A241C_7983DC, .L802A241C_7983DC, .L802A241C_7983DC, .L802A241C_7983DC, .L802A241C_7983DC, .L802A241C_7983DC, .L802A241C_7983DC, .L802A241C_7983DC, .L802A219C_79815C, .L802A21F8_7981B8, 0, 0
|
||||
|
||||
.section .text
|
||||
glabel func_802A1518_7974D8
|
||||
/* 7974D8 802A1518 27BDFF68 */ addiu $sp, $sp, -0x98
|
||||
/* 7974DC 802A151C AFB50054 */ sw $s5, 0x54($sp)
|
||||
@ -250,14 +255,14 @@ glabel func_802A1518_7974D8
|
||||
.L802A1890:
|
||||
/* 797850 802A1890 2C620016 */ sltiu $v0, $v1, 0x16
|
||||
.L802A1894:
|
||||
/* 797854 802A1894 104002E1 */ beqz $v0, L802A241C_7983DC
|
||||
/* 797854 802A1894 104002E1 */ beqz $v0, .L802A241C_7983DC
|
||||
/* 797858 802A1898 00031080 */ sll $v0, $v1, 2
|
||||
/* 79785C 802A189C 3C01802A */ lui $at, %hi(jtbl_802A3790_799750)
|
||||
/* 797860 802A18A0 00220821 */ addu $at, $at, $v0
|
||||
/* 797864 802A18A4 8C223790 */ lw $v0, %lo(jtbl_802A3790_799750)($at)
|
||||
/* 797868 802A18A8 00400008 */ jr $v0
|
||||
/* 79786C 802A18AC 00000000 */ nop
|
||||
dlabel L802A18B0_797870
|
||||
.L802A18B0_797870:
|
||||
/* 797870 802A18B0 C6B40144 */ lwc1 $f20, 0x144($s5)
|
||||
/* 797874 802A18B4 C6BE014C */ lwc1 $f30, 0x14c($s5)
|
||||
/* 797878 802A18B8 92A20191 */ lbu $v0, 0x191($s5)
|
||||
@ -345,9 +350,9 @@ dlabel L802A18B0_797870
|
||||
/* 7979AC 802A19EC 0C05272D */ jal sfx_play_sound
|
||||
/* 7979B0 802A19F0 00000000 */ nop
|
||||
/* 7979B4 802A19F4 24020001 */ addiu $v0, $zero, 1
|
||||
/* 7979B8 802A19F8 080A8907 */ j L802A241C_7983DC
|
||||
/* 7979B8 802A19F8 080A8907 */ j .L802A241C_7983DC
|
||||
/* 7979BC 802A19FC AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A1A00_7979C0
|
||||
.L802A1A00_7979C0:
|
||||
/* 7979C0 802A1A00 C6200010 */ lwc1 $f0, 0x10($s1)
|
||||
/* 7979C4 802A1A04 C6240004 */ lwc1 $f4, 4($s1)
|
||||
/* 7979C8 802A1A08 46040001 */ sub.s $f0, $f0, $f4
|
||||
@ -380,9 +385,9 @@ dlabel L802A1A00_7979C0
|
||||
/* 797A34 802A1A74 24020014 */ addiu $v0, $zero, 0x14
|
||||
/* 797A38 802A1A78 AFC20074 */ sw $v0, 0x74($fp)
|
||||
/* 797A3C 802A1A7C 24020002 */ addiu $v0, $zero, 2
|
||||
/* 797A40 802A1A80 080A8907 */ j L802A241C_7983DC
|
||||
/* 797A40 802A1A80 080A8907 */ j .L802A241C_7983DC
|
||||
/* 797A44 802A1A84 AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A1A88_797A48
|
||||
.L802A1A88_797A48:
|
||||
/* 797A48 802A1A88 8FC20074 */ lw $v0, 0x74($fp)
|
||||
/* 797A4C 802A1A8C 1440016F */ bnez $v0, .L802A204C
|
||||
/* 797A50 802A1A90 2442FFFF */ addiu $v0, $v0, -1
|
||||
@ -393,9 +398,9 @@ dlabel L802A1A88_797A48
|
||||
/* 797A64 802A1AA4 2402000F */ addiu $v0, $zero, 0xf
|
||||
/* 797A68 802A1AA8 AFC20074 */ sw $v0, 0x74($fp)
|
||||
/* 797A6C 802A1AAC 24020003 */ addiu $v0, $zero, 3
|
||||
/* 797A70 802A1AB0 080A8907 */ j L802A241C_7983DC
|
||||
/* 797A70 802A1AB0 080A8907 */ j .L802A241C_7983DC
|
||||
/* 797A74 802A1AB4 AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A1AB8_797A78
|
||||
.L802A1AB8_797A78:
|
||||
/* 797A78 802A1AB8 C624004C */ lwc1 $f4, 0x4c($s1)
|
||||
/* 797A7C 802A1ABC 3C0141C0 */ lui $at, 0x41c0
|
||||
/* 797A80 802A1AC0 44810000 */ mtc1 $at, $f0
|
||||
@ -435,9 +440,9 @@ dlabel L802A1AB8_797A78
|
||||
/* 797B00 802A1B40 0C05272D */ jal sfx_play_sound
|
||||
/* 797B04 802A1B44 00000000 */ nop
|
||||
/* 797B08 802A1B48 24020004 */ addiu $v0, $zero, 4
|
||||
/* 797B0C 802A1B4C 080A8907 */ j L802A241C_7983DC
|
||||
/* 797B0C 802A1B4C 080A8907 */ j .L802A241C_7983DC
|
||||
/* 797B10 802A1B50 AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A1B54_797B14
|
||||
.L802A1B54_797B14:
|
||||
/* 797B14 802A1B54 C624004C */ lwc1 $f4, 0x4c($s1)
|
||||
/* 797B18 802A1B58 3C014240 */ lui $at, 0x4240
|
||||
/* 797B1C 802A1B5C 44811000 */ mtc1 $at, $f2
|
||||
@ -572,7 +577,7 @@ dlabel L802A1B54_797B14
|
||||
/* 797D04 802A1D44 AC400008 */ sw $zero, 8($v0)
|
||||
/* 797D08 802A1D48 8C62000C */ lw $v0, 0xc($v1)
|
||||
/* 797D0C 802A1D4C C6200008 */ lwc1 $f0, 8($s1)
|
||||
/* 797D10 802A1D50 16E001B2 */ bnez $s7, L802A241C_7983DC
|
||||
/* 797D10 802A1D50 16E001B2 */ bnez $s7, .L802A241C_7983DC
|
||||
/* 797D14 802A1D54 E440000C */ swc1 $f0, 0xc($v0)
|
||||
/* 797D18 802A1D58 C620000C */ lwc1 $f0, 0xc($s1)
|
||||
/* 797D1C 802A1D5C C6220010 */ lwc1 $f2, 0x10($s1)
|
||||
@ -630,9 +635,9 @@ dlabel L802A1B54_797B14
|
||||
/* 797DE0 802A1E20 2402000F */ addiu $v0, $zero, 0xf
|
||||
/* 797DE4 802A1E24 AFC20074 */ sw $v0, 0x74($fp)
|
||||
/* 797DE8 802A1E28 24020005 */ addiu $v0, $zero, 5
|
||||
/* 797DEC 802A1E2C 080A8907 */ j L802A241C_7983DC
|
||||
/* 797DEC 802A1E2C 080A8907 */ j .L802A241C_7983DC
|
||||
/* 797DF0 802A1E30 AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A1E34_797DF4
|
||||
.L802A1E34_797DF4:
|
||||
/* 797DF4 802A1E34 8FC20074 */ lw $v0, 0x74($fp)
|
||||
/* 797DF8 802A1E38 14400084 */ bnez $v0, .L802A204C
|
||||
/* 797DFC 802A1E3C 2442FFFF */ addiu $v0, $v0, -1
|
||||
@ -661,8 +666,8 @@ dlabel L802A1E34_797DF4
|
||||
/* 797E58 802A1E98 8CA2000C */ lw $v0, 0xc($a1)
|
||||
/* 797E5C 802A1E9C AC440030 */ sw $a0, 0x30($v0)
|
||||
.L802A1EA0:
|
||||
/* 797E60 802A1EA0 3C04802A */ lui $a0, %hi(D_802A33A8_799368)
|
||||
/* 797E64 802A1EA4 248433A8 */ addiu $a0, $a0, %lo(D_802A33A8_799368)
|
||||
/* 797E60 802A1EA0 3C04802A */ lui $a0, %hi(battle_star_star_beam_802A33A8)
|
||||
/* 797E64 802A1EA4 248433A8 */ addiu $a0, $a0, %lo(battle_star_star_beam_802A33A8)
|
||||
/* 797E68 802A1EA8 2405000A */ addiu $a1, $zero, 0xa
|
||||
/* 797E6C 802A1EAC 0C0B0CF8 */ jal start_script
|
||||
/* 797E70 802A1EB0 0000302D */ daddu $a2, $zero, $zero
|
||||
@ -686,9 +691,9 @@ dlabel L802A1E34_797DF4
|
||||
/* 797EB8 802A1EF8 2402002D */ addiu $v0, $zero, 0x2d
|
||||
/* 797EBC 802A1EFC AFC20074 */ sw $v0, 0x74($fp)
|
||||
/* 797EC0 802A1F00 24020006 */ addiu $v0, $zero, 6
|
||||
/* 797EC4 802A1F04 080A8907 */ j L802A241C_7983DC
|
||||
/* 797EC4 802A1F04 080A8907 */ j .L802A241C_7983DC
|
||||
/* 797EC8 802A1F08 AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A1F0C_797ECC
|
||||
.L802A1F0C_797ECC:
|
||||
/* 797ECC 802A1F0C 96220064 */ lhu $v0, 0x64($s1)
|
||||
/* 797ED0 802A1F10 2442001E */ addiu $v0, $v0, 0x1e
|
||||
/* 797ED4 802A1F14 A6220064 */ sh $v0, 0x64($s1)
|
||||
@ -730,25 +735,25 @@ dlabel L802A1F0C_797ECC
|
||||
/* 797F60 802A1FA0 00431024 */ and $v0, $v0, $v1
|
||||
/* 797F64 802A1FA4 10400003 */ beqz $v0, .L802A1FB4
|
||||
/* 797F68 802A1FA8 24020014 */ addiu $v0, $zero, 0x14
|
||||
/* 797F6C 802A1FAC 080A8907 */ j L802A241C_7983DC
|
||||
/* 797F6C 802A1FAC 080A8907 */ j .L802A241C_7983DC
|
||||
/* 797F70 802A1FB0 AFC20070 */ sw $v0, 0x70($fp)
|
||||
.L802A1FB4:
|
||||
/* 797F74 802A1FB4 2402000F */ addiu $v0, $zero, 0xf
|
||||
.L802A1FB8:
|
||||
/* 797F78 802A1FB8 AFC20074 */ sw $v0, 0x74($fp)
|
||||
/* 797F7C 802A1FBC 24020007 */ addiu $v0, $zero, 7
|
||||
/* 797F80 802A1FC0 080A8907 */ j L802A241C_7983DC
|
||||
/* 797F80 802A1FC0 080A8907 */ j .L802A241C_7983DC
|
||||
/* 797F84 802A1FC4 AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A1FC8_797F88
|
||||
.L802A1FC8_797F88:
|
||||
/* 797F88 802A1FC8 8FC20074 */ lw $v0, 0x74($fp)
|
||||
/* 797F8C 802A1FCC 1440001F */ bnez $v0, .L802A204C
|
||||
/* 797F90 802A1FD0 2442FFFF */ addiu $v0, $v0, -1
|
||||
/* 797F94 802A1FD4 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 797F98 802A1FD8 AFC20074 */ sw $v0, 0x74($fp)
|
||||
/* 797F9C 802A1FDC 24020008 */ addiu $v0, $zero, 8
|
||||
/* 797FA0 802A1FE0 080A8907 */ j L802A241C_7983DC
|
||||
/* 797FA0 802A1FE0 080A8907 */ j .L802A241C_7983DC
|
||||
/* 797FA4 802A1FE4 AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A1FE8_797FA8
|
||||
.L802A1FE8_797FA8:
|
||||
/* 797FA8 802A1FE8 96220064 */ lhu $v0, 0x64($s1)
|
||||
/* 797FAC 802A1FEC 2442FFE2 */ addiu $v0, $v0, -0x1e
|
||||
/* 797FB0 802A1FF0 A6220064 */ sh $v0, 0x64($s1)
|
||||
@ -770,14 +775,14 @@ dlabel L802A1FE8_797FA8
|
||||
/* 797FEC 802A202C 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 797FF0 802A2030 AFC20074 */ sw $v0, 0x74($fp)
|
||||
/* 797FF4 802A2034 24020009 */ addiu $v0, $zero, 9
|
||||
/* 797FF8 802A2038 080A8907 */ j L802A241C_7983DC
|
||||
/* 797FF8 802A2038 080A8907 */ j .L802A241C_7983DC
|
||||
/* 797FFC 802A203C AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A2040_798000
|
||||
.L802A2040_798000:
|
||||
/* 798000 802A2040 8FC20074 */ lw $v0, 0x74($fp)
|
||||
/* 798004 802A2044 10400003 */ beqz $v0, .L802A2054
|
||||
/* 798008 802A2048 2442FFFF */ addiu $v0, $v0, -1
|
||||
.L802A204C:
|
||||
/* 79800C 802A204C 080A8907 */ j L802A241C_7983DC
|
||||
/* 79800C 802A204C 080A8907 */ j .L802A241C_7983DC
|
||||
/* 798010 802A2050 AFC20074 */ sw $v0, 0x74($fp)
|
||||
.L802A2054:
|
||||
/* 798014 802A2054 3C01432A */ lui $at, 0x432a
|
||||
@ -789,9 +794,9 @@ dlabel L802A2040_798000
|
||||
/* 79802C 802A206C E6200010 */ swc1 $f0, 0x10($s1)
|
||||
/* 798030 802A2070 AFC20074 */ sw $v0, 0x74($fp)
|
||||
/* 798034 802A2074 2402000A */ addiu $v0, $zero, 0xa
|
||||
/* 798038 802A2078 080A8907 */ j L802A241C_7983DC
|
||||
/* 798038 802A2078 080A8907 */ j .L802A241C_7983DC
|
||||
/* 79803C 802A207C AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A2080_798040
|
||||
.L802A2080_798040:
|
||||
/* 798040 802A2080 8FC20074 */ lw $v0, 0x74($fp)
|
||||
/* 798044 802A2084 10400010 */ beqz $v0, .L802A20C8
|
||||
/* 798048 802A2088 2442FFFF */ addiu $v0, $v0, -1
|
||||
@ -871,7 +876,7 @@ dlabel L802A2080_798040
|
||||
/* 798150 802A2190 2484001C */ addiu $a0, $a0, 0x1c
|
||||
/* 798154 802A2194 080A88FB */ j .L802A23EC
|
||||
/* 798158 802A2198 00000000 */ nop
|
||||
dlabel L802A219C_79815C
|
||||
.L802A219C_79815C:
|
||||
/* 79815C 802A219C 3C02802A */ lui $v0, %hi(D_802A37F0)
|
||||
/* 798160 802A21A0 8C4237F0 */ lw $v0, %lo(D_802A37F0)($v0)
|
||||
/* 798164 802A21A4 2404000F */ addiu $a0, $zero, 0xf
|
||||
@ -895,9 +900,9 @@ dlabel L802A219C_79815C
|
||||
/* 7981A4 802A21E4 0C05269B */ jal func_80149A6C
|
||||
/* 7981A8 802A21E8 0000282D */ daddu $a1, $zero, $zero
|
||||
/* 7981AC 802A21EC 24020015 */ addiu $v0, $zero, 0x15
|
||||
/* 7981B0 802A21F0 080A8907 */ j L802A241C_7983DC
|
||||
/* 7981B0 802A21F0 080A8907 */ j .L802A241C_7983DC
|
||||
/* 7981B4 802A21F4 AFC20070 */ sw $v0, 0x70($fp)
|
||||
dlabel L802A21F8_7981B8
|
||||
.L802A21F8_7981B8:
|
||||
/* 7981B8 802A21F8 0000B82D */ daddu $s7, $zero, $zero
|
||||
/* 7981BC 802A21FC 02E0902D */ daddu $s2, $s7, $zero
|
||||
/* 7981C0 802A2200 3C13802A */ lui $s3, %hi(D_802A3818)
|
||||
@ -1044,7 +1049,7 @@ dlabel L802A21F8_7981B8
|
||||
/* 7983D0 802A2410 34840010 */ ori $a0, $a0, 0x10
|
||||
/* 7983D4 802A2414 080A8908 */ j .L802A2420
|
||||
/* 7983D8 802A2418 AC640000 */ sw $a0, ($v1)
|
||||
dlabel L802A241C_7983DC
|
||||
.L802A241C_7983DC:
|
||||
/* 7983DC 802A241C 0000102D */ daddu $v0, $zero, $zero
|
||||
.L802A2420:
|
||||
/* 7983E0 802A2420 8FBF0064 */ lw $ra, 0x64($sp)
|
||||
|
@ -4913,7 +4913,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x789E60, c]
|
||||
- [0x78A490, data]
|
||||
- [0x78A490]
|
||||
- dir: battle/star/refresh
|
||||
type: code
|
||||
start: 0x78B600
|
||||
@ -4921,7 +4921,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x78B600, c]
|
||||
- [0x78C070, data]
|
||||
- [0x78C070]
|
||||
- dir: battle/star/lullaby
|
||||
type: code
|
||||
start: 0x78D150
|
||||
@ -4929,7 +4929,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x78D150, c]
|
||||
- [0x78D770, data]
|
||||
- [0x78D770]
|
||||
- dir: battle/star/star_storm
|
||||
type: code
|
||||
start: 0x78E7D0
|
||||
@ -4937,7 +4937,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x78E7D0, c]
|
||||
- [0x78EEC0, data]
|
||||
- [0x78EEC0]
|
||||
- dir: battle/star/chill_out
|
||||
type: code
|
||||
start: 0x7900D0
|
||||
@ -4945,7 +4945,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x7900D0, c]
|
||||
- [0x7909C0, data]
|
||||
- [0x7909C0]
|
||||
- dir: battle/star/smooch
|
||||
type: code
|
||||
start: 0x791D90
|
||||
@ -4953,7 +4953,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x791D90, c]
|
||||
- [0x7923C0, data]
|
||||
- [0x7923C0]
|
||||
- dir: battle/star/time_out
|
||||
type: code
|
||||
start: 0x793D20
|
||||
@ -4961,7 +4961,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x793D20, c]
|
||||
- [0x794240, data]
|
||||
- [0x794240]
|
||||
- dir: battle/star/up_and_away
|
||||
type: code
|
||||
start: 0x7952E0
|
||||
@ -4969,7 +4969,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x7952E0, c]
|
||||
- [0x7959B0, data]
|
||||
- [0x7959B0]
|
||||
- dir: battle/star/star_beam
|
||||
type: code
|
||||
start: 0x796FC0
|
||||
@ -4977,7 +4977,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x796FC0, c]
|
||||
- [0x7984B0, data]
|
||||
- [0x7984B0]
|
||||
- dir: battle/star/peach_beam
|
||||
type: code
|
||||
start: 0x7997B0
|
||||
@ -4985,7 +4985,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x7997B0, c]
|
||||
- [0x79ACA0, data]
|
||||
- [0x79ACA0]
|
||||
- dir: battle/star/peach_focus
|
||||
type: code
|
||||
start: 0x79BFA0
|
||||
@ -4993,7 +4993,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x79BFA0, c]
|
||||
- [0x79C4D0, data]
|
||||
- [0x79C4D0]
|
||||
- dir: battle/star/peach_dash
|
||||
type: code
|
||||
start: 0x79D8A0
|
||||
@ -5001,7 +5001,7 @@ segments:
|
||||
overlay: True
|
||||
subsegments:
|
||||
- [0x79D8A0, c]
|
||||
- [0x79DE50, data]
|
||||
- [0x79DE50]
|
||||
- [0x79EF40, bin] # todo identify
|
||||
- dir: world/script_api
|
||||
type: code
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user