* a couple maps

* almost done

* ok

* cleanup

* ok

Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
HailSanta 2023-01-05 17:02:12 -05:00 committed by GitHub
parent 2514e13635
commit 403f796246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
178 changed files with 11219 additions and 13780 deletions

View File

@ -726,7 +726,7 @@
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE) \
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
// same as above with calls reordered
// same as EVT_SETUP_CAMERA_NO_LEAD with calls reordered
#define EVT_SETUP_CAMERA_ALT_NO_LEAD() \
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 4096) \
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0) \

View File

@ -1069,14 +1069,14 @@ ApiStatus PlaySoundAtNpc(Evt* script, s32 isInitialCall) {
Bytecode* ptrReadPos = script->ptrReadPos;
s32 npcID = evt_get_variable(script, *ptrReadPos++);
s32 soundID = evt_get_variable(script, *ptrReadPos++);
s32 value2 = evt_get_variable(script, *ptrReadPos++);
s32 flags = evt_get_variable(script, *ptrReadPos++);
Npc* npc = resolve_npc(script, npcID);
if (npc == NULL) {
return ApiStatus_DONE2;
}
sfx_play_sound_at_position(soundID, value2, npc->pos.x, npc->pos.y, npc->pos.z);
sfx_play_sound_at_position(soundID, flags, npc->pos.x, npc->pos.y, npc->pos.z);
return ApiStatus_DONE2;
}

View File

@ -2,24 +2,51 @@
#define _WORLD_AREA_DGB_DGB_H_
enum {
AB_DGB_0 = AreaByte(0),
AB_DGB_1 = AreaByte(1),
AB_DGB_2 = AreaByte(2),
AB_DGB_3 = AreaByte(3),
AB_DGB_4 = AreaByte(4),
AB_DGB_5 = AreaByte(5),
AB_DGB_6 = AreaByte(6),
AB_DGB_7 = AreaByte(7),
AB_DGB_8 = AreaByte(8),
AB_DGB_9 = AreaByte(9),
AB_DGB_A = AreaByte(10),
AB_DGB_B = AreaByte(11),
AB_DGB_C = AreaByte(12),
AB_DGB_D = AreaByte(13),
AB_DGB_E = AreaByte(14),
AB_DGB_F = AreaByte(15),
AB_DGB_Unused_0 = AreaByte(0),
AB_DGB_Unused_1 = AreaByte(1),
AB_DGB_Unused_2 = AreaByte(2),
AB_DGB_Unused_3 = AreaByte(3),
AB_DGB_Unused_4 = AreaByte(4),
AB_DGB_Unused_5 = AreaByte(5),
AB_DGB_Unused_6 = AreaByte(6),
AB_DGB_Unused_7 = AreaByte(7),
AB_DGB_Unused_8 = AreaByte(8),
AB_DGB_Unused_9 = AreaByte(9),
AB_DGB_Unused_A = AreaByte(10),
AB_DGB_Unused_B = AreaByte(11),
AB_DGB_Unused_C = AreaByte(12),
AB_DGB_Unused_D = AreaByte(13),
AB_DGB_Unused_E = AreaByte(14),
AB_DGB_Unused_F = AreaByte(15),
};
#define AF_DGB(index) AreaFlag(index)
enum {
AF_DGB_01 = AreaFlag(1),
AF_DGB_02 = AreaFlag(2),
AF_DGB_03 = AreaFlag(3),
AF_DGB06_Boo_Dialogue = AreaFlag(4),
};
extern MapSettings dgb_00_settings;
extern MapSettings dgb_01_settings;
extern MapSettings dgb_02_settings;
extern MapSettings dgb_03_settings;
extern MapSettings dgb_04_settings;
extern MapSettings dgb_05_settings;
extern MapSettings dgb_06_settings;
extern MapSettings dgb_07_settings;
extern MapSettings dgb_08_settings;
extern MapSettings dgb_09_settings;
extern MapSettings dgb_10_settings;
extern MapSettings dgb_11_settings;
extern MapSettings dgb_12_settings;
extern MapSettings dgb_13_settings;
extern MapSettings dgb_14_settings;
extern MapSettings dgb_15_settings;
extern MapSettings dgb_16_settings;
extern MapSettings dgb_17_settings;
extern MapSettings dgb_18_settings;
s32 dgb_00_map_init(void);
#endif

View File

@ -1,132 +0,0 @@
#include "dgb_00.h"
#include "message_ids.h"
ApiStatus N(func_80240000_BFA0A0)(Evt* script, s32 isInitialCall) {
sprintf(wMapShapeName, "arn_20_shape");
sprintf(wMapHitName, "arn_20_hit");
sprintf(wMapTexName, "arn_tex");
return ApiStatus_BLOCK;
}
EntryList N(entryList) = {
{ -733.0f, 0.0f, -8.0f, 90.0f },
{ 250.0f, 10.0f, -100.0f, 225.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_dgb_00 },
};
EvtScript N(80240110) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 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
};
static s32 N(pad_1B8)[] = {
0x00000000, 0x00000000,
};
EvtScript N(exitWalk_802401C0) = EVT_EXIT_WALK(60, 0, "arn_04", 1);
EvtScript N(exitDoubleDoor_8024021C) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 18)
EVT_SET(LVar2, 5)
EVT_SET(LVar3, 7)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_01"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(802402D0) = {
EVT_BIND_TRIGGER(N(exitWalk_802401C0), TRIGGER_FLOOR_ABOVE, 15, 1, 0)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-28)
EVT_BIND_TRIGGER(N(exitDoubleDoor_8024021C), TRIGGER_WALL_PRESS_A, 18, 1, 0)
EVT_CASE_LT(-25)
EVT_CASE_LT(-16)
EVT_EXEC(N(80240F50))
EVT_EXEC_WAIT(N(80241AA0))
EVT_CASE_DEFAULT
EVT_BIND_TRIGGER(N(exitDoubleDoor_8024021C), TRIGGER_WALL_PRESS_A, 18, 1, 0)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(enterDoubleDoor_8024038C) = {
EVT_CALL(GetLoadType, LVar1)
EVT_IF_EQ(LVar1, 1)
EVT_EXEC(EnterSavePoint)
EVT_EXEC(N(802402D0))
EVT_RETURN
EVT_END_IF
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET(LVar0, EVT_PTR(N(802402D0)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_CASE_EQ(1)
EVT_IF_GE(GB_StoryProgress, -28)
EVT_IF_LT(GB_StoryProgress, -25)
EVT_EXEC(N(802402D0))
EVT_THREAD
EVT_EXEC_WAIT(N(8024103C))
EVT_EXEC_WAIT(N(802413F4))
EVT_END_THREAD
EVT_RETURN
EVT_END_IF
EVT_END_IF
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar2, 5)
EVT_SET(LVar3, 7)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(802402D0))
EVT_CASE_EQ(2)
EVT_EXEC(N(802402D0))
EVT_EXEC(N(80242B84))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 15)
EVT_SET(GF_MAP_TubbasManor, 1)
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_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, 2)
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_80243740)))
EVT_ELSE
EVT_CALL(MakeNpcs, 0, EVT_PTR(N(npcGroupList_802436EC)))
EVT_END_IF
EVT_EXEC_WAIT(N(makeEntities))
EVT_EXEC(N(80240110))
EVT_EXEC(N(enterDoubleDoor_8024038C))
EVT_RETURN
EVT_END
};

View File

@ -1,858 +0,0 @@
#include "dgb_00.h"
#include "entity.h"
#include "sprite/npc/Boo.h"
#include "sprite/npc/Sentinel.h"
#include "sprite/npc/WorldBombette.h"
#include "sprite/npc/WorldBow.h"
#include "sprite/npc/WorldGoombario.h"
#include "sprite/npc/WorldKooper.h"
#include "sprite/npc/WorldParakarry.h"
enum {
NPC_BOO0,
NPC_BOO1,
NPC_BOO2,
NPC_BOO3,
NPC_BOO4,
NPC_BOO5,
NPC_SENTINEL,
};
NpcSettings N(npcSettings_80240640) = {
.height = 24,
.radius = 24,
.level = 99,
};
NpcSettings N(npcSettings_8024066C) = {
.height = 24,
.radius = 24,
.level = 99,
};
EvtScript N(80240698) = {
EVT_SET(LVar3, 0)
EVT_SUB(LVar3, LVar2)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 18, 0x7FFFFE00)
EVT_CALL(PlaySoundAtCollider, 18, 455, 0)
EVT_CALL(MakeLerp, 0, 80, 30, 0)
EVT_LABEL(10)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, 7, LVar0, 0, LVar2, 0)
EVT_CALL(RotateModel, 5, LVar0, 0, LVar3, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(10)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(8024079C) = {
EVT_SET(LVar3, 0)
EVT_SUB(LVar3, LVar2)
EVT_CALL(MakeLerp, 80, 0, 12, 0)
EVT_LABEL(10)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, 7, LVar0, 0, LVar2, 0)
EVT_CALL(RotateModel, 5, LVar0, 0, LVar3, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(ModifyColliderFlags, 1, 18, 0x7FFFFE00)
EVT_CALL(PlaySoundAtCollider, 18, 456, 0)
EVT_RETURN
EVT_END
};
EvtScript N(802408A0) = {
EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, 0, LVar0, LVar2, 46)
EVT_RETURN
EVT_END
};
EvtScript N(802408F8) = {
EVT_CALL(GetNpcPos, 1, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, 1, LVar0, LVar2, 50)
EVT_RETURN
EVT_END
};
EvtScript N(80240950) = {
EVT_CALL(GetNpcPos, 2, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, 2, LVar0, LVar2, 53)
EVT_RETURN
EVT_END
};
EvtScript N(802409A8) = {
EVT_CALL(GetNpcPos, 3, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, 3, LVar0, LVar2, 46)
EVT_RETURN
EVT_END
};
EvtScript N(80240A00) = {
EVT_CALL(GetNpcPos, 4, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, 4, LVar0, LVar2, 50)
EVT_RETURN
EVT_END
};
EvtScript N(80240A58) = {
EVT_CALL(GetNpcPos, 5, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, 5, LVar0, LVar2, 53)
EVT_RETURN
EVT_END
};
EvtScript N(80240AB0) = {
EVT_EXEC(N(802408A0))
EVT_EXEC(N(802408F8))
EVT_EXEC(N(80240950))
EVT_EXEC(N(802409A8))
EVT_EXEC(N(80240A00))
EVT_EXEC(N(80240A58))
EVT_RETURN
EVT_END
};
EvtScript N(80240B08) = {
EVT_CALL(SetNpcJumpscale, 0, EVT_FLOAT(-0.2))
EVT_CALL(NpcJump0, 0, 257, 30, -90, 5)
EVT_CALL(EnableNpcShadow, 0, FALSE)
EVT_CALL(SetNpcAnimation, 0, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(80240B74) = {
EVT_CALL(SetNpcJumpscale, 1, EVT_FLOAT(-0.3))
EVT_CALL(NpcJump0, 1, 272, 112, -81, 12)
EVT_CALL(EnableNpcShadow, 1, FALSE)
EVT_CALL(SetNpcAnimation, 1, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(80240BE0) = {
EVT_CALL(SetNpcJumpscale, 2, EVT_FLOAT(-0.4))
EVT_CALL(NpcJump0, 2, 237, 120, -118, 10)
EVT_CALL(EnableNpcShadow, 2, FALSE)
EVT_CALL(SetNpcAnimation, 2, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(80240C4C) = {
EVT_CALL(SetNpcJumpscale, 3, EVT_FLOAT(-0.3))
EVT_CALL(NpcJump0, 3, 280, 60, -79, 8)
EVT_CALL(EnableNpcShadow, 3, FALSE)
EVT_CALL(SetNpcAnimation, 3, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(80240CB8) = {
EVT_CALL(SetNpcJumpscale, 4, EVT_FLOAT(-0.4))
EVT_CALL(NpcJump0, 4, 250, 81, -97, 9)
EVT_CALL(EnableNpcShadow, 4, FALSE)
EVT_CALL(SetNpcAnimation, 4, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(80240D24) = {
EVT_CALL(SetNpcJumpscale, 5, EVT_FLOAT(-0.5))
EVT_CALL(NpcJump0, 5, 227, 43, -123, 15)
EVT_CALL(EnableNpcShadow, 5, FALSE)
EVT_CALL(SetNpcAnimation, 5, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(80240D90) = {
EVT_EXEC(N(80240B74))
EVT_EXEC(N(80240BE0))
EVT_EXEC(N(80240C4C))
EVT_EXEC(N(80240CB8))
EVT_EXEC(N(80240D24))
EVT_RETURN
EVT_END
};
EvtScript N(80240DDC) = {
EVT_CALL(GetNpcPos, 0, LVar0, LVar1, LVar2)
EVT_LOOP(0)
EVT_CALL(RandInt, 5, LVarA)
EVT_ADD(LVarA, 2)
EVT_SET(LVarB, 0)
EVT_LABEL(10)
EVT_SET(LVar3, LVar0)
EVT_ADD(LVar3, 1)
EVT_CALL(SetNpcPos, 0, LVar3, LVar1, LVar2)
EVT_WAIT(1)
EVT_SET(LVar3, LVar0)
EVT_ADD(LVar3, -1)
EVT_CALL(SetNpcPos, 0, LVar3, LVar1, LVar2)
EVT_WAIT(1)
EVT_ADD(LVarB, 1)
EVT_IF_LT(LVarB, LVarA)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(RandInt, 10, LVarA)
EVT_ADD(LVarA, 10)
EVT_WAIT(LVarA)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(80240F50) = {
EVT_SET_GROUP(EVT_GROUP_EF)
EVT_LOOP(0)
EVT_CALL(RandInt, 50, LVar0)
EVT_ADD(LVar0, 80)
EVT_WAIT(LVar0)
EVT_IF_EQ(MapVar(0), 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(PlaySoundAt, SOUND_B4, 0, 240, 10, -125)
EVT_CALL(ShakeCam, 0, 0, 20, EVT_FLOAT(2.0))
EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00EF, 160, 40)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(8024103C) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetPlayerPos, 350, 10, -150)
EVT_CALL(InterpPlayerYaw, 270, 1)
EVT_CALL(SetNpcPos, NPC_PARTNER, 350, 10, -150)
EVT_CALL(EnablePartnerAI)
EVT_CALL(SetCamType, 0, 4, 0)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0))
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_SET(LVar0, 175)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, -75)
EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2)
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
EVT_WAIT(40)
EVT_CALL(SetNpcPos, 0, -60, 10, -70)
EVT_CALL(SetNpcPos, 1, -100, 10, -110)
EVT_CALL(SetNpcPos, 2, -140, 10, -150)
EVT_CALL(SetNpcPos, 3, -100, 10, -30)
EVT_CALL(SetNpcPos, 4, -140, 10, -70)
EVT_CALL(SetNpcPos, 5, -180, 10, -100)
EVT_EXEC_WAIT(N(80240AB0))
EVT_WAIT(60)
EVT_CALL(InterpNpcYaw, 0, 270, 1)
EVT_CALL(SpeakToPlayer, 0, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DB)
EVT_CALL(SpeakToPlayer, 4, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DC)
EVT_CALL(SpeakToPlayer, 0, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DD)
EVT_CALL(PlaySoundAt, SOUND_B4, 0, 240, 10, -125)
EVT_CALL(ShakeCam, 0, 0, 20, EVT_FLOAT(2.0))
EVT_WAIT(10)
EVT_CALL(PlaySoundAt, SOUND_B4, 0, 240, 10, -125)
EVT_CALL(ShakeCam, 0, 0, 20, EVT_FLOAT(2.0))
EVT_CALL(InterpNpcYaw, 0, 90, 1)
EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00DE, 160, 40)
EVT_CALL(SetPlayerPos, 350, 10, -150)
EVT_CALL(InterpPlayerYaw, 270, 1)
EVT_CALL(SetNpcPos, NPC_PARTNER, 350, 10, -150)
EVT_SET(LVar2, 1)
EVT_EXEC_WAIT(N(80240698))
EVT_RETURN
EVT_END
};
EvtScript N(802413F4) = {
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(8.0))
EVT_CALL(PlayerMoveTo, 184, -44, 0)
EVT_CALL(PlaySoundAtNpc, 0, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, 1, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, 2, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, 3, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, 4, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, 5, SOUND_262, 0)
EVT_CALL(ShowEmote, 0, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0)
EVT_CALL(ShowEmote, 1, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0)
EVT_CALL(ShowEmote, 2, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0)
EVT_CALL(ShowEmote, 3, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0)
EVT_CALL(ShowEmote, 4, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0)
EVT_CALL(ShowEmote, 5, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0)
EVT_WAIT(50)
EVT_SET(LVar2, 1)
EVT_EXEC(N(8024079C))
EVT_EXEC(N(80240D90))
EVT_WAIT(20)
EVT_CALL(SetCamType, 0, 6, 1)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(6.0))
EVT_CALL(SetCamPitch, 0, EVT_FLOAT(15.0), EVT_FLOAT(-15.0))
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, 0, 300)
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
EVT_EXEC_GET_TID(N(80240DDC), LVarA)
EVT_CALL(SpeakToPlayer, 0, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00DF)
EVT_KILL_THREAD(LVarA)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, 0, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00E0)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, 0, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00E1)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH3_00E2)
EVT_CASE_EQ(2)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH3_00E3)
EVT_CASE_EQ(3)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH3_00E4)
EVT_CASE_EQ(4)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH3_00E5)
EVT_CASE_EQ(9)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00E6)
EVT_END_SWITCH
EVT_CALL(EnablePartnerAI)
EVT_CALL(SetCamType, 0, 4, 0)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(6.0))
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2)
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, 0, 0, 0)
EVT_CALL(PlaySoundAt, SOUND_B4, 0, 240, 10, -125)
EVT_CALL(ShakeCam, 0, 0, 20, EVT_FLOAT(2.0))
EVT_WAIT(5)
EVT_CALL(PlaySoundAt, SOUND_B4, 0, 240, 10, -125)
EVT_CALL(ShakeCam, 0, 0, 20, EVT_FLOAT(2.0))
EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00E7, 160, 40)
EVT_EXEC_WAIT(N(80240B08))
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, 0, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 5, MSG_CH3_00E8)
EVT_CALL(SetNpcAnimation, 0, ANIM_Boo_Tan_Flail)
EVT_EXEC(N(80240F50))
EVT_SET(GB_StoryProgress, -25)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(80241AA0) = {
EVT_CALL(SetNpcPos, 0, 246, 30, -110)
EVT_CALL(SetNpcPos, 1, 276, 120, -80)
EVT_CALL(SetNpcPos, 2, 216, 120, -140)
EVT_CALL(SetNpcPos, 3, 276, 60, -80)
EVT_CALL(SetNpcPos, 4, 246, 90, -110)
EVT_CALL(SetNpcPos, 5, 216, 60, -130)
EVT_CALL(InterpNpcYaw, 0, 70, 1)
EVT_CALL(InterpNpcYaw, 1, 99, 1)
EVT_CALL(InterpNpcYaw, 2, 93, 1)
EVT_CALL(InterpNpcYaw, 3, 74, 1)
EVT_CALL(InterpNpcYaw, 4, 78, 1)
EVT_CALL(InterpNpcYaw, 5, 81, 1)
EVT_CALL(SetNpcAnimation, 0, ANIM_Boo_Tan_Flail)
EVT_CALL(SetNpcAnimation, 1, ANIM_Boo_Tan_Flail)
EVT_CALL(SetNpcAnimation, 2, ANIM_Boo_Tan_Flail)
EVT_CALL(SetNpcAnimation, 3, ANIM_Boo_Tan_Flail)
EVT_CALL(SetNpcAnimation, 4, ANIM_Boo_Tan_Flail)
EVT_CALL(SetNpcAnimation, 5, ANIM_Boo_Tan_Flail)
EVT_CALL(EnableNpcShadow, 0, FALSE)
EVT_CALL(EnableNpcShadow, 1, FALSE)
EVT_CALL(EnableNpcShadow, 2, FALSE)
EVT_CALL(EnableNpcShadow, 3, FALSE)
EVT_CALL(EnableNpcShadow, 4, FALSE)
EVT_CALL(EnableNpcShadow, 5, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(interact_80241CD8) = {
EVT_SET(MapVar(0), 1)
EVT_CALL(SpeakToPlayer, 0, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 5, MSG_CH3_00E9)
EVT_CALL(SetNpcAnimation, 0, ANIM_Boo_Tan_Flail)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(1)
EVT_CALL(AdjustCam, 0, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0))
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH3_00EA)
EVT_CALL(ResetCam, 0, EVT_FLOAT(6.0))
EVT_CASE_EQ(2)
EVT_CALL(AdjustCam, 0, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0))
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH3_00EB)
EVT_CALL(ResetCam, 0, EVT_FLOAT(6.0))
EVT_CASE_EQ(3)
EVT_CALL(AdjustCam, 0, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0))
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH3_00EC)
EVT_CALL(ResetCam, 0, EVT_FLOAT(6.0))
EVT_CASE_EQ(4)
EVT_CALL(AdjustCam, 0, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0))
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH3_00ED)
EVT_CALL(ResetCam, 0, EVT_FLOAT(6.0))
EVT_CASE_EQ(9)
EVT_CALL(AdjustCam, 0, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0))
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00EE)
EVT_CALL(ResetCam, 0, EVT_FLOAT(6.0))
EVT_END_SWITCH
EVT_CALL(EnablePartnerAI)
EVT_SET(MapVar(0), 0)
EVT_RETURN
EVT_END
};
EvtScript N(init_80241F70) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_80241CD8)))
EVT_RETURN
EVT_END
};
EvtScript N(init_80241F94) = {
EVT_RETURN
EVT_END
};
EvtScript N(init_80241FA4) = {
EVT_RETURN
EVT_END
};
EvtScript N(init_80241FB4) = {
EVT_RETURN
EVT_END
};
EvtScript N(init_80241FC4) = {
EVT_RETURN
EVT_END
};
EvtScript N(init_80241FD4) = {
EVT_RETURN
EVT_END
};
StaticNpc N(npcGroup_80241FE4) = {
.id = NPC_BOO0,
.settings = &N(npcSettings_80240640),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_400000,
.init = &N(init_80241F70),
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Walk,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Confused,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
},
.tattle = MSG_NpcTattle_BraveBoo,
};
StaticNpc N(npcGroup_802421D4) = {
.id = NPC_BOO1,
.settings = &N(npcSettings_80240640),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400,
.init = &N(init_80241F94),
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Walk,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Confused,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
},
};
StaticNpc N(npcGroup_802423C4) = {
.id = NPC_BOO2,
.settings = &N(npcSettings_80240640),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400,
.init = &N(init_80241FA4),
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Walk,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Confused,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
},
};
StaticNpc N(npcGroup_802425B4) = {
.id = NPC_BOO3,
.settings = &N(npcSettings_80240640),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400,
.init = &N(init_80241FB4),
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Walk,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Confused,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
},
};
StaticNpc N(npcGroup_802427A4) = {
.id = NPC_BOO4,
.settings = &N(npcSettings_80240640),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400,
.init = &N(init_80241FC4),
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Walk,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Confused,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
},
};
StaticNpc N(npcGroup_80242994) = {
.id = NPC_BOO5,
.settings = &N(npcSettings_80240640),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400,
.init = &N(init_80241FD4),
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Walk,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Confused,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
},
};
EvtScript N(80242B84) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetNpcPos, NPC_PARTNER, 320, 10, -160)
EVT_CALL(PlaySound, SOUND_32E)
EVT_THREAD
EVT_LOOP(180)
EVT_CALL(GetNpcPos, 6, LVar0, LVar1, LVar2)
EVT_CALL(N(func_80240060_BFA100))
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetPlayerPos, 320, 50, -160)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80017)
EVT_CALL(SetNpcPos, 6, 320, 70, -158)
EVT_CALL(InterpNpcYaw, 6, 270, 0)
EVT_CALL(SetNpcAnimation, 6, ANIM_Sentinel_Anim08)
EVT_CALL(UseSettingsFrom, 0, 175, 0, -35)
EVT_CALL(SetPanTarget, 0, 175, 0, -35)
EVT_CALL(SetCamDistance, 0, EVT_FLOAT(540.0))
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_WAIT(20)
EVT_THREAD
EVT_SET(LVar2, 1)
EVT_EXEC(N(80240698))
EVT_END_THREAD
EVT_WAIT(15)
EVT_THREAD
EVT_CALL(SetPlayerJumpscale, 0)
EVT_CALL(PlayerJump1, 175, 50, -35, 40)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(DisablePartnerAI, 0)
EVT_WAIT(1)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0)
EVT_CALL(SetNpcAnimation, NPC_PARTNER, 0x107)
EVT_WAIT(85)
EVT_CALL(func_802CF56C, 2)
EVT_WAIT(1)
EVT_CALL(EnablePartnerAI)
EVT_END_THREAD
EVT_CALL(NpcMoveTo, 6, 175, -33, 40)
EVT_WAIT(20)
EVT_CALL(SetNpcPos, 6, 175, 85, -33)
EVT_CALL(SetNpcAnimation, 6, ANIM_Sentinel_Anim09)
EVT_WAIT(20)
EVT_CALL(PlaySoundAtNpc, 6, SOUND_2F7, 0)
EVT_CALL(SetNpcAnimation, 6, ANIM_Sentinel_Anim02)
EVT_CALL(SetNpcPos, 6, 175, 70, -33)
EVT_THREAD
EVT_WAIT(40)
EVT_CALL(SetNpcAnimation, 6, ANIM_Sentinel_Anim03)
EVT_CALL(NpcMoveTo, 6, 270, -120, 30)
EVT_CALL(StopSound, 814)
EVT_CALL(SetNpcPos, 6, 0, -1000, 0)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(60)
EVT_SET(LVar2, 1)
EVT_EXEC(N(8024079C))
EVT_END_THREAD
EVT_CALL(SetPlayerJumpscale, 0)
EVT_CALL(PlayerJump1, 175, 0, -35, 10)
EVT_CALL(PlaySoundAtNpc, 6, SOUND_162, 0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80003)
EVT_THREAD
EVT_WAIT(2)
EVT_CALL(PlayEffect, 0x10, 3, 0, 175, 0, -35, 20, -20, 30, 0, 0, 0, 0, 0)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(SetCamDistance, 0, EVT_FLOAT(320.0))
EVT_CALL(SetCamPitch, 0, EVT_FLOAT(15.0), EVT_FLOAT(-7.5))
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(2.0))
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_END_THREAD
EVT_WAIT(65)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(1)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_GRAVITY)), TRUE)
EVT_CASE_EQ(2)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_GRAVITY)), TRUE)
EVT_CASE_EQ(3)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, ((NPC_FLAG_GRAVITY)), TRUE)
EVT_END_SWITCH
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, 0x108, 0x106, 5, MSG_CH3_00D6)
EVT_CASE_EQ(2)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, 0x108, 0x106, 5, MSG_CH3_00D7)
EVT_CASE_EQ(3)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, 0x108, 0x106, 5, MSG_CH3_00D8)
EVT_CASE_EQ(4)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, 0x108, 0x106, 5, MSG_CH3_00D9)
EVT_CASE_EQ(9)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, 0x108, 0x106, 5, MSG_CH3_00DA)
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_PARTNER, 0x108, 0x106, 5, MSG_CH3_00D6)
EVT_END_SWITCH
EVT_CALL(EnablePartnerAI)
EVT_WAIT(5)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_GetUp)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_DustOff)
EVT_WAIT(7)
EVT_CALL(PlaySoundAtPlayer, 370, 0)
EVT_WAIT(8)
EVT_CALL(PlaySoundAtPlayer, 370, 0)
EVT_WAIT(15)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_8001B)
EVT_WAIT(25)
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_WAIT(1)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(InterpPlayerYaw, 45, 0)
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimMidairStill)
EVT_CALL(SetPlayerJumpscale, 1)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(PlayerJump1, LVar0, 0, LVar2, 10)
EVT_CALL(PlayerJump1, LVar0, 0, LVar2, 10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, 0, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, 0, LVar0, LVar1, LVar2)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(4.0))
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(WaitForCam, 0, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, 0, 0, 0)
EVT_CALL(EnablePartnerAI)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(init_802434EC) = {
EVT_RETURN
EVT_END
};
StaticNpc N(npcGroup_802434FC) = {
.id = NPC_SENTINEL,
.settings = &N(npcSettings_8024066C),
.pos = { 0.0f, 0.0f, -1000.0f },
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_400000,
.init = &N(init_802434EC),
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim02,
ANIM_Sentinel_Anim03,
ANIM_Sentinel_Anim03,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim05,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim08,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
},
};
NpcGroupList N(npcGroupList_802436EC) = {
NPC_GROUP(N(npcGroup_80241FE4)),
NPC_GROUP(N(npcGroup_802421D4)),
NPC_GROUP(N(npcGroup_802423C4)),
NPC_GROUP(N(npcGroup_802425B4)),
NPC_GROUP(N(npcGroup_802427A4)),
NPC_GROUP(N(npcGroup_80242994)),
{},
};
NpcGroupList N(npcGroupList_80243740) = {
NPC_GROUP(N(npcGroup_802434FC)),
{},
};
static s32 N(pad_3758)[] = {
0x00000000, 0x00000000,
};
EvtScript N(makeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -65, 60, -240, 0, MAKE_ENTITY_END)
EVT_RETURN
EVT_END
};
ApiStatus N(func_80240060_BFA100)(Evt* script, s32 isInitialCall) {
Npc* npc = get_npc_unsafe(get_enemy(6)->npcID);
sfx_adjust_env_sound_pos(SOUND_32E, 0, npc->pos.x, npc->pos.y, npc->pos.z);
return ApiStatus_DONE2;
}

View File

@ -2,20 +2,42 @@
/// @brief Tubba's Castle - Escape Scene
#include "common.h"
#include "../dgb.h"
#include "message_ids.h"
#include "map.h"
#include "../dgb.h"
#include "mapfs/arn_20_shape.h"
#include "mapfs/arn_20_hit.h"
#include "sprite/npc/WorldGoombario.h"
#include "sprite/npc/WorldKooper.h"
#include "sprite/npc/WorldBombette.h"
#include "sprite/npc/WorldParakarry.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_Sentinel = 6,
};
enum {
MV_PreventTaunting = MapVar(0),
};
#define NAMESPACE dgb_00
ApiStatus N(func_80240060_BFA100)(Evt* script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_802436EC);
extern NpcGroupList N(npcGroupList_80243740);
extern EvtScript N(80240F50);
extern EvtScript N(8024103C);
extern EvtScript N(802413F4);
extern EvtScript N(80241AA0);
extern EvtScript N(80242B84);
extern EvtScript N(main);
extern EvtScript N(makeEntities);
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_Scene_ThrownOutBySentinel);
extern EvtScript N(EVS_Scene_BoosApproachManor);
extern EvtScript N(EVS_Scene_EscapeFromTubba);
extern EvtScript N(EVS_SetBoosBracingDoor);
extern EvtScript N(EVS_TubbaTaunting);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);
extern NpcGroupList N(BooNPCs);

View File

@ -0,0 +1,14 @@
#include "dgb_00.h"
EntryList N(Entrances) = {
[dgb_00_ENTRY_0] { -733.0, 0.0, -8.0, 90.0 },
[dgb_00_ENTRY_1] { 250.0, 10.0, -100.0, 225.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_dgb_00 },
};

View File

@ -0,0 +1,15 @@
#include "dgb_00.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_GUSTY_GULCH, 0, 8)
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)
EVT_END_SWITCH
EVT_CALL(ClearAmbientSounds, 250)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,97 @@
#include "dgb_00.h"
s32 N(map_init)(void) {
sprintf(wMapShapeName, "arn_20_shape");
sprintf(wMapHitName, "arn_20_hit");
sprintf(wMapTexName, "arn_tex");
return FALSE;
}
EvtScript N(EVS_ExitWalk_arn_04_1) = EVT_EXIT_WALK(60, dgb_00_ENTRY_0, "arn_04", arn_04_ENTRY_1);
EvtScript N(EVS_ExitDoors_dgb_01_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_00_ENTRY_1)
EVT_SET(LVar1, COLLIDER_deiliwt)
EVT_SET(LVar2, MODEL_d1)
EVT_SET(LVar3, MODEL_d2)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_arn_04_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_SMASHED_THE_BRIDGES)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliwt, 1, 0)
EVT_CASE_LT(STORY_CH3_ESCAPED_TUBBAS_MANOR)
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_EXEC(N(EVS_TubbaTaunting))
EVT_EXEC_WAIT(N(EVS_SetBoosBracingDoor))
EVT_CASE_DEFAULT
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deiliwt, 1, 0)
EVT_END_SWITCH
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(dgb_00_ENTRY_0)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_CASE_EQ(dgb_00_ENTRY_1)
EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_SMASHED_THE_BRIDGES)
EVT_IF_LT(GB_StoryProgress, STORY_CH3_ESCAPED_TUBBAS_MANOR)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_THREAD
EVT_EXEC_WAIT(N(EVS_Scene_BoosApproachManor))
EVT_EXEC_WAIT(N(EVS_Scene_EscapeFromTubba))
EVT_END_THREAD
EVT_RETURN
EVT_END_IF
EVT_END_IF
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar2, MODEL_d1)
EVT_SET(LVar3, MODEL_d2)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(dgb_00_ENTRY_2)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_EXEC(N(EVS_Scene_ThrownOutBySentinel))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR)
EVT_SET(GF_MAP_TubbasManor, TRUE)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, dgb_00_ENTRY_2)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_ELSE
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(BooNPCs)))
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,680 @@
#include "dgb_00.h"
#include "effects.h"
API_CALLABLE(N(PlaySentinelSounds)) {
Npc* npc = get_npc_unsafe(get_enemy(NPC_Sentinel)->npcID);
sfx_adjust_env_sound_pos(SOUND_32E, 0, npc->pos.x, npc->pos.y, npc->pos.z);
return ApiStatus_DONE2;
}
#include "world/common/npc/Boo.inc.c"
#include "world/common/enemy/complete/Sentinel.h"
NpcSettings N(NpcSettings_Sentinel) = {
.height = 24,
.radius = 24,
.level = 99,
};
EvtScript N(EVS_OpenDoors) = {
EVT_SET(LVar3, 0)
EVT_SUB(LVar3, LVar2)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deiliwt, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(PlaySoundAtCollider, COLLIDER_deiliwt, SOUND_CREAKY_DOOR_OPEN, 0)
EVT_CALL(MakeLerp, 0, 80, 30, EASING_LINEAR)
EVT_LABEL(10)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_d2, LVar0, 0, LVar2, 0)
EVT_CALL(RotateModel, MODEL_d1, LVar0, 0, LVar3, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(10)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_CloseDoors) = {
EVT_SET(LVar3, 0)
EVT_SUB(LVar3, LVar2)
EVT_CALL(MakeLerp, 80, 0, 12, EASING_LINEAR)
EVT_LABEL(10)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_d2, LVar0, 0, LVar2, 0)
EVT_CALL(RotateModel, MODEL_d1, LVar0, 0, LVar3, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 0)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deiliwt, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(PlaySoundAtCollider, COLLIDER_deiliwt, SOUND_CREAKY_DOOR_CLOSE, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_AdvanceBoo1) = {
EVT_CALL(GetNpcPos, NPC_Boo_01, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, NPC_Boo_01, LVar0, LVar2, 46)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_AdvanceBoo2) = {
EVT_CALL(GetNpcPos, NPC_Boo_02, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, NPC_Boo_02, LVar0, LVar2, 50)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_AdvanceBoo3) = {
EVT_CALL(GetNpcPos, NPC_Boo_03, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, NPC_Boo_03, LVar0, LVar2, 53)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_AdvanceBoo4) = {
EVT_CALL(GetNpcPos, NPC_Boo_04, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, NPC_Boo_04, LVar0, LVar2, 46)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_AdvanceBoo5) = {
EVT_CALL(GetNpcPos, NPC_Boo_05, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, NPC_Boo_05, LVar0, LVar2, 50)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_AdvanceBoo6) = {
EVT_CALL(GetNpcPos, NPC_Boo_06, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 200)
EVT_CALL(NpcMoveTo, NPC_Boo_06, LVar0, LVar2, 53)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_AdvanceBooPhalanx) = {
EVT_EXEC(N(EVS_AdvanceBoo1))
EVT_EXEC(N(EVS_AdvanceBoo2))
EVT_EXEC(N(EVS_AdvanceBoo3))
EVT_EXEC(N(EVS_AdvanceBoo4))
EVT_EXEC(N(EVS_AdvanceBoo5))
EVT_EXEC(N(EVS_AdvanceBoo6))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BraceDoor1) = {
EVT_CALL(SetNpcJumpscale, NPC_Boo_01, EVT_FLOAT(-0.2))
EVT_CALL(NpcJump0, NPC_Boo_01, 257, 30, -90, 5)
EVT_CALL(EnableNpcShadow, NPC_Boo_01, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BraceDoor2) = {
EVT_CALL(SetNpcJumpscale, NPC_Boo_02, EVT_FLOAT(-0.3))
EVT_CALL(NpcJump0, NPC_Boo_02, 272, 112, -81, 12)
EVT_CALL(EnableNpcShadow, NPC_Boo_02, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Boo_02, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BraceDoor3) = {
EVT_CALL(SetNpcJumpscale, NPC_Boo_03, EVT_FLOAT(-0.4))
EVT_CALL(NpcJump0, NPC_Boo_03, 237, 120, -118, 10)
EVT_CALL(EnableNpcShadow, NPC_Boo_03, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BraceDoor4) = {
EVT_CALL(SetNpcJumpscale, NPC_Boo_04, EVT_FLOAT(-0.3))
EVT_CALL(NpcJump0, NPC_Boo_04, 280, 60, -79, 8)
EVT_CALL(EnableNpcShadow, NPC_Boo_04, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Boo_04, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BraceDoor5) = {
EVT_CALL(SetNpcJumpscale, NPC_Boo_05, EVT_FLOAT(-0.4))
EVT_CALL(NpcJump0, NPC_Boo_05, 250, 81, -97, 9)
EVT_CALL(EnableNpcShadow, NPC_Boo_05, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BraceDoor6) = {
EVT_CALL(SetNpcJumpscale, NPC_Boo_06, EVT_FLOAT(-0.5))
EVT_CALL(NpcJump0, NPC_Boo_06, 227, 43, -123, 15)
EVT_CALL(EnableNpcShadow, NPC_Boo_06, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Boo_06, ANIM_Boo_Tan_Flail)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BoosBraceDoor) = {
EVT_EXEC(N(EVS_BraceDoor2))
EVT_EXEC(N(EVS_BraceDoor3))
EVT_EXEC(N(EVS_BraceDoor4))
EVT_EXEC(N(EVS_BraceDoor5))
EVT_EXEC(N(EVS_BraceDoor6))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_LeaderBooShivering) = {
EVT_CALL(GetNpcPos, NPC_Boo_01, LVar0, LVar1, LVar2)
EVT_LOOP(0)
EVT_CALL(RandInt, 5, LVarA)
EVT_ADD(LVarA, 2)
EVT_SET(LVarB, 0)
EVT_LABEL(10)
EVT_SET(LVar3, LVar0)
EVT_ADD(LVar3, 1)
EVT_CALL(SetNpcPos, NPC_Boo_01, LVar3, LVar1, LVar2)
EVT_WAIT(1)
EVT_SET(LVar3, LVar0)
EVT_ADD(LVar3, -1)
EVT_CALL(SetNpcPos, NPC_Boo_01, LVar3, LVar1, LVar2)
EVT_WAIT(1)
EVT_ADD(LVarB, 1)
EVT_IF_LT(LVarB, LVarA)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(RandInt, 10, LVarA)
EVT_ADD(LVarA, 10)
EVT_WAIT(LVarA)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_TubbaTaunting) = {
EVT_SET_GROUP(EVT_GROUP_EF)
EVT_LOOP(0)
EVT_CALL(RandInt, 50, LVar0)
EVT_ADD(LVar0, 80)
EVT_WAIT(LVar0)
EVT_IF_EQ(MV_PreventTaunting, FALSE)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(PlaySoundAt, SOUND_B4, 0, 240, 10, -125)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0))
EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00EF, 160, 40)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_BoosApproachManor) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetPlayerPos, 350, 10, -150)
EVT_CALL(InterpPlayerYaw, 270, 1)
EVT_CALL(SetNpcPos, NPC_PARTNER, 350, 10, -150)
EVT_CALL(EnablePartnerAI)
EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_SET(LVar0, 175)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, -75)
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_WAIT(40)
EVT_CALL(SetNpcPos, NPC_Boo_01, -60, 10, -70)
EVT_CALL(SetNpcPos, NPC_Boo_02, -100, 10, -110)
EVT_CALL(SetNpcPos, NPC_Boo_03, -140, 10, -150)
EVT_CALL(SetNpcPos, NPC_Boo_04, -100, 10, -30)
EVT_CALL(SetNpcPos, NPC_Boo_05, -140, 10, -70)
EVT_CALL(SetNpcPos, NPC_Boo_06, -180, 10, -100)
EVT_EXEC_WAIT(N(EVS_AdvanceBooPhalanx))
EVT_WAIT(60)
EVT_CALL(InterpNpcYaw, NPC_Boo_01, 270, 1)
EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DB)
EVT_CALL(SpeakToPlayer, NPC_Boo_05, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DC)
EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 5, MSG_CH3_00DD)
EVT_CALL(PlaySoundAt, SOUND_B4, 0, 240, 10, -125)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0))
EVT_WAIT(10)
EVT_CALL(PlaySoundAt, SOUND_B4, 0, 240, 10, -125)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0))
EVT_CALL(InterpNpcYaw, NPC_Boo_01, 90, 1)
EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00DE, 160, 40)
EVT_CALL(SetPlayerPos, 350, 10, -150)
EVT_CALL(InterpPlayerYaw, 270, 1)
EVT_CALL(SetNpcPos, NPC_PARTNER, 350, 10, -150)
EVT_SET(LVar2, 1)
EVT_EXEC_WAIT(N(EVS_OpenDoors))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_EscapeFromTubba) = {
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(8.0))
EVT_CALL(PlayerMoveTo, 184, -44, 0)
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_04, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, NPC_Boo_05, SOUND_262, 0)
EVT_CALL(PlaySoundAtNpc, NPC_Boo_06, 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_04, 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(ShowEmote, NPC_Boo_06, EMOTE_EXCLAMATION, 45, 20, TRUE, 0, 0, 0, 0)
EVT_WAIT(50)
EVT_SET(LVar2, 1)
EVT_EXEC(N(EVS_CloseDoors))
EVT_EXEC(N(EVS_BoosBraceDoor))
EVT_WAIT(20)
EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-15.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, 300)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_EXEC_GET_TID(N(EVS_LeaderBooShivering), LVarA)
EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00DF)
EVT_KILL_THREAD(LVarA)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00E0)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00E1)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PARTNER_GOOMBARIO)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH3_00E2)
EVT_CASE_EQ(PARTNER_KOOPER)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH3_00E3)
EVT_CASE_EQ(PARTNER_BOMBETTE)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH3_00E4)
EVT_CASE_EQ(PARTNER_PARAKARRY)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH3_00E5)
EVT_CASE_EQ(PARTNER_BOW)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00E6)
EVT_END_SWITCH
EVT_CALL(EnablePartnerAI)
EVT_CALL(SetCamType, CAM_DEFAULT, 4, FALSE)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.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(PlaySoundAt, SOUND_B4, 0, 240, 10, -125)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0))
EVT_WAIT(5)
EVT_CALL(PlaySoundAt, SOUND_B4, 0, 240, 10, -125)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(2.0))
EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_00E7, 160, 40)
EVT_EXEC_WAIT(N(EVS_BraceDoor1))
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 5, MSG_CH3_00E8)
EVT_CALL(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail)
EVT_EXEC(N(EVS_TubbaTaunting))
EVT_SET(GB_StoryProgress, STORY_CH3_ESCAPED_TUBBAS_MANOR)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetBoosBracingDoor) = {
EVT_CALL(SetNpcPos, NPC_Boo_01, 246, 30, -110)
EVT_CALL(SetNpcPos, NPC_Boo_02, 276, 120, -80)
EVT_CALL(SetNpcPos, NPC_Boo_03, 216, 120, -140)
EVT_CALL(SetNpcPos, NPC_Boo_04, 276, 60, -80)
EVT_CALL(SetNpcPos, NPC_Boo_05, 246, 90, -110)
EVT_CALL(SetNpcPos, NPC_Boo_06, 216, 60, -130)
EVT_CALL(InterpNpcYaw, NPC_Boo_01, 70, 1)
EVT_CALL(InterpNpcYaw, NPC_Boo_02, 99, 1)
EVT_CALL(InterpNpcYaw, NPC_Boo_03, 93, 1)
EVT_CALL(InterpNpcYaw, NPC_Boo_04, 74, 1)
EVT_CALL(InterpNpcYaw, NPC_Boo_05, 78, 1)
EVT_CALL(InterpNpcYaw, NPC_Boo_06, 81, 1)
EVT_CALL(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail)
EVT_CALL(SetNpcAnimation, NPC_Boo_02, ANIM_Boo_Tan_Flail)
EVT_CALL(SetNpcAnimation, NPC_Boo_03, ANIM_Boo_Tan_Flail)
EVT_CALL(SetNpcAnimation, NPC_Boo_04, ANIM_Boo_Tan_Flail)
EVT_CALL(SetNpcAnimation, NPC_Boo_05, ANIM_Boo_Tan_Flail)
EVT_CALL(SetNpcAnimation, NPC_Boo_06, ANIM_Boo_Tan_Flail)
EVT_CALL(EnableNpcShadow, NPC_Boo_01, FALSE)
EVT_CALL(EnableNpcShadow, NPC_Boo_02, FALSE)
EVT_CALL(EnableNpcShadow, NPC_Boo_03, FALSE)
EVT_CALL(EnableNpcShadow, NPC_Boo_04, FALSE)
EVT_CALL(EnableNpcShadow, NPC_Boo_05, FALSE)
EVT_CALL(EnableNpcShadow, NPC_Boo_06, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Boo_01) = {
EVT_SET(MV_PreventTaunting, TRUE)
EVT_CALL(SpeakToPlayer, NPC_Boo_01, ANIM_Boo_Tan_Flail, ANIM_Boo_Tan_Flail, 5, MSG_CH3_00E9)
EVT_CALL(SetNpcAnimation, NPC_Boo_01, ANIM_Boo_Tan_Flail)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PARTNER_GOOMBARIO)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0))
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 0, MSG_CH3_00EA)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0))
EVT_CASE_EQ(PARTNER_KOOPER)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0))
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 0, MSG_CH3_00EB)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0))
EVT_CASE_EQ(PARTNER_BOMBETTE)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0))
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 0, MSG_CH3_00EC)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0))
EVT_CASE_EQ(PARTNER_PARAKARRY)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0))
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 0, MSG_CH3_00ED)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0))
EVT_CASE_EQ(PARTNER_BOW)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(6.0), 0, EVT_FLOAT(-275.0), EVT_FLOAT(15.0), EVT_FLOAT(-6.0))
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 0, MSG_CH3_00EE)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0))
EVT_END_SWITCH
EVT_CALL(EnablePartnerAI)
EVT_SET(MV_PreventTaunting, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_01) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo_01)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_02) = {
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_03) = {
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_04) = {
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_05) = {
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo_06) = {
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Boo_01) = {
.id = NPC_Boo_01,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_400000,
.init = &N(EVS_NpcInit_Boo_01),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
.tattle = MSG_NpcTattle_BraveBoo,
};
StaticNpc N(NpcData_Boo_02) = {
.id = NPC_Boo_02,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Boo_02),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
};
StaticNpc N(NpcData_Boo_03) = {
.id = NPC_Boo_03,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Boo_03),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
};
StaticNpc N(NpcData_Boo_04) = {
.id = NPC_Boo_04,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Boo_04),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
};
StaticNpc N(NpcData_Boo_05) = {
.id = NPC_Boo_05,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Boo_05),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
};
StaticNpc N(NpcData_Boo_06) = {
.id = NPC_Boo_06,
.settings = &N(NpcSettings_Boo),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Boo_06),
.drops = BOO_DROPS,
.animations = GUSTY_BOO_ANIMS,
};
EvtScript N(EVS_Scene_ThrownOutBySentinel) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetNpcPos, NPC_PARTNER, 320, 10, -160)
EVT_CALL(PlaySound, SOUND_32E)
EVT_THREAD
EVT_LOOP(180)
EVT_CALL(GetNpcPos, NPC_Sentinel, LVar0, LVar1, LVar2)
EVT_CALL(N(PlaySentinelSounds))
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetPlayerPos, 320, 50, -160)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80017)
EVT_CALL(SetNpcPos, NPC_Sentinel, 320, 70, -158)
EVT_CALL(InterpNpcYaw, NPC_Sentinel, 270, 0)
EVT_CALL(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim08)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 175, 0, -35)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 175, 0, -35)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(540.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_WAIT(20)
EVT_THREAD
EVT_SET(LVar2, 1)
EVT_EXEC(N(EVS_OpenDoors))
EVT_END_THREAD
EVT_WAIT(15)
EVT_THREAD
EVT_CALL(SetPlayerJumpscale, 0)
EVT_CALL(PlayerJump1, 175, 50, -35, 40)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(DisablePartnerAI, 0)
EVT_WAIT(1)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0)
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_TALK)
EVT_WAIT(85)
EVT_CALL(func_802CF56C, 2)
EVT_WAIT(1)
EVT_CALL(EnablePartnerAI)
EVT_END_THREAD
EVT_CALL(NpcMoveTo, NPC_Sentinel, 175, -33, 40)
EVT_WAIT(20)
EVT_CALL(SetNpcPos, NPC_Sentinel, 175, 85, -33)
EVT_CALL(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim09)
EVT_WAIT(20)
EVT_CALL(PlaySoundAtNpc, NPC_Sentinel, SOUND_2F7, 0)
EVT_CALL(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim02)
EVT_CALL(SetNpcPos, NPC_Sentinel, 175, 70, -33)
EVT_THREAD
EVT_WAIT(40)
EVT_CALL(SetNpcAnimation, NPC_Sentinel, ANIM_Sentinel_Anim03)
EVT_CALL(NpcMoveTo, NPC_Sentinel, 270, -120, 30)
EVT_CALL(StopSound, SOUND_32E)
EVT_CALL(SetNpcPos, NPC_Sentinel, NPC_DISPOSE_LOCATION)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(60)
EVT_SET(LVar2, 1)
EVT_EXEC(N(EVS_CloseDoors))
EVT_END_THREAD
EVT_CALL(SetPlayerJumpscale, 0)
EVT_CALL(PlayerJump1, 175, 0, -35, 10)
EVT_CALL(PlaySoundAtNpc, NPC_Sentinel, SOUND_162, 0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80003)
EVT_THREAD
EVT_WAIT(2)
EVT_PLAY_EFFECT(EFFECT_EMOTE, 3, 0, 175, 0, -35, 20, -20, 30, 0)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(320.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-7.5))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_END_THREAD
EVT_WAIT(65)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PARTNER_GOOMBARIO)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE)
EVT_CASE_EQ(PARTNER_KOOPER)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE)
EVT_CASE_EQ(PARTNER_BOMBETTE)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE)
EVT_END_SWITCH
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(PARTNER_GOOMBARIO)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_HURT, PARTNER_ANIM_RUN, 5, MSG_CH3_00D6)
EVT_CASE_EQ(PARTNER_KOOPER)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_HURT, PARTNER_ANIM_RUN, 5, MSG_CH3_00D7)
EVT_CASE_EQ(PARTNER_BOMBETTE)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_HURT, PARTNER_ANIM_RUN, 5, MSG_CH3_00D8)
EVT_CASE_EQ(PARTNER_PARAKARRY)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_HURT, PARTNER_ANIM_RUN, 5, MSG_CH3_00D9)
EVT_CASE_EQ(PARTNER_BOW)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_HURT, PARTNER_ANIM_RUN, 5, MSG_CH3_00DA)
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_PARTNER, PARTNER_ANIM_HURT, PARTNER_ANIM_RUN, 5, MSG_CH3_00D6)
EVT_END_SWITCH
EVT_CALL(EnablePartnerAI)
EVT_WAIT(5)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_GetUp)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_DustOff)
EVT_WAIT(7)
EVT_CALL(PlaySoundAtPlayer, SOUND_DUST_OFF, 0)
EVT_WAIT(8)
EVT_CALL(PlaySoundAtPlayer, SOUND_DUST_OFF, 0)
EVT_WAIT(15)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_8001B)
EVT_WAIT(25)
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_WAIT(1)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(InterpPlayerYaw, 45, 0)
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimMidairStill)
EVT_CALL(SetPlayerJumpscale, 1)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(PlayerJump1, LVar0, 0, LVar2, 10)
EVT_CALL(PlayerJump1, LVar0, 0, LVar2, 10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
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(PanToTarget, CAM_DEFAULT, 0, 0)
EVT_CALL(EnablePartnerAI)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Sentinel) = {
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Sentinel) = {
.id = NPC_Sentinel,
.settings = &N(NpcSettings_Sentinel),
.pos = { 0.0f, 0.0f, -1000.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_400000,
.init = &N(EVS_NpcInit_Sentinel),
.drops = SENTINEL_DROPS,
.animations = SENTINEL_ANIMS,
};
NpcGroupList N(BooNPCs) = {
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)),
{}
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Sentinel)),
{}
};

View File

@ -0,0 +1,8 @@
#include "dgb_00.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), -65, 60, -240, 0, MAKE_ENTITY_END)
EVT_RETURN
EVT_END
};

View File

@ -1,7 +0,0 @@
#include "dgb_01.h"
#include "ld_addrs.h"
ApiStatus N(func_80240000_BFD880)(void) {
dma_copy(C20F40_ROM_START, C20F40_ROM_END, C20F40_VRAM);
return ApiStatus_DONE2;
}

View File

@ -1,7 +0,0 @@
#include "dgb_01.h"
#include "world/common/todo/RemovePadlock.inc.c"
#include "world/common/todo/GetEntityPosition.inc.c"

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
#include "dgb_01.h"
extern char world_area_dgb_dgb_01_img0_png[];
Gfx D_80247F70_C057F0[] = {
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPLoadTextureBlock(world_area_dgb_dgb_01_img0_png, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 64, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 5, 6, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
};

View File

@ -1,15 +0,0 @@
#include "dgb_01.h"
extern char world_area_dgb_dgb_01_img1_png[];
Gfx D_80248FF0_C06870[] = {
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPLoadTextureBlock(world_area_dgb_dgb_01_img1_png, G_IM_FMT_RGBA, G_IM_SIZ_16b, 64, 32, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 6, 5, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
};

View File

@ -1,15 +0,0 @@
#include "dgb_01.h"
extern char world_area_dgb_dgb_01_img2_png[];
Gfx D_80249870_C070F0[] = {
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPLoadTextureBlock(world_area_dgb_dgb_01_img2_png, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
};

View File

@ -1,15 +0,0 @@
#include "dgb_01.h"
extern char world_area_dgb_dgb_01_img3_png[];
Gfx D_80249CF0_C07570[] = {
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPLoadTextureBlock(world_area_dgb_dgb_01_img3_png, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 32, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 4, 5, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
};

View File

@ -1,15 +0,0 @@
#include "dgb_01.h"
extern char world_area_dgb_dgb_01_img4_png[];
Gfx D_8024A170_C079F0[] = {
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPLoadTextureBlock(world_area_dgb_dgb_01_img4_png, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 32, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 4, 5, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
};

View File

@ -1,15 +0,0 @@
#include "dgb_01.h"
extern char world_area_dgb_dgb_01_img5_png[];
Gfx D_8024A5F0_C07E70[] = {
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPLoadTextureBlock(world_area_dgb_dgb_01_img5_png, G_IM_FMT_RGBA, G_IM_SIZ_16b, 16, 32, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 4, 5, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
};

View File

@ -1,15 +0,0 @@
#include "dgb_01.h"
extern char world_area_dgb_dgb_01_img6_png[];
Gfx D_8024AE70_C086F0[] = {
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPLoadTextureBlock(world_area_dgb_dgb_01_img6_png, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_MIRROR | G_TX_WRAP, G_TX_MIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
};

View File

@ -1,15 +0,0 @@
#include "dgb_01.h"
extern char world_area_dgb_dgb_01_img7_png[];
Gfx D_8024B6F0_C08F70[] = {
gsDPSetTextureLUT(G_TT_NONE),
gsSPTexture(0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON),
gsDPSetCombineMode(G_CC_MODULATEIA, G_CC_MODULATEIA),
gsDPSetTextureDetail(G_TD_CLAMP),
gsDPSetTextureLOD(G_TL_TILE),
gsDPLoadTextureBlock(world_area_dgb_dgb_01_img7_png, G_IM_FMT_RGBA, G_IM_SIZ_16b, 32, 32, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, 5, 5, G_TX_NOLOD, G_TX_NOLOD),
gsDPSetTexturePersp(G_TP_PERSP),
gsDPSetTextureFilter(G_TF_BILERP),
gsSPEndDisplayList(),
};

View File

@ -2,52 +2,59 @@
/// @brief Tubba's Castle - Great Hall
#include "common.h"
#include "../dgb.h"
#include "message_ids.h"
#include "map.h"
#include "../dgb.h"
#include "mapfs/dgb_01_shape.h"
#include "mapfs/dgb_01_hit.h"
#include "sprite/npc/WorldTubba.h"
#include "sprite/npc/Sentinel.h"
#include "animation_script.h"
enum {
NPC_Sentinel_01 = 0,
NPC_Sentinel_02 = 1,
NPC_Sentinel_03 = 2,
NPC_Sentinel_04 = 3,
NPC_Tubba = 4,
};
enum {
MV_PadlockEntityID = MapVar(0),
};
#define NAMESPACE dgb_01
enum {
NPC_SENTINEL0,
NPC_SENTINEL1,
NPC_SENTINEL2,
NPC_SENTINEL3,
NPC_WORLD_TUBBA,
};
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_ExitDoors_dgb_08_0);
extern EvtScript N(EVS_ExitDoors_dgb_08_1);
extern EvtScript N(EVS_SetupBridges);
extern EvtScript N(EVS_UnlockPrompt_Door);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);
extern NpcGroupList N(FirstFloorEscapeNPCs);
extern NpcGroupList N(SecondFloorEscapeNPCs);
extern NpcGroupList N(ThirdFloorEscapeNPCs);
extern StaticAnimatorNode* N(SmashBridgesSkeleton)[];
extern AnimScript N(AS_SmashBridges);
ApiStatus InitAnimatedModels(Evt* script, s32 isInitialCall);
ApiStatus SetAnimatedModelRenderMode(Evt* script, s32 isInitialCall);
ApiStatus DeleteAnimatedModel(Evt* script, s32 isInitialCall);
ApiStatus N(func_80240000_BFD880)(void);
ApiStatus N(GetEntityPosition)(Evt* script, s32 isInitialCall);
ApiStatus N(RemovePadlock)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc1)(Evt* script, s32 isInitialCall);
ApiStatus N(SentinelAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(PatrolNoAttackAI_Main)(Evt* script, s32 isInitialCall);
extern EvtScript N(802449C4);
extern EvtScript N(80244AD0);
extern EvtScript N(main);
extern EvtScript N(makeEntities);
extern StaticAnimatorNode* N(D_80252F4C_C107CC)[];
extern AnimScript N(D_802539A0_C11220);
extern NpcGroupList N(npcGroupList_80246E50);
extern NpcGroupList N(npcGroupList_80246ED4);
extern NpcGroupList N(npcGroupList_80246E8C);
extern NpcGroupList N(npcGroupList_80246F1C);
extern Gfx D_80247F70_C057F0[];
extern Gfx D_80248FF0_C06870[];
extern Gfx D_80249870_C070F0[];
extern Gfx D_80249CF0_C07570[];
extern Gfx D_8024A170_C079F0[];
extern Gfx D_8024A5F0_C07E70[];
extern Gfx D_8024AE70_C086F0[];
extern Gfx D_8024B6F0_C08F70[];
extern Gfx D_8024BCF8_C09578[];
extern Gfx N(img0_gfx)[];
extern Gfx N(img1_gfx)[];
extern Gfx N(img2_gfx)[];
extern Gfx N(img3_gfx)[];
extern Gfx N(img4_gfx)[];
extern Gfx N(img5_gfx)[];
extern Gfx N(img6_gfx)[];
extern Gfx N(img7_gfx)[];
extern Gfx N(D_8024BCF8_C09578)[];
extern Mtx N(D_80253160_C109E0);
extern Mtx N(D_802531A0_C10A20);

View File

@ -0,0 +1,18 @@
#include "dgb_01.h"
EntryList N(Entrances) = {
[dgb_01_ENTRY_0] { 0.0, 0.0, 485.0, 0.0 },
[dgb_01_ENTRY_1] { -485.0, 0.0, 0.0, 90.0 },
[dgb_01_ENTRY_2] { 485.0, 0.0, 0.0, 270.0 },
[dgb_01_ENTRY_3] { -485.0, 210.0, 0.0, 90.0 },
[dgb_01_ENTRY_4] { 485.0, 210.0, 0.0, 270.0 },
[dgb_01_ENTRY_5] { -485.0, 420.0, 0.0, 90.0 },
[dgb_01_ENTRY_6] { 485.0, 420.0, 0.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_dgb_01 },
};

View File

@ -0,0 +1,15 @@
#include "dgb_01.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
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_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_CALL(ClearAmbientSounds, 250)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,197 @@
#include "dgb_01.h"
EvtScript N(EVS_ExitDoors_dgb_00_1) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_01_ENTRY_0)
EVT_SET(LVar1, COLLIDER_deilitts)
EVT_SET(LVar2, MODEL_o380)
EVT_SET(LVar3, MODEL_o381)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_00"), dgb_00_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_02_1) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_01_ENTRY_1)
EVT_SET(LVar1, COLLIDER_deilittsw)
EVT_SET(LVar2, MODEL_o163)
EVT_SET(LVar3, MODEL_o164)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_02"), dgb_02_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_08_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_01_ENTRY_2)
EVT_SET(LVar1, COLLIDER_deilittse)
EVT_SET(LVar2, MODEL_o168)
EVT_SET(LVar3, MODEL_o167)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_08"), dgb_08_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_09_1) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_01_ENTRY_3)
EVT_SET(LVar1, COLLIDER_deilittw)
EVT_SET(LVar2, MODEL_o165)
EVT_SET(LVar3, MODEL_o166)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_09"), dgb_09_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_08_1) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_01_ENTRY_4)
EVT_SET(LVar1, COLLIDER_deilitte)
EVT_SET(LVar2, MODEL_o299)
EVT_SET(LVar3, MODEL_o298)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_08"), dgb_08_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_17_1) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_01_ENTRY_5)
EVT_SET(LVar1, COLLIDER_deilittnw)
EVT_SET(LVar2, MODEL_o161)
EVT_SET(LVar3, MODEL_o162)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_17"), dgb_17_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_18_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_01_ENTRY_6)
EVT_SET(LVar1, COLLIDER_deilittne)
EVT_SET(LVar2, MODEL_o301)
EVT_SET(LVar3, MODEL_o300)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_18"), dgb_18_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_01_ENTRY_0)
EVT_IF_EQ(GF_DGB01_Visited, FALSE)
EVT_SET(GF_DGB01_Visited, TRUE)
EVT_SET(GB_StoryProgress, STORY_CH3_ARRIVED_AT_TUBBAS_MANOR)
EVT_END_IF
EVT_SET(LVar2, MODEL_o380)
EVT_SET(LVar3, MODEL_o381)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(dgb_01_ENTRY_1)
EVT_SET(LVar2, MODEL_o163)
EVT_SET(LVar3, MODEL_o164)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(dgb_01_ENTRY_2)
EVT_SET(LVar2, MODEL_o168)
EVT_SET(LVar3, MODEL_o167)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(dgb_01_ENTRY_3)
EVT_SET(LVar2, MODEL_o165)
EVT_SET(LVar3, MODEL_o166)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(dgb_01_ENTRY_4)
EVT_SET(LVar2, MODEL_o299)
EVT_SET(LVar3, MODEL_o298)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(dgb_01_ENTRY_5)
EVT_SET(LVar2, MODEL_o161)
EVT_SET(LVar3, MODEL_o162)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(dgb_01_ENTRY_6)
EVT_SET(LVar2, MODEL_o301)
EVT_SET(LVar3, MODEL_o300)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
s32 N(KeyList)[] = {
ITEM_TUBBA_CASTLE_KEY,
ITEM_NONE
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_NO_LEAD()
EVT_SET(GF_MAP_TubbasManor, TRUE)
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupBridges))
EVT_EXEC(N(EVS_SetupMusic))
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_00_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitts, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_02_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_09_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_08_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_17_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_18_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0)
EVT_IF_EQ(GF_DGB01_UnlockedEastWing, FALSE)
EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_Door)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList)), 0, 1)
EVT_ELSE
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0)
EVT_END_IF
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_01_ENTRY_2)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(FirstFloorEscapeNPCs)))
EVT_CASE_EQ(dgb_01_ENTRY_4)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(SecondFloorEscapeNPCs)))
EVT_CASE_EQ(dgb_01_ENTRY_6)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(ThirdFloorEscapeNPCs)))
EVT_END_SWITCH
EVT_END_SWITCH
EVT_EXEC(N(EVS_EnterMap))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,197 @@
#include "dgb_01.h"
#include "ld_addrs.h"
ApiStatus N(LoadSmashBridgesGraphics)(void) {
dma_copy(dgb_01_smash_bridges_ROM_START, dgb_01_smash_bridges_ROM_END, dgb_01_smash_bridges_VRAM);
return ApiStatus_DONE2;
}
EvtScript N(EVS_Scene_TubbaSmashBridges) = {
EVT_LOOP(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_LT(LVar0, 100)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(N(LoadSmashBridgesGraphics))
EVT_CALL(InitAnimatedModels)
EVT_WAIT(1)
EVT_CALL(InterruptUsePartner)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_8000A)
EVT_THREAD
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_20F6, 0)
EVT_WAIT(5)
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_20F6, 0)
EVT_WAIT(5)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_WAIT(30)
EVT_THREAD
EVT_LOOP(12)
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_20F6, 0)
EVT_WAIT(5)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 60, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 400, 420, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 400, 420, 0)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(450.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-11.0))
EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(500.0), EVT_FLOAT(0.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_SET(GB_ARN_Tubba_MapID, 1)
EVT_CALL(SetNpcVar, NPC_Tubba, 0, 1)
EVT_LOOP(0)
EVT_CALL(GetNpcVar, NPC_Tubba, 0, LVar0)
EVT_IF_EQ(LVar0, 3)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
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(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(750.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(3.0))
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 20, EVT_FLOAT(1.0))
EVT_CALL(LoadAnimatedModel, 0, EVT_PTR(N(SmashBridgesSkeleton)))
EVT_CALL(PlayModelAnimation, 0, EVT_PTR(N(AS_SmashBridges)))
EVT_CALL(SetAnimatedModelRootPosition, 0, 0, 0, 0)
EVT_CALL(SetAnimatedModelRenderMode, 0, RENDER_MODE_SURFACE_OPA)
EVT_THREAD
EVT_CALL(PlaySound, SOUND_95)
EVT_WAIT(60)
EVT_CALL(PlaySound, SOUND_96)
EVT_WAIT(25)
EVT_CALL(PlaySound, SOUND_98)
EVT_WAIT(70)
EVT_CALL(PlaySound, SOUND_97)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(100)
EVT_CALL(PlaySound, SOUND_A8)
EVT_WAIT(50)
EVT_CALL(PlaySound, SOUND_A8)
EVT_WAIT(30)
EVT_CALL(PlaySound, SOUND_A8)
EVT_WAIT(70)
EVT_CALL(PlaySound, SOUND_A8)
EVT_WAIT(30)
EVT_CALL(PlaySound, SOUND_A8)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_WAIT(1)
EVT_CALL(SetGroupEnabled, MODEL_g96, 0)
EVT_CALL(SetGroupEnabled, MODEL_g87, 0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80013)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.5))
EVT_CALL(PlayerJump1, 121, 210, 0, 60)
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_8001F)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_RunPanic)
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(8.0))
EVT_CALL(PlayerMoveTo, 412, -29, 0)
EVT_WAIT(10)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 210)
EVT_WAIT(1)
EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.5))
EVT_CALL(NpcJump1, NPC_PARTNER, 151, LVar1, 0, 60)
EVT_WAIT(30)
EVT_CALL(EnablePartnerAI)
EVT_END_THREAD
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 300, EVT_FLOAT(1.0))
EVT_CALL(StopSound, SOUND_8000005D)
EVT_THREAD
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0D)
EVT_CALL(SetNpcSpeed, NPC_Tubba, EVT_FLOAT(3.0))
EVT_CALL(NpcMoveTo, NPC_Tubba, 176, 0, 0)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_20F6, 0)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.3))
EVT_WAIT(5)
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_20F6, 0)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.15))
EVT_WAIT(8)
EVT_END_THREAD
EVT_WAIT(20)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(2.0))
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
EVT_SET(GB_StoryProgress, STORY_CH3_TUBBA_SMASHED_THE_BRIDGES)
EVT_CALL(SetGroupEnabled, MODEL_g240, 1)
EVT_CALL(DeleteAnimatedModel, 0)
EVT_THREAD
EVT_WAIT(30)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0D)
EVT_CALL(SetNpcPos, NPC_Tubba, 137, 244, 35)
EVT_CALL(SetNpcSpeed, NPC_Tubba, EVT_FLOAT(3.0))
EVT_CALL(NpcMoveTo, NPC_Tubba, 470, 0, 0)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(3.0))
EVT_END_THREAD
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_20F6, 0)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.3))
EVT_WAIT(5)
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_20F6, 0)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(0.15))
EVT_WAIT(8)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetPlayerSpeed, EVT_FLOAT(3.0))
EVT_CALL(PlayerMoveTo, 470, 0, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_EXEC(N(EVS_ExitDoors_dgb_08_1))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupBridges) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetGroupEnabled, MODEL_g240, 0)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK)
EVT_CASE_EQ(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetGroupEnabled, MODEL_g240, 0)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK)
EVT_EXEC(N(EVS_Scene_TubbaSmashBridges))
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(SetGroupEnabled, MODEL_g340, 0)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_before, COLLIDER_FLAGS_UPPER_MASK)
EVT_CASE_DEFAULT
EVT_CALL(SetGroupEnabled, MODEL_g240, 0)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_after, COLLIDER_FLAGS_UPPER_MASK)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,50 @@
#include "dgb_01.h"
#include "entity.h"
#include "world/common/todo/RemovePadlock.inc.c"
#include "world/common/todo/GetEntityPosition.inc.c"
EvtScript N(EVS_UnlockPrompt_Door) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_SUSPEND_GROUP(EVT_GROUP_01)
EVT_CALL(ShowKeyChoicePopup)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40)
EVT_CALL(CloseChoicePopup)
EVT_RESUME_GROUP(EVT_GROUP_01)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LVar0, -1)
EVT_CALL(CloseChoicePopup)
EVT_RESUME_GROUP(EVT_GROUP_01)
EVT_RETURN
EVT_END_IF
EVT_CALL(FindKeyItem, ITEM_TUBBA_CASTLE_KEY, LVar0)
EVT_CALL(RemoveKeyItemAt, LVar0)
EVT_CALL(CloseChoicePopup)
EVT_SET(GF_DGB01_UnlockedEastWing, TRUE)
EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAt, SOUND_269, 0, LVar0, LVar1, LVar2)
EVT_SET(LVar0, MV_PadlockEntityID)
EVT_CALL(N(RemovePadlock))
EVT_RESUME_GROUP(EVT_GROUP_01)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(EVS_OpenLockedDoor) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_08_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeEntities) = {
EVT_IF_EQ(GF_DGB01_UnlockedEastWing, FALSE)
EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), 490, 8, 0, -80, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenLockedDoor)))
EVT_SET(MV_PadlockEntityID, LVar0)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,458 @@
#include "dgb_01.h"
#define AI_SENTINEL_FIRST_NPC NPC_Sentinel_01
#define AI_SENTINEL_LAST_NPC NPC_Tubba
#include "world/common/enemy/complete/Sentinel.inc.c"
#include "world/common/enemy/complete/Clubba.h"
#include "world/common/enemy/complete/TubbaBlubba_Patrol.inc.c"
#include "world/common/enemy/complete/TubbaBlubba.inc.c"
#include "world/common/npc/Yakkey.inc.c"
#include "world/common/todo/UnkFunc1.inc.c"
EvtScript N(EVS_NpcIdle_Tubba_Floor3) = {
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_SET(GB_ARN_Tubba_MapID, 1)
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_CREAKY_DOOR_OPEN, 0)
EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o300, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o301, LVar0, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0A)
EVT_CALL(SetNpcPos, NPC_SELF, 520, 420, 0)
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
EVT_CALL(NpcMoveTo, NPC_SELF, 390, 0, 30)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim07)
EVT_THREAD
EVT_WAIT(20)
EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o300, LVar0, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o301, 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_deilittne, SOUND_CREAKY_DOOR_CLOSE, 0)
EVT_END_THREAD
EVT_CALL(SpeakToPlayer, NPC_Tubba, ANIM_WorldTubba_Anim10, ANIM_WorldTubba_Anim06, 0, MSG_CH3_0101)
EVT_THREAD
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim19)
EVT_WAIT(4)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1A)
EVT_WAIT(17)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1B)
EVT_WAIT(11)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1C)
EVT_WAIT(30)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim1D)
EVT_END_THREAD
EVT_WAIT(4)
EVT_CALL(SetNpcJumpscale, NPC_Tubba, EVT_FLOAT(1.0))
EVT_CALL(GetNpcPos, NPC_Tubba, LVar0, LVar1, LVar2)
EVT_CALL(NpcJump0, NPC_Tubba, LVar0, LVar1, LVar2, 30)
EVT_CALL(PlaySoundAtNpc, NPC_Tubba, SOUND_20A0, 0)
EVT_CALL(PlaySound, SOUND_8000005D)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(4.0))
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 15, EVT_FLOAT(2.0))
EVT_CALL(SetSelfVar, 0, 3)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Tubba_Floor3) = {
EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25))
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tubba_Floor3)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_Tubba_Floor2) = {
EVT_CALL(N(UnkFunc1))
EVT_CALL(GotoMap, EVT_PTR("dgb_08"), dgb_08_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Tubba_Floor2) = {
EVT_IF_NE(GB_ARN_Tubba_MapID, 1)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_4, TRUE)
EVT_RETURN
EVT_END_IF
EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_4, TRUE)
EVT_RETURN
EVT_END_IF
EVT_CALL(SetNpcPos, NPC_Tubba, 137, 244, 35)
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tubba_Floor2)))
EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25))
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0))
EVT_WAIT(5)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(1.0))
EVT_WAIT(8)
EVT_END_LOOP
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_Tubba_Floor1) = {
EVT_CALL(AwaitPlayerApproach, 0, 420, 400)
EVT_SET(GB_ARN_Tubba_MapID, 1)
EVT_SET(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittse, SOUND_CREAKY_DOOR_OPEN, 0)
EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o167, LVar0, 0, -1, 0)
EVT_CALL(RotateModel, MODEL_o168, LVar0, 0, 1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_SELF, 555, 0, 0)
EVT_CALL(SetNpcYaw, NPC_SELF, 270)
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0A)
EVT_CALL(NpcMoveTo, NPC_SELF, 426, 0, 30)
EVT_THREAD
EVT_WAIT(20)
EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o167, LVar0, 0, -1, 0)
EVT_CALL(RotateModel, MODEL_o168, 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_deilittse, SOUND_CREAKY_DOOR_CLOSE, 0)
EVT_END_THREAD
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20F6, SOUND_PARAM_QUIET)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0))
EVT_WAIT(5)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20F6, SOUND_PARAM_QUIET)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(1.0))
EVT_WAIT(8)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(SetNpcSpeed, NPC_SELF, EVT_FLOAT(5.0))
EVT_CALL(NpcMoveTo, NPC_SELF, 259, 167, 0)
EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Tubba_Patrol)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_Tubba_Floor1) = {
EVT_CALL(N(UnkFunc1))
EVT_CALL(GotoMap, EVT_PTR("dgb_00"), dgb_00_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Tubba_Floor1) = {
EVT_IF_NE(GB_ARN_Tubba_MapID, 1)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tubba_Floor1)))
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_SELF, 136, 0, -330)
EVT_END_IF
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tubba_Floor1)))
EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Sentinel_01) = {
EVT_SET(LVar0, GB_StoryProgress)
EVT_IF_GE(LVar0, -29)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40, TRUE)
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01)
EVT_CALL(SetNpcPos, NPC_SELF, -33, -3, 8)
EVT_CALL(SetNpcRotation, NPC_SELF, -50, 30, 10)
EVT_CALL(BindNpcIdle, NPC_SELF, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Sentinel_02) = {
EVT_SET(LVar0, GB_StoryProgress)
EVT_IF_GE(LVar0, -29)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40, TRUE)
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01)
EVT_CALL(SetNpcPos, NPC_SELF, -486, 182, 28)
EVT_CALL(SetNpcRotation, NPC_SELF, -10, 50, 0)
EVT_CALL(BindNpcIdle, NPC_SELF, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Sentinel_03) = {
EVT_SET(LVar0, GB_StoryProgress)
EVT_IF_GE(LVar0, -29)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40, TRUE)
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01)
EVT_CALL(SetNpcPos, NPC_SELF, -201, 0, -143)
EVT_CALL(SetNpcRotation, NPC_SELF, -50, 0, 0)
EVT_CALL(BindNpcIdle, NPC_SELF, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Sentinel_04) = {
EVT_SET(LVar0, GB_StoryProgress)
EVT_IF_GE(LVar0, -29)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40, TRUE)
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim01)
EVT_CALL(SetNpcPos, NPC_SELF, -305, -1, -80)
EVT_CALL(SetNpcRotation, NPC_SELF, -65, -30, 0)
EVT_CALL(BindNpcIdle, NPC_SELF, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Sentinel_01) = {
.id = NPC_Sentinel_01,
.settings = &N(NpcSettings_Sentinel),
.pos = { -180.0f, 100.0f, 230.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Sentinel_01),
.drops = SENTINEL_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -180, 100, 230 },
.wanderSize = { 35 },
.detectShape = SHAPE_RECT,
.detectPos = { 0, 0, 0 },
.detectSize = { 450, 1000 },
}
},
.animations = SENTINEL_ANIMS,
};
StaticNpc N(NpcData_Sentinel_02) = {
.id = NPC_Sentinel_02,
.settings = &N(NpcSettings_Sentinel),
.pos = { 180.0f, 100.0f, 230.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Sentinel_02),
.drops = SENTINEL_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 180, 100, 230 },
.wanderSize = { 35 },
.detectShape = SHAPE_RECT,
.detectPos = { 0, 0, 0 },
.detectSize = { 450, 1000 },
}
},
.animations = SENTINEL_ANIMS,
};
StaticNpc N(NpcData_Sentinel_03) = {
.id = NPC_Sentinel_03,
.settings = &N(NpcSettings_Sentinel),
.pos = { -180.0f, 100.0f, -230.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Sentinel_03),
.drops = SENTINEL_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -180, 100, -230 },
.wanderSize = { 35 },
.detectShape = SHAPE_RECT,
.detectPos = { 0, 0, 0 },
.detectSize = { 450, 1000 },
}
},
.animations = SENTINEL_ANIMS,
};
StaticNpc N(NpcData_Sentinel_04) = {
.id = NPC_Sentinel_04,
.settings = &N(NpcSettings_Sentinel),
.pos = { 180.0f, 100.0f, -230.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Sentinel_04),
.drops = SENTINEL_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 180, 100, -230 },
.wanderSize = { 35 },
.detectShape = SHAPE_RECT,
.detectPos = { 0, 0, 0 },
.detectSize = { 450, 1000 },
}
},
.animations = SENTINEL_ANIMS,
};
s32 N(ExtraAnims_Tubba)[] = {
ANIM_WorldTubba_Anim06,
ANIM_WorldTubba_Anim10,
ANIM_WorldTubba_Anim09,
ANIM_WorldTubba_Anim07,
ANIM_WorldTubba_Anim0A,
ANIM_WorldTubba_Anim0D,
ANIM_WorldTubba_Anim19,
ANIM_WorldTubba_Anim1A,
ANIM_WorldTubba_Anim1B,
ANIM_WorldTubba_Anim1C,
ANIM_WorldTubba_Anim1D,
-1
};
StaticNpc N(NpcData_Tubba_Floor3) = {
.id = NPC_Tubba,
.settings = &N(NpcSettings_TubbaBlubba),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = ENEMY_FLAGS_200000,
.init = &N(EVS_NpcInit_Tubba_Floor3),
.drops = TUBBA_DROPS,
.animations = TUBBA_ANIMS,
.extraAnimations = N(ExtraAnims_Tubba),
};
StaticNpc N(NpcData_Tubba_Floor2) = {
.id = NPC_Tubba,
.settings = &N(NpcSettings_TubbaBlubba_Patrol),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = ENEMY_FLAGS_200000,
.init = &N(EVS_NpcInit_Tubba_Floor2),
.drops = CLUBBA_DROPS,
.territory = {
.patrol = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 2,
.points = {
{ 320, 210, 0 },
{ 370, 210, 0 },
},
.detectShape = SHAPE_RECT,
.detectPos = { 350, 210, 0 },
.detectSize = { 1000, 250 },
}
},
.animations = TUBBA_ANGRY_ANIMS,
.extraAnimations = N(ExtraAnims_Tubba),
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Tubba_Floor1) = {
.id = NPC_Tubba,
.settings = &N(NpcSettings_TubbaBlubba_Patrol),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = ENEMY_FLAGS_200000,
.init = &N(EVS_NpcInit_Tubba_Floor1),
.drops = CLUBBA_DROPS,
.territory = {
.patrol = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 8,
.points = {
{ 156, 0, 187 },
{ -36, 0, 290 },
{ -159, 0, 50 },
{ -80, 0, -218 },
{ 66, 0, -362 },
{ 196, 0, -268 },
{ 280, 0, -124 },
{ 250, 0, 100 },
},
.detectShape = SHAPE_RECT,
.detectPos = { 250, 0, 100 },
.detectSize = { 1000, 250 },
}
},
.animations = TUBBA_ANGRY_ANIMS,
.extraAnimations = N(ExtraAnims_Tubba),
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Sentinel_01)),
NPC_GROUP(N(NpcData_Sentinel_02)),
NPC_GROUP(N(NpcData_Sentinel_03)),
NPC_GROUP(N(NpcData_Sentinel_04)),
{}
};
NpcGroupList N(ThirdFloorEscapeNPCs) = {
NPC_GROUP(N(NpcData_Sentinel_01)),
NPC_GROUP(N(NpcData_Sentinel_02)),
NPC_GROUP(N(NpcData_Sentinel_03)),
NPC_GROUP(N(NpcData_Sentinel_04)),
NPC_GROUP(N(NpcData_Tubba_Floor3), BTL_DGB_FORMATION_04),
{}
};
NpcGroupList N(SecondFloorEscapeNPCs) = {
NPC_GROUP(N(NpcData_Sentinel_01)),
NPC_GROUP(N(NpcData_Sentinel_02)),
NPC_GROUP(N(NpcData_Sentinel_03)),
NPC_GROUP(N(NpcData_Sentinel_04)),
NPC_GROUP(N(NpcData_Tubba_Floor2), BTL_DGB_FORMATION_04, BTL_DGB_STAGE_00),
{}
};
NpcGroupList N(FirstFloorEscapeNPCs) = {
NPC_GROUP(N(NpcData_Sentinel_01)),
NPC_GROUP(N(NpcData_Sentinel_02)),
NPC_GROUP(N(NpcData_Sentinel_03)),
NPC_GROUP(N(NpcData_Sentinel_04)),
NPC_GROUP(N(NpcData_Tubba_Floor1), BTL_DGB_FORMATION_04, BTL_DGB_STAGE_00),
{}
};

View File

@ -0,0 +1,4 @@
#include "dgb_01.h"
#include "world/area_dgb/dgb_01/img0.png.inc.c"
#include "world/area_dgb/dgb_01/img0.gfx.inc.c"

View File

@ -0,0 +1,4 @@
#include "dgb_01.h"
#include "world/area_dgb/dgb_01/img1.png.inc.c"
#include "world/area_dgb/dgb_01/img1.gfx.inc.c"

View File

@ -0,0 +1,4 @@
#include "dgb_01.h"
#include "world/area_dgb/dgb_01/img2.png.inc.c"
#include "world/area_dgb/dgb_01/img2.gfx.inc.c"

View File

@ -0,0 +1,4 @@
#include "dgb_01.h"
#include "world/area_dgb/dgb_01/img3.png.inc.c"
#include "world/area_dgb/dgb_01/img3.gfx.inc.c"

View File

@ -0,0 +1,4 @@
#include "dgb_01.h"
#include "world/area_dgb/dgb_01/img4.png.inc.c"
#include "world/area_dgb/dgb_01/img4.gfx.inc.c"

View File

@ -0,0 +1,4 @@
#include "dgb_01.h"
#include "world/area_dgb/dgb_01/img5.png.inc.c"
#include "world/area_dgb/dgb_01/img5.gfx.inc.c"

View File

@ -0,0 +1,4 @@
#include "dgb_01.h"
#include "world/area_dgb/dgb_01/img6.png.inc.c"
#include "world/area_dgb/dgb_01/img6.gfx.inc.c"

View File

@ -0,0 +1,4 @@
#include "dgb_01.h"
#include "world/area_dgb/dgb_01/img7.png.inc.c"
#include "world/area_dgb/dgb_01/img7.gfx.inc.c"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,705 @@
StaticAnimatorNode N(D_80251A80_C0F300) = {
.pos = { 225.0f, 255.0f, 0.0f },
};
StaticAnimatorNode N(D_80251AAC_C0F32C) = {
.displayList = N(D_8024C098_C09918),
.pos = { 0.0f, -500.0f, 0.0f },
};
StaticAnimatorNode N(D_80251AD8_C0F358) = {
.displayList = N(D_8024C030_C098B0),
.pos = { 0.0f, -500.0f, 0.0f },
.sibling = &N(D_80251AAC_C0F32C),
};
StaticAnimatorNode N(D_80251B04_C0F384) = {
.displayList = N(D_8024BFC8_C09848),
.pos = { 0.0f, -500.0f, 0.0f },
.sibling = &N(D_80251AD8_C0F358),
};
StaticAnimatorNode N(D_80251B30_C0F3B0) = {
.displayList = N(D_8024C2E0_C09B60),
.pos = { 0.0f, -500.0f, 0.0f },
.sibling = &N(D_80251B04_C0F384),
};
StaticAnimatorNode N(D_80251B5C_C0F3DC) = {
.displayList = N(D_8024C1F0_C09A70),
.pos = { 0.0f, -500.0f, 0.0f },
.sibling = &N(D_80251B30_C0F3B0),
};
StaticAnimatorNode N(D_80251B88_C0F408) = {
.displayList = N(D_8024C100_C09980),
.pos = { 0.0f, -500.0f, 0.0f },
.sibling = &N(D_80251B5C_C0F3DC),
};
StaticAnimatorNode N(D_80251BB4_C0F434) = {
.child = &N(D_80251B88_C0F408),
};
StaticAnimatorNode N(D_80251BE0_C0F460) = {
.displayList = N(D_8024C560_C09DE0),
.pos = { 0.0f, -500.0f, 0.0f },
};
StaticAnimatorNode N(D_80251C0C_C0F48C) = {
.displayList = N(D_8024C4C0_C09D40),
.pos = { 0.0f, -500.0f, 0.0f },
.sibling = &N(D_80251BE0_C0F460),
};
StaticAnimatorNode N(D_80251C38_C0F4B8) = {
.displayList = N(D_8024C420_C09CA0),
.pos = { 0.0f, -500.0f, 0.0f },
.sibling = &N(D_80251C0C_C0F48C),
};
StaticAnimatorNode N(D_80251C64_C0F4E4) = {
.sibling = &N(D_80251BB4_C0F434),
.child = &N(D_80251C38_C0F4B8),
};
StaticAnimatorNode N(D_80251C90_C0F510) = {
.displayList = N(D_8024B770_C08FF0),
};
StaticAnimatorNode N(D_80251CBC_C0F53C) = {
.displayList = N(D_8024B8F8_C09178),
.sibling = &N(D_80251C90_C0F510),
};
StaticAnimatorNode N(D_80251CE8_C0F568) = {
.displayList = N(D_8024BAA0_C09320),
.sibling = &N(D_80251CBC_C0F53C),
};
StaticAnimatorNode N(D_80251D14_C0F594) = {
.displayList = N(D_802515B0_C0EE30),
.sibling = &N(D_80251CE8_C0F568),
};
StaticAnimatorNode N(D_80251D40_C0F5C0) = {
.displayList = N(D_80250168_C0D9E8),
.sibling = &N(D_80251D14_C0F594),
};
StaticAnimatorNode N(D_80251D6C_C0F5EC) = {
.displayList = N(D_80250108_C0D988),
.sibling = &N(D_80251D40_C0F5C0),
};
StaticAnimatorNode N(D_80251D98_C0F618) = {
.displayList = N(D_80251798_C0F018),
.sibling = &N(D_80251D6C_C0F5EC),
};
StaticAnimatorNode N(D_80251DC4_C0F644) = {
.displayList = N(D_80250360_C0DBE0),
.sibling = &N(D_80251D98_C0F618),
};
StaticAnimatorNode N(D_80251DF0_C0F670) = {
.displayList = N(D_80251710_C0EF90),
.sibling = &N(D_80251DC4_C0F644),
};
StaticAnimatorNode N(D_80251E1C_C0F69C) = {
.displayList = N(D_802502F8_C0DB78),
.sibling = &N(D_80251DF0_C0F670),
};
StaticAnimatorNode N(D_80251E48_C0F6C8) = {
.displayList = N(D_802516A8_C0EF28),
.sibling = &N(D_80251E1C_C0F69C),
};
StaticAnimatorNode N(D_80251E74_C0F6F4) = {
.displayList = N(D_80250290_C0DB10),
.sibling = &N(D_80251E48_C0F6C8),
};
StaticAnimatorNode N(D_80251EA0_C0F720) = {
.displayList = N(D_80251638_C0EEB8),
.sibling = &N(D_80251E74_C0F6F4),
};
StaticAnimatorNode N(D_80251ECC_C0F74C) = {
.displayList = N(D_80250220_C0DAA0),
.sibling = &N(D_80251EA0_C0F720),
};
StaticAnimatorNode N(D_80251EF8_C0F778) = {
.sibling = &N(D_80251C64_C0F4E4),
.child = &N(D_80251ECC_C0F74C),
};
StaticAnimatorNode N(D_80251F24_C0F7A4) = {
.displayList = N(D_8024FAB0_C0D330),
.rot = { 0x0000, 0x1FFF, 0x8001 },
.pos = { -315.0f, 2.0f, -139.0f },
};
StaticAnimatorNode N(D_80251F50_C0F7D0) = {
.displayList = N(D_8024FA18_C0D298),
.rot = { 0x8001, 0x2AAA, 0x8001 },
.pos = { -455.0f, 421.0f, -20.0f },
.sibling = &N(D_80251F24_C0F7A4),
};
StaticAnimatorNode N(D_80251F7C_C0F7FC) = {
.displayList = N(D_8024F980_C0D200),
.rot = { 0x8001, 0xE001, 0x0000 },
.pos = { -385.0f, 2.0f, 169.0f },
.sibling = &N(D_80251F50_C0F7D0),
};
StaticAnimatorNode N(D_80251FA8_C0F828) = {
.displayList = N(D_8024F8E8_C0D168),
.rot = { 0x0000, 0x2AAA, 0x8001 },
.pos = { -105.0f, 2.0f, -210.0f },
.sibling = &N(D_80251F7C_C0F7FC),
};
StaticAnimatorNode N(D_80251FD4_C0F854) = {
.displayList = N(D_8024F850_C0D0D0),
.rot = { 0x0000, 0xEAAB, 0x8001 },
.pos = { -5.0f, 2.0f, -180.0f },
.sibling = &N(D_80251FA8_C0F828),
};
StaticAnimatorNode N(D_80252000_C0F880) = {
.displayList = N(D_8024F7B8_C0D038),
.rot = { 0x8001, 0x0AAA, 0x0000 },
.pos = { -195.0f, 2.0f, 259.0f },
.sibling = &N(D_80251FD4_C0F854),
};
StaticAnimatorNode N(D_8025202C_C0F8AC) = {
.displayList = N(D_8024F720_C0CFA0),
.rot = { 0x8001, 0xD556, 0x8001 },
.pos = { -65.0f, 2.0f, 189.0f },
.sibling = &N(D_80252000_C0F880),
};
StaticAnimatorNode N(D_80252058_C0F8D8) = {
.displayList = N(D_8024F688_C0CF08),
.rot = { 0x8001, 0x0000, 0x0000 },
.pos = { 275.0f, 2.0f, -129.0f },
.sibling = &N(D_8025202C_C0F8AC),
};
StaticAnimatorNode N(D_80252084_C0F904) = {
.displayList = N(D_8024F5F0_C0CE70),
.rot = { 0x0000, 0xF556, 0x8001 },
.pos = { 195.0f, 421.0f, -40.0f },
.sibling = &N(D_80252058_C0F8D8),
};
StaticAnimatorNode N(D_802520B0_C0F930) = {
.displayList = N(D_8024F558_C0CDD8),
.rot = { 0x8001, 0x1555, 0x8001 },
.pos = { 85.0f, 2.0f, 329.0f },
.sibling = &N(D_80252084_C0F904),
};
StaticAnimatorNode N(D_802520DC_C0F95C) = {
.displayList = N(D_8024F4C0_C0CD40),
.rot = { 0x8001, 0x1555, 0x0000 },
.pos = { 215.0f, 421.0f, 29.0f },
.sibling = &N(D_802520B0_C0F930),
};
StaticAnimatorNode N(D_80252108_C0F988) = {
.sibling = &N(D_80251EF8_C0F778),
.child = &N(D_802520DC_C0F95C),
};
StaticAnimatorNode N(D_80252134_C0F9B4) = {
.displayList = N(D_8024F328_C0CBA8),
.rot = { 0x8001, 0x0000, 0x0000 },
.pos = { 8.0f, -23.0f, -49.0f },
};
StaticAnimatorNode N(D_80252160_C0F9E0) = {
.displayList = N(D_8024F160_C0C9E0),
.rot = { 0x0000, 0xF8E4, 0x8001 },
.pos = { 73.0f, -23.0f, 20.0f },
.sibling = &N(D_80252134_C0F9B4),
};
StaticAnimatorNode N(D_8025218C_C0FA0C) = {
.displayList = N(D_8024F1F8_C0CA78),
.rot = { 0x8001, 0x0000, 0x0000 },
.pos = { -1.0f, -23.0f, 49.0f },
.sibling = &N(D_80252160_C0F9E0),
};
StaticAnimatorNode N(D_802521B8_C0FA38) = {
.displayList = N(D_8024F290_C0CB10),
.rot = { 0x8001, 0x0000, 0x8001 },
.pos = { 18.0f, -23.0f, 0.0f },
.sibling = &N(D_8025218C_C0FA0C),
};
StaticAnimatorNode N(D_802521E4_C0FA64) = {
.rot = { 0x0000, 0x1FFF, 0x0000 },
.pos = { 61.0f, 47.0f, -31.0f },
.child = &N(D_802521B8_C0FA38),
};
StaticAnimatorNode N(D_80252210_C0FA90) = {
.displayList = N(D_8024F3C0_C0CC40),
.rot = { 0x8001, 0x0AAA, 0x0000 },
.pos = { -415.0f, 21.0f, 20.0f },
.sibling = &N(D_802521E4_C0FA64),
};
StaticAnimatorNode N(D_8025223C_C0FABC) = {
.displayList = N(D_8024F0C8_C0C948),
.rot = { 0x8001, 0xF8E4, 0x8001 },
.pos = { 195.0f, 211.0f, -39.0f },
.sibling = &N(D_80252210_C0FA90),
};
StaticAnimatorNode N(D_80252268_C0FAE8) = {
.displayList = N(D_8024F030_C0C8B0),
.rot = { 0x8001, 0xF1C8, 0x8001 },
.pos = { 95.0f, 210.0f, -30.0f },
.sibling = &N(D_8025223C_C0FABC),
};
StaticAnimatorNode N(D_80252294_C0FB14) = {
.displayList = N(D_8024EF98_C0C818),
.rot = { 0x8001, 0x1555, 0x8001 },
.pos = { 115.0f, 211.0f, 39.0f },
.sibling = &N(D_80252268_C0FAE8),
};
StaticAnimatorNode N(D_802522C0_C0FB40) = {
.displayList = N(D_8024EF00_C0C780),
.rot = { 0x8001, 0x0AAA, 0x8001 },
.pos = { 215.0f, 211.0f, 39.0f },
.sibling = &N(D_80252294_C0FB14),
};
StaticAnimatorNode N(D_802522EC_C0FB6C) = {
.sibling = &N(D_80252108_C0F988),
.child = &N(D_802522C0_C0FB40),
};
StaticAnimatorNode N(D_80252318_C0FB98) = {
.displayList = N(D_8024BEF8_C09778),
.rot = { 0x0000, 0x0AAA, 0x0000 },
.pos = { -375.0f, 2.0f, 0.0f },
};
StaticAnimatorNode N(D_80252344_C0FBC4) = {
.displayList = N(D_8024BE60_C096E0),
.rot = { 0x0000, 0xEAAB, 0x8001 },
.pos = { -175.0f, 2.0f, -49.0f },
.sibling = &N(D_80252318_C0FB98),
};
StaticAnimatorNode N(D_80252370_C0FBF0) = {
.displayList = N(D_8024BDC8_C09648),
.rot = { 0x8001, 0x0000, 0x8001 },
.pos = { 75.0f, 2.0f, -49.0f },
.sibling = &N(D_80252344_C0FBC4),
};
StaticAnimatorNode N(D_8025239C_C0FC1C) = {
.sibling = &N(D_802522EC_C0FB6C),
.child = &N(D_80252370_C0FBF0),
};
StaticAnimatorNode N(D_802523C8_C0FC48) = {
.sibling = &N(D_80251A80_C0F300),
.child = &N(D_8025239C_C0FC1C),
};
StaticAnimatorNode N(D_802523F4_C0FC74) = {
.displayList = N(D_8024DEF8_dgb_01),
};
StaticAnimatorNode N(D_80252420_C0FCA0) = {
.displayList = N(D_8024E120_C0B9A0),
.sibling = &N(D_802523F4_C0FC74),
};
StaticAnimatorNode N(D_8025244C_C0FCCC) = {
.displayList = N(D_8024E0A8_C0B928),
.sibling = &N(D_80252420_C0FCA0),
};
StaticAnimatorNode N(D_80252478_C0FCF8) = {
.displayList = N(D_8024E020_C0B8A0),
.sibling = &N(D_8025244C_C0FCCC),
};
StaticAnimatorNode N(D_802524A4_C0FD24) = {
.displayList = N(D_8024DFA0_C0B820),
.sibling = &N(D_80252478_C0FCF8),
};
StaticAnimatorNode N(D_802524D0_C0FD50) = {
.displayList = N(D_8024E1A8_C0BA28),
.sibling = &N(D_802524A4_C0FD24),
};
StaticAnimatorNode N(D_802524FC_C0FD7C) = {
.displayList = N(D_8024DD60_C0B5E0),
.sibling = &N(D_802524D0_C0FD50),
};
StaticAnimatorNode N(D_80252528_C0FDA8) = {
.displayList = N(D_8024DC50_C0B4D0),
.sibling = &N(D_802524FC_C0FD7C),
};
StaticAnimatorNode N(D_80252554_C0FDD4) = {
.rot = { 0x0000, 0x0000, 0xEA9F },
.pos = { -360.0f, 85.0f, -1.0f },
.child = &N(D_80252528_C0FDA8),
};
StaticAnimatorNode N(D_80252580_C0FE00) = {
.displayList = N(D_8024ECB0_C0C530),
};
StaticAnimatorNode N(D_802525AC_C0FE2C) = {
.displayList = N(D_8024EE18_C0C698),
.sibling = &N(D_80252580_C0FE00),
};
StaticAnimatorNode N(D_802525D8_C0FE58) = {
.rot = { 0xEAAB, 0x2E87, 0xF02E },
.pos = { 35.0f, 316.0f, 36.0f },
.sibling = &N(D_80252554_C0FDD4),
.child = &N(D_802525AC_C0FE2C),
};
StaticAnimatorNode N(D_80252604_C0FE84) = {
.displayList = N(D_80250720_C0DFA0),
};
StaticAnimatorNode N(D_80252630_C0FEB0) = {
.displayList = N(D_80250910_C0E190),
.sibling = &N(D_80252604_C0FE84),
};
StaticAnimatorNode N(D_8025265C_C0FEDC) = {
.displayList = N(D_80250698_C0DF18),
.sibling = &N(D_80252630_C0FEB0),
};
StaticAnimatorNode N(D_80252688_C0FF08) = {
.displayList = N(D_80250798_C0E018),
.sibling = &N(D_8025265C_C0FEDC),
};
StaticAnimatorNode N(D_802526B4_C0FF34) = {
.displayList = N(D_80250820_C0E0A0),
.sibling = &N(D_80252688_C0FF08),
};
StaticAnimatorNode N(D_802526E0_C0FF60) = {
.displayList = N(D_80250898_C0E118),
.sibling = &N(D_802526B4_C0FF34),
};
StaticAnimatorNode N(D_8025270C_C0FF8C) = {
.rot = { 0xFC72, 0xFE27, 0x0000 },
.pos = { 133.0f, 271.0f, 30.0f },
.sibling = &N(D_802525D8_C0FE58),
.child = &N(D_802526E0_C0FF60),
};
StaticAnimatorNode N(D_80252738_C0FFB8) = {
.displayList = N(D_8024C918_C0A198),
.pos = { 252.0f, 0.0f, 0.0f },
};
StaticAnimatorNode N(D_80252764_C0FFE4) = {
.displayList = N(D_8024C998_C0A218),
.pos = { 252.0f, 0.0f, 0.0f },
.sibling = &N(D_80252738_C0FFB8),
};
StaticAnimatorNode N(D_80252790_C10010) = {
.displayList = N(D_8024C808_C0A088),
.pos = { 252.0f, 0.0f, 0.0f },
.sibling = &N(D_80252764_C0FFE4),
};
StaticAnimatorNode N(D_802527BC_C1003C) = {
.sibling = &N(D_80252790_C10010),
};
StaticAnimatorNode N(D_802527E8_C10068) = {
.rot = { 0x0000, 0x0000, 0xF60C },
.pos = { -252.0f, 0.0f, 0.0f },
.child = &N(D_802527BC_C1003C),
};
StaticAnimatorNode N(D_80252814_C10094) = {
.rot = { 0x0000, 0x0000, 0x09F4 },
.pos = { 253.0f, 285.0f, 86.0f },
.child = &N(D_802527E8_C10068),
};
StaticAnimatorNode N(D_80252840_C100C0) = {
.displayList = N(D_8024CAF0_C0A370),
.sibling = &N(D_80252814_C10094),
};
StaticAnimatorNode N(D_8025286C_C100EC) = {
.displayList = N(D_8024CC28_C0A4A8),
.pos = { 0.0f, -500.0f, 0.0f },
.sibling = &N(D_80252840_C100C0),
};
StaticAnimatorNode N(D_80252898_C10118) = {
.displayList = N(D_8024CB68_C0A3E8),
.sibling = &N(D_8025286C_C100EC),
};
StaticAnimatorNode N(D_802528C4_C10144) = {
.displayList = N(D_8024CD98_C0A618),
.sibling = &N(D_80252898_C10118),
};
StaticAnimatorNode N(D_802528F0_C10170) = {
.displayList = N(D_8024CD10_C0A590),
.sibling = &N(D_802528C4_C10144),
};
StaticAnimatorNode N(D_8025291C_C1019C) = {
.displayList = N(D_8024CCA0_C0A520),
.sibling = &N(D_802528F0_C10170),
};
StaticAnimatorNode N(D_80252948_C101C8) = {
.displayList = N(D_8024CE08_C0A688),
.sibling = &N(D_8025291C_C1019C),
};
StaticAnimatorNode N(D_80252974_C101F4) = {
.displayList = N(D_8024C670_C09EF0),
.sibling = &N(D_80252948_C101C8),
};
StaticAnimatorNode N(D_802529A0_C10220) = {
.sibling = &N(D_8025270C_C0FF8C),
.child = &N(D_80252974_C101F4),
};
StaticAnimatorNode N(D_802529CC_C1024C) = {
.displayList = N(D_8024D2B8_C0AB38),
};
StaticAnimatorNode N(D_802529F8_C10278) = {
.displayList = N(D_8024D448_C0ACC8),
.sibling = &N(D_802529CC_C1024C),
};
StaticAnimatorNode N(D_80252A24_C102A4) = {
.displayList = N(D_8024D3C8_C0AC48),
.sibling = &N(D_802529F8_C10278),
};
StaticAnimatorNode N(D_80252A50_C102D0) = {
.pos = { 105.0f, -8.0f, 87.0f },
.child = &N(D_80252A24_C102A4),
};
StaticAnimatorNode N(D_80252A7C_C102FC) = {
.displayList = N(D_8024D580_C0AE00),
.sibling = &N(D_80252A50_C102D0),
};
StaticAnimatorNode N(D_80252AA8_C10328) = {
.displayList = N(D_8024D680_C0AF00),
.sibling = &N(D_80252A7C_C102FC),
};
StaticAnimatorNode N(D_80252AD4_C10354) = {
.displayList = N(D_8024D828_C0B0A8),
.sibling = &N(D_80252AA8_C10328),
};
StaticAnimatorNode N(D_80252B00_C10380) = {
.displayList = N(D_8024D788_C0B008),
.sibling = &N(D_80252AD4_C10354),
};
StaticAnimatorNode N(D_80252B2C_C103AC) = {
.displayList = N(D_8024D700_C0AF80),
.sibling = &N(D_80252B00_C10380),
};
StaticAnimatorNode N(D_80252B58_C103D8) = {
.displayList = N(D_8024D8D0_C0B150),
.sibling = &N(D_80252B2C_C103AC),
};
StaticAnimatorNode N(D_80252B84_C10404) = {
.displayList = N(D_8024D060_C0A8E0),
.sibling = &N(D_80252B58_C103D8),
};
StaticAnimatorNode N(D_80252BB0_C10430) = {
.rot = { 0x0000, 0x1FFF, 0x0000 },
.pos = { 61.0f, 47.0f, -31.0f },
.sibling = &N(D_802529A0_C10220),
.child = &N(D_80252B84_C10404),
};
StaticAnimatorNode N(D_80252BDC_C1045C) = {
.displayList = N(D_8024E6D8_C0BF58),
.rot = { 0x038E, 0x0000, 0x18E3 },
.pos = { -465.0f, 210.0f, -90.0f },
};
StaticAnimatorNode N(D_80252C08_C10488) = {
.displayList = N(D_8024E5B0_C0BE30),
.rot = { 0x0000, 0x18E3, 0x1555 },
.pos = { -465.0f, 210.0f, 90.0f },
.sibling = &N(D_80252BDC_C1045C),
};
StaticAnimatorNode N(D_80252C34_C104B4) = {
.displayList = N(D_8024E800_C0C080),
.sibling = &N(D_80252C08_C10488),
};
StaticAnimatorNode N(D_80252C60_C104E0) = {
.displayList = N(D_8024EA60_C0C2E0),
.sibling = &N(D_80252C34_C104B4),
};
StaticAnimatorNode N(D_80252C8C_C1050C) = {
.displayList = N(D_8024E9D8_C0C258),
.sibling = &N(D_80252C60_C104E0),
};
StaticAnimatorNode N(D_80252CB8_C10538) = {
.displayList = N(D_8024E968_C0C1E8),
.sibling = &N(D_80252C8C_C1050C),
};
StaticAnimatorNode N(D_80252CE4_C10564) = {
.displayList = N(D_8024E8C0_C0C140),
.pos = { 0.0f, -500.0f, 0.0f },
.sibling = &N(D_80252CB8_C10538),
};
StaticAnimatorNode N(D_80252D10_C10590) = {
.displayList = N(D_8024EAD0_C0C350),
.sibling = &N(D_80252CE4_C10564),
};
StaticAnimatorNode N(D_80252D3C_C105BC) = {
.displayList = N(D_8024E4D8_C0BD58),
.sibling = &N(D_80252D10_C10590),
};
StaticAnimatorNode N(D_80252D68_C105E8) = {
.pos = { 0.0f, -188.0f, 0.0f },
.sibling = &N(D_80252BB0_C10430),
.child = &N(D_80252D3C_C105BC),
};
StaticAnimatorNode N(D_80252D94_C10614) = {
.displayList = N(D_802510C8_C0E948),
.pos = { -179.0f, 34.0f, 98.0f },
};
StaticAnimatorNode N(D_80252DC0_C10640) = {
.displayList = N(D_80250E88_C0E708),
.pos = { -179.0f, 34.0f, 98.0f },
.sibling = &N(D_80252D94_C10614),
};
StaticAnimatorNode N(D_80252DEC_C1066C) = {
.displayList = N(D_80251050_C0E8D0),
.pos = { -179.0f, 34.0f, 98.0f },
.sibling = &N(D_80252DC0_C10640),
};
StaticAnimatorNode N(D_80252E18_C10698) = {
.displayList = N(D_80250FC8_C0E848),
.pos = { -179.0f, 34.0f, 98.0f },
.sibling = &N(D_80252DEC_C1066C),
};
StaticAnimatorNode N(D_80252E44_C106C4) = {
.displayList = N(D_80250F40_C0E7C0),
.pos = { -179.0f, 34.0f, 98.0f },
.sibling = &N(D_80252E18_C10698),
};
StaticAnimatorNode N(D_80252E70_C106F0) = {
.displayList = N(D_80250DE0_C0E660),
.pos = { -179.0f, 34.0f, 98.0f },
.sibling = &N(D_80252E44_C106C4),
};
StaticAnimatorNode N(D_80252E9C_C1071C) = {
.rot = { 0xFB06, 0xC60C, 0 },
.pos = { 179.0f, -34.0f, -98.0f },
.child = &N(D_80252E70_C106F0),
};
StaticAnimatorNode N(D_80252EC8_C10748) = {
.rot = { 0, 0xFA06, 0xC464 },
.pos = { -245.0f, 196.0f, 21.0f },
.sibling = &N(D_80252D68_C105E8),
.child = &N(D_80252E9C_C1071C),
};
StaticAnimatorNode N(D_80252EF4_C10774) = {
.sibling = &N(D_802523C8_C0FC48),
.child = &N(D_80252EC8_C10748),
};
StaticAnimatorNode N(D_80252F20_C107A0) = {
.child = &N(D_80252EF4_C10774),
};
StaticAnimatorNode* N(SmashBridgesSkeleton)[] = {
&N(D_80252F20_C107A0), &N(D_80252EF4_C10774), &N(D_80252EC8_C10748), &N(D_80252E9C_C1071C),
&N(D_80252E70_C106F0), &N(D_80252E44_C106C4), &N(D_80252E18_C10698), &N(D_80252DEC_C1066C),
&N(D_80252DC0_C10640), &N(D_80252D94_C10614), &N(D_80252D68_C105E8), &N(D_80252D3C_C105BC),
&N(D_80252D10_C10590), &N(D_80252CE4_C10564), &N(D_80252CB8_C10538), &N(D_80252C8C_C1050C),
&N(D_80252C60_C104E0), &N(D_80252C34_C104B4), &N(D_80252C08_C10488), &N(D_80252BDC_C1045C),
&N(D_80252BB0_C10430), &N(D_80252B84_C10404), &N(D_80252B58_C103D8), &N(D_80252B2C_C103AC),
&N(D_80252B00_C10380), &N(D_80252AD4_C10354), &N(D_80252AA8_C10328), &N(D_80252A7C_C102FC),
&N(D_80252A50_C102D0), &N(D_80252A24_C102A4), &N(D_802529F8_C10278), &N(D_802529CC_C1024C),
&N(D_802529A0_C10220), &N(D_80252974_C101F4), &N(D_80252948_C101C8), &N(D_8025291C_C1019C),
&N(D_802528F0_C10170), &N(D_802528C4_C10144), &N(D_80252898_C10118), &N(D_8025286C_C100EC),
&N(D_80252840_C100C0), &N(D_80252814_C10094), &N(D_802527E8_C10068), &N(D_802527BC_C1003C),
&N(D_80252790_C10010), &N(D_80252764_C0FFE4), &N(D_80252738_C0FFB8), &N(D_8025270C_C0FF8C),
&N(D_802526E0_C0FF60), &N(D_802526B4_C0FF34), &N(D_80252688_C0FF08), &N(D_8025265C_C0FEDC),
&N(D_80252630_C0FEB0), &N(D_80252604_C0FE84), &N(D_802525D8_C0FE58), &N(D_802525AC_C0FE2C),
&N(D_80252580_C0FE00), &N(D_80252554_C0FDD4), &N(D_80252528_C0FDA8), &N(D_802524FC_C0FD7C),
&N(D_802524D0_C0FD50), &N(D_802524A4_C0FD24), &N(D_80252478_C0FCF8), &N(D_8025244C_C0FCCC),
&N(D_80252420_C0FCA0), &N(D_802523F4_C0FC74), &N(D_802523C8_C0FC48), &N(D_8025239C_C0FC1C),
&N(D_80252370_C0FBF0), &N(D_80252344_C0FBC4), &N(D_80252318_C0FB98), &N(D_802522EC_C0FB6C),
&N(D_802522C0_C0FB40), &N(D_80252294_C0FB14), &N(D_80252268_C0FAE8), &N(D_8025223C_C0FABC),
&N(D_80252210_C0FA90), &N(D_802521E4_C0FA64), &N(D_802521B8_C0FA38), &N(D_8025218C_C0FA0C),
&N(D_80252160_C0F9E0), &N(D_80252134_C0F9B4), &N(D_80252108_C0F988), &N(D_802520DC_C0F95C),
&N(D_802520B0_C0F930), &N(D_80252084_C0F904), &N(D_80252058_C0F8D8), &N(D_8025202C_C0F8AC),
&N(D_80252000_C0F880), &N(D_80251FD4_C0F854), &N(D_80251FA8_C0F828), &N(D_80251F7C_C0F7FC),
&N(D_80251F50_C0F7D0), &N(D_80251F24_C0F7A4), &N(D_80251EF8_C0F778), &N(D_80251ECC_C0F74C),
&N(D_80251EA0_C0F720), &N(D_80251E74_C0F6F4), &N(D_80251E48_C0F6C8), &N(D_80251E1C_C0F69C),
&N(D_80251DF0_C0F670), &N(D_80251DC4_C0F644), &N(D_80251D98_C0F618), &N(D_80251D6C_C0F5EC),
&N(D_80251D40_C0F5C0), &N(D_80251D14_C0F594), &N(D_80251CE8_C0F568), &N(D_80251CBC_C0F53C),
&N(D_80251C90_C0F510), &N(D_80251C64_C0F4E4), &N(D_80251C38_C0F4B8), &N(D_80251C0C_C0F48C),
&N(D_80251BE0_C0F460), &N(D_80251BB4_C0F434), &N(D_80251B88_C0F408), &N(D_80251B5C_C0F3DC),
&N(D_80251B30_C0F3B0), &N(D_80251B04_C0F384), &N(D_80251AD8_C0F358), &N(D_80251AAC_C0F32C),
&N(D_80251A80_C0F300), 0x00000000, 0x00000000, 0x00000000, 0x00000000,
};

View File

@ -1,434 +0,0 @@
#include "dgb_02.h"
#include "sprite/npc/WorldClubba.h"
#include "message_ids.h"
enum {
NPC_WORLD_CLUBBA0 = 10,
NPC_WORLD_CLUBBA1,
NPC_WORLD_CLUBBA2 = 30,
NPC_WORLD_CLUBBA3,
};
EntryList N(entryList) = {
{ -567.0f, 0.0f, 180.0f, 90.0f },
{ 567.0f, 0.0f, 180.0f, 270.0f },
{ -450.0f, 0.0f, 88.0f, 180.0f },
{ 450.0f, 0.0f, 88.0f, 180.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { 0x1900C2 },
};
EvtScript N(802414B0) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
static s32 N(pad_1548)[] = {
0x00000000, 0x00000000,
};
EvtScript N(exitDoubleDoor_80241550) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 5)
EVT_SET(LVar2, 11)
EVT_SET(LVar3, 13)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_03"), 1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitDoubleDoor_80241604) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 17)
EVT_SET(LVar2, 18)
EVT_SET(LVar3, 16)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_01"), 1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitSingleDoor_802416B8) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar0, 2)
EVT_SET(LVar1, 9)
EVT_SET(LVar2, 21)
EVT_SET(LVar3, 1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_07"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitSingleDoor_8024176C) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar0, 3)
EVT_SET(LVar1, 13)
EVT_SET(LVar2, 23)
EVT_SET(LVar3, 1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_11"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(enterSingleDoor_80241820) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar2, 11)
EVT_SET(LVar3, 13)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(1)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar2, 18)
EVT_SET(LVar3, 16)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(2)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar2, 21)
EVT_SET(LVar3, 1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_CASE_EQ(3)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar2, 23)
EVT_SET(LVar3, 1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 15)
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_IF_LT(GB_StoryProgress, -15)
EVT_CALL(MakeNpcs, 1, EVT_PTR(N(npcGroupList_802425C8)))
EVT_END_IF
EVT_BIND_TRIGGER(N(exitDoubleDoor_80241550), TRIGGER_WALL_PRESS_A, 5, 1, 0)
EVT_BIND_TRIGGER(N(exitDoubleDoor_80241604), TRIGGER_WALL_PRESS_A, 17, 1, 0)
EVT_BIND_TRIGGER(N(exitSingleDoor_802416B8), TRIGGER_WALL_PRESS_A, 9, 1, 0)
EVT_BIND_TRIGGER(N(exitSingleDoor_8024176C), TRIGGER_WALL_PRESS_A, 13, 1, 0)
EVT_EXEC(N(802414B0))
EVT_EXEC(N(enterSingleDoor_80241820))
EVT_RETURN
EVT_END
};
static s32 N(pad_1AA8)[] = {
0x00000000, 0x00000000,
};
EvtScript N(80241AB0) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(OUTCOME_PLAYER_WON)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_EQ(OUTCOME_PLAYER_FLED)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_CALL(OnPlayerFled, 1)
EVT_CASE_EQ(OUTCOME_ENEMY_FLED)
EVT_CALL(SetEnemyFlagBits, -1, ENEMY_FLAGS_FLED, 1)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
s32 N(extraAnimationList_80241B6C)[] = {
ANIM_WorldClubba_Anim00,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_LIST_END,
};
s32 N(extraAnimationList_80241B94)[] = {
ANIM_WorldClubba_Anim00,
ANIM_LIST_END,
};
MobileAISettings N(npcAISettings_80241B9C) = {
.moveSpeed = 1.5f,
.moveTime = 120,
.waitTime = 30,
.alertRadius = 85.0f,
.alertOffsetDist = 65.0f,
.playerSearchInterval = 5,
.chaseSpeed = 3.5f,
.chaseTurnRate= 90,
.chaseUpdateInterval = 12,
.chaseRadius = 110.0f,
.chaseOffsetDist = 90.0f,
.unk_AI_2C = 3,
};
EvtScript N(npcAI_80241BCC) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 1, 5)
EVT_CALL(SetSelfVar, 2, 8)
EVT_CALL(SetSelfVar, 3, 12)
EVT_CALL(N(WanderMeleeAI_Main), EVT_PTR(N(npcAISettings_80241B9C)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80241C3C) = {
.height = 36,
.radius = 34,
.ai = &N(npcAI_80241BCC),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 13,
};
MobileAISettings N(npcAISettings_80241C68) = {
.moveSpeed = 1.0f,
.moveTime = 120,
.waitTime = 30,
.alertRadius = 100.0f,
.alertOffsetDist = 40.0f,
.playerSearchInterval = 10,
.chaseSpeed = 3.5f,
.chaseTurnRate= 90,
.chaseUpdateInterval = 15,
.chaseRadius = 200.0f,
.chaseOffsetDist = 160.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_80241C98) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 1, 10)
EVT_CALL(SetSelfVar, 2, 14)
EVT_CALL(SetSelfVar, 3, 18)
EVT_CALL(N(ClubbaNappingAI_Main), EVT_PTR(N(npcAISettings_80241C68)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80241D08) = {
.height = 36,
.radius = 34,
.ai = &N(npcAI_80241C98),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 13,
};
EvtScript N(npcAI_80241D34) = {
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetSelfVar, 0, 4)
EVT_CALL(SetSelfVar, 1, 32)
EVT_CALL(SetSelfVar, 2, 50)
EVT_CALL(SetSelfVar, 3, 32)
EVT_CALL(SetSelfVar, 4, 3)
EVT_CALL(SetSelfVar, 15, 8389)
EVT_CALL(N(MeleeHitbox_Main))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80241DDC) = {
.height = 14,
.radius = 18,
.ai = &N(npcAI_80241D34),
.onDefeat = &N(80241AB0),
.level = 13,
.actionFlags = 8,
};
StaticNpc N(npcGroup_80241E08)[] = {
{
.id = NPC_WORLD_CLUBBA0,
.settings = &N(npcSettings_80241C3C),
.pos = { -200.0f, 0.0f, 180.0f },
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 5,
.itemDrops = {
{ ITEM_SUPER_SHROOM, 10, 0 },
},
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 2,
.maxCoinBonus = 3,
},
.territory = { .temp = { -200, 0, 180, 40, 0, -32767, 0, -200, 0, 175, 250, 90, 1, 1 }},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
.extraAnimations = N(extraAnimationList_80241B6C),
},
{
.id = NPC_WORLD_CLUBBA1,
.settings = &N(npcSettings_80241DDC),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_800000,
.yaw = 0,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.extraAnimations = N(extraAnimationList_80241B94),
},
};
StaticNpc N(npcGroup_802421E8)[] = {
{
.id = NPC_WORLD_CLUBBA2,
.settings = &N(npcSettings_80241D08),
.pos = { 375.0f, 0.0f, 100.0f },
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 5,
.itemDrops = {
{ ITEM_SUPER_SHROOM, 10, 0 },
},
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 2,
.maxCoinBonus = 3,
},
.territory = { .temp = { 375, 0, 100, 40, 0, -32767, 0, 320, 0, 175, 250, 90, 0, 1 }},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
{
.id = NPC_WORLD_CLUBBA3,
.settings = &N(npcSettings_80241DDC),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_800000,
.yaw = 0,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.extraAnimations = N(extraAnimationList_80241B94),
},
};
NpcGroupList N(npcGroupList_802425C8) = {
NPC_GROUP(N(npcGroup_80241E08), 0x0F02, 0x00),
NPC_GROUP(N(npcGroup_802421E8), 0x0F01, 0x00),
{},
};
#include "world/common/enemy/ai/WanderMeleeAI.inc.c"
#include "world/common/enemy/ai/ClubbaNappingAI.inc.c"

View File

@ -2,15 +2,22 @@
/// @brief Tubba's Castle - West Hall (1F)
#include "common.h"
#include "../dgb.h"
#include "message_ids.h"
#include "map.h"
#include "../dgb.h"
#include "mapfs/dgb_02_shape.h"
#include "mapfs/dgb_02_hit.h"
enum {
NPC_Clubba_01 = 10,
NPC_Clubba_01_Hitbox = 11,
NPC_Clubba_02 = 30,
NPC_Clubba_02_Hitbox = 31,
};
#define NAMESPACE dgb_02
ApiStatus N(WanderMeleeAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(ClubbaNappingAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(MeleeHitbox_Main)(Evt *script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_802425C8);
extern EvtScript N(main);
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,15 @@
#include "dgb_02.h"
EntryList N(Entrances) = {
[dgb_02_ENTRY_0] { -567.0, 0.0, 180.0, 90.0 },
[dgb_02_ENTRY_1] { 567.0, 0.0, 180.0, 270.0 },
[dgb_02_ENTRY_2] { -450.0, 0.0, 88.0, 180.0 },
[dgb_02_ENTRY_3] { 450.0, 0.0, 88.0, 180.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_dgb_02 },
};

View File

@ -0,0 +1,14 @@
#include "dgb_02.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
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_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,110 @@
#include "dgb_02.h"
EvtScript N(EVS_ExitDoors_dgb_03_1) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_02_ENTRY_0)
EVT_SET(LVar1, COLLIDER_deilittw)
EVT_SET(LVar2, MODEL_o30)
EVT_SET(LVar3, MODEL_o31)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_03"), dgb_03_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_01_1) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_02_ENTRY_1)
EVT_SET(LVar1, COLLIDER_deilitte)
EVT_SET(LVar2, MODEL_o102)
EVT_SET(LVar3, MODEL_o101)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoor_dgb_07_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar0, dgb_02_ENTRY_2)
EVT_SET(LVar1, COLLIDER_deilittnw)
EVT_SET(LVar2, MODEL_o76)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_07"), dgb_07_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoor_dgb_11_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar0, dgb_02_ENTRY_3)
EVT_SET(LVar1, COLLIDER_deilittne)
EVT_SET(LVar2, MODEL_o123)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_11"), dgb_11_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_02_ENTRY_0)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar2, MODEL_o30)
EVT_SET(LVar3, MODEL_o31)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(dgb_02_ENTRY_1)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar2, MODEL_o102)
EVT_SET(LVar3, MODEL_o101)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(dgb_02_ENTRY_2)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar2, MODEL_o76)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_CASE_EQ(dgb_02_ENTRY_3)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar2, MODEL_o123)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
EVT_END_IF
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_03_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_07_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_11_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0)
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,64 @@
#include "dgb_02.h"
#define INCLUDE_CLUBBA_WANDER
#define INCLUDE_CLUBBA_NAPPING
#include "world/common/enemy/complete/Clubba_Multi.inc.c"
StaticNpc N(NpcData_Clubba_01)[] = {
{
.id = NPC_Clubba_01,
.settings = &N(NpcSettings_Clubba_Wander),
.pos = { -200.0f, 0.0f, 180.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -200, 0, 180 },
.wanderSize = { 40 },
.detectShape = SHAPE_RECT,
.detectPos = { -200, 0, 175 },
.detectSize = { 250, 90 },
}
},
.animations = CLUBBA_ANIMS,
.extraAnimations = N(ExtraAnims_Clubba),
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_01_Hitbox),
};
StaticNpc N(NpcData_Clubba_02)[] = {
{
.id = NPC_Clubba_02,
.settings = &N(NpcSettings_Clubba_Napping),
.pos = { 375.0f, 0.0f, 100.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 375, 0, 100 },
.wanderSize = { 40 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 320, 0, 175 },
.detectSize = { 250, 90 },
}
},
.animations = CLUBBA_ANIMS,
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_02_Hitbox),
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Clubba_01), BTL_DGB_FORMATION_02, BTL_DGB_STAGE_00),
NPC_GROUP(N(NpcData_Clubba_02), BTL_DGB_FORMATION_01, BTL_DGB_STAGE_00),
{}
};

View File

@ -1,9 +0,0 @@
#include "dgb_03.h"
#include "world/common/todo/UnkFunc11.inc.c"
#include "world/common/todo/UnkFunc12.inc.c"
#include "world/common/todo/RemovePadlock.inc.c"
#include "world/common/todo/GetEntityPosition.inc.c"

View File

@ -1,785 +0,0 @@
#include "dgb_03.h"
#include "sprite/npc/WorldClubba.h"
#include "message_ids.h"
#include "entity.h"
enum {
NPC_WORLD_CLUBBA0,
NPC_WORLD_CLUBBA1,
NPC_WORLD_CLUBBA2,
NPC_WORLD_CLUBBA3,
NPC_WORLD_CLUBBA4,
NPC_WORLD_CLUBBA5,
};
EntryList N(entryList) = {
{ -343.0f, 0.0f, 80.0f, 90.0f },
{ 343.0f, 0.0f, 80.0f, 270.0f },
{ -220.0f, 0.0f, -170.0f, 180.0f },
{ -343.0f, 210.0f, 80.0f, 90.0f },
{ 343.0f, 210.0f, 80.0f, 270.0f },
{ -220.0f, 210.0f, -170.0f, 180.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { MSG_MapTattle_dgb_03 },
};
EvtScript N(80242870) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
static s32 N(pad_2908)[] = {
0x00000000, 0x00000000,
};
EvtScript N(exitDoubleDoor_80242910) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 25)
EVT_SET(LVar2, 36)
EVT_SET(LVar3, 34)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_02"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitDoubleDoor_802429C4) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar0, 4)
EVT_SET(LVar1, 21)
EVT_SET(LVar2, 46)
EVT_SET(LVar3, 44)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_09"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitDoubleDoor_80242A78) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 13)
EVT_SET(LVar2, 29)
EVT_SET(LVar3, 31)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_04"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitWalk_80242B2C) = EVT_EXIT_WALK(26, 2, "dgb_13", 0);
EvtScript N(exitSingleDoor_80242B88) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar0, 2)
EVT_SET(LVar1, 33)
EVT_SET(LVar2, 49)
EVT_SET(LVar3, 1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_05"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitDoubleDoor_80242C3C) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar0, 3)
EVT_SET(LVar1, 17)
EVT_SET(LVar2, 39)
EVT_SET(LVar3, 41)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_14"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(80242CF0) = {
EVT_BIND_TRIGGER(N(exitWalk_80242B2C), TRIGGER_FLOOR_ABOVE, 35, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(enterDoubleDoor_80242D1C) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar2, 29)
EVT_SET(LVar3, 31)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(80242CF0))
EVT_CASE_EQ(1)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar2, 36)
EVT_SET(LVar3, 34)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(80242CF0))
EVT_CASE_EQ(2)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar2, 49)
EVT_SET(LVar3, 1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(80242CF0))
EVT_CASE_EQ(3)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar2, 39)
EVT_SET(LVar3, 41)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(80242CF0))
EVT_CASE_EQ(4)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar2, 46)
EVT_SET(LVar3, 44)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(80242CF0))
EVT_CASE_EQ(5)
EVT_SET(LVar0, EVT_PTR(N(80242CF0)))
EVT_EXEC(EnterWalkShort)
EVT_WAIT(1)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
s32 N(itemList_80242F28)[] = {
ITEM_TUBBA_CASTLE_KEY,
ITEM_NONE,
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 15)
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_IF_LT(GB_StoryProgress, -15)
EVT_CALL(MakeNpcs, 1, EVT_PTR(N(npcGroupList_80244988)))
EVT_END_IF
EVT_EXEC_WAIT(N(makeEntities))
EVT_EXEC(N(80243608))
EVT_BIND_TRIGGER(N(exitDoubleDoor_80242910), TRIGGER_WALL_PRESS_A, 25, 1, 0)
EVT_BIND_TRIGGER(N(exitDoubleDoor_802429C4), TRIGGER_WALL_PRESS_A, 21, 1, 0)
EVT_BIND_TRIGGER(N(exitDoubleDoor_80242A78), TRIGGER_WALL_PRESS_A, 13, 1, 0)
EVT_BIND_TRIGGER(N(exitSingleDoor_80242B88), TRIGGER_WALL_PRESS_A, 33, 1, 0)
EVT_IF_EQ(GF_DGB03_UnlockedThirdFloor, 0)
EVT_BIND_PADLOCK(N(80243740), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(itemList_80242F28)), 0, 1)
EVT_ELSE
EVT_BIND_TRIGGER(N(exitDoubleDoor_80242C3C), TRIGGER_WALL_PRESS_A, 17, 1, 0)
EVT_END_IF
EVT_EXEC(N(80242870))
EVT_EXEC(N(enterDoubleDoor_80242D1C))
EVT_RETURN
EVT_END
};
static s32 N(pad_30D8)[] = {
0x00000000, 0x00000000,
};
EvtScript N(802430E0) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_LOOP(20)
EVT_CALL(GetPartnerInUse, LVarA)
EVT_IF_NE(LVarA, 0)
EVT_SET(LVar8, -1)
EVT_RETURN
EVT_END_IF
EVT_CALL(N(UnkFunc11), LVar9)
EVT_IF_EQ(LVar0, 0)
EVT_SET(LVar8, -1)
EVT_RETURN
EVT_ELSE
EVT_CALL(SetPlayerActionState, 20)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetPartnerInUse, LVarA)
EVT_IF_NE(LVarA, 0)
EVT_SET(LVar8, -1)
EVT_RETURN
EVT_END_IF
EVT_CALL(DisablePlayerInput, TRUE)
EVT_THREAD
EVT_CALL(ShakeCam, 0, 0, 100, EVT_FLOAT(0.6))
EVT_END_THREAD
EVT_THREAD
EVT_IF_GE(LVar6, LVar7)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_ELSE
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_END_IF
EVT_CALL(SetPlayerActionState, 20)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_SET(LVar1, LVar0)
EVT_SET(LVar2, LVar7)
EVT_SUB(LVar2, LVar6)
EVT_ADD(LVar1, LVar2)
EVT_CALL(MakeLerp, LVar0, LVar1, 100, 0)
EVT_LOOP(0)
EVT_CALL(SetPlayerActionState, 20)
EVT_CALL(UpdateLerp)
EVT_CALL(N(UnkFunc12))
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetPlayerActionState, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_END_THREAD
EVT_CALL(MakeLerp, LVar6, LVar7, 100, 0)
EVT_CALL(PlaySoundAtCollider, 27, 0x80000010, 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, 51, LVar0, 0, 0)
EVT_CALL(UpdateColliderTransform, 27)
EVT_CALL(UpdateColliderTransform, 28)
EVT_CALL(UpdateColliderTransform, 29)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(StopSound, 0x80000010)
EVT_RETURN
EVT_END
};
EvtScript N(80243470) = {
EVT_IF_NE(GF_DGB03_PushedClock, 0)
EVT_GOTO(90)
EVT_END_IF
EVT_SET(LVar6, 0)
EVT_SET(LVar7, 48)
EVT_SET(LVar8, 0)
EVT_SET(LVar9, 27)
EVT_EXEC_WAIT(N(802430E0))
EVT_LABEL(90)
EVT_IF_NE(LVar8, -1)
EVT_SET(GF_DGB03_PushedClockLeft, 0)
EVT_SET(GF_DGB03_PushedClock, 1)
EVT_UNBIND
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(8024353C) = {
EVT_IF_NE(GF_DGB03_PushedClock, 0)
EVT_GOTO(90)
EVT_END_IF
EVT_SET(LVar6, 0)
EVT_SET(LVar7, -48)
EVT_SET(LVar8, 0)
EVT_SET(LVar9, 28)
EVT_EXEC_WAIT(N(802430E0))
EVT_LABEL(90)
EVT_IF_NE(LVar8, -1)
EVT_SET(GF_DGB03_PushedClockLeft, 1)
EVT_SET(GF_DGB03_PushedClock, 1)
EVT_UNBIND
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(80243608) = {
EVT_CALL(ParentColliderToModel, 27, 51)
EVT_CALL(ParentColliderToModel, 28, 51)
EVT_CALL(ParentColliderToModel, 29, 51)
EVT_IF_EQ(GF_DGB03_PushedClock, 0)
EVT_BIND_TRIGGER(N(80243470), TRIGGER_WALL_PUSH, 27, 1, 0)
EVT_BIND_TRIGGER(N(8024353C), TRIGGER_WALL_PUSH, 28, 1, 0)
EVT_ELSE
EVT_IF_EQ(GF_DGB03_PushedClockLeft, 0)
EVT_SET(LVar0, 48)
EVT_ELSE
EVT_SET(LVar0, -48)
EVT_END_IF
EVT_CALL(TranslateModel, 51, LVar0, 0, 0)
EVT_CALL(UpdateColliderTransform, 27)
EVT_CALL(UpdateColliderTransform, 28)
EVT_CALL(UpdateColliderTransform, 29)
EVT_END_IF
EVT_RETURN
EVT_END
};
static s32 N(pad_3738)[] = {
0x00000000, 0x00000000,
};
EvtScript N(80243740) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_SUSPEND_GROUP(EVT_GROUP_01)
EVT_CALL(ShowKeyChoicePopup)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40)
EVT_CALL(CloseChoicePopup)
EVT_RESUME_GROUP(EVT_GROUP_01)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LVar0, -1)
EVT_CALL(CloseChoicePopup)
EVT_RESUME_GROUP(EVT_GROUP_01)
EVT_RETURN
EVT_END_IF
EVT_CALL(FindKeyItem, ITEM_TUBBA_CASTLE_KEY, LVar0)
EVT_CALL(RemoveKeyItemAt, LVar0)
EVT_CALL(CloseChoicePopup)
EVT_SET(GF_DGB03_UnlockedThirdFloor, 1)
EVT_CALL(N(GetEntityPosition), MapVar(0), LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAt, 0x269, 0, LVar0, LVar1, LVar2)
EVT_SET(LVar0, MapVar(0))
EVT_CALL(N(RemovePadlock))
EVT_RESUME_GROUP(EVT_GROUP_01)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(802438A8) = {
EVT_BIND_TRIGGER(N(exitDoubleDoor_80242C3C), TRIGGER_WALL_PRESS_A, 17, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(makeEntities) = {
EVT_IF_EQ(GF_DGB03_UnlockedThirdFloor, 0)
EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -355, 218, 75, 80, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(802438A8)))
EVT_SET(MapVar(0), LVar0)
EVT_END_IF
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 0, 75, 100, 17, GF_DGB03_Item_StarPiece)
EVT_RETURN
EVT_END
};
static s32 N(pad_3964)[] = {
0x00000000, 0x00000000, 0x00000000,
};
EvtScript N(80243970) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_EQ(2)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_CALL(OnPlayerFled, 1)
EVT_CASE_EQ(3)
EVT_CALL(SetEnemyFlagBits, -1, ENEMY_FLAGS_FLED, 1)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
s32 N(unk_missing_80243A2C)[] = {
0x00390000, 0x00390002, 0x00390003, 0x00390004, 0x0039000C, 0x00390007, 0x00390008, 0x00390011,
0x00390012, 0xFFFFFFFF,
};
s32 N(extraAnimationList_80243A54)[] = {
ANIM_WorldClubba_Anim00,
ANIM_LIST_END,
};
MobileAISettings N(npcAISettings_80243A5C) = {
.moveSpeed = 1.5f,
.moveTime = 120,
.waitTime = 30,
.alertRadius = 85.0f,
.alertOffsetDist = 65.0f,
.playerSearchInterval = 5,
.chaseSpeed = 3.5f,
.chaseTurnRate= 90,
.chaseUpdateInterval = 12,
.chaseRadius = 110.0f,
.chaseOffsetDist = 90.0f,
.unk_AI_2C = 3,
};
EvtScript N(npcAI_80243A8C) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 1, 5)
EVT_CALL(SetSelfVar, 2, 8)
EVT_CALL(SetSelfVar, 3, 12)
EVT_CALL(N(WanderMeleeAI_Main), EVT_PTR(N(npcAISettings_80243A5C)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80243AFC) = {
.height = 36,
.radius = 34,
.ai = &N(npcAI_80243A8C),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 13,
};
MobileAISettings N(npcAISettings_80243B28) = {
.moveSpeed = 1.5f,
.moveTime = 20,
.waitTime = 30,
.alertRadius = 85.0f,
.alertOffsetDist = 65.0f,
.playerSearchInterval = 5,
.chaseSpeed = 3.5f,
.chaseTurnRate= 90,
.chaseUpdateInterval = 12,
.chaseRadius = 110.0f,
.chaseOffsetDist = 90.0f,
.unk_AI_2C = 3,
};
EvtScript N(npcAI_80243B58) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 1, 5)
EVT_CALL(SetSelfVar, 2, 8)
EVT_CALL(SetSelfVar, 3, 12)
EVT_CALL(N(ClubbaPatrolAI_Main), EVT_PTR(N(npcAISettings_80243B28)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80243BC8) = {
.height = 36,
.radius = 34,
.ai = &N(npcAI_80243B58),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 13,
};
MobileAISettings N(npcAISettings_80243BF4) = {
.moveSpeed = 1.0f,
.moveTime = 120,
.waitTime = 30,
.alertRadius = 100.0f,
.alertOffsetDist = 40.0f,
.playerSearchInterval = 10,
.chaseSpeed = 3.5f,
.chaseTurnRate= 90,
.chaseUpdateInterval = 15,
.chaseRadius = 200.0f,
.chaseOffsetDist = 160.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_80243C24) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 1, 10)
EVT_CALL(SetSelfVar, 2, 14)
EVT_CALL(SetSelfVar, 3, 18)
EVT_CALL(N(ClubbaNappingAI_Main), EVT_PTR(N(npcAISettings_80243BF4)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80243C94) = {
.height = 36,
.radius = 34,
.ai = &N(npcAI_80243C24),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 13,
};
EvtScript N(npcAI_80243CC0) = {
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetSelfVar, 0, 4)
EVT_CALL(SetSelfVar, 1, 32)
EVT_CALL(SetSelfVar, 2, 50)
EVT_CALL(SetSelfVar, 3, 32)
EVT_CALL(SetSelfVar, 4, 3)
EVT_CALL(SetSelfVar, 15, 8389)
EVT_CALL(N(MeleeHitbox_Main))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80243D68) = {
.height = 14,
.radius = 18,
.ai = &N(npcAI_80243CC0),
.onDefeat = &N(80243970),
.level = 13,
.actionFlags = 8,
};
EvtScript N(init_80243D94) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, 3)
EVT_CALL(SetNpcPos, NPC_SELF, -330, 210, -20)
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(npcGroup_80243DE8)[] = {
{
.id = NPC_WORLD_CLUBBA0,
.settings = &N(npcSettings_80243AFC),
.pos = { 180.0f, 0.0f, -122.0f },
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 5,
.itemDrops = {
{ ITEM_SUPER_SHROOM, 10, 0 },
},
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 2,
.maxCoinBonus = 3,
},
.territory = { .temp = { 180, 0, -122, 40, 0, -32767, 0, 0, 0, 75, 355, 255, 1, 1 }},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
{
.id = NPC_WORLD_CLUBBA1,
.settings = &N(npcSettings_80243D68),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_800000,
.yaw = 0,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.extraAnimations = N(extraAnimationList_80243A54),
},
};
StaticNpc N(npcGroup_802441C8)[] = {
{
.id = NPC_WORLD_CLUBBA2,
.settings = &N(npcSettings_80243BC8),
.pos = { -272.0f, 0.0f, -135.0f },
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 5,
.itemDrops = {
{ ITEM_SUPER_SHROOM, 10, 0 },
},
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 2,
.maxCoinBonus = 3,
},
.territory = { .temp = { 2, -272, 0, -135, -171, 0, -135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32767, 0, 0, 75, 355, 255, 1, 1 }},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
{
.id = NPC_WORLD_CLUBBA3,
.settings = &N(npcSettings_80243D68),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_800000,
.yaw = 0,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.extraAnimations = N(extraAnimationList_80243A54),
},
};
StaticNpc N(npcGroup_802445A8)[] = {
{
.id = NPC_WORLD_CLUBBA4,
.settings = &N(npcSettings_80243C94),
.pos = { -326.0f, 210.0f, 80.0f },
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(init_80243D94),
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 5,
.itemDrops = {
{ ITEM_SUPER_SHROOM, 10, 0 },
},
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 2,
.maxCoinBonus = 3,
},
.territory = { .temp = { -326, 210, 80, 0, 0, -32767, 0, 0, 0, 75, 355, 255, 1, 1 }},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
},
{
.id = NPC_WORLD_CLUBBA5,
.settings = &N(npcSettings_80243D68),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_800000,
.yaw = 0,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.extraAnimations = N(extraAnimationList_80243A54),
},
};
NpcGroupList N(npcGroupList_80244988) = {
NPC_GROUP(N(npcGroup_80243DE8), 0x0F01, 0x01),
NPC_GROUP(N(npcGroup_802441C8), 0x0F01, 0x01),
NPC_GROUP(N(npcGroup_802445A8), 0x0F03, 0x00),
{},
};
#include "world/common/enemy/ai/WanderMeleeAI.inc.c"
#include "world/common/enemy/ai/PatrolNoAttackAI.inc.c"
#include "world/common/enemy/ai/ClubbaPatrolAI.inc.c"
#include "world/common/enemy/ai/ClubbaNappingAI.inc.c"

View File

@ -2,23 +2,32 @@
/// @brief Tubba's Castle - Table/Clock Room (1/2F)
#include "common.h"
#include "../dgb.h"
#include "message_ids.h"
#include "map.h"
#include "../dgb.h"
#include "mapfs/dgb_03_shape.h"
#include "mapfs/dgb_03_hit.h"
enum {
NPC_Clubba_Wander = 0,
NPC_Clubba_Wander_Hitbox = 1,
NPC_Clubba_Patrol = 2,
NPC_Clubba_Patrol_Hitbox = 3,
NPC_Clubba_Napping = 4,
NPC_Clubba_Napping_Hitbox = 5,
};
enum {
MV_PadlockEntityID = MapVar(0),
};
#define NAMESPACE dgb_03
ApiStatus N(UnkFunc11)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkFunc12)(Evt* script, s32 isInitialCall);
ApiStatus N(MeleeHitbox_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(WanderMeleeAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(ClubbaPatrolAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(ClubbaNappingAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(RemovePadlock)(Evt* script, s32 isInitialCall);
ApiStatus N(GetEntityPosition)(Evt* script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_80244988);
extern EvtScript N(80243608);
extern EvtScript N(80243740);
extern EvtScript N(main);
extern EvtScript N(makeEntities);
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern EvtScript N(EVS_ExitDoors_dgb_14_0);
extern EvtScript N(EVS_UnlockPrompt_UpperDoor);
extern EvtScript N(EVS_SetupClock);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,17 @@
#include "dgb_03.h"
EntryList N(Entrances) = {
[dgb_03_ENTRY_0] { -343.0, 0.0, 80.0, 90.0 },
[dgb_03_ENTRY_1] { 343.0, 0.0, 80.0, 270.0 },
[dgb_03_ENTRY_2] { -220.0, 0.0, -170.0, 180.0 },
[dgb_03_ENTRY_3] { -343.0, 210.0, 80.0, 90.0 },
[dgb_03_ENTRY_4] { 343.0, 210.0, 80.0, 270.0 },
[dgb_03_ENTRY_5] { -220.0, 210.0, -170.0, 180.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_dgb_03 },
};

View File

@ -0,0 +1,14 @@
#include "dgb_03.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
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_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,160 @@
#include "dgb_03.h"
EvtScript N(EVS_ExitDoors_dgb_02_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_03_ENTRY_1)
EVT_SET(LVar1, COLLIDER_deilittse)
EVT_SET(LVar2, MODEL_o102)
EVT_SET(LVar3, MODEL_o101)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_02"), dgb_02_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_09_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_03_ENTRY_4)
EVT_SET(LVar1, COLLIDER_deilittne)
EVT_SET(LVar2, MODEL_o106)
EVT_SET(LVar3, MODEL_o105)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_09"), dgb_09_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_04_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_03_ENTRY_0)
EVT_SET(LVar1, COLLIDER_deilittsw)
EVT_SET(LVar2, MODEL_o30)
EVT_SET(LVar3, MODEL_o31)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_04"), dgb_04_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitWalk_dgb_13_0) = EVT_EXIT_WALK(26, dgb_03_ENTRY_2, "dgb_13", dgb_13_ENTRY_0);
EvtScript N(EVS_ExitDoors_dgb_05_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar0, dgb_03_ENTRY_2)
EVT_SET(LVar1, COLLIDER_deilitts)
EVT_SET(LVar2, MODEL_o76)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_05"), dgb_05_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_14_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_03_ENTRY_3)
EVT_SET(LVar1, COLLIDER_deilittnw)
EVT_SET(LVar2, MODEL_o103)
EVT_SET(LVar3, MODEL_o104)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_14"), dgb_14_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_dgb_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_03_ENTRY_0)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar2, MODEL_o30)
EVT_SET(LVar3, MODEL_o31)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(dgb_03_ENTRY_1)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar2, MODEL_o102)
EVT_SET(LVar3, MODEL_o101)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(dgb_03_ENTRY_2)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar2, MODEL_o76)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(dgb_03_ENTRY_3)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar2, MODEL_o103)
EVT_SET(LVar3, MODEL_o104)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(dgb_03_ENTRY_4)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar2, MODEL_o106)
EVT_SET(LVar3, MODEL_o105)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(dgb_03_ENTRY_5)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalkShort)
EVT_WAIT(1)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
s32 N(KeyList_UpperDoor)[] = {
ITEM_TUBBA_CASTLE_KEY,
ITEM_NONE
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupClock))
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_02_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_09_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_04_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittsw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_05_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitts, 1, 0)
EVT_IF_EQ(GF_DGB03_UnlockedThirdFloor, FALSE)
EVT_BIND_PADLOCK(EVT_PTR(N(EVS_UnlockPrompt_UpperDoor)), TRIGGER_WALL_PRESS_A, EVT_ENTITY_INDEX(0), EVT_PTR(N(KeyList_UpperDoor)), 0, 1)
EVT_ELSE
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0)
EVT_END_IF
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,133 @@
#include "dgb_03.h"
#include "world/common/todo/UnkFunc11.inc.c"
#include "world/common/todo/UnkFunc12.inc.c"
EvtScript N(EVS_PushClock_Impl) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_LOOP(20)
EVT_CALL(GetPartnerInUse, LVarA)
EVT_IF_NE(LVarA, PARTNER_NONE)
EVT_SET(LVar8, -1)
EVT_RETURN
EVT_END_IF
EVT_CALL(N(UnkFunc11), LVar9)
EVT_IF_EQ(LVar0, 0)
EVT_SET(LVar8, -1)
EVT_RETURN
EVT_ELSE
EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(GetPartnerInUse, LVarA)
EVT_IF_NE(LVarA, PARTNER_NONE)
EVT_SET(LVar8, -1)
EVT_RETURN
EVT_END_IF
EVT_CALL(DisablePlayerInput, TRUE)
EVT_THREAD
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 100, EVT_FLOAT(0.6))
EVT_END_THREAD
EVT_THREAD
EVT_IF_GE(LVar6, LVar7)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_ELSE
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_END_IF
EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_SET(LVar1, LVar0)
EVT_SET(LVar2, LVar7)
EVT_SUB(LVar2, LVar6)
EVT_ADD(LVar1, LVar2)
EVT_CALL(MakeLerp, LVar0, LVar1, 100, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(SetPlayerActionState, ACTION_STATE_PUSHING_BLOCK)
EVT_CALL(UpdateLerp)
EVT_CALL(N(UnkFunc12))
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_END_THREAD
EVT_CALL(MakeLerp, LVar6, LVar7, 100, EASING_LINEAR)
EVT_CALL(PlaySoundAtCollider, COLLIDER_o77, SOUND_80000010, 0)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_o77, LVar0, 0, 0)
EVT_CALL(UpdateColliderTransform, COLLIDER_o77)
EVT_CALL(UpdateColliderTransform, COLLIDER_o112)
EVT_CALL(UpdateColliderTransform, COLLIDER_o113)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(StopSound, SOUND_80000010)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PushClockRight) = {
EVT_IF_NE(GF_DGB03_PushedClock, FALSE)
EVT_GOTO(90)
EVT_END_IF
EVT_SET(LVar6, 0)
EVT_SET(LVar7, 48)
EVT_SET(LVar8, 0)
EVT_SET(LVar9, 27)
EVT_EXEC_WAIT(N(EVS_PushClock_Impl))
EVT_LABEL(90)
EVT_IF_NE(LVar8, -1)
EVT_SET(GF_DGB03_PushedClockLeft, FALSE)
EVT_SET(GF_DGB03_PushedClock, TRUE)
EVT_UNBIND
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PushClockLeft) = {
EVT_IF_NE(GF_DGB03_PushedClock, FALSE)
EVT_GOTO(90)
EVT_END_IF
EVT_SET(LVar6, 0)
EVT_SET(LVar7, -48)
EVT_SET(LVar8, 0)
EVT_SET(LVar9, 28)
EVT_EXEC_WAIT(N(EVS_PushClock_Impl))
EVT_LABEL(90)
EVT_IF_NE(LVar8, -1)
EVT_SET(GF_DGB03_PushedClockLeft, TRUE)
EVT_SET(GF_DGB03_PushedClock, TRUE)
EVT_UNBIND
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupClock) = {
EVT_CALL(ParentColliderToModel, COLLIDER_o77, MODEL_o77)
EVT_CALL(ParentColliderToModel, COLLIDER_o112, MODEL_o77)
EVT_CALL(ParentColliderToModel, COLLIDER_o113, MODEL_o77)
EVT_IF_EQ(GF_DGB03_PushedClock, FALSE)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushClockRight)), TRIGGER_WALL_PUSH, COLLIDER_o77, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_PushClockLeft)), TRIGGER_WALL_PUSH, COLLIDER_o112, 1, 0)
EVT_ELSE
EVT_IF_EQ(GF_DGB03_PushedClockLeft, FALSE)
EVT_SET(LVar0, 48)
EVT_ELSE
EVT_SET(LVar0, -48)
EVT_END_IF
EVT_CALL(TranslateModel, MODEL_o77, LVar0, 0, 0)
EVT_CALL(UpdateColliderTransform, COLLIDER_o77)
EVT_CALL(UpdateColliderTransform, COLLIDER_o112)
EVT_CALL(UpdateColliderTransform, COLLIDER_o113)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,51 @@
#include "dgb_03.h"
#include "entity.h"
#include "world/common/todo/RemovePadlock.inc.c"
#include "world/common/todo/GetEntityPosition.inc.c"
EvtScript N(EVS_UnlockPrompt_UpperDoor) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_SUSPEND_GROUP(EVT_GROUP_01)
EVT_CALL(ShowKeyChoicePopup)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_00D8, 160, 40)
EVT_CALL(CloseChoicePopup)
EVT_RESUME_GROUP(EVT_GROUP_01)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(LVar0, -1)
EVT_CALL(CloseChoicePopup)
EVT_RESUME_GROUP(EVT_GROUP_01)
EVT_RETURN
EVT_END_IF
EVT_CALL(FindKeyItem, ITEM_TUBBA_CASTLE_KEY, LVar0)
EVT_CALL(RemoveKeyItemAt, LVar0)
EVT_CALL(CloseChoicePopup)
EVT_SET(GF_DGB03_UnlockedThirdFloor, TRUE)
EVT_CALL(N(GetEntityPosition), MV_PadlockEntityID, LVar0, LVar1, LVar2)
EVT_CALL(PlaySoundAt, SOUND_269, 0, LVar0, LVar1, LVar2)
EVT_SET(LVar0, MV_PadlockEntityID)
EVT_CALL(N(RemovePadlock))
EVT_RESUME_GROUP(EVT_GROUP_01)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(EVS_OpenLockedDoor) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_14_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeEntities) = {
EVT_IF_EQ(GF_DGB03_UnlockedThirdFloor, FALSE)
EVT_CALL(MakeEntity, EVT_PTR(Entity_Padlock), -355, 218, 75, 80, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(EVS_OpenLockedDoor)))
EVT_SET(MV_PadlockEntityID, LVar0)
EVT_END_IF
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 0, 75, 100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB03_Item_StarPiece)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,103 @@
#include "dgb_03.h"
#define INCLUDE_CLUBBA_WANDER
#define INCLUDE_CLUBBA_PATROL
#define INCLUDE_CLUBBA_NAPPING
#include "world/common/enemy/complete/Clubba_Multi.inc.c"
EvtScript N(EVS_NpcInit_Clubba_Napping) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, dgb_03_ENTRY_3)
EVT_CALL(SetNpcPos, NPC_SELF, -330, 210, -20)
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Clubba_Wander)[] = {
{
.id = NPC_Clubba_Wander,
.settings = &N(NpcSettings_Clubba_Wander),
.pos = { 180.0f, 0.0f, -122.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 180, 0, -122 },
.wanderSize = { 40 },
.detectShape = SHAPE_RECT,
.detectPos = { 0, 0, 75 },
.detectSize = { 355, 255 },
}
},
.animations = CLUBBA_ANIMS,
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_Wander_Hitbox),
};
StaticNpc N(NpcData_Clubba_Patrol)[] = {
{
.id = NPC_Clubba_Patrol,
.settings = &N(NpcSettings_Clubba_Patrol),
.pos = { -272.0f, 0.0f, -135.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = CLUBBA_DROPS,
.territory = {
.patrol = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 2,
.points = {
{ -272, 0, -135 },
{ -171, 0, -135 },
},
.detectShape = SHAPE_RECT,
.detectPos = { 0, 0, 75 },
.detectSize = { 355, 255 },
}
},
.animations = CLUBBA_ANIMS,
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_Patrol_Hitbox),
};
StaticNpc N(NpcData_Clubba_Napping)[] = {
{
.id = NPC_Clubba_Napping,
.settings = &N(NpcSettings_Clubba_Napping),
.pos = { -326.0f, 210.0f, 80.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Clubba_Napping),
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -326, 210, 80 },
.wanderSize = { 0 },
.detectShape = SHAPE_RECT,
.detectPos = { 0, 0, 75 },
.detectSize = { 355, 255 },
}
},
.animations = CLUBBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_Napping_Hitbox),
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Clubba_Wander), BTL_DGB_FORMATION_01, BTL_DGB_STAGE_01),
NPC_GROUP(N(NpcData_Clubba_Patrol), BTL_DGB_FORMATION_01, BTL_DGB_STAGE_01),
NPC_GROUP(N(NpcData_Clubba_Napping), BTL_DGB_FORMATION_03, BTL_DGB_STAGE_00),
{}
};

View File

@ -1,291 +0,0 @@
#include "dgb_04.h"
#include "sprite.h"
#include "world/partners.h"
#include "sprite/npc/Sentinel.h"
#include "message_ids.h"
#include "entity.h"
enum {
NPC_SENTINEL,
};
EntryList N(entryList) = {
{ 575.0f, 0.0f, 180.0f, 270.0f },
{ 575.0f, -420.0f, 180.0f, 270.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { MSG_MapTattle_dgb_04 },
};
EvtScript N(80243170) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
static s32 N(pad_3208)[] = {
0x00000000, 0x00000000,
};
EvtScript N(exitSingleDoor_80243210) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 16)
EVT_SET(LVar2, 16)
EVT_SET(LVar3, 1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_06"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitDoubleDoor_802432C4) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 20)
EVT_SET(LVar2, 13)
EVT_SET(LVar3, 11)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_03"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(enterSingleDoor_80243378) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar2, 13)
EVT_SET(LVar3, 11)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(1)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar2, 16)
EVT_SET(LVar3, 1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 15)
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_IF_LT(GB_StoryProgress, -15)
EVT_CALL(MakeNpcs, 1, EVT_PTR(N(npcGroupList_80243D18)))
EVT_END_IF
EVT_EXEC_WAIT(N(makeEntities))
EVT_BIND_TRIGGER(N(exitSingleDoor_80243210), TRIGGER_WALL_PRESS_A, 16, 1, 0)
EVT_BIND_TRIGGER(N(exitDoubleDoor_802432C4), TRIGGER_WALL_PRESS_A, 20, 1, 0)
EVT_EXEC(N(80243170))
EVT_EXEC(N(enterSingleDoor_80243378))
EVT_RETURN
EVT_END
};
static s32 N(pad_3558)[] = {
0x00000000, 0x00000000,
};
f32 N(FlyingAI_JumpVels)[] = {
4.5f, 3.5f, 2.6f, 2.0f,
1.5f, 20.0f,
};
EvtScript N(80243578) = {
EVT_CALL(SetSelfEnemyFlagBits, ((ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_8000000 | ENEMY_FLAGS_10000000 | ENEMY_FLAGS_20000000)), TRUE)
EVT_CALL(SetNpcFlagBits, NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING)), TRUE)
EVT_RETURN
EVT_END
};
MobileAISettings N(npcAISettings_802435B4) = {
.moveSpeed = 1.5f,
.moveTime = 90,
.waitTime = 30,
.alertRadius = 240.0f,
.playerSearchInterval = 1,
.chaseSpeed = 5.3f,
.chaseTurnRate= 180,
.chaseUpdateInterval = 1,
.chaseRadius = 240.0f,
.unk_AI_2C = 1,
};
extern const char N(dgb_00_name_hack)[];
EvtScript N(npcAI_802435E4) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 5, -650)
EVT_CALL(SetSelfVar, 6, 30)
EVT_CALL(SetSelfVar, 1, 600)
EVT_CALL(N(SentinelAI_Main), EVT_PTR(N(npcAISettings_802435B4)))
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(2)
EVT_LABEL(20)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar4, LVar2)
EVT_CALL(GetPlayerActionState, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_WAIT(1)
EVT_GOTO(20)
EVT_END_IF
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(InterruptUsePartner)
EVT_CALL(DisablePartnerAI, 0)
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, 1)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 20)
EVT_ADD(LVar2, 2)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(func_80045838, -1, 759, 0)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim08)
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80017)
EVT_WAIT(10)
EVT_CALL(func_80045838, -1, 1838, 0)
EVT_THREAD
EVT_LOOP(100)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 1)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 1)
EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_CALL(SetNpcAnimation, NPC_PARTNER, 0x108)
EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10)
EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10)
EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10)
EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10)
EVT_END_THREAD
EVT_WAIT(30)
EVT_CALL(GotoMap, EVT_PTR(N(dgb_00_name_hack)), 2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(80243A0C) = {
EVT_CALL(GetOwnerEncounterTrigger, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(1)
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(4)
EVT_CASE_OR_EQ(6)
EVT_CALL(GetSelfAnimationFromTable, 7, LVar0)
EVT_EXEC_WAIT(EVS_NpcHitRecoil)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(80243A98) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(DoNpcDefeat)
EVT_CASE_EQ(1)
EVT_CASE_EQ(2)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80243AFC) = {
.height = 38,
.radius = 32,
.otherAI = &N(80243578),
.ai = &N(npcAI_802435E4),
.level = 99,
};
StaticNpc N(npcGroup_80243B28) = {
.id = NPC_SENTINEL,
.settings = &N(npcSettings_80243AFC),
.pos = { 70.0f, -220.0f, 186.0f },
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.territory = { .temp = { 70, -220, 186, 15, 40, -32767, 1, 80, -220, 170, 80, 150, 1 }},
.animations = {
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim02,
ANIM_Sentinel_Anim03,
ANIM_Sentinel_Anim03,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim05,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim08,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
},
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(npcGroupList_80243D18) = {
NPC_GROUP(N(npcGroup_80243B28)),
{},
};
#define SUPER_BLOCK_MAPVAR MapVar(0)
#define SUPER_BLOCK_GAMEFLAG GF_DGB04_SuperBlock
#include "world/common/entity/SuperBlock.data.inc.c"
EvtScript N(makeEntities) = {
EVT_MAKE_SUPER_BLOCK(500, -360, 110, 0)
EVT_RETURN
EVT_END
};
#define AI_SENTINEL_FIRST_NPC 0
#define AI_SENTINEL_LAST_NPC 0
#include "world/common/enemy/ai/SentinelAI.inc.c"
#include "world/common/entity/SuperBlock.inc.c"
const char N(dgb_00_name_hack)[] = "dgb_00";

View File

@ -2,14 +2,24 @@
/// @brief Tubba's Castle - Stairs to Basement
#include "common.h"
#include "../dgb.h"
#include "message_ids.h"
#include "map.h"
#include "../dgb.h"
#include "mapfs/dgb_04_shape.h"
#include "mapfs/dgb_04_hit.h"
enum {
NPC_Sentinel = 0,
};
enum {
MV_SuperBlock = MapVar(0),
};
#define NAMESPACE dgb_04
ApiStatus N(SentinelAI_Main)(Evt* script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_80243D18);
extern EvtScript N(main);
extern EvtScript N(makeEntities);
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,13 @@
#include "dgb_04.h"
EntryList N(Entrances) = {
[dgb_04_ENTRY_0] { 575.0, 0.0, 180.0, 270.0 },
[dgb_04_ENTRY_1] { 575.0, -420.0, 180.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_dgb_04 },
};

View File

@ -0,0 +1,14 @@
#include "dgb_04.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
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_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,67 @@
#include "dgb_04.h"
EvtScript N(EVS_ExitDoor_dgb_06_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar0, dgb_04_ENTRY_0)
EVT_SET(LVar1, COLLIDER_deilittse)
EVT_SET(LVar2, MODEL_o206)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_06"), dgb_06_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_03_0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_04_ENTRY_1)
EVT_SET(LVar1, COLLIDER_deilittne)
EVT_SET(LVar2, MODEL_o102)
EVT_SET(LVar3, MODEL_o101)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_03"), dgb_03_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_04_ENTRY_0)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar2, MODEL_o102)
EVT_SET(LVar3, MODEL_o101)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(dgb_04_ENTRY_1)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar2, MODEL_o206)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_06_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_03_0)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0)
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,33 @@
#include "dgb_04.h"
#define AI_SENTINEL_FIRST_NPC NPC_Sentinel
#define AI_SENTINEL_LAST_NPC NPC_Sentinel
#include "world/common/enemy/complete/Sentinel.inc.c"
StaticNpc N(NpcData_Sentinel) = {
.id = NPC_Sentinel,
.settings = &N(NpcSettings_Sentinel),
.pos = { 70.0f, -220.0f, 186.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = SENTINEL_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_RECT,
.centerPos = { 70, -220, 186 },
.wanderSize = { 15, 40 },
.detectShape = SHAPE_RECT,
.detectPos = { 80, -220, 170 },
.detectSize = { 80, 150 },
}
},
.animations = SENTINEL_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Sentinel)),
{}
};

View File

@ -0,0 +1,13 @@
#include "dgb_04.h"
#include "entity.h"
#define SUPER_BLOCK_MAPVAR MV_SuperBlock
#define SUPER_BLOCK_GAMEFLAG GF_DGB04_SuperBlock
#include "world/common/entity/SuperBlock.inc.c"
#include "world/common/entity/SuperBlock.data.inc.c"
EvtScript N(EVS_MakeEntities) = {
EVT_MAKE_SUPER_BLOCK(500, -360, 110, 0)
EVT_RETURN
EVT_END
};

View File

@ -1,369 +0,0 @@
#include "dgb_05.h"
#include "sprite/npc/WorldClubba.h"
#include "message_ids.h"
#include "entity.h"
enum {
NPC_WORLD_CLUBBA0,
NPC_WORLD_CLUBBA1,
NPC_WORLD_CLUBBA2 = 3,
NPC_WORLD_CLUBBA3,
};
EntryList N(entryList) = {
{ 515.0f, 0.0f, 310.0f, 0.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { MSG_MapTattle_dgb_05 },
};
EvtScript N(802414E0) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
static s32 N(pad_1578)[] = {
0x00000000, 0x00000000,
};
EvtScript N(exitSingleDoor_80241580) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 16)
EVT_SET(LVar2, 30)
EVT_SET(LVar3, -1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_03"), 2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(enterSingleDoor_80241634) = {
EVT_CALL(UseDoorSounds, 0)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET(LVar2, 30)
EVT_SET(LVar3, -1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 15)
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_IF_LT(GB_StoryProgress, -15)
EVT_CALL(MakeNpcs, 1, EVT_PTR(N(npcGroupList_8024230C)))
EVT_END_IF
EVT_EXEC_WAIT(N(makeEntities))
EVT_EXEC(N(802417F0))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 18, 0x7FFFFE00)
EVT_CALL(EnableModel, 20, 0)
EVT_BIND_TRIGGER(N(exitSingleDoor_80241580), TRIGGER_WALL_PRESS_A, 16, 1, 0)
EVT_EXEC(N(802414E0))
EVT_EXEC(N(enterSingleDoor_80241634))
EVT_RETURN
EVT_END
};
static s32 N(pad_17E8)[] = {
0x00000000, 0x00000000,
};
EvtScript N(802417F0) = {
EVT_CALL(N(func_80240000_C3AA10))
EVT_CALL(func_802CA988, 0, LVar2, LVar3, LVar4, LVar5)
EVT_CALL(N(func_80240030_C3AA40))
EVT_SET(GF_DGB05_BoardedFloor, 1)
EVT_CALL(GotoMap, EVT_PTR("dgb_06"), 1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
static s32 N(pad_1868)[] = {
0x00000000, 0x00000000,
};
EvtScript N(makeEntities) = {
EVT_IF_EQ(GF_DGB05_BoardedFloor, 0)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 510, -210, 100, 0, MAKE_ENTITY_END)
EVT_END_IF
EVT_RETURN
EVT_END
};
static s32 N(pad_18BC) = {
0x00000000,
};
EvtScript N(802418C0) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_EQ(2)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_CALL(OnPlayerFled, 1)
EVT_CASE_EQ(3)
EVT_CALL(SetEnemyFlagBits, -1, ENEMY_FLAGS_FLED, 1)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
s32 N(unk_missing_8024197C)[] = {
0x00390000, 0x00390002, 0x00390003, 0x00390004, 0x0039000C, 0x00390007, 0x00390008, 0x00390011,
0x00390012, 0xFFFFFFFF,
};
s32 N(extraAnimationList_802419A4)[] = {
ANIM_WorldClubba_Anim00,
ANIM_LIST_END,
};
MobileAISettings N(npcAISettings_802419AC) = {
.moveSpeed = 1.0f,
.moveTime = 120,
.waitTime = 30,
.alertRadius = 100.0f,
.alertOffsetDist = 40.0f,
.playerSearchInterval = 10,
.chaseSpeed = 3.5f,
.chaseTurnRate= 90,
.chaseUpdateInterval = 15,
.chaseRadius = 200.0f,
.chaseOffsetDist = 160.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_802419DC) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 1, 10)
EVT_CALL(SetSelfVar, 2, 14)
EVT_CALL(SetSelfVar, 3, 18)
EVT_CALL(N(ClubbaNappingAI_Main), EVT_PTR(N(npcAISettings_802419AC)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80241A4C) = {
.height = 36,
.radius = 34,
.ai = &N(npcAI_802419DC),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 13,
};
EvtScript N(npcAI_80241A78) = {
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetSelfVar, 0, 4)
EVT_CALL(SetSelfVar, 1, 32)
EVT_CALL(SetSelfVar, 2, 50)
EVT_CALL(SetSelfVar, 3, 32)
EVT_CALL(SetSelfVar, 4, 3)
EVT_CALL(SetSelfVar, 15, 8389)
EVT_CALL(N(MeleeHitbox_Main))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80241B20) = {
.height = 14,
.radius = 18,
.ai = &N(npcAI_80241A78),
.onDefeat = &N(802418C0),
.level = 13,
.actionFlags = 8,
};
StaticNpc N(npcGroup_80241B4C)[] = {
{
.id = NPC_WORLD_CLUBBA0,
.settings = &N(npcSettings_80241A4C),
.pos = { 132.0f, -110.0f, 238.0f },
.flags = ENEMY_FLAGS_400,
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 5,
.itemDrops = {
{ ITEM_SUPER_SHROOM, 10, 0 },
},
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 2,
.maxCoinBonus = 3,
},
.territory = { .temp = { 132, -110, 238, 0, 0, -32767, 0, 325, 0, 185, 200 }},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
},
{
.id = NPC_WORLD_CLUBBA1,
.settings = &N(npcSettings_80241B20),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_800000,
.yaw = 0,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.extraAnimations = N(extraAnimationList_802419A4),
},
};
StaticNpc N(npcGroup_80241F2C)[] = {
{
.id = NPC_WORLD_CLUBBA2,
.settings = &N(npcSettings_80241A4C),
.pos = { 503.0f, -210.0f, 225.0f },
.flags = ENEMY_FLAGS_400,
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 5,
.itemDrops = {
{ ITEM_SUPER_SHROOM, 10, 0 },
},
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 2,
.maxCoinBonus = 3,
},
.territory = { .temp = { 503, -210, 225, 0, 0, -32767, 0, 503, -210, 290, 200, 150, 1 }},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
},
{
.id = NPC_WORLD_CLUBBA3,
.settings = &N(npcSettings_80241B20),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_800000,
.yaw = 0,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.extraAnimations = N(extraAnimationList_802419A4),
},
};
NpcGroupList N(npcGroupList_8024230C) = {
NPC_GROUP(N(npcGroup_80241B4C), 0x0F01, 0x02),
NPC_GROUP(N(npcGroup_80241F2C), 0x0F02, 0x02),
{},
};
ApiStatus N(func_80240000_C3AA10)(Evt* script, s32 isInitialCall) {
if (gPlayerStatus.position.y >= -210.0f) {
return ApiStatus_BLOCK;
}
return ApiStatus_DONE2;
}
ApiStatus N(func_80240030_C3AA40)(Evt* script, s32 isInitialCall) {
if (gPlayerStatus.position.y > -270.0f) {
return ApiStatus_BLOCK;
}
return ApiStatus_DONE2;
}
#include "world/common/enemy/ai/ClubbaNappingAI.inc.c"
#include "world/common/enemy/ai/WanderMeleeAI.inc.c"

View File

@ -2,18 +2,24 @@
/// @brief Tubba's Castle - Stairs Above Basement
#include "common.h"
#include "../dgb.h"
#include "message_ids.h"
#include "map.h"
#include "../dgb.h"
#include "mapfs/dgb_05_shape.h"
#include "mapfs/dgb_05_hit.h"
enum {
NPC_Clubba_01 = 0,
NPC_Clubba_01_Hitbox = 1,
NPC_Clubba_02 = 3,
NPC_Clubba_02_Hitbox = 4,
};
#define NAMESPACE dgb_05
ApiStatus N(func_80240000_C3AA10)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80240030_C3AA40)(Evt* script, s32 isInitialCall);
ApiStatus N(MeleeHitbox_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(ClubbaNappingAI_Main)(Evt* script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_8024230C);
extern EvtScript N(802417F0);
extern EvtScript N(main);
extern EvtScript N(makeEntities);
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_SetupHole);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,12 @@
#include "dgb_05.h"
EntryList N(Entrances) = {
[dgb_05_ENTRY_0] { 515.0, 0.0, 310.0, 0.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_dgb_05 },
};

View File

@ -0,0 +1,14 @@
#include "dgb_05.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
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_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,48 @@
#include "dgb_05.h"
EvtScript N(EVS_ExitDoor_dgb_03_2) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar0, dgb_05_ENTRY_0)
EVT_SET(LVar1, COLLIDER_deilittn)
EVT_SET(LVar2, MODEL_o158)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_03"), dgb_03_ENTRY_2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_05_ENTRY_0)
EVT_SET(LVar2, MODEL_o158)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupHole))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitts, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(EnableModel, MODEL_o297, FALSE)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_03_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0)
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,26 @@
#include "dgb_05.h"
API_CALLABLE(N(AwaitFallInHole)) {
if (gPlayerStatus.position.y >= -210.0f) {
return ApiStatus_BLOCK;
}
return ApiStatus_DONE2;
}
API_CALLABLE(N(AwaitFallDownHole)) {
if (gPlayerStatus.position.y > -270.0f) {
return ApiStatus_BLOCK;
}
return ApiStatus_DONE2;
}
EvtScript N(EVS_SetupHole) = {
EVT_CALL(N(AwaitFallInHole))
EVT_CALL(func_802CA988, 0, LVar2, LVar3, LVar4, LVar5)
EVT_CALL(N(AwaitFallDownHole))
EVT_SET(GF_DGB05_BoardedFloor, TRUE)
EVT_CALL(GotoMap, EVT_PTR("dgb_06"), dgb_06_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,10 @@
#include "dgb_05.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_IF_EQ(GF_DGB05_BoardedFloor, FALSE)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 510, -210, 100, 0, MAKE_ENTITY_END)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,62 @@
#include "dgb_05.h"
#define INCLUDE_CLUBBA_NAPPING
#include "world/common/enemy/complete/Clubba_Multi.inc.c"
StaticNpc N(NpcData_Clubba_01)[] = {
{
.id = NPC_Clubba_01,
.settings = &N(NpcSettings_Clubba_Napping),
.pos = { 132.0f, -110.0f, 238.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400,
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 132, -110, 238 },
.wanderSize = { 0 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 325, 0, 185 },
.detectSize = { 200 },
}
},
.animations = CLUBBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_01_Hitbox),
};
StaticNpc N(NpcData_Clubba_02)[] = {
{
.id = NPC_Clubba_02,
.settings = &N(NpcSettings_Clubba_Napping),
.pos = { 503.0f, -210.0f, 225.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400,
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 503, -210, 225 },
.wanderSize = { 0 },
.detectShape = SHAPE_RECT,
.detectPos = { 503, -210, 290 },
.detectSize = { 200, 150 },
}
},
.animations = CLUBBA_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_02_Hitbox),
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Clubba_01), BTL_DGB_FORMATION_01, BTL_DGB_STAGE_02),
NPC_GROUP(N(NpcData_Clubba_02), BTL_DGB_FORMATION_02, BTL_DGB_STAGE_02),
{}
};

View File

@ -1,169 +0,0 @@
#include "dgb_06.h"
#include "entity.h"
#include "sprite/npc/Boo.h"
#include "message_ids.h"
enum {
NPC_BOO,
};
EntryList N(entryList) = {
{ -575.0f, 0.0f, 175.0f, 90.0f },
{ -150.0f, 100.0f, -250.0f, 0.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { MSG_MapTattle_dgb_06 },
};
EvtScript N(80240320) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
static s32 N(pad_3B8)[] = {
0x00000000, 0x00000000,
};
EvtScript N(exitSingleDoor_802403C0) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 12)
EVT_SET(LVar2, 5)
EVT_SET(LVar3, -1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_04"), 1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(enterSingleDoor_80240474) = {
EVT_CALL(UseDoorSounds, 0)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET(LVar2, 5)
EVT_SET(LVar3, -1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 15)
EVT_CALL(SetSpriteShading, 589824)
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, 1, EVT_PTR(N(npcGroupList_80240B44)))
EVT_EXEC_WAIT(N(makeEntities))
EVT_IF_EQ(GF_DGB05_BoardedFloor, 0)
EVT_CALL(EnableGroup, 28, 0)
EVT_ELSE
EVT_CALL(EnableGroup, 25, 0)
EVT_END_IF
EVT_BIND_TRIGGER(N(exitSingleDoor_802403C0), TRIGGER_WALL_PRESS_A, 12, 1, 0)
EVT_EXEC(N(80240320))
EVT_EXEC(N(enterSingleDoor_80240474))
EVT_RETURN
EVT_END
};
#define CHEST_ITEM 19
#define CHEST_FLAG 1048
#include "world/common/atomic/Chest.old.inc.c"
EvtScript N(makeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), -300, 50, -200, 0, 0, MAKE_ENTITY_END)
EVT_CALL(AssignChestFlag, GameFlag(CHEST_FLAG))
EVT_CALL(AssignScript, EVT_PTR(N(EVS_Chest_Interact)))
EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -125, 60, 175, 0, MAKE_ENTITY_END)
EVT_RETURN
EVT_END
};
static s32 N(pad_834)[] = {
0x00000000, 0x00000000, 0x00000000,
};
NpcSettings N(npcSettings_80240840) = {
.height = 24,
.radius = 24,
.level = 99,
};
EvtScript N(interact_8024086C) = {
EVT_IF_EQ(AreaFlag(4), 0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00F0)
EVT_SET(AreaFlag(4), 1)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00F1)
EVT_SET(AreaFlag(4), 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(init_802408FC) = {
EVT_IF_GE(GB_StoryProgress, -26)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_END_IF
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(interact_8024086C)))
EVT_RETURN
EVT_END
};
StaticNpc N(npcGroup_80240954) = {
.id = NPC_BOO,
.settings = &N(npcSettings_80240840),
.pos = { -300.0f, 10.0f, 150.0f },
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_400,
.init = &N(init_802408FC),
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Walk,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Idle,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Still,
ANIM_Boo_Tan_Confused,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
ANIM_Boo_Tan_Run,
},
.tattle = MSG_NpcTattle_HidingBoo,
};
NpcGroupList N(npcGroupList_80240B44) = {
NPC_GROUP(N(npcGroup_80240954)),
{},
};

View File

@ -2,12 +2,20 @@
/// @brief Tubba's Castle - Basement
#include "common.h"
#include "../dgb.h"
#include "message_ids.h"
#include "map.h"
#include "../dgb.h"
#include "mapfs/dgb_06_shape.h"
#include "mapfs/dgb_06_hit.h"
enum {
NPC_Boo = 0,
};
#define NAMESPACE dgb_06
extern NpcGroupList N(npcGroupList_80240B44);
extern EvtScript N(main);
extern EvtScript N(makeEntities);
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,13 @@
#include "dgb_06.h"
EntryList N(Entrances) = {
[dgb_06_ENTRY_0] { -575.0, 0.0, 175.0, 90.0 },
[dgb_06_ENTRY_1] { -150.0, 100.0, -250.0, 0.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_dgb_06 },
};

View File

@ -0,0 +1,14 @@
#include "dgb_06.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
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_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,48 @@
#include "dgb_06.h"
EvtScript N(EVS_ExitDoor_dgb_04_1) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar0, dgb_06_ENTRY_0)
EVT_SET(LVar1, COLLIDER_deilittw)
EVT_SET(LVar2, MODEL_o161)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_04"), dgb_04_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_06_ENTRY_0)
EVT_SET(LVar2, MODEL_o161)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR)
EVT_CALL(SetSpriteShading, SHADING_DGB_06)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_IF_EQ(GF_DGB05_BoardedFloor, FALSE)
EVT_CALL(EnableGroup, MODEL_g52, FALSE)
EVT_ELSE
EVT_CALL(EnableGroup, MODEL_g53, FALSE)
EVT_END_IF
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_04_1)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0)
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,15 @@
#include "dgb_06.h"
#include "entity.h"
#include "world/common/atomic/Chest.inc.c"
EvtScript N(EVS_Chest_Interact) = EVT_OPEN_CHEST_KEY(ITEM_TUBBA_CASTLE_KEY, GF_DGB06_Chest_CastleKey1);
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_Chest), -300, 50, -200, 0, 0, MAKE_ENTITY_END)
EVT_CALL(AssignChestFlag, GF_DGB06_Chest_CastleKey1)
EVT_CALL(AssignScript, EVT_PTR(N(EVS_Chest_Interact)))
EVT_CALL(MakeEntity, EVT_PTR(Entity_HeartBlock), -125, 60, 175, 0, MAKE_ENTITY_END)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,41 @@
#include "dgb_06.h"
#include "world/common/npc/Boo.inc.c"
EvtScript N(EVS_NpcInteract_Boo) = {
EVT_IF_EQ(AF_DGB06_Boo_Dialogue, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00F0)
EVT_SET(AF_DGB06_Boo_Dialogue, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Boo_Tan_Talk, ANIM_Boo_Tan_Idle, 0, MSG_CH3_00F1)
EVT_SET(AF_DGB06_Boo_Dialogue, FALSE)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Boo) = {
EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_END_IF
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Boo)))
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Boo) = {
.id = NPC_Boo,
.settings = &N(NpcSettings_Boo),
.pos = { -300.0f, 10.0f, 150.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Boo),
.drops = NPC_NO_DROPS,
.animations = GUSTY_BOO_ANIMS,
.tattle = MSG_NpcTattle_HidingBoo,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Boo)),
{}
};

View File

@ -1,273 +0,0 @@
#include "dgb_07.h"
#include "message_ids.h"
#include "entity.h"
#include "sprite/npc/WorldClubba.h"
enum {
NPC_WORLD_CLUBBA0,
NPC_WORLD_CLUBBA1,
};
EntryList N(entryList) = {
{ -450.0f, 0.0f, -40.0f, 0.0f },
{ 250.0f, 190.0f, -250.0f, 180.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { MSG_MapTattle_dgb_07 },
};
EvtScript N(80241490) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
static s32 N(pad_1528)[] = {
0x00000000, 0x00000000,
};
EvtScript N(exitSingleDoor_80241530) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 6)
EVT_SET(LVar2, 22)
EVT_SET(LVar3, -1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_02"), 2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(enterSingleDoor_802415E4) = {
EVT_CALL(UseDoorSounds, 0)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET(LVar2, 22)
EVT_SET(LVar3, -1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 15)
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_IF_LT(GB_StoryProgress, -15)
EVT_CALL(MakeNpcs, 1, EVT_PTR(N(npcGroupList_80241E5C)))
EVT_END_IF
EVT_EXEC_WAIT(N(makeEntities))
EVT_BIND_TRIGGER(N(exitSingleDoor_80241530), TRIGGER_WALL_PRESS_A, 6, 1, 0)
EVT_EXEC(N(80241490))
EVT_EXEC(N(enterSingleDoor_802415E4))
EVT_RETURN
EVT_END
};
EvtScript N(makeEntities) = {
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -220, 75, -210, 17, GF_DGB07_Item_StarPiece)
EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -370, 0, -200, 0, -1, MAKE_ENTITY_END)
EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -410, 0, -200, 0, -1, MAKE_ENTITY_END)
EVT_RETURN
EVT_END
};
static s32 N(pad_17E4)[] = {
0x00000000, 0x00000000, 0x00000000,
};
EvtScript N(802417F0) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_EQ(2)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_CALL(OnPlayerFled, 1)
EVT_CASE_EQ(3)
EVT_CALL(SetEnemyFlagBits, -1, ENEMY_FLAGS_FLED, 1)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
s32 N(extraAnimationList_802418AC)[] = {
ANIM_WorldClubba_Anim00,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_LIST_END,
};
s32 N(extraAnimationList_802418D4)[] = {
ANIM_WorldClubba_Anim00,
ANIM_LIST_END,
};
MobileAISettings N(npcAISettings_802418DC) = {
.moveSpeed = 1.0f,
.moveTime = 120,
.waitTime = 30,
.alertRadius = 100.0f,
.alertOffsetDist = 40.0f,
.playerSearchInterval = 10,
.chaseSpeed = 3.5f,
.chaseTurnRate= 90,
.chaseUpdateInterval = 15,
.chaseRadius = 200.0f,
.chaseOffsetDist = 160.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_8024190C) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 1, 10)
EVT_CALL(SetSelfVar, 2, 14)
EVT_CALL(SetSelfVar, 3, 18)
EVT_CALL(N(ClubbaNappingAI_Main), EVT_PTR(N(npcAISettings_802418DC)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_8024197C) = {
.height = 36,
.radius = 34,
.ai = &N(npcAI_8024190C),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 13,
};
EvtScript N(npcAI_802419A8) = {
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetSelfVar, 0, 4)
EVT_CALL(SetSelfVar, 1, 32)
EVT_CALL(SetSelfVar, 2, 50)
EVT_CALL(SetSelfVar, 3, 32)
EVT_CALL(SetSelfVar, 4, 3)
EVT_CALL(SetSelfVar, 15, 8389)
EVT_CALL(N(MeleeHitbox_Main))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80241A50) = {
.height = 14,
.radius = 18,
.ai = &N(npcAI_802419A8),
.onDefeat = &N(802417F0),
.level = 13,
.actionFlags = 8,
};
StaticNpc N(npcGroup_80241A7C)[] = {
{
.id = NPC_WORLD_CLUBBA0,
.settings = &N(npcSettings_8024197C),
.pos = { -500.0f, 0.0f, -240.0f },
.flags = ENEMY_FLAGS_800,
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 5,
.itemDrops = {
{ ITEM_SUPER_SHROOM, 10, 0 },
},
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 2,
.maxCoinBonus = 3,
},
.territory = { .temp = { -500, 0, -240, 40, 0, -32767, 0, -500, 0, -240, 200, 0, 0, 1 }},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
.extraAnimations = N(extraAnimationList_802418AC),
},
{
.id = NPC_WORLD_CLUBBA1,
.settings = &N(npcSettings_80241A50),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_800000,
.yaw = 0,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.extraAnimations = N(extraAnimationList_802418D4),
},
};
NpcGroupList N(npcGroupList_80241E5C) = {
NPC_GROUP(N(npcGroup_80241A7C), 0x0F01, 0x02),
{},
};
static const s32 N(pad_1E74)[] = {
0x00000000, 0x00000000
};
#include "world/common/enemy/ai/ClubbaNappingAI.inc.c"
#include "world/common/enemy/ai/WanderMeleeAI.inc.c"

View File

@ -2,15 +2,21 @@
/// @brief Tubba's Castle - Study (1F)
#include "common.h"
#include "../dgb.h"
#include "message_ids.h"
#include "map.h"
#include "../dgb.h"
#include "mapfs/dgb_07_shape.h"
#include "mapfs/dgb_07_hit.h"
enum {
NPC_Clubba_01 = 0,
NPC_Clubba_01_Hitbox = 1,
};
#define NAMESPACE dgb_07
ApiStatus N(ClubbaNappingAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(MeleeHitbox_Main)(Evt *script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_80241E5C);
extern EvtScript N(main);
extern EvtScript N(makeEntities);
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,13 @@
#include "dgb_07.h"
EntryList N(Entrances) = {
[dgb_07_ENTRY_0] { -450.0, 0.0, -40.0, 0.0 },
[dgb_07_ENTRY_1] { 250.0, 190.0, -250.0, 180.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_dgb_07 },
};

View File

@ -0,0 +1,14 @@
#include "dgb_07.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
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_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,47 @@
#include "dgb_07.h"
EvtScript N(EVS_ExitDoor_dgb_02_2) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar0, dgb_07_ENTRY_0)
EVT_SET(LVar1, COLLIDER_deilits)
EVT_SET(LVar2, MODEL_o158)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_02"), dgb_02_ENTRY_2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
MAP_RODATA_PAD(1, strings);
EvtScript N(EVS_EnterMap) = {
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_07_ENTRY_0)
EVT_SET(LVar2, MODEL_o158)
EVT_SET(LVar3, DOOR_SWING_IN)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_ALT_NO_LEAD()
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoor_dgb_02_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilits, 1, 0)
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,10 @@
#include "dgb_07.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, -220, 75, -210, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_DGB07_Item_StarPiece)
EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -370, 0, -200, 0, -1, MAKE_ENTITY_END)
EVT_CALL(MakeEntity, EVT_PTR(Entity_WoodenCrate), -410, 0, -200, 0, -1, MAKE_ENTITY_END)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,36 @@
#include "dgb_07.h"
#define INCLUDE_CLUBBA_NAPPING
#include "world/common/enemy/complete/Clubba_Multi.inc.c"
StaticNpc N(NpcData_Clubba_01)[] = {
{
.id = NPC_Clubba_01,
.settings = &N(NpcSettings_Clubba_Napping),
.pos = { -500.0f, 0.0f, -240.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_800,
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -500, 0, -240 },
.wanderSize = { 40 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -500, 0, -240 },
.detectSize = { 200 },
}
},
.animations = CLUBBA_ANIMS,
.extraAnimations = N(ExtraAnims_Clubba),
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_01_Hitbox),
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Clubba_01), BTL_DGB_FORMATION_01, BTL_DGB_STAGE_02),
{}
};

File diff suppressed because it is too large Load Diff

View File

@ -2,25 +2,36 @@
/// @brief Tubba's Castle - East Hall (1/2F)
#include "common.h"
#include "../dgb.h"
#include "message_ids.h"
#include "map.h"
#include "../dgb.h"
#include "mapfs/dgb_08_shape.h"
#include "mapfs/dgb_08_hit.h"
#include "sprite/npc/WorldClubba.h"
#include "sprite/npc/Sentinel.h"
#include "sprite/npc/WorldTubba.h"
enum {
NPC_Clubba_Unused = 0,
NPC_Clubba_01 = 1,
NPC_Clubba_01_Hitbox = 2,
NPC_Clubba_02 = 3,
NPC_Clubba_02_Hitbox = 4,
NPC_Clubba_03 = 5,
NPC_Clubba_03_Hitbox = 6,
NPC_Sentinel_01 = 7,
NPC_Sentinel_02 = 8,
NPC_Tubba = 9,
NPC_Clubba_Last = 11,
};
#define NAMESPACE dgb_08
ApiStatus N(UnkFunc1)(Evt* script, s32 isInitialCall);
ApiStatus N(PatrolNoAttackAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(MeleeHitbox_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(WanderMeleeAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(SentinelAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80243B98_C43948)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80243C10_C439C0)(Evt* script, s32 isInitialCall);
ApiStatus N(func_80243C50_C43A00)(Evt* script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_80246958);
extern NpcGroupList N(npcGroupList_802469AC);
extern NpcGroupList N(npcGroupList_802469C4);
extern EvtScript N(802469E0);
extern EvtScript N(main);
extern EvtScript N(npcAI_80244D7C);
extern EvtScript N(unk_80244100);
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(BeforeNPCs);
extern NpcGroupList N(TubbaNPCs);
extern NpcGroupList N(AfterNPCs);

View File

@ -0,0 +1,13 @@
#include "dgb_08.h"
EntryList N(Entrances) = {
[dgb_08_ENTRY_0] { -575.0, 0.0, 180.0, 90.0 },
[dgb_08_ENTRY_1] { -575.0, 210.0, 180.0, 90.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_dgb_08 },
};

View File

@ -0,0 +1,14 @@
#include "dgb_08.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
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_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,73 @@
#include "dgb_08.h"
EvtScript N(EVS_ExitDoors_dgb_01_2) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_08_ENTRY_0)
EVT_SET(LVar1, COLLIDER_deilittse)
EVT_SET(LVar2, MODEL_o142)
EVT_SET(LVar3, MODEL_o143)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitDoors_dgb_01_4) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_08_ENTRY_1)
EVT_SET(LVar1, COLLIDER_deilittne)
EVT_SET(LVar2, MODEL_o140)
EVT_SET(LVar3, MODEL_o141)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_4)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
MAP_RODATA_PAD(1, strings);
EvtScript N(EVS_EnterMap) = {
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_08_ENTRY_0)
EVT_SET(LVar2, MODEL_o142)
EVT_SET(LVar3, MODEL_o143)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_CASE_EQ(dgb_08_ENTRY_1)
EVT_SET(LVar2, MODEL_o140)
EVT_SET(LVar3, MODEL_o141)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_SMASHED_THE_BRIDGES)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(BeforeNPCs)))
EVT_CASE_LT(STORY_CH3_DEFEATED_TUBBA_BLUBBA)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(TubbaNPCs)))
EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(AfterNPCs)))
EVT_END_SWITCH
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_2)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittse, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitDoors_dgb_01_4)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittne, 1, 0)
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(EVS_EnterMap))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,477 @@
#include "dgb_08.h"
#include "world/common/enemy/complete/TubbaBlubba_Patrol.inc.c"
#include "world/common/enemy/complete/TubbaBlubba.inc.c"
NpcSettings N(NpcSettings_Yakkey) = {
.height = 24,
.radius = 24,
.level = 13,
};
#define INCLUDE_CLUBBA_WANDER
#include "world/common/enemy/complete/Clubba_Multi.inc.c"
#define AI_SENTINEL_FIRST_NPC NPC_Sentinel_01
#define AI_SENTINEL_LAST_NPC NPC_Tubba
#include "world/common/enemy/complete/Sentinel.inc.c"
NpcSettings N(NpcSettings_LastClubba) = {
.height = 24,
.radius = 24,
.level = 99,
};
extern EvtScript N(EVS_NpcAI_Tubba);
EvtScript N(EVS_NpcIdle_Tubba) = {
EVT_LOOP(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_GE(LVar0, -350)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_SET(GB_ARN_Tubba_MapID, 8)
EVT_SET(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_HALL)
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittne, SOUND_CREAKY_DOOR_OPEN, 0)
EVT_CALL(MakeLerp, 0, 80, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o140, LVar0, 0, -1, 0)
EVT_CALL(RotateModel, MODEL_o141, LVar0, 0, 1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcAnimation, NPC_Tubba, ANIM_WorldTubba_Anim0A)
EVT_CALL(SetNpcPos, NPC_SELF, -665, 210, 180)
EVT_CALL(SetNpcYaw, NPC_SELF, 90)
EVT_CALL(NpcMoveTo, NPC_SELF, -530, 180, 30)
EVT_THREAD
EVT_WAIT(20)
EVT_CALL(MakeLerp, 80, 0, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateModel, MODEL_o140, LVar0, 0, -1, 0)
EVT_CALL(RotateModel, MODEL_o141, 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_deilittne, SOUND_CREAKY_DOOR_CLOSE, 0)
EVT_END_THREAD
EVT_CALL(NpcMoveTo, NPC_SELF, -500, 80, 10)
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Tubba)))
EVT_RETURN
EVT_END
};
#include "world/common/todo/UnkFunc1.inc.c"
API_CALLABLE(N(SetTubbaPatrolTerritory)) {
if (get_enemy_safe(NPC_Tubba)) {
Enemy* enemy = get_enemy(NPC_Tubba);
enemy->territory->patrol.numPoints = 2;
enemy->territory->patrol.points[0].x = -450;
enemy->territory->patrol.points[0].y = 0;
enemy->territory->patrol.points[0].z = 175;
enemy->territory->patrol.points[1].x = 300;
enemy->territory->patrol.points[1].y = 0;
enemy->territory->patrol.points[1].z = 175;
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
API_CALLABLE(N(SetTubbaPatrolMode)) {
if (get_enemy_safe(NPC_Tubba)) {
Enemy* enemy = get_enemy(NPC_Tubba);
enemy->aiFlags |= ENEMY_AI_FLAGS_80;
return ApiStatus_DONE2;
}
return ApiStatus_DONE2;
}
EvtScript N(EVS_SetPatrolAfterWaiting) = {
EVT_LABEL(10)
EVT_CALL(GetNpcPos, NPC_Tubba, LVar0, LVar1, LVar2)
EVT_IF_GT(LVar1, 0)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(N(SetTubbaPatrolTerritory))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcAI_Tubba) = {
EVT_CALL(N(SetTubbaPatrolMode))
EVT_EXEC(N(EVS_SetPatrolAfterWaiting))
EVT_THREAD
EVT_LOOP(0)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20F6, SOUND_PARAM_QUIET)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(2.0))
EVT_WAIT(5)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_20F6, SOUND_PARAM_QUIET)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 2, EVT_FLOAT(1.0))
EVT_WAIT(8)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(N(PatrolNoAttackAI_Main), EVT_PTR(N(AISettings_Tubba_Patrol)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_Tubba) = {
EVT_CALL(N(UnkFunc1))
EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Tubba) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH3_TUBBA_SMASHED_THE_BRIDGES)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_4, TRUE)
EVT_RETURN
EVT_END_IF
EVT_IF_GE(GB_StoryProgress, STORY_CH3_TUBBA_CHASED_MARIO_IN_FOYER)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_4, TRUE)
EVT_RETURN
EVT_END_IF
EVT_CALL(SetNpcScale, NPC_SELF, EVT_FLOAT(1.25), EVT_FLOAT(1.25), EVT_FLOAT(1.25))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Tubba)))
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_08_ENTRY_0)
EVT_IF_NE(GB_ARN_Tubba_MapID, 8)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_4, TRUE)
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_SELF, -130, 0, 200)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Tubba)))
EVT_END_IF
EVT_CASE_EQ(dgb_08_ENTRY_1)
EVT_IF_NE(GB_ARN_Tubba_MapID, 8)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Tubba)))
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_SELF, -130, 210, 80)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Tubba)))
EVT_END_IF
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Tubba) = {
.id = NPC_Tubba,
.settings = &N(NpcSettings_TubbaBlubba),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.flags = ENEMY_FLAGS_4 | ENEMY_FLAGS_40000 | ENEMY_FLAGS_200000 | ENEMY_FLAGS_800000,
.init = &N(EVS_NpcInit_Tubba),
.drops = CLUBBA_DROPS,
.territory = {
.patrol = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 10,
.points = {
{ -400, 210, 80 },
{ -100, 210, 80 },
{ 100, 210, 80 },
{ 400, 210, 80 },
{ 820, 100, 80 },
{ 820, 100, 260 },
{ 400, 0, 260 },
{ 100, 0, 200 },
{ -100, 0, 175 },
{ -450, 0, 175 },
},
.detectShape = SHAPE_RECT,
.detectPos = { 150, 0, 175 },
.detectSize = { 1450, 200 },
}
},
.animations = TUBBA_ANGRY_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT,
};
StaticNpc N(NpcData_Clubba_01)[] = {
{
.id = NPC_Clubba_01,
.settings = &N(NpcSettings_Clubba_Wander),
.pos = { -250.0f, 0.0f, 135.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400,
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -250, 0, 135 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -250, 0, 135 },
.detectSize = { 250 },
}
},
.animations = CLUBBA_ANIMS,
.extraAnimations = N(ExtraAnims_Clubba),
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_01_Hitbox),
};
StaticNpc N(NpcData_Clubba_02)[] = {
{
.id = NPC_Clubba_02,
.settings = &N(NpcSettings_Clubba_Wander),
.pos = { 220.0f, 0.0f, 155.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400,
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 220, 0, 155 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 220, 0, 155 },
.detectSize = { 250 },
}
},
.animations = CLUBBA_ANIMS,
.extraAnimations = N(ExtraAnims_Clubba),
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_02_Hitbox),
};
StaticNpc N(NpcData_Clubba_03)[] = {
{
.id = NPC_Clubba_03,
.settings = &N(NpcSettings_Clubba_Wander),
.pos = { 825.0f, 100.0f, 200.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400,
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 825, 100, 200 },
.wanderSize = { 25 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 825, 100, 200 },
.detectSize = { 150 },
}
},
.animations = CLUBBA_ANIMS,
.extraAnimations = N(ExtraAnims_Clubba),
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_03_Hitbox),
};
StaticNpc N(NpcData_Sentinel_01) = {
.id = NPC_Sentinel_01,
.settings = &N(NpcSettings_Sentinel),
.pos = { 75.0f, 310.0f, 85.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400,
.drops = SENTINEL_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 75, 310, 85 },
.wanderSize = { 30 },
.detectShape = SHAPE_RECT,
.detectPos = { 75, 0, 85 },
.detectSize = { 250, 55 },
}
},
.animations = SENTINEL_ANIMS,
};
StaticNpc N(NpcData_Sentinel_02) = {
.id = NPC_Sentinel_02,
.settings = &N(NpcSettings_Sentinel),
.pos = { -451.0f, 310.0f, 81.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400,
.drops = SENTINEL_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -451, 310, 81 },
.wanderSize = { 30 },
.detectShape = SHAPE_RECT,
.detectPos = { -310, 0, 175 },
.detectSize = { 250, 145 },
}
},
.animations = SENTINEL_ANIMS,
};
API_CALLABLE(N(PlayAlertSound)) {
ai_enemy_play_sound(get_npc_unsafe(script->owner1.enemy->npcID), SOUND_32F, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_NpcIdle_LastClubba) = {
EVT_LABEL(0)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07)
EVT_WAIT(30)
EVT_LOOP(15)
EVT_CALL(N(PlayAlertSound))
EVT_WAIT(60)
EVT_END_LOOP
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim0C)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07)
EVT_WAIT(30)
EVT_LOOP(5)
EVT_CALL(N(PlayAlertSound))
EVT_WAIT(60)
EVT_END_LOOP
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim0C)
EVT_WAIT(15)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_LastClubba) = {
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim08)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2F1, 0)
EVT_WAIT(10)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim02)
EVT_WAIT(20)
EVT_CALL(GetNpcYaw, NPC_SELF, LVar0)
EVT_ADD(LVar0, 180)
EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 0)
EVT_WAIT(10)
EVT_CALL(GetNpcYaw, NPC_SELF, LVar0)
EVT_ADD(LVar0, 180)
EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 0)
EVT_WAIT(25)
EVT_CALL(GetNpcYaw, NPC_SELF, LVar0)
EVT_ADD(LVar0, 180)
EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 0)
EVT_WAIT(15)
EVT_CALL(NpcFacePlayer, NPC_SELF, 0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_WorldClubba_Anim05, ANIM_WorldClubba_Anim02, 0, MSG_CH3_00F2)
EVT_WAIT(10)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim06)
EVT_WAIT(10)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_LastClubba) = {
EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 30)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldClubba_Anim07)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_LastClubba)))
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_LastClubba)))
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_LastClubba) = {
.id = NPC_Clubba_Last,
.settings = &N(NpcSettings_LastClubba),
.pos = { 426.0f, 0.0f, 38.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_200000 | ENEMY_FLAGS_400000,
.init = &N(EVS_NpcInit_LastClubba),
.drops = NPC_NO_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 0, 0 },
.wanderSize = { 0 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 0, 0 },
.detectSize = { 0 },
}
},
.animations = CLUBBA_ANIMS,
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
.tattle = MSG_NpcTattle_LastClubba,
};
EvtScript N(EVS_NpcIdle_Clubba_Unused) = {
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Clubba_Unused) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Clubba_Unused)))
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Clubba_Unused) = {
.id = NPC_Clubba_Unused,
.settings = &N(NpcSettings_Clubba_Wander),
.pos = { -250.0f, 0.0f, 135.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Clubba_Unused),
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -250, 0, 135 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -250, 0, 135 },
.detectSize = { 250 },
}
},
.animations = CLUBBA_ANIMS,
.extraAnimations = N(ExtraAnims_Clubba),
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
};
NpcGroupList N(BeforeNPCs) = {
NPC_GROUP(N(NpcData_Clubba_Unused), BTL_DGB_FORMATION_02, BTL_DGB_STAGE_02),
NPC_GROUP(N(NpcData_Clubba_01), BTL_DGB_FORMATION_02, BTL_DGB_STAGE_02),
NPC_GROUP(N(NpcData_Clubba_02), BTL_DGB_FORMATION_02, BTL_DGB_STAGE_02),
NPC_GROUP(N(NpcData_Clubba_03), BTL_DGB_FORMATION_03, BTL_DGB_STAGE_02),
NPC_GROUP(N(NpcData_Sentinel_01)),
NPC_GROUP(N(NpcData_Sentinel_02)),
{}
};
NpcGroupList N(TubbaNPCs) = {
NPC_GROUP(N(NpcData_Tubba), BTL_DGB_FORMATION_04, BTL_DGB_STAGE_00),
{}
};
NpcGroupList N(AfterNPCs) = {
NPC_GROUP(N(NpcData_LastClubba)),
{}
};

View File

@ -0,0 +1,6 @@
#include "dgb_08.h"
EvtScript N(EVS_MakeEntities) = {
EVT_RETURN
EVT_END
};

View File

@ -1,643 +0,0 @@
#include "dgb_09.h"
#include "message_ids.h"
#include "sprite.h"
#include "world/partners.h"
#include "sprite/npc/Sentinel.h"
#include "sprite/npc/WorldClubba.h"
enum {
NPC_WORLD_CLUBBA0,
NPC_WORLD_CLUBBA1,
NPC_WORLD_CLUBBA2,
NPC_WORLD_CLUBBA3,
NPC_SENTINEL,
};
EntryList N(entryList) = {
{ -567.0f, 0.0f, 180.0f, 90.0f },
{ 567.0f, 0.0f, 180.0f, 270.0f },
{ -450.0f, 0.0f, 90.0f, 180.0f },
{ 300.0f, 0.0f, 90.0f, 180.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { MSG_MapTattle_dgb_09 },
};
EvtScript N(80243880) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
static s32 N(pad_3918)[] = {
0x00000000, 0x00000000,
};
EvtScript N(exitDoubleDoor_80243920) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 5)
EVT_SET(LVar2, 10)
EVT_SET(LVar3, 12)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_03"), 4)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitDoubleDoor_802439D4) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar0, 1)
EVT_SET(LVar1, 17)
EVT_SET(LVar2, 17)
EVT_SET(LVar3, 15)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_01"), 3)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitSingleDoor_80243A88) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar0, 2)
EVT_SET(LVar1, 9)
EVT_SET(LVar2, 20)
EVT_SET(LVar3, 1)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_12"), 0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitWalk_80243B3C) = EVT_EXIT_WALK(40, 3, "dgb_10", 0);
EvtScript N(80243B98) = {
EVT_BIND_TRIGGER(N(exitWalk_80243B3C), TRIGGER_FLOOR_ABOVE, 11, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(enterWalk_80243BC4) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar2, 10)
EVT_SET(LVar3, 12)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(80243B98))
EVT_CASE_EQ(1)
EVT_CALL(UseDoorSounds, 3)
EVT_SET(LVar2, 17)
EVT_SET(LVar3, 15)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(80243B98))
EVT_CASE_EQ(2)
EVT_CALL(UseDoorSounds, 0)
EVT_SET(LVar2, 20)
EVT_SET(LVar3, 1)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(80243B98))
EVT_CASE_EQ(3)
EVT_SET(LVar0, EVT_PTR(N(80243B98)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 15)
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_IF_LT(GB_StoryProgress, -15)
EVT_CALL(MakeNpcs, 1, EVT_PTR(N(npcGroupList_8024533C)))
EVT_END_IF
EVT_EXEC(N(80243F6C))
EVT_BIND_TRIGGER(N(exitDoubleDoor_80243920), TRIGGER_WALL_PRESS_A, 5, 1, 0)
EVT_BIND_TRIGGER(N(exitDoubleDoor_802439D4), TRIGGER_WALL_PRESS_A, 17, 1, 0)
EVT_BIND_TRIGGER(N(exitSingleDoor_80243A88), TRIGGER_WALL_PRESS_A, 9, 1, 0)
EVT_EXEC(N(80243880))
EVT_EXEC(N(enterWalk_80243BC4))
EVT_RETURN
EVT_END
};
static s32 N(pad_3E4C) = {
0x00000000,
};
Vec4f N(triggerCoord_80243E50) = { 300.0f, 0.0f, 88.0f, 0.0f };
EvtScript N(80243E60) = {
EVT_WAIT(2)
EVT_CALL(PlayEffect, 0x42, 1, 25, 3, 1, 10, 30, 0, 0, 0, 0, 0, 0, 0)
EVT_LOOP(10)
EVT_CALL(EnableModel, 29, 0)
EVT_CALL(EnableModel, 25, 1)
EVT_WAIT(1)
EVT_CALL(EnableModel, 29, 1)
EVT_CALL(EnableModel, 25, 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 13, 0x7FFFFE00)
EVT_SET(GF_DGB09_BombedWall, 1)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(80243F6C) = {
EVT_IF_EQ(GF_DGB09_BombedWall, 0)
EVT_BIND_TRIGGER(N(80243E60), TRIGGER_POINT_BOMB, EVT_PTR(N(triggerCoord_80243E50)), 1, 0)
EVT_CALL(EnableModel, 29, 0)
EVT_ELSE
EVT_CALL(EnableModel, 25, 0)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 13, 0x7FFFFE00)
EVT_END_IF
EVT_RETURN
EVT_END
};
static s32 N(pad_3FF8)[] = {
0x00000000, 0x00000000,
};
EvtScript N(80244000) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_CASE_EQ(2)
EVT_CALL(SetNpcPos, NPC_SELF, 0, -1000, 0)
EVT_CALL(OnPlayerFled, 1)
EVT_CASE_EQ(3)
EVT_CALL(SetEnemyFlagBits, -1, ENEMY_FLAGS_FLED, 1)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
s32 N(extraAnimationList_802440BC)[] = {
ANIM_WorldClubba_Anim00,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_LIST_END,
};
s32 N(extraAnimationList_802440E4)[] = {
ANIM_WorldClubba_Anim00,
ANIM_LIST_END,
};
MobileAISettings N(npcAISettings_802440EC) = {
.moveSpeed = 1.5f,
.moveTime = 120,
.waitTime = 30,
.alertRadius = 85.0f,
.alertOffsetDist = 65.0f,
.playerSearchInterval = 5,
.chaseSpeed = 3.5f,
.chaseTurnRate= 90,
.chaseUpdateInterval = 12,
.chaseRadius = 110.0f,
.chaseOffsetDist = 90.0f,
.unk_AI_2C = 3,
};
EvtScript N(npcAI_8024411C) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 1, 5)
EVT_CALL(SetSelfVar, 2, 8)
EVT_CALL(SetSelfVar, 3, 12)
EVT_CALL(N(WanderMeleeAI_Main), EVT_PTR(N(npcAISettings_802440EC)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_8024418C) = {
.height = 36,
.radius = 34,
.ai = &N(npcAI_8024411C),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 13,
};
MobileAISettings N(npcAISettings_802441B8) = {
.moveSpeed = 1.0f,
.moveTime = 120,
.waitTime = 30,
.alertRadius = 100.0f,
.alertOffsetDist = 40.0f,
.playerSearchInterval = 10,
.chaseSpeed = 3.5f,
.chaseTurnRate= 90,
.chaseUpdateInterval = 15,
.chaseRadius = 200.0f,
.chaseOffsetDist = 160.0f,
.unk_AI_2C = 1,
};
EvtScript N(npcAI_802441E8) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 1, 10)
EVT_CALL(SetSelfVar, 2, 14)
EVT_CALL(SetSelfVar, 3, 18)
EVT_CALL(N(ClubbaNappingAI_Main), EVT_PTR(N(npcAISettings_802441B8)))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_80244258) = {
.height = 36,
.radius = 34,
.ai = &N(npcAI_802441E8),
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
.level = 13,
};
EvtScript N(npcAI_80244284) = {
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_CALL(SetSelfVar, 0, 4)
EVT_CALL(SetSelfVar, 1, 32)
EVT_CALL(SetSelfVar, 2, 50)
EVT_CALL(SetSelfVar, 3, 32)
EVT_CALL(SetSelfVar, 4, 3)
EVT_CALL(SetSelfVar, 15, 8389)
EVT_CALL(N(MeleeHitbox_Main))
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_8024432C) = {
.height = 14,
.radius = 18,
.ai = &N(npcAI_80244284),
.onDefeat = &N(80244000),
.level = 13,
.actionFlags = 8,
};
f32 N(FlyingAI_JumpVels)[] = {
4.5f, 3.5f, 2.6f, 2.0f,
1.5f, 20.0f,
};
EvtScript N(80244370) = {
EVT_CALL(SetSelfEnemyFlagBits, ((ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_8000000 | ENEMY_FLAGS_10000000 | ENEMY_FLAGS_20000000)), TRUE)
EVT_CALL(SetNpcFlagBits, NPC_SELF, ((NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING)), TRUE)
EVT_RETURN
EVT_END
};
MobileAISettings N(npcAISettings_802443AC) = {
.moveSpeed = 1.5f,
.moveTime = 90,
.waitTime = 30,
.alertRadius = 240.0f,
.playerSearchInterval = 1,
.chaseSpeed = 5.3f,
.chaseTurnRate= 180,
.chaseUpdateInterval = 1,
.chaseRadius = 240.0f,
.unk_AI_2C = 1,
};
extern const char N(dgb_00_name_hack)[];
EvtScript N(npcAI_802443DC) = {
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 5, -650)
EVT_CALL(SetSelfVar, 6, 30)
EVT_CALL(SetSelfVar, 1, 600)
EVT_CALL(N(SentinelAI_Main), EVT_PTR(N(npcAISettings_802443AC)))
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(2)
EVT_LABEL(20)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar4, LVar5)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar4, LVar2)
EVT_CALL(GetPlayerActionState, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_WAIT(1)
EVT_GOTO(20)
EVT_END_IF
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(InterruptUsePartner)
EVT_CALL(DisablePartnerAI, 0)
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, 1)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 20)
EVT_ADD(LVar2, 2)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(func_80045838, -1, 759, 0)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Sentinel_Anim08)
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80017)
EVT_WAIT(10)
EVT_CALL(func_80045838, -1, 1838, 0)
EVT_THREAD
EVT_LOOP(100)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 1)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 1)
EVT_CALL(SetPlayerPos, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_CALL(SetNpcAnimation, NPC_PARTNER, 0x108)
EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10)
EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10)
EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10)
EVT_CALL(GetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_CALL(NpcJump0, NPC_PARTNER, LVar0, LVar1, LVar2, 10)
EVT_END_THREAD
EVT_WAIT(30)
EVT_CALL(GotoMap, EVT_PTR(N(dgb_00_name_hack)), 2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(80244804) = {
EVT_CALL(GetOwnerEncounterTrigger, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(1)
EVT_CASE_OR_EQ(2)
EVT_CASE_OR_EQ(4)
EVT_CASE_OR_EQ(6)
EVT_CALL(GetSelfAnimationFromTable, 7, LVar0)
EVT_EXEC_WAIT(EVS_NpcHitRecoil)
EVT_END_CASE_GROUP
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(80244890) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(DoNpcDefeat)
EVT_CASE_EQ(1)
EVT_CASE_EQ(2)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
NpcSettings N(npcSettings_802448F4) = {
.height = 38,
.radius = 32,
.otherAI = &N(80244370),
.ai = &N(npcAI_802443DC),
.level = 99,
};
StaticNpc N(npcGroup_80244920)[] = {
{
.id = NPC_WORLD_CLUBBA0,
.settings = &N(npcSettings_8024418C),
.pos = { -350.0f, 0.0f, 180.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 5,
.itemDrops = {
{ ITEM_SUPER_SHROOM, 10, 0 },
},
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 2,
.maxCoinBonus = 3,
},
.territory = { .temp = { -350, 0, 180, 40, 0, -32767, 0, 0, 0, 50, 600, 250, 1, 1 }},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
.extraAnimations = N(extraAnimationList_802440BC),
},
{
.id = NPC_WORLD_CLUBBA1,
.settings = &N(npcSettings_8024432C),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_800000,
.yaw = 0,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.extraAnimations = N(extraAnimationList_802440E4),
},
};
EvtScript N(init_80244D00) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, 3)
EVT_CALL(SetNpcPos, NPC_SELF, 240, 0, 88)
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(npcGroup_80244D6C)[] = {
{
.id = NPC_WORLD_CLUBBA2,
.settings = &N(npcSettings_80244258),
.pos = { 310.0f, 0.0f, 88.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(init_80244D00),
.yaw = 270,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.itemDropChance = 5,
.itemDrops = {
{ ITEM_SUPER_SHROOM, 10, 0 },
},
.heartDrops = STANDARD_HEART_DROPS(3),
.flowerDrops = STANDARD_FLOWER_DROPS(2),
.minCoinBonus = 2,
.maxCoinBonus = 3,
},
.territory = { .temp = { 310, 0, 88, 40, 0, -32767, 0, 0, 0, 50, 600, 250, 1, 1 }},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
.extraAnimations = N(extraAnimationList_802440BC),
},
{
.id = NPC_WORLD_CLUBBA3,
.settings = &N(npcSettings_8024432C),
.pos = { 0.0f, -1000.0f, 0.0f },
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_800000,
.yaw = 0,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim03,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim04,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim0C,
ANIM_WorldClubba_Anim11,
ANIM_WorldClubba_Anim12,
ANIM_WorldClubba_Anim07,
ANIM_WorldClubba_Anim08,
ANIM_WorldClubba_Anim01,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
ANIM_WorldClubba_Anim02,
},
.extraAnimations = N(extraAnimationList_802440E4),
},
};
StaticNpc N(npcGroup_8024514C) = {
.id = NPC_SENTINEL,
.settings = &N(npcSettings_802448F4),
.pos = { -20.0f, 100.0f, 180.0f },
.flags = ENEMY_FLAGS_400,
.yaw = 90,
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.territory = { .temp = { -20, 100, 180, 40, 0, -32767, 0, -20, 100, 180, 250, 0, 0, 1 }},
.animations = {
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim02,
ANIM_Sentinel_Anim03,
ANIM_Sentinel_Anim03,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim05,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim08,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
ANIM_Sentinel_Anim01,
},
};
NpcGroupList N(npcGroupList_8024533C) = {
NPC_GROUP(N(npcGroup_80244920), 0x0F03, 0x00),
NPC_GROUP(N(npcGroup_80244D6C), 0x0F01, 0x00),
NPC_GROUP(N(npcGroup_8024514C)),
{},
};
#include "world/common/enemy/ai/WanderMeleeAI.inc.c"
#include "world/common/enemy/ai/ClubbaNappingAI.inc.c"
#define AI_SENTINEL_FIRST_NPC 0
#define AI_SENTINEL_LAST_NPC 0
#include "world/common/enemy/ai/SentinelAI.inc.c"
const char N(dgb_00_name_hack)[] = "dgb_00";

View File

@ -2,17 +2,24 @@
/// @brief Tubba's Castle - West Hall (2F)
#include "common.h"
#include "../dgb.h"
#include "message_ids.h"
#include "map.h"
#include "../dgb.h"
#include "mapfs/dgb_09_shape.h"
#include "mapfs/dgb_09_hit.h"
enum {
NPC_Clubba_Wander = 0,
NPC_Clubba_Wander_Hitbox = 1,
NPC_Clubba_Napping = 2,
NPC_Clubba_Napping_Hitbox = 3,
NPC_Sentinel = 4,
};
#define NAMESPACE dgb_09
ApiStatus N(WanderMeleeAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(ClubbaNappingAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(SentinelAI_Main)(Evt* script, s32 isInitialCall);
ApiStatus N(MeleeHitbox_Main)(Evt *script, s32 isInitialCall);
extern NpcGroupList N(npcGroupList_8024533C);
extern EvtScript N(80243F6C);
extern EvtScript N(main);
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_SetupBreakable);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,15 @@
#include "dgb_09.h"
EntryList N(Entrances) = {
[dgb_09_ENTRY_0] { -567.0, 0.0, 180.0, 90.0 },
[dgb_09_ENTRY_1] { 567.0, 0.0, 180.0, 270.0 },
[dgb_09_ENTRY_2] { -450.0, 0.0, 90.0, 180.0 },
[dgb_09_ENTRY_3] { 300.0, 0.0, 90.0, 180.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.tattle = { MSG_MapTattle_dgb_09 },
};

View File

@ -0,0 +1,14 @@
#include "dgb_09.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH3_TUBBA_WOKE_UP)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
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_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,104 @@
#include "dgb_09.h"
EvtScript N(exitDoubleDoor_80243920) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_09_ENTRY_0)
EVT_SET(LVar1, COLLIDER_deilittw)
EVT_SET(LVar2, MODEL_o30)
EVT_SET(LVar3, MODEL_o31)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_03"), dgb_03_ENTRY_4)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitDoubleDoor_802439D4) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar0, dgb_09_ENTRY_1)
EVT_SET(LVar1, COLLIDER_deilitte)
EVT_SET(LVar2, MODEL_o102)
EVT_SET(LVar3, MODEL_o101)
EVT_EXEC(ExitDoubleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_01"), dgb_01_ENTRY_3)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitSingleDoor_80243A88) = {
EVT_SET_GROUP(EVT_GROUP_1B)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar0, dgb_09_ENTRY_2)
EVT_SET(LVar1, COLLIDER_deilittnw)
EVT_SET(LVar2, MODEL_o76)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC(ExitSingleDoor)
EVT_WAIT(17)
EVT_CALL(GotoMap, EVT_PTR("dgb_12"), dgb_12_ENTRY_0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(exitWalk_80243B3C) = EVT_EXIT_WALK(40, dgb_09_ENTRY_3, "dgb_10", dgb_10_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(exitWalk_80243B3C)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(enterWalk_80243BC4) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(dgb_09_ENTRY_0)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar2, MODEL_o30)
EVT_SET(LVar3, MODEL_o31)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(dgb_09_ENTRY_1)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_CREAKY)
EVT_SET(LVar2, MODEL_o102)
EVT_SET(LVar3, MODEL_o101)
EVT_EXEC_WAIT(EnterDoubleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(dgb_09_ENTRY_2)
EVT_CALL(UseDoorSounds, DOOR_SOUNDS_BASIC)
EVT_SET(LVar2, MODEL_o76)
EVT_SET(LVar3, DOOR_SWING_OUT)
EVT_EXEC_WAIT(EnterSingleDoor)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(dgb_09_ENTRY_3)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_TUBBAS_MANOR)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_IF_LT(GB_StoryProgress, STORY_CH3_STAR_SPIRIT_RESCUED)
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
EVT_END_IF
EVT_EXEC(N(EVS_SetupBreakable))
EVT_BIND_TRIGGER(EVT_PTR(N(exitDoubleDoor_80243920)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(exitDoubleDoor_802439D4)), TRIGGER_WALL_PRESS_A, COLLIDER_deilitte, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(exitSingleDoor_80243A88)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittnw, 1, 0)
EVT_EXEC(N(EVS_SetupMusic))
EVT_EXEC(N(enterWalk_80243BC4))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,37 @@
#include "dgb_09.h"
#include "effects.h"
BombTrigger N(BombPos_Wall) = {
.pos = { 300.0f, 0.0f, 88.0f },
.radius = 0.0f
};
EvtScript N(EVS_BlastWall) = {
EVT_WAIT(2)
EVT_PLAY_EFFECT(EFFECT_BOMBETTE_BREAKING, 1, 25, 3, 1, 10, 30)
EVT_LOOP(10)
EVT_CALL(EnableModel, MODEL_g29, FALSE)
EVT_CALL(EnableModel, MODEL_g28, TRUE)
EVT_WAIT(1)
EVT_CALL(EnableModel, MODEL_g29, TRUE)
EVT_CALL(EnableModel, MODEL_g28, FALSE)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(GF_DGB09_BombedWall, TRUE)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupBreakable) = {
EVT_IF_EQ(GF_DGB09_BombedWall, FALSE)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_BlastWall)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Wall)), 1, 0)
EVT_CALL(EnableModel, MODEL_g29, FALSE)
EVT_ELSE
EVT_CALL(EnableModel, MODEL_g28, FALSE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittne, COLLIDER_FLAGS_UPPER_MASK)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,103 @@
#include "dgb_09.h"
#define INCLUDE_CLUBBA_WANDER
#define INCLUDE_CLUBBA_NAPPING
#include "world/common/enemy/complete/Clubba_Multi.inc.c"
#define AI_SENTINEL_FIRST_NPC NPC_Sentinel
#define AI_SENTINEL_LAST_NPC NPC_Sentinel
#include "world/common/enemy/complete/Sentinel.inc.c"
StaticNpc N(NpcData_Clubba_Wander)[] = {
{
.id = NPC_Clubba_Wander,
.settings = &N(NpcSettings_Clubba_Wander),
.pos = { -350.0f, 0.0f, 180.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -350, 0, 180 },
.wanderSize = { 40 },
.detectShape = SHAPE_RECT,
.detectPos = { 0, 0, 50 },
.detectSize = { 600, 250 },
}
},
.animations = CLUBBA_ANIMS,
.extraAnimations = N(ExtraAnims_Clubba),
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_Wander_Hitbox),
};
EvtScript N(EVS_NpcInit_Clubba_Napping) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, dgb_09_ENTRY_3)
EVT_CALL(SetNpcPos, NPC_SELF, 240, 0, 88)
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Clubba_Napping)[] = {
{
.id = NPC_Clubba_Napping,
.settings = &N(NpcSettings_Clubba_Napping),
.pos = { 310.0f, 0.0f, 88.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Clubba_Napping),
.drops = CLUBBA_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 310, 0, 88 },
.wanderSize = { 40 },
.detectShape = SHAPE_RECT,
.detectPos = { 0, 0, 50 },
.detectSize = { 600, 250 },
}
},
.animations = CLUBBA_ANIMS,
.extraAnimations = N(ExtraAnims_Clubba),
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
},
CLUBBA_MACE_HITBOX(NPC_Clubba_Napping_Hitbox),
};
StaticNpc N(NpcData_Sentinel) = {
.id = NPC_Sentinel,
.settings = &N(NpcSettings_Sentinel),
.pos = { -20.0f, 100.0f, 180.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400,
.drops = SENTINEL_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -20, 100, 180 },
.wanderSize = { 40 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -20, 100, 180 },
.detectSize = { 250 },
}
},
.animations = SENTINEL_ANIMS,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Clubba_Wander), BTL_DGB_FORMATION_03, BTL_DGB_STAGE_00),
NPC_GROUP(N(NpcData_Clubba_Napping), BTL_DGB_FORMATION_01, BTL_DGB_STAGE_00),
NPC_GROUP(N(NpcData_Sentinel)),
{}
};

View File

@ -1,344 +0,0 @@
#include "dgb_10.h"
#include "message_ids.h"
#include "entity.h"
EntryList N(entryList) = {
{ 300.0f, 0.0f, -50.0f, 0.0f },
{ 375.0f, 0.0f, -240.0f, 0.0f },
};
MapSettings N(settings) = {
.main = &N(main),
.entryList = &N(entryList),
.entryCount = ENTRY_COUNT(N(entryList)),
.tattle = { MSG_MapTattle_dgb_10 },
};
EvtScript N(80240250) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(-29)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_CASE_LT(-16)
EVT_CALL(SetMusicTrack, 0, SONG_TUBBA_ESCAPE, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_TUBBAS_MANOR, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
static s32 N(pad_2E8)[] = {
0x00000000, 0x00000000,
};
EvtScript N(exitWalk_802402F0) = EVT_EXIT_WALK(40, 0, "dgb_09", 3);
EvtScript N(8024034C) = {
EVT_BIND_TRIGGER(N(exitWalk_802402F0), TRIGGER_FLOOR_ABOVE, 8, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(enterWalk_80240378) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SET(LVar0, EVT_PTR(N(8024034C)))
EVT_EXEC(EnterWalk)
EVT_WAIT(1)
EVT_CASE_EQ(1)
EVT_CALL(UseSettingsFrom, 0, 375, 0, -188)
EVT_CALL(SetPanTarget, 0, 375, 0, -188)
EVT_CALL(SetCamSpeed, 0, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, 0, 0, 1)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(SetPlayerActionState, 3)
EVT_WAIT(1)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7))
EVT_CALL(PlayerJump, 375, 0, -188, 20)
EVT_CALL(PanToTarget, 0, 0, 0)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(SetPlayerActionState, 0)
EVT_EXEC(N(8024034C))
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(main) = {
EVT_SET(GB_WorldLocation, 15)
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_EXEC_WAIT(N(makeEntities))
EVT_EXEC(N(80240E68))
EVT_EXEC(N(80240250))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 9, 0x7FFFFE00)
EVT_CALL(EnableModel, 6, 0)
EVT_CALL(EnableModel, 12, 0)
EVT_CALL(EnableModel, 18, 0)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 12, 0x7FFFFE00)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 13, 0x7FFFFE00)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, 14, 0x7FFFFE00)
EVT_EXEC(N(enterWalk_80240378))
EVT_RETURN
EVT_END
};
static s32 N(pad_66C) = {
0x00000000,
};
EvtScript N(80240670) = {
EVT_USE_BUF(LVar0)
EVT_MALLOC_ARRAY(6, LVarA)
EVT_BUF_READ1(LVar0)
EVT_SET(ArrayVar(0), LVar0)
EVT_BUF_READ1(LVar0)
EVT_SET(ArrayVar(1), LVar0)
EVT_BUF_READ1(LVar0)
EVT_SET(ArrayVar(2), LVar0)
EVT_BUF_READ1(LVar0)
EVT_SET(ArrayVar(3), LVar0)
EVT_BUF_READ1(LVar0)
EVT_SET(ArrayVar(4), LVar0)
EVT_BUF_READ1(LVar0)
EVT_SET(ArrayVar(5), LVar0)
EVT_SET(LVar0, LVarA)
EVT_BIND_TRIGGER(N(80240770), TRIGGER_FLOOR_TOUCH, ArrayVar(0), 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(80240770) = {
EVT_USE_ARRAY(LVar0)
EVT_CALL(N(func_80240000_C4C390))
EVT_IF_EQ(LVar0, 0)
EVT_RETURN
EVT_END_IF
EVT_LOOP(5)
EVT_CALL(ModifyColliderFlags, 1, ArrayVar(0), 0x7FFFFE00)
EVT_CALL(EnableModel, ArrayVar(1), 1)
EVT_WAIT(1)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, ArrayVar(0), 0x7FFFFE00)
EVT_CALL(EnableModel, ArrayVar(1), 0)
EVT_WAIT(1)
EVT_END_LOOP
EVT_IF_NE(ArrayVar(5), 0)
EVT_EXEC_WAIT(ArrayVar(5))
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(80240860) = {
EVT_USE_BUF(LVar0)
EVT_MALLOC_ARRAY(6, LVar9)
EVT_BUF_READ1(LVar1)
EVT_SET(ArrayVar(0), LVar1)
EVT_BUF_READ1(LVar1)
EVT_SET(ArrayVar(1), LVar1)
EVT_BUF_READ1(LVar1)
EVT_SET(ArrayVar(2), LVar1)
EVT_BUF_READ1(LVar1)
EVT_SET(ArrayVar(3), LVar1)
EVT_BUF_READ1(LVar1)
EVT_SET(ArrayVar(4), LVar1)
EVT_BUF_READ1(LVar1)
EVT_SET(ArrayVar(5), LVar1)
EVT_CALL(ParentColliderToModel, ArrayVar(1), ArrayVar(0))
EVT_LABEL(0)
EVT_LABEL(1)
EVT_CALL(GetPlayerActionState, LVarA)
EVT_IF_EQ(LVarA, 13)
EVT_GOTO(2)
EVT_END_IF
EVT_IF_EQ(LVarA, 15)
EVT_GOTO(2)
EVT_END_IF
EVT_WAIT(1)
EVT_GOTO(0)
EVT_LABEL(2)
EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_NE(LVar2, ArrayVar(3))
EVT_GOTO(2)
EVT_END_IF
EVT_CALL(N(UnkDistFunc2))
EVT_IF_EQ(LVar0, 1)
EVT_EXEC_WAIT(N(80240AF4))
EVT_END_IF
EVT_IF_EQ(LVar0, 2)
EVT_EXEC_WAIT(N(80240CB8))
EVT_END_IF
EVT_LABEL(3)
EVT_CALL(GetPlayerActionState, LVar0)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 13)
EVT_GOTO(3)
EVT_END_IF
EVT_IF_EQ(LVar0, 15)
EVT_GOTO(3)
EVT_END_IF
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(80240AF4) = {
EVT_USE_ARRAY(LVar9)
EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4)
EVT_CALL(MakeLerp, 0, 5, 3, 1)
EVT_LABEL(2)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, ArrayVar(0), 0, LVar0, 0)
EVT_SET(LVar5, LVar3)
EVT_ADD(LVar5, LVar0)
EVT_CALL(SetPlayerPos, LVar2, LVar5, LVar4)
EVT_CALL(UpdateColliderTransform, ArrayVar(1))
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(2)
EVT_END_IF
EVT_CALL(MakeLerp, 5, 0, 3, 1)
EVT_LABEL(3)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, ArrayVar(0), 0, LVar0, 0)
EVT_SET(LVar5, LVar3)
EVT_ADD(LVar5, LVar0)
EVT_CALL(SetPlayerPos, LVar2, LVar5, LVar4)
EVT_CALL(UpdateColliderTransform, ArrayVar(1))
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(3)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(80240CB8) = {
EVT_USE_ARRAY(LVar9)
EVT_CALL(MakeItemEntity, ArrayVar(5), ArrayVar(2), ArrayVar(3), ArrayVar(4), 3, 0)
EVT_SET(LVar2, 0)
EVT_CALL(MakeLerp, 0, 150, 19, 4)
EVT_LABEL(2)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, ArrayVar(0), 0, LVar0, 0)
EVT_ADD(LVar2, 45)
EVT_CALL(RotateModel, ArrayVar(0), LVar2, 1, 0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(2)
EVT_END_IF
EVT_CALL(MakeLerp, 150, 0, 19, 4)
EVT_LABEL(3)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, ArrayVar(0), 0, LVar0, 0)
EVT_ADD(LVar2, 45)
EVT_CALL(RotateModel, ArrayVar(0), LVar2, 1, 0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 1)
EVT_GOTO(3)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(80240E68) = {
EVT_CALL(N(func_8024013C_C4C4CC))
EVT_CALL(func_802CA988, 0, LVar2, LVar3, LVar4, LVar5)
EVT_CALL(N(func_802401C0_C4C550))
EVT_CALL(InterruptUsePartner)
EVT_CALL(GotoMap, EVT_PTR("dgb_11"), LVar0)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
static s32 N(pad_EDC) = {
0x00000000,
};
EvtScript N(80240EE0) = {
EVT_SET(GF_DGB10_BoardedFloor1, 1)
EVT_RETURN
EVT_END
};
EvtScript N(80240F00) = {
EVT_SET(GF_DGB10_BoardedFloor2, 1)
EVT_RETURN
EVT_END
};
EvtScript N(80240F20) = {
EVT_SET(GF_DGB10_BoardedFloor3, 1)
EVT_RETURN
EVT_END
};
EvtScript N(makeEntities) = {
EVT_IF_EQ(GF_DGB10_BoardedFloor1, 0)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 500, 0, -100, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(80240EE0)))
EVT_END_IF
EVT_IF_EQ(GF_DGB10_BoardedFloor2, 0)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 500, 0, -250, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(80240F00)))
EVT_END_IF
EVT_IF_EQ(GF_DGB10_BoardedFloor3, 0)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BoardedFloor), 375, 0, -250, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(80240F20)))
EVT_END_IF
EVT_RETURN
EVT_END
};
ApiStatus N(func_80240000_C4C390)(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus;
s32* array = script->array;
f32 distance = dist2D(playerStatus->position.x, playerStatus->position.z, array[2], array[3]);
script->varTable[0] = 1;
if ((playerStatus->actionState != 14) && (playerStatus->actionState != 16)) {
script->varTable[0] = 0;
}
if (script->array[4] <= distance) {
script->varTable[0] = 0;
}
return ApiStatus_DONE2;
}
#include "world/common/todo/UnkDistFunc2.inc.c"
ApiStatus N(func_8024013C_C4C4CC)(Evt* script, s32 isInitialCall) {
PlayerStatus* playerStatus = &gPlayerStatus;
s32 var;
if (playerStatus->position.y >= 0.0f) {
return 0;
}
if (playerStatus->position.x < 440.0f) {
var = 3;
} else if (playerStatus->position.z < -170.0f) {
var = 2;
} else {
var = 1;
}
script->varTable[0] = var;
return ApiStatus_DONE2;
}
ApiStatus N(func_802401C0_C4C550)(Evt* script, s32 isInitialCall) {
if (gPlayerStatus.position.y > -60.0f) {
return ApiStatus_BLOCK;
}
return ApiStatus_DONE2;
}

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