* area_arn

* iwa

* iwa cleanup

* run coverage

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2022-10-09 01:55:27 -04:00 committed by GitHub
parent 9a644e30d6
commit 7481bed65b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
391 changed files with 11874 additions and 11086 deletions

View File

@ -397,16 +397,16 @@ extern EntityBlueprint Entity_InertRedBlock;
extern EntityBlueprint Entity_BrickBlock;
extern EntityBlueprint Entity_MulticoinBlock;
extern EntityBlueprint Entity_Hammer1Block;
extern EntityBlueprint Entity_Hammer1Block_WideHitbox;
extern EntityBlueprint Entity_Hammer1Block_TallHitbox;
extern EntityBlueprint Entity_Hammer1Block_WideX;
extern EntityBlueprint Entity_Hammer1Block_WideZ;
extern EntityBlueprint Entity_Hammer1BlockTiny;
extern EntityBlueprint Entity_Hammer2Block;
extern EntityBlueprint Entity_Hammer2Block_WideHitbox;
extern EntityBlueprint Entity_Hammer2Block_TallHitbox;
extern EntityBlueprint Entity_Hammer2Block_WideX;
extern EntityBlueprint Entity_Hammer2Block_WideZ;
extern EntityBlueprint Entity_Hammer2BlockTiny;
extern EntityBlueprint Entity_Hammer3Block;
extern EntityBlueprint Entity_Hammer3Block_WideHitbox;
extern EntityBlueprint Entity_Hammer3Block_TallHitbox;
extern EntityBlueprint Entity_Hammer3Block_WideX;
extern EntityBlueprint Entity_Hammer3Block_WideZ;
extern EntityBlueprint Entity_Hammer3BlockTiny;
extern EntityBlueprint Entity_PushBlock;
extern EntityBlueprint Entity_PowBlock;

View File

@ -1666,7 +1666,7 @@ enum ItemIDs {
ITEM_DRIED_SHROOM = 0x0000008D,
ITEM_ULTRA_SHROOM = 0x0000008E,
ITEM_SLEEPY_SHEEP = 0x0000008F,
ITEM_P_O_W_BLOCK = 0x00000090,
ITEM_POW_BLOCK = 0x00000090,
ITEM_HUSTLE_DRINK = 0x00000091,
ITEM_STOP_WATCH = 0x00000092,
ITEM_WHACKAS_BUMP = 0x00000093,
@ -1919,6 +1919,14 @@ enum GotItemType {
ITEM_TYPE_BADGE = 2
};
enum ItemPickupFlags {
ITEM_PICKUP_FLAG_NO_SOUND = 0x0001,
ITEM_PICKUP_FLAG_NO_ANIMS = 0x0002,
ITEM_PICKUP_FLAG_1_COIN = 0x0010,
ITEM_PICKUP_FLAG_3_STAR_PIECES = 0x0020,
ITEM_PICKUP_FLAG_UNIQUE = 0x0040,
};
enum ItemTypeFlags {
ITEM_TYPE_FLAG_WORLD_USABLE = 0x0001,
ITEM_TYPE_FLAG_BATTLE_USABLE = 0x0002,
@ -3319,7 +3327,7 @@ enum PlayerStatusAnimFlags {
PA_FLAGS_HOLDING_WATT = 0x00000001,
PA_FLAGS_2 = 0x00000002,
PA_FLAGS_INTERRUPT_USE_PARTNER = 0x00000004, ///< forces actions with bow, parakarry, watt, and lakilester to end (sushie not tested)
PA_FLAGS_8 = 0x00000008, ///< triggers partner use when set
PA_FLAGS_FORCE_USE_PARTNER = 0x00000008, ///< triggers partner use when set
PA_FLAGS_INTERACT_PROMPT_AVAILABLE = 0x00000010, ///< ! prompt
PA_FLAGS_SPEECH_PROMPT_AVAILABLE = 0x00000020, ///< (...) prompt
PA_FLAGS_40 = 0x00000040,

View File

@ -15,6 +15,7 @@ ApiStatus LoadDemoBattle(Evt* script, s32 isInitialCall);
ApiStatus RemoveNpc(Evt* script, s32 isInitialCall);
ApiStatus RemoveEncounter(Evt* script, s32 isInitialCall);
ApiStatus GetBattleOutcome(Evt* script, s32 isInitialCall);
ApiStatus func_800445D4(Evt* script, s32 isInitialCall);
ApiStatus GetOwnerEncounterTrigger(Evt* script, s32 isInitialCall);
ApiStatus DoNpcDefeat(Evt* script, s32 isInitialCall);
ApiStatus StartBattle(Evt* script, s32 isInitialCall);
@ -44,6 +45,7 @@ ApiStatus GetSelfNpcID(Evt* script, s32 isInitialCall);
ApiStatus ClearDefeatedEnemies(Evt* script, s32 isInitialCall);
ApiStatus SetEnemyFlagBits(Evt* script, s32 isInitialCall);
ApiStatus GetSelfAnimationFromTable(Evt* script, s32 isInitialCall);
ApiStatus func_800457F8(Evt* script, s32 isInitialCall);
ApiStatus ShowCoinCounter(Evt* script, s32 isInitialCall);
ApiStatus MakeEntity(Evt* script, s32 isInitialCall);
ApiStatus AssignScript(Evt* script, s32 isInitialCall);
@ -264,6 +266,7 @@ ApiStatus DemoSetButtons(Evt* script, s32 isInitialCall);
ApiStatus DemoJoystickRadial(Evt* script, s32 isInitialCall);
ApiStatus DemoJoystickXY(Evt* script, s32 isInitialCall);
ApiStatus WaitForPlayerInputEnabled(Evt* script, s32 isInitialCall);
ApiStatus func_802D2484(Evt* script, s32 isInitialCall);
ApiStatus IsPlayerOnValidFloor(Evt* script, s32 isInitialCall);
ApiStatus WaitForPlayerMoveToComplete(Evt* script, s32 isInitialCall);
ApiStatus func_802CFE2C(Evt* script, s32 isInitialCall);
@ -287,8 +290,10 @@ ApiStatus func_802D7B10(Evt* script, s32 isInitialCall);
ApiStatus ShowConsumableChoicePopup(Evt* script, s32 isInitialCall);
ApiStatus func_800458CC(Evt* script, s32 isInitialCall);
ApiStatus OnPlayerFled(Evt* script, s32 isInitialCall);
ApiStatus SetTattleMessage(Evt* script, s32 isInitialCall);
ApiStatus ShowKeyChoicePopup(Evt* script, s32 isInitialCall);
ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall);
ApiStatus ForceUsePartner(Evt* script, s32 isInitialCall);
ApiStatus InterruptUsePartner(Evt* script, s32 isInitialCall);
ApiStatus func_80045838(Evt* script, s32 isInitialCall);
ApiStatus ModifyGlobalOverrideFlags(Evt* script, s32 isInitialCall);

View File

@ -613,6 +613,39 @@
EVT_END \
}
#define EVT_EXIT_SINGLE_DOOR(exitIdx, map, entryIdx, colliderID, modelID, swingDir) \
{ \
EVT_SET_GROUP(EVT_GROUP_1B) \
EVT_CALL(DisablePlayerInput, TRUE) \
EVT_SET(LVar0, exitIdx) \
EVT_SET(LVar1, colliderID) \
EVT_SET(LVar2, modelID) \
EVT_SET(LVar3, swingDir) \
EVT_EXEC(ExitSingleDoor) \
EVT_WAIT(17) \
EVT_CALL(GotoMap, EVT_PTR(map), entryIdx) \
EVT_WAIT(100) \
EVT_RETURN \
EVT_END \
}
#define EVT_EXIT_SPLIT_SINGLE_DOOR(exitIdx, map, entryIdx, colliderID, topModelID, bottomModelID, swingDir) \
{ \
EVT_SET_GROUP(EVT_GROUP_1B) \
EVT_CALL(DisablePlayerInput, TRUE) \
EVT_SET(LVar0, exitIdx) \
EVT_SET(LVar1, colliderID) \
EVT_SET(LVar2, topModelID) \
EVT_SET(LVar4, bottomModelID) \
EVT_SET(LVar3, swingDir) \
EVT_EXEC(ExitSplitSingleDoor) \
EVT_WAIT(17) \
EVT_CALL(GotoMap, EVT_PTR(map), entryIdx) \
EVT_WAIT(100) \
EVT_RETURN \
EVT_END \
}
#define EVT_EXIT_DOUBLE_DOOR(exitIdx, map, entryIdx, colliderID, leftDoorModelID, rightDoorModelID) \
{ \
EVT_SET_GROUP(EVT_GROUP_1B) \

View File

@ -26,8 +26,11 @@ extern EvtScript EnterSavePoint;
extern EvtScript ExitWalk;
extern EvtScript ExitSingleDoor;
extern EvtScript EnterSingleDoor;
extern EvtScript ExitSplitSingleDoor;
extern EvtScript EnterSplitSingleDoor;
extern EvtScript ExitDoubleDoor;
extern EvtScript EnterDoubleDoor;
extern EvtScript ExitSplitDoubleDoor;
extern EvtScript EnterSplitDoubleDoor;
#endif

View File

@ -672,7 +672,7 @@ void update_player(void) {
playerStatus->pushVelocity.y = 0.0f;
playerStatus->pushVelocity.z = 0.0f;
playerStatus->flags &= ~PS_FLAGS_10;
playerStatus->animFlags &= ~PA_FLAGS_8;
playerStatus->animFlags &= ~PA_FLAGS_FORCE_USE_PARTNER;
}
void check_input_use_partner(void) {
@ -681,7 +681,7 @@ void check_input_use_partner(void) {
u32 actionState = playerStatus->actionState;
if (!(playerStatus->animFlags & PA_FLAGS_8BIT_MARIO)) {
if (playerStatus->animFlags & PA_FLAGS_8 || playerStatus->inputEnabledCounter == 0) {
if (playerStatus->animFlags & PA_FLAGS_FORCE_USE_PARTNER || playerStatus->inputEnabledCounter == 0) {
if (playerStatus->pressedButtons & BUTTON_C_DOWN && !(playerStatus->flags & PS_FLAGS_80) &&
!(playerStatus->pressedButtons & BUTTON_B) && !(playerStatus->animFlags & PA_FLAGS_USING_PEACH_PHYSICS) &&
actionState <= ACTION_STATE_RUN) {

View File

@ -30,7 +30,7 @@ void update_player_input(void) {
playerStatus->heldButtons = 0;
}
if (playerStatus->animFlags & PA_FLAGS_8) {
if (playerStatus->animFlags & PA_FLAGS_FORCE_USE_PARTNER) {
playerStatus->animFlags |= PA_FLAGS_200000;
playerStatus->pressedButtons |= 4;
}

View File

@ -556,7 +556,7 @@ s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pic
y = itemEntity->position.y + 12.0f;
z = itemEntity->position.z;
hitDepth = 1000.0f;
npc_raycast_down_sides(0x20000, &x, &y, &z, &hitDepth);
npc_raycast_down_sides(COLLISION_CHANNEL_20000, &x, &y, &z, &hitDepth);
shadow->position.x = x;
shadow->position.y = y;
shadow->position.z = z;
@ -658,7 +658,7 @@ s32 make_item_entity_at_player(s32 itemID, s32 category, s32 pickupMsgFlags) {
posY = item->position.y + 12.0f;
posZ = item->position.z;
depth = 1000.0f;
npc_raycast_down_sides(0x20000, &posX, &posY, &posZ, &depth);
npc_raycast_down_sides(COLLISION_CHANNEL_20000, &posX, &posY, &posZ, &depth);
shadow->position.x = posX;
shadow->position.y = posY;
shadow->position.z = posZ;
@ -790,7 +790,7 @@ void update_item_entities(void) {
y = entity->position.y + 12.0f;
z = entity->position.z;
hitDepth = 1000.0f;
npc_raycast_down_sides(0x20000, &x, &y, &z, &hitDepth);
npc_raycast_down_sides(COLLISION_CHANNEL_20000, &x, &y, &z, &hitDepth);
shadow->position.x = x;
shadow->position.y = y;
@ -1558,9 +1558,9 @@ void update_item_entity_collectable(ItemEntity* item) {
outDepth = temp + physData->verticalVelocity;
if (physData->unk_20 == 0) {
hit = npc_raycast_up(0x20000, &outX, &outY, &outZ, &outDepth);
hit = npc_raycast_up(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, &outDepth);
} else {
hit = npc_raycast_up(0x20000, &outX, &outY, &outZ, &outDepth);
hit = npc_raycast_up(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, &outDepth);
}
if (hit && outDepth < temp) {
@ -1579,9 +1579,9 @@ void update_item_entity_collectable(ItemEntity* item) {
outZ = item->position.z;
if (physData->unk_20 == 0) {
hit = npc_test_move_complex_with_slipping(0x20000, &outX, &outY, &outZ, 0.0f, physData->moveAngle, physData->constVelocity, physData->unk_08);
hit = npc_test_move_complex_with_slipping(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, 0.0f, physData->moveAngle, physData->constVelocity, physData->unk_08);
} else {
hit = npc_test_move_simple_with_slipping(0x20000, &outX, &outY, &outZ, 0.0f, physData->moveAngle, physData->constVelocity, physData->unk_08);
hit = npc_test_move_simple_with_slipping(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, 0.0f, physData->moveAngle, physData->constVelocity, physData->unk_08);
}
if (hit) {
@ -1608,9 +1608,9 @@ void update_item_entity_collectable(ItemEntity* item) {
outZ = item->position.z;
outDepth = -physData->verticalVelocity + 12.0f;
if (physData->unk_20 == 0) {
hit = npc_raycast_down_sides(0x20000, &outX, &outY, &outZ, &outDepth);
hit = npc_raycast_down_sides(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, &outDepth);
} else {
hit = npc_raycast_down_around(0x20000, &outX, &outY, &outZ, &outDepth, 180.0f, 20.0f);
hit = npc_raycast_down_around(COLLISION_CHANNEL_20000, &outX, &outY, &outZ, &outDepth, 180.0f, 20.0f);
}
} else {
outX = item->position.x;

View File

@ -50,7 +50,7 @@ ApiStatus func_802410E4_EB9F34(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
#include "world/common/SyncStatusMenu.inc.c"

View File

@ -37,4 +37,4 @@ ApiStatus func_80240340_EF7DC0(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"

View File

@ -56,5 +56,5 @@ ApiStatus func_80240784_EFF284(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"

View File

@ -142,7 +142,7 @@ EvtScript N(init_80223DA0) = {
EVT_END
};
ApiStatus func_80218680_4FF0D0(Evt* script, s32 isInitialCall) {
ApiStatus N(func_80218680_4FF0D0)(Evt* script, s32 isInitialCall) {
Bytecode *args = script->ptrReadPos;
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
@ -174,7 +174,7 @@ EvtScript N(idle_80223E98) = {
EVT_ADD(LVar2, 6)
EVT_SETF(LVar4, EVT_FLOAT(0.4))
EVT_END_IF
EVT_CALL(func_80218680_4FF0D0, LVar0, LVar1, LVar2, LVar3, LVar4)
EVT_CALL(N(func_80218680_4FF0D0), LVar0, LVar1, LVar2, LVar3, LVar4)
EVT_END_IF
EVT_END_IF
EVT_WAIT(1)

View File

@ -100,13 +100,13 @@ EvtScript N(init) = {
EVT_END
};
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
EvtScript N(idle) = {
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0)
EVT_ADD(LVarF, 1)
EVT_CALL(SetActorScale, ACTOR_SELF, LVar1, LVar0, EVT_FLOAT(1.0))
EVT_IF_GE(LVarF, 30)

View File

@ -41,7 +41,7 @@ EvtScript N(80232A30) = {
#include "common/MakeSun.inc.c"
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
EvtScript N(80232C48) = {
EVT_CALL(EnableModel, LVarF, 1)
@ -56,10 +56,10 @@ EvtScript N(80232C48) = {
EVT_MULF(LVar6, EVT_FLOAT(1.01))
EVT_ADDF(LVar7, EVT_FLOAT(0.01))
EVT_SETF(LVar8, LVar6)
EVT_CALL(N(UnkFloatFunc), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 15, 0, 0)
EVT_ADDF(LVar8, LVarA)
EVT_SETF(LVar9, LVar7)
EVT_CALL(N(UnkFloatFunc), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 20, 0, 90)
EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 20, 0, 90)
EVT_ADDF(LVar9, LVarA)
EVT_SETF(LVarA, LVar0)
EVT_MULF(LVarA, EVT_FLOAT(10.0))

View File

@ -4,14 +4,14 @@
#define NAMESPACE b_area_flo_flo_04
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
EvtScript N(80233470) = {
EVT_SET(LVarA, LVar0)
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0)
EVT_CALL(ScaleModel, LVarA, LVar1, LVar0, 1)
EVT_ADD(LVarF, 1)
EVT_IF_GE(LVarF, 30)

View File

@ -71,7 +71,7 @@ ApiStatus SetHealthBarPos(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
ApiStatus SetTuffPuffPos(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -514,16 +514,16 @@ EvtScript N(idle) = {
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_COMBO_COUNTER), LVarA)
EVT_SWITCH(LVarA)
EVT_CASE_EQ(0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0)
EVT_ADD(LVarF, 1)
EVT_CASE_EQ(1)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.95), EVT_FLOAT(1.05), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.05), EVT_FLOAT(0.95), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.95), EVT_FLOAT(1.05), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.05), EVT_FLOAT(0.95), 15, 0, 0)
EVT_ADD(LVarF, 3)
EVT_CASE_EQ(2)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.9), EVT_FLOAT(1.1), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.1), EVT_FLOAT(0.9), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.9), EVT_FLOAT(1.1), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.1), EVT_FLOAT(0.9), 15, 0, 0)
EVT_ADD(LVarF, 5)
EVT_END_SWITCH
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_SCALE_X), LVar2)
@ -2615,8 +2615,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_SCALE_Y), LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.3), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.7), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.3), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.7), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_SCALE_X), LVar2)
@ -2626,8 +2626,8 @@ EvtScript N(attackGroundSlam) = {
EVT_END_LOOP
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B6)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_SCALE_X), LVar2)
@ -3119,8 +3119,8 @@ EvtScript N(attackGroundSlam) = {
EVT_SET(LVarF, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B7)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_SCALE_X), LVar2)
@ -3130,8 +3130,8 @@ EvtScript N(attackGroundSlam) = {
EVT_END_LOOP
EVT_CALL(PlaySoundAtActor, ACTOR_SELF, SOUND_20B7)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ACTOR_SELF, N(VAR_SCALE_X), LVar2)
@ -3159,8 +3159,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ArrayVar(0), 4, LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(0), 3, LVar2)
@ -3169,8 +3169,8 @@ EvtScript N(attackGroundSlam) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(0), 3, LVar2)
@ -3203,8 +3203,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ArrayVar(1), 4, LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(1), 3, LVar2)
@ -3213,8 +3213,8 @@ EvtScript N(attackGroundSlam) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(1), 3, LVar2)
@ -3247,8 +3247,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ArrayVar(2), 4, LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(2), 3, LVar2)
@ -3257,8 +3257,8 @@ EvtScript N(attackGroundSlam) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(2), 3, LVar2)
@ -3291,8 +3291,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ArrayVar(3), 4, LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(3), 3, LVar2)
@ -3301,8 +3301,8 @@ EvtScript N(attackGroundSlam) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(3), 3, LVar2)
@ -3335,8 +3335,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ArrayVar(4), 4, LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(4), 3, LVar2)
@ -3345,8 +3345,8 @@ EvtScript N(attackGroundSlam) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(4), 3, LVar2)
@ -3379,8 +3379,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ArrayVar(5), 4, LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(5), 3, LVar2)
@ -3389,8 +3389,8 @@ EvtScript N(attackGroundSlam) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(5), 3, LVar2)
@ -3423,8 +3423,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ArrayVar(6), 4, LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(6), 3, LVar2)
@ -3433,8 +3433,8 @@ EvtScript N(attackGroundSlam) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(6), 3, LVar2)
@ -3467,8 +3467,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ArrayVar(7), 4, LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(7), 3, LVar2)
@ -3477,8 +3477,8 @@ EvtScript N(attackGroundSlam) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(7), 3, LVar2)
@ -3511,8 +3511,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ArrayVar(8), 4, LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(8), 3, LVar2)
@ -3521,8 +3521,8 @@ EvtScript N(attackGroundSlam) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(8), 3, LVar2)
@ -3555,8 +3555,8 @@ EvtScript N(attackGroundSlam) = {
EVT_CALL(GetActorVar, ArrayVar(9), 4, LVar1)
EVT_SET(LVarF, 0)
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.5), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.5), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(9), 3, LVar2)
@ -3565,8 +3565,8 @@ EvtScript N(attackGroundSlam) = {
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(20)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar2, EVT_FLOAT(1.0), EVT_FLOAT(1.2), 10, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar3, EVT_FLOAT(1.0), EVT_FLOAT(0.8), 10, 0, 0)
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar1)
EVT_CALL(SetActorVar, ArrayVar(9), 3, LVar2)

View File

@ -173,7 +173,7 @@ EvtScript N(nextTurn) = {
EVT_END
};
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
EvtScript N(idle) = {
EVT_SET(LVarF, 0)
@ -181,16 +181,16 @@ EvtScript N(idle) = {
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_2), LVarA)
EVT_SWITCH(LVarA)
EVT_CASE_EQ(0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.97), EVT_FLOAT(1.03), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.03), EVT_FLOAT(0.97), 15, 0, 0)
EVT_ADD(LVarF, 1)
EVT_CASE_EQ(1)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.95), EVT_FLOAT(1.05), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.05), EVT_FLOAT(0.95), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.95), EVT_FLOAT(1.05), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.05), EVT_FLOAT(0.95), 15, 0, 0)
EVT_ADD(LVarF, 3)
EVT_CASE_EQ(2)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.9), EVT_FLOAT(1.1), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.1), EVT_FLOAT(0.9), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.9), EVT_FLOAT(1.1), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.1), EVT_FLOAT(0.9), 15, 0, 0)
EVT_ADD(LVarF, 5)
EVT_END_SWITCH
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_SCALE_X), LVar2)

View File

@ -41,7 +41,7 @@ EvtScript N(80232A30) = {
#include "common/MakeSun.inc.c"
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
EvtScript N(80232C48) = {
EVT_CALL(EnableModel, LVarF, 1)
@ -56,10 +56,10 @@ EvtScript N(80232C48) = {
EVT_MULF(LVar6, EVT_FLOAT(1.01))
EVT_ADDF(LVar7, EVT_FLOAT(0.01))
EVT_SETF(LVar8, LVar6)
EVT_CALL(N(UnkFloatFunc), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 15, 0, 0)
EVT_ADDF(LVar8, LVarA)
EVT_SETF(LVar9, LVar7)
EVT_CALL(N(UnkFloatFunc), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 20, 0, 90)
EVT_CALL(N(CosInterpMinMax), LVarE, LVarA, EVT_FLOAT(0.0), EVT_FLOAT(0.203125), 20, 0, 90)
EVT_ADDF(LVar9, LVarA)
EVT_SETF(LVarA, LVar0)
EVT_MULF(LVarA, EVT_FLOAT(10.0))

View File

@ -4,14 +4,14 @@
#define NAMESPACE b_area_flo2_flo_04
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
EvtScript N(80233470) = {
EVT_SET(LVarA, LVar0)
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar1, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.96875), EVT_FLOAT(1.03125), 15, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar1, EVT_FLOAT(1.03125), EVT_FLOAT(0.96875), 15, 0, 0)
EVT_CALL(ScaleModel, LVarA, LVar1, LVar0, 1)
EVT_ADD(LVarF, 1)
EVT_IF_GE(LVarF, 30)

View File

@ -4,7 +4,7 @@
#include "common/ShrinkActor.inc.c"
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
#include "common/GetSelectedMoveID.inc.c"

View File

@ -4,7 +4,7 @@
#include "common/ShrinkActor.inc.c"
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
#include "common/GetSelectedMoveID.inc.c"

View File

@ -152,7 +152,7 @@ EvtScript N(init) = {
};
#include "common/StartRumbleWithParams.inc.c"
#include "common/UnkFloatFunc.inc.c"
#include "common/CosInterpMinMax.inc.c"
ApiStatus GetActorPartOpacity(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -243,7 +243,7 @@ EvtScript N(idle) = {
EVT_CALL(GetActorVar, ACTOR_SELF, N(VAR_CLONE2_ID), LVar2)
EVT_CALL(ActorExists, LVar1, LVar3)
EVT_IF_EQ(LVar3, TRUE)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar4, EVT_FLOAT(128.0), EVT_FLOAT(254.0), 20, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar4, EVT_FLOAT(128.0), EVT_FLOAT(254.0), 20, 0, 0)
EVT_SET(LVar4, LVar4)
EVT_CALL(SetPartAlpha, ACTOR_SELF, 1, LVar4)
EVT_CALL(SetPartAlpha, LVar1, 1, LVar4)
@ -312,7 +312,7 @@ EvtScript N(FlyWithClones) = {
EVT_SET(LVar4, 41)
EVT_ADD(LVar4, LVarE)
EVT_CALL(SetActorPos, LVar2, LVar3, LVar4, LVar5)
EVT_CALL(N(UnkFloatFunc), LVarF, LVar0, EVT_FLOAT(0.0), EVT_FLOAT(5.0), 30, 0, 0)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.0), EVT_FLOAT(5.0), 30, 0, 0)
EVT_SET(LVarA, LVarB)
EVT_SET(LVarB, LVarC)
EVT_SET(LVarC, LVarD)

View File

@ -104,7 +104,7 @@ EvtScript N(main) = {
EVT_IF_EQ(LVar0, 6)
EVT_GOTO(1)
EVT_END_IF
EVT_CALL(GetItemPower, ITEM_P_O_W_BLOCK, LVar3, LVar4)
EVT_CALL(GetItemPower, ITEM_POW_BLOCK, LVar3, LVar4)
EVT_CALL(ApplyShrinkFromOwner, LVar3)
EVT_CALL(func_80269EAC, 22)
EVT_CALL(ItemDamageEnemy, LVar0, 939525120, 0, LVar3, 32)

View File

@ -0,0 +1,26 @@
#include "common.h"
#include "npc.h"
ApiStatus N(CosInterpMinMax)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 outVarTime = *args++;
s32 time = evt_get_variable(script, outVarTime);
s32 outValue = *args++;
f32 min = evt_get_float_variable(script, *args++);
f32 max = evt_get_float_variable(script, *args++);
s32 duration = evt_get_variable(script, *args++);
s32 onlyOnce = evt_get_variable(script, *args++);
f32 phaseOffset = (evt_get_float_variable(script, *args++) / 180.0f) * PI;
f32 delta = (max - min) / 2;
if (onlyOnce && duration < time) {
time = duration;
evt_set_variable(script, outVarTime, duration);
}
evt_set_float_variable(script, outValue,
(min + delta) // average value
- (delta * cos_rad(((time * PI) / duration) + phaseOffset))); // perturbation
return ApiStatus_DONE2;
}

View File

@ -1,24 +0,0 @@
#include "common.h"
#include "npc.h"
ApiStatus N(UnkFloatFunc)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 a1 = *args++;
s32 var0 = evt_get_variable(script, a1);
s32 a2 = *args++;
f32 var1 = evt_get_float_variable(script, *args++);
f32 var2 = evt_get_float_variable(script, *args++);
s32 var3 = evt_get_variable(script, *args++);
s32 var4 = evt_get_variable(script, *args++);
f32 temp = (evt_get_float_variable(script, *args++) / 180.0f) * PI;
f32 diff = (var2 - var1) / 2;
if (var4 != 0 && var3 < var0) {
var0 = var3;
evt_set_variable(script, a1, var3);
}
evt_set_float_variable(script, a2, (var1 + diff) - (diff * cos_rad(((var0 * PI) / var3) + temp)));
return ApiStatus_DONE2;
}

View File

@ -835,7 +835,7 @@ ApiStatus OnPlayerFled(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus SetTattleMsg(Evt* script, s32 isInitialCall) {
ApiStatus SetTattleMessage(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 enemyId = evt_get_variable(script, *args++);
u32 tattleMsg = evt_get_variable(script, *args);

View File

@ -608,7 +608,7 @@ EntityBlueprint Entity_Hammer1Block = {
.aabbSize = { 50, 50, 50 }
};
EntityBlueprint Entity_Hammer1Block_WideHitbox = {
EntityBlueprint Entity_Hammer1Block_WideX = {
.flags = ENTITY_FLAGS_4000 | ENTITY_FLAGS_FIXED_SHADOW_SIZE | ENTITY_FLAGS_80,
.typeDataSize = sizeof(BlockData),
.renderCommandList = Entity_Hammer1Block_RenderScript,
@ -621,7 +621,7 @@ EntityBlueprint Entity_Hammer1Block_WideHitbox = {
.aabbSize = { 100, 50, 50 }
};
EntityBlueprint Entity_Hammer1Block_TallHitbox = {
EntityBlueprint Entity_Hammer1Block_WideZ = {
.flags = ENTITY_FLAGS_4000 | ENTITY_FLAGS_FIXED_SHADOW_SIZE | ENTITY_FLAGS_80,
.typeDataSize = sizeof(BlockData),
.renderCommandList = Entity_Hammer1Block_RenderScript,
@ -660,7 +660,7 @@ EntityBlueprint Entity_Hammer2Block = {
.aabbSize = { 50, 50, 50 }
};
EntityBlueprint Entity_Hammer2Block_WideHitbox = {
EntityBlueprint Entity_Hammer2Block_WideX = {
.flags = ENTITY_FLAGS_4000 | ENTITY_FLAGS_FIXED_SHADOW_SIZE | ENTITY_FLAGS_80,
.typeDataSize = sizeof(BlockData),
.renderCommandList = Entity_Hammer2Block_RenderScript,
@ -673,7 +673,7 @@ EntityBlueprint Entity_Hammer2Block_WideHitbox = {
.aabbSize = { 100, 50, 50 }
};
EntityBlueprint Entity_Hammer2Block_TallHitbox = {
EntityBlueprint Entity_Hammer2Block_WideZ = {
.flags = ENTITY_FLAGS_4000 | ENTITY_FLAGS_FIXED_SHADOW_SIZE | ENTITY_FLAGS_80,
.typeDataSize = sizeof(BlockData),
.renderCommandList = Entity_Hammer2Block_RenderScript,
@ -712,7 +712,7 @@ EntityBlueprint Entity_Hammer3Block = {
.aabbSize = { 50, 50, 50 }
};
EntityBlueprint Entity_Hammer3Block_WideHitbox = {
EntityBlueprint Entity_Hammer3Block_WideX = {
.flags = ENTITY_FLAGS_4000 | ENTITY_FLAGS_FIXED_SHADOW_SIZE | ENTITY_FLAGS_80,
.typeDataSize = sizeof(BlockData),
.renderCommandList = Entity_Hammer3Block_RenderScript,
@ -725,7 +725,7 @@ EntityBlueprint Entity_Hammer3Block_WideHitbox = {
.aabbSize = { 100, 50, 50 }
};
EntityBlueprint Entity_Hammer3Block_TallHitbox = {
EntityBlueprint Entity_Hammer3Block_WideZ = {
.flags = ENTITY_FLAGS_4000 | ENTITY_FLAGS_FIXED_SHADOW_SIZE | ENTITY_FLAGS_80,
.typeDataSize = sizeof(BlockData),
.renderCommandList = Entity_Hammer3Block_RenderScript,

View File

@ -74,7 +74,7 @@ void entity_StarBoxLauncher_check_launch(Entity* entity) {
hitDepth = 10.0f;
add_vec2D_polar(&x, &z, 10.0f, func_800E5348());
if (npc_raycast_down_sides(0x10000, &x, &y, &z, &hitDepth) != 0) {
if (npc_raycast_down_sides(COLLISION_CHANNEL_10000, &x, &y, &z, &hitDepth) != 0) {
if (D_8010C978 & COLLISION_WITH_ENTITY_BIT) {
result = get_entity_type(D_8010C978) == ENTITY_TYPE_STAR_BOX_LAUCHER;
}

View File

@ -769,6 +769,7 @@ ApiStatus GetItemPower(Evt* script, s32 isInitialCall) {
ApiStatus ShowGotItem(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32 itemID, category, pickupMsgFlags;
if (isInitialCall) {
script->functionTemp[0] = 0;
@ -776,9 +777,10 @@ ApiStatus ShowGotItem(Evt* script, s32 isInitialCall) {
switch (script->functionTemp[0]) {
case 0:
script->functionTemp[1] = make_item_entity_at_player(evt_get_variable(script, *args++),
evt_get_variable(script, *args++),
*args++);
itemID = evt_get_variable(script, *args++);
category = evt_get_variable(script, *args++);
pickupMsgFlags = *args++;
script->functionTemp[1] = make_item_entity_at_player(itemID, category, pickupMsgFlags);
script->functionTemp[0] = 1;
break;
case 1:

View File

@ -602,7 +602,11 @@ ApiStatus WaitForPlayerTouchingFloor(Evt* script, s32 isInitialCall) {
}
ApiStatus func_802D2484(Evt* script, s32 isInitialCall) {
return (gCollisionStatus.currentFloor >= 0) * ApiStatus_DONE2;
if (gCollisionStatus.currentFloor >= 0) {
return ApiStatus_DONE2;
} else {
return ApiStatus_BLOCK;
}
}
ApiStatus IsPlayerOnValidFloor(Evt* script, s32 isInitialCall) {
@ -644,36 +648,36 @@ ApiStatus func_802D2520(Evt* script, s32 isInitialCall) {
switch (val) {
case 0:
playerStatus->renderMode = 0xD;
playerStatus->renderMode = RENDER_MODE_ALPHATEST;
func_802DDFF8(a0, 0, 0, 0, 0, 0, D_802DB5B0);
break;
case 2:
case 3:
playerStatus->renderMode = 0xD;
playerStatus->renderMode = RENDER_MODE_ALPHATEST;
case 1:
func_802DDFF8(a0, val, 0, 0, 0, 0, D_802DB5B0);
break;
case 4:
playerStatus->renderMode = 13;
playerStatus->renderMode = RENDER_MODE_ALPHATEST;
a2 = evt_get_variable(script, *args++);
a3 = evt_get_variable(script, *args++);
a4 = evt_get_variable(script, *args++);
func_802DDFF8(a0, 4, a2, a3, a4, 0, D_802DB5B0);
break;
case 6:
playerStatus->renderMode = 13;
playerStatus->renderMode = RENDER_MODE_ALPHATEST;
a2 = evt_get_variable(script, *args++);
a3 = evt_get_variable(script, *args++);
a4 = evt_get_variable(script, *args++);
func_802DDFF8(a0, 6, a2, a3, a4, 0xFF, D_802DB5B0);
func_802DDFF8(a0, 6, a2, a3, a4, 255, D_802DB5B0);
break;
case 7:
playerStatus->renderMode = 22;
playerStatus->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2;
a5 = evt_get_variable(script, *args++);
func_802DDFF8(a0, 7, 0xFF, 0xFF, 0xFF, a5, D_802DB5B0);
func_802DDFF8(a0, 7, 255, 255, 255, a5, D_802DB5B0);
break;
case 8:
playerStatus->renderMode = 22;
playerStatus->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2;
a2 = evt_get_variable(script, *args++);
a3 = evt_get_variable(script, *args++);
a4 = evt_get_variable(script, *args++);
@ -681,14 +685,14 @@ ApiStatus func_802D2520(Evt* script, s32 isInitialCall) {
func_802DDFF8(a0, 8, a2, a3, a4, a5, D_802DB5B0);
break;
case 5:
playerStatus->renderMode = 13;
playerStatus->renderMode = RENDER_MODE_ALPHATEST;
a2 = evt_get_variable(script, *args++);
a3 = evt_get_variable(script, *args++);
a4 = evt_get_variable(script, *args++);
func_802DDFF8(a0, 5, a2, a3, a4, 0, D_802DB5B0);
break;
case 13:
playerStatus->renderMode = 22;
playerStatus->renderMode = RENDER_MODE_SURFACE_XLU_LAYER2;
a2 = evt_get_variable(script, *args++);
a3 = evt_get_variable(script, *args++);
a4 = evt_get_variable(script, *args++);
@ -778,10 +782,10 @@ ApiStatus GetCurrentPartner(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2;
}
ApiStatus func_802D2B50(void) {
ApiStatus ForceUsePartner(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus;
playerStatus->animFlags |= PA_FLAGS_8;
playerStatus->animFlags |= PA_FLAGS_FORCE_USE_PARTNER;
return ApiStatus_DONE2;
}

View File

@ -6,7 +6,7 @@ s32 D_80293B80[] = {
ITEM_MUSHROOM,
ITEM_FIRE_FLOWER,
ITEM_DUSTY_HAMMER,
ITEM_P_O_W_BLOCK,
ITEM_POW_BLOCK,
ITEM_PEBBLE,
ITEM_VOLT_SHROOM,
ITEM_THUNDER_RAGE,

View File

@ -20,7 +20,17 @@ enum {
AB_ARN_F = AreaByte(15),
};
#define AF_ARN(index) AreaFlag(index)
enum {
AF_ARN_01 = AreaFlag(1),
AF_ARN_02 = AreaFlag(2),
AF_ARN_03 = AreaFlag(3),
AF_ARN_04 = AreaFlag(4),
AF_ARN_05 = AreaFlag(5),
AF_ARN_06 = AreaFlag(6),
AF_ARN_07 = AreaFlag(7),
AF_ARN_08 = AreaFlag(8),
AF_ARN_09 = AreaFlag(9),
};
extern MapSettings arn_02_settings;
extern MapSettings arn_03_settings;

View File

@ -2,15 +2,20 @@
/// @brief Gusty Gulch - Wasteland Ascent 1
#include "common.h"
#include "../arn.h"
#include "message_ids.h"
#include "map.h"
#include "../arn.h"
#include "mapfs/arn_02_shape.h"
#include "mapfs/arn_02_hit.h"
#include "sprite/npc/Cleft.h"
#include "sprite/npc/Goomba.h"
enum {
NPC_HyperCleft_01 = 0,
NPC_HyperCleft_02 = 1,
NPC_HyperGoomba = 2,
};
#define NAMESPACE arn_02
ApiStatus N(CleftAI_Main)(Evt *script, s32 isInitialCall);
extern EvtScript N(main);
extern EvtScript N(80241040);
extern NpcGroupList N(npcGroupList_80241A9C);
extern EvtScript N(makeEntities);

View File

@ -1,24 +1,25 @@
#include "arn_02.h"
#include "message_ids.h"
EntryList N(entryList) = {
{ -585.0f, 60.0f, 150.0f, 90.0f },
{ 880.0f, 320.0f, 150.0f, 270.0f },
extern EvtScript N(EVS_Main);
EntryList N(Entrances) = {
[arn_02_ENTRY_0] { -585.0, 60.0, 150.0, 90.0 },
[arn_02_ENTRY_1] { 880.0, 320.0, 150.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_arn_02 },
};
EvtScript N(80241040) = {
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_CASE_LT(-16)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)

View File

@ -0,0 +1,29 @@
#include "arn_02.h"
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);
EvtScript N(EVS_ExitWalk_arn_05_1) = EVT_EXIT_WALK(60, arn_02_ENTRY_0, "arn_05", arn_05_ENTRY_1);
EvtScript N(EVS_ExitWalk_arn_04_0) = EVT_EXIT_WALK(60, arn_02_ENTRY_1, "arn_04", arn_04_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_05_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_04_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_GUSTY_GULCH)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupMusic))
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,15 @@
#include "arn_02.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeItemEntity, ITEM_DIZZY_DIAL, -248, 193, 45, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ARN02_Item_DizzyDial)
EVT_CALL(MakeItemEntity, ITEM_LETTER07, 536, 260, 227, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ARN02_Item_Letter07)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -350, 172, 170, 0, ITEM_COIN, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN02_ItemBlock_CoinA)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 225, 265, 30, 0, ITEM_COIN, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN02_ItemBlock_CoinB)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 275, 265, 150, 0, ITEM_REPEL_GEL, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN02_ItemBlock_RepelGel)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,80 @@
#include "arn_02.h"
#include "world/common/enemy/complete/HyperGoomba_Wander.inc.c"
#include "world/common/enemy/complete/HyperCleft.inc.c"
StaticNpc N(NpcData_HyperCleft_01) = {
.id = NPC_HyperCleft_01,
.settings = &N(NpcSettings_HyperCleft),
.pos = { -196.0f, 130.0f, 104.0f },
.yaw = 90,
.flags = NPC_FLAG_LOCK_ANIMS,
.drops = HYPER_CLEFT_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_RECT,
.centerPos = { -196, 130, 104 },
.wanderSize = { 50, 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -196, 130, 104 },
.detectSize = { 120 },
}
},
.animations = HYPER_CLEFT_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_HyperCleft_02) = {
.id = NPC_HyperCleft_02,
.settings = &N(NpcSettings_HyperCleft),
.pos = { 641.0f, 268.0f, 202.0f },
.yaw = 90,
.flags = NPC_FLAG_LOCK_ANIMS,
.drops = HYPER_CLEFT_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_RECT,
.centerPos = { 641, 268, 202 },
.wanderSize = { 50, 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 641, 268, 202 },
.detectSize = { 120 },
}
},
.animations = HYPER_CLEFT_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_HyperGoomba) = {
.id = NPC_HyperGoomba,
.settings = &N(NpcSettings_HyperGoomba),
.pos = { 333.0f, 215.0f, 85.0f },
.yaw = 90,
.flags = NPC_FLAG_LOCK_ANIMS,
.drops = HYPER_GOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_RECT,
.centerPos = { 333, 215, 85 },
.wanderSize = { 40, 30 },
.detectShape = SHAPE_RECT,
.detectPos = { 360, 215, 150 },
.detectSize = { 120, 137 },
}
},
.animations = HYPER_GOOMBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_HyperCleft_01), BTL_ARN_FORMATION_0A, BTL_ARN_STAGE_00),
NPC_GROUP(N(NpcData_HyperCleft_02), BTL_ARN_FORMATION_0D, BTL_ARN_STAGE_00),
NPC_GROUP(N(NpcData_HyperGoomba), BTL_ARN_FORMATION_03, BTL_ARN_STAGE_00),
{}
};

View File

@ -1,234 +0,0 @@
#include "arn_02.h"
#include "sprite/npc/Cleft.h"
#include "sprite/npc/Goomba.h"
#include "effects.h"
#include "entity.h"
EvtScript N(exitWalk_802410F0) = EVT_EXIT_WALK(60, 0, "arn_05", 1);
EvtScript N(exitWalk_8024114C) = EVT_EXIT_WALK(60, 1, "arn_04", 0);
EvtScript N(802411A8) = {
EVT_BIND_TRIGGER(N(exitWalk_802410F0), TRIGGER_FLOOR_ABOVE, 1, 1, 0)
EVT_BIND_TRIGGER(N(exitWalk_8024114C), TRIGGER_FLOOR_ABOVE, 6, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 34)
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096)
EVT_CALL(SetCamBGColor, 0, 0, 0, 0)
EVT_CALL(SetCamEnabled, 0, 1)
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80241A9C)))
EVT_EXEC_WAIT(N(makeEntities))
EVT_EXEC(N(80241040))
EVT_SET(LVar0, EVT_PTR(N(802411A8)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_RETURN
EVT_END
};
static s32 N(pad_12C4)[] = {
0x00000000, 0x00000000, 0x00000000,
};
EvtScript N(makeEntities) = {
EVT_CALL(MakeItemEntity, ITEM_DIZZY_DIAL, -248, 193, 45, 17, GF_ARN02_Item_DizzyDial)
EVT_CALL(MakeItemEntity, ITEM_LETTER07, 536, 260, 227, 17, GF_ARN02_Item_Letter07)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), -350, 172, 170, 0, 343, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN02_ItemBlock_CoinA)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 225, 265, 30, 0, 343, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN02_ItemBlock_CoinB)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 275, 265, 150, 0, 151, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN02_ItemBlock_RepelGel)
EVT_RETURN
EVT_END
};
MobileAISettings N(npcAISettings_802413D0) = {
.moveSpeed = 1.8f,
.moveTime = 40,
.waitTime = 15,
.alertRadius = 150.0f,
.playerSearchInterval = 2,
.chaseSpeed = 3.3f,
.chaseTurnRate= 70,
.chaseUpdateInterval = 1,
.chaseRadius = 180.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_80241400) = {
EVT_CALL(BasicAI_Main, EVT_PTR(N(npcAISettings_802413D0)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80241420) = {
.height = 20,
.radius = 23,
.ai = &N(npcAI_80241400),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 12,
};
MobileAISettings N(npcAISettings_8024144C) = {
.moveSpeed = 1.0f,
.moveTime = 30,
.waitTime = 30,
.alertRadius = 120.0f,
.playerSearchInterval = 3,
.chaseSpeed = 8.5f,
.chaseTurnRate= 60,
.chaseUpdateInterval = 3,
.chaseRadius = 100.0f,
.chaseOffsetDist = 60.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_8024147C) = {
EVT_CALL(N(CleftAI_Main), EVT_PTR(N(npcAISettings_8024144C)), 8)
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_802414A0) = {
.height = 24,
.radius = 24,
.ai = &N(npcAI_8024147C),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 15,
};
StaticNpc N(npcGroup_802414CC) = {
.id = 0,
.settings = &N(npcSettings_802414A0),
.pos = { -196.0f, 130.0f, 104.0f },
.flags = NPC_FLAG_LOCK_ANIMS,
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 1,
.maxCoinBonus = 3,
},
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_RECT,
.centerPos = { -196, 130, 104 },
.wanderSize = { 50, 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -196, 130, 104 },
.detectSize = { 120 },
}
},
.animations = {
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim06,
ANIM_Cleft_Hyper_Anim07,
ANIM_Cleft_Hyper_Anim07,
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim08,
ANIM_Cleft_Hyper_Anim08,
ANIM_Cleft_Hyper_Anim14,
ANIM_Cleft_Hyper_Anim17,
ANIM_Cleft_Hyper_Anim13,
ANIM_Cleft_Hyper_Anim15,
ANIM_Cleft_Hyper_Anim10,
ANIM_Cleft_Hyper_Anim11,
ANIM_Cleft_Hyper_Anim16,
ANIM_Cleft_Hyper_Anim00,
},
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(npcGroup_802416BC) = {
.id = 1,
.settings = &N(npcSettings_802414A0),
.pos = { 641.0f, 268.0f, 202.0f },
.flags = NPC_FLAG_LOCK_ANIMS,
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 1,
.maxCoinBonus = 3,
},
.territory = { .temp = { 641, 268, 202, 50, 30, -32767, 1, 641, 268, 202, 120 }},
.animations = {
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim06,
ANIM_Cleft_Hyper_Anim07,
ANIM_Cleft_Hyper_Anim07,
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim08,
ANIM_Cleft_Hyper_Anim08,
ANIM_Cleft_Hyper_Anim14,
ANIM_Cleft_Hyper_Anim17,
ANIM_Cleft_Hyper_Anim13,
ANIM_Cleft_Hyper_Anim15,
ANIM_Cleft_Hyper_Anim10,
ANIM_Cleft_Hyper_Anim11,
ANIM_Cleft_Hyper_Anim16,
ANIM_Cleft_Hyper_Anim00,
},
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(npcGroup_802418AC) = {
.id = 2,
.settings = &N(npcSettings_80241420),
.pos = { 333.0f, 215.0f, 85.0f },
.flags = NPC_FLAG_LOCK_ANIMS,
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 20,
.itemDrops = {
{ ITEM_DRIED_SHROOM, 10, 0 }
},
.heartDrops = STANDARD_HEART_DROPS(2),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.maxCoinBonus = 2,
},
.territory = { .temp = { 333, 215, 85, 40, 30, -32767, 1, 360, 215, 150, 120, 137, 1 }},
.animations = {
ANIM_Goomba_Hyper_Idle,
ANIM_Goomba_Hyper_Walk,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Idle,
ANIM_Goomba_Hyper_Idle,
ANIM_Goomba_Hyper_Hurt,
ANIM_Goomba_Hyper_Hurt,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
},
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(npcGroupList_80241A9C) = {
NPC_GROUP(N(npcGroup_802414CC), 0x0E0A, 0x00),
NPC_GROUP(N(npcGroup_802416BC), 0x0E0D, 0x00),
NPC_GROUP(N(npcGroup_802418AC), 0x0E03, 0x00),
{},
};
#include "world/common/enemy/CleftAI.inc.c"

View File

@ -2,20 +2,33 @@
/// @brief Gusty Gulch - Ghost Town 1
#include "common.h"
#include "../arn.h"
#include "message_ids.h"
#include "map.h"
#include "../arn.h"
#include "mapfs/arn_03_shape.h"
#include "mapfs/arn_03_hit.h"
#include "sprite/npc/Boo.h"
#include "sprite/npc/WorldBow.h"
enum {
NPC_Boo_01 = 0,
NPC_Boo_02 = 1,
NPC_Boo_03 = 2,
NPC_Boo_04 = 3,
NPC_Boo_05 = 4,
NPC_Boo_06 = 5,
NPC_Boo_07 = 6,
NPC_Boo_08 = 7,
NPC_Boo_09 = 8,
};
enum {
MV_Unk_00 = MapVar(0),
MV_Unk_01 = MapVar(1),
MV_Unk_02 = MapVar(2),
MV_Unk_03 = MapVar(3),
};
#define NAMESPACE arn_03
ApiStatus N(AddPlayerHandsOffset)(Evt* script, s32 isInitialCall);
ApiStatus N(ItemChoice_SaveSelected)(Evt* script, s32 isInitialCall);
ApiStatus N(BuildKeyItemChoiceList)(Evt* script, s32 isInitialCall);
ApiStatus N(ItemChoice_WaitForSelection)(Evt* script, s32 isInitialCall);
ApiStatus N(func_8024113C_BDFECC)(Evt* script, s32 isInitialCall);
extern EvtScript N(main);
extern EvtScript N(80241780);
extern NpcGroupList N(npcGroupList_80244740);
extern NpcGroupList N(npcGroupList_80244788);
extern EvtScript N(makeEntities);

View File

@ -1,23 +1,25 @@
#include "arn_03.h"
EntryList N(entryList) = {
{ -76.0, 165.0, 150.0, 90.0 },
{ 576.0, 225.0, 150.0, 270.0 },
extern EvtScript N(EVS_Main);
EntryList N(Entrances) = {
[arn_03_ENTRY_0] { -76.0, 165.0, 150.0, 90.0 },
[arn_03_ENTRY_1] { 576.0, 225.0, 150.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_arn_03 },
};
EvtScript N(80241780) = {
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_CASE_LT(-16)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)

View File

@ -0,0 +1,63 @@
#include "arn_03.h"
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(BeforeNPCs);
extern NpcGroupList N(AfterNPCs);
EvtScript N(EVS_ExitWalk_arn_07_1) = EVT_EXIT_WALK(60, arn_03_ENTRY_0, "arn_07", arn_07_ENTRY_1);
EvtScript N(EVS_ExitWalk_arn_05_0) = EVT_EXIT_WALK(60, arn_03_ENTRY_1, "arn_05", arn_05_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_07_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_05_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetLoadType, LVar1)
EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT)
EVT_EXEC(EnterSavePoint)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_RETURN
EVT_END_IF
EVT_IF_LT(GB_StoryProgress, STORY_CH3_ARRIVED_AT_GHOST_TOWN)
EVT_CALL(SetPlayerPos, -175, 165, 160)
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_CALL(SetNpcPos, NPC_PARTNER, -175, 165, 160)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0)
EVT_CALL(SetPlayerSpeed, 4)
EVT_CALL(PlayerMoveTo, -55, 160, 0)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_RETURN
EVT_END_IF
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_GUSTY_GULCH)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_SET(AF_ARN_03, FALSE)
EVT_SET(AF_ARN_04, FALSE)
EVT_SET(AF_ARN_05, FALSE)
EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BeforeNPCs)))
EVT_ELSE
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(AfterNPCs)))
EVT_END_IF
EVT_IF_EQ(GF_ARN03_WaitingForPackage, TRUE)
EVT_SET(MV_Unk_00, 450)
EVT_SET(MV_Unk_01, 450)
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_WAIT(1)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,578 @@
#include "arn_03.h"
#include "entity.h"
#include "world/common/npc/Boo_Patrol.inc.c"
#include "world/common/npc/Boo.inc.c"
//TODO understand this key item support
#include "world/common/complete/KeyItems.inc.c"
EvtScript N(EVS_PlayerReact) = {
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_WAIT(1)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
EVT_WAIT(20)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_01) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_IF_EQ(AF_ARN_02, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0073)
EVT_SET(AF_ARN_02, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0074)
EVT_SET(AF_ARN_02, FALSE)
EVT_END_IF
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0075)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0076)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0077)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0078)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
EVT_WAIT(20)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_Boo_01) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(25)
EVT_THREAD
EVT_WAIT(50)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 325)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(20)
EVT_CALL(GetCurrentPartnerID, LVar6)
EVT_IF_NE(LVar6, PARTNER_BOW)
EVT_CALL(BringPartnerOut, PARTNER_BOW)
EVT_CALL(DisablePartnerAI, 0)
EVT_WAIT(1)
EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 0)
EVT_WAIT(5)
EVT_CALL(SetNpcJumpscale, NPC_PARTNER, 0)
EVT_IF_EQ(LVar6, PARTNER_PARAKARRY)
EVT_CALL(NpcJump0, NPC_PARTNER, -81, 176, 171, 20)
EVT_ELSE
EVT_CALL(NpcJump0, NPC_PARTNER, -81, 186, 171, 20)
EVT_END_IF
EVT_CALL(EnablePartnerAI)
EVT_END_IF
EVT_END_THREAD
EVT_CALL(SetNpcJumpscale, NPC_SELF, 0)
EVT_CALL(NpcJump0, NPC_SELF, -8, 186, 159, 60)
EVT_WAIT(15)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(InterpNpcYaw, NPC_SELF, -4, 0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_006E)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, -1, 0)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_006F)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_0070)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, -1, 0)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_0071)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_0072)
EVT_CALL(EnablePartnerAI)
EVT_WAIT(10)
EVT_CALL(GetCurrentPartnerID, LVar6)
EVT_IF_NE(LVar6, PARTNER_BOW)
EVT_CALL(PutPartnerAway)
EVT_END_IF
EVT_THREAD
EVT_CALL(NpcMoveTo, NPC_SELF, 30, 125, 30)
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0)
EVT_END_THREAD
EVT_CALL(func_802CF56C, 2)
EVT_WAIT(15)
EVT_SET(GB_StoryProgress, STORY_CH3_ARRIVED_AT_GHOST_TOWN)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, 3)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_01) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH3_ARRIVED_AT_GHOST_TOWN)
EVT_CALL(SetNpcPos, NPC_SELF, 175, 240, 145)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_01)))
EVT_END_IF
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_01)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_02) = {
EVT_IF_NE(MV_Unk_00, 0)
EVT_IF_GE(MV_Unk_00, MV_Unk_01)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0081)
EVT_SET(LVar0, 118)
EVT_SET(LVar1, 1)
EVT_EXEC_WAIT(N(GiveKeyReward))
EVT_CALL(AddKeyItem, ITEM_KOOT_PACKAGE)
EVT_SET(MV_Unk_00, 0)
EVT_SET(GF_ARN03_RecievedPackage, TRUE)
EVT_SET(GF_ARN03_WaitingForPackage, FALSE)
EVT_RETURN
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0080)
EVT_RETURN
EVT_END_IF
EVT_END_IF
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_IF_EQ(AF_ARN_03, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0079)
EVT_SET(AF_ARN_03, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007A)
EVT_SET(AF_ARN_03, FALSE)
EVT_END_IF
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007B)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007C)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007D)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007E)
EVT_END_SWITCH
EVT_IF_EQ(GF_ARN03_RecievedPackage, FALSE)
EVT_IF_EQ(GB_KootFavor_Current, 18)
EVT_EXEC_WAIT(N(EVS_PlayerReact))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_007F)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0)
EVT_SET(MV_Unk_00, 0)
EVT_SET(MV_Unk_01, 450)
EVT_SET(GF_ARN03_WaitingForPackage, TRUE)
EVT_THREAD
EVT_LOOP(0)
EVT_ADD(MV_Unk_00, 1)
EVT_WAIT(1)
EVT_IF_GE(MV_Unk_00, MV_Unk_01)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_THREAD
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_02) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_02)))
EVT_RETURN
EVT_END
};
EvtScript N(802428CC) = {
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5)
EVT_IF_GT(LVar0, LVar3)
EVT_ADD(LVar0, 60)
EVT_CALL(SetNpcYaw, NPC_Boo_05, 90)
EVT_ELSE
EVT_SUB(LVar0, 60)
EVT_CALL(SetNpcYaw, NPC_Boo_05, 270)
EVT_END_IF
EVT_ADD(LVar1, 20)
EVT_CALL(SetNpcPos, NPC_Boo_05, LVar0, LVar1, LVar2)
EVT_CALL(func_802CFD30, NPC_Boo_05, 7, 0, 0, 0, 0)
EVT_WAIT(1)
EVT_RETURN
EVT_END
};
EvtScript N(802429D4) = {
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5)
EVT_IF_GT(LVar0, LVar3)
EVT_ADD(LVar0, 30)
EVT_ELSE
EVT_SUB(LVar0, 30)
EVT_END_IF
EVT_THREAD
EVT_CALL(MakeLerp, 0, 255, 40, EASING_LINEAR)
EVT_LABEL(10)
EVT_CALL(UpdateLerp)
EVT_CALL(func_802CFD30, NPC_Boo_05, 7, LVar0, 0, 0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(10)
EVT_END_IF
EVT_END_THREAD
EVT_CALL(NpcMoveTo, NPC_Boo_05, LVar0, LVar2, 40)
EVT_RETURN
EVT_END
};
EvtScript N(80242B0C) = {
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5)
EVT_IF_GT(LVar0, LVar3)
EVT_ADD(LVar0, 60)
EVT_ELSE
EVT_SUB(LVar0, 60)
EVT_END_IF
EVT_THREAD
EVT_CALL(MakeLerp, 255, 0, 40, EASING_LINEAR)
EVT_LABEL(10)
EVT_CALL(UpdateLerp)
EVT_CALL(func_802CFD30, NPC_Boo_05, 7, LVar0, 0, 0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(10)
EVT_END_IF
EVT_END_THREAD
EVT_CALL(NpcMoveTo, NPC_Boo_05, LVar0, LVar2, 40)
EVT_CALL(SetNpcPos, NPC_Boo_05, 0, -1000, 0)
EVT_RETURN
EVT_END
};
EvtScript N(80242C60) = {
EVT_EXEC_WAIT(N(802429D4))
EVT_SET(MV_Unk_02, 0)
EVT_SET(MV_Unk_03, 0)
EVT_THREAD
EVT_WAIT(25)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80017)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Cower)
EVT_LOOP(0)
EVT_IF_EQ(MV_Unk_02, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Idle)
EVT_END_THREAD
EVT_CALL(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Spook)
EVT_CALL(EndSpeech, NPC_Boo_05, ANIM_Boo_Tan_Spook, ANIM_Boo_Tan_Spook, 5)
EVT_WAIT(30)
EVT_CALL(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Idle)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(80242B0C))
EVT_SET(MV_Unk_02, 1)
EVT_WAIT(15)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_03) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_IF_EQ(AF_ARN_04, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0082)
EVT_SET(AF_ARN_04, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0083)
EVT_SET(AF_ARN_04, FALSE)
EVT_END_IF
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0084)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0085)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_THREAD
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar2, -20)
EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0))
EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0)
EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 1)
EVT_END_THREAD
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0086)
EVT_EXEC_WAIT(N(802428CC))
EVT_CALL(PlayerFaceNpc, NPC_Boo_05, TRUE)
EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Boo_05, 1)
EVT_CALL(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_0087)
EVT_EXEC_WAIT(N(80242C60))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0088)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_THREAD
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar2, -20)
EVT_CALL(SetNpcSpeed, NPC_PARTNER, EVT_FLOAT(2.0))
EVT_CALL(NpcMoveTo, NPC_PARTNER, LVar0, LVar2, 0)
EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_SELF, 1)
EVT_END_THREAD
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0089)
EVT_EXEC_WAIT(N(802428CC))
EVT_CALL(PlayerFaceNpc, NPC_Boo_05, TRUE)
EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Boo_05, 1)
EVT_CALL(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_008A)
EVT_EXEC_WAIT(N(80242C60))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008B)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(EnablePartnerAI)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_03) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_03)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_04) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_IF_EQ(AF_ARN_05, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008C)
EVT_SET(AF_ARN_05, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008D)
EVT_SET(AF_ARN_05, FALSE)
EVT_END_IF
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008E)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_008F)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0090)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0091)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_04) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_04)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_05) = {
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Boo_01) = {
.id = NPC_Boo_01,
.settings = &N(NpcSettings_Boo_Patrol),
.pos = { 36.0f, 185.0f, 140.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS,
.init = &N(EVS_NpcInit_Boo_01),
.drops = BOO_DROPS,
.territory = {
.patrol = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 2,
.points = {
{ 36, 10, 185 },
{ 56, 10, 185 },
},
.detectShape = SHAPE_CYLINDER,
.detectPos = { 479, 215, 198 },
.detectSize = { 150 },
}
},
.animations = GUSTY_BOO_ANIMS,
.tattle = MSG_NpcTattle_ARN_LovesBow,
};
StaticNpc N(NpcData_Boo_02) = {
.id = NPC_Boo_02,
.settings = &N(NpcSettings_Boo),
.pos = { 209.0f, 185.0f, 217.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS,
.init = &N(EVS_NpcInit_Boo_02),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
.tattle = MSG_NpcTattle_ARN_BooA,
};
StaticNpc N(NpcData_Boo_03) = {
.id = NPC_Boo_03,
.settings = &N(NpcSettings_Boo_Patrol),
.pos = { 379.0f, 186.0f, 186.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS,
.init = &N(EVS_NpcInit_Boo_03),
.drops = BOO_DROPS,
.territory = {
.patrol = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 2,
.points = {
{ 379, 10, 186 },
{ 399, 10, 186 },
},
.detectShape = SHAPE_CYLINDER,
.detectPos = { 479, 215, 198 },
.detectSize = { 150 },
}
},
.animations = GUSTY_BOO_ANIMS,
.tattle = MSG_NpcTattle_ARN_BooB,
};
StaticNpc N(NpcData_Boo_04) = {
.id = NPC_Boo_04,
.settings = &N(NpcSettings_Boo),
.pos = { 544.0f, 235.0f, 128.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS,
.init = &N(EVS_NpcInit_Boo_04),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
.tattle = MSG_NpcTattle_ARN_BooC,
};
StaticNpc N(NpcData_Boo_05) = {
.id = NPC_Boo_05,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS,
.init = &N(EVS_NpcInit_Boo_05),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
};
EvtScript N(EVS_NpcIdle_Boo_06) = {
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar3, LVar0)
EVT_ADD(LVar3, -60)
EVT_SET(LVar4, LVar0)
EVT_ADD(LVar4, 60)
EVT_LOOP(0)
EVT_CALL(RandInt, 5, LVar5)
EVT_SETF(LVar6, LVar5)
EVT_MULF(LVar6, EVT_FLOAT(0.1))
EVT_ADDF(LVar6, EVT_FLOAT(0.8))
EVT_CALL(SetNpcSpeed, NPC_SELF, LVar6)
EVT_CALL(NpcMoveTo, NPC_SELF, LVar3, LVar2, 0)
EVT_CALL(RandInt, 5, LVar5)
EVT_SETF(LVar6, LVar5)
EVT_MULF(LVar6, EVT_FLOAT(0.1))
EVT_ADDF(LVar6, EVT_FLOAT(0.8))
EVT_CALL(SetNpcSpeed, NPC_SELF, LVar6)
EVT_CALL(NpcMoveTo, NPC_SELF, LVar4, LVar2, 0)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_06) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06)))
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_07) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06)))
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_08) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06)))
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_09) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06)))
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_HAS_SHADOW, FALSE)
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Boo_06)[] = {
{
.id = NPC_Boo_06,
.settings = &N(NpcSettings_Boo),
.pos = { 36.0f, 277.0f, 140.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000,
.init = &N(EVS_NpcInit_Boo_06),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
},
{
.id = NPC_Boo_07,
.settings = &N(NpcSettings_Boo),
.pos = { 180.0f, 285.0f, 182.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000,
.init = &N(EVS_NpcInit_Boo_07),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
},
{
.id = NPC_Boo_08,
.settings = &N(NpcSettings_Boo),
.pos = { 349.0f, 286.0f, 152.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000,
.init = &N(EVS_NpcInit_Boo_08),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
},
{
.id = NPC_Boo_09,
.settings = &N(NpcSettings_Boo),
.pos = { 490.0f, 324.0f, 128.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000,
.init = &N(EVS_NpcInit_Boo_09),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
},
};
NpcGroupList N(BeforeNPCs) = {
NPC_GROUP(N(NpcData_Boo_01)),
NPC_GROUP(N(NpcData_Boo_02)),
NPC_GROUP(N(NpcData_Boo_03)),
NPC_GROUP(N(NpcData_Boo_04)),
NPC_GROUP(N(NpcData_Boo_05)),
{}
};
NpcGroupList N(AfterNPCs) = {
NPC_GROUP(N(NpcData_Boo_01)),
NPC_GROUP(N(NpcData_Boo_02)),
NPC_GROUP(N(NpcData_Boo_03)),
NPC_GROUP(N(NpcData_Boo_04)),
NPC_GROUP(N(NpcData_Boo_05)),
NPC_GROUP(N(NpcData_Boo_06)),
{}
};

View File

@ -0,0 +1,10 @@
#include "arn_03.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 300, 237, 60, 0, ITEM_COIN, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN03_ItemBlock_Coin)
EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 250, 237, 125, 0, MAKE_ENTITY_END)
EVT_RETURN
EVT_END
};

File diff suppressed because it is too large Load Diff

View File

@ -2,17 +2,22 @@
/// @brief Gusty Gulch - Wasteland Ascent 2
#include "common.h"
#include "../arn.h"
#include "message_ids.h"
#include "map.h"
#include "../arn.h"
#include "mapfs/arn_04_shape.h"
#include "mapfs/arn_04_hit.h"
#include "sprite/npc/Paragoomba.h"
#include "sprite/npc/Goomba.h"
#include "sprite/npc/Cleft.h"
enum {
NPC_HyperParagoomba = 0,
NPC_HyperGoomba = 1,
NPC_HyperCleft_01 = 2,
NPC_HyperCleft_02 = 3,
};
#define NAMESPACE arn_04
ApiStatus N(PatrolNoAttackAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(FlyingAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(CleftAI_Main)(Evt* script, s32 isInitialCall);
extern EvtScript N(main);
extern EvtScript N(802433D0);
extern NpcGroupList N(npcGroupList_80244000);
extern EvtScript N(makeEntities);

View File

@ -1,24 +1,25 @@
#include "arn_04.h"
#include "message_ids.h"
EntryList N(entryList) = {
{ -585.0, 60.0, 150.0, 90.0 },
{ 820.0, 285.0, 150.0, 270.0 },
extern EvtScript N(EVS_Main);
EntryList N(Entrances) = {
[arn_04_ENTRY_0] { -585.0, 60.0, 150.0, 90.0 },
[arn_04_ENTRY_1] { 820.0, 285.0, 150.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_arn_04 },
};
EvtScript N(802433D0) = {
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_CASE_LT(-16)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)

View File

@ -0,0 +1,30 @@
#include "arn_04.h"
#include "entity.h"
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);
EvtScript N(EVS_ExitWalk_arn_02_1) = EVT_EXIT_WALK(60, arn_04_ENTRY_0, "arn_02", arn_02_ENTRY_1);
EvtScript N(EVS_ExitWalk_dgb_00_0) = EVT_EXIT_WALK(60, arn_04_ENTRY_1, "dgb_00", dgb_00_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_02_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_dgb_00_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_GUSTY_GULCH)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupMusic))
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,105 @@
#include "arn_04.h"
#include "world/common/enemy/complete/HyperGoomba_Patrol.inc.c"
#include "world/common/enemy/complete/HyperParagoomba.inc.c"
#include "world/common/enemy/complete/HyperCleft.inc.c"
StaticNpc N(NpcData_HyperParagoomba) = {
.id = NPC_HyperParagoomba,
.settings = &N(NpcSettings_HyperParagoomba),
.pos = { -350.0f, 180.0f, 150.0f },
.yaw = 90,
.flags = NPC_FLAG_LOCK_ANIMS,
.drops = HYPER_PARAGOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -350, 180, 150 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -350, 180, 150 },
.detectSize = { 150 },
}
},
.animations = HYPER_PARAGOOMBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_HyperGoomba) = {
.id = NPC_HyperGoomba,
.settings = &N(NpcSettings_HyperGoomba_Patrol),
.pos = { 360.0f, 208.0f, 100.0f },
.yaw = 90,
.flags = NPC_FLAG_LOCK_ANIMS,
.drops = HYPER_GOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 360, 208, 100 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 360, 208, 100 },
.detectSize = { 150 },
}
},
.animations = HYPER_GOOMBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_HyperCleft_01) = {
.id = NPC_HyperCleft_01,
.settings = &N(NpcSettings_HyperCleft),
.pos = { 150.0f, 177.0f, 160.0f },
.yaw = 90,
.flags = NPC_FLAG_LOCK_ANIMS,
.drops = HYPER_CLEFT_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 150, 177, 160 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 150, 177, 160 },
.detectSize = { 150 },
}
},
.animations = HYPER_CLEFT_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_HyperCleft_02) = {
.id = NPC_HyperCleft_02,
.settings = &N(NpcSettings_HyperCleft),
.pos = { 550.0f, 230.0f, 125.0f },
.yaw = 90,
.flags = NPC_FLAG_LOCK_ANIMS,
.drops = HYPER_CLEFT_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 550, 230, 125 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 550, 230, 125 },
.detectSize = { 150 },
}
},
.animations = HYPER_CLEFT_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_HyperParagoomba), BTL_ARN_FORMATION_09, BTL_ARN_STAGE_00),
NPC_GROUP(N(NpcData_HyperGoomba), BTL_ARN_FORMATION_03, BTL_ARN_STAGE_00),
NPC_GROUP(N(NpcData_HyperCleft_01), BTL_ARN_FORMATION_0C, BTL_ARN_STAGE_00),
NPC_GROUP(N(NpcData_HyperCleft_02), BTL_ARN_FORMATION_0E, BTL_ARN_STAGE_00),
{}
};

View File

@ -0,0 +1,14 @@
#include "arn_04.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 450, 285, 120, 0, ITEM_SUPER_SHROOM, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN04_ItemBlock_SuperShroom)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 720, 333, 75, 0, ITEM_COIN, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN04_ItemBlock_Coin)
EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 600, 290, 200, 0, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN04_MultiCoinBrick)
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 540, 230, 13, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_ARN04_Item_StarPiece)
EVT_RETURN
EVT_END
};

View File

@ -1,304 +0,0 @@
#include "arn_04.h"
#include "sprite/npc/Paragoomba.h"
#include "sprite/npc/Goomba.h"
#include "sprite/npc/Cleft.h"
#include "effects.h"
#include "entity.h"
EvtScript N(exitWalk_80243480) = EVT_EXIT_WALK(60, 0, "arn_02", 1);
EvtScript N(exitWalk_802434DC) = EVT_EXIT_WALK(60, 1, "dgb_00", 0);
EvtScript N(80243538) = {
EVT_BIND_TRIGGER(N(exitWalk_80243480), TRIGGER_FLOOR_ABOVE, 1, 1, 0)
EVT_BIND_TRIGGER(N(exitWalk_802434DC), TRIGGER_FLOOR_ABOVE, 6, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 34)
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096)
EVT_CALL(SetCamBGColor, 0, 0, 0, 0)
EVT_CALL(SetCamEnabled, 0, 1)
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80244000)))
EVT_EXEC_WAIT(N(makeEntities))
EVT_EXEC(N(802433D0))
EVT_SET(LVar0, EVT_PTR(N(80243538)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_RETURN
EVT_END
};
static s32 N(pad_3654)[] = {
0x00000000, 0x00000000, 0x00000000,
};
MobileAISettings N(npcAISettings_80243660) = {
.moveSpeed = 1.5f,
.moveTime = 30,
.waitTime = 30,
.alertRadius = 130.0f,
.playerSearchInterval = 1,
.chaseSpeed = 2.5f,
.chaseTurnRate= 180,
.chaseUpdateInterval = 3,
.chaseRadius = 150.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_80243690) = {
EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(npcAISettings_80243660)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_802436B0) = {
.height = 20,
.radius = 23,
.ai = &N(npcAI_80243690),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 12,
};
#include "world/common/enemy/PatrolNoAttackAI.inc.c"
f32 N(FlyingAI_JumpVels)[] = {
4.5f, 3.5f, 2.6f, 2.0f,
1.5f, 20.0f,
};
#include "world/common/enemy/FlyingAI.inc.c"
MobileAISettings N(npcAISettings_802436F4) = {
.moveSpeed = 1.8f,
.moveTime = 60,
.waitTime = 15,
.alertRadius = 120.0f,
.playerSearchInterval = 3,
.chaseSpeed = 4.0f,
.chaseTurnRate= 5,
.chaseUpdateInterval = 1,
.chaseRadius = 150.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_80243724) = {
EVT_CALL(SetSelfVar, 0, 1)
EVT_CALL(SetSelfVar, 5, -850)
EVT_CALL(SetSelfVar, 6, 60)
EVT_CALL(SetSelfVar, 1, 700)
EVT_CALL(N(FlyingAI_Main), EVT_PTR(N(npcAISettings_802436F4)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80243794) = {
.height = 18,
.radius = 20,
.ai = &N(npcAI_80243724),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 12,
.actionFlags = 1,
};
MobileAISettings N(npcAISettings_802437C0) = {
.moveSpeed = 1.0f,
.moveTime = 30,
.waitTime = 30,
.alertRadius = 120.0f,
.playerSearchInterval = 3,
.chaseSpeed = 8.5f,
.chaseTurnRate= 60,
.chaseUpdateInterval = 3,
.chaseRadius = 100.0f,
.chaseOffsetDist = 60.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_802437F0) = {
EVT_CALL(N(CleftAI_Main), EVT_PTR(N(npcAISettings_802437C0)), 8)
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80243814) = {
.height = 24,
.radius = 24,
.ai = &N(npcAI_802437F0),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 15,
};
StaticNpc N(npcGroup_80243840) = {
.id = 0,
.settings = &N(npcSettings_80243794),
.pos = { -350.0f, 180.0f, 150.0f },
.flags = NPC_FLAG_LOCK_ANIMS,
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 20,
{ ITEM_DRIED_SHROOM, 10, 0 },
.heartDrops = STANDARD_HEART_DROPS(2),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.maxCoinBonus = 2,
},
.territory = { .temp = { -350, 180, 150, 30, 0, -32767, 0, -350, 180, 150, 150 }},
.animations = {
ANIM_Paragoomba_Hyper_Idle,
ANIM_Paragoomba_Hyper_Walk,
ANIM_Paragoomba_Hyper_Run,
ANIM_Paragoomba_Hyper_Run,
ANIM_Paragoomba_Hyper_Idle,
ANIM_Paragoomba_Hyper_Idle,
ANIM_Paragoomba_Hyper_Hurt,
ANIM_Paragoomba_Hyper_Hurt,
ANIM_Paragoomba_Hyper_Dive,
ANIM_Paragoomba_Hyper_Run,
ANIM_Paragoomba_Hyper_Run,
ANIM_Paragoomba_Hyper_Run,
ANIM_Paragoomba_Hyper_Run,
ANIM_Paragoomba_Hyper_Run,
ANIM_Paragoomba_Hyper_Run,
ANIM_Paragoomba_Hyper_Run,
},
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(npcGroup_80243A30) = {
.id = 1,
.settings = &N(npcSettings_802436B0),
.pos = { 360.0f, 208.0f, 100.0f },
.flags = NPC_FLAG_LOCK_ANIMS,
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 20,
{ ITEM_DRIED_SHROOM, 10, 0 },
.heartDrops = STANDARD_HEART_DROPS(2),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.maxCoinBonus = 2,
},
.territory = { .temp = { 360, 208, 100, 30, 0, -32767, 0, 360, 208, 100, 150 }},
.animations = {
ANIM_Goomba_Hyper_Idle,
ANIM_Goomba_Hyper_Walk,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Idle,
ANIM_Goomba_Hyper_Idle,
ANIM_Goomba_Hyper_Hurt,
ANIM_Goomba_Hyper_Hurt,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
},
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(npcGroup_80243C20) = {
.id = 2,
.settings = &N(npcSettings_80243814),
.pos = { 150.0f, 177.0f, 160.0f },
.flags = NPC_FLAG_LOCK_ANIMS,
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 1,
.maxCoinBonus = 3,
},
.territory = { .temp = { 150, 177, 160, 30, 0, -32767, 0, 150, 177, 160, 150 }},
.animations = {
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim06,
ANIM_Cleft_Hyper_Anim07,
ANIM_Cleft_Hyper_Anim07,
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim08,
ANIM_Cleft_Hyper_Anim08,
ANIM_Cleft_Hyper_Anim14,
ANIM_Cleft_Hyper_Anim17,
ANIM_Cleft_Hyper_Anim13,
ANIM_Cleft_Hyper_Anim15,
ANIM_Cleft_Hyper_Anim10,
ANIM_Cleft_Hyper_Anim11,
ANIM_Cleft_Hyper_Anim16,
ANIM_Cleft_Hyper_Anim00,
},
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(npcGroup_80243E10) = {
.id = 3,
.settings = &N(npcSettings_80243814),
.pos = { 550.0f, 230.0f, 125.0f },
.flags = NPC_FLAG_LOCK_ANIMS,
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 1,
.maxCoinBonus = 3,
},
.territory = { .temp = { 550, 230, 125, 30, 0, -32767, 0, 550, 230, 125, 150 }},
.animations = {
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim06,
ANIM_Cleft_Hyper_Anim07,
ANIM_Cleft_Hyper_Anim07,
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim02,
ANIM_Cleft_Hyper_Anim08,
ANIM_Cleft_Hyper_Anim08,
ANIM_Cleft_Hyper_Anim14,
ANIM_Cleft_Hyper_Anim17,
ANIM_Cleft_Hyper_Anim13,
ANIM_Cleft_Hyper_Anim15,
ANIM_Cleft_Hyper_Anim10,
ANIM_Cleft_Hyper_Anim11,
ANIM_Cleft_Hyper_Anim16,
ANIM_Cleft_Hyper_Anim00,
},
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(npcGroupList_80244000) = {
NPC_GROUP(N(npcGroup_80243840), 0x0E09, 0x00),
NPC_GROUP(N(npcGroup_80243A30), 0x0E03, 0x00),
NPC_GROUP(N(npcGroup_80243C20), 0x0E0C, 0x00),
NPC_GROUP(N(npcGroup_80243E10), 0x0E0E, 0x00),
{},
};
static s32 N(pad_403C)[] = {
0x00000000,
};
EvtScript N(makeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 450, 285, 120, 0, 140, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN04_ItemBlock_SuperShroom)
EVT_CALL(MakeEntity, EVT_PTR(Entity_YellowBlock), 720, 333, 75, 0, 343, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN04_ItemBlock_Coin)
EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), 600, 290, 200, 0, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_ARN04_MultiCoinBrick)
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 540, 230, 13, 17, GF_ARN04_Item_StarPiece)
EVT_RETURN
EVT_END
};
#include "world/common/enemy/CleftAI.inc.c"

View File

@ -2,21 +2,33 @@
/// @brief Gusty Gulch - Ghost Town 2
#include "common.h"
#include "../arn.h"
#include "message_ids.h"
#include "map.h"
#include "../arn.h"
#include "mapfs/arn_05_shape.h"
#include "mapfs/arn_05_hit.h"
#include "sprite/npc/Boo.h"
#include "sprite/npc/WorldBow.h"
#include "sprite/npc/WorldTubba.h"
enum {
NPC_Boo_01 = 0,
NPC_Boo_02 = 1,
NPC_Boo_03 = 2,
NPC_Boo_04 = 3,
NPC_Boo_05 = 4,
NPC_Tubba = 5,
NPC_Boo_06 = 6,
NPC_Boo_07 = 7,
NPC_Boo_08 = 8,
NPC_Boo_09 = 9,
};
enum {
MV_Unk_00 = MapVar(0),
MV_Unk_01 = MapVar(1),
};
#define NAMESPACE arn_05
ApiStatus func_802D2B50(void);
ApiStatus N(SwitchToPartner)(Evt* script, s32 isInitialCall);
ApiStatus N(func_802412B0_BE8E90)(Evt* script, s32 isInitialCall);
ApiStatus N(func_8024113C_BE8D1C)(Evt* script, s32 isInitialCall);
extern EvtScript N(makeEntities);
extern EvtScript N(main);
extern EvtScript N(80241360);
extern EvtScript N(802441FC);
extern NpcGroupList N(npcGroupList_80244FC8);
extern NpcGroupList N(npcGroupList_80244FA4);

View File

@ -1,26 +1,28 @@
#include "arn_05.h"
#include "message_ids.h"
EntryList N(entryList) = {
{ -77.0f, 135.0f, 150.0f, 90.0f },
{ 577.0f, 200.0f, 150.0f, 270.0f },
#include "arn_05.h"
extern EvtScript N(EVS_Main);
EntryList N(Entrances) = {
[arn_05_ENTRY_0] { -77.0, 135.0, 150.0, 90.0 },
[arn_05_ENTRY_1] { 577.0, 200.0, 150.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_arn_05 },
};
EvtScript N(80241360) = {
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-33)
EVT_CASE_LT(STORY_CH3_SAW_TUBBA_EAT_BOO)
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_CASE_LT(-29)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_CASE_LT(-16)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)

View File

@ -0,0 +1,48 @@
#include "arn_05.h"
extern EvtScript N(EVS_SetupTubbaRaid);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);
extern NpcGroupList N(NpcGroup1);
EvtScript N(EVS_ExitWalk_arn_03_1) = EVT_EXIT_WALK(60, arn_05_ENTRY_0, "arn_03", arn_03_ENTRY_1);
EvtScript N(EVS_ExitWalk_arn_02_0) = EVT_EXIT_WALK(60, arn_05_ENTRY_1, "arn_02", arn_02_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_02_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetLoadType, LVar1)
EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT)
EVT_EXEC(EnterSavePoint)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_RETURN
EVT_END_IF
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_GUSTY_GULCH)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_IF_LT(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_ELSE
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(NpcGroup1)))
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupTubbaRaid))
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,972 @@
#include "arn_05.h"
extern EvtScript(N(EVS_SetupMusic));
NpcSettings N(NpcSettings_Tubba) = {
.height = 90,
.radius = 65,
.level = 13,
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
};
#include "world/common/npc/Boo_Patrol.inc.c"
#include "world/common/npc/Boo.inc.c"
EvtScript N(EVS_NpcIdle_Boo_01) = {
EVT_RETURN
EVT_END
};
API_CALLABLE(N(AwaitCDownPress)) {
if (gGameStatusPtr->pressedButtons[0] & BUTTON_C_DOWN) {
return ApiStatus_DONE2;
} else {
return ApiStatus_BLOCK;
}
}
#include "world/common/SwitchToPartner.inc.c"
EvtScript N(EVS_NpcInteract_Boo_01) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_IF_EQ(AF_ARN_06, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0092)
EVT_SET(AF_ARN_06, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0093)
EVT_SET(AF_ARN_06, FALSE)
EVT_END_IF
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0095)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0096)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0097)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0098)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_01_Mourning) = {
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0094)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_02) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_IF_EQ(AF_ARN_07, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_0099)
EVT_SET(AF_ARN_07, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009A)
EVT_SET(AF_ARN_07, FALSE)
EVT_END_IF
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009C)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009D)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009E)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009F)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_02_Mourning) = {
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_009B)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_03) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00A9)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_IF_EQ(GF_ARN05_GaveGiftAdvice, TRUE)
EVT_IF_EQ(AF_ARN_09, TRUE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Wave, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B0)
EVT_END_IF
EVT_ELSE
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Conceal)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Conceal, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AA)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Cower)
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Cower, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AB)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Confused)
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Confused, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AC)
EVT_CALL(ShowChoice, MSG_Choice_001E)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Wave)
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Wave, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AD)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Idle)
EVT_SET(GF_ARN05_GaveGiftAdvice, TRUE)
EVT_SET(AF_ARN_09, TRUE)
EVT_CASE_EQ(1)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Wave)
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Wave, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AD)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Boo_Tan_Idle)
EVT_SET(GF_ARN05_GaveGiftAdvice, TRUE)
EVT_SET(AF_ARN_09, TRUE)
EVT_CASE_EQ(2)
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00AF)
EVT_END_SWITCH
EVT_END_IF
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_04) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B1)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B2)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_05) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_IF_EQ(AF_ARN_08, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B3)
EVT_SET(AF_ARN_08, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B4)
EVT_SET(AF_ARN_08, FALSE)
EVT_END_IF
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B6)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B7)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B8)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B9)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_05_Mourning) = {
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00B5)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_01) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_01)))
EVT_END_IF
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_01)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_02) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_02)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_03) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_03)))
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_SAW_TUBBA_EAT_BOO)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_04) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_04)))
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_SAW_TUBBA_EAT_BOO)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_CASE_GE(STORY_CH5_STAR_SPRIT_DEPARTED)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_05) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_01)))
EVT_END_IF
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_05)))
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Boo_01)[] = {
{
.id = NPC_Boo_01,
.settings = &N(NpcSettings_Boo_Patrol),
.pos = { 55.0f, 195.0f, 160.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_Boo_01),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.territory = {
.patrol = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 2,
.points = {
{ 55, 10, 160 },
{ 75, 10, 160 },
},
.detectShape = SHAPE_CYLINDER,
.detectPos = { 55, 195, 160 },
.detectSize = { 50 },
}
},
.animations = {
.idle = ANIM_Boo_Tan_Idle,
.walk = ANIM_Boo_Tan_Walk,
.run = ANIM_Boo_Tan_Run,
.chase = ANIM_Boo_Tan_Run,
.anim_4 = ANIM_Boo_Tan_Idle,
.anim_5 = ANIM_Boo_Tan_Idle,
.death = ANIM_Boo_Tan_Still,
.hit = ANIM_Boo_Tan_Still,
.anim_8 = ANIM_Boo_Tan_Confused,
.anim_9 = ANIM_Boo_Tan_Run,
.anim_A = ANIM_Boo_Tan_Run,
.anim_B = ANIM_Boo_Tan_Run,
.anim_C = ANIM_Boo_Tan_Run,
.anim_D = ANIM_Boo_Tan_Run,
.anim_E = ANIM_Boo_Tan_Run,
.anim_F = ANIM_Boo_Tan_Run,
},
.tattle = MSG_NpcTattle_ARN_BooD,
},
{
.id = NPC_Boo_02,
.settings = &N(NpcSettings_Boo),
.pos = { 160.0f, 191.0f, 250.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_Boo_02),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Boo_Tan_Idle,
.walk = ANIM_Boo_Tan_Walk,
.run = ANIM_Boo_Tan_Run,
.chase = ANIM_Boo_Tan_Run,
.anim_4 = ANIM_Boo_Tan_Idle,
.anim_5 = ANIM_Boo_Tan_Idle,
.death = ANIM_Boo_Tan_Still,
.hit = ANIM_Boo_Tan_Still,
.anim_8 = ANIM_Boo_Tan_Confused,
.anim_9 = ANIM_Boo_Tan_Run,
.anim_A = ANIM_Boo_Tan_Run,
.anim_B = ANIM_Boo_Tan_Run,
.anim_C = ANIM_Boo_Tan_Run,
.anim_D = ANIM_Boo_Tan_Run,
.anim_E = ANIM_Boo_Tan_Run,
.anim_F = ANIM_Boo_Tan_Run,
},
.tattle = MSG_NpcTattle_ARN_BooE,
},
{
.id = NPC_Boo_03,
.settings = &N(NpcSettings_Boo),
.pos = { 390.0f, 190.0f, 255.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_Boo_03),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Boo_Tan_Idle,
.walk = ANIM_Boo_Tan_Walk,
.run = ANIM_Boo_Tan_Run,
.chase = ANIM_Boo_Tan_Run,
.anim_4 = ANIM_Boo_Tan_Idle,
.anim_5 = ANIM_Boo_Tan_Idle,
.death = ANIM_Boo_Tan_Still,
.hit = ANIM_Boo_Tan_Still,
.anim_8 = ANIM_Boo_Tan_Confused,
.anim_9 = ANIM_Boo_Tan_Run,
.anim_A = ANIM_Boo_Tan_Run,
.anim_B = ANIM_Boo_Tan_Run,
.anim_C = ANIM_Boo_Tan_Run,
.anim_D = ANIM_Boo_Tan_Run,
.anim_E = ANIM_Boo_Tan_Run,
.anim_F = ANIM_Boo_Tan_Run,
},
.tattle = MSG_NpcTattle_ARN_BooF,
},
{
.id = NPC_Boo_04,
.settings = &N(NpcSettings_Boo),
.pos = { 503.0f, 206.0f, 210.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_Boo_04),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Boo_Tan_Idle,
.walk = ANIM_Boo_Tan_Walk,
.run = ANIM_Boo_Tan_Run,
.chase = ANIM_Boo_Tan_Run,
.anim_4 = ANIM_Boo_Tan_Idle,
.anim_5 = ANIM_Boo_Tan_Idle,
.death = ANIM_Boo_Tan_Still,
.hit = ANIM_Boo_Tan_Still,
.anim_8 = ANIM_Boo_Tan_Confused,
.anim_9 = ANIM_Boo_Tan_Run,
.anim_A = ANIM_Boo_Tan_Run,
.anim_B = ANIM_Boo_Tan_Run,
.anim_C = ANIM_Boo_Tan_Run,
.anim_D = ANIM_Boo_Tan_Run,
.anim_E = ANIM_Boo_Tan_Run,
.anim_F = ANIM_Boo_Tan_Run,
},
.tattle = MSG_NpcTattle_ARN_BooG,
},
{
.id = NPC_Boo_05,
.settings = &N(NpcSettings_Boo_Patrol),
.pos = { 350.0f, 185.0f, 197.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_Boo_05),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.territory = {
.patrol = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 2,
.points = {
{ 350, 10, 197 },
{ 330, 10, 197 },
},
.detectShape = SHAPE_CYLINDER,
.detectPos = { 350, 185, 197 },
.detectSize = { 50 },
}
},
.animations = {
.idle = ANIM_Boo_Tan_Idle,
.walk = ANIM_Boo_Tan_Walk,
.run = ANIM_Boo_Tan_Run,
.chase = ANIM_Boo_Tan_Run,
.anim_4 = ANIM_Boo_Tan_Idle,
.anim_5 = ANIM_Boo_Tan_Idle,
.death = ANIM_Boo_Tan_Still,
.hit = ANIM_Boo_Tan_Still,
.anim_8 = ANIM_Boo_Tan_Confused,
.anim_9 = ANIM_Boo_Tan_Run,
.anim_A = ANIM_Boo_Tan_Run,
.anim_B = ANIM_Boo_Tan_Run,
.anim_C = ANIM_Boo_Tan_Run,
.anim_D = ANIM_Boo_Tan_Run,
.anim_E = ANIM_Boo_Tan_Run,
.anim_F = ANIM_Boo_Tan_Run,
},
.tattle = MSG_NpcTattle_ARN_BooH,
},
};
EvtScript N(EVS_TubbaWalking) = {
EVT_LOOP(LVar0)
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_20F6, 0)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(0.5))
EVT_WAIT(5)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_TubbaRaid) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(NpcFacePlayer, NPC_Boo_03, 1)
EVT_CALL(PlaySoundAtNpc, NPC_Boo_03, SOUND_262, 0)
EVT_CALL(ShowEmote, NPC_Boo_03, EMOTE_EXCLAMATION, -45, 20, TRUE, 0, 0, 0, 0)
EVT_WAIT(20)
EVT_CALL(GetNpcPos, NPC_Boo_03, LVar0, LVar1, LVar2)
EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5)
EVT_SUB(LVar0, LVar3)
EVT_SUB(LVar0, 50)
EVT_SUB(LVar1, LVar4)
EVT_SUB(LVar2, LVar5)
EVT_CALL(GetNpcPos, NPC_Boo_03, LVar3, LVar4, LVar5)
EVT_SUB(LVar3, LVar0)
EVT_SUB(LVar4, LVar1)
EVT_SUB(LVar5, LVar2)
EVT_CALL(NpcMoveTo, NPC_Boo_03, LVar3, LVar5, 30)
EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0))
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 350)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00A0)
EVT_CALL(PlaySoundAt, SOUND_20F6, 0, 450, 200, 160)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(0.8))
EVT_CALL(PlaySoundAtNpc, NPC_Boo_01, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, NPC_Boo_02, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, NPC_Boo_03, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, NPC_Boo_05, SOUND_262, 0)
EVT_CALL(ShowEmote, NPC_Boo_01, EMOTE_EXCLAMATION, -45, 20, TRUE, 0, 0, 0, 0)
EVT_CALL(ShowEmote, NPC_Boo_02, EMOTE_EXCLAMATION, -45, 20, TRUE, 0, 0, 0, 0)
EVT_CALL(ShowEmote, NPC_Boo_03, EMOTE_EXCLAMATION, -45, 20, TRUE, 0, 0, 0, 0)
EVT_CALL(ShowEmote, NPC_Boo_05, EMOTE_EXCLAMATION, -45, 20, TRUE, 0, 0, 0, 0)
EVT_CALL(FadeOutMusic, 0, 500)
EVT_CALL(ClearAmbientSounds, 250)
EVT_WAIT(20)
EVT_CALL(InterpNpcYaw, NPC_Boo_03, 90, 1)
EVT_CALL(InterpNpcYaw, NPC_Boo_05, 90, 1)
EVT_WAIT(20)
EVT_CALL(PlaySound, SOUND_BOO_APPEAR)
EVT_SETF(LVar0, EVT_FLOAT(240.0))
EVT_LOOP(20)
EVT_SUBF(LVar0, EVT_FLOAT(12.0))
EVT_CALL(func_802CFD30, NPC_Boo_01, 7, LVar0, 0, 0, 0)
EVT_CALL(func_802CFD30, NPC_Boo_02, 7, LVar0, 0, 0, 0)
EVT_CALL(func_802CFD30, NPC_Boo_05, 7, LVar0, 0, 0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_Boo_01, 420, 300, 220)
EVT_CALL(SetNpcPos, NPC_Boo_02, 460, 250, 210)
EVT_CALL(SetNpcPos, NPC_Boo_05, 0, -1000, 0)
EVT_CALL(EnableNpcShadow, NPC_Boo_01, FALSE)
EVT_CALL(EnableNpcShadow, NPC_Boo_02, FALSE)
EVT_CALL(EnableNpcShadow, NPC_Boo_05, FALSE)
EVT_CALL(PlaySound, SOUND_BOO_VANISH)
EVT_SETF(LVar0, EVT_FLOAT(0.0))
EVT_LOOP(20)
EVT_ADDF(LVar0, EVT_FLOAT(12.0))
EVT_CALL(func_802CFD30, NPC_Boo_01, 7, LVar0, 0, 0, 0)
EVT_CALL(func_802CFD30, NPC_Boo_02, 7, LVar0, 0, 0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 0, MSG_CH3_00A1)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_IF_NE(LVar0, PARTNER_BOW)
EVT_CALL(N(SwitchToPartner), PARTNER_BOW)
EVT_THREAD
EVT_SET(MV_Unk_00, 0)
EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00A2, 160, 40)
EVT_SET(MV_Unk_00, 1)
EVT_END_THREAD
EVT_WAIT(50)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetNpcYaw, NPC_PARTNER, 90)
EVT_CALL(EnablePartnerAI)
EVT_LOOP(0)
EVT_WAIT(1)
EVT_IF_EQ(MV_Unk_00, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_IF
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00A3)
EVT_CALL(EnablePartnerAI)
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_WAIT(5)
EVT_CALL(N(AwaitCDownPress))
EVT_CALL(CloseMessage)
EVT_CALL(ForceUsePartner)
EVT_WAIT(60)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 1, 8)
EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.5))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 450)
EVT_CALL(SetCamPosA, CAM_DEFAULT, -40, 206)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 530, 206)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 426, 190, 194)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetNpcFlagBits, NPC_Tubba, NPC_FLAG_GRAVITY, TRUE)
EVT_CALL(SetNpcSpeed, NPC_Tubba, EVT_FLOAT(2.5))
EVT_CALL(SetNpcPos, NPC_Tubba, 675, 200, 180)
EVT_CALL(NpcFaceNpc, NPC_Boo_01, NPC_Tubba, 1)
EVT_CALL(NpcFaceNpc, NPC_Boo_02, NPC_Tubba, 1)
EVT_CALL(SetNpcPos, NPC_Boo_03, 272, 190, 214)
EVT_CALL(PlaySoundAtNpc, NPC_Boo_01, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, NPC_Boo_02, SOUND_262, 0)
EVT_CALL(ShowEmote, NPC_Boo_01, EMOTE_EXCLAMATION, 45, 20, TRUE, 0, 0, 0, 0)
EVT_CALL(ShowEmote, NPC_Boo_02, EMOTE_EXCLAMATION, 45, 20, TRUE, 0, 0, 0, 0)
EVT_THREAD
EVT_CALL(PlaySound, SOUND_BOO_APPEAR)
EVT_WAIT(20)
EVT_SETF(LVar0, EVT_FLOAT(240.0))
EVT_LOOP(20)
EVT_SUBF(LVar0, EVT_FLOAT(12.0))
EVT_CALL(func_802CFD30, 0, 7, LVar0, 0, 0, 0)
EVT_CALL(func_802CFD30, 1, 7, LVar0, 0, 0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_Boo_01, 0, -1000, 0)
EVT_CALL(SetNpcPos, NPC_Boo_02, 0, -1000, 0)
EVT_WAIT(10)
EVT_END_THREAD
EVT_SET(LVar0, 4)
EVT_EXEC(N(EVS_TubbaWalking))
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09)
EVT_CALL(NpcMoveTo, NPC_Tubba, 550, 196, 0)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.5))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 375)
EVT_CALL(SetCamPosA, CAM_DEFAULT, -40, 206)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 530, 206)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 426, 190, 194)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_WAIT(30)
EVT_SET(MV_Unk_01, 0)
EVT_THREAD
EVT_SET(LVar0, 7)
EVT_EXEC(N(EVS_TubbaWalking))
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09)
EVT_CALL(NpcMoveTo, NPC_Tubba, 370, 220, 0)
EVT_CALL(GetNpcPos, NPC_Boo_03, LVar0, LVar1, LVar2)
EVT_CALL(NpcMoveTo, NPC_Tubba, 330, LVar2, 0)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06)
EVT_SET(MV_Unk_01, 1)
EVT_END_THREAD
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.5))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 375)
EVT_CALL(SetCamPosA, CAM_DEFAULT, -40, 206)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 530, 206)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 240, 169, 206)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 0, MSG_CH3_00A4)
EVT_WAIT(15)
EVT_LOOP(0)
EVT_WAIT(1)
EVT_IF_EQ(MV_Unk_01, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(NpcFaceNpc, NPC_Boo_03, NPC_Tubba, 1)
EVT_WAIT(30)
EVT_CALL(SpeakToPlayer, NPC_Boo_03, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00A5)
EVT_CALL(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Cower)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1E)
EVT_CALL(SetNpcJumpscale, NPC_Boo_03, EVT_FLOAT(0.0))
EVT_CALL(NpcJump1, NPC_Boo_03, 265, 206, 212, 3)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim1E, ANIM_WorldTubba_Anim1E, 5, MSG_CH3_00A6)
EVT_CALL(SetNpcPos, NPC_Boo_03, 303, 237, 228)
EVT_CALL(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Flail)
EVT_CALL(EnableNpcShadow, NPC_Boo_03, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1F)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-17.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 250)
EVT_CALL(SetCamPosA, CAM_DEFAULT, -40, 206)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 530, 206)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 280, 169, 206)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_THREAD
EVT_WAIT(50)
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_315, 0)
EVT_END_THREAD
EVT_WAIT(40)
EVT_CALL(SetNpcPos, NPC_Boo_03, 0, -1000, 0)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim20)
EVT_WAIT(80)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-11.5))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 375)
EVT_CALL(SetCamPosA, CAM_DEFAULT, -40, 206)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 530, 206)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 240, 169, 206)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06)
EVT_WAIT(15)
EVT_CALL(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim21, ANIM_WorldTubba_Anim06, 5, MSG_CH3_00A7)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim21)
EVT_CALL(GetNpcPos, NPC_Tubba, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, -50)
EVT_ADD(LVar1, 50)
EVT_ADD(LVar2, 10)
EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 1, LVar0, LVar1, LVar2, 10)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06)
EVT_CALL(InterpNpcYaw, NPC_Tubba, 90, 1)
EVT_WAIT(30)
EVT_SET(LVar0, 7)
EVT_EXEC(N(EVS_TubbaWalking))
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim09)
EVT_CALL(NpcMoveTo, NPC_Tubba, 370, 220, 0)
EVT_CALL(NpcMoveTo, NPC_Tubba, 550, 196, 0)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06)
EVT_CALL(SetNpcPos, NPC_Tubba, 0, -1000, 0)
EVT_CALL(SetNpcFlagBits, NPC_Tubba, NPC_FLAG_GRAVITY, FALSE)
EVT_CALL(NpcFacePlayer, NPC_Boo_01, 3)
EVT_CALL(SetNpcPos, NPC_Boo_01, 55, 195, 160)
EVT_CALL(SetNpcPos, NPC_Boo_02, 160, 191, 250)
EVT_CALL(SetNpcPos, NPC_Boo_05, 350, 185, 197)
EVT_CALL(EnableNpcShadow, NPC_Boo_01, TRUE)
EVT_CALL(EnableNpcShadow, NPC_Boo_02, TRUE)
EVT_CALL(EnableNpcShadow, NPC_Boo_05, TRUE)
EVT_CALL(PlaySound, SOUND_BOO_VANISH)
EVT_SETF(LVar0, EVT_FLOAT(0.0))
EVT_LOOP(20)
EVT_ADDF(LVar0, EVT_FLOAT(12.5))
EVT_CALL(func_802CFD30, 0, 7, LVar0, 0, 0, 0)
EVT_CALL(func_802CFD30, 1, 7, LVar0, 0, 0, 0)
EVT_CALL(func_802CFD30, 4, 7, LVar0, 0, 0, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(func_802CFD30, 0, 0, 0, 0, 0, 0)
EVT_CALL(func_802CFD30, 1, 0, 0, 0, 0, 0)
EVT_CALL(func_802CFD30, 4, 0, 0, 0, 0, 0)
EVT_WAIT(10)
EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
EVT_CALL(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00A8)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupTubbaRaid) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO)
EVT_CALL(SetNpcPos, NPC_Boo_03, 330, 184, 240)
EVT_LOOP(0)
EVT_SET(LVarA, 0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_GE(LVar2, 110)
EVT_IF_GE(LVar0, 220)
EVT_SET(LVarA, 1)
EVT_END_IF
EVT_END_IF
EVT_IF_EQ(LVarA, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(InterruptUsePartner)
EVT_EXEC_WAIT(N(EVS_Scene_TubbaRaid))
EVT_CALL(BindNpcInteract, NPC_Boo_01, EVT_PTR(N(EVS_NpcInteract_Boo_01_Mourning)))
EVT_CALL(BindNpcInteract, NPC_Boo_02, EVT_PTR(N(EVS_NpcInteract_Boo_02_Mourning)))
EVT_CALL(BindNpcInteract, NPC_Boo_05, EVT_PTR(N(EVS_NpcInteract_Boo_05_Mourning)))
EVT_SET(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO)
EVT_EXEC(N(EVS_SetupMusic))
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Tubba) = {
EVT_IF_GE(GB_StoryProgress, STORY_CH3_SAW_TUBBA_EAT_BOO)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
s32 N(extraAnimationList_80244390)[] = {
ANIM_WorldTubba_Anim06,
ANIM_WorldTubba_Anim09,
ANIM_WorldTubba_Anim1E,
ANIM_WorldTubba_Anim1F,
ANIM_WorldTubba_Anim20,
ANIM_WorldTubba_Anim21,
-1
};
StaticNpc N(NpcData_Tubba) = {
.id = NPC_Tubba,
.settings = &N(NpcSettings_Tubba),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_Tubba),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_WorldTubba_Anim06,
.walk = ANIM_WorldTubba_Anim09,
.run = ANIM_WorldTubba_Anim0C,
.chase = ANIM_WorldTubba_Anim0C,
.anim_4 = ANIM_WorldTubba_Anim00,
.anim_5 = ANIM_WorldTubba_Anim00,
.death = ANIM_WorldTubba_Anim00,
.hit = ANIM_WorldTubba_Anim00,
.anim_8 = ANIM_WorldTubba_Anim00,
.anim_9 = ANIM_WorldTubba_Anim00,
.anim_A = ANIM_WorldTubba_Anim00,
.anim_B = ANIM_WorldTubba_Anim00,
.anim_C = ANIM_WorldTubba_Anim00,
.anim_D = ANIM_WorldTubba_Anim00,
.anim_E = ANIM_WorldTubba_Anim00,
.anim_F = ANIM_WorldTubba_Anim00,
},
.extraAnimations = N(extraAnimationList_80244390),
};
EvtScript N(EVS_NpcIdle_Boo_06) = {
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SET(LVar3, LVar0)
EVT_ADD(LVar3, -60)
EVT_SET(LVar4, LVar0)
EVT_ADD(LVar4, 60)
EVT_LOOP(0)
EVT_CALL(RandInt, 5, LVar5)
EVT_SETF(LVar6, LVar5)
EVT_MULF(LVar6, EVT_FLOAT(0.1))
EVT_ADDF(LVar6, EVT_FLOAT(0.8))
EVT_CALL(SetNpcSpeed, NPC_SELF, LVar6)
EVT_CALL(NpcMoveTo, NPC_SELF, LVar3, LVar2, 0)
EVT_CALL(RandInt, 5, LVar5)
EVT_SETF(LVar6, LVar5)
EVT_MULF(LVar6, EVT_FLOAT(0.1))
EVT_ADDF(LVar6, EVT_FLOAT(0.8))
EVT_CALL(SetNpcSpeed, NPC_SELF, LVar6)
EVT_CALL(NpcMoveTo, NPC_SELF, LVar4, LVar2, 0)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_06) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06)))
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_07) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06)))
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_08) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06)))
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_09) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo_06)))
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Boo_06)[] = {
{
.id = NPC_Boo_06,
.settings = &N(NpcSettings_Boo),
.pos = { 36.0f, 277.0f, 140.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000,
.init = &N(EVS_NpcInit_Boo_06),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Boo_Tan_Idle,
.walk = ANIM_Boo_Tan_Walk,
.run = ANIM_Boo_Tan_Run,
.chase = ANIM_Boo_Tan_Run,
.anim_4 = ANIM_Boo_Tan_Idle,
.anim_5 = ANIM_Boo_Tan_Idle,
.death = ANIM_Boo_Tan_Still,
.hit = ANIM_Boo_Tan_Still,
.anim_8 = ANIM_Boo_Tan_Confused,
.anim_9 = ANIM_Boo_Tan_Run,
.anim_A = ANIM_Boo_Tan_Run,
.anim_B = ANIM_Boo_Tan_Run,
.anim_C = ANIM_Boo_Tan_Run,
.anim_D = ANIM_Boo_Tan_Run,
.anim_E = ANIM_Boo_Tan_Run,
.anim_F = ANIM_Boo_Tan_Run,
},
},
{
.id = NPC_Boo_07,
.settings = &N(NpcSettings_Boo),
.pos = { 200.0f, 275.0f, 182.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000,
.init = &N(EVS_NpcInit_Boo_07),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Boo_Tan_Idle,
.walk = ANIM_Boo_Tan_Walk,
.run = ANIM_Boo_Tan_Run,
.chase = ANIM_Boo_Tan_Run,
.anim_4 = ANIM_Boo_Tan_Idle,
.anim_5 = ANIM_Boo_Tan_Idle,
.death = ANIM_Boo_Tan_Still,
.hit = ANIM_Boo_Tan_Still,
.anim_8 = ANIM_Boo_Tan_Confused,
.anim_9 = ANIM_Boo_Tan_Run,
.anim_A = ANIM_Boo_Tan_Run,
.anim_B = ANIM_Boo_Tan_Run,
.anim_C = ANIM_Boo_Tan_Run,
.anim_D = ANIM_Boo_Tan_Run,
.anim_E = ANIM_Boo_Tan_Run,
.anim_F = ANIM_Boo_Tan_Run,
},
},
{
.id = NPC_Boo_08,
.settings = &N(NpcSettings_Boo),
.pos = { 379.0f, 300.0f, 192.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000,
.init = &N(EVS_NpcInit_Boo_08),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Boo_Tan_Idle,
.walk = ANIM_Boo_Tan_Walk,
.run = ANIM_Boo_Tan_Run,
.chase = ANIM_Boo_Tan_Run,
.anim_4 = ANIM_Boo_Tan_Idle,
.anim_5 = ANIM_Boo_Tan_Idle,
.death = ANIM_Boo_Tan_Still,
.hit = ANIM_Boo_Tan_Still,
.anim_8 = ANIM_Boo_Tan_Confused,
.anim_9 = ANIM_Boo_Tan_Run,
.anim_A = ANIM_Boo_Tan_Run,
.anim_B = ANIM_Boo_Tan_Run,
.anim_C = ANIM_Boo_Tan_Run,
.anim_D = ANIM_Boo_Tan_Run,
.anim_E = ANIM_Boo_Tan_Run,
.anim_F = ANIM_Boo_Tan_Run,
},
},
{
.id = NPC_Boo_09,
.settings = &N(NpcSettings_Boo),
.pos = { 525.0f, 286.0f, 178.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_400000,
.init = &N(EVS_NpcInit_Boo_09),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Boo_Tan_Idle,
.walk = ANIM_Boo_Tan_Walk,
.run = ANIM_Boo_Tan_Run,
.chase = ANIM_Boo_Tan_Run,
.anim_4 = ANIM_Boo_Tan_Idle,
.anim_5 = ANIM_Boo_Tan_Idle,
.death = ANIM_Boo_Tan_Still,
.hit = ANIM_Boo_Tan_Still,
.anim_8 = ANIM_Boo_Tan_Confused,
.anim_9 = ANIM_Boo_Tan_Run,
.anim_A = ANIM_Boo_Tan_Run,
.anim_B = ANIM_Boo_Tan_Run,
.anim_C = ANIM_Boo_Tan_Run,
.anim_D = ANIM_Boo_Tan_Run,
.anim_E = ANIM_Boo_Tan_Run,
.anim_F = ANIM_Boo_Tan_Run,
},
},
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Tubba)),
NPC_GROUP(N(NpcData_Boo_01)),
{}
};
NpcGroupList N(NpcGroup1) = {
NPC_GROUP(N(NpcData_Tubba)),
NPC_GROUP(N(NpcData_Boo_01)),
NPC_GROUP(N(NpcData_Boo_06)),
{}
};

View File

@ -0,0 +1,8 @@
#include "arn_05.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), 17, 238, 80, 0, MAKE_ENTITY_END)
EVT_RETURN
EVT_END
};

File diff suppressed because it is too large Load Diff

View File

@ -1,382 +0,0 @@
#include "arn_07.h"
#include "effects.h"
#include "sprite/npc/WorldTubba.h"
#include "sprite/npc/TubbasHeart.h"
#include "world/common/StarSpiritEffectFunc.inc.c"
s32 N(itemList_80242040)[] = {
ITEM_MYSTICAL_KEY,
ITEM_NONE,
};
EvtScript N(80242048) = {
EVT_CALL(FadeOutMusic, 0, 1000)
EVT_SET(LVar0, 0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseSettingsFrom, 0, 145, 65, 0)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(0.6))
EVT_CALL(SetPanTarget, 0, 145, 30, 0)
EVT_CALL(GetCamDistance, 0, LVar1)
EVT_SUB(LVar1, 100)
EVT_CALL(SetCamDistance, 0, LVar1)
EVT_IF_NE(10000, 10000)
EVT_CALL(GetCamPitch, 0, LVar2, LVar3)
EVT_CALL(SetCamPitch, 0, LVar2, 10000)
EVT_END_IF
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(N(StarSpiritEffectFunc2), 2, 50, 100, 31, -6, 145, 65, 0, 30, 0)
EVT_THREAD
EVT_CALL(N(StarSpiritEffectFunc3))
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(1)
EVT_CALL(PlaySound, 0x80000067)
EVT_CALL(N(StarSpiritEffectFunc1))
EVT_CALL(StopSound, 0x80000067)
EVT_CALL(PlaySoundAt, 0xB2, 0, 145, 65, 0)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(12)
EVT_CALL(SetPlayerAnimation, 65578)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(50)
EVT_WAIT(115)
EVT_CALL(PlaySoundAt, 0x137, 0, 145, 65, 0)
EVT_END_THREAD
EVT_CALL(N(StarSpiritEffectFunc4), 1)
EVT_THREAD
EVT_WAIT(80)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_END_THREAD
EVT_ADD(LVar1, 100)
EVT_CALL(SetCamDistance, 0, LVar1)
EVT_CALL(SetPanTarget, 0, 145, 0, 0)
EVT_CALL(N(StarSpiritEffectFunc4), 2)
EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4)
EVT_CALL(UseSettingsFrom, 0, LVar2, LVar3, LVar4)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.0))
EVT_CALL(SetPanTarget, 0, LVar2, LVar3, LVar4)
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, 0, 0, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_ELSE
EVT_CALL(N(StarSpiritEffectFunc5), 2, 145, 30, 0, 0)
EVT_THREAD
EVT_CALL(N(StarSpiritEffectFunc6))
EVT_END_THREAD
EVT_WAIT(1)
EVT_END_IF
EVT_CALL(N(StarSpiritEffectFunc4), 3)
EVT_CALL(PlaySoundAtPlayer, 312, 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(GB_StoryProgress, -15)
EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), 2, 14)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(80242498) = {
EVT_SET(LVar0, 1)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseSettingsFrom, 0, 145, 65, 0)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(0.6))
EVT_CALL(SetPanTarget, 0, 145, 30, 0)
EVT_CALL(GetCamDistance, 0, LVar1)
EVT_SUB(LVar1, 100)
EVT_CALL(SetCamDistance, 0, LVar1)
EVT_IF_NE(10000, 10000)
EVT_CALL(GetCamPitch, 0, LVar2, LVar3)
EVT_CALL(SetCamPitch, 0, LVar2, 10000)
EVT_END_IF
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(N(StarSpiritEffectFunc2), 2, 50, 100, 31, -6, 145, 65, 0, 30, 0)
EVT_THREAD
EVT_CALL(N(StarSpiritEffectFunc3))
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(1)
EVT_CALL(PlaySound, 0x80000067)
EVT_CALL(N(StarSpiritEffectFunc1))
EVT_CALL(StopSound, 0x80000067)
EVT_CALL(PlaySoundAt, 0xB2, 0, 145, 65, 0)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(12)
EVT_CALL(SetPlayerAnimation, 65578)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(50)
EVT_WAIT(115)
EVT_CALL(PlaySoundAt, 0x137, 0, 145, 65, 0)
EVT_END_THREAD
EVT_CALL(N(StarSpiritEffectFunc4), 1)
EVT_THREAD
EVT_WAIT(80)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_END_THREAD
EVT_ADD(LVar1, 100)
EVT_CALL(SetCamDistance, 0, LVar1)
EVT_CALL(SetPanTarget, 0, 145, 0, 0)
EVT_CALL(N(StarSpiritEffectFunc4), 2)
EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4)
EVT_CALL(UseSettingsFrom, 0, LVar2, LVar3, LVar4)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(1.0))
EVT_CALL(SetPanTarget, 0, LVar2, LVar3, LVar4)
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, 0, 0, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_ELSE
EVT_CALL(N(StarSpiritEffectFunc5), 2, 145, 30, 0, 0)
EVT_THREAD
EVT_CALL(N(StarSpiritEffectFunc6))
EVT_END_THREAD
EVT_WAIT(1)
EVT_END_IF
EVT_CALL(N(StarSpiritEffectFunc4), 3)
EVT_CALL(PlaySoundAtPlayer, 312, 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(GB_StoryProgress, -15)
EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), 2, 14)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitSingleDoor_802428D4) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 10)
EVT_SET(LVar2, 29)
EVT_SET(LVar3, 1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("arn_08"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitWalk_80242978) = EVT_EXIT_WALK(60, 1, "arn_03", 0);
EvtScript N(exitWalk_802429D4) = EVT_EXIT_WALK(60, 2, "mim_12", 1);
static const f64 rodata_alignment = 0.0;
EvtScript N(80242A30) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetPlayerPos, -28, 0, -333)
EVT_CALL(SetNpcPos, NPC_PARTNER, -28, 0, -333)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0))
EVT_CALL(SetCamType, 0, 0, 0)
EVT_CALL(SetCamPitch, 0, EVT_FLOAT(25.0), EVT_FLOAT(-4.0))
EVT_CALL(SetCamDistance, 0, 1100)
EVT_CALL(SetCamPosA, 0, 500, 0)
EVT_CALL(SetCamPosB, 0, 0, -500)
EVT_CALL(SetCamPosC, 0, 0, 0)
EVT_CALL(SetPanTarget, 0, 5, 0, -147)
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(RotateModel, 29, 80, 0, -1, 0)
EVT_CALL(PlaySoundAtNpc, 0, 0x20C8, 0)
EVT_CALL(SetNpcJumpscale, 0, EVT_FLOAT(2.5))
EVT_CALL(NpcJump0, 0, 0, 20, -120, 8)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, 0, 0x20C8, 0)
EVT_CALL(NpcJump0, 0, 0, 10, -60, 12)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, 0, 0x20C8, 0)
EVT_CALL(NpcJump0, 0, 0, 0, 0, 12)
EVT_WAIT(1)
EVT_CALL(SetNpcVar, 0, 0, 0)
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(PlaySoundAtNpc, 0, 0x20C8, 0)
EVT_CALL(NpcJump0, 0, 0, 0, 0, 10)
EVT_WAIT(1)
EVT_CALL(GetNpcVar, 0, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcVar, 0, 0, 2)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(MakeLerp, 80, 0, 10, 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, 29, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(PlaySoundAtCollider, 10, 450, 0)
EVT_END_THREAD
EVT_CALL(NpcFaceNpc, 0, 1, 0)
EVT_CALL(SpeakToPlayer, 0, ANIM_TubbasHeart_Anim0A, ANIM_TubbasHeart_Anim01, 5, MSG_CH3_00C7)
EVT_CALL(SetNpcVar, 0, 0, 1)
EVT_LOOP(0)
EVT_CALL(GetNpcVar, 0, 0, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(PlaySoundAtNpc, 0, 0x20C8, 0)
EVT_CALL(NpcJump0, 0, 75, 0, 10, 12)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, 0, 0x20C8, 0)
EVT_CALL(NpcJump0, 0, 150, 0, 20, 12)
EVT_WAIT(1)
EVT_THREAD
EVT_WAIT(4)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0))
EVT_CALL(SetCamPitch, 0, EVT_FLOAT(2.0), EVT_FLOAT(-9.0))
EVT_CALL(SetCamDistance, 0, 700)
EVT_CALL(SetCamPosA, 0, 500, 0)
EVT_CALL(SetCamPosB, 0, 0, -500)
EVT_CALL(SetCamPosC, 0, 0, 0)
EVT_CALL(SetPanTarget, 0, 65, 0, -137)
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(SetNpcAnimation, 1, ANIM_WorldTubba_Anim22)
EVT_END_THREAD
EVT_CALL(PlaySoundAtNpc, 0, 0x20C8, 0)
EVT_CALL(NpcJump0, 0, 298, 56, 31, 18)
EVT_CALL(SetNpcPos, 0, 0, -1000, 0)
EVT_CALL(EnableNpcShadow, 0, FALSE)
EVT_THREAD
EVT_CALL(SetNpcAnimation, 1, ANIM_WorldTubba_Anim23)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, 1, ANIM_WorldTubba_Anim06)
EVT_END_THREAD
EVT_WAIT(20)
EVT_THREAD
EVT_CALL(PlaySoundAtCollider, 10, 449, 0)
EVT_CALL(MakeLerp, 0, 80, 10, 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, 29, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(30)
EVT_CALL(UseSettingsFrom, 0, 236, 0, -46)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0))
EVT_CALL(SetCamPitch, 0, EVT_FLOAT(8.0), EVT_FLOAT(-9.0))
EVT_CALL(SetCamDistance, 0, 450)
EVT_CALL(SetPanTarget, 0, 250, 0, -46)
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_END_THREAD
EVT_CALL(ModifyColliderFlags, 0, 10, 0x7FFFFE00)
EVT_CALL(SetPlayerPos, 0, 20, -195)
EVT_CALL(SetNpcPos, NPC_PARTNER, 0, 20, -195)
EVT_CALL(EnablePartnerAI)
EVT_CALL(PlayerMoveTo, 0, 0, 45)
EVT_CALL(ModifyColliderFlags, 1, 10, 0x7FFFFE00)
EVT_THREAD
EVT_CALL(MakeLerp, 80, 0, 10, 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, 29, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(PlaySoundAtCollider, 10, 450, 0)
EVT_END_THREAD
EVT_CALL(PlayerMoveTo, 200, 0, 35)
EVT_WAIT(5)
EVT_CALL(SpeakToPlayer, 1, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 0, MSG_CH3_00C8)
EVT_CALL(SetNpcVar, 1, 0, 1)
EVT_WAIT(30)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(802433C8) = {
EVT_BIND_TRIGGER(N(exitWalk_80242978), TRIGGER_FLOOR_ABOVE, 5, 1, 0)
EVT_BIND_TRIGGER(N(exitWalk_802429D4), TRIGGER_FLOOR_ABOVE, 1, 1, 0)
EVT_IF_LT(GB_StoryProgress, -24)
EVT_BIND_PADLOCK(N(802439B0), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(itemList_80242040)), 0, 1)
EVT_ELSE
EVT_BIND_TRIGGER(N(exitSingleDoor_802428D4), TRIGGER_WALL_PRESS_A, 10, 1, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(enterWalk_8024346C) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_IF_EQ(GB_StoryProgress, -17)
EVT_EXEC_WAIT(N(80242A30))
EVT_EXEC(N(802433C8))
EVT_ELSE
EVT_SET(LVar2, 29)
EVT_SET(LVar3, 1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(802433C8))
EVT_END_IF
EVT_CASE_EQ(1)
EVT_SET(LVar0, EVT_PTR(N(802433C8)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_CASE_EQ(2)
EVT_SET(LVar0, EVT_PTR(N(802433C8)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_CASE_EQ(3)
EVT_EXEC(N(802433C8))
EVT_WAIT(1)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 34)
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096)
EVT_CALL(SetCamBGColor, 0, 0, 0, 0)
EVT_CALL(SetCamLeadPlayer, 0, 0)
EVT_CALL(SetCamEnabled, 0, 1)
EVT_SET(GF_MAP_GustyGulch, 1)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-26)
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_802478B8)))
EVT_CASE_LT(-14)
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_8024787C)))
EVT_CASE_EQ(-14)
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_802478E8)))
EVT_CASE_DEFAULT
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_802478B8)))
EVT_END_SWITCH
EVT_EXEC_WAIT(N(makeEntities))
EVT_IF_EQ(GB_StoryProgress, -16)
EVT_EXEC(N(80242498))
EVT_END_IF
EVT_EXEC(N(enterWalk_8024346C))
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, 3)
EVT_WAIT(65)
EVT_END_IF
EVT_EXEC(N(80243790))
EVT_EXEC(N(80241F10))
EVT_CALL(UseDoorSounds, 0)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(0.3))
EVT_RETURN
EVT_END
};

View File

@ -1,11 +0,0 @@
#include "arn_07.h"
ApiStatus N(func_80240800_BED5F0)(Evt* script, s32 isInitialCall) {
f32 temp_f0 = evt_get_float_variable(script, LVar0);
if (temp_f0 >= 360.0) {
temp_f0 -= 360.0;
}
evt_set_float_variable(script, LVar0, temp_f0);
return ApiStatus_DONE2;
}

View File

@ -1,5 +0,0 @@
#include "arn_07.h"
#include "world/common/SetEntityFlags100000.inc.c"
#include "world/common/GetEntityPosition.inc.c"

View File

@ -2,49 +2,40 @@
/// @brief Gusty Gulch - Windmill Exterior
#include "common.h"
#include "../arn.h"
#include "message_ids.h"
#include "map.h"
#define NAMESPACE arn_07
#include "../arn.h"
#include "mapfs/arn_07_shape.h"
#include "mapfs/arn_07_hit.h"
#include "sprite/npc/TubbasHeart.h"
#include "sprite/npc/WorldTubba.h"
#include "sprite/npc/WorldBow.h"
#include "sprite/npc/Boo.h"
#include "sprite/npc/Bootler.h"
#include "sprite/npc/WorldSkolar.h"
#include "sprite/npc/Paragoomba.h"
enum {
NPC_TUBBAS_HEART,
NPC_WORLD_TUBBA,
NPC_BOO0,
NPC_BOO1,
NPC_BOO2,
NPC_BOO3,
NPC_BOO4,
NPC_BOO5,
NPC_WORLD_BOW,
NPC_BOOTLER,
NPC_PARAGOOMBA0,
NPC_PARAGOOMBA1,
NPC_PARAGOOMBA2,
NPC_WORLD_SKOLAR,
NPC_TubbasHeart = 0,
NPC_Tubba = 1,
NPC_Boo_01 = 2,
NPC_Boo_02 = 3,
NPC_Boo_03 = 4,
NPC_Boo_04 = 5,
NPC_Boo_05 = 6,
NPC_Boo_06 = 7,
NPC_Bow = 8,
NPC_Bootler = 9,
NPC_HyperParagoomba_01 = 10,
NPC_HyperParagoomba_02 = 11,
NPC_HyperParagoomba_03 = 12,
NPC_Skolar = 13,
};
ApiStatus N(arn_07_StarSpiritEffectFunc1)(Evt* script, s32 isInitialCall);
ApiStatus N(arn_07_StarSpiritEffectFunc2)(Evt* script, s32 isInitialCall);
ApiStatus N(arn_07_StarSpiritEffectFunc3)(Evt* script, s32 isInitialCall);
ApiStatus N(arn_07_StarSpiritEffectFunc4)(Evt* script, s32 isInitialCall);
ApiStatus N(arn_07_StarSpiritEffectFunc5)(Evt* script, s32 isInitialCall);
ApiStatus N(arn_07_StarSpiritEffectFunc6)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80240800_BED5F0)(Evt* script, s32 isInitialCall);
ApiStatus N(FlyingAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(SetEntityFlags100000)(Evt* script, s32 isInitialCall);
ApiStatus N(GetEntityPosition)(Evt* script, s32 isInitialCall);
ApiStatus PostChapter3StatUpdate(Evt* script, s32 isInitialCall);
enum {
MV_Unk_00 = MapVar(0),
};
extern EvtScript N(exitSingleDoor_802428D4);
extern NpcGroupList N(npcGroupList_8024787C);
extern NpcGroupList N(npcGroupList_802478B8);
extern NpcGroupList N(npcGroupList_802478E8);
extern EvtScript N(80243790);
extern EvtScript N(802437AC);
extern EvtScript N(802439B0);
extern EvtScript N(80242048);
extern EvtScript N(80241F10);
extern EvtScript N(main);
extern EvtScript N(makeEntities);
#define NAMESPACE arn_07

View File

@ -1,33 +1,34 @@
#include "arn_07.h"
#include "message_ids.h"
EntryList N(entryList) = {
{ 0.0f, 20.0f, -147.0f, 180.0f },
{ 485.0f, 0.0f, 0.0f, 270.0f },
{ -488.0f, 0.0f, 0.0f, 90.0f },
{ 194.0f, 0.0f, 0.0f, 0.0f },
extern EvtScript N(EVS_Main);
EntryList N(Entrances) = {
[arn_07_ENTRY_0] { 0.0, 20.0, -147.0, 180.0 },
[arn_07_ENTRY_1] { 485.0, 0.0, 0.0, 270.0 },
[arn_07_ENTRY_2] { -488.0, 0.0, 0.0, 90.0 },
[arn_07_ENTRY_3] { 194.0, 0.0, 0.0, 0.0 },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_arn_07 },
};
EvtScript N(80241F10) = {
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_CALL(PlayAmbientSounds, AMBIENT_WIND)
EVT_CASE_LT(-17)
EVT_CASE_LT(STORY_CH3_HEART_ESCAPED_WINDY_MILL)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CALL(PlayAmbientSounds, AMBIENT_WIND)
EVT_CASE_LT(-16)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8)
EVT_CALL(PlayAmbientSounds, AMBIENT_WIND)
EVT_CASE_EQ(-14)
EVT_CASE_EQ(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)

View File

@ -0,0 +1,368 @@
#include "arn_07.h"
extern EvtScript N(EVS_MakeEntities);
extern EvtScript N(EVS_UnlockDoor);
extern EvtScript N(EVS_SetupWindmill);
extern EvtScript N(EVS_SetupMusic);
extern NpcGroupList N(DefaultNPCs);
extern NpcGroupList N(BossNPCs);
extern NpcGroupList N(SpiritNPCs);
#include "world/common/StarSpiritEffectFunc.inc.c"
s32 N(KeyList)[] = {
ITEM_MYSTICAL_KEY,
ITEM_NONE
};
EvtScript N(EVS_SpawnStarCard) = {
EVT_CALL(FadeOutMusic, 0, 1000)
EVT_SET(LVar0, 0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 145, 65, 0)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6))
EVT_CALL(SetPanTarget, CAM_DEFAULT, 145, 30, 0)
EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar1)
EVT_SUB(LVar1, 100)
EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1)
EVT_IF_NE(10000, 10000)
EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar2, LVar3)
EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar2, 10000)
EVT_END_IF
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(N(StarSpiritEffectFunc2), 2, 50, 100, 31, -6, 145, 65, 0, 30, 0)
EVT_THREAD
EVT_CALL(N(StarSpiritEffectFunc3))
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(1)
EVT_CALL(PlaySound, SOUND_80000067)
EVT_CALL(N(StarSpiritEffectFunc1))
EVT_CALL(StopSound, SOUND_80000067)
EVT_CALL(PlaySoundAt, SOUND_B2, 0, 145, 65, 0)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(12)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(50)
EVT_WAIT(115)
EVT_CALL(PlaySoundAt, SOUND_137, 0, 145, 65, 0)
EVT_END_THREAD
EVT_CALL(N(StarSpiritEffectFunc4), 1)
EVT_THREAD
EVT_WAIT(80)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_END_THREAD
EVT_ADD(LVar1, 100)
EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 145, 0, 0)
EVT_CALL(N(StarSpiritEffectFunc4), 2)
EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_ELSE
EVT_CALL(N(StarSpiritEffectFunc5), 2, 145, 30, 0, 0)
EVT_THREAD
EVT_CALL(N(StarSpiritEffectFunc6))
EVT_END_THREAD
EVT_WAIT(1)
EVT_END_IF
EVT_CALL(N(StarSpiritEffectFunc4), 3)
EVT_CALL(PlaySoundAtPlayer, SOUND_138, 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED)
EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_2, TRANSITION_14)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_RespawnStarCard) = {
EVT_SET(LVar0, 1)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 145, 65, 0)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.6))
EVT_CALL(SetPanTarget, CAM_DEFAULT, 145, 30, 0)
EVT_CALL(GetCamDistance, CAM_DEFAULT, LVar1)
EVT_SUB(LVar1, 100)
EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1)
EVT_IF_NE(10000, 10000)
EVT_CALL(GetCamPitch, CAM_DEFAULT, LVar2, LVar3)
EVT_CALL(SetCamPitch, CAM_DEFAULT, LVar2, 10000)
EVT_END_IF
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(N(StarSpiritEffectFunc2), 2, 50, 100, 31, -6, 145, 65, 0, 30, 0)
EVT_THREAD
EVT_CALL(N(StarSpiritEffectFunc3))
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(1)
EVT_CALL(PlaySound, SOUND_80000067)
EVT_CALL(N(StarSpiritEffectFunc1))
EVT_CALL(StopSound, SOUND_80000067)
EVT_CALL(PlaySoundAt, SOUND_B2, 0, 145, 65, 0)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(12)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(50)
EVT_WAIT(115)
EVT_CALL(PlaySoundAt, SOUND_137, 0, 145, 65, 0)
EVT_END_THREAD
EVT_CALL(N(StarSpiritEffectFunc4), 1)
EVT_THREAD
EVT_WAIT(80)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_END_THREAD
EVT_ADD(LVar1, 100)
EVT_CALL(SetCamDistance, CAM_DEFAULT, LVar1)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 145, 0, 0)
EVT_CALL(N(StarSpiritEffectFunc4), 2)
EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar2, LVar3, LVar4)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar2, LVar3, LVar4)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_ELSE
EVT_CALL(N(StarSpiritEffectFunc5), 2, 145, 30, 0, 0)
EVT_THREAD
EVT_CALL(N(StarSpiritEffectFunc6))
EVT_END_THREAD
EVT_WAIT(1)
EVT_END_IF
EVT_CALL(N(StarSpiritEffectFunc4), 3)
EVT_CALL(PlaySoundAtPlayer, SOUND_138, 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED)
EVT_CALL(GotoMapSpecial, EVT_PTR("kmr_23"), kmr_23_ENTRY_2, TRANSITION_14)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoor_arn_08_0) = EVT_EXIT_SINGLE_DOOR(arn_07_ENTRY_0, "arn_08", arn_08_ENTRY_0,
COLLIDER_tt3, MODEL_o39, DOOR_SWING_OUT);
EvtScript N(EVS_ExitWalk_arn_03_0) = EVT_EXIT_WALK(60, arn_07_ENTRY_1, "arn_03", arn_03_ENTRY_0);
EvtScript N(EVS_ExitWalk_mim_12_1) = EVT_EXIT_WALK(60, arn_07_ENTRY_2, "mim_12", mim_12_ENTRY_1);
EvtScript N(EVS_Scene_TubbaReunion) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetPlayerPos, -28, 0, -333)
EVT_CALL(SetNpcPos, NPC_PARTNER, -28, 0, -333)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(SetCamType, CAM_DEFAULT, 0, FALSE)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-4.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 1100)
EVT_CALL(SetCamPosA, CAM_DEFAULT, 500, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -500)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 5, 0, -147)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(RotateModel, MODEL_o39, 80, 0, -1, 0)
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(SetNpcJumpscale, NPC_TubbasHeart, EVT_FLOAT(2.5))
EVT_CALL(NpcJump0, NPC_TubbasHeart, 0, 20, -120, 8)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, 0, 10, -60, 12)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, 0, 0, 0, 12)
EVT_WAIT(1)
EVT_CALL(SetNpcVar, NPC_TubbasHeart, 0, 0)
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, 0, 0, 0, 10)
EVT_WAIT(1)
EVT_CALL(GetNpcVar, NPC_TubbasHeart, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcVar, NPC_TubbasHeart, 0, 2)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o39, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(PlaySoundAtCollider, COLLIDER_tt3, SOUND_BASIC_DOOR_CLOSE, 0)
EVT_END_THREAD
EVT_CALL(NpcFaceNpc, NPC_TubbasHeart, NPC_Tubba, 0)
EVT_CALL(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0A, ANIM_TubbasHeart_Anim01, 5, MSG_CH3_00C7)
EVT_CALL(SetNpcVar, NPC_TubbasHeart, 0, 1)
EVT_LOOP(0)
EVT_CALL(GetNpcVar, NPC_TubbasHeart, 0, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, 75, 0, 10, 12)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, 150, 0, 20, 12)
EVT_WAIT(1)
EVT_THREAD
EVT_WAIT(4)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(2.0), EVT_FLOAT(-9.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 700)
EVT_CALL(SetCamPosA, CAM_DEFAULT, 500, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -500)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 65, 0, -137)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim22)
EVT_END_THREAD
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, 298, 56, 31, 18)
EVT_CALL(SetNpcPos, NPC_TubbasHeart, 0, -1000, 0)
EVT_CALL(EnableNpcShadow, NPC_TubbasHeart, FALSE)
EVT_THREAD
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim23)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim06)
EVT_END_THREAD
EVT_WAIT(20)
EVT_THREAD
EVT_CALL(PlaySoundAtCollider, COLLIDER_tt3, SOUND_BASIC_DOOR_OPEN, 0)
EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o39, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(30)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 236, 0, -46)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(8.0), EVT_FLOAT(-9.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 450)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, 0, -46)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_END_THREAD
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(SetPlayerPos, 0, 20, -195)
EVT_CALL(SetNpcPos, NPC_PARTNER, 0, 20, -195)
EVT_CALL(EnablePartnerAI)
EVT_CALL(PlayerMoveTo, 0, 0, 45)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_tt3, COLLIDER_FLAGS_UPPER_MASK)
EVT_THREAD
EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o39, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(PlaySoundAtCollider, COLLIDER_tt3, SOUND_BASIC_DOOR_CLOSE, 0)
EVT_END_THREAD
EVT_CALL(PlayerMoveTo, 200, 0, 35)
EVT_WAIT(5)
EVT_CALL(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 0, MSG_CH3_00C8)
EVT_CALL(SetNpcVar, NPC_Tubba, 0, 1)
EVT_WAIT(30)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_mim_12_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_IF_LT(GB_StoryProgress, STORY_CH3_UNLOCKED_WINDY_MILL)
EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList)), 0, 1)
EVT_ELSE
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(arn_07_ENTRY_0)
EVT_IF_EQ(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL)
EVT_EXEC_WAIT(N(EVS_Scene_TubbaReunion))
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_ELSE
EVT_SET(LVar2, MODEL_o39)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_END_IF
EVT_CASE_EQ(arn_07_ENTRY_1)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_CASE_EQ(arn_07_ENTRY_2)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_CASE_EQ(arn_07_ENTRY_3)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_WAIT(1)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_GUSTY_GULCH)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_SET(GF_MAP_GustyGulch, TRUE)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_CASE_LT(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BossNPCs)))
EVT_CASE_EQ(STORY_CH3_BEGAN_PEACH_MISSION)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(SpiritNPCs)))
EVT_CASE_DEFAULT
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_END_SWITCH
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_IF_EQ(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_EXEC(N(EVS_RespawnStarCard))
EVT_END_IF
EVT_EXEC(N(EVS_EnterMap))
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, arn_07_ENTRY_3)
EVT_WAIT(65)
EVT_END_IF
EVT_EXEC(N(EVS_SetupWindmill))
EVT_EXEC(N(EVS_SetupMusic))
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.3))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,58 @@
#include "arn_07.h"
extern EvtScript(N(EVS_UpdateWindmill));
MAP_RODATA_PAD(1,windmill);
API_CALLABLE(N(WrapWindmillAngle)) {
f32 angle = evt_get_float_variable(script, LVar0);
if (angle >= 360.0) {
angle -= 360.0;
}
evt_set_float_variable(script, LVar0, angle);
return ApiStatus_DONE2;
}
EvtScript N(EVS_SetupWindmill) = {
EVT_EXEC(N(EVS_UpdateWindmill))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_UpdateWindmill) = {
EVT_SETF(LVar0, EVT_FLOAT(0.0))
EVT_SET(LVar1, 30)
EVT_CALL(PlaySoundAtModel, MODEL_o36, SOUND_8000004A, 0)
EVT_LABEL(0)
EVT_ADDF(LVar0, EVT_FLOAT(1.0))
EVT_CALL(N(WrapWindmillAngle))
EVT_CALL(RotateModel, MODEL_o40, LVar0, 0, 0, 1)
EVT_WAIT(1)
EVT_SUB(LVar1, 1)
EVT_IF_GT(LVar1, 0)
EVT_GOTO(0)
EVT_END_IF
EVT_SET(LVar1, 30)
EVT_CALL(RandInt, 100, LVar2)
EVT_IF_GT(LVar2, 10)
EVT_GOTO(0)
EVT_END_IF
EVT_SETF(LVar2, EVT_FLOAT(1.0))
EVT_LOOP(50)
EVT_SUBF(LVar2, EVT_FLOAT(0.01))
EVT_ADDF(LVar0, LVar2)
EVT_CALL(RotateModel, MODEL_o40, LVar0, 0, 0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(50)
EVT_ADDF(LVar2, EVT_FLOAT(0.01))
EVT_ADDF(LVar0, LVar2)
EVT_CALL(RotateModel, MODEL_o40, LVar0, 0, 0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_SET(LVar1, 30)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,54 @@
#include "arn_07.h"
#include "entity.h"
extern EvtScript(N(EVS_ExitDoor_arn_08_0));
MAP_RODATA_PAD(1,entity);
#include "world/common/RemovePadlock.inc.c"
#include "world/common/GetEntityPosition.inc.c"
EvtScript N(EVS_UnlockDoor) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL)
EVT_CALL(ShowKeyChoicePopup)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40)
EVT_CALL(CloseChoicePopup)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LVar0, -1)
EVT_CALL(CloseChoicePopup)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
EVT_RETURN
EVT_END_IF
EVT_CALL(FindKeyItem, ITEM_MYSTICAL_KEY, LVar0)
EVT_CALL(RemoveKeyItemAt, LVar0)
EVT_CALL(CloseChoicePopup)
EVT_SET(GB_StoryProgress, STORY_CH3_UNLOCKED_WINDY_MILL)
EVT_CALL(N(GetEntityPosition), MV_Unk_00, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAt, SOUND_269, 0, LVar0, LVar1, LVar2)
EVT_SET(LVar0, MV_Unk_00)
EVT_CALL(N(RemovePadlock))
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BindLockTrigger) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tt3, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeEntities) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH3_UNLOCKED_WINDY_MILL)
EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 10, 30, -155, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(EVS_BindLockTrigger)))
EVT_SET(MV_Unk_00, LVar0)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,902 @@
#include "arn_07.h"
#include "effects.h"
extern EvtScript(N(EVS_SetupMusic));
extern EvtScript(N(EVS_SpawnStarCard));
#include "world/common/enemy/complete/HyperParagoomba.inc.c"
#include "world/common/npc/TubbasHeart.inc.c"
NpcSettings N(NpcSettings_Tubba) = {
.height = 90,
.radius = 65,
.level = 13,
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
};
#include "world/common/npc/Boo.inc.c"
NpcSettings N(NpcSettings_Skolar) = {
.height = 26,
.radius = 24,
.level = 99,
};
NpcSettings N(NpcSettings_Unused1) = {
.height = 20,
.radius = 20,
.level = 99,
};
NpcSettings N(NpcSettings_Unused2) = {
.height = 22,
.radius = 24,
.level = 99,
};
API_CALLABLE(N(UpgradeStarPower)) {
PlayerData* playerData = &gPlayerData;
set_max_SP(3);
playerData->curHP = playerData->curMaxHP;
playerData->curFP = playerData->curMaxFP;
sync_status_menu();
return ApiStatus_DONE2;
}
EvtScript N(EVS_TubbaWalking) = {
EVT_LOOP(0)
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_20F6, 0)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 3, EVT_FLOAT(0.8))
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_TubbaRelents) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 236, 0, -46)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(SetPanTarget, CAM_DEFAULT, 250, 0, -46)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim08)
EVT_CALL(SetNpcYaw, NPC_SELF, 90)
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim12, ANIM_WorldTubba_Anim08, 5, MSG_CH3_00CA)
EVT_WAIT(10)
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0)
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim12, ANIM_WorldTubba_Anim08, 5, MSG_CH3_00CB)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 300)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.0), EVT_FLOAT(-16.0))
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_BossDefeated) = {
EVT_WAIT(10)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim22)
EVT_WAIT(15)
EVT_LOOP(4)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_B0000010, 0)
EVT_CALL(SetNpcVar, NPC_Boo_02, 0, 1)
EVT_WAIT(4)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_B0000010, 0)
EVT_CALL(SetNpcVar, NPC_Boo_05, 0, 1)
EVT_WAIT(4)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_B0000010, 0)
EVT_CALL(SetNpcVar, NPC_Boo_01, 0, 1)
EVT_WAIT(6)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_B0000010, 0)
EVT_CALL(SetNpcVar, NPC_Boo_03, 0, 1)
EVT_WAIT(8)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_B0000010, 0)
EVT_CALL(SetNpcVar, NPC_Boo_04, 0, 1)
EVT_WAIT(6)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_B0000010, 0)
EVT_CALL(SetNpcVar, NPC_Boo_06, 0, 1)
EVT_WAIT(6)
EVT_END_LOOP
EVT_WAIT(10)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim23)
EVT_WAIT(30)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim22)
EVT_WAIT(10)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_B0000010, 0)
EVT_CALL(SetNpcVar, NPC_Boo_02, 0, 1)
EVT_WAIT(15)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim21)
EVT_WAIT(45)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 236, 0, -46)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 50)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_WAIT(5)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldTubba_Anim0F)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldTubba_Anim12, ANIM_WorldTubba_Anim08, 0, MSG_CH3_00CC)
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_LOOP(40)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_CALL(func_802CF56C, 2)
EVT_LOOP(45)
EVT_CALL(PlayerFaceNpc, NPC_SELF, TRUE)
EVT_END_LOOP
EVT_END_THREAD
EVT_EXEC_GET_TID(N(EVS_TubbaWalking), LVarA)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 800)
EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar2, 80)
EVT_KILL_THREAD(LVarA)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_SET(GB_StoryProgress, STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_CHEERFUL_BOOS_MANSION, 0, 8)
EVT_CALL(GetCurrentPartnerID, LVar6)
EVT_IF_EQ(LVar6, PARTNER_BOW)
EVT_SET(LVar5, -4)
EVT_CALL(func_802CF56C, 0)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetNpcPos, NPC_PARTNER, 257, 25, 0)
EVT_END_IF
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 300)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_WAIT(10)
EVT_IF_NE(LVar6, PARTNER_BOW)
EVT_SET(LVar5, 8)
EVT_CALL(SetNpcPos, NPC_Bow, 257, 25, 0)
EVT_CALL(func_802CFD30, 8, 7, 0, 0, 0, 0)
EVT_CALL(NpcFacePlayer, NPC_Bow, 0)
EVT_CALL(MakeLerp, 0, 240, 20, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(func_802CFD30, 8, 7, LVar0, 0, 0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(func_802CF56C, 0)
EVT_END_IF
EVT_WAIT(10)
EVT_THREAD
EVT_IF_NE(LVar6, PARTNER_BOW)
EVT_CALL(DisablePartnerAI, 0)
EVT_WAIT(1)
EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Bow, 0)
EVT_WAIT(5)
EVT_END_IF
EVT_END_THREAD
EVT_CALL(SpeakToPlayer, LVar5, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_00CD)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_WAIT(10)
EVT_CALL(GetNpcPos, LVar5, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, -20)
EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(2.0), LVar0, LVar1, LVar2, EVT_FLOAT(300.0), EVT_FLOAT(15.0), EVT_FLOAT(-7.0))
EVT_CALL(PlayerFaceNpc, LVar5, FALSE)
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, LVar5, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00CE)
EVT_CALL(ShowChoice, MSG_Choice_000D)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(ContinueSpeech, LVar5, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_00CF)
EVT_ELSE
EVT_CALL(ContinueSpeech, LVar5, ANIM_WorldBow_Celebrate, ANIM_WorldBow_Celebrate, 0, MSG_CH3_00D0)
EVT_END_IF
EVT_CALL(SpeakToPlayer, LVar5, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00D1)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 175, 0, 0)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(SetPanTarget, CAM_DEFAULT, 175, 0, 0)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetNpcPos, NPC_Bootler, 93, 160, -6)
EVT_CALL(InterpNpcYaw, NPC_Bootler, 90, 0)
EVT_THREAD
EVT_WAIT(10)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_END_THREAD
EVT_THREAD
EVT_IF_NE(LVar6, PARTNER_BOW)
EVT_WAIT(12)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0)
EVT_END_IF
EVT_END_THREAD
EVT_CALL(MakeLerp, 160, 31, 70, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetNpcPos, NPC_Bootler, 93, LVar0, -6)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_THREAD
EVT_IF_NE(LVar6, PARTNER_BOW)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0)
EVT_END_IF
EVT_END_THREAD
EVT_CALL(SpeakToPlayer, LVar5, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00D2)
EVT_THREAD
EVT_IF_NE(LVar6, PARTNER_BOW)
EVT_WAIT(12)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0)
EVT_END_IF
EVT_END_THREAD
EVT_WAIT(10)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_EXEC(N(EVS_SpawnStarCard))
EVT_WAIT(20)
EVT_THREAD
EVT_IF_NE(LVar6, 9)
EVT_CALL(MakeLerp, 240, 0, 20, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(func_802CFD30, 8, 7, LVar0, 0, 0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_Bow, NPC_DISPOSE_LOCATION)
EVT_CALL(EnablePartnerAI)
EVT_ELSE
EVT_WAIT(20)
EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER)
EVT_CALL(EnablePartnerAI)
EVT_END_IF
EVT_WAIT(8)
EVT_CALL(func_802CF56C, 2)
EVT_END_THREAD
EVT_WAIT(20)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_Tubba) = {
EVT_LOOP(0)
EVT_CALL(GetSelfVar, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(StartBossBattle, SONG_TUBBA_BLUBBA_BATTLE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_Boo) = {
EVT_LABEL(10)
EVT_LOOP(0)
EVT_CALL(GetSelfVar, 0, LVar0)
EVT_IF_EQ(LVar0, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_THREAD
EVT_SETF(LVar0, EVT_FLOAT(0.5))
EVT_CALL(MakeLerp, 50, 80, 15, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_SETF(LVar2, LVar0)
EVT_DIVF(LVar2, 100)
EVT_CALL(SetNpcScale, NPC_SELF, LVar2, LVar2, LVar2)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_CALL(RandInt, 80, LVar2)
EVT_CALL(RandInt, 10, LVar3)
EVT_ADD(LVar3, 5)
EVT_CALL(MakeLerp, LVar2, 240, LVar3, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(func_802CFD30, -1, 7, LVar0, 0, 0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetNpcPos, NPC_SELF, 293, 59, 21)
EVT_WAIT(1)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(-0.3))
EVT_CALL(RandInt, 100, LVar3)
EVT_SUB(LVar0, LVar3)
EVT_ADD(LVar1, 100)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, LVar1, LVar2, 20)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(SetSelfVar, 0, 0)
EVT_GOTO(10)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_Tubba) = {
EVT_CALL(SetEncounterStatusFlags, 2, TRUE)
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(OUTCOME_PLAYER_WON)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 1, 8)
EVT_EXEC_WAIT(N(EVS_Scene_TubbaRelents))
EVT_EXEC(N(EVS_Scene_BossDefeated))
EVT_CASE_EQ(OUTCOME_PLAYER_LOST)
EVT_CASE_EQ(OUTCOME_PLAYER_FLED)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_TubbasHeart) = {
EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Tubba) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tubba)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tubba)))
EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Boo)))
EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Bow) = {
EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Bootler) = {
EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
s32 N(ExtraAnims_Tubba)[] = {
ANIM_WorldTubba_Anim00,
ANIM_WorldTubba_Anim22,
ANIM_WorldTubba_Anim23,
ANIM_WorldTubba_Anim06,
ANIM_WorldTubba_Anim10,
ANIM_WorldTubba_Anim08,
ANIM_WorldTubba_Anim0F,
ANIM_WorldTubba_Anim12,
-1
};
s32 N(ExtraAnims_Boo)[] = {
ANIM_Boo_Still,
-1
};
s32 N(ExtraAnims_GustyBoo)[] = {
ANIM_Boo_Tan_Still,
-1
};
s32 N(ExtraAnims_Bootler)[] = {
ANIM_Bootler_Idle,
-1
};
EvtScript N(EVS_NpcIdle_Skolar) = {
EVT_LOOP(0)
EVT_LOOP(10)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 1)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(10)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 1)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_SkolarRescued) = {
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(func_802CF56C, 2)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_SET(LVar3, LVar0)
EVT_ADD(LVar3, -50)
EVT_SET(LVar4, LVar1)
EVT_ADD(LVar4, 26)
EVT_CALL(SetNpcPos, NPC_Skolar, LVar3, LVar4, LVar2)
EVT_CALL(PlayerFaceNpc, NPC_Skolar, FALSE)
EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Skolar, 0)
EVT_ADD(LVar0, -25)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(475.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -8)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_WAIT(1)
EVT_CALL(WaitForPlayerInputEnabled)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(40)
EVT_CALL(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 512, MSG_CH3_00D3)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -9)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(MakeLerp, 0, 360, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetNpcRotation, NPC_Skolar, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(EnableNpcAI, NPC_Skolar, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Leap)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_GotItem)
EVT_CALL(PlaySoundAtPlayer, SOUND_139, 0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_SET(LVar3, LVar1)
EVT_ADD(LVar1, 50)
EVT_ADD(LVar2, 10)
EVT_ADD(LVar3, 30)
EVT_LOOP(5)
EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20)
EVT_WAIT(6)
EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20)
EVT_WAIT(6)
EVT_END_LOOP
EVT_WAIT(20)
EVT_CALL(PlaySoundAtPlayer, SOUND_188, 0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 20)
EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30)
EVT_WAIT(30)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(SetNpcAnimation, NPC_Skolar, ANIM_WorldSkolar_Idle)
EVT_CALL(EnableNpcAI, NPC_Skolar, TRUE)
EVT_CALL(N(UpgradeStarPower))
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0193, 160, 40)
EVT_WAIT(10)
EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 512, MSG_CH3_00D4)
EVT_WAIT(10)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, -25)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_Skolar, ANIM_WorldSkolar_TalkAngry, ANIM_WorldSkolar_Idle, 512, MSG_CH3_00D5)
EVT_CALL(SetNpcFlagBits, NPC_Skolar, NPC_FLAG_40000, TRUE)
EVT_THREAD
EVT_LOOP(25)
EVT_CALL(GetNpcPos, NPC_Skolar, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20)
EVT_WAIT(4)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_SET(LVar2, 0)
EVT_SET(LVar3, 1800)
EVT_CALL(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetNpcRotation, NPC_Skolar, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_CALL(GetNpcPos, NPC_Skolar, LVar2, LVar3, LVar4)
EVT_SET(LVar5, LVar3)
EVT_ADD(LVar5, 180)
EVT_CALL(MakeLerp, LVar3, LVar5, 100, EASING_CUBIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetNpcPos, NPC_Skolar, LVar2, LVar0, LVar4)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_Skolar, NPC_DISPOSE_LOCATION)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(15)
EVT_CALL(PlaySoundAtNpc, NPC_Skolar, SOUND_2045, 0)
EVT_END_THREAD
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A)
EVT_WAIT(90)
EVT_CALL(ResetCam, CAM_DEFAULT, 3)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_SET(GB_StoryProgress, STORY_CH3_STAR_SPRIT_DEPARTED)
EVT_EXEC(N(EVS_SetupMusic))
EVT_CALL(EnablePartnerAI)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Skolar) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, arn_07_ENTRY_3)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Skolar)))
EVT_EXEC(N(EVS_Scene_SkolarRescued))
EVT_ELSE
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Tubba)[] = {
{
.id = NPC_Tubba,
.settings = &N(NpcSettings_Tubba),
.pos = { 309.0f, 0.0f, 11.0f },
.yaw = 270,
.flags = NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_200000,
.init = &N(EVS_NpcInit_Tubba),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_WorldTubba_Anim06,
.walk = ANIM_WorldTubba_Anim09,
.run = ANIM_WorldTubba_Anim0C,
.chase = ANIM_WorldTubba_Anim0C,
.anim_4 = ANIM_WorldTubba_Anim00,
.anim_5 = ANIM_WorldTubba_Anim00,
.death = ANIM_WorldTubba_Anim00,
.hit = ANIM_WorldTubba_Anim00,
.anim_8 = ANIM_WorldTubba_Anim00,
.anim_9 = ANIM_WorldTubba_Anim00,
.anim_A = ANIM_WorldTubba_Anim00,
.anim_B = ANIM_WorldTubba_Anim00,
.anim_C = ANIM_WorldTubba_Anim00,
.anim_D = ANIM_WorldTubba_Anim00,
.anim_E = ANIM_WorldTubba_Anim00,
.anim_F = ANIM_WorldTubba_Anim00,
},
.extraAnimations = N(ExtraAnims_Tubba),
},
{
.id = NPC_TubbasHeart,
.settings = &N(NpcSettings_TubbasHeart),
.pos = { -10.0f, 50.0f, -170.0f },
.yaw = 90,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_200000,
.init = &N(EVS_NpcInit_TubbasHeart),
.drops = TUBBAS_HEART_DROPS,
.animations = TUBBAS_HEART_ANIMS,
},
};
StaticNpc N(NpcData_Boos)[] = {
{
.id = NPC_Boo_01,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_200000,
.init = &N(EVS_NpcInit_Boo),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
.extraAnimations = N(ExtraAnims_GustyBoo),
},
{
.id = NPC_Boo_02,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_200000,
.init = &N(EVS_NpcInit_Boo),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
.extraAnimations = N(ExtraAnims_GustyBoo),
},
{
.id = NPC_Boo_03,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_200000,
.init = &N(EVS_NpcInit_Boo),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
.extraAnimations = N(ExtraAnims_GustyBoo),
},
{
.id = NPC_Boo_04,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_200000,
.init = &N(EVS_NpcInit_Boo),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
.extraAnimations = N(ExtraAnims_GustyBoo),
},
{
.id = NPC_Boo_05,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_200000,
.init = &N(EVS_NpcInit_Boo),
.drops = BOO_DROPS,
.animations = NORMAL_BOO_ANIMS,
.extraAnimations = N(ExtraAnims_Boo),
},
{
.id = NPC_Boo_06,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_200000,
.init = &N(EVS_NpcInit_Boo),
.drops = BOO_DROPS,
.animations = NORMAL_BOO_ANIMS,
.extraAnimations = N(ExtraAnims_Boo),
},
};
StaticNpc N(NpcData_Bow) = {
.id = NPC_Bow,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_200000,
.init = &N(EVS_NpcInit_Bow),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_WorldBow_Idle,
.walk = ANIM_WorldBow_Walk,
.run = ANIM_WorldBow_Run,
.chase = ANIM_WorldBow_Run,
.anim_4 = ANIM_WorldBow_Idle,
.anim_5 = ANIM_WorldBow_Idle,
.death = ANIM_WorldBow_Still,
.hit = ANIM_WorldBow_Still,
.anim_8 = ANIM_WorldBow_Run,
.anim_9 = ANIM_WorldBow_Run,
.anim_A = ANIM_WorldBow_Run,
.anim_B = ANIM_WorldBow_Run,
.anim_C = ANIM_WorldBow_Run,
.anim_D = ANIM_WorldBow_Run,
.anim_E = ANIM_WorldBow_Run,
.anim_F = ANIM_WorldBow_Run,
},
};
StaticNpc N(NpcData_Bootler) = {
.id = NPC_Bootler,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_200000,
.init = &N(EVS_NpcInit_Bootler),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Bootler_Idle,
.walk = ANIM_Bootler_Walk,
.run = ANIM_Bootler_Run,
.chase = ANIM_Bootler_Run,
.anim_4 = ANIM_Bootler_Idle,
.anim_5 = ANIM_Bootler_Idle,
.death = ANIM_Bootler_Still,
.hit = ANIM_Bootler_Still,
.anim_8 = ANIM_Bootler_Shock,
.anim_9 = ANIM_Bootler_Panic,
.anim_A = ANIM_Bootler_Dejected,
.anim_B = ANIM_Bootler_Quaver,
.anim_C = ANIM_Bootler_Shock,
.anim_D = ANIM_Bootler_Panic,
.anim_E = ANIM_Bootler_Dejected,
.anim_F = ANIM_Bootler_Quaver,
},
.extraAnimations = N(ExtraAnims_Bootler),
};
EvtScript N(EVS_NpcInit_HyperParagoomba) = {
EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_HyperParagoomba_01) = {
.id = NPC_HyperParagoomba_01,
.settings = &N(NpcSettings_HyperParagoomba),
.pos = { -216.0f, 60.0f, -10.0f },
.yaw = 90,
.flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_HyperParagoomba),
.drops = HYPER_PARAGOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -216, 60, -10 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -216, 60, -10 },
.detectSize = { 250 },
}
},
.animations = HYPER_PARAGOOMBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_HyperParagoomba_02) = {
.id = NPC_HyperParagoomba_02,
.settings = &N(NpcSettings_HyperParagoomba),
.pos = { 0.0f, 60.0f, 150.0f },
.yaw = 270,
.flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_HyperParagoomba),
.drops = HYPER_PARAGOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 60, 150 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 60, 150 },
.detectSize = { 250 },
}
},
.animations = HYPER_PARAGOOMBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_HyperParagoomba_03) = {
.id = NPC_HyperParagoomba_03,
.settings = &N(NpcSettings_HyperParagoomba),
.pos = { 260.0f, 60.0f, 30.0f },
.yaw = 90,
.flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_HyperParagoomba),
.drops = HYPER_PARAGOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 260, 60, 30 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 260, 60, 30 },
.detectSize = { 250 },
}
},
.animations = HYPER_PARAGOOMBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_Skolar) = {
.id = NPC_Skolar,
.settings = &N(NpcSettings_Skolar),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_Skolar),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_WorldSkolar_Idle,
.walk = ANIM_WorldSkolar_Idle,
.run = ANIM_WorldSkolar_Idle,
.chase = ANIM_WorldSkolar_Idle,
.anim_4 = ANIM_WorldSkolar_Idle,
.anim_5 = ANIM_WorldSkolar_Idle,
.death = ANIM_WorldSkolar_Idle,
.hit = ANIM_WorldSkolar_Idle,
.anim_8 = ANIM_WorldSkolar_Still,
.anim_9 = ANIM_WorldSkolar_Idle,
.anim_A = ANIM_WorldSkolar_Idle,
.anim_B = ANIM_WorldSkolar_Idle,
.anim_C = ANIM_WorldSkolar_Idle,
.anim_D = ANIM_WorldSkolar_Idle,
.anim_E = ANIM_WorldSkolar_Idle,
.anim_F = ANIM_WorldSkolar_Idle,
},
};
NpcGroupList N(BossNPCs) = {
NPC_GROUP(N(NpcData_Tubba), BTL_ARN_FORMATION_10, BTL_ARN_STAGE_01),
NPC_GROUP(N(NpcData_Boos)),
NPC_GROUP(N(NpcData_Bow)),
NPC_GROUP(N(NpcData_Bootler)),
{}
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_HyperParagoomba_01), BTL_ARN_FORMATION_06, BTL_ARN_STAGE_01),
NPC_GROUP(N(NpcData_HyperParagoomba_02), BTL_ARN_FORMATION_07, BTL_ARN_STAGE_01),
NPC_GROUP(N(NpcData_HyperParagoomba_03), BTL_ARN_FORMATION_08, BTL_ARN_STAGE_01),
{}
};
NpcGroupList N(SpiritNPCs) = {
NPC_GROUP(N(NpcData_Skolar)),
{}
};

File diff suppressed because it is too large Load Diff

View File

@ -1,25 +0,0 @@
#include "arn_08.h"
ApiStatus N(func_80240000_BF47A0)(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus;
f32 temp_f20;
s32 colliderID;
if (isInitialCall) {
script->functionTemp[0] = 0;
suggest_player_anim_clearUnkFlag(ANIM_Mario_AnimMidairStill);
}
temp_f20 = func_800E34D8();
playerStatus->position.y = player_check_collision_below(temp_f20, &colliderID);
script->functionTemp[0] += fabsf(temp_f20);
do {} while (0);
return (script->functionTemp[0] > 50) * ApiStatus_DONE2;
}
ApiStatus N(func_8024008C_BF482C)(Evt* script, s32 isInitialCall) {
if (gPlayerStatus.position.y < -10.0f) {
return ApiStatus_DONE2;
}
return ApiStatus_BLOCK;
}

View File

@ -2,26 +2,19 @@
/// @brief Gusty Gulch - Windmill Interior
#include "common.h"
#include "../arn.h"
#include "message_ids.h"
#include "map.h"
#include "../arn.h"
#include "mapfs/arn_08_shape.h"
#include "mapfs/arn_08_hit.h"
#include "sprite/npc/TubbasHeart.h"
#include "sprite/npc/Yakkey.h"
enum {
NPC_TubbasHeart = 0,
NPC_Yakkey = 1,
};
#define NAMESPACE arn_08
f32 player_check_collision_below(f32, s32*);
f32 func_800E34D8(void);
ApiStatus N(func_80240000_BF47A0)(Evt* script, s32 isInitialCall);
ApiStatus N(func_8024008C_BF482C)(Evt* script, s32 isInitialCall);
ApiStatus N(func_802400C0_BF4860)(Evt* script, s32 isInitialCall);
ApiStatus N(func_802400D4_BF4874)(Evt* script, s32 isInitialCall);
ApiStatus N(func_802400F4_BF4894)(Evt* script, s32 isInitialCall);
ApiStatus N(func_8024019C_BF493C)(Evt* script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_80241828);
extern EvtScript N(80240B50);
extern EvtScript N(80240BA0);
extern EvtScript N(8024118C);
extern EvtScript N(80240300);
extern EvtScript N(main);
extern EvtScript N(makeEntities);

View File

@ -0,0 +1,30 @@
#include "arn_08.h"
extern EvtScript N(EVS_Main);
EntryList N(Entrances) = {
[arn_08_ENTRY_0] { -80.0, 0.0, 108.0, 45.0 },
[arn_08_ENTRY_1] { 0.0, 0.0, 0.0, 0.0 },
[arn_08_ENTRY_2] { -85.0, 0.0, 55.0, 45.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_arn_08 },
};
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_HEART_FLED_FIRST_TUNNEL)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_END_SWITCH
EVT_CALL(ClearAmbientSounds, 250)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,122 @@
#include "arn_08.h"
extern EvtScript N(EVS_AnimateGears);
extern EvtScript N(EVS_SetupHole);
extern EvtScript N(EVS_PlayDemoScene);
extern EvtScript N(EVS_MakeEntities);
extern EvtScript N(EVS_SetupMusic);
extern NpcGroupList N(DefaultNPCs);
EvtScript N(EVS_ExitDoor_arn_07_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(ClearDefeatedEnemies)
EVT_SET(LVar0, arn_08_ENTRY_0)
EVT_SET(LVar1, COLLIDER_tts)
EVT_SET(LVar2, MODEL_doa)
EVT_SET(LVar4, MODEL_o37)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC(ExitSplitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("arn_07"), arn_07_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_07_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tts, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetLoadType, LVar1)
EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT)
EVT_EXEC(EnterSavePoint)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(arn_08_ENTRY_0)
EVT_SET(LVar4, MODEL_o37)
EVT_SET(LVar2, MODEL_doa)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC_WAIT(EnterSplitSingleDoor)
EVT_SET(AF_ARN_01, FALSE)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(arn_08_ENTRY_1)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_IF_EQ(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL)
EVT_CALL(SetPlayerPos, 1000, 1000, 0)
EVT_CALL(SetNpcPos, NPC_PARTNER, 1000, 1000, 0)
EVT_CALL(RotateModel, MODEL_doa, 80, 0, -1, 0)
EVT_CALL(RotateModel, MODEL_o37, 80, 0, -1, 0)
EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim06)
EVT_CALL(SetNpcJumpscale, NPC_TubbasHeart, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, -50, 0, 50, 10)
EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim07)
EVT_WAIT(1)
EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim06)
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, -110, 0, 110, 10)
EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim07)
EVT_WAIT(1)
EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim06)
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, -180, 0, 180, 10)
EVT_CALL(SetNpcAnimation, NPC_TubbasHeart, ANIM_TubbasHeart_Anim07)
EVT_WAIT(1)
EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_doa, LVar0, 0, -1, 0)
EVT_CALL(RotateModel, MODEL_o37, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(PlaySoundAtCollider, COLLIDER_tts, SOUND_BASIC_DOOR_CLOSE, 0)
EVT_WAIT(20)
EVT_CALL(SetPlayerPos, 0, 0, 0)
EVT_CALL(SetNpcPos, NPC_PARTNER, 0, 0, 0)
EVT_SET(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WINDY_MILL)
EVT_END_IF
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0))
EVT_CALL(PlayerJump, -10, 0, 75, 18)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_SET(GF_MAP_WindyMill, TRUE)
EVT_IF_GE(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN)
EVT_SET(GF_ARN10_Defeated_Goomba, FALSE)
EVT_SET(GF_ARN12_Defeated_Goomba, FALSE)
EVT_SET(GF_ARN13_Defeated_Goomba, FALSE)
EVT_END_IF
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_AnimateGears))
EVT_CALL(GetDemoState, LVar0)
EVT_IF_NE(LVar0, DEMO_STATE_NONE)
EVT_EXEC_WAIT(N(EVS_PlayDemoScene))
EVT_RETURN
EVT_END_IF
EVT_EXEC(N(EVS_EnterMap))
EVT_EXEC(N(EVS_SetupHole))
EVT_EXEC(N(EVS_SetupMusic))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,58 @@
#include "arn_08.h"
API_CALLABLE(N(AwaitPlayerFallDist)) {
PlayerStatus* playerStatus = &gPlayerStatus;
f32 fallSpeed;
s32 colliderID;
if (isInitialCall) {
script->functionTemp[0] = 0;
suggest_player_anim_clearUnkFlag(ANIM_Mario_AnimMidairStill);
}
fallSpeed = func_800E34D8();
playerStatus->position.y = player_check_collision_below(fallSpeed, &colliderID);
script->functionTemp[0] += fabsf(fallSpeed);
if (script->functionTemp[0] > 50) {
return ApiStatus_DONE2;
} else {
return ApiStatus_BLOCK;
}
}
API_CALLABLE(N(AwaitPlayerJumpDown)) {
if (gPlayerStatus.position.y < -10.0f) {
return ApiStatus_DONE2;
} else {
return ApiStatus_BLOCK;
}
}
EvtScript N(EVS_ExitWell) = {
EVT_LOOP(0)
EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(N(AwaitPlayerJumpDown))
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(N(AwaitPlayerFallDist))
EVT_SET(AF_ARN_01, TRUE)
EVT_IF_LT(GB_StoryProgress, STORY_CH3_WENT_DOWN_THE_WELL)
EVT_SET(GB_StoryProgress, STORY_CH3_WENT_DOWN_THE_WELL)
EVT_END_IF
EVT_CALL(GotoMap, EVT_PTR("arn_09"), arn_09_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupHole) = {
EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 0, 0, EVT_FLOAT(470.0), EVT_FLOAT(17.0), EVT_FLOAT(-7.0))
EVT_EXEC(N(EVS_ExitWell))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,19 @@
#include "arn_08.h"
EvtScript N(EVS_AnimateGears) = {
EVT_CALL(PlaySound, SOUND_8000004B)
EVT_THREAD
EVT_SET(LVar0, 0)
EVT_LABEL(10)
EVT_CALL(RotateModel, MODEL_o45, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_o47, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_o46, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, MODEL_o44, LVar0, 0, 0, -1)
EVT_CALL(RotateModel, MODEL_o48, LVar0, 0, 0, -1)
EVT_ADD(LVar0, 1)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_THREAD
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,164 @@
#include "arn_08.h"
#include "world/partners.h"
API_CALLABLE(N(InitializeDemoEquipment)) {
gPlayerData.bootsLevel = 1;
return ApiStatus_DONE2;
}
API_CALLABLE(N(SetPartnerFollowDist)) {
func_800EF300();
return ApiStatus_DONE2;
}
EvtScript N(EVS_ProvideDemoInputs) = {
EVT_CALL(N(InitializeDemoEquipment))
EVT_CALL(DemoJoystickXY, 2, 0)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 12, 4)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 28, 11)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 47, 22)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 68, 38)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 67, 48)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 64, 59)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 64, 62)
EVT_WAIT(4)
EVT_CALL(DemoSetButtons, BUTTON_A)
EVT_WAIT(10)
EVT_CALL(DemoJoystickXY, 64, 58)
EVT_CALL(DemoSetButtons, 0)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 70, 34)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 77, -2)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 74, -23)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 71, -36)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 69, -44)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 67, -49)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 30, -30)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 0, 0)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 0, -1)
EVT_WAIT(8)
EVT_CALL(DemoSetButtons, BUTTON_A)
EVT_WAIT(2)
EVT_CALL(DemoJoystickXY, 0, -2)
EVT_WAIT(2)
EVT_CALL(DemoJoystickXY, 0, -1)
EVT_WAIT(2)
EVT_CALL(DemoJoystickXY, 0, 0)
EVT_WAIT(1)
EVT_CALL(DemoSetButtons, 0)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 1, 0)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 0, 0)
EVT_CALL(N(SetPartnerFollowDist))
EVT_CALL(DemoSetButtons, BUTTON_A)
EVT_WAIT(12)
EVT_CALL(DemoSetButtons, 0)
EVT_WAIT(20)
EVT_IF_EQ(GF_DemoSceneDone, TRUE)
EVT_RETURN
EVT_END_IF
EVT_SET(GF_DemoSceneDone, TRUE)
EVT_CALL(GotoMapSpecial, EVT_PTR("arn_08"), arn_08_ENTRY_2, TRANSITION_2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MonitorDemoState) = {
EVT_WAIT(10)
EVT_LOOP(0)
EVT_CALL(GetDemoState, LVar0)
EVT_IF_EQ(LVar0, DEMO_STATE_CHANGE_MAP)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_IF_EQ(GF_DemoSceneDone, TRUE)
EVT_RETURN
EVT_END_IF
EVT_SET(GF_DemoSceneDone, TRUE)
EVT_CALL(GotoMapSpecial, EVT_PTR("arn_08"), arn_08_ENTRY_2, TRANSITION_3)
EVT_WAIT(35)
EVT_RETURN
EVT_END
};
API_CALLABLE(N(func_802400F4_BF4894)) {
PlayerStatus* playerStatus = &gPlayerStatus;
if (isInitialCall) {
script->functionTemp[0] = 0;
}
if (!(playerStatus->position.y > -10.0f)) {
f32 temp_f20 = func_800E34D8();
s32 colliderID;
playerStatus->position.y = player_check_collision_below(temp_f20, &colliderID);
script->functionTemp[0] += fabsf(temp_f20);
return (script->functionTemp[0] > 50) * ApiStatus_DONE2;
}
return ApiStatus_BLOCK;
}
EvtScript N(EVS_8024116C) = {
EVT_CALL(N(func_802400F4_BF4894))
EVT_RETURN
EVT_END
};
s32 N(DemoSceneState) = 0;
API_CALLABLE(N(SetupDemoScene)) {
PlayerStatus* playerStatus = &gPlayerStatus;
switch (N(DemoSceneState)) {
case 0:
N(DemoSceneState) = 1;
break;
case 1:
case 2:
N(DemoSceneState)++;
break;
case 3: {
partner_clear_player_tracking(wPartnerNpc);
partner_set_goal_pos(playerStatus->position.x, playerStatus->position.z);
func_800EF3D4(0);
set_npc_yaw(wPartnerNpc, 90.0f);
playerStatus->targetYaw = 90.0f;
playerStatus->currentYaw = 90.0f;
playerStatus->spriteFacingAngle = 0.0f;
return ApiStatus_DONE2;
}
}
return ApiStatus_BLOCK;
}
EvtScript N(EVS_PlayDemoScene) = {
EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 0, 0, EVT_FLOAT(470.0), EVT_FLOAT(17.0), EVT_FLOAT(-7.0))
EVT_CALL(N(SetupDemoScene))
EVT_SET(GF_DemoSceneDone, FALSE)
EVT_EXEC(N(EVS_MonitorDemoState))
EVT_EXEC(N(EVS_ProvideDemoInputs))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,75 @@
#include "arn_08.h"
#include "world/common/npc/TubbasHeart.inc.c"
#include "world/common/npc/Yakkey.inc.c"
EvtScript N(EVS_NpcIdle_TubbasHeart) = {
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_TubbasHeart) = {
EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_ELSE
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart)))
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Yakkey) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH5_WHALE_MOUTH_OPEN)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BA)
EVT_CASE_LT(STORY_CH6_FLOWER_GATE_OPEN)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BB)
EVT_CASE_LT(STORY_CH7_INVITED_TO_STARBORN_VALLEY)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BC)
EVT_CASE_LT(STORY_CH8_OPENED_PATH_TO_STAR_WAY)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BD)
EVT_CASE_GE(STORY_CH8_OPENED_PATH_TO_STAR_WAY)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BE)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Yakkey) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_ELSE
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Yakkey)))
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_TubbasHeart) = {
.id = NPC_TubbasHeart,
.settings = &N(NpcSettings_TubbasHeart),
.pos = { -23.0f, 75.0f, 31.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_TubbasHeart),
.drops = TUBBAS_HEART_DROPS,
.animations = TUBBAS_HEART_ANIMS,
};
StaticNpc N(NpcData_Yakkey) = {
.id = NPC_Yakkey,
.settings = &N(NpcSettings_Yakkey),
.pos = { 38.0f, 0.0f, 97.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_Yakkey),
.drops = YAKKEY_DROPS,
.animations = YAKKEY_ANIMS,
.tattle = MSG_NpcTattle_Yakkey,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_TubbasHeart)),
NPC_GROUP(N(NpcData_Yakkey)),
{}
};

View File

@ -0,0 +1,10 @@
#include "arn_08.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH3_WENT_DOWN_THE_WELL)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 0, 30, 0, 0, MAKE_ENTITY_END)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -1,503 +0,0 @@
#include "arn_08.h"
#include "sprite/npc/TubbasHeart.h"
#include "sprite/npc/Yakkey.h"
#include "world/partners.h"
#include "entity.h"
enum {
NPC_TUBBAS_HEART,
NPC_YAKKEY,
};
EvtScript N(802403B0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(ClearDefeatedEnemies)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 6)
EVT_SET(LVar2, 0)
EVT_SET(LVar4, 1)
EVT_SET(LVar3, -1)
EVT_EXEC(0x80285DFC)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("arn_07"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(80240470) = {
EVT_BIND_TRIGGER(N(802403B0), TRIGGER_WALL_PRESS_A, 6, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(8024049C) = {
EVT_CALL(GetLoadType, LVar1)
EVT_IF_EQ(LVar1, 1)
EVT_EXEC(EnterSavePoint)
EVT_EXEC(N(80240470))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET(LVar4, 1)
EVT_SET(LVar2, 0)
EVT_SET(LVar3, -1)
EVT_EXEC_WAIT(0x80285E24)
EVT_SET(AreaFlag(1), 0)
EVT_EXEC(N(80240470))
EVT_CASE_EQ(1)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_IF_EQ(GB_StoryProgress, -18)
EVT_CALL(SetPlayerPos, 1000, 1000, 0)
EVT_CALL(SetNpcPos, NPC_PARTNER, 1000, 1000, 0)
EVT_CALL(RotateModel, 0, 80, 0, -1, 0)
EVT_CALL(RotateModel, 1, 80, 0, -1, 0)
EVT_CALL(SetNpcAnimation, 0, ANIM_TubbasHeart_Anim06)
EVT_CALL(SetNpcJumpscale, 0, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, 0, 0x20C8, 0)
EVT_CALL(NpcJump0, 0, -50, 0, 50, 10)
EVT_CALL(SetNpcAnimation, 0, ANIM_TubbasHeart_Anim07)
EVT_WAIT(1)
EVT_CALL(SetNpcAnimation, 0, ANIM_TubbasHeart_Anim06)
EVT_CALL(PlaySoundAtNpc, 0, 0x20C8, 0)
EVT_CALL(NpcJump0, 0, -110, 0, 110, 10)
EVT_CALL(SetNpcAnimation, 0, ANIM_TubbasHeart_Anim07)
EVT_WAIT(1)
EVT_CALL(SetNpcAnimation, 0, ANIM_TubbasHeart_Anim06)
EVT_CALL(PlaySoundAtNpc, 0, 0x20C8, 0)
EVT_CALL(NpcJump0, 0, -180, 0, 180, 10)
EVT_CALL(SetNpcAnimation, 0, ANIM_TubbasHeart_Anim07)
EVT_WAIT(1)
EVT_CALL(MakeLerp, 80, 0, 10, 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, 0, LVar0, 0, -1, 0)
EVT_CALL(RotateModel, 1, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(PlaySoundAtCollider, 6, 450, 0)
EVT_WAIT(20)
EVT_CALL(SetPlayerPos, 0, 0, 0)
EVT_CALL(SetNpcPos, NPC_PARTNER, 0, 0, 0)
EVT_SET(GB_StoryProgress, -17)
EVT_END_IF
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(2.0))
EVT_CALL(PlayerJump, -10, 0, 75, 18)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_EXEC(N(80240470))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 35)
EVT_CALL(SetSpriteShading, -1)
EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096)
EVT_CALL(SetCamBGColor, 0, 0, 0, 0)
EVT_CALL(SetCamLeadPlayer, 0, 0)
EVT_CALL(SetCamEnabled, 0, 1)
EVT_SET(GF_MAP_WindyMill, 1)
EVT_IF_GE(GB_StoryProgress, -12)
EVT_SET(GF_ARN10_Defeated_Goomba, 0)
EVT_SET(GF_ARN12_Defeated_Goomba, 0)
EVT_SET(GF_ARN13_Defeated_Goomba, 0)
EVT_END_IF
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80241828)))
EVT_EXEC_WAIT(N(makeEntities))
EVT_EXEC(N(80240BA0))
EVT_CALL(GetDemoState, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_EXEC_WAIT(N(8024118C))
EVT_RETURN
EVT_END_IF
EVT_EXEC(N(8024049C))
EVT_EXEC(N(80240B50))
EVT_EXEC(N(80240300))
EVT_RETURN
EVT_END
};
static s32 N(pad_A6C) = {
0x00000000,
};
EvtScript N(80240A70) = {
EVT_LOOP(0)
EVT_IF_NE(GB_StoryProgress, -18)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(N(func_8024008C_BF482C))
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(N(func_80240000_BF47A0))
EVT_SET(AreaFlag(1), 1)
EVT_IF_LT(GB_StoryProgress, -23)
EVT_SET(GB_StoryProgress, -23)
EVT_END_IF
EVT_CALL(GotoMap, EVT_PTR("arn_09"), 1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(80240B50) = {
EVT_CALL(SetCamProperties, 0, EVT_FLOAT(90.0), 0, 0, 0, EVT_FLOAT(470.0), EVT_FLOAT(17.0), EVT_FLOAT(-7.0))
EVT_EXEC(N(80240A70))
EVT_RETURN
EVT_END
};
static s32 N(pad_B98)[] = {
0x00000000, 0x00000000,
};
EvtScript N(80240BA0) = {
EVT_CALL(PlaySound, 0x8000004B)
EVT_THREAD
EVT_SET(LVar0, 0)
EVT_LABEL(10)
EVT_CALL(RotateModel, 9, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, 15, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, 11, LVar0, 0, 0, 1)
EVT_CALL(RotateModel, 13, LVar0, 0, 0, -1)
EVT_CALL(RotateModel, 17, LVar0, 0, 0, -1)
EVT_ADD(LVar0, 1)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_THREAD
EVT_RETURN
EVT_END
};
static s32 N(pad_CB4)[] = {
0x00000000, 0x00000000, 0x00000000,
};
EvtScript N(80240CC0) = {
EVT_CALL(N(func_802400C0_BF4860))
EVT_CALL(DemoJoystickXY, 2, 0)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 12, 4)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 28, 11)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 47, 22)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 68, 38)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 67, 48)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 64, 59)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 64, 62)
EVT_WAIT(4)
EVT_CALL(DemoSetButtons, 32768)
EVT_WAIT(10)
EVT_CALL(DemoJoystickXY, 64, 58)
EVT_CALL(DemoSetButtons, 0)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 70, 34)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 77, -2)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 74, -23)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 71, -36)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 69, -44)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 67, -49)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 30, -30)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 0, 0)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 0, -1)
EVT_WAIT(8)
EVT_CALL(DemoSetButtons, 32768)
EVT_WAIT(2)
EVT_CALL(DemoJoystickXY, 0, -2)
EVT_WAIT(2)
EVT_CALL(DemoJoystickXY, 0, -1)
EVT_WAIT(2)
EVT_CALL(DemoJoystickXY, 0, 0)
EVT_WAIT(1)
EVT_CALL(DemoSetButtons, 0)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 1, 0)
EVT_WAIT(1)
EVT_CALL(DemoJoystickXY, 0, 0)
EVT_CALL(N(func_802400D4_BF4874))
EVT_CALL(DemoSetButtons, 32768)
EVT_WAIT(12)
EVT_CALL(DemoSetButtons, 0)
EVT_WAIT(20)
EVT_IF_EQ(GF_DemoSceneDone, 1)
EVT_RETURN
EVT_END_IF
EVT_SET(GF_DemoSceneDone, 1)
EVT_CALL(GotoMapSpecial, EVT_PTR("arn_08"), 2, 2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(802410AC) = {
EVT_WAIT(10)
EVT_LOOP(0)
EVT_CALL(GetDemoState, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_IF_EQ(GF_DemoSceneDone, 1)
EVT_RETURN
EVT_END_IF
EVT_SET(GF_DemoSceneDone, 1)
EVT_CALL(GotoMapSpecial, EVT_PTR("arn_08"), 2, 3)
EVT_WAIT(35)
EVT_RETURN
EVT_END
};
EvtScript N(8024116C) = {
EVT_CALL(N(func_802400F4_BF4894))
EVT_RETURN
EVT_END
};
s32 N(D_80241188_BF5928) = {
0x00000000,
};
EvtScript N(8024118C) = {
EVT_CALL(SetCamProperties, 0, EVT_FLOAT(90.0), 0, 0, 0, EVT_FLOAT(470.0), EVT_FLOAT(17.0), EVT_FLOAT(-7.0))
EVT_CALL(N(func_8024019C_BF493C))
EVT_SET(GF_DemoSceneDone, 0)
EVT_EXEC(N(802410AC))
EVT_EXEC(N(80240CC0))
EVT_RETURN
EVT_END
};
static s32 N(pad_11FC) = {
0x00000000,
};
EvtScript N(80241200) = {
EVT_RETURN
EVT_END
};
EvtScript N(80241210) = {
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80241220) = {
.height = 24,
.radius = 24,
.otherAI = &N(80241200),
.onDefeat = &N(80241210),
.level = 13,
};
NpcSettings N(npcSettings_8024124C) = {
.height = 24,
.radius = 24,
.level = 13,
};
EvtScript N(idle_80241278) = {
EVT_RETURN
EVT_END
};
EvtScript N(init_80241288) = {
EVT_IF_NE(GB_StoryProgress, -18)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_ELSE
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_80241278)))
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(interact_802412E8) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(8)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BA)
EVT_CASE_LT(42)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BB)
EVT_CASE_LT(61)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BC)
EVT_CASE_LT(90)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BD)
EVT_CASE_GE(90)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Yakkey_Talk, ANIM_Yakkey_Idle, 0, MSG_CH3_00BE)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(init_802413E8) = {
EVT_IF_LT(GB_StoryProgress, -12)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_ELSE
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_802412E8)))
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(npcGroup_80241448) = {
.id = NPC_TUBBAS_HEART,
.settings = &N(npcSettings_80241220),
.pos = { -23.0f, 75.0f, 31.0f },
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(init_80241288),
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
},
};
StaticNpc N(npcGroup_80241638) = {
.id = NPC_YAKKEY,
.settings = &N(npcSettings_8024124C),
.pos = { 38.0f, 0.0f, 97.0f },
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING,
.init = &N(init_802413E8),
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
ANIM_Yakkey_Idle,
},
.tattle = MSG_NpcTattle_Yakkey,
};
NpcGroupList N(npcGroupList_80241828) = {
NPC_GROUP(N(npcGroup_80241448)),
NPC_GROUP(N(npcGroup_80241638)),
{},
};
static s32 N(pad_184C) = {
0x00000000,
};
EvtScript N(makeEntities) = {
EVT_IF_LT(GB_StoryProgress, -23)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 0, 30, 0, 0, MAKE_ENTITY_END)
EVT_END_IF
EVT_RETURN
EVT_END
};
ApiStatus N(func_802400C0_BF4860)(Evt* script, s32 isInitialCall) {
gPlayerData.bootsLevel = 1;
return ApiStatus_DONE2;
}
ApiStatus N(func_802400D4_BF4874)(Evt* script, s32 isInitialCall) {
func_800EF300();
return ApiStatus_DONE2;
}
ApiStatus N(func_802400F4_BF4894)(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus;
if (isInitialCall) {
script->functionTemp[0] = 0;
}
if (!(playerStatus->position.y > -10.0f)) {
f32 temp_f20 = func_800E34D8();
s32 colliderID;
playerStatus->position.y = player_check_collision_below(temp_f20, &colliderID);
script->functionTemp[0] += fabsf(temp_f20);
return (script->functionTemp[0] > 50) * ApiStatus_DONE2;
}
return ApiStatus_BLOCK;
}
ApiStatus N(func_8024019C_BF493C)(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus;
s32* dataPtr = &N(D_80241188_BF5928);
switch (*dataPtr) {
case 0:
*dataPtr = 1;
break;
case 1:
case 2:
(*dataPtr)++;
break;
case 3: {
partner_clear_player_tracking(wPartnerNpc);
partner_set_goal_pos(playerStatus->position.x, playerStatus->position.z);
func_800EF3D4(0);
set_npc_yaw(wPartnerNpc, 90.0f);
playerStatus->targetYaw = 90.0f;
playerStatus->currentYaw = 90.0f;
playerStatus->spriteFacingAngle = 0.0f;
return ApiStatus_DONE2;
}
}
return ApiStatus_BLOCK;
}

View File

@ -1,29 +0,0 @@
#include "arn_08.h"
#include "message_ids.h"
EntryList N(entryList) = {
{ -80.0f, 0.0f, 108.0f, 45.0f },
{ 0.0f, 0.0f, 0.0f, 0.0f },
{ -85.0f, 0.0f, 55.0f, 45.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { MSG_MapTattle_arn_08 },
};
EvtScript N(80240300) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-22)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_END_SWITCH
EVT_CALL(ClearAmbientSounds, 250)
EVT_RETURN
EVT_END
};

View File

@ -2,18 +2,17 @@
/// @brief Gusty Gulch - Windmill Tunnel Entry
#include "common.h"
#include "../arn.h"
#include "message_ids.h"
#include "map.h"
#include "../arn.h"
#include "mapfs/arn_09_shape.h"
#include "mapfs/arn_09_hit.h"
#include "sprite/npc/TubbasHeart.h"
enum {
NPC_TubbasHeart = 0,
};
#define NAMESPACE arn_09
ApiStatus func_802D2484(Evt* script, s32 isInitialCall);
ApiStatus N(func_80240000_BF6060)(Evt *script, s32 isInitialCall);
extern EvtScript N(main);
extern EvtScript N(802400A0);
extern NpcGroupList N(npcGroupList_80240974);
extern EvtScript N(makeEntities);
extern EvtScript N(802404D0);

View File

@ -0,0 +1,28 @@
#include "arn_09.h"
extern EvtScript N(EVS_Main);
EntryList N(Entrances) = {
[arn_09_ENTRY_0] { 125.0, 0.0, 0.0, 270.0 },
[arn_09_ENTRY_1] { 0.0, 200.0, 0.0, 90.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_arn_09 },
};
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_HEART_FLED_FIRST_TUNNEL)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,45 @@
#include "arn_09.h"
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_LaunchPlayer);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);
EvtScript N(EVS_ExitDoor_arn_10_0) = EVT_EXIT_SPLIT_SINGLE_DOOR(arn_09_ENTRY_0, "arn_10", arn_10_ENTRY_0,
COLLIDER_tte, MODEL_doa, MODEL_o37, DOOR_SWING_OUT);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_10_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(arn_09_ENTRY_0)
EVT_SET(LVar2, MODEL_doa)
EVT_SET(LVar4, MODEL_o37)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC_WAIT(EnterSplitSingleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(arn_09_ENTRY_1)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL)
EVT_CALL(SetSpriteShading, SHADING_ARN_09)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_EnterMap))
EVT_EXEC(N(EVS_LaunchPlayer))
EVT_EXEC(N(EVS_SetupMusic))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,28 @@
#include "arn_09.h"
#include "entity.h"
EvtScript N(EVS_UseSpring) = {
EVT_IF_EQ(AF_ARN_01, TRUE)
EVT_RETURN
EVT_END_IF
EVT_SET(AF_ARN_01, TRUE)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH)
EVT_WAIT(1)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0))
EVT_CALL(PlayerJump, 0, 200, 0, 30)
EVT_CALL(GotoMap, EVT_PTR("arn_08"), arn_08_ENTRY_1)
EVT_WAIT(100)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 0, 0, 0, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring)))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,19 @@
#include "arn_09.h"
EvtScript N(EVS_LaunchPlayer) = {
EVT_IF_EQ(AF_ARN_01, FALSE)
EVT_RETURN
EVT_END_IF
EVT_SET(AF_ARN_01, TRUE)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(SetPlayerActionState, ACTION_STATE_FALLING)
EVT_CALL(func_802D2484)
EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.5))
EVT_CALL(PlayerJump, 50, 0, 0, 16)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_SET(AF_ARN_01, FALSE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,62 @@
#include "arn_09.h"
#include "entity.h"
#include "animation_script.h"
extern AnimScript Entity_ScriptSpring_AnimLaunch;
#include "world/common/npc/TubbasHeart.inc.c"
API_CALLABLE(N(PlaySpringAnimation)) {
Entity* entity = get_entity_by_index(0);
if (entity == NULL) {
return ApiStatus_BLOCK;
}
play_model_animation(entity->virtualModelIndex, Entity_ScriptSpring_AnimLaunch);
return ApiStatus_DONE2;
}
EvtScript N(EVS_NpcIdle_TubbasHeart) = {
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, 0, 25, -10, 6)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2086, 0)
EVT_CALL(N(PlaySpringAnimation))
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, 0, 200, 0, 15)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_SET(GB_StoryProgress, STORY_CH3_HEART_ESCAPED_WELL)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_TubbasHeart) = {
EVT_IF_NE(GB_StoryProgress, STORY_CH3_HEART_FLED_SECOND_TUNNEL)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_ELSE
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart)))
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_TubbasHeart) = {
.id = NPC_TubbasHeart,
.settings = &N(NpcSettings_TubbasHeart),
.pos = { 0.0f, 25.0f, 0.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_TubbasHeart),
.drops = TUBBAS_HEART_DROPS,
.animations = TUBBAS_HEART_ANIMS,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_TubbasHeart)),
{}
};

View File

@ -1,209 +0,0 @@
#include "arn_09.h"
#include "entity.h"
#include "sprite/npc/TubbasHeart.h"
extern s16 Entity_ScriptSpring_AnimLaunch[];
EvtScript N(80240140) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 5)
EVT_SET(LVar2, 0)
EVT_SET(LVar4, 1)
EVT_SET(LVar3, 1)
EVT_EXEC(0x80285DFC)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("arn_10"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(802401F4) = {
EVT_BIND_TRIGGER(N(80240140), TRIGGER_WALL_PRESS_A, 5, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(80240220) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET(LVar2, 0)
EVT_SET(LVar4, 1)
EVT_SET(LVar3, 1)
EVT_EXEC_WAIT(0x80285E24)
EVT_EXEC(N(802401F4))
EVT_CASE_EQ(1)
EVT_EXEC(N(802401F4))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 35)
EVT_CALL(SetSpriteShading, 524288)
EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096)
EVT_CALL(SetCamBGColor, 0, 0, 0, 0)
EVT_CALL(SetCamLeadPlayer, 0, 0)
EVT_CALL(SetCamEnabled, 0, 1)
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80240974)))
EVT_EXEC_WAIT(N(makeEntities))
EVT_EXEC(N(80240220))
EVT_EXEC(N(802404D0))
EVT_EXEC(N(802400A0))
EVT_RETURN
EVT_END
};
static s32 N(pad_398)[] = {
0x00000000, 0x00000000,
};
EvtScript N(802403A0) = {
EVT_IF_EQ(AreaFlag(1), 1)
EVT_RETURN
EVT_END_IF
EVT_SET(AreaFlag(1), 1)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(SetPlayerActionState, 6)
EVT_WAIT(1)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.0))
EVT_CALL(PlayerJump, 0, 200, 0, 30)
EVT_CALL(GotoMap, EVT_PTR("arn_08"), 1)
EVT_WAIT(100)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(makeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 0, 0, 0, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(802403A0)))
EVT_RETURN
EVT_END
};
static s32 N(pad_4CC)[] = {
0x00000000,
};
EvtScript N(802404D0) = {
EVT_IF_EQ(AreaFlag(1), 0)
EVT_RETURN
EVT_END_IF
EVT_SET(AreaFlag(1), 1)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(SetPlayerActionState, 8)
EVT_CALL(func_802D2484)
EVT_CALL(SetPlayerActionState, 6)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.5))
EVT_CALL(PlayerJump, 50, 0, 0, 16)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_SET(AreaFlag(1), 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
static s32 N(pad_5A8)[] = {
0x00000000, 0x00000000,
};
EvtScript N(802405B0) = {
EVT_RETURN
EVT_END
};
EvtScript N(802405C0) = {
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_802405D0) = {
.height = 24,
.radius = 24,
.otherAI = &N(802405B0),
.onDefeat = &N(802405C0),
.level = 13,
};
EvtScript N(idle_802405FC) = {
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, 0, 25, -10, 6)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x2086, 0)
EVT_CALL(N(func_80240000_BF6060))
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, 0, 200, 0, 15)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_SET(GB_StoryProgress, -18)
EVT_RETURN
EVT_END
};
EvtScript N(init_80240730) = {
EVT_IF_NE(GB_StoryProgress, -19)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_ELSE
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_802405FC)))
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(npcGroup_80240784) = {
.id = 0,
.settings = &N(npcSettings_802405D0),
.pos = { 0.0f, 25.0f, 0.0f },
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(init_80240730),
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
},
};
NpcGroupList N(npcGroupList_80240974) = {
NPC_GROUP(N(npcGroup_80240784)),
{},
};
ApiStatus N(func_80240000_BF6060)(Evt* script, s32 isInitialCall) {
Entity* entity = get_entity_by_index(0);
if (entity == NULL) {
return ApiStatus_BLOCK;
}
play_model_animation(entity->virtualModelIndex, Entity_ScriptSpring_AnimLaunch);
return ApiStatus_DONE2;
}

View File

@ -1,27 +0,0 @@
#include "arn_09.h"
#include "message_ids.h"
EntryList N(entryList) = {
{ 125.0f, 0.0f, 0.0f, 270.0f },
{ 0.0f, 200.0f, 0.0f, 90.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { MSG_MapTattle_arn_09 },
};
EvtScript N(802400A0) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-22)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -2,13 +2,19 @@
/// @brief Gusty Gulch - Tunnel 1
#include "common.h"
#include "../arn.h"
#include "message_ids.h"
#include "map.h"
#define NAMESPACE arn_10
#include "../arn.h"
#include "mapfs/arn_10_shape.h"
#include "mapfs/arn_10_hit.h"
extern EvtScript N(main);
extern EvtScript N(80240060);
extern NpcGroupList N(npcGroupList_80240BB8);
extern EvtScript N(makeEntities);
#include "sprite/npc/TubbasHeart.h"
#include "sprite/npc/Goomba.h"
enum {
NPC_TubbasHeart = 0,
NPC_HyperGoomba = 1,
};
#define NAMESPACE arn_10

View File

@ -0,0 +1,28 @@
#include "arn_10.h"
extern EvtScript N(EVS_Main);
EntryList N(Entrances) = {
[arn_10_ENTRY_0] { -225.0, 0.0, 0.0, 90.0 },
[arn_10_ENTRY_1] { 225.0, 0.0, 0.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_arn_10 },
};
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_HEART_FLED_FIRST_TUNNEL)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,49 @@
#include "arn_10.h"
extern NpcGroupList N(DefaultNPCs);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
EvtScript N(EVS_ExitDoor_arn_09_0) = EVT_EXIT_SINGLE_DOOR(arn_10_ENTRY_0, "arn_09", arn_09_ENTRY_0,
COLLIDER_ttw, MODEL_o44, DOOR_SWING_IN);
EvtScript N(EVS_ExitDoor_arn_12_0) = EVT_EXIT_SINGLE_DOOR(arn_10_ENTRY_1, "arn_12", arn_12_ENTRY_0,
COLLIDER_tte, MODEL_o37, DOOR_SWING_OUT);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_12_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(arn_10_ENTRY_0)
EVT_SET(LVar2, MODEL_o44)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(arn_10_ENTRY_1)
EVT_SET(LVar2, MODEL_o37)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL)
EVT_CALL(SetSpriteShading, SHADING_ARN_10)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_WAIT(1)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,101 @@
#include "arn_10.h"
#include "world/common/npc/TubbasHeart.inc.c"
#include "world/common/enemy/complete/HyperGoomba_Wander.inc.c"
EvtScript N(EVS_NpcIdle_TubbasHeart) = {
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0))
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 30)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 8)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14)
EVT_WAIT(1)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_SUB(LVar0, 80)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14)
EVT_WAIT(1)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_SUB(LVar0, 80)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12)
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_SET(GB_StoryProgress, STORY_CH3_HEART_FLED_SECOND_TUNNEL)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_HyperGoomba) = {
EVT_SET(GF_ARN10_Defeated_Goomba, TRUE)
EVT_CALL(DoNpcDefeat)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_TubbasHeart) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart)))
EVT_IF_NE(GB_StoryProgress, STORY_UNUSED_FFFFFFEC)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_HyperGoomba) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN)
EVT_IF_EQ(GF_ARN10_Defeated_Goomba, TRUE)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_RETURN
EVT_END_IF
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HyperGoomba)))
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_TubbasHeart) = {
.id = NPC_TubbasHeart,
.settings = &N(NpcSettings_TubbasHeart),
.pos = { 80.0f, 50.0f, 0.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_TubbasHeart),
.drops = TUBBAS_HEART_DROPS,
.animations = TUBBAS_HEART_ANIMS,
};
StaticNpc N(NpcData_HyperGoomba) = {
.id = NPC_HyperGoomba,
.settings = &N(NpcSettings_HyperGoomba),
.pos = { 0.0f, 0.0f, 0.0f },
.yaw = 270,
.flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_HyperGoomba),
.drops = HYPER_GOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 0, 0 },
.wanderSize = { 20 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 0, 0 },
.detectSize = { 150 },
}
},
.animations = HYPER_GOOMBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_TubbasHeart)),
NPC_GROUP(N(NpcData_HyperGoomba), BTL_ARN_FORMATION_00, BTL_ARN_STAGE_04),
{}
};

View File

@ -0,0 +1,17 @@
#include "arn_10.h"
#include "entity.h"
EvtScript N(80240BE0) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0182, 160, 40)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 200, 0, -40, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(80240BE0)))
EVT_RETURN
EVT_END
};

View File

@ -1,274 +0,0 @@
#include "arn_10.h"
#include "entity.h"
#include "sprite/npc/TubbasHeart.h"
#include "sprite/npc/Goomba.h"
EvtScript N(exitSingleDoor_80240100) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 6)
EVT_SET(LVar2, 0)
EVT_SET(LVar3, -1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("arn_09"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitSingleDoor_802401A4) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 11)
EVT_SET(LVar2, 2)
EVT_SET(LVar3, 1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("arn_12"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(80240248) = {
EVT_BIND_TRIGGER(N(exitSingleDoor_80240100), TRIGGER_WALL_PRESS_A, 6, 1, 0)
EVT_BIND_TRIGGER(N(exitSingleDoor_802401A4), TRIGGER_WALL_PRESS_A, 11, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(enterSingleDoor_80240290) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET(LVar2, 0)
EVT_SET(LVar3, -1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(80240248))
EVT_CASE_EQ(1)
EVT_SET(LVar2, 2)
EVT_SET(LVar3, 1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(80240248))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 35)
EVT_CALL(SetSpriteShading, 524289)
EVT_CALL(SetCamPerspective, 0, 3, 25, 16, 4096)
EVT_CALL(SetCamBGColor, 0, 0, 0, 0)
EVT_CALL(SetCamLeadPlayer, 0, 0)
EVT_CALL(SetCamEnabled, 0, 1)
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80240BB8)))
EVT_EXEC_WAIT(N(makeEntities))
EVT_EXEC(N(80240060))
EVT_EXEC(N(enterSingleDoor_80240290))
EVT_WAIT(1)
EVT_RETURN
EVT_END
};
static s32 N(pad_424)[] = {
0x00000000, 0x00000000, 0x00000000,
};
EvtScript N(80240430) = {
EVT_RETURN
EVT_END
};
EvtScript N(80240440) = {
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80240450) = {
.height = 24,
.radius = 24,
.otherAI = &N(80240430),
.onDefeat = &N(80240440),
.level = 13,
};
MobileAISettings N(npcAISettings_8024047C) = {
.moveSpeed = 1.8f,
.moveTime = 40,
.waitTime = 15,
.alertRadius = 150.0f,
.playerSearchInterval = 2,
.chaseSpeed = 3.3f,
.chaseTurnRate= 70,
.chaseUpdateInterval = 1,
.chaseRadius = 180.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_802404AC) = {
EVT_CALL(BasicAI_Main, EVT_PTR(N(npcAISettings_8024047C)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_802404CC) = {
.height = 20,
.radius = 23,
.ai = &N(npcAI_802404AC),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 12,
};
EvtScript N(idle_802404F8) = {
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0))
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 30)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 8)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14)
EVT_WAIT(1)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_SUB(LVar0, 80)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14)
EVT_WAIT(1)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_SUB(LVar0, 80)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, 0x20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12)
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_SET(GB_StoryProgress, -19)
EVT_RETURN
EVT_END
};
EvtScript N(defeat_802406F4) = {
EVT_SET(GF_ARN10_Defeated_Goomba, 1)
EVT_CALL(DoNpcDefeat)
EVT_RETURN
EVT_END
};
EvtScript N(init_80240720) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(idle_802404F8)))
EVT_IF_NE(GB_StoryProgress, -20)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(init_8024076C) = {
EVT_IF_LT(GB_StoryProgress, -12)
EVT_IF_EQ(GF_ARN10_Defeated_Goomba, 1)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_RETURN
EVT_END_IF
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(defeat_802406F4)))
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(npcGroup_802407D8) = {
.id = 0,
.settings = &N(npcSettings_80240450),
.pos = { 80.0f, 50.0f, 0.0f },
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(init_80240720),
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
ANIM_TubbasHeart_Anim01,
},
};
StaticNpc N(npcGroup_802409C8) = {
.id = 1,
.settings = &N(npcSettings_802404CC),
.flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(init_8024076C),
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 20,
{ ITEM_DRIED_SHROOM, 10, 0 },
.heartDrops = STANDARD_HEART_DROPS(2),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.maxCoinBonus = 2,
},
.territory = { .temp = { 0, 0, 0, 20, 0, -32767, 0, 0, 0, 0, 150, 0, 0, 1 }},
.animations = {
ANIM_Goomba_Hyper_Idle,
ANIM_Goomba_Hyper_Walk,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Idle,
ANIM_Goomba_Hyper_Idle,
ANIM_Goomba_Hyper_Hurt,
ANIM_Goomba_Hyper_Hurt,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
ANIM_Goomba_Hyper_Run,
},
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(npcGroupList_80240BB8) = {
NPC_GROUP(N(npcGroup_802407D8)),
NPC_GROUP(N(npcGroup_802409C8), 0x0E00, 0x04),
{},
};
static s32 N(pad_BDC)[] = {
0x00000000,
};
EvtScript N(80240BE0) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0182, 160, 40)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(makeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 200, 0, -40, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(80240BE0)))
EVT_RETURN
EVT_END
};

View File

@ -1,27 +0,0 @@
#include "arn_10.h"
#include "message_ids.h"
EntryList N(entryList) = {
{ -225.0f, 0.0f, 0.0f, 90.0f },
{ 225.0f, 0.0f, 0.0f, 270.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { MSG_MapTattle_arn_10 },
};
EvtScript N(80240060) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-22)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -2,12 +2,17 @@
/// @brief Gusty Gulch - Tubba's Heart Chamber
#include "common.h"
#include "../arn.h"
#include "message_ids.h"
#include "map.h"
#define NAMESPACE arn_11
#include "../arn.h"
#include "mapfs/arn_11_shape.h"
#include "mapfs/arn_11_hit.h"
extern EvtScript N(main);
extern EvtScript N(80240050);
extern NpcGroupList N(npcGroupList_802410DC);
#include "sprite/npc/TubbasHeart.h"
enum {
NPC_TubbasHeart = 0,
};
#define NAMESPACE arn_11

View File

@ -1,22 +1,23 @@
#include "arn_11.h"
#include "message_ids.h"
EntryList N(entryList) = {
{ -165.0f, 0.0f, 0.0f, 90.0f },
extern EvtScript N(EVS_Main);
EntryList N(Entrances) = {
[arn_11_ENTRY_0] { -165.0, 0.0, 0.0, 90.0 },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_arn_11 },
};
EvtScript N(80240050) = {
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-23)
EVT_CASE_LT(STORY_CH3_WENT_DOWN_THE_WELL)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_LT(-16)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)

View File

@ -0,0 +1,104 @@
#include "arn_11.h"
extern EvtScript N(EVS_SetupMusic);
extern NpcGroupList N(DefaultNPCs);
EvtScript N(EVS_SetupCamera) = {
EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 60, 30, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 60, 30, 0)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-13.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 275)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_MeetHeart) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(30)
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0))
EVT_CALL(PlayerMoveTo, 6, 0, 0)
EVT_CALL(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00BF)
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
EVT_WAIT(40)
EVT_CALL(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00C0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_90000)
EVT_WAIT(30)
EVT_CALL(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00C1)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_90000)
EVT_THREAD
EVT_CALL(SetNpcJumpscale, NPC_TubbasHeart, EVT_FLOAT(2.5))
EVT_CALL(GetNpcPos, NPC_TubbasHeart, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 10)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, NPC_TubbasHeart, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 10)
EVT_END_THREAD
EVT_WAIT(40)
EVT_CALL(SpeakToPlayer, NPC_TubbasHeart, ANIM_TubbasHeart_Anim0B, ANIM_TubbasHeart_Anim01, 0, MSG_CH3_00C2)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_90000)
EVT_WAIT(10)
EVT_CALL(SetNpcVar, NPC_TubbasHeart, 0, 1)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoor_arn_13_1) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(LVar0, arn_11_ENTRY_0)
EVT_SET(LVar1, COLLIDER_ttw)
EVT_SET(LVar2, MODEL_o37)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("arn_13"), arn_13_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_13_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(LVar2, MODEL_o37)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_IF_LT(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL)
EVT_WAIT(10)
EVT_EXEC(N(EVS_SetupCamera))
EVT_EXEC(N(EVS_Scene_MeetHeart))
EVT_WAIT(1)
EVT_END_IF
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL)
EVT_CALL(SetSpriteShading, SHADING_ARN_11)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_WAIT(1)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,166 @@
#include "arn_11.h"
#include "world/common/npc/TubbasHeart.inc.c"
EvtScript N(EVS_NpcIdle_TubbasHeart) = {
EVT_LOOP(0)
EVT_CALL(GetSelfVar, 0, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_THREAD
EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 50)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 3000)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_CALL(StartBossBattle, SONG_TUBBA_BLUBBA_BATTLE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Heart_OpenDoor) = {
EVT_WAIT(15)
EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_OPEN, 0)
EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o37, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Heart_CloseDoor) = {
EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o37, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(PlaySoundAtCollider, COLLIDER_ttw, SOUND_BASIC_DOOR_CLOSE, 0)
EVT_RETURN
EVT_END
};
#define SUBLIST_DONE -10000
Vec3i N(HeartJumpPath)[] = {
{ 100, 30, 70 },
{ 25, 30, 80 },
{ SUBLIST_DONE, 0, 0 },
{ -70, 10, 20 },
{ -180, 0, 0 },
{ -300, 0, 0 },
{ SUBLIST_DONE, 0, 0 },
};
EvtScript N(EVS_Scene_HeartEscape) = {
EVT_THREAD
EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 50)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 450)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_END_THREAD
EVT_WAIT(10)
EVT_CALL(PlayerFaceNpc, NPC_TubbasHeart, TRUE)
EVT_LOOP(2)
EVT_CALL(GetNpcPos, NPC_TubbasHeart, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcJumpscale, NPC_TubbasHeart, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 12)
EVT_WAIT(1)
EVT_END_LOOP
EVT_THREAD
EVT_WAIT(10)
EVT_CALL(SetCamType, CAM_DEFAULT, 4, TRUE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 450)
EVT_CALL(SetCamPosA, CAM_DEFAULT, -56, 70)
EVT_CALL(SetCamPosB, CAM_DEFAULT, -90, 40)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_END_THREAD
EVT_CALL(PlayerFaceNpc, NPC_TubbasHeart, TRUE)
EVT_USE_BUF(EVT_PTR(N(HeartJumpPath)))
EVT_LOOP(0)
EVT_BUF_READ3(LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar0, SUBLIST_DONE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 12)
EVT_WAIT(1)
EVT_END_LOOP
EVT_EXEC(N(EVS_Heart_OpenDoor))
EVT_LOOP(0)
EVT_BUF_READ3(LVar0, LVar1, LVar2)
EVT_IF_EQ(LVar0, SUBLIST_DONE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_TubbasHeart, LVar0, LVar1, LVar2, 12)
EVT_WAIT(1)
EVT_END_LOOP
EVT_EXEC(N(EVS_Heart_CloseDoor))
EVT_WAIT(30)
EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 450)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
EVT_SET(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_TubbasHeart) = {
EVT_IF_GE(GB_StoryProgress, STORY_CH3_HEART_FLED_FIRST_TUNNEL)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_ELSE
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_Scene_HeartEscape)))
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_TubbasHeart) = {
.id = NPC_TubbasHeart,
.settings = &N(NpcSettings_TubbasHeart),
.pos = { 119.0f, 60.0f, 0.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_GRAVITY | NPC_FLAG_JUMPING | NPC_FLAG_40000,
.init = &N(EVS_NpcInit_TubbasHeart),
.drops = TUBBAS_HEART_DROPS,
.animations = TUBBAS_HEART_ANIMS,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_TubbasHeart), BTL_ARN_FORMATION_0F),
{}
};

View File

@ -2,13 +2,19 @@
/// @brief Gusty Gulch - Tunnel 2
#include "common.h"
#include "../arn.h"
#include "message_ids.h"
#include "map.h"
#define NAMESPACE arn_12
#include "../arn.h"
#include "mapfs/arn_12_shape.h"
#include "mapfs/arn_12_hit.h"
extern EvtScript N(main);
extern EvtScript N(80240060);
extern NpcGroupList N(npcGroupList_80240BBC);
extern EvtScript N(makeEntities);
#include "sprite/npc/TubbasHeart.h"
#include "sprite/npc/Goomba.h"
enum {
NPC_TubbasHeart = 0,
NPC_HyperGoomba = 1,
};
#define NAMESPACE arn_12

View File

@ -0,0 +1,28 @@
#include "arn_12.h"
extern EvtScript N(EVS_Main);
EntryList N(Entrances) = {
[arn_12_ENTRY_0] { -231.0, 0.0, 5.0, 90.0 },
[arn_12_ENTRY_1] { 231.0, 0.0, 5.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_arn_12 },
};
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_HEART_FLED_FIRST_TUNNEL)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_BLUBBA_THEME, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,48 @@
#include "arn_12.h"
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);
EvtScript N(EVS_ExitDoor_arn_10_1) = EVT_EXIT_SINGLE_DOOR(arn_12_ENTRY_0, "arn_10", arn_10_ENTRY_1,
COLLIDER_ttw, MODEL_o44, DOOR_SWING_IN);
EvtScript N(EVS_ExitDoor_arn_13_0) = EVT_EXIT_SINGLE_DOOR(arn_12_ENTRY_1, "arn_13", arn_13_ENTRY_0,
COLLIDER_tte, MODEL_o37, DOOR_SWING_OUT);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_10_1)), TRIGGER_WALL_PRESS_A, COLLIDER_ttw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_arn_13_0)), TRIGGER_WALL_PRESS_A, COLLIDER_tte, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(arn_12_ENTRY_0)
EVT_SET(LVar2, MODEL_o44)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(arn_12_ENTRY_1)
EVT_SET(LVar2, MODEL_o37)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_WINDY_MILL)
EVT_CALL(SetSpriteShading, SHADING_ARN_12)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_EnterMap))
EVT_EXEC(N(EVS_SetupMusic))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,102 @@
#include "arn_12.h"
#include "world/common/npc/TubbasHeart.inc.c"
#include "world/common/enemy/complete/HyperGoomba_Wander.inc.c"
EvtScript N(EVS_NpcIdle_TubbasHeart) = {
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(3.0))
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, 30)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 8)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14)
EVT_WAIT(1)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_SUB(LVar0, 80)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim14)
EVT_WAIT(1)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_TubbasHeart_Anim13)
EVT_SUB(LVar0, 80)
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(2.5))
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20C8, 0)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 0, LVar2, 12)
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_SET(GB_StoryProgress, STORY_UNUSED_FFFFFFEC)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_HyperGoomba) = {
EVT_SET(GF_ARN12_Defeated_Goomba, TRUE)
EVT_CALL(DoNpcDefeat)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_TubbasHeart) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_TubbasHeart)))
EVT_IF_NE(GB_StoryProgress, STORY_UNUSED_FFFFFFEB)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_HyperGoomba) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH4_FRYING_PAN_STOLEN)
EVT_IF_EQ(GF_ARN12_Defeated_Goomba, TRUE)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_RETURN
EVT_END_IF
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HyperGoomba)))
EVT_END_IF
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_HyperGoomba)))
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_TubbasHeart) = {
.id = NPC_TubbasHeart,
.settings = &N(NpcSettings_TubbasHeart),
.pos = { 80.0f, 50.0f, 0.0f },
.yaw = 270,
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_TubbasHeart),
.drops = TUBBAS_HEART_DROPS,
.animations = TUBBAS_HEART_ANIMS,
};
StaticNpc N(NpcData_HyperGoomba) = {
.id = NPC_HyperGoomba,
.settings = &N(NpcSettings_HyperGoomba),
.pos = { 0.0f, 0.0f, 0.0f },
.yaw = 270,
.flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING,
.init = &N(EVS_NpcInit_HyperGoomba),
.drops = HYPER_GOOMBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 0, 0 },
.wanderSize = { 20 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 0, 0 },
.detectSize = { 150 },
}
},
.animations = HYPER_GOOMBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_TubbasHeart)),
NPC_GROUP(N(NpcData_HyperGoomba), BTL_ARN_FORMATION_01, BTL_ARN_STAGE_04),
{}
};

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