dead maps (#871)

* dead flo_00

* dead flo_03

* dead flo_07

* dead flo_08

* dead flo_09

* dead flo_10

* dead flo_11

* dead flo_12

* dead flo_13

* dead flo_14 flo_15

* dead flo_16

* dead flo_17 flo_18

* dead flo_19 unused

* kzn maps and PR comments
This commit is contained in:
Unnunu 2022-11-26 16:14:03 +03:00 committed by GitHub
parent 0c9c8e8137
commit 30f8879ddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
265 changed files with 17550 additions and 5219 deletions

View File

@ -124,5 +124,219 @@
#define queue_render_task dead_queue_render_task #define queue_render_task dead_queue_render_task
#define dma_copy dead_dma_copy #define dma_copy dead_dma_copy
#define create_worker_world dead_create_worker_world #define create_worker_world dead_create_worker_world
#define GetEntryID dead_GetEntryID
#define SetMusicTrack dead_SetMusicTrack
#define FadeInMusic dead_FadeInMusic
#define RandInt dead_RandInt
#define PlayEffect dead_PlayEffect
#define DisablePlayerInput dead_DisablePlayerInput
#define ModifyColliderFlags dead_ModifyColliderFlags
#define PlayerMoveTo dead_PlayerMoveTo
#define InterpPlayerYaw dead_InterpPlayerYaw
#define PlaySoundAtCollider dead_PlaySoundAtCollider
#define MakeLerp dead_MakeLerp
#define UpdateLerp dead_UpdateLerp
#define RotateGroup dead_RotateGroup
#define func_802D2C14 dead_func_802D2C14
#define GotoMap dead_GotoMap
#define UseExitHeading dead_UseExitHeading
#define ExitWalk dead_ExitWalk
#define GetLoadType dead_GetLoadType
#define EnterSavePoint dead_EnterSavePoint
#define EnterWalk dead_EnterWalk
#define SetSpriteShading dead_SetSpriteShading
#define SetCamLeadPlayer dead_SetCamLeadPlayer
#define SetCamPerspective dead_SetCamPerspective
#define SetCamBGColor dead_SetCamBGColor
#define SetCamEnabled dead_SetCamEnabled
#define MakeNpcs dead_MakeNpcs
#define ParentColliderToModel dead_ParentColliderToModel
#define EnableTexPanning dead_EnableTexPanning
#define SetTexPanOffset dead_SetTexPanOffset
#define DisablePlayerPhysics dead_DisablePlayerPhysics
#define UseSettingsFrom dead_UseSettingsFrom
#define SetPanTarget dead_SetPanTarget
#define SetCamDistance dead_SetCamDistance
#define SetCamPitch dead_SetCamPitch
#define SetCamPosA dead_SetCamPosA
#define SetCamPosB dead_SetCamPosB
#define SetCamSpeed dead_SetCamSpeed
#define PanToTarget dead_PanToTarget
#define WaitForCam dead_WaitForCam
#define ShowMessageAtWorldPos dead_ShowMessageAtWorldPos
#define ShowMessageAtScreenPos dead_ShowMessageAtScreenPos
#define GetPlayerPos dead_GetPlayerPos
#define SetPlayerJumpscale dead_SetPlayerJumpscale
#define PlayerJump1 dead_PlayerJump1
#define DisablePartnerAI dead_DisablePartnerAI
#define InterpNpcYaw dead_InterpNpcYaw
#define SpeakToPlayer dead_SpeakToPlayer
#define SetPlayerAnimation dead_SetPlayerAnimation
#define ContinueSpeech dead_ContinueSpeech
#define EnablePartnerAI dead_EnablePartnerAI
#define ResetCam dead_ResetCam
#define GetPlayerActionState dead_GetPlayerActionState
#define ShowChoice dead_ShowChoice
#define SwitchMessage dead_SwitchMessage
#define CloseMessage dead_CloseMessage
#define EndSpeech dead_EndSpeech
#define SetNpcPos dead_SetNpcPos
#define AdjustCam dead_AdjustCam
#define EnableGroup dead_EnableGroup
#define SetNpcFlagBits dead_SetNpcFlagBits
#define BindNpcInteract dead_BindNpcInteract
#define EnableNpcShadow dead_EnableNpcShadow
#define SetNpcCollisionSize dead_SetNpcCollisionSize
#define GetNpcPos dead_GetNpcPos
#define func_802CF56C dead_func_802CF56C
#define PlayerFaceNpc dead_PlayerFaceNpc
#define NpcFaceNpc dead_NpcFaceNpc
#define SetNpcAnimation dead_SetNpcAnimation
#define PlaySoundAtNpc dead_PlaySoundAtNpc
#define BindNpcIdle dead_BindNpcIdle
#define WaitForPlayerInputEnabled dead_WaitForPlayerInputEnabled
#define SetNpcRotation dead_SetNpcRotation
#define EnableNpcAI dead_EnableNpcAI
#define PlaySoundAtPlayer dead_PlaySoundAtPlayer
#define GetCurrentPartnerID dead_GetCurrentPartnerID
#define SetPlayerPos dead_SetPlayerPos
#define RotateModel dead_RotateModel
#define TranslateModel dead_TranslateModel
#define NpcFlyTo dead_NpcFlyTo
#define FadeOutMusic dead_FadeOutMusic
#define SetNpcYaw dead_SetNpcYaw
#define ScaleGroup dead_ScaleGroup
#define ScaleModel dead_ScaleModel
#define UpdateColliderTransform dead_UpdateColliderTransform
#define TranslateGroup dead_TranslateGroup
#define InterruptUsePartner dead_InterruptUsePartner
#define SetNpcJumpscale dead_SetNpcJumpscale
#define SetPlayerActionState dead_SetPlayerActionState
#define NpcJump0 dead_NpcJump0
#define PlaySound dead_PlaySound
#define ClearPartnerMoveHistory dead_ClearPartnerMoveHistory
#define PlayerJump dead_PlayerJump
#define StopSound dead_StopSound
#define NpcFacePlayer dead_NpcFacePlayer
#define func_802D2884 dead_func_802D2884
#define SetTimeFreezeMode dead_SetTimeFreezeMode
#define ShowKeyChoicePopup dead_ShowKeyChoicePopup
#define CloseChoicePopup dead_CloseChoicePopup
#define AwaitPlayerLeave dead_AwaitPlayerLeave
#define RemoveKeyItemAt dead_RemoveKeyItemAt
#define MakeItemEntity dead_MakeItemEntity
#define RemoveItemEntity dead_RemoveItemEntity
#define IsPlayerWithin dead_IsPlayerWithin
#define IsPlayerOnValidFloor dead_IsPlayerOnValidFloor
#define GetCurrentPartner dead_GetCurrentPartner
#define MakeEntity dead_MakeEntity
#define Entity_SavePoint dead_Entity_SavePoint
#define PopSong dead_PopSong
#define PushSong dead_PushSong
#define ShowGotItem dead_ShowGotItem
#define GetBattleOutcome dead_GetBattleOutcome
#define DoNpcDefeat dead_DoNpcDefeat
#define SetCamProperties dead_SetCamProperties
#define ShowEmote dead_ShowEmote
#define SetEnemyFlagBits dead_SetEnemyFlagBits
#define AddKeyItem dead_AddKeyItem
#define BindNpcDefeat dead_BindNpcDefeat
#define BindNpcAI dead_BindNpcAI
#define GetSelfNpcID dead_GetSelfNpcID
#define GetOwnerEncounterTrigger dead_GetOwnerEncounterTrigger
#define SetSelfEnemyFlagBits dead_SetSelfEnemyFlagBits
#define BindNpcHit dead_BindNpcHit
#define PlaySoundAtModel dead_PlaySoundAtModel
#define DropItemEntity dead_DropItemEntity
#define GetValueByRef dead_GetValueByRef
#define SetValueByRef dead_SetValueByRef
#define AssignPanelFlag dead_AssignPanelFlag
#define Entity_HiddenPanel dead_Entity_HiddenPanel
#define ShakeCam dead_ShakeCam
#define func_802D62E4 dead_func_802D62E4
#define IsStartingConversation dead_IsStartingConversation
#define ModifyGlobalOverrideFlags dead_ModifyGlobalOverrideFlags
#define FindKeyItem dead_FindKeyItem
#define Entity_SuperBlock dead_Entity_SuperBlock
#define AssignBlockFlag dead_AssignBlockFlag
#define AssignScript dead_AssignScript
#define ResetFromLava dead_ResetFromLava
#define EnemyNpcHit dead_EnemyNpcHit
#define EnemyNpcDefeat dead_EnemyNpcDefeat
#define BasicAI_Main dead_BasicAI_Main
#define ShowConsumableChoicePopup dead_ShowConsumableChoicePopup
#define RemoveItemAt dead_RemoveItemAt
#define GetAngleToPlayer dead_GetAngleToPlayer
#define GetNpcPointer dead_GetNpcPointer
#define RemoveNpc dead_RemoveNpc
#define EnableModel dead_EnableModel
#define PlaySoundAt dead_PlaySoundAt
#define GetModelCenter dead_GetModelCenter
#define SetSelfVar dead_SetSelfVar
#define GetSelfVar dead_GetSelfVar
#define GetPlayerTargetYaw dead_GetPlayerTargetYaw
#define HidePlayerShadow dead_HidePlayerShadow
#define func_802D286C dead_func_802D286C
#define func_802D2520 dead_func_802D2520
#define SetPlayerFlagBits dead_SetPlayerFlagBits
#define func_80044238 dead_func_80044238
#define SetCamType dead_SetCamType
#define SetCamPosC dead_SetCamPosC
#define SetNpcVar dead_SetNpcVar
#define StartBossBattle dead_StartBossBattle
#define Entity_MulticoinBlock dead_Entity_MulticoinBlock
#define Entity_BombableRock dead_Entity_BombableRock
#define OnPlayerFled dead_OnPlayerFled
#define GetAngleBetweenNPCs dead_GetAngleBetweenNPCs
#define AwaitPlayerApproach dead_AwaitPlayerApproach
#define BringPartnerOut dead_BringPartnerOut
#define PutPartnerAway dead_PutPartnerAway
#define SetNpcSpeed dead_SetNpcSpeed
#define NpcMoveTo dead_NpcMoveTo
#define SetCamTarget dead_SetCamTarget
#define CloneModel dead_CloneModel
#define MakeLocalVertexCopy dead_MakeLocalVertexCopy
#define SetModelCustomGfx dead_SetModelCustomGfx
#define SetCustomGfxBuilders dead_SetCustomGfxBuilders
#define FindItem dead_FindItem
#define func_802CDE68 dead_func_802CDE68
#define SetNpcPaletteSwapMode dead_SetNpcPaletteSwapMode
#define SetNpcPaletteSwapping dead_SetNpcPaletteSwapping
#define BindNpcAux dead_BindNpcAux
#define Entity_ScriptSpring dead_Entity_ScriptSpring
#define Entity_HiddenYellowBlock dead_Entity_HiddenYellowBlock
#define GetNpcYaw dead_GetNpcYaw
#define PlayAmbientSounds dead_PlayAmbientSounds
#define SetTexPanner dead_SetTexPanner
#define func_802D7B10 dead_func_802D7B10
#define Entity_Chest dead_Entity_Chest
#define snd_ambient_80055618 dead_snd_ambient_80055618
#define GetPlayerAnimation dead_GetPlayerAnimation
#define SetPlayerSpeed dead_SetPlayerSpeed
#define SetItemPos dead_SetItemPos
#define NpcJump1 dead_NpcJump1
#define SpeakToNpc dead_SpeakToNpc
#define AddStarPieces dead_AddStarPieces
#define Entity_Hammer3Block dead_Entity_Hammer3Block
#define CreatePushBlockGrid dead_CreatePushBlockGrid
#define SetPushBlock dead_SetPushBlock
#define GetSelfAnimationFromTable dead_GetSelfAnimationFromTable
#define EVS_NpcHitRecoil dead_EVS_NpcHitRecoil
#define SelfEnemyOverrideSyncPos dead_SelfEnemyOverrideSyncPos
#define func_802CFD30 dead_func_802CFD30
#define SetGroupEnabled dead_SetGroupEnabled
#define Entity_HeartBlock dead_Entity_HeartBlock
#define GetCamDistance dead_GetCamDistance
#define GetCamPitch dead_GetCamPitch
#define GotoMapSpecial dead_GotoMapSpecial
#define SetNpcAux dead_SetNpcAux
#define PlayModelAnimation dead_PlayModelAnimation
#define SetAnimatedModelRootPosition dead_SetAnimatedModelRootPosition
#define LoadAnimatedModel dead_LoadAnimatedModel
#define SetAnimatorFlags dead_SetAnimatorFlags
#define GetAnimatedPositionByTreeIndex dead_GetAnimatedPositionByTreeIndex
#define GetAnimatedRotationByTreeIndex dead_GetAnimatedRotationByTreeIndex
#define SetEncounterStatusFlags dead_SetEncounterStatusFlags
#define Entity_YellowBlock dead_Entity_YellowBlock
#endif #endif

View File

@ -97,8 +97,8 @@ enum {
EVT_OP_END_THREAD, EVT_OP_END_THREAD,
EVT_OP_CHILD_THREAD, ///< Parallel threads are killed as soon as the parent script returns. EVT_OP_CHILD_THREAD, ///< Parallel threads are killed as soon as the parent script returns.
EVT_OP_END_CHILD_THREAD, EVT_OP_END_CHILD_THREAD,
EVT_OP_90, EVT_OP_DEBUG_LOG,
EVT_OP_DEBUG_PRINT, ///< Args: expression EVT_OP_DEBUG_PRINT_VAR, ///< Args: expression
EVT_OP_92, EVT_OP_92,
EVT_OP_93, EVT_OP_93,
EVT_OP_94, EVT_OP_94,

View File

@ -568,6 +568,11 @@
/// The given arguments can be accessed from the API function using `thread->ptrReadPos`. /// The given arguments can be accessed from the API function using `thread->ptrReadPos`.
#define EVT_CALL(FUNC, ARGS...) EVT_CMD(EVT_OP_CALL, (Bytecode) FUNC, ##ARGS), #define EVT_CALL(FUNC, ARGS...) EVT_CMD(EVT_OP_CALL, (Bytecode) FUNC, ##ARGS),
/// Does nothing in release version
#define EVT_DEBUG_LOG(STRING) EVT_CMD(EVT_OP_DEBUG_LOG, STRING),
/// Prints variable name and value
#define EVT_DEBUG_PRINT_VAR(VAR) EVT_CMD(EVT_OP_DEBUG_PRINT_VAR, VAR),
/****** COMMON SCRIPTS ************************************************************************************************/ /****** COMMON SCRIPTS ************************************************************************************************/

View File

@ -1635,10 +1635,10 @@ s32 evt_execute_next_command(Evt* script) {
case EVT_OP_END_CHILD_THREAD: case EVT_OP_END_CHILD_THREAD:
status = evt_handle_end_child_thread(script); status = evt_handle_end_child_thread(script);
break; break;
case EVT_OP_90: case EVT_OP_DEBUG_LOG:
status = func_802C6E14(script); status = func_802C6E14(script);
break; break;
case EVT_OP_DEBUG_PRINT: case EVT_OP_DEBUG_PRINT_VAR:
status = evt_handle_print_debug_var(script); status = evt_handle_print_debug_var(script);
break; break;
case EVT_OP_92: case EVT_OP_92:

View File

@ -579,7 +579,7 @@ EvtScript N(8024517C) = {
EVT_CASE_OR_EQ(4) EVT_CASE_OR_EQ(4)
EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(6)
EVT_CALL(GetSelfAnimationFromTable, 7, LVar0) EVT_CALL(GetSelfAnimationFromTable, 7, LVar0)
EVT_EXEC_WAIT(0x800936DC) EVT_EXEC_WAIT(EVS_NpcHitRecoil)
EVT_END_CASE_GROUP EVT_END_CASE_GROUP
EVT_END_SWITCH EVT_END_SWITCH
EVT_RETURN EVT_RETURN

View File

@ -207,7 +207,7 @@ EvtScript N(80243A0C) = {
EVT_CASE_OR_EQ(4) EVT_CASE_OR_EQ(4)
EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(6)
EVT_CALL(GetSelfAnimationFromTable, 7, LVar0) EVT_CALL(GetSelfAnimationFromTable, 7, LVar0)
EVT_EXEC_WAIT(0x800936DC) EVT_EXEC_WAIT(EVS_NpcHitRecoil)
EVT_END_CASE_GROUP EVT_END_CASE_GROUP
EVT_END_SWITCH EVT_END_SWITCH
EVT_RETURN EVT_RETURN

View File

@ -357,7 +357,7 @@ EvtScript N(8024490C) = {
EVT_CASE_OR_EQ(4) EVT_CASE_OR_EQ(4)
EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(6)
EVT_CALL(GetSelfAnimationFromTable, 7, LVar0) EVT_CALL(GetSelfAnimationFromTable, 7, LVar0)
EVT_EXEC_WAIT(0x800936DC) EVT_EXEC_WAIT(EVS_NpcHitRecoil)
EVT_END_CASE_GROUP EVT_END_CASE_GROUP
EVT_END_SWITCH EVT_END_SWITCH
EVT_RETURN EVT_RETURN

View File

@ -409,7 +409,7 @@ EvtScript N(80244804) = {
EVT_CASE_OR_EQ(4) EVT_CASE_OR_EQ(4)
EVT_CASE_OR_EQ(6) EVT_CASE_OR_EQ(6)
EVT_CALL(GetSelfAnimationFromTable, 7, LVar0) EVT_CALL(GetSelfAnimationFromTable, 7, LVar0)
EVT_EXEC_WAIT(0x800936DC) EVT_EXEC_WAIT(EVS_NpcHitRecoil)
EVT_END_CASE_GROUP EVT_END_CASE_GROUP
EVT_END_SWITCH EVT_END_SWITCH
EVT_RETURN EVT_RETURN

View File

@ -401,17 +401,16 @@ API_CALLABLE(N(ShowMessagesBehindCurtains)) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
#ifdef NON_MATCHING
void func_80240DA4_9087D4(void) { void func_80240DA4_9087D4(void) {
s32 fullWidth = 226; s32 fullWidth = 226;
s32 fullHeight = 70; s32 fullHeight = 70;
s32 baseX = 47; s32 baseX = SCREEN_WIDTH / 2 - fullWidth / 2;
s32 baseY = 100; s32 baseY = 100;
EndChapter* data = evt_get_variable(NULL, MapVar(0)); EndChapter* data = (EndChapter*) evt_get_variable(NULL, MV_EndChapterDataPtr);
switch (D_802417C8_9091F8) { switch (D_802417C8_9091F8) {
case 0: case 0:
if (data->unk1E != 0) { if (data->unk1E) {
D_802417C8_9091F8 = 1; D_802417C8_9091F8 = 1;
} }
break; break;
@ -424,14 +423,12 @@ void func_80240DA4_9087D4(void) {
if (D_802417D0_909200 >= fullHeight) { if (D_802417D0_909200 >= fullHeight) {
D_802417D0_909200 = fullHeight; D_802417D0_909200 = fullHeight;
} }
if (D_802417CC_9091FC == fullWidth) { if (D_802417CC_9091FC == fullWidth && D_802417D0_909200 == fullHeight) {
if (D_802417D0_909200 == fullHeight) {
D_802417C8_9091F8 = 2; D_802417C8_9091F8 = 2;
} }
}
break; break;
case 2: case 2:
if (data->unk1E == 0) { if (!data->unk1E) {
D_802417C8_9091F8 = 3; D_802417C8_9091F8 = 3;
} }
break; break;
@ -444,38 +441,24 @@ void func_80240DA4_9087D4(void) {
if (D_802417D0_909200 < 0) { if (D_802417D0_909200 < 0) {
D_802417D0_909200 = 0; D_802417D0_909200 = 0;
} }
if (D_802417CC_9091FC == 0) { if (D_802417CC_9091FC == 0 && D_802417D0_909200 == 0) {
if (D_802417D0_909200 == 0) {
D_802417C8_9091F8 = 4; D_802417C8_9091F8 = 4;
} }
break; break;
}
break;
case 4: case 4:
break; break;
} }
if (D_802417CC_9091FC != 0 && D_802417D0_909200 != 0) { if (D_802417CC_9091FC != 0 && D_802417D0_909200 != 0) {
f32 ulx = baseX + (fullWidth * 0.5) - (D_802417CC_9091FC * 0.5); f64 ulx = baseX + (fullWidth * 0.5) - (D_802417CC_9091FC * 0.5);
f32 uly = baseY + (fullHeight * 0.5) - (D_802417D0_909200 * 0.5); f64 uly = baseY + (fullHeight * 0.5) - (D_802417D0_909200 * 0.5);
f32 lrx = baseX + (fullWidth * 0.5) + (D_802417CC_9091FC * 0.5); f64 lrx = baseX + (fullWidth * 0.5) + (D_802417CC_9091FC * 0.5);
f32 lry = baseY + (fullHeight * 0.5) + (D_802417D0_909200 * 0.5); f64 lry = baseY + (fullHeight * 0.5) + (D_802417D0_909200 * 0.5);
gDPSetScissorFrac(gMasterGfxPos++, G_SC_NON_INTERLACE, gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, ulx, uly, lrx, lry);
ulx * 4.0f, draw_box(DRAW_FLAGS_CLIP, &D_802417D8_909208, ulx, uly, 0, D_802417CC_9091FC, D_802417D0_909200, 180, 0, 1.0f, 1.0f,
uly * 4.0f, // casting this to s8 is wrong, but fixes v0/v1 regalloc 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL);
lrx * 4.0f,
lry * 4.0f);
draw_box(4, &D_802417D8_909208,
baseX + (fullWidth * 0.5) - (D_802417CC_9091FC * 0.5),
baseY + (fullHeight * 0.5) - (D_802417D0_909200 * 0.5),
0, D_802417CC_9091FC, D_802417D0_909200,
180, 0, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, 320, 240, NULL);
} }
} }
#else
INCLUDE_ASM(s32, "world/area_kmr/kmr_23/kmr_23_2_npc", func_80240DA4_9087D4);
MAP_DATA_SECTION_START
#endif
EvtScript N(EVS_Scene_EndOfChapter) = { EvtScript N(EVS_Scene_EndOfChapter) = {
EVT_THREAD EVT_THREAD

View File

@ -23,6 +23,9 @@ MobileAISettings N(AISettings_Lakitu_SpinySpawner) = {
}; };
EvtScript N(EVS_NpcAI_Lakitu_SpinySpawner) = { EvtScript N(EVS_NpcAI_Lakitu_SpinySpawner) = {
#ifdef DEBUG_LAKITU
EVT_DEBUG_LOG(EVT_PTR("JUGEMU MOVE"))
#endif
EVT_CALL(SetSelfVar, 0, 0) EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(SetSelfVar, 5, -650) EVT_CALL(SetSelfVar, 5, -650)
EVT_CALL(SetSelfVar, 6, 30) EVT_CALL(SetSelfVar, 6, 30)
@ -61,6 +64,9 @@ EvtScript N(EVS_NpcAI_SpawnedSpiny) = {
EVT_CALL(SetSelfVar, 3, 18) EVT_CALL(SetSelfVar, 3, 18)
EVT_CALL(SetSelfVar, 5, 3) EVT_CALL(SetSelfVar, 5, 3)
EVT_CALL(SetSelfVar, 7, 4) EVT_CALL(SetSelfVar, 7, 4)
#ifdef DEBUG_LAKITU
EVT_DEBUG_LOG(EVT_PTR("TOGEZO TYPE1 : NORMAL MOVE"))
#endif
EVT_CALL(N(SpinyAI_Main), EVT_PTR(N(AISettings_SpawnedSpiny))) EVT_CALL(N(SpinyAI_Main), EVT_PTR(N(AISettings_SpawnedSpiny)))
EVT_RETURN EVT_RETURN
EVT_END EVT_END

View File

@ -1,6 +1,10 @@
#include "common.h" #include "common.h"
#include "npc.h" #include "npc.h"
#ifdef _DEAD_H_
void func_8004D8E0(DeadEnemy*);
#endif
s32 N(PiranhaPlantAI_Main)(Evt* script, s32 isInitialCall) { s32 N(PiranhaPlantAI_Main)(Evt* script, s32 isInitialCall) {
#ifdef _DEAD_H_ #ifdef _DEAD_H_
DeadEnemy* enemy = (DeadEnemy*)script->owner1.enemy; DeadEnemy* enemy = (DeadEnemy*)script->owner1.enemy;
@ -9,9 +13,15 @@ s32 N(PiranhaPlantAI_Main)(Evt* script, s32 isInitialCall) {
#endif #endif
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
#ifdef _DEAD_H_
MobileAISettings* npcAISettings = (MobileAISettings*)evt_get_variable(script, *args++);
EnemyDetectVolume territory;
EnemyDetectVolume* territoryPtr = &territory;
#else
EnemyDetectVolume territory; EnemyDetectVolume territory;
EnemyDetectVolume* territoryPtr = &territory; EnemyDetectVolume* territoryPtr = &territory;
MobileAISettings* npcAISettings = (MobileAISettings*)evt_get_variable(script, *args++); MobileAISettings* npcAISettings = (MobileAISettings*)evt_get_variable(script, *args++);
#endif
territory.skipPlayerDetectChance = 0; territory.skipPlayerDetectChance = 0;
territory.shape = enemy->territory->wander.detectShape; territory.shape = enemy->territory->wander.detectShape;
@ -25,6 +35,7 @@ s32 N(PiranhaPlantAI_Main)(Evt* script, s32 isInitialCall) {
#ifdef _DEAD_H_ #ifdef _DEAD_H_
// Dead Func that doesn't seem to have an alive counterpart, probably because of the // Dead Func that doesn't seem to have an alive counterpart, probably because of the
// difference in the Enemy and DeadEnemy struct. // difference in the Enemy and DeadEnemy struct.
func_8004D8E0(enemy); func_8004D8E0(enemy);
if (enemy->flags & ENEMY_FLAGS_100000) { if (enemy->flags & ENEMY_FLAGS_100000) {
enemy->unk_114 = 10.0f; enemy->unk_114 = 10.0f;

View File

@ -0,0 +1,62 @@
#ifndef _WORLD_DEAD_AREA_FLO_FLO_H_
#define _WORLD_DEAD_AREA_FLO_FLO_H_
enum {
AB_FLO_TolielupDialogue = AreaByte(0),
AB_FLO_PetuniaDialogue = AreaByte(1),
AB_FLO_CrystalTreeHitCount = AreaByte(2),
AB_FLO_PoiseKickedOutCount = AreaByte(3),
AB_FLO_TreePuzzle_FirstCorrect = AreaByte(4),
AB_FLO_TreePuzzle_SecondCorrect = AreaByte(5),
AB_FLO_GuardLakituTalkCount = AreaByte(6),
AB_FLO_GuardedMachineHitCount = AreaByte(7),
};
enum {
// flo_07
AF_FLO_PoiseHintDialogue = AreaFlag(5),
AF_FLO_MadeCrystalBerry = AreaFlag(6),
// flo_00
AF_FLO_BeanstalkFacingRight = AreaFlag(16),
AF_FLO_PlatingInstructionsToggle = AreaFlag(17),
AF_FLO_PinkBubulbDialogueToggle = AreaFlag(18),
AF_FLO_PurpleBubulbDialogueToggle = AreaFlag(19),
AF_FLO_GreenBubulbDialogueToggle = AreaFlag(20),
AF_FLO_YellowBubulbDialogueToggle = AreaFlag(21),
// flo_12
AF_FLO_GivenCrystalBerry = AreaFlag(22),
// flo_03
AF_FLO_IsUnderground_Mole_01 = AreaFlag(23),
AF_FLO_IsUnderground_Mole_02 = AreaFlag(24),
AF_FLO_IsUnderground_Mole_03 = AreaFlag(25),
AF_FLO_IsUnderground_Mole_04 = AreaFlag(26),
AF_FLO_TreeDrop_RedBerry1 = AreaFlag(27),
AF_FLO_TreeDrop_RedBerry2 = AreaFlag(28),
// flo_08
AF_FLO_TreeDrop_BlueBerry1 = AreaFlag(29),
AF_FLO_TreeDrop_BlueBerry2 = AreaFlag(30),
// flo_24
AF_FLO_TreeDrop_BubbleBerry1 = AreaFlag(31),
AF_FLO_TreeDrop_BubbleBerry2 = AreaFlag(32),
// flo_25
AF_FLO_TreeDrop_YellowBerry1 = AreaFlag(33),
AF_FLO_TreeDrop_YellowBerry2 = AreaFlag(34),
// flo_14
AF_FLO_PauseBlowingBubbles = AreaFlag(35),
AF_FLO_BlowingBigBubble = AreaFlag(36),
AF_FLO_BigBubbleReady = AreaFlag(37),
// flo_15
AF_FLO_MetTheSun = AreaFlag(38),
// flo_16
AF_FLO16_FoundHiddenStarPiece = AreaFlag(39),
// flo_19
AF_FLO_BeanstalkGrowing = AreaFlag(40),
// flo_16
AF_FLO_RaisedRedPillar = AreaFlag(41),
AF_FLO_RaisedGreenPillar = AreaFlag(42),
AF_FLO_LoweredPurplePillar = AreaFlag(43),
AF_FLO_RidingBeanstalk = AreaFlag(44),
AF_FLO_BeanstalkFadedOut = AreaFlag(45),
};
#endif

View File

@ -0,0 +1,51 @@
// Older version of flo_00
#include "dead.h"
#include "common.h"
#include "message_ids.h"
#include "dead_structs.h"
#include "../flo.h"
#include "mapfs/flo_00_shape.h"
#include "mapfs/flo_00_hit.h"
#include "sprite/npc/Lakilulu.h"
#include "sprite/npc/WorldLakilester.h"
#include "sprite/npc/WorldParakarry.h"
enum {
NPC_Dummy_Wisterwood = 0,
NPC_Bubulb_01 = 1,
NPC_Bubulb_02 = 2,
NPC_Bubulb_03 = 3,
NPC_Bubulb_04 = 4,
NPC_Tolielup = 5,
NPC_Klevar = 6,
NPC_Lakilulu = 7,
NPC_Lakilester_Epilogue = 0,
NPC_Lakilulu_Epilogue = 1,
NPC_Parakarry_Epilogue = 2,
};
enum {
MV_BeanstalkSceneSync = MapVar(10),
MV_BeanstalkItemEntity = MapVar(11),
};
#define NAMESPACE dead_flo_00
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_Scene_Epilogue);
extern EvtScript N(EVS_Interact_Wisterwood);
extern EvtScript N(EVS_Wisterwood_Exit);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern EvtScript N(EVS_Scene_SunReturns);
extern EvtScript N(EVS_SetupBeanPatch);
extern EvtScript N(EVS_SetupBeanstalk);
extern EvtScript N(EVS_Enter_Beanstalk);
extern EvtScript N(EVS_Scene_BeanstalkGrewRemark);
extern NpcGroupList N(DefaultNPCs);
extern NpcGroupList N(EpilogueNPCs);

View File

@ -0,0 +1,23 @@
#include "flo_00.h"
EntryList N(Entrances) = {
[flo_00_ENTRY_0] { 0.0, 0.0, -310.0, 170.0 },
[flo_00_ENTRY_1] { -320.0, 0.0, -335.0, 135.0 },
[flo_00_ENTRY_2] { -470.0, 0.0, 0.0, 90.0 },
[flo_00_ENTRY_3] { -320.0, 0.0, 335.0, 45.0 },
[flo_00_ENTRY_4] { 320.0, 0.0, -335.0, 225.0 },
[flo_00_ENTRY_5] { 465.0, 0.0, 0.0, 270.0 },
[flo_00_ENTRY_6] { 320.0, 0.0, 335.0, 315.0 },
[flo_00_ENTRY_7] { -30.0, 0.0, 120.0, 270.0 },
[flo_00_ENTRY_8] { -30.0, 0.0, 120.0, 270.0 },
[flo_00_ENTRY_9] { -470.0, 0.0, 0.0, 90.0 },
[flo_00_ENTRY_A] { 40.0, 0.0, -30.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_00 },
};

View File

@ -0,0 +1,37 @@
#include "flo_00.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(flo_00_ENTRY_8)
EVT_IF_NE(AF_FLO_RidingBeanstalk, FALSE)
EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8)
EVT_ELSE
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_IF
EVT_CASE_EQ(flo_00_ENTRY_9)
EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8)
EVT_CASE_EQ(flo_00_ENTRY_A)
EVT_CALL(SetMusicTrack, 0, SONG_STAR_SPIRIT_THEME, 1, 8)
EVT_THREAD
EVT_LOOP(0)
EVT_WAIT(1)
EVT_IF_GE(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_THREAD
EVT_CASE_EQ(flo_00_ENTRY_B)
EVT_CALL(FadeInMusic, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 3000, 0, 127)
EVT_CASE_DEFAULT
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,219 @@
#include "flo_00.h"
#include "effects.h"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
API_CALLABLE(N(SpawnSunEffect)) {
fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_Wisterwood_Exit) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(PlayerMoveTo, 30, -170, 10)
EVT_CALL(InterpPlayerYaw, 0, 0)
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_1CF, 0)
EVT_CALL(MakeLerp, 0, -100, 20, EASING_QUADRATIC_OUT)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(func_802D2C14, 1)
EVT_CALL(PlayerMoveTo, 0, -310, 30)
EVT_CALL(func_802D2C14, 0)
EVT_IF_EQ(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED)
EVT_SET(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN)
EVT_END_IF
EVT_CALL(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateGroup, MODEL_g27, 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_deilittn, SOUND_1D0, 0)
EVT_CALL(GotoMap, EVT_PTR("mac_01"), mac_01_ENTRY_5)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Wisterwood_Enter) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(InterpPlayerYaw, 180, 0)
EVT_CALL(PlaySoundAtCollider, COLLIDER_deilittn, SOUND_1CF, 0)
EVT_CALL(MakeLerp, 0, -100, 30, EASING_QUADRATIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateGroup, MODEL_g27, LVar0, 0, 1, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(func_802D2C14, 1)
EVT_CALL(PlayerMoveTo, 0, -135, 30)
EVT_CALL(func_802D2C14, 0)
EVT_CALL(MakeLerp, -100, 0, 30, EASING_QUADRATIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(RotateGroup, MODEL_g27, 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_deilittn, SOUND_1D0, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_deilittn, COLLIDER_FLAGS_UPPER_MASK)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ExitWalk_flo_14_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_1, "flo_14", flo_14_ENTRY_0);
EvtScript N(EVS_ExitWalk_flo_23_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_2, "flo_23", flo_23_ENTRY_0);
EvtScript N(EVS_ExitWalk_flo_25_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_3, "flo_25", flo_25_ENTRY_0);
EvtScript N(EVS_ExitWalk_flo_16_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_4, "flo_16", flo_16_ENTRY_0);
EvtScript N(EVS_ExitWalk_flo_09_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_5, "flo_09", flo_09_ENTRY_0);
EvtScript N(EVS_ExitWalk_flo_08_0) = EVT_EXIT_WALK(60, flo_00_ENTRY_6, "flo_08", flo_08_ENTRY_0);
MAP_RODATA_PAD(1, exits)
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_14_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_23_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_25_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilisw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_16_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiline, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_09_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_08_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilise, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnterMap) = {
EVT_CALL(GetLoadType, LVar1)
EVT_IF_EQ(LVar1, LOAD_FROM_FILE_SELECT)
EVT_EXEC(EnterSavePoint)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_ELSE
EVT_CALL(GetEntryID, LVar0)
EVT_IF_NE(LVar0, flo_00_ENTRY_8)
EVT_SET(AF_FLO_RidingBeanstalk, FALSE)
EVT_END_IF
EVT_SWITCH(LVar0)
EVT_CASE_EQ(flo_00_ENTRY_0)
EVT_THREAD
EVT_EXEC_WAIT(N(EVS_Wisterwood_Enter))
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_END_THREAD
EVT_CASE_RANGE(flo_00_ENTRY_1, flo_00_ENTRY_6)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_CASE_EQ(flo_00_ENTRY_7)
EVT_THREAD
EVT_EXEC_WAIT(N(EVS_Scene_BeanstalkGrewRemark))
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_END_THREAD
EVT_CASE_EQ(flo_00_ENTRY_8)
EVT_THREAD
EVT_EXEC_WAIT(N(EVS_Enter_Beanstalk))
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_END_THREAD
EVT_CASE_EQ(flo_00_ENTRY_9)
EVT_EXEC(N(EVS_Scene_SunReturns))
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_CASE_EQ(flo_00_ENTRY_A)
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_EQ(flo_00_ENTRY_B)
EVT_EXEC(N(EVS_Scene_Epilogue))
EVT_END_SWITCH
EVT_END_IF
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Interact_Wisterwood)), TRIGGER_WALL_PRESS_A, COLLIDER_deilittn, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_SET(GF_MAP_FlowerFields, TRUE)
EVT_IF_LT(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK)
EVT_END_IF
EVT_SET(GF_MAC01_RowfBadgesChosen, FALSE)
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_00_ENTRY_B)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(EpilogueNPCs)))
EVT_ELSE
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_CALL(ParentColliderToModel, COLLIDER_o240, MODEL_o142)
EVT_EXEC(N(EVS_SetupBeanstalk))
EVT_EXEC(N(EVS_SetupBeanPatch))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o363, SURFACE_TYPE_FLOWERS)
EVT_FLOWER_SPAWN_REGION( 150, -270, 410, 170, 0)
EVT_FLOWER_SPAWN_REGION( 115, -450, 250, -270, 0)
EVT_FLOWER_SPAWN_REGION( -330, 220, 45, 410, 0)
EVT_FLOWER_SPAWN_REGION( -420, -260, -140, 160, 0)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitse, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitne, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitsw, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK)
EVT_EXEC(N(EVS_EnterMap))
EVT_CALL(GetLoadType, LVar1)
EVT_IF_NE(LVar1, LOAD_FROM_FILE_SELECT)
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_00_ENTRY_A)
EVT_WAIT(65)
EVT_END_IF
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
// thread to manage wisterwood blinking
EVT_THREAD
EVT_CALL(EnableTexPanning, MODEL_o47, TRUE)
EVT_SET(LVar0, 0)
EVT_LABEL(0)
EVT_CALL(RandInt, 300, LVar1)
EVT_ADD(LVar1, 100)
EVT_CALL(RandInt, 1, LVar2)
EVT_ADD(LVar2, 1)
EVT_WAIT(LVar1)
EVT_LOOP(LVar2)
EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0)
EVT_WAIT(2)
EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0)
EVT_WAIT(2)
EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x18000, 0)
EVT_CALL(RandInt, 5, LVar3)
EVT_ADD(LVar3, 2)
EVT_WAIT(LVar3)
EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x10000, 0)
EVT_WAIT(2)
EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, -0x8000, 0)
EVT_WAIT(2)
EVT_CALL(SetTexPanOffset, TEX_PANNER_C, TEX_PANNER_MAIN, 0, 0)
EVT_CALL(RandInt, 5, LVar3)
EVT_ADD(LVar3, 2)
EVT_WAIT(LVar3)
EVT_END_LOOP
EVT_GOTO(0)
EVT_END_THREAD
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,798 @@
#include "flo_00.h"
NpcSettings N(NpcSettings_Dummy) = {
.height = 24,
.radius = 24,
.level = 99,
};
#include "world/common/npc/Bubulb_Patrol.inc.c"
#include "world/common/npc/Tolielup.inc.c"
#include "world/common/npc/StarSpirit.inc.c"
API_CALLABLE(N(UpgradeStarPower)) {
set_max_SP(6);
gPlayerData.curHP = gPlayerData.curMaxHP;
gPlayerData.curFP = gPlayerData.curMaxFP;
sync_status_menu();
return ApiStatus_DONE2;
}
EvtScript N(EVS_Scene_SunReturns) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 50, 0, -200)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 50, 0, -200)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 700)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-11.0))
EVT_CALL(SetCamPosA, CAM_DEFAULT, -27, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(20)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_00C4, 0, 50, -200)
EVT_WAIT(10)
EVT_CALL(GotoMap, EVT_PTR("flo_07"), flo_07_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Wisterwood_Introduction) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, -170)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -170)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 300)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_WAIT(75)
EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_0000, 160, 40)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(1.5))
EVT_CALL(PlayerJump1, LVar0, LVar1, LVar2, 12)
EVT_WAIT(10)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0)
EVT_WAIT(15)
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0)
EVT_WAIT(15)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 800)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-5.8))
EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_WAIT(15)
EVT_CALL(SpeakToPlayer, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0001)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(InterpPlayerYaw, 350, 0)
EVT_WAIT(15)
EVT_CALL(ContinueSpeech, NPC_Dummy_Wisterwood, -1, -1, 5, MSG_CH6_0002)
EVT_WAIT(10)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 333)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(9.0), EVT_FLOAT(-22.0))
EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(EnablePartnerAI)
EVT_CALL(func_802D2C14, 1)
EVT_WAIT(10)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0003, 0, 70, -200)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(16.5), EVT_FLOAT(-11.8))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 525)
EVT_CALL(SetCamPosA, CAM_DEFAULT, -14, 0)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0004, 0, 50, -200)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(9.0), EVT_FLOAT(-22.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 333)
EVT_CALL(SetCamPosA, CAM_DEFAULT, -2, 0)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0005, 0, 70, -200)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_SET(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
EVT_CALL(func_802D2C14, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Interact_Wisterwood) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(2)
EVT_CALL(GetPlayerActionState, LVar3)
EVT_SET(LVar4, 0)
EVT_IF_EQ(LVar3, ACTION_STATE_IDLE)
EVT_ADD(LVar4, 1)
EVT_END_IF
EVT_IF_EQ(LVar3, ACTION_STATE_WALK)
EVT_ADD(LVar4, 1)
EVT_END_IF
EVT_IF_EQ(LVar3, ACTION_STATE_RUN)
EVT_ADD(LVar4, 1)
EVT_END_IF
EVT_IF_EQ(LVar4, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0006, 0, 50, -200)
EVT_SET(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END_IF
EVT_IF_LT(GB_StoryProgress, STORY_CH6_RETURNED_TO_TOAD_TOWN)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000D, 0, 50, -200)
EVT_CALL(ShowChoice, MSG_Choice_001F)
EVT_WAIT(10)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN)
EVT_CALL(SwitchMessage, MSG_CH6_000E)
EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL)
EVT_CALL(SwitchMessage, MSG_CH6_000F)
EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_CALL(SwitchMessage, MSG_CH6_0010)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SwitchMessage, MSG_CH6_0011)
EVT_CASE_LT(STORY_CH6_GREW_MAGIC_BEANSTALK)
EVT_CALL(SwitchMessage, MSG_CH6_0007)
EVT_CASE_LT(STORY_CH6_BEGAN_PEACH_MISSION)
EVT_CALL(SwitchMessage, MSG_CH6_0012)
EVT_CASE_DEFAULT
EVT_CALL(SwitchMessage, MSG_CH6_0013)
EVT_END_SWITCH
EVT_CASE_EQ(1)
EVT_CALL(CloseMessage)
EVT_EXEC(N(EVS_Wisterwood_Exit))
EVT_RETURN
EVT_CASE_EQ(2)
EVT_CALL(CloseMessage)
EVT_END_SWITCH
EVT_ELSE
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0014, 0, 50, -200)
EVT_CALL(ShowChoice, MSG_Choice_001F)
EVT_WAIT(10)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(SwitchMessage, MSG_CH6_0015)
EVT_CASE_EQ(1)
EVT_CALL(CloseMessage)
EVT_EXEC(N(EVS_Wisterwood_Exit))
EVT_RETURN
EVT_CASE_EQ(2)
EVT_CALL(CloseMessage)
EVT_END_SWITCH
EVT_END_IF
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Wisterwood_Farewell) = {
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 600, EVT_FLOAT(21.0), EVT_FLOAT(-12.0))
EVT_WAIT(20)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000B, 0, 50, -200)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, -30)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 250)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-25.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000C, 0, 50, -200)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Wisterwood) = {
EVT_CALL(EnableGroup, MODEL_ha, FALSE)
EVT_CALL(EnableGroup, MODEL_tuta, FALSE)
EVT_CALL(EnableGroup, MODEL_g54, FALSE)
EVT_CALL(SetNpcPos, NPC_SELF, 50, 70, -230)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2, TRUE)
EVT_CALL(EnableNpcShadow, NPC_SELF, FALSE)
EVT_IF_LT(GB_StoryProgress, STORY_CH6_ARRIVED_AT_FLOWER_FIELDS)
EVT_EXEC(N(EVS_Wisterwood_Introduction))
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Bubulb1) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0016)
EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0017)
EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0018)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_Talk, ANIM_Bubulb_Pink_Idle, 0, MSG_CH6_0019)
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
EVT_SWITCH(AF_FLO_PinkBubulbDialogueToggle)
EVT_CASE_EQ(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001A)
EVT_SET(AF_FLO_PinkBubulbDialogueToggle, TRUE)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001B)
EVT_SET(AF_FLO_PinkBubulbDialogueToggle, FALSE)
EVT_END_SWITCH
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Pink_HappyTalk, ANIM_Bubulb_Pink_HappyGentle, 0, MSG_CH6_001C)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Bubulb2) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001D)
EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001E)
EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_001F)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0020)
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
EVT_SWITCH(AF_FLO_PurpleBubulbDialogueToggle)
EVT_CASE_EQ(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0021)
EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, TRUE)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0022)
EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, FALSE)
EVT_END_SWITCH
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Purple_Talk, ANIM_Bubulb_Purple_Idle, 0, MSG_CH6_0023)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Bubulb_03) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0024)
EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0025)
EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0026)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH6_0027)
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
EVT_SWITCH(AF_FLO_GreenBubulbDialogueToggle)
EVT_CASE_EQ(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0028)
EVT_SET(AF_FLO_GreenBubulbDialogueToggle, TRUE)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_0029)
EVT_SET(AF_FLO_GreenBubulbDialogueToggle, FALSE)
EVT_END_SWITCH
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_HappyTalk, ANIM_Bubulb_Green_HappyGentle, 0, MSG_CH6_002A)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Bubulb_04) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002B)
EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002C)
EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002D)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_Talk, ANIM_Bubulb_Yellow_Idle, 0, MSG_CH6_002E)
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
EVT_SWITCH(AF_FLO_YellowBubulbDialogueToggle)
EVT_CASE_EQ(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_002F)
EVT_SET(AF_FLO_YellowBubulbDialogueToggle, TRUE)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0030)
EVT_SET(AF_FLO_YellowBubulbDialogueToggle, FALSE)
EVT_END_SWITCH
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Yellow_HappyTalk, ANIM_Bubulb_Yellow_HappyGentle, 0, MSG_CH6_0031)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Bubulb_01) = {
EVT_SET(AF_FLO_PinkBubulbDialogueToggle, FALSE)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb1)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Bubulb_02) = {
EVT_SET(AF_FLO_PurpleBubulbDialogueToggle, FALSE)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb2)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Bubulb_03) = {
EVT_SET(AF_FLO_GreenBubulbDialogueToggle, FALSE)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb_03)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Bubulb_04) = {
EVT_SET(AF_FLO_YellowBubulbDialogueToggle, FALSE)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb_04)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Tolielup) = {
EVT_IF_EQ(GF_FLO00_Met_Tolielup, FALSE)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), -30, 300, EVT_FLOAT(20.0), EVT_FLOAT(-9.5))
EVT_SET(GF_FLO00_Met_Tolielup, TRUE)
EVT_END_IF
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN)
EVT_SWITCH(AB_FLO_TolielupDialogue)
EVT_CASE_EQ(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0035)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_SET(AB_FLO_TolielupDialogue, 1)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_SET(AB_FLO_TolielupDialogue, 2)
EVT_CASE_EQ(2)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_SET(AB_FLO_TolielupDialogue, 0)
EVT_END_SWITCH
EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY)
EVT_SWITCH(AB_FLO_TolielupDialogue)
EVT_CASE_EQ(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0036)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_SET(AB_FLO_TolielupDialogue, 1)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_SET(AB_FLO_TolielupDialogue, 2)
EVT_CASE_EQ(2)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_SET(AB_FLO_TolielupDialogue, 0)
EVT_END_SWITCH
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_SWITCH(AB_FLO_TolielupDialogue)
EVT_CASE_EQ(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0037)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_SET(AB_FLO_TolielupDialogue, 1)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_SET(AB_FLO_TolielupDialogue, 2)
EVT_CASE_EQ(2)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_SET(AB_FLO_TolielupDialogue, 0)
EVT_END_SWITCH
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
EVT_SWITCH(AB_FLO_TolielupDialogue)
EVT_CASE_EQ(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0039)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_SET(AB_FLO_TolielupDialogue, 1)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_0038)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_END_SWITCH
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Tolielup_Talk, ANIM_Tolielup_Idle, 0, MSG_CH6_003A)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Tolielup_Laugh, ANIM_Tolielup_Laugh, 0)
EVT_END_SWITCH
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Tolielup) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Tolielup)))
EVT_CALL(SetNpcCollisionSize, NPC_SELF, 65, 50)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_Klevar) = {
EVT_LOOP(0)
EVT_LOOP(10)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 1)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_LOOP(10)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 1)
EVT_CALL(SetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_RescuedKlevar) = {
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(func_802CF56C, 2)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_SET(LVar3, LVar0)
EVT_ADD(LVar3, -50)
EVT_SET(LVar4, LVar1)
EVT_ADD(LVar4, 26)
EVT_CALL(SetNpcPos, NPC_Klevar, LVar3, LVar4, LVar2)
EVT_CALL(PlayerFaceNpc, NPC_Klevar, FALSE)
EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Klevar, 0)
EVT_ADD(LVar0, -25)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(475.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -8)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_WAIT(1)
EVT_CALL(WaitForPlayerInputEnabled)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(40)
EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D8)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, 18, -9)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(MakeLerp, 0, 360, 10, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetNpcRotation, NPC_Klevar, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(EnableNpcAI, NPC_Klevar, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Leap)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_GotItem)
EVT_CALL(PlaySoundAtPlayer, SOUND_139, 0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_SET(LVar3, LVar1)
EVT_ADD(LVar1, 50)
EVT_ADD(LVar2, 10)
EVT_ADD(LVar3, 30)
EVT_LOOP(5)
EVT_PLAY_EFFECT(EFFECT_SPARKLES, 3, LVar0, LVar1, LVar2, 20)
EVT_WAIT(6)
EVT_PLAY_EFFECT(EFFECT_SPARKLES, 1, LVar0, LVar3, LVar2, 20)
EVT_WAIT(6)
EVT_END_LOOP
EVT_WAIT(20)
EVT_CALL(PlaySoundAtPlayer, SOUND_188, 0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 20)
EVT_PLAY_EFFECT(EFFECT_ENERGY_ORB_WAVE, 4, LVar0, LVar1, LVar2, 1, 30)
EVT_WAIT(30)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(SetNpcAnimation, NPC_Klevar, ANIM_WorldKlevar_Idle)
EVT_CALL(EnableNpcAI, NPC_Klevar, TRUE)
EVT_CALL(N(UpgradeStarPower))
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0196, 160, 40)
EVT_WAIT(10)
EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(250.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00D9)
EVT_WAIT(10)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, -25)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_Klevar, ANIM_WorldKlevar_Talk, ANIM_WorldKlevar_Idle, SPEECH_FLAG_200, MSG_CH6_00DA)
EVT_CALL(SetNpcFlagBits, NPC_Klevar, NPC_FLAG_40000, TRUE)
EVT_THREAD
EVT_LOOP(25)
EVT_CALL(GetNpcPos, NPC_Klevar, LVar0, LVar1, LVar2)
EVT_PLAY_EFFECT(EFFECT_SPARKLES, 4, LVar0, LVar1, LVar2, 20)
EVT_WAIT(4)
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_SET(LVar2, 0)
EVT_SET(LVar3, 1800)
EVT_CALL(MakeLerp, LVar2, LVar3, 100, EASING_CUBIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetNpcRotation, NPC_Klevar, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_THREAD
EVT_THREAD
EVT_CALL(GetNpcPos, NPC_Klevar, LVar2, LVar3, LVar4)
EVT_SET(LVar5, LVar3)
EVT_ADD(LVar5, 180)
EVT_CALL(MakeLerp, LVar3, LVar5, 100, EASING_CUBIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetNpcPos, NPC_Klevar, LVar2, LVar0, LVar4)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_Klevar, NPC_DISPOSE_LOCATION)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(15)
EVT_CALL(PlaySoundAtNpc, NPC_Klevar, SOUND_2045, 0)
EVT_END_THREAD
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A)
EVT_WAIT(110)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_SET(GB_StoryProgress, STORY_CH6_STAR_SPRIT_DEPARTED)
EVT_EXEC_WAIT(N(EVS_Wisterwood_Farewell))
EVT_CALL(EnablePartnerAI)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Klevar) = {
EVT_CALL(GetLoadType, LVar1)
EVT_IF_NE(LVar1, 1)
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_00_ENTRY_A)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Klevar)))
EVT_EXEC(N(EVS_Scene_RescuedKlevar))
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Lakilulu) = {
EVT_IF_LE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032)
EVT_ELSE
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_IF_EQ(LVar0, PARTNER_LAKILESTER)
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032)
EVT_WAIT(10)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 5, MSG_CH6_0033)
EVT_CALL(SetNpcAnimation, NPC_PARTNER, ANIM_WorldLakilester_Idle)
EVT_CALL(EndSpeech, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5)
EVT_CALL(EnablePartnerAI)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034)
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Lakilulu) = {
EVT_IF_GE(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakilulu)))
EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 28)
EVT_CALL(SetNpcPos, NPC_SELF, -200, 15, -300)
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Wisterwood) = {
.id = NPC_Dummy_Wisterwood,
.settings = &N(NpcSettings_Dummy),
.pos = { -72.0f, 60.0f, -100.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_200 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Wisterwood),
.drops = BUBULB_DROPS,
.animations = BUBULB_PINK_ANIMS,
};
StaticNpc N(NpcData_Bubulbs)[] = {
{
.id = NPC_Bubulb_01,
.settings = &N(NpcSettings_Bubulb_Patrol),
.pos = { -59.0f, 0.0f, -40.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.init = &N(EVS_NpcInit_Bubulb_01),
.drops = BUBULB_DROPS,
.territory = {
.patrol = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 2,
.points = {
{ -59, 0, -40 },
{ -80, 0, -40 },
},
.detectShape = SHAPE_CYLINDER,
.detectPos = { -59, 0, -40 },
.detectSize = { 100 },
}
},
.animations = BUBULB_PINK_ANIMS,
.tattle = MSG_NpcTattle_FLO_BubulbA,
},
{
.id = NPC_Bubulb_02,
.settings = &N(NpcSettings_Bubulb_Patrol),
.pos = { 67.0f, 0.0f, 85.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.init = &N(EVS_NpcInit_Bubulb_02),
.drops = BUBULB_DROPS,
.territory = {
.patrol = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 2,
.points = {
{ 67, 0, 85 },
{ 97, 0, 85 },
},
.detectShape = SHAPE_CYLINDER,
.detectPos = { -59, 0, -40 },
.detectSize = { 100 },
}
},
.animations = BUBULB_PURPLE_ANIMS,
.tattle = MSG_NpcTattle_FLO_BubulbB,
},
{
.id = NPC_Bubulb_03,
.settings = &N(NpcSettings_Bubulb_Patrol),
.pos = { 90.0f, 0.0f, 410.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.init = &N(EVS_NpcInit_Bubulb_03),
.drops = BUBULB_DROPS,
.territory = {
.patrol = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 2,
.points = {
{ 90, 0, 410 },
{ 120, 0, 410 },
},
.detectShape = SHAPE_CYLINDER,
.detectPos = { -59, 0, -40 },
.detectSize = { 100 },
}
},
.animations = BUBULB_GREEN_ANIMS,
.tattle = MSG_NpcTattle_FLO_BubulbC,
},
{
.id = NPC_Bubulb_04,
.settings = &N(NpcSettings_Bubulb_Patrol),
.pos = { 200.0f, 0.0f, 430.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.init = &N(EVS_NpcInit_Bubulb_04),
.drops = BUBULB_DROPS,
.territory = {
.patrol = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.numPoints = 2,
.points = {
{ 200, 0, 430 },
{ 240, 0, 430 },
},
.detectShape = SHAPE_CYLINDER,
.detectPos = { -59, 0, -40 },
.detectSize = { 100 },
}
},
.animations = BUBULB_YELLOW_ANIMS,
.tattle = MSG_NpcTattle_FLO_BubulbD,
},
};
StaticNpc N(NpcData_Tolielup) = {
.id = NPC_Tolielup,
.settings = &N(NpcSettings_Tolielup),
.pos = { -400.0f, 0.0f, 190.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_400000,
.init = &N(EVS_NpcInit_Tolielup),
.drops = TOLIELUP_DROPS,
.animations = TOLIELUP_ANIMS,
.tattle = MSG_NpcTattle_Tolielup,
};
StaticNpc N(NpcData_Klevar) = {
.id = NPC_Klevar,
.settings = &N(NpcSettings_StarSpirit),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Klevar),
.drops = KLEVAR_DROPS,
.animations = KLEVAR_ANIMS,
};
StaticNpc N(NpcData_Lakilulu) = {
.id = NPC_Lakilulu,
.settings = &N(NpcSettings_Dummy),
.pos = { 198.0f, 0.0f, 363.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Lakilulu),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Lakilulu_Idle,
.walk = ANIM_Lakilulu_Idle,
.run = ANIM_Lakilulu_Idle,
.chase = ANIM_Lakilulu_Idle,
.anim_4 = ANIM_Lakilulu_Idle,
.anim_5 = ANIM_Lakilulu_Idle,
.death = ANIM_Lakilulu_Idle,
.hit = ANIM_Lakilulu_Idle,
.anim_8 = ANIM_Lakilulu_Idle,
.anim_9 = ANIM_Lakilulu_Idle,
.anim_A = ANIM_Lakilulu_Idle,
.anim_B = ANIM_Lakilulu_Idle,
.anim_C = ANIM_Lakilulu_Idle,
.anim_D = ANIM_Lakilulu_Idle,
.anim_E = ANIM_Lakilulu_Idle,
.anim_F = ANIM_Lakilulu_Idle,
},
.tattle = MSG_NpcTattle_Lakilulu,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Wisterwood)),
NPC_GROUP(N(NpcData_Bubulbs)),
NPC_GROUP(N(NpcData_Tolielup)),
NPC_GROUP(N(NpcData_Klevar)),
NPC_GROUP(N(NpcData_Lakilulu)),
{}
};

View File

@ -0,0 +1,182 @@
#include "flo_00.h"
NpcSettings N(NpcSettings_Lakilester_Epilogue) = {
.height = 24,
.radius = 24,
.level = 99,
};
NpcSettings N(NpcSettings_Parakarry_Epilogue) = {
.height = 35,
.radius = 24,
.level = 99,
.actionFlags = AI_ACTION_LOOK_AROUND_DURING_LOITER,
};
Vec3f N(D_80245E88_CA3DA8)[] = {
{ 266.0f, 20.0f, 322.0f },
{ 310.0f, 30.0f, 312.0f },
{ 346.0f, 90.0f, 300.0f },
{ 400.0f, 200.0f, 287.0f },
};
EvtScript N(EVS_Scene_Epilogue) = {
EVT_CALL(SetPlayerPos, -400, 0, 200)
EVT_CALL(SetNpcPos, NPC_PARTNER, -380, 0, 200)
EVT_CALL(func_802CF56C, 2)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_SET_VEC3(LVar0, 230, 0, 350)
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(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-10.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 350)
EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(17.5), EVT_FLOAT(35.0))
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(70)
EVT_CALL(InterpNpcYaw, NPC_Lakilester_Epilogue, 90, 0)
EVT_WAIT(10)
EVT_CALL(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Talk)
EVT_WAIT(40)
EVT_CALL(SetNpcAnimation, NPC_Lakilester_Epilogue, ANIM_WorldLakilester_Idle)
EVT_CALL(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Talk)
EVT_WAIT(40)
EVT_CALL(SetNpcAnimation, NPC_Parakarry_Epilogue, ANIM_WorldParakarry_Idle)
EVT_CALL(InterpNpcYaw, NPC_Parakarry_Epilogue, 90, 0)
EVT_CALL(NpcFlyTo, NPC_Parakarry_Epilogue, 400, 200, 287, 80, -5, EASING_LINEAR)
EVT_CALL(InterpNpcYaw, NPC_Lakilester_Epilogue, 270, 0)
EVT_WAIT(40)
EVT_CALL(FadeOutMusic, 0, 1000)
EVT_CALL(GotoMap, EVT_PTR("sam_11"), sam_11_ENTRY_2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Lakilester_Epilogue) = {
EVT_CALL(SetPlayerPos, -400, 0, 200)
EVT_CALL(SetNpcPos, NPC_PARTNER, -380, 0, 200)
EVT_CALL(SetNpcPos, NPC_Lakilester_Epilogue, 196, 20, 354)
EVT_CALL(SetNpcYaw, NPC_Lakilester_Epilogue, 270)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Lakilulu_Epilogue) = {
EVT_CALL(SetNpcPos, NPC_Lakilulu_Epilogue, 163, 20, 370)
EVT_CALL(SetNpcYaw, NPC_Lakilulu_Epilogue, 90)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Parakarry_Epilogue) = {
EVT_CALL(SetNpcPos, NPC_Parakarry_Epilogue, 266, 20, 322)
EVT_CALL(SetNpcYaw, NPC_Parakarry_Epilogue, 270)
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Lakilester_Epilogue)[] = {
{
.id = NPC_Lakilester_Epilogue,
.settings = &N(NpcSettings_Lakilester_Epilogue),
.pos = { 144.0f, 0.0f, 374.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Lakilester_Epilogue),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_WorldLakilester_Idle,
.walk = ANIM_WorldLakilester_Idle,
.run = ANIM_WorldLakilester_Idle,
.chase = ANIM_WorldLakilester_Idle,
.anim_4 = ANIM_WorldLakilester_Idle,
.anim_5 = ANIM_WorldLakilester_Idle,
.death = ANIM_WorldLakilester_Idle,
.hit = ANIM_WorldLakilester_Idle,
.anim_8 = ANIM_WorldLakilester_Idle,
.anim_9 = ANIM_WorldLakilester_Idle,
.anim_A = ANIM_WorldLakilester_Idle,
.anim_B = ANIM_WorldLakilester_Idle,
.anim_C = ANIM_WorldLakilester_Idle,
.anim_D = ANIM_WorldLakilester_Idle,
.anim_E = ANIM_WorldLakilester_Idle,
.anim_F = ANIM_WorldLakilester_Idle,
},
},
{
.id = NPC_Lakilulu_Epilogue,
.settings = &N(NpcSettings_Lakilester_Epilogue),
.pos = { 198.0f, 0.0f, 363.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Lakilulu_Epilogue),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Lakilulu_Idle,
.walk = ANIM_Lakilulu_Idle,
.run = ANIM_Lakilulu_Idle,
.chase = ANIM_Lakilulu_Idle,
.anim_4 = ANIM_Lakilulu_Idle,
.anim_5 = ANIM_Lakilulu_Idle,
.death = ANIM_Lakilulu_Idle,
.hit = ANIM_Lakilulu_Idle,
.anim_8 = ANIM_Lakilulu_Idle,
.anim_9 = ANIM_Lakilulu_Idle,
.anim_A = ANIM_Lakilulu_Idle,
.anim_B = ANIM_Lakilulu_Idle,
.anim_C = ANIM_Lakilulu_Idle,
.anim_D = ANIM_Lakilulu_Idle,
.anim_E = ANIM_Lakilulu_Idle,
.anim_F = ANIM_Lakilulu_Idle,
},
},
{
.id = NPC_Parakarry_Epilogue,
.settings = &N(NpcSettings_Parakarry_Epilogue),
.pos = { 266.0f, 0.0f, 322.0f },
.yaw = 0,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Parakarry_Epilogue),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_WorldParakarry_Idle,
.walk = ANIM_WorldParakarry_Walk,
.run = ANIM_WorldParakarry_Run,
.chase = ANIM_WorldParakarry_Run,
.anim_4 = ANIM_WorldParakarry_Idle,
.anim_5 = ANIM_WorldParakarry_Idle,
.death = ANIM_WorldParakarry_Still,
.hit = ANIM_WorldParakarry_Still,
.anim_8 = ANIM_WorldParakarry_Idle,
.anim_9 = ANIM_WorldParakarry_Idle,
.anim_A = ANIM_WorldParakarry_Idle,
.anim_B = ANIM_WorldParakarry_Idle,
.anim_C = ANIM_WorldParakarry_Idle,
.anim_D = ANIM_WorldParakarry_Idle,
.anim_E = ANIM_WorldParakarry_Idle,
.anim_F = ANIM_WorldParakarry_Idle,
},
},
};
NpcGroupList N(EpilogueNPCs) = {
NPC_GROUP(N(NpcData_Lakilester_Epilogue)),
{}
};

View File

@ -0,0 +1,668 @@
#include "flo_00.h"
#define BEANSTALK_BASE_X -83
#define BEANSTALK_BASE_Z 87
API_CALLABLE(N(GetPlayerAngles)) {
Bytecode* args = script->ptrReadPos;
s32 var1 = *args++;
s32 var2 = *args++;
evt_set_variable(script, var1, gPlayerStatus.spriteFacingAngle);
evt_set_variable(script, var2, gPlayerStatus.targetYaw);
return ApiStatus_DONE2;
}
API_CALLABLE(N(PlayerRideBeanstalk)) {
f32 temp = evt_get_variable(NULL, script->varTable[2]);
f32 dist = dist2D(BEANSTALK_BASE_X, BEANSTALK_BASE_Z, script->varTable[9], script->varTable[11]);
f32 angle = atan2(BEANSTALK_BASE_X, BEANSTALK_BASE_Z, script->varTable[9], script->varTable[11]);
f32 clamped = clamp_angle(angle - temp);
temp = sin_deg(clamped);
gPlayerStatus.position.x = BEANSTALK_BASE_X + (dist * temp);
gPlayerStatus.position.y = evt_get_variable(NULL, script->varTable[10]) + evt_get_variable(NULL, script->varTable[3]);
temp = cos_deg(clamped);
gPlayerStatus.position.z = BEANSTALK_BASE_Z - (dist * temp);
return ApiStatus_DONE2;
}
API_CALLABLE(N(PartnerRideBeanstalk)) {
Npc* npc = get_npc_by_index(NPC_Dummy_Wisterwood);
f32 temp = evt_get_variable(NULL, script->varTable[2]);
f32 dist = dist2D(BEANSTALK_BASE_X, BEANSTALK_BASE_Z, script->varTable[12], script->varTable[14]);
f32 angle = atan2(BEANSTALK_BASE_X, BEANSTALK_BASE_Z, script->varTable[12], script->varTable[14]);
f32 clamped = clamp_angle(angle - temp);
temp = sin_deg(clamped);
npc->pos.x = BEANSTALK_BASE_X + (dist * temp);
npc->pos.y = evt_get_variable(NULL, script->varTable[13]) + evt_get_variable(NULL, script->varTable[3]);
temp = cos_deg(clamped);
npc->pos.z = BEANSTALK_BASE_Z - (dist * temp);
return ApiStatus_DONE2;
}
#include "common/CosInterpMinMax.inc.c"
#include "world/common/todo/SyncStatusMenu.inc.c"
API_CALLABLE(N(DisableStatusMenu)) {
increment_status_menu_disabled();
return ApiStatus_DONE2;
}
API_CALLABLE(N(EnableStatusMenu)) {
decrement_status_menu_disabled();
return ApiStatus_DONE2;
}
EvtScript N(EVS_SetExteriorVineGrowth) = {
EVT_SETF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown)
EVT_SUBF(LVar1, EVT_FLOAT(-700.0))
EVT_DIVF(LVar1, EVT_FLOAT(100.0))
EVT_SETF(LVar2, LVar1)
EVT_MULF(LVar2, EVT_FLOAT(100.0))
EVT_IF_GT(LVar2, 100)
EVT_SETF(LVar1, EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(ScaleGroup, MODEL_g35, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o117, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o141, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o140, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o138, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o139, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o143, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o144, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o145, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o146, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o188, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o187, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o186, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o185, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o182, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o183, LVar1, 1, LVar1)
EVT_CALL(ScaleModel, MODEL_o181, LVar1, 1, LVar1)
EVT_CALL(TranslateGroup, MODEL_g35, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o117, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o141, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o140, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o138, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o139, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o143, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o144, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o145, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o146, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o188, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o187, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o186, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o185, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o182, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o183, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_o181, 0, LVar0, 0)
EVT_SETF(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(-12.0))
EVT_CALL(RotateGroup, MODEL_g35, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o117, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o141, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o140, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o138, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o139, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o143, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o144, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o145, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o146, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o188, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o187, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o186, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o185, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o182, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o183, LVar1, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o181, LVar1, 0, 1, 0)
EVT_CALL(TranslateModel, MODEL_o117, EVT_FLOAT(8.1220703125), EVT_FLOAT(56.1533203125), EVT_FLOAT(1.166015625))
EVT_CALL(TranslateModel, MODEL_o141, EVT_FLOAT(-6.8779296875), EVT_FLOAT(91.1533203125), EVT_FLOAT(1.166015625))
EVT_CALL(TranslateModel, MODEL_o140, EVT_FLOAT(13.1220703125), EVT_FLOAT(106.1533203125), EVT_FLOAT(1.166015625))
EVT_CALL(TranslateModel, MODEL_o138, EVT_FLOAT(-9.8779296875), EVT_FLOAT(136.1533203125), EVT_FLOAT(1.166015625))
EVT_CALL(TranslateModel, MODEL_o139, EVT_FLOAT(-7.8779296875), EVT_FLOAT(201.1533203125), EVT_FLOAT(1.166015625))
EVT_CALL(TranslateModel, MODEL_o143, EVT_FLOAT(13.1220703125), EVT_FLOAT(221.1533203125), EVT_FLOAT(1.166015625))
EVT_CALL(TranslateModel, MODEL_o144, EVT_FLOAT(8.126953125), EVT_FLOAT(261.2294921875), EVT_FLOAT(1.166015625))
EVT_CALL(TranslateModel, MODEL_o145, EVT_FLOAT(-12.8779296875), EVT_FLOAT(266.1533203125), EVT_FLOAT(1.166015625))
EVT_CALL(TranslateModel, MODEL_o146, EVT_FLOAT(8.1220703125), EVT_FLOAT(316.1533203125), EVT_FLOAT(-13.833984375))
EVT_CALL(TranslateModel, MODEL_o188, EVT_FLOAT(-10.943359375), EVT_FLOAT(391.1533203125), EVT_FLOAT(10.56640625))
EVT_CALL(TranslateModel, MODEL_o187, EVT_FLOAT(-7.001953125), EVT_FLOAT(456.1533203125), EVT_FLOAT(0.947265625))
EVT_CALL(TranslateModel, MODEL_o186, EVT_FLOAT(12.998046875), EVT_FLOAT(471.1533203125), EVT_FLOAT(0.947265625))
EVT_CALL(TranslateModel, MODEL_o185, EVT_FLOAT(-10.001953125), EVT_FLOAT(501.1533203125), EVT_FLOAT(0.947265625))
EVT_CALL(TranslateModel, MODEL_o182, EVT_FLOAT(8.0029296875), EVT_FLOAT(536.2294921875), EVT_FLOAT(0.947265625))
EVT_CALL(TranslateModel, MODEL_o183, EVT_FLOAT(12.998046875), EVT_FLOAT(586.1533203125), EVT_FLOAT(0.947265625))
EVT_CALL(TranslateModel, MODEL_o181, EVT_FLOAT(-13.001953125), EVT_FLOAT(631.1533203125), EVT_FLOAT(0.947265625))
EVT_SETF(LVar1, LVar0)
EVT_SUBF(LVar1, EVT_FLOAT(-700.0))
EVT_DIVF(LVar1, EVT_FLOAT(300.0))
EVT_SETF(LVar2, LVar1)
EVT_MULF(LVar2, EVT_FLOAT(100.0))
EVT_IF_GT(LVar2, 100)
EVT_SETF(LVar1, EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(ScaleModel, MODEL_o117, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o141, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o140, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o138, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o139, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o143, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o144, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o145, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o146, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o188, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o187, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o186, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o185, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o182, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o183, LVar1, LVar1, LVar1)
EVT_CALL(ScaleModel, MODEL_o181, LVar1, LVar1, LVar1)
EVT_CALL(TranslateModel, MODEL_o117, EVT_FLOAT(-8.12109375), EVT_FLOAT(-56.15234375), EVT_FLOAT(-1.1650390625))
EVT_CALL(TranslateModel, MODEL_o141, EVT_FLOAT(6.87890625), EVT_FLOAT(-91.15234375), EVT_FLOAT(-1.1650390625))
EVT_CALL(TranslateModel, MODEL_o140, EVT_FLOAT(-13.12109375), EVT_FLOAT(-106.15234375), EVT_FLOAT(-1.1650390625))
EVT_CALL(TranslateModel, MODEL_o138, EVT_FLOAT(9.87890625), EVT_FLOAT(-136.15234375), EVT_FLOAT(-1.1650390625))
EVT_CALL(TranslateModel, MODEL_o139, EVT_FLOAT(7.87890625), EVT_FLOAT(-201.15234375), EVT_FLOAT(-1.1650390625))
EVT_CALL(TranslateModel, MODEL_o143, EVT_FLOAT(-13.12109375), EVT_FLOAT(-221.15234375), EVT_FLOAT(-1.1650390625))
EVT_CALL(TranslateModel, MODEL_o144, EVT_FLOAT(-8.1259765625), EVT_FLOAT(-261.228515625), EVT_FLOAT(-1.1650390625))
EVT_CALL(TranslateModel, MODEL_o145, EVT_FLOAT(12.87890625), EVT_FLOAT(-266.15234375), EVT_FLOAT(-1.1650390625))
EVT_CALL(TranslateModel, MODEL_o146, EVT_FLOAT(-8.12109375), EVT_FLOAT(-316.15234375), EVT_FLOAT(13.8349609375))
EVT_CALL(TranslateModel, MODEL_o188, EVT_FLOAT(10.9443359375), EVT_FLOAT(-391.15234375), EVT_FLOAT(-10.5654296875))
EVT_CALL(TranslateModel, MODEL_o187, EVT_FLOAT(7.0029296875), EVT_FLOAT(-456.15234375), EVT_FLOAT(-0.9462890625))
EVT_CALL(TranslateModel, MODEL_o186, EVT_FLOAT(-12.9970703125), EVT_FLOAT(-471.15234375), EVT_FLOAT(-0.9462890625))
EVT_CALL(TranslateModel, MODEL_o185, EVT_FLOAT(10.0029296875), EVT_FLOAT(-501.15234375), EVT_FLOAT(-0.9462890625))
EVT_CALL(TranslateModel, MODEL_o182, EVT_FLOAT(-8.001953125), EVT_FLOAT(-536.228515625), EVT_FLOAT(-0.9462890625))
EVT_CALL(TranslateModel, MODEL_o183, EVT_FLOAT(-12.9970703125), EVT_FLOAT(-586.15234375), EVT_FLOAT(-0.9462890625))
EVT_CALL(TranslateModel, MODEL_o181, EVT_FLOAT(13.0029296875), EVT_FLOAT(-631.15234375), EVT_FLOAT(-0.9462890625))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetInteriorVineGrowth) = {
EVT_SETF(LVar1, LVar0) // input: expect range from -700 (no growth) to 0 (fully grown)
EVT_SUBF(LVar1, EVT_FLOAT(-700.0))
EVT_DIVF(LVar1, EVT_FLOAT(100.0))
EVT_SETF(LVar2, LVar1)
EVT_MULF(LVar2, EVT_FLOAT(100.0))
EVT_IF_GT(LVar2, 100)
EVT_SETF(LVar1, EVT_FLOAT(1.0))
EVT_END_IF
EVT_CALL(ScaleGroup, MODEL_g37, LVar1, 1, LVar1)
EVT_CALL(TranslateGroup, MODEL_g37, 0, LVar0, 0)
EVT_SETF(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(-12.0))
EVT_CALL(RotateGroup, MODEL_g37, LVar1, 0, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetSproutGrowth) = {
EVT_CALL(TranslateModel, MODEL_o147, EVT_FLOAT(9.5), EVT_FLOAT(12.0), EVT_FLOAT(15.0))
EVT_CALL(TranslateModel, MODEL_o149, EVT_FLOAT(-9.5), EVT_FLOAT(12.0), EVT_FLOAT(15.0))
EVT_CALL(TranslateModel, MODEL_o148, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(17.0))
EVT_SETF(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(90.0))
EVT_CALL(RotateModel, MODEL_o147, LVar1, 0, 0, -1)
EVT_CALL(RotateModel, MODEL_o149, LVar1, 0, 0, 1)
EVT_CALL(TranslateModel, MODEL_o147, EVT_FLOAT(-9.5), EVT_FLOAT(-12.0), EVT_FLOAT(-15.0))
EVT_CALL(TranslateModel, MODEL_o149, EVT_FLOAT(9.5), EVT_FLOAT(-12.0), EVT_FLOAT(-15.0))
EVT_CALL(TranslateModel, MODEL_o148, EVT_FLOAT(0.0), EVT_FLOAT(0.0), EVT_FLOAT(-17.0))
EVT_CALL(ScaleModel, MODEL_o147, LVar0, LVar0, LVar0)
EVT_CALL(ScaleModel, MODEL_o149, LVar0, LVar0, LVar0)
EVT_CALL(ScaleModel, MODEL_o148, LVar0, LVar0, LVar0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetBigLeafGrowth) = {
EVT_CALL(ScaleModel, MODEL_o142, LVar0, LVar0, LVar0)
EVT_SETF(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(90.0))
EVT_ADDF(LVar1, EVT_FLOAT(-90.0))
EVT_CALL(RotateModel, MODEL_o142, LVar1, 1, 0, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetBigLeafPosition) = {
EVT_SETF(LVar1, LVar0)
EVT_MULF(LVar1, EVT_FLOAT(-3.0))
EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), LVar0, EVT_FLOAT(1.4775391))
EVT_CALL(RotateModel, MODEL_o142, LVar1, 0, 1, 0)
EVT_CALL(UpdateColliderTransform, COLLIDER_o240)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Exit_Beanstalk) = {
EVT_IF_EQ(AF_FLO_RidingBeanstalk, FALSE)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(InterruptUsePartner)
EVT_WAIT(15)
EVT_CALL(DisablePartnerAI, 0)
EVT_SET(AF_FLO_RidingBeanstalk, TRUE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET_VEC3(LVar9, EVT_FLOAT(-59.0), EVT_FLOAT(22.0), EVT_FLOAT(125.0)) // target player pos
EVT_SET_VEC3(LVarC, EVT_FLOAT(-55.0), EVT_FLOAT(24.0), EVT_FLOAT(145.0)) // target partner pos
EVT_CALL(PlayerMoveTo, LVar9, LVarB, 8)
EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0))
EVT_CALL(NpcJump0, NPC_PARTNER, LVarC, LVarD, LVarE, 5)
EVT_CALL(PlaySound, SOUND_19C)
EVT_CALL(SetMusicTrack, 0, SONG_MAGIC_BEANSTALK, 1, 8)
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking)
EVT_CALL(N(GetPlayerAngles), LVar3, LVar4)
EVT_SWITCH(LVar4)
EVT_CASE_LT(90)
EVT_SET(AF_FLO_BeanstalkFacingRight, FALSE)
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0)
EVT_CASE_GE(270)
EVT_SET(AF_FLO_BeanstalkFacingRight, TRUE)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0)
EVT_END_SWITCH
EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), EVT_FLOAT(2.0), EVT_FLOAT(1.4775391))
EVT_CALL(UpdateColliderTransform, COLLIDER_o240)
EVT_SET(MV_BeanstalkSceneSync, FALSE)
EVT_THREAD
EVT_SET(LVarF, 0)
EVT_LOOP(0)
EVT_ADD(LVarF, 1)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, 700, 800, 0, 0)
EVT_EXEC(N(EVS_SetBigLeafPosition))
EVT_SETF(LVar2, LVar0)
EVT_MULF(LVar2, EVT_FLOAT(-3.0))
EVT_SETF(LVar3, LVar0)
EVT_CALL(N(PlayerRideBeanstalk))
EVT_CALL(N(PartnerRideBeanstalk))
EVT_IF_EQ(LVarF, 350)
EVT_SET(MV_BeanstalkSceneSync, TRUE)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_LABEL(10)
EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(GotoMap, EVT_PTR("flo_19"), flo_19_ENTRY_3)
EVT_WAIT(100)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Enter_Beanstalk) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK)
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(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_SET(LVar9, EVT_FLOAT(-59.0))
EVT_SET(LVarA, EVT_FLOAT(22.0))
EVT_SET(LVarB, EVT_FLOAT(125.0))
EVT_SET(LVarC, EVT_FLOAT(-55.0))
EVT_SET(LVarD, EVT_FLOAT(23.0))
EVT_SET(LVarE, EVT_FLOAT(145.0))
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(SetNpcAnimation, NPC_PARTNER, PARTNER_ANIM_RUN)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_Walking)
EVT_SWITCH(AF_FLO_BeanstalkFacingRight)
EVT_CASE_EQ(0)
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 90, 0)
EVT_CASE_EQ(1)
EVT_CALL(InterpPlayerYaw, 270, 0)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0)
EVT_END_SWITCH
EVT_END_THREAD
EVT_CALL(TranslateModel, MODEL_o142, EVT_FLOAT(-0.26), EVT_FLOAT(2.0), EVT_FLOAT(1.4775391))
EVT_CALL(UpdateColliderTransform, COLLIDER_o240)
EVT_SET(LVarF, 0)
EVT_LOOP(120)
EVT_ADD(LVarF, 1)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 70, 0, 120, 0, 0)
EVT_EXEC(N(EVS_SetBigLeafPosition))
EVT_SETF(LVar2, LVar0)
EVT_MULF(LVar2, EVT_FLOAT(-3.0))
EVT_SETF(LVar3, LVar0)
EVT_CALL(N(PlayerRideBeanstalk))
EVT_CALL(N(PartnerRideBeanstalk))
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(EnablePartnerAI)
EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER)
EVT_CALL(SetPlayerJumpscale, 1)
EVT_CALL(PlayerJump, 10, 0, 110, 20)
EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND)
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_WAIT(5)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(AF_FLO_RidingBeanstalk, FALSE)
EVT_CALL(StopSound, SOUND_19D)
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_BeanstalkGrowing) = {
EVT_CALL(PlaySoundAtCollider, COLLIDER_o261, SOUND_19B, 0)
EVT_SET(LVarF, 0)
EVT_LOOP(100)
EVT_ADD(LVarF, 1)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, 0, EVT_FLOAT(1.0), 100, 0, 0)
EVT_EXEC(N(EVS_SetSproutGrowth))
EVT_WAIT(1)
EVT_END_LOOP
EVT_SET(MV_BeanstalkSceneSync, FALSE)
EVT_THREAD
EVT_SET(LVarF, 0)
EVT_LOOP(1200)
EVT_ADD(LVarF, 1)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, -700, 0, 1200, 0, 0)
EVT_SETF(LVar2, LVar0)
EVT_MULF(LVar2, EVT_FLOAT(1.0))
EVT_SETF(LVar0, LVar2)
EVT_EXEC(N(EVS_SetExteriorVineGrowth))
EVT_SETF(LVar2, LVar0)
EVT_MULF(LVar2, EVT_FLOAT(1.0))
EVT_SETF(LVar0, LVar2)
EVT_EXEC(N(EVS_SetInteriorVineGrowth))
EVT_SWITCH(LVarF)
EVT_CASE_EQ(200)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A)
EVT_CASE_EQ(250)
EVT_SET(LVar0, -60)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, 65)
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(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.5), EVT_FLOAT(-7.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 800)
EVT_CALL(SetCamPosA, CAM_DEFAULT, -200, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -300)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CASE_DEFAULT
EVT_END_SWITCH
EVT_IF_GT(LVarF, 550)
EVT_SET(MV_BeanstalkSceneSync, TRUE)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_END_THREAD
EVT_LABEL(10)
EVT_IF_EQ(MV_BeanstalkSceneSync, FALSE)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(FadeInMusic, 0, SONG_CLOUDY_CLIMB, 0, 3000, 0, 127)
EVT_CALL(FadeOutMusic, 1, 3000)
EVT_CALL(GotoMap, EVT_PTR("flo_19"), flo_19_ENTRY_2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_BeanstalkGrewRemark) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(InterpPlayerYaw, 200, 0)
EVT_CALL(SetPlayerPos, -60, 0, 30)
EVT_CALL(NpcFacePlayer, NPC_PARTNER, 1)
EVT_CALL(SetNpcPos, NPC_PARTNER, -20, 0, 10)
EVT_SET(LVar0, -60)
EVT_SET(LVar1, 0)
EVT_SET(LVar2, 65)
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(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(12.5), EVT_FLOAT(-7.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 800)
EVT_CALL(SetCamPosA, CAM_DEFAULT, -200, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -300)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_SET(LVarF, 0)
EVT_LOOP(5)
EVT_ADD(LVarF, 20)
EVT_CALL(N(CosInterpMinMax), LVarF, LVar0, EVT_FLOAT(0.0), EVT_FLOAT(1.0), 100, 0, 0)
EVT_EXEC(N(EVS_SetBigLeafGrowth))
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_000A, 0, 50, -200)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
s32 N(BeanstalkIngredients)[] = {
ITEM_FERTILE_SOIL,
ITEM_MAGICAL_BEAN,
ITEM_MIRACLE_WATER,
ITEM_NONE
};
EvtScript N(EVS_BeanPatch_ItemPrompt) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(func_802D2884, -85, 85, 0)
EVT_CALL(func_802CF56C, 2)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_IF_EQ(GF_FLO00_PlacedFertileSoil, FALSE)
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL)
EVT_LABEL(10)
EVT_CALL(ShowKeyChoicePopup)
EVT_SET(LVar2, LVar0)
EVT_SWITCH(LVar2)
EVT_CASE_LE(ITEM_NONE)
EVT_CALL(CloseChoicePopup)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
EVT_CALL(AwaitPlayerLeave, -85, 85, 28)
EVT_RETURN
EVT_CASE_EQ(ITEM_FERTILE_SOIL)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_60006)
EVT_WAIT(5)
EVT_CALL(RemoveKeyItemAt, LVar1)
EVT_CALL(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0)
EVT_SET(MV_BeanstalkItemEntity, LVar0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill)
EVT_WAIT(20)
EVT_CASE_DEFAULT
EVT_SWITCH(AF_FLO_PlatingInstructionsToggle)
EVT_CASE_EQ(0)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200)
EVT_SET(AF_FLO_PlatingInstructionsToggle, TRUE)
EVT_CASE_DEFAULT
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200)
EVT_END_SWITCH
EVT_END_SWITCH
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_IF_NE(LVar2, 89)
EVT_GOTO(10)
EVT_END_IF
EVT_SET(GF_FLO00_PlacedFertileSoil, TRUE)
EVT_END_IF
EVT_IF_EQ(GF_FLO00_PlacedMagicalBean, FALSE)
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL)
EVT_LABEL(20)
EVT_CALL(ShowKeyChoicePopup)
EVT_SET(LVar2, LVar0)
EVT_SWITCH(LVar2)
EVT_CASE_LE(ITEM_NONE)
EVT_CALL(CloseChoicePopup)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
EVT_CALL(AwaitPlayerLeave, -85, 85, 28)
EVT_RETURN
EVT_CASE_EQ(ITEM_MAGICAL_BEAN)
EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity)
EVT_WAIT(5)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_60006)
EVT_WAIT(5)
EVT_CALL(RemoveKeyItemAt, LVar1)
EVT_CALL(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0)
EVT_SET(MV_BeanstalkItemEntity, LVar0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill)
EVT_WAIT(20)
EVT_CASE_DEFAULT
EVT_SWITCH(AF_FLO_PlatingInstructionsToggle)
EVT_CASE_EQ(0)
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0008, 0, 10, -200)
EVT_SET(AF_FLO_PlatingInstructionsToggle, TRUE)
EVT_CASE_DEFAULT
EVT_CALL(ShowMessageAtWorldPos, MSG_CH6_0009, 0, 10, -200)
EVT_END_SWITCH
EVT_END_SWITCH
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_IF_NE(LVar2, 88)
EVT_GOTO(20)
EVT_END_IF
EVT_SET(GF_FLO00_PlacedMagicalBean, TRUE)
EVT_END_IF
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL)
EVT_LABEL(30)
EVT_CALL(ShowKeyChoicePopup)
EVT_SET(LVar2, LVar0)
EVT_SWITCH(LVar2)
EVT_CASE_LE(ITEM_NONE)
EVT_CALL(CloseChoicePopup)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
EVT_CALL(AwaitPlayerLeave, -85, 85, 28)
EVT_RETURN
EVT_CASE_EQ(ITEM_MIRACLE_WATER)
EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity)
EVT_WAIT(5)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_60006)
EVT_WAIT(5)
EVT_CALL(RemoveKeyItemAt, LVar1)
EVT_CALL(N(SyncStatusMenu))
EVT_CALL(MakeItemEntity, ITEM_MIRACLE_WATER, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0)
EVT_SET(MV_BeanstalkItemEntity, LVar0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill)
EVT_WAIT(30)
EVT_CALL(RemoveItemEntity, MV_BeanstalkItemEntity)
EVT_WAIT(30)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(PlayerMoveTo, -60, 30, 20)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_o351, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(InterpPlayerYaw, 200, 0)
EVT_CALL(func_802CF56C, 2)
EVT_WAIT(60)
EVT_CALL(FadeInMusic, 1, SONG_MAGIC_BEANSTALK, 0, 3000, 0, 127)
EVT_CALL(FadeOutMusic, 0, 3000)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -85, 0, 75)
EVT_CALL(SetPanTarget, CAM_DEFAULT, -85, 0, 75)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 250)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_EXEC_WAIT(N(EVS_Scene_BeanstalkGrowing))
EVT_END_SWITCH
EVT_IF_NE(LVar2, 90)
EVT_GOTO(30)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BeanPatch_TryInteract) = {
EVT_LABEL(0)
EVT_CALL(IsPlayerWithin, -85, 85, 20, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_RETURN
EVT_ELSE
EVT_CALL(IsPlayerOnValidFloor, LVar0)
EVT_IF_EQ(LVar0, FALSE)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(GetCurrentPartner, LVar0)
EVT_IF_NE(LVar0, PARTNER_NONE)
EVT_RETURN
EVT_END_IF
EVT_END_IF
EVT_CALL(N(DisableStatusMenu))
EVT_EXEC_WAIT(N(EVS_BeanPatch_ItemPrompt))
EVT_CALL(N(EnableStatusMenu))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupBeanPatch) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH6_GREW_MAGIC_BEANSTALK)
EVT_LOOP(0)
EVT_WAIT(1)
EVT_IF_EQ(GB_StoryProgress, STORY_CH6_WISTERWOOD_GAVE_HINT)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_IF_EQ(GF_FLO00_PlacedFertileSoil, TRUE)
EVT_IF_EQ(GF_FLO00_PlacedMagicalBean, FALSE)
EVT_CALL(MakeItemEntity, ITEM_FERTILE_SOIL, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0)
EVT_ELSE
EVT_CALL(MakeItemEntity, ITEM_MAGICAL_BEAN, BEANSTALK_BASE_X, 0, BEANSTALK_BASE_Z, ITEM_SPAWN_MODE_DECORATION, 0)
EVT_END_IF
EVT_SET(MV_BeanstalkItemEntity, LVar0)
EVT_END_IF
EVT_BIND_PADLOCK(EVT_PTR(N(EVS_BeanPatch_TryInteract)), TRIGGER_FORCE_ACTIVATE, 0, EVT_PTR(N(BeanstalkIngredients)), 0, 1)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupBeanstalk) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_Exit_Beanstalk)), TRIGGER_FLOOR_TOUCH, COLLIDER_o240, 1, 0)
EVT_CALL(EnableGroup, MODEL_ha, TRUE)
EVT_CALL(EnableGroup, MODEL_tuta, TRUE)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_EQ(STORY_CH6_WISTERWOOD_GAVE_HINT)
EVT_SET(LVar0, -700)
EVT_EXEC(N(EVS_SetExteriorVineGrowth))
EVT_EXEC(N(EVS_SetInteriorVineGrowth))
EVT_SET(LVar0, 0)
EVT_EXEC(N(EVS_SetSproutGrowth))
EVT_SET(LVar0, 0)
EVT_EXEC(N(EVS_SetBigLeafGrowth))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK)
EVT_CASE_GE(STORY_CH6_GREW_MAGIC_BEANSTALK)
EVT_SET(LVar0, 1)
EVT_EXEC(N(EVS_SetSproutGrowth))
EVT_SET(LVar0, 1)
EVT_EXEC(N(EVS_SetBigLeafGrowth))
EVT_CASE_DEFAULT
EVT_SET(LVar0, -700)
EVT_EXEC(N(EVS_SetExteriorVineGrowth))
EVT_EXEC(N(EVS_SetInteriorVineGrowth))
EVT_SET(LVar0, 0)
EVT_EXEC(N(EVS_SetSproutGrowth))
EVT_SET(LVar0, 0)
EVT_EXEC(N(EVS_SetBigLeafGrowth))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o240, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o261, COLLIDER_FLAGS_UPPER_MASK)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,10 @@
#include "flo_00.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_IF_LT(GB_StoryProgress, STORY_EPILOGUE)
EVT_CALL(MakeEntity, EVT_PTR(Entity_SavePoint), 110, 60, -100, 0, MAKE_ENTITY_END)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,47 @@
// Older version of flo_03
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_03_shape.h"
#include "mapfs/flo_03_hit.h"
#include "sprite/npc/Petunia.h"
#include "sprite/npc/MontyMole.h"
#include "sprite/npc/Dayzee.h"
enum {
NPC_Petunia = 0,
NPC_Dayzee = 1,
NPC_MontyMole_01 = 2,
NPC_MontyMole_02 = 3,
NPC_MontyMole_03 = 4,
NPC_MontyMole_04 = 5,
};
enum {
MV_NextBurrowTime_Mole_01 = MapVar(10),
MV_NextBurrowTime_Mole_02 = MapVar(11),
MV_NextBurrowTime_Mole_03 = MapVar(12),
MV_NextBurrowTime_Mole_04 = MapVar(13),
MV_PauseBurrowing = MapVar(14),
MV_NextBurrowTriggerRadius = MapVar(15),
};
#define NAMESPACE dead_flo_03
extern EvtScript N(EVS_Main);
extern NpcGroupList N(DefaultNPCs);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_PushFlowerSong);
extern EvtScript N(EVS_PopSong);
extern EvtScript N(EVS_SetupFoliage);
extern EvtScript N(EVS_MakeEntities);
extern EvtScript N(EVS_Scene_SunReturns);
extern EvtScript N(EVS_SetupMoles);
extern EvtScript N(EVS_EmptyEntityHandler);

View File

@ -0,0 +1,15 @@
#include "flo_03.h"
EntryList N(Entrances) = {
[flo_03_ENTRY_0] { -325.0, 0.0, 0.0, 90.0 },
[flo_03_ENTRY_1] { 325.0, 0.0, 0.0, 270.0 },
[flo_03_ENTRY_2] { -325.0, 0.0, 0.0, 90.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_03 },
};

View File

@ -0,0 +1,45 @@
#include "flo_03.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_03_ENTRY_2)
EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8)
EVT_ELSE
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LE(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE)
EVT_CALL(SetMusicTrack, 0, SONG_MONTY_MOLE_ASSAULT, 0, 8)
EVT_ELSE
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_END_IF
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PushFlowerSong) = {
EVT_IF_GE(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, TRUE)
EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 0)
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PopSong) = {
EVT_IF_GE(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, TRUE)
EVT_CALL(FadeOutMusic, 0, 250)
EVT_WAIT(10)
EVT_CALL(PopSong)
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,51 @@
#include "flo_03.h"
#include "effects.h"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
API_CALLABLE(N(SpawnSunEffect)) {
fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_ExitWalk_flo_09_1) = EVT_EXIT_WALK(60, flo_03_ENTRY_0, "flo_09", flo_09_ENTRY_1);
EvtScript N(EVS_ExitWalk_flo_22_0) = EVT_EXIT_WALK(60, flo_03_ENTRY_1, "flo_22", flo_22_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_09_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_22_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_SET(AF_FLO_TreeDrop_RedBerry1, FALSE)
EVT_SET(AF_FLO_TreeDrop_RedBerry2, FALSE)
EVT_SET(AB_FLO_PetuniaDialogue, 0)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC_WAIT(N(EVS_SetupMoles))
EVT_EXEC(N(EVS_SetupFoliage))
EVT_EXEC(N(EVS_EmptyEntityHandler))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o160, SURFACE_TYPE_FLOWERS)
EVT_FLOWER_SPAWN_REGION( -145, -335, 182, -180, 0)
EVT_FLOWER_SPAWN_REGION( 200, -170, 310, 150, 0)
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_03_ENTRY_2)
EVT_EXEC(N(EVS_Scene_SunReturns))
EVT_ELSE
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,985 @@
#include "flo_03.h"
NpcSettings N(NpcSettings_Dayzee) = {
.height = 24,
.radius = 24,
.level = 99,
};
NpcSettings N(NpcSettings_Petunia) = {
.height = 56,
.radius = 40,
.level = 99,
};
#include "world/common/complete/GiveReward.inc.c"
Vec3i N(BurrowLocations_Mole_01)[] = {
{ -100, 0, 210 },
{ -160, 0, 285 },
{ -35, 0, 305 },
};
Vec3i N(BurrowLocations_Mole_02)[] = {
{ -190, 0, 80 },
{ -130, 0, 0 },
{ -70, 0, -60 },
};
Vec3i N(BurrowLocations_Mole_03)[] = {
{ 75, 0, -15 },
{ 35, 0, -100 },
{ 130, 0, 0 },
};
Vec3i N(BurrowLocations_Mole_04)[] = {
{ 115, 0, 180 },
{ 85, 0, 290 },
{ 145, 0, 140 },
};
EvtScript N(EVS_Scene_SunReturns) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(SetNpcYaw, NPC_Petunia, 90)
EVT_CALL(GetNpcPos, NPC_Petunia, 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(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.5))
EVT_CALL(SetCamPosA, CAM_DEFAULT, -27, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_Petunia, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_00C8)
EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Dance)
EVT_WAIT(10)
EVT_CALL(GotoMap, EVT_PTR("flo_18"), flo_18_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
API_CALLABLE(N(HideBehindTree)) {
Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID);
f32 posX, posZ, yaw, angle;
f64 dist;
// get a point 46 units away from the tree on the side opposite the player
yaw = clamp_angle(atan2(-210.0f, -183.0f, gPlayerStatus.position.x, gPlayerStatus.position.z) + 180.0f);
posX = -210.0f;
posZ = -183.0f;
add_vec2D_polar(&posX, &posZ, 46.0f, yaw);
// run or walk to target position, based on the distance from current position
dist = dist2D(npc->pos.x, npc->pos.z, posX, posZ);
if (dist > 2.0) {
f32 curAngle = clamp_angle(atan2(-210.0f, -183.0f, npc->pos.x, npc->pos.z));
f32 targetAngle = clamp_angle(atan2(-210.0f, -183.0f, posX, posZ));
f32 deltaAngle = curAngle - targetAngle;
if (abs(deltaAngle) > 20) {
angle = deltaAngle;
if (angle >= 180.0f) {
angle -= 360.0f;
}
if (angle <= -180.0f) {
angle += 360.0f;
}
if (deltaAngle == angle) {
posX = -210.0f;
posZ = -183.0f;
if (deltaAngle >= 0.0f) {
yaw = clamp_angle(curAngle - 20.0f);
} else {
yaw = clamp_angle(curAngle + 20.0f);
}
add_vec2D_polar(&posX, &posZ, 46.0f, yaw);
} else {
osSyncPrintf("cccc\n");
}
}
npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_RUN];
npc->yaw = atan2(npc->pos.x, npc->pos.z, posX, posZ);
npc_move_heading(npc, 2.0f, npc->yaw);
} else if (dist > 0.2) {
npc->yaw = atan2(npc->pos.x, npc->pos.z, posX, posZ);
npc->pos.x = posX;
npc->pos.z = posZ;
npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_WALK];
} else {
npc->pos.x = posX;
npc->pos.z = posZ;
npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_IDLE];
}
return ApiStatus_BLOCK;
}
EvtScript N(EVS_NpcAI_Dayzee) = {
EVT_CALL(N(HideBehindTree))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_Dayzee) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(OUTCOME_PLAYER_WON)
EVT_SET(GF_FLO03_Defeated_Dayzee, TRUE)
EVT_CALL(DoNpcDefeat)
EVT_CASE_EQ(OUTCOME_PLAYER_LOST)
EVT_CASE_EQ(OUTCOME_PLAYER_FLED)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_FocusCamBetween) = {
EVT_CALL(GetPlayerPos, LVar3, LVar1, LVar2)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, LVar3)
EVT_DIV(LVar0, 2)
EVT_CALL(SetCamProperties, CAM_DEFAULT, LVar4, LVar0, LVar1, LVar2, 300, EVT_FLOAT(20.0), EVT_FLOAT(-9.5))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Petunia) = {
EVT_EXEC_WAIT(N(EVS_PushFlowerSong))
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_SET(MV_PauseBurrowing, TRUE)
EVT_SET(LVar4, EVT_FLOAT(3.5))
EVT_EXEC_WAIT(N(EVS_FocusCamBetween))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0050)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0051)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim12)
EVT_CALL(SetNpcYaw, NPC_MontyMole_01, 270)
EVT_CALL(GetNpcPos, NPC_MontyMole_01, 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(90.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 200)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(20)
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, 0)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim16)
EVT_WAIT(10)
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_263, 0)
EVT_CALL(ShowEmote, NPC_MontyMole_01, EMOTE_QUESTION, -45, 30, TRUE, 0, 0, 0, 0)
EVT_CALL(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0052)
EVT_CALL(SetNpcYaw, NPC_MontyMole_02, 90)
EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 200)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim00)
EVT_WAIT(20)
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, 0)
EVT_CALL(SetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0053)
EVT_CALL(SetNpcYaw, NPC_MontyMole_03, 270)
EVT_CALL(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 200)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-8.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim14)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0054)
EVT_CALL(SetNpcYaw, NPC_MontyMole_04, 270)
EVT_CALL(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 200)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim06)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim07)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim08)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim16)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0055)
EVT_CALL(SetNpcPos, NPC_Dayzee, -233, 0, -217)
EVT_CALL(GetNpcPos, NPC_Dayzee, 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(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetNpcAnimation, NPC_Dayzee, ANIM_Dayzee_Anim0D)
EVT_CALL(PlaySoundAtNpc, NPC_Dayzee, SOUND_262, 0)
EVT_CALL(ShowEmote, NPC_Dayzee, EMOTE_EXCLAMATION, 45, 30, TRUE, 0, 0, 0, 0)
EVT_WAIT(15)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0056)
EVT_SET(LVar4, EVT_FLOAT(90.0))
EVT_EXEC_WAIT(N(EVS_FocusCamBetween))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0057)
EVT_CALL(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAGS_1, 0)
EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAGS_1, 0)
EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAGS_1, 0)
EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAGS_1, 0)
EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAGS_1, 0)
EVT_CALL(BindNpcAI, NPC_Dayzee, EVT_PTR(N(EVS_NpcAI_Dayzee)))
EVT_SET(MV_PauseBurrowing, FALSE)
EVT_SET(MV_NextBurrowTriggerRadius, 60)
EVT_SET(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0, MSG_CH6_0058)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Angry)
EVT_ELSE
EVT_SET(LVar4, EVT_FLOAT(3.5))
EVT_EXEC_WAIT(N(EVS_FocusCamBetween))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_HappyTalk, ANIM_Petunia_Dance, 0, MSG_CH6_0059)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_GiveItem)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Petunia_Idle)
EVT_GIVE_KEY_REWARD(ITEM_MAGICAL_BEAN)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005A)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Petunia_AngryTalk, ANIM_Petunia_Angry, 0)
EVT_SET(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN)
EVT_END_IF
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005B)
EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005C)
EVT_CASE_DEFAULT
EVT_IF_EQ(AB_FLO_PetuniaDialogue, 0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005D)
EVT_SET(AB_FLO_PetuniaDialogue, 1)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Petunia_Talk, ANIM_Petunia_Idle, 0, MSG_CH6_005E)
EVT_END_IF
EVT_END_SWITCH
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(8.0))
EVT_EXEC_WAIT(N(EVS_PopSong))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Petunia) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Petunia)))
EVT_IF_EQ(GF_FLO03_DefeatedAll_MontyMoles, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry)
EVT_ELSE
EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Dayzee) = {
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Dayzee)))
EVT_CALL(EnableNpcShadow, NPC_Dayzee, FALSE)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_CALL(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION)
EVT_CASE_DEFAULT
EVT_IF_EQ(GF_FLO03_Defeated_Dayzee, FALSE)
EVT_CALL(SetEnemyFlagBits, NPC_Dayzee, ENEMY_FLAGS_1, 0)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Dayzee)))
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_Dayzee, NPC_DISPOSE_LOCATION)
EVT_END_IF
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupMoles) = {
EVT_SET(MV_PauseBurrowing, FALSE)
EVT_SET(MV_NextBurrowTime_Mole_01, 0)
EVT_SET(MV_NextBurrowTime_Mole_02, 0)
EVT_SET(MV_NextBurrowTime_Mole_03, 0)
EVT_SET(MV_NextBurrowTime_Mole_04, 0)
EVT_SET(MV_NextBurrowTriggerRadius, 100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_MontyMole) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(OUTCOME_PLAYER_WON)
// record defeat
EVT_CALL(GetSelfNpcID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(NPC_MontyMole_01)
EVT_SET(GF_FLO03_Defeated_MontyMoleA, TRUE)
EVT_CASE_EQ(NPC_MontyMole_02)
EVT_SET(GF_FLO03_Defeated_MontyMoleB, TRUE)
EVT_CASE_EQ(NPC_MontyMole_03)
EVT_SET(GF_FLO03_Defeated_MontyMoleC, TRUE)
EVT_CASE_EQ(NPC_MontyMole_04)
EVT_SET(GF_FLO03_Defeated_MontyMoleD, TRUE)
EVT_END_SWITCH
// count number of defeated moles
EVT_SET(LVar0, 0)
EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleA)
EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleB)
EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleC)
EVT_ADD(LVar0, GF_FLO03_Defeated_MontyMoleD)
// end the mole-hunting minigame if all 4 are defeated
EVT_IF_NE(LVar0, 4)
EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Angry)
EVT_ELSE
EVT_CALL(SetNpcAnimation, NPC_Petunia, ANIM_Petunia_Idle)
EVT_SET(GF_FLO03_DefeatedAll_MontyMoles, TRUE)
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_END_IF
EVT_CALL(DoNpcDefeat)
EVT_CASE_EQ(OUTCOME_PLAYER_LOST)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01)
EVT_CASE_EQ(OUTCOME_PLAYER_FLED)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim01)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcHit_MontyMole) = {
EVT_IF_EQ(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_DEBUG_LOG(EVT_PTR("touch_choro\n"))
EVT_CALL(GetOwnerEncounterTrigger, LVar0)
EVT_DEBUG_PRINT_VAR(LVar0)
EVT_IF_NE(LVar0, ENCOUNTER_TRIGGER_NONE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_MontyMole_Dark_Anim05)
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_MontyMole_01) = {
#define LV_ShouldBurrow LVar3
EVT_LOOP(0)
EVT_IF_EQ(MV_NextBurrowTime_Mole_01, 0)
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, TRUE)
EVT_GOTO(0)
EVT_END_IF
EVT_SET(LV_ShouldBurrow, TRUE)
EVT_ELSE
EVT_LABEL(0)
EVT_CALL(GetNpcPos, NPC_MontyMole_01, LVar0, LVar1, LVar2)
EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow)
EVT_END_IF
EVT_CALL(GetCurrentPartner, LVar9)
EVT_IF_EQ(LVar9, PARTNER_BOW)
EVT_SET(LVar3, FALSE)
EVT_END_IF
EVT_IF_EQ(MV_PauseBurrowing, TRUE)
EVT_SET(LV_ShouldBurrow, FALSE)
EVT_END_IF
EVT_IF_EQ(LV_ShouldBurrow, TRUE)
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE)
EVT_CALL(NpcFacePlayer, NPC_MontyMole_01, 1)
EVT_WAIT(1)
EVT_SET(AF_FLO_IsUnderground_Mole_01, TRUE)
EVT_IF_NE(MV_NextBurrowTime_Mole_01, 0)
EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_SET(LVar1, 4)
EVT_ELSE
EVT_SET(LVar1, 10)
EVT_END_IF
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_262, 0)
EVT_CALL(ShowEmote, NPC_MontyMole_01, EMOTE_EXCLAMATION, 0, LVar1, TRUE, 0, 0, 0, 0)
EVT_WAIT(LVar1)
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 1)
EVT_END_IF
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_DIG, 0)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim11)
EVT_WAIT(20)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE)
EVT_CALL(SetNpcPos, NPC_MontyMole_01, 0, -50, 0)
EVT_END_IF
EVT_WAIT(45)
EVT_END_IF
EVT_ELSE
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_01, TRUE)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE)
EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_01)) - 1, LVar0)
EVT_ADD(LVar0, 1)
EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_01)))
EVT_LOOP(LVar0)
EVT_BUF_READ3(LVar1, LVar2, LVar3)
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_MontyMole_01, LVar1, LVar2, LVar3)
EVT_END_IF
EVT_CALL(SetNpcFlagBits, NPC_MontyMole_01, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE)
EVT_SET(AF_FLO_IsUnderground_Mole_01, FALSE)
EVT_CALL(NpcFacePlayer, NPC_MontyMole_01, 1)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_01, SOUND_BURROW_SURFACE, 0)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10)
EVT_WAIT(10)
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 0)
EVT_CALL(RandInt, 30, LVar0)
EVT_ADD(LVar0, 60)
EVT_SET(MV_NextBurrowTime_Mole_01, LVar0)
EVT_ELSE
EVT_IF_GT(MV_NextBurrowTime_Mole_01, 0)
EVT_SUB(MV_NextBurrowTime_Mole_01, 1)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_MontyMole_02) = {
#define LV_ShouldBurrow LVar3
EVT_LOOP(0)
EVT_IF_EQ(MV_NextBurrowTime_Mole_02, 0)
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, TRUE)
EVT_GOTO(0)
EVT_END_IF
EVT_SET(LV_ShouldBurrow, TRUE)
EVT_ELSE
EVT_LABEL(0)
EVT_CALL(GetNpcPos, NPC_MontyMole_02, LVar0, LVar1, LVar2)
EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow)
EVT_END_IF
EVT_CALL(GetCurrentPartner, LVar9)
EVT_IF_EQ(LVar9, PARTNER_BOW)
EVT_SET(LV_ShouldBurrow, FALSE)
EVT_END_IF
EVT_IF_EQ(MV_PauseBurrowing, TRUE)
EVT_SET(LV_ShouldBurrow, FALSE)
EVT_END_IF
EVT_IF_EQ(LV_ShouldBurrow, TRUE)
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE)
EVT_CALL(NpcFacePlayer, NPC_MontyMole_02, 1)
EVT_WAIT(1)
EVT_SET(AF_FLO_IsUnderground_Mole_02, TRUE)
EVT_IF_NE(MV_NextBurrowTime_Mole_02, 0)
EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_SET(LVar1, 4)
EVT_ELSE
EVT_SET(LVar1, 10)
EVT_END_IF
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_262, 0)
EVT_CALL(ShowEmote, NPC_MontyMole_02, EMOTE_EXCLAMATION, 0, LVar1, TRUE, 0, 0, 0, 0)
EVT_WAIT(LVar1)
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 1)
EVT_END_IF
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_DIG, 0)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim11)
EVT_WAIT(20)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE)
EVT_CALL(SetNpcPos, NPC_MontyMole_02, 0, -50, 0)
EVT_END_IF
EVT_WAIT(45)
EVT_END_IF
EVT_ELSE
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_02, TRUE)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE)
EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_02)) - 1, LVar0)
EVT_ADD(LVar0, 1)
EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_02)))
EVT_LOOP(LVar0)
EVT_BUF_READ3(LVar1, LVar2, LVar3)
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_MontyMole_02, LVar1, LVar2, LVar3)
EVT_END_IF
EVT_CALL(SetNpcFlagBits, NPC_MontyMole_02, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE)
EVT_SET(AF_FLO_IsUnderground_Mole_02, FALSE)
EVT_CALL(NpcFacePlayer, NPC_MontyMole_02, 1)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_02, SOUND_BURROW_SURFACE, 0)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10)
EVT_WAIT(10)
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 0)
EVT_CALL(RandInt, 35, LVar0)
EVT_ADD(LVar0, 55)
EVT_SET(MV_NextBurrowTime_Mole_02, LVar0)
EVT_ELSE
EVT_IF_GT(MV_NextBurrowTime_Mole_02, 0)
EVT_SUB(MV_NextBurrowTime_Mole_02, 1)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_MontyMole_03) = {
#define LV_ShouldBurrow LVar3
EVT_LOOP(0)
EVT_IF_EQ(MV_NextBurrowTime_Mole_03, 0)
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, TRUE)
EVT_GOTO(0)
EVT_END_IF
EVT_SET(LV_ShouldBurrow, TRUE)
EVT_ELSE
EVT_LABEL(0)
EVT_CALL(GetNpcPos, NPC_MontyMole_03, LVar0, LVar1, LVar2)
EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow)
EVT_END_IF
EVT_CALL(GetCurrentPartner, LVar9)
EVT_IF_EQ(LVar9, PARTNER_BOW)
EVT_SET(LV_ShouldBurrow, FALSE)
EVT_END_IF
EVT_IF_EQ(MV_PauseBurrowing, TRUE)
EVT_SET(LV_ShouldBurrow, FALSE)
EVT_END_IF
EVT_IF_EQ(LV_ShouldBurrow, TRUE)
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE)
EVT_CALL(NpcFacePlayer, NPC_MontyMole_03, 1)
EVT_WAIT(1)
EVT_SET(AF_FLO_IsUnderground_Mole_03, TRUE)
EVT_IF_NE(MV_NextBurrowTime_Mole_03, 0)
EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_SET(LVar1, 4)
EVT_ELSE
EVT_SET(LVar1, 10)
EVT_END_IF
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_262, 0)
EVT_CALL(ShowEmote, NPC_MontyMole_03, EMOTE_EXCLAMATION, 0, LVar1, TRUE, 0, 0, 0, 0)
EVT_WAIT(LVar1)
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 1)
EVT_END_IF
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_DIG, 0)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim11)
EVT_WAIT(20)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE)
EVT_CALL(SetNpcPos, NPC_MontyMole_03, 0, -50, 0)
EVT_END_IF
EVT_WAIT(45)
EVT_END_IF
EVT_ELSE
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_03, TRUE)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE)
EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_03)) - 1, LVar0)
EVT_ADD(LVar0, 1)
EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_03)))
EVT_LOOP(LVar0)
EVT_BUF_READ3(LVar1, LVar2, LVar3)
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_MontyMole_03, LVar1, LVar2, LVar3)
EVT_END_IF
EVT_CALL(SetNpcFlagBits, NPC_MontyMole_03, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE)
EVT_SET(AF_FLO_IsUnderground_Mole_03, FALSE)
EVT_CALL(NpcFacePlayer, NPC_MontyMole_03, 1)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_03, SOUND_BURROW_SURFACE, 0)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10)
EVT_WAIT(10)
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 0)
EVT_CALL(RandInt, 40, LVar0)
EVT_ADD(LVar0, 50)
EVT_SET(MV_NextBurrowTime_Mole_03, LVar0)
EVT_ELSE
EVT_IF_GT(MV_NextBurrowTime_Mole_03, 0)
EVT_SUB(MV_NextBurrowTime_Mole_03, 1)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_MontyMole_04) = {
#define LV_ShouldBurrow LVar3
EVT_LOOP(0)
EVT_IF_EQ(MV_NextBurrowTime_Mole_04, 0)
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, TRUE)
EVT_GOTO(0)
EVT_END_IF
EVT_SET(LV_ShouldBurrow, TRUE)
EVT_ELSE
EVT_LABEL(0)
EVT_CALL(GetNpcPos, NPC_MontyMole_04, LVar0, LVar1, LVar2)
EVT_CALL(IsPlayerWithin, LVar0, LVar2, MV_NextBurrowTriggerRadius, LV_ShouldBurrow)
EVT_END_IF
EVT_CALL(GetCurrentPartner, LVar9)
EVT_IF_EQ(LVar9, PARTNER_BOW)
EVT_SET(LV_ShouldBurrow, FALSE)
EVT_END_IF
EVT_IF_EQ(MV_PauseBurrowing, TRUE)
EVT_SET(LV_ShouldBurrow, FALSE)
EVT_END_IF
EVT_IF_EQ(LV_ShouldBurrow, TRUE)
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE)
EVT_CALL(NpcFacePlayer, NPC_MontyMole_04, 1)
EVT_WAIT(1)
EVT_SET(AF_FLO_IsUnderground_Mole_04, TRUE)
EVT_IF_NE(MV_NextBurrowTime_Mole_04, 0)
EVT_IF_LT(GB_StoryProgress, STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_SET(LVar1, 4)
EVT_ELSE
EVT_SET(LVar1, 10)
EVT_END_IF
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_262, 0)
EVT_CALL(ShowEmote, NPC_MontyMole_04, EMOTE_EXCLAMATION, 0, LVar1, TRUE, 0, 0, 0, 0)
EVT_WAIT(LVar1)
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 1)
EVT_END_IF
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_DIG, 0)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim11)
EVT_WAIT(20)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE)
EVT_CALL(SetNpcPos, NPC_MontyMole_04, 0, -50, 0)
EVT_END_IF
EVT_WAIT(45)
EVT_END_IF
EVT_ELSE
EVT_IF_EQ(AF_FLO_IsUnderground_Mole_04, TRUE)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE)
EVT_CALL(RandInt, ARRAY_COUNT(N(BurrowLocations_Mole_04)) - 1, LVar0)
EVT_ADD(LVar0, 1)
EVT_USE_BUF(EVT_PTR(N(BurrowLocations_Mole_04)))
EVT_LOOP(LVar0)
EVT_BUF_READ3(LVar1, LVar2, LVar3)
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_MontyMole_04, LVar1, LVar2, LVar3)
EVT_END_IF
EVT_CALL(SetNpcFlagBits, NPC_MontyMole_04, NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_8000, TRUE)
EVT_SET(AF_FLO_IsUnderground_Mole_04, FALSE)
EVT_CALL(NpcFacePlayer, NPC_MontyMole_04, 1)
EVT_WAIT(1)
EVT_CALL(PlaySoundAtNpc, NPC_MontyMole_04, SOUND_BURROW_SURFACE, 0)
EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10)
EVT_WAIT(10)
EVT_CALL(SetSelfEnemyFlagBits, ENEMY_FLAGS_100000 | ENEMY_FLAGS_IGNORE_TOUCH | ENEMY_FLAGS_IGNORE_JUMP | ENEMY_FLAGS_IGNORE_HAMMER | ENEMY_FLAGS_10000000, 0)
EVT_CALL(RandInt, 45, LVar0)
EVT_ADD(LVar0, 45)
EVT_SET(MV_NextBurrowTime_Mole_04, LVar0)
EVT_ELSE
EVT_IF_GT(MV_NextBurrowTime_Mole_04, 0)
EVT_SUB(MV_NextBurrowTime_Mole_04, 1)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_MontyMole_01) = {
EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole)))
EVT_CALL(EnableNpcShadow, NPC_MontyMole_01, FALSE)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_01)))
EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10)
EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleA, FALSE)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_01)))
EVT_CALL(SetNpcAnimation, NPC_MontyMole_01, ANIM_MontyMole_Dark_Anim10)
EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_01, ENEMY_FLAGS_1, 0)
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION)
EVT_END_IF
EVT_CASE_DEFAULT
EVT_CALL(SetNpcPos, NPC_MontyMole_01, NPC_DISPOSE_LOCATION)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_MontyMole_02) = {
EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole)))
EVT_CALL(EnableNpcShadow, NPC_MontyMole_02, FALSE)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_02)))
EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10)
EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleB, FALSE)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_02)))
EVT_CALL(SetNpcAnimation, NPC_MontyMole_02, ANIM_MontyMole_Dark_Anim10)
EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_02, ENEMY_FLAGS_1, 0)
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION)
EVT_END_IF
EVT_CASE_DEFAULT
EVT_CALL(SetNpcPos, NPC_MontyMole_02, NPC_DISPOSE_LOCATION)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_MontyMole_03) = {
EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole)))
EVT_CALL(EnableNpcShadow, NPC_MontyMole_03, FALSE)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_03)))
EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10)
EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleC, FALSE)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_03)))
EVT_CALL(SetNpcAnimation, NPC_MontyMole_03, ANIM_MontyMole_Dark_Anim10)
EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_03, ENEMY_FLAGS_1, 0)
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION)
EVT_END_IF
EVT_CASE_DEFAULT
EVT_CALL(SetNpcPos, NPC_MontyMole_03, NPC_DISPOSE_LOCATION)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_MontyMole_04) = {
EVT_CALL(BindNpcHit, NPC_SELF, EVT_PTR(N(EVS_NpcHit_MontyMole)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_MontyMole)))
EVT_CALL(EnableNpcShadow, NPC_MontyMole_04, FALSE)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_04)))
EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10)
EVT_CASE_EQ(STORY_CH6_ASKED_TO_DEFEAT_MONTY_MOLES)
EVT_IF_EQ(GF_FLO03_Defeated_MontyMoleD, FALSE)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_MontyMole_04)))
EVT_CALL(SetNpcAnimation, NPC_MontyMole_04, ANIM_MontyMole_Dark_Anim10)
EVT_CALL(SetEnemyFlagBits, NPC_MontyMole_04, ENEMY_FLAGS_1, 0)
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION)
EVT_END_IF
EVT_CASE_DEFAULT
EVT_CALL(SetNpcPos, NPC_MontyMole_04, NPC_DISPOSE_LOCATION)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Petunia) = {
.id = NPC_Petunia,
.settings = &N(NpcSettings_Petunia),
.pos = { -30.0f, 0.0f, 100.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Petunia),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Petunia_Idle,
.walk = ANIM_Petunia_Idle,
.run = ANIM_Petunia_Idle,
.chase = ANIM_Petunia_Idle,
.anim_4 = ANIM_Petunia_Idle,
.anim_5 = ANIM_Petunia_Idle,
.death = ANIM_Petunia_Idle,
.hit = ANIM_Petunia_Idle,
.anim_8 = ANIM_Petunia_Idle,
.anim_9 = ANIM_Petunia_Idle,
.anim_A = ANIM_Petunia_Idle,
.anim_B = ANIM_Petunia_Idle,
.anim_C = ANIM_Petunia_Idle,
.anim_D = ANIM_Petunia_Idle,
.anim_E = ANIM_Petunia_Idle,
.anim_F = ANIM_Petunia_Idle,
},
.tattle = MSG_NpcTattle_Petunia,
};
StaticNpc N(NpcData_Dayzee) = {
.id = NPC_Dayzee,
.settings = &N(NpcSettings_Dayzee),
.pos = { -233.0f, 0.0f, -217.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Dayzee),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Dayzee_Anim01,
.walk = ANIM_Dayzee_Anim02,
.run = ANIM_Dayzee_Anim03,
.chase = ANIM_Dayzee_Anim03,
.anim_4 = ANIM_Dayzee_Anim01,
.anim_5 = ANIM_Dayzee_Anim01,
.death = ANIM_Dayzee_Anim08,
.hit = ANIM_Dayzee_Anim08,
.anim_8 = ANIM_Dayzee_Anim06,
.anim_9 = ANIM_Dayzee_Anim07,
.anim_A = ANIM_Dayzee_Anim01,
.anim_B = ANIM_Dayzee_Anim01,
.anim_C = ANIM_Dayzee_Anim01,
.anim_D = ANIM_Dayzee_Anim01,
.anim_E = ANIM_Dayzee_Anim01,
.anim_F = ANIM_Dayzee_Anim01,
},
};
StaticNpc N(NpcData_MontyMole_01) = {
.id = NPC_MontyMole_01,
.settings = &N(NpcSettings_Dayzee),
.pos = { -100.0f, 0.0f, 210.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_MontyMole_01),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_MontyMole_Dark_Anim01,
.walk = ANIM_MontyMole_Dark_Anim02,
.run = ANIM_MontyMole_Dark_Anim03,
.chase = ANIM_MontyMole_Dark_Anim03,
.anim_4 = ANIM_MontyMole_Dark_Anim01,
.anim_5 = ANIM_MontyMole_Dark_Anim01,
.death = ANIM_MontyMole_Dark_Anim05,
.hit = ANIM_MontyMole_Dark_Anim05,
.anim_8 = ANIM_MontyMole_Dark_Anim00,
.anim_9 = ANIM_MontyMole_Dark_Anim00,
.anim_A = ANIM_MontyMole_Dark_Anim00,
.anim_B = ANIM_MontyMole_Dark_Anim00,
.anim_C = ANIM_MontyMole_Dark_Anim00,
.anim_D = ANIM_MontyMole_Dark_Anim00,
.anim_E = ANIM_MontyMole_Dark_Anim00,
.anim_F = ANIM_MontyMole_Dark_Anim00,
},
};
StaticNpc N(NpcData_MontyMole_02) = {
.id = NPC_MontyMole_02,
.settings = &N(NpcSettings_Dayzee),
.pos = { -130.0f, 0.0f, 0.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_MontyMole_02),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_MontyMole_Dark_Anim01,
.walk = ANIM_MontyMole_Dark_Anim02,
.run = ANIM_MontyMole_Dark_Anim03,
.chase = ANIM_MontyMole_Dark_Anim03,
.anim_4 = ANIM_MontyMole_Dark_Anim01,
.anim_5 = ANIM_MontyMole_Dark_Anim01,
.death = ANIM_MontyMole_Dark_Anim05,
.hit = ANIM_MontyMole_Dark_Anim05,
.anim_8 = ANIM_MontyMole_Dark_Anim00,
.anim_9 = ANIM_MontyMole_Dark_Anim00,
.anim_A = ANIM_MontyMole_Dark_Anim00,
.anim_B = ANIM_MontyMole_Dark_Anim00,
.anim_C = ANIM_MontyMole_Dark_Anim00,
.anim_D = ANIM_MontyMole_Dark_Anim00,
.anim_E = ANIM_MontyMole_Dark_Anim00,
.anim_F = ANIM_MontyMole_Dark_Anim00,
},
};
StaticNpc N(NpcData_MontyMole_03) = {
.id = NPC_MontyMole_03,
.settings = &N(NpcSettings_Dayzee),
.pos = { 75.0f, 0.0f, 20.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_MontyMole_03),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_MontyMole_Dark_Anim01,
.walk = ANIM_MontyMole_Dark_Anim02,
.run = ANIM_MontyMole_Dark_Anim03,
.chase = ANIM_MontyMole_Dark_Anim03,
.anim_4 = ANIM_MontyMole_Dark_Anim01,
.anim_5 = ANIM_MontyMole_Dark_Anim01,
.death = ANIM_MontyMole_Dark_Anim05,
.hit = ANIM_MontyMole_Dark_Anim05,
.anim_8 = ANIM_MontyMole_Dark_Anim00,
.anim_9 = ANIM_MontyMole_Dark_Anim00,
.anim_A = ANIM_MontyMole_Dark_Anim00,
.anim_B = ANIM_MontyMole_Dark_Anim00,
.anim_C = ANIM_MontyMole_Dark_Anim00,
.anim_D = ANIM_MontyMole_Dark_Anim00,
.anim_E = ANIM_MontyMole_Dark_Anim00,
.anim_F = ANIM_MontyMole_Dark_Anim00,
},
};
StaticNpc N(NpcData_MontyMole_04) = {
.id = NPC_MontyMole_04,
.settings = &N(NpcSettings_Dayzee),
.pos = { 71.0f, 0.0f, 200.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_MontyMole_04),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_MontyMole_Dark_Anim01,
.walk = ANIM_MontyMole_Dark_Anim02,
.run = ANIM_MontyMole_Dark_Anim03,
.chase = ANIM_MontyMole_Dark_Anim03,
.anim_4 = ANIM_MontyMole_Dark_Anim01,
.anim_5 = ANIM_MontyMole_Dark_Anim01,
.death = ANIM_MontyMole_Dark_Anim05,
.hit = ANIM_MontyMole_Dark_Anim05,
.anim_8 = ANIM_MontyMole_Dark_Anim00,
.anim_9 = ANIM_MontyMole_Dark_Anim00,
.anim_A = ANIM_MontyMole_Dark_Anim00,
.anim_B = ANIM_MontyMole_Dark_Anim00,
.anim_C = ANIM_MontyMole_Dark_Anim00,
.anim_D = ANIM_MontyMole_Dark_Anim00,
.anim_E = ANIM_MontyMole_Dark_Anim00,
.anim_F = ANIM_MontyMole_Dark_Anim00,
},
};
// dead formation IDs differ from the current
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Petunia)),
NPC_GROUP(N(NpcData_Dayzee), 0x1A0F, BTL_FLO_STAGE_01),
NPC_GROUP(N(NpcData_MontyMole_01), 0x1B02, BTL_FLO2_STAGE_01),
NPC_GROUP(N(NpcData_MontyMole_02), 0x1B01, BTL_FLO2_STAGE_01),
NPC_GROUP(N(NpcData_MontyMole_03), 0x1B03, BTL_FLO2_STAGE_01),
NPC_GROUP(N(NpcData_MontyMole_04), 0x1B04, BTL_FLO2_STAGE_01),
{}
};

View File

@ -0,0 +1,56 @@
#include "flo_03.h"
#include "common/foliage.inc.c"
FoliageModelList N(Tree1_LeafModels) = {
.count = 1,
.models = {
MODEL_o170,
}
};
FoliageModelList N(Tree1_TrunkModels) = {
.count = 1,
.models = {
MODEL_o157,
}
};
FoliageDropList N(Tree1_Drops) = {
.count = 2,
.drops = {
{
.itemID = ITEM_RED_BERRY,
.pos = { -256, 102, -169 },
.spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS,
.spawnFlag = AF_FLO_TreeDrop_RedBerry1,
},
{
.itemID = ITEM_RED_BERRY,
.pos = { -156, 102, -169 },
.spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS,
.spawnFlag = AF_FLO_TreeDrop_RedBerry2,
},
}
};
ShakeTreeConfig N(ShakeTree_Tree1) = {
.leaves = &N(Tree1_LeafModels),
.trunk = &N(Tree1_TrunkModels),
.drops = &N(Tree1_Drops),
};
BombTrigger N(BombPos_Tree1) = {
.pos = { -208.0f, 0.0f, -182.0f },
.radius = 0.0f
};
EvtScript N(EVS_SetupFoliage) = {
EVT_SET(AF_FLO_TreeDrop_RedBerry1, FALSE)
EVT_SET(AF_FLO_TreeDrop_RedBerry2, FALSE)
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1)))
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o242, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,14 @@
#include "flo_03.h"
#include "entity.h"
EvtScript N(EVS_EmptyEntityHandler) = {
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_HiddenPanel), -175, 0, 150, 0, MODEL_o56, MAKE_ENTITY_END)
EVT_CALL(AssignPanelFlag, GF_FLO03_HiddenPanel)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,31 @@
// Older version of flo_07
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_07_shape.h"
#include "mapfs/flo_07_hit.h"
enum {
NPC_Posie = 0,
};
enum {
MV_GroundShakingScript = MapVar(0),
};
#define NAMESPACE dead_flo_07
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_PushFlowerSong);
extern EvtScript N(EVS_PopSong);
extern EvtScript N(EVS_Scene_SunReturns);
extern EvtScript N(EVS_TryKickingPlayerOut);
extern EvtScript N(EVS_SetupFoliage);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,14 @@
#include "flo_07.h"
EntryList N(Entrances) = {
[flo_07_ENTRY_0] { 375.0, 0.0, 0.0, 270.0 },
[flo_07_ENTRY_1] { 325.0, 0.0, 0.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_07 },
};

View File

@ -0,0 +1,32 @@
#include "flo_07.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_07_ENTRY_1)
EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8)
EVT_ELSE
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_END_IF
EVT_CALL(PlaySound, SOUND_80000021)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PushFlowerSong) = {
EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 1)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PopSong) = {
EVT_CALL(FadeOutMusic, 0, 250)
EVT_WAIT(10)
EVT_CALL(PopSong)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,77 @@
#include "flo_07.h"
#include "world/common/atomic/TexturePan.inc.c"
#include "world/common/atomic/TexturePan.data.inc.c"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
#include "world/common/todo/SpawnSunEffect.inc.c"
EvtScript N(EVS_ExitWalk_flo_25_1) = EVT_EXIT_WALK(60, flo_07_ENTRY_0, "flo_25", flo_25_ENTRY_1);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_25_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
API_CALLABLE(N(CreateCrystalTreeSparkles)) {
EffectInstance* effect = fx_misc_particles(3, -272.0f, 80.0f, 20.0f, 200.0f, 120.0f, 4.0f, 8, 0);
effect->data.miscParticles->innerColor.r = 240;
effect->data.miscParticles->innerColor.g = 240;
effect->data.miscParticles->innerColor.b = 240;
effect->data.miscParticles->glowColor.r = 230;
effect->data.miscParticles->glowColor.g = 230;
effect->data.miscParticles->glowColor.b = 240;
return ApiStatus_DONE2;
}
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_SET(AF_FLO_MadeCrystalBerry, FALSE)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_SetupFoliage))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o76, SURFACE_TYPE_FLOWERS)
EVT_FLOWER_SPAWN_REGION( 297, -95, 383, -65, 0 )
EVT_FLOWER_SPAWN_REGION( 293, 71, 378, 113, 0 )
EVT_FLOWER_SPAWN_REGION( 21, -346, 147, -242, 20 )
EVT_FLOWER_SPAWN_REGION( -350, -190, -81, -106, 0 )
EVT_FLOWER_SPAWN_REGION( -380, 85, -95, 150, 0 )
EVT_CALL(EnableTexPanning, MODEL_o51, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o36, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o37, TRUE)
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_2)
TEX_PAN_PARAMS_STEP( -100, 100, 0, 0)
TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_3)
TEX_PAN_PARAMS_STEP( 0,-1200, 0, 0)
TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_07_ENTRY_1)
EVT_EXEC(N(EVS_Scene_SunReturns))
EVT_ELSE
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_EXEC(N(EVS_TryKickingPlayerOut))
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
EVT_CALL(N(CreateCrystalTreeSparkles))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,262 @@
#include "flo_07.h"
#include "world/common/npc/Posie.inc.c"
#include "common/foliage.inc.c"
#include "world/common/complete/GiveReward.inc.c"
EvtScript N(EVS_Scene_SunReturns) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(GetNpcPos, NPC_Posie, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 300)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(11.0), EVT_FLOAT(-11.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_00C5)
EVT_WAIT(10)
EVT_CALL(GotoMap, EVT_PTR("flo_10"), flo_10_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ShakeGround) = {
EVT_LABEL(0)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 1, EVT_FLOAT(1.0))
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeCrystalBerry) = {
EVT_IF_EQ(AF_FLO_MadeCrystalBerry, TRUE)
EVT_RETURN
EVT_END_IF
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0068)
EVT_THREAD
EVT_CALL(SetCamDistance, CAM_DEFAULT, 300)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.5))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.5))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_END_THREAD
EVT_CALL(PlaySound, SOUND_8000006B)
EVT_EXEC_GET_TID(N(EVS_ShakeGround), MV_GroundShakingScript)
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Strain, ANIM_Posie_Strain, 0, MSG_CH6_0069)
EVT_KILL_THREAD(MV_GroundShakingScript)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 350)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-7.5))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(8.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_SUB(LVar0, LVar2)
EVT_IF_LT(LVar0, -250)
EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 100, -25, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry)
EVT_ELSE
EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 100, 54, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO07_Item_CrystalBerry)
EVT_SET(GF_FLO07_CrystalBerryFellOnLeftSide, TRUE)
EVT_END_IF
EVT_CALL(PlaySound, SOUND_7BC)
EVT_CALL(func_802D62E4, 956)
EVT_SET(AF_FLO_MadeCrystalBerry, TRUE)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006A)
EVT_SET(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Posie) = {
EVT_EXEC_WAIT(N(EVS_PushFlowerSong))
EVT_CALL(NpcFacePlayer, NPC_SELF, 1)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN)
EVT_IF_EQ(AF_FLO_PoiseHintDialogue, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0070)
EVT_SET(AF_FLO_PoiseHintDialogue, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0071)
EVT_END_IF
EVT_CASE_LT(STORY_CH6_GOT_FERTILE_SOIL)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(350.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.5))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0065)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Posie_GiveItem)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Posie_Still)
EVT_GIVE_KEY_REWARD(ITEM_FERTILE_SOIL)
EVT_SET(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0066)
EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE)
EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry))
EVT_END_IF
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY)
EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE)
EVT_IF_EQ(AF_FLO_MadeCrystalBerry, FALSE)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, EVT_FLOAT(350.0), EVT_FLOAT(18.0), EVT_FLOAT(-7.5))
EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry))
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072)
EVT_END_IF
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072)
EVT_END_IF
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0072)
EVT_ELSE
EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0073)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0074)
EVT_END_IF
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0075)
EVT_END_IF
EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0076)
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_0077)
EVT_END_SWITCH
EVT_EXEC_WAIT(N(EVS_PopSong))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Posie) = {
EVT_IF_EQ(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY)
EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE)
EVT_IF_EQ(GF_FLO07_CrystalBerryFellOnLeftSide, FALSE)
EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -225, 0, -25, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry)
EVT_ELSE
EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -265, 0, 54, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO07_Item_CrystalBerry)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_SET(AF_FLO_PoiseHintDialogue, FALSE)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Posie)))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_TryKickingPlayerOut) = {
EVT_IF_NE(AB_FLO_PoiseKickedOutCount, 0)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(10)
EVT_IF_LT(AB_FLO_PoiseKickedOutCount, 5)
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006E)
EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3)
EVT_CALL(PlayerMoveTo, 410, LVar3, 10)
EVT_ADD(AB_FLO_PoiseKickedOutCount, 1)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Talk, ANIM_Posie_Idle, 0, MSG_CH6_006F)
EVT_SET(AB_FLO_PoiseKickedOutCount, 0)
EVT_END_IF
EVT_CALL(DisablePlayerInput, FALSE)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_OnHit_CrystalTree) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_CRYSTAL_BERRY)
EVT_CALL(NpcFacePlayer, NPC_Posie, 1)
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067)
EVT_IF_EQ(GB_StoryProgress, STORY_CH6_GOT_FERTILE_SOIL)
EVT_IF_EQ(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -250, 0, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, -250, 0, 0)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 350)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_EXEC_WAIT(N(EVS_MakeCrystalBerry))
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_END_IF
EVT_END_IF
EVT_ELSE
EVT_IF_EQ(GF_FLO07_Item_CrystalBerry, FALSE)
EVT_CALL(NpcFacePlayer, NPC_Posie, 1)
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_Confused, ANIM_Posie_Idle, 0, MSG_CH6_0067)
EVT_ELSE
EVT_ADD(AB_FLO_CrystalTreeHitCount, 1)
EVT_SWITCH(AB_FLO_CrystalTreeHitCount)
EVT_CASE_LT(2)
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006B)
EVT_CASE_LT(5)
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006C)
EVT_CASE_GE(5)
EVT_CALL(SpeakToPlayer, NPC_Posie, ANIM_Posie_TalkAngry, ANIM_Posie_Idle, 0, MSG_CH6_006D)
EVT_SET(AB_FLO_PoiseKickedOutCount, 1)
EVT_CALL(GotoMap, EVT_PTR("flo_25"), flo_25_ENTRY_1)
EVT_WAIT(100)
EVT_END_SWITCH
EVT_END_IF
EVT_END_IF
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
FoliageModelList N(CrystalTree_LeafModels) = {
.count = 3,
.models = {
MODEL_o6,
MODEL_o7,
MODEL_o8,
}
};
FoliageModelList N(CrystalTree_TrunkModels) = {
.count = 1,
.models = {
MODEL_o5,
}
};
ShakeTreeConfig N(ShakeTree_CrystalTree) = {
.leaves = &N(CrystalTree_LeafModels),
.trunk = &N(CrystalTree_TrunkModels),
.callback = &N(EVS_OnHit_CrystalTree),
};
BombTrigger N(BombPos_CrystalTree) = {
.pos = { -309.0f, 0.0f, 31.0f },
.radius = 0.0f
};
EvtScript N(EVS_SetupFoliage) = {
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_CrystalTree)))
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o5, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_CrystalTree)), 1, 0)
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Posie) = {
.id = NPC_Posie,
.settings = &N(NpcSettings_Posie),
.pos = { -260.0f, 0.0f, 0.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Posie),
.drops = POSIE_DROPS,
.animations = POSIE_ANIMS,
.tattle = MSG_NpcTattle_Posie,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Posie)),
{}
};

View File

@ -0,0 +1,36 @@
// Older version of flo_08
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_08_shape.h"
#include "mapfs/flo_08_hit.h"
enum {
NPC_GateFlower = 0,
NPC_Dayzee_01 = 1,
NPC_Dayzee_02 = 2,
NPC_Dayzee_03 = 3,
NPC_Dayzee_04 = 4,
NPC_Dayzee_05 = 5,
NPC_Dayzee_06 = 6,
NPC_Dayzee_07 = 7,
NPC_AmazyDayzee = 8,
};
enum {
MV_SuperBlock = MapVar(0),
};
#define NAMESPACE dead_flo_08
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern EvtScript N(EVS_SetupFoliage);
extern EvtScript N(EVS_SetupVines);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,14 @@
#include "flo_08.h"
EntryList N(Entrances) = {
[flo_08_ENTRY_0] { -870.0, 0.0, 0.0, 90.0 },
[flo_08_ENTRY_1] { 570.0, 0.0, 0.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_08 },
};

View File

@ -0,0 +1,12 @@
#include "flo_08.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,14 @@
#include "flo_08.h"
#include "entity.h"
#define SUPER_BLOCK_MAPVAR MV_SuperBlock
#define SUPER_BLOCK_GAMEFLAG GF_FLO08_SuperBlock
#include "world/common/entity/SuperBlock.inc.c"
#include "world/common/entity/SuperBlock.data.inc.c"
EvtScript N(EVS_MakeEntities) = {
EVT_MAKE_SUPER_BLOCK(-780, 120, -110, 0)
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 510, 0, -90, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO08_Item_StarPiece)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,83 @@
#include "flo_08.h"
#include "effects.h"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
API_CALLABLE(N(SpawnSunEffect)) {
fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_ExitWalk_flo_00_6) = EVT_EXIT_WALK(60, flo_08_ENTRY_0, "flo_00", flo_00_ENTRY_6);
EvtScript N(EVS_ExitWalk_flo_24_0) = EVT_EXIT_WALK(60, flo_08_ENTRY_1, "flo_24", flo_24_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_6)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_24_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
LavaReset N(SafeFloorColliders)[] = {
{ .colliderID = COLLIDER_o158, .pos = { -540.0, 0.0, 50.0 }},
{ .colliderID = COLLIDER_o132, .pos = { 60.0, 0.0, 50.0 }},
{ .colliderID = COLLIDER_o223, .pos = { 60.0, 0.0, 50.0 }},
{ .colliderID = -1 }
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupVines))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES)
EVT_THREAD
EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders)))
EVT_END_THREAD
EVT_CALL(EnableTexPanning, MODEL_o25, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o27, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o31, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o33, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o35, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o37, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o55, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o28, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o32, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o34, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o36, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o38, TRUE)
EVT_THREAD
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LABEL(0)
EVT_ADD(LVar0, 140)
EVT_IF_GT(LVar0, 0x10000)
EVT_ADD(LVar0, -0x10000)
EVT_END_IF
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0)
EVT_ADD(LVar1, -200)
EVT_IF_LT(LVar1, 0)
EVT_ADD(LVar1, 0x10000)
EVT_END_IF
EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_THREAD
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS)
EVT_FLOWER_SPAWN_REGION(140, -137, 340, -60, 0)
EVT_FLOWER_SPAWN_REGION(450, -137, 590, -60, 0)
EVT_EXEC(N(EVS_SetupFoliage))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,389 @@
#include "flo_08.h"
#include "world/common/enemy/complete/AmazyDayzee.inc.c"
#include "world/common/npc/GateFlower.inc.c"
#include "world/common/enemy/complete/CrazyDayzee.inc.c"
#include "world/common/complete/NormalItemChoice.inc.c"
static s32 N(FlowerGuard_ItemChoiceList)[ITEM_NUM_CONSUMABLES + 1];
#include "world/common/atomic/ItemChoice_FlowerGuard.inc.c"
EvtScript N(EVS_NpcInteract_GateFlower) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_IF_EQ(GF_FLO08_GaveYellowBerry, FALSE)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 350)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.5), EVT_FLOAT(-7.5))
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(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0042)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_Thinking)
EVT_CALL(N(FlowerGuard_MakeItemList))
EVT_CHOOSE_CONSUMABLE_FROM(N(FlowerGuard_ItemChoiceList), 0)
EVT_SWITCH(LVar0)
EVT_CASE_LE(0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0043)
EVT_CASE_DEFAULT
EVT_SET(LVar8, LVar0)
EVT_CALL(N(FlowerGuard_JudgeItemTastiness), LVar0)
EVT_CALL(MakeItemEntity, LVar8, -695, 20, -29, ITEM_SPAWN_MODE_DECORATION, 0)
EVT_SET(LVar7, LVar0)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2095, 0)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Eat)
EVT_WAIT(20)
EVT_CALL(RemoveItemEntity, LVar7)
EVT_SWITCH(LVar8)
EVT_CASE_EQ(160)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0046)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_21C, 0)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_OpenGate)
EVT_CALL(PlaySoundAtCollider, COLLIDER_o96, SOUND_METAL_GATE_OPEN, 0)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(MakeLerp, 0, 100, 30, EASING_QUADRATIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_SETF(LVar8, LVar0)
EVT_SETF(LVar9, LVar0)
EVT_MULF(LVar8, EVT_FLOAT(0.5))
EVT_MULF(LVar9, EVT_FLOAT(1.2))
EVT_CALL(RotateModel, MODEL_o69, LVar8, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o70, LVar8, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o71, LVar8, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o148, LVar9, 0, -1, 0)
EVT_CALL(RotateModel, MODEL_o149, LVar9, 0, -1, 0)
EVT_CALL(RotateModel, MODEL_o150, LVar9, 0, -1, 0)
EVT_WAIT(1)
EVT_IF_NE(LVar1, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance)
EVT_SET(GF_FLO08_GaveYellowBerry, TRUE)
EVT_CASE_EQ(159)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle)
EVT_CASE_EQ(158)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0045)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle)
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_Chew, ANIM_GateFlower_Yellow_Idle, 0, MSG_CH6_0044)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Disgust)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_2096, 0)
EVT_CALL(MakeItemEntity, LVar8, 125, 20, 0, ITEM_SPAWN_MODE_DECORATION, 0)
EVT_SET(LVar7, LVar0)
EVT_WAIT(5)
EVT_CALL(GetAngleToPlayer, NPC_SELF, LVar0)
EVT_IF_LT(LVar0, 180)
EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_SETF(LVar2, EVT_FLOAT(-0.5))
EVT_SETF(LVar3, EVT_FLOAT(-0.2))
EVT_SETF(LVar4, EVT_FLOAT(0.9))
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar0)
EVT_MULF(LVar4, LVar0)
EVT_ADDF(LVar2, EVT_FLOAT(-700.0))
EVT_ADDF(LVar3, EVT_FLOAT(15.0))
EVT_ADDF(LVar4, EVT_FLOAT(-25.0))
EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_ELSE
EVT_CALL(MakeLerp, 0, 100, 7, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_SETF(LVar2, EVT_FLOAT(0.5))
EVT_SETF(LVar3, EVT_FLOAT(-0.2))
EVT_SETF(LVar4, EVT_FLOAT(0.9))
EVT_MULF(LVar2, LVar0)
EVT_MULF(LVar3, LVar0)
EVT_MULF(LVar4, LVar0)
EVT_ADDF(LVar2, EVT_FLOAT(-690.0))
EVT_ADDF(LVar3, EVT_FLOAT(15.0))
EVT_ADDF(LVar4, EVT_FLOAT(-25.0))
EVT_CALL(N(FlowerGuard_SetItemEntityPosition), LVar7, LVar2, LVar3, LVar4)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_IF
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle)
EVT_CALL(RemoveItemEntity, LVar7)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_Idle)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_GateFlower_Yellow_Talk, ANIM_GateFlower_Yellow_Idle, 0)
EVT_END_SWITCH
EVT_END_SWITCH
EVT_THREAD
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(6.0))
EVT_END_THREAD
EVT_WAIT(10)
EVT_ELSE
EVT_IF_LT(GB_StoryProgress, STORY_CH6_STAR_SPIRIT_RESCUED)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0047)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_GateFlower_Yellow_HappyTalk, ANIM_GateFlower_Yellow_HappyIdle, 0, MSG_CH6_0048)
EVT_END_IF
EVT_END_IF
EVT_CALL(DisablePlayerInput, FALSE)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_GateFlower) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_GateFlower)))
EVT_IF_EQ(GF_FLO08_GaveYellowBerry, TRUE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_GateFlower_Yellow_HappyDance)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o96, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(RotateModel, MODEL_o69, 50, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o70, 50, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o71, 50, 0, 1, 0)
EVT_CALL(RotateModel, MODEL_o148, 120, 0, -1, 0)
EVT_CALL(RotateModel, MODEL_o149, 120, 0, -1, 0)
EVT_CALL(RotateModel, MODEL_o150, 120, 0, -1, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_GateFlower) = {
.id = NPC_GateFlower,
.settings = &N(NpcSettings_GateFlower),
.pos = { -695.0f, 0.0f, -30.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_8 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000 | ENEMY_FLAGS_400000,
.init = &N(EVS_NpcInit_GateFlower),
.drops = GATE_FLOWER_DROPS,
.animations = GATE_FLOWER_YELLOW_ANIMS,
.tattle = MSG_NpcTattle_YellowGateFlower,
};
StaticNpc N(NpcData_Dayzee_01) = {
.id = NPC_Dayzee_01,
.settings = &N(NpcSettings_CrazyDayzee),
.pos = { 205.0f, 0.0f, -80.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = CRAZY_DAYZEE_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 205, 0, -80 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 205, 0, -80 },
.detectSize = { 200 },
}
},
.animations = CRAZY_DAYZEE_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Dayzee_02) = {
.id = NPC_Dayzee_02,
.settings = &N(NpcSettings_CrazyDayzee),
.pos = { 275.0f, 0.0f, -115.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = CRAZY_DAYZEE_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 275, 0, -115 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 275, 0, -115 },
.detectSize = { 200 },
}
},
.animations = CRAZY_DAYZEE_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Dayzee_03) = {
.id = NPC_Dayzee_03,
.settings = &N(NpcSettings_CrazyDayzee),
.pos = { -230.0f, 60.0f, -110.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.drops = CRAZY_DAYZEE_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -230, 60, -110 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -230, 60, -110 },
.detectSize = { 200 },
}
},
.animations = CRAZY_DAYZEE_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Dayzee_04) = {
.id = NPC_Dayzee_04,
.settings = &N(NpcSettings_CrazyDayzee),
.pos = { -330.0f, 60.0f, -110.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.drops = CRAZY_DAYZEE_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -330, 60, -110 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -330, 60, -110 },
.detectSize = { 200 },
}
},
.animations = CRAZY_DAYZEE_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Dayzee_05) = {
.id = NPC_Dayzee_05,
.settings = &N(NpcSettings_CrazyDayzee),
.pos = { -430.0f, 60.0f, -110.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.drops = CRAZY_DAYZEE_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -430, 60, -110 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -430, 60, -110 },
.detectSize = { 200 },
}
},
.animations = CRAZY_DAYZEE_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Dayzee_06) = {
.id = NPC_Dayzee_06,
.settings = &N(NpcSettings_CrazyDayzee),
.pos = { -530.0f, 60.0f, -110.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.drops = CRAZY_DAYZEE_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -530, 60, -110 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -530, 60, -110 },
.detectSize = { 200 },
}
},
.animations = CRAZY_DAYZEE_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Dayzee_07) = {
.id = NPC_Dayzee_07,
.settings = &N(NpcSettings_CrazyDayzee),
.pos = { -630.0f, 60.0f, -110.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.drops = CRAZY_DAYZEE_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -630, 60, -110 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -630, 60, -110 },
.detectSize = { 150 },
}
},
.animations = CRAZY_DAYZEE_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
EvtScript N(EVS_NpcInit_AmazyDayzee) = {
EVT_THREAD
EVT_WAIT(2)
EVT_CALL(GetNpcPointer, NPC_Dayzee_02, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_RETURN
EVT_END_IF
EVT_CALL(RandInt, 100, LVar0)
EVT_IF_LT(LVar0, 30)
EVT_CALL(SetNpcFlagBits, NPC_Dayzee_02, NPC_FLAG_2 | NPC_FLAG_4, TRUE)
EVT_CALL(SetNpcPos, NPC_Dayzee_02, NPC_DISPOSE_LOCATION)
EVT_ELSE
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2 | NPC_FLAG_4, TRUE)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_END_IF
EVT_END_THREAD
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_AmazyDayzee) = {
.id = NPC_AmazyDayzee,
.settings = &N(NpcSettings_AmazyDayzee),
.pos = { 240.0f, 0.0f, -90.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.init = &N(EVS_NpcInit_AmazyDayzee),
.drops = AMAZY_DAYZEE_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 240, 0, -90 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 240, 0, -90 },
.detectSize = { 200 },
}
},
.animations = AMAZY_DAYZEE_ANIMS,
.aiDetectFlags = AI_DETECT_SENSITIVE_MOTION,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_GateFlower)),
NPC_GROUP(N(NpcData_Dayzee_01), 0x1A14, BTL_FLO_STAGE_00),
NPC_GROUP(N(NpcData_Dayzee_02), 0x1A0F, BTL_FLO_STAGE_00),
NPC_GROUP(N(NpcData_Dayzee_03), 0x1A0F, BTL_FLO_STAGE_01),
NPC_GROUP(N(NpcData_Dayzee_04), 0x1A0F, BTL_FLO_STAGE_01),
NPC_GROUP(N(NpcData_Dayzee_05), 0x1A0F, BTL_FLO_STAGE_01),
NPC_GROUP(N(NpcData_Dayzee_06), 0x1A0F, BTL_FLO_STAGE_01),
NPC_GROUP(N(NpcData_Dayzee_07), 0x1A12, BTL_FLO_STAGE_01),
NPC_GROUP(N(NpcData_AmazyDayzee), 0x1A1C, BTL_FLO_STAGE_00),
{}
};

View File

@ -0,0 +1,56 @@
#include "flo_08.h"
#include "common/foliage.inc.c"
FoliageModelList N(Tree1_LeafModels) = {
.count = 1,
.models = {
MODEL_o133,
}
};
FoliageModelList N(Tree1_TrunkModels) = {
.count = 1,
.models = {
MODEL_o132,
}
};
FoliageDropList N(Tree1_Drops) = {
.count = 2,
.drops = {
{
.itemID = ITEM_BLUE_BERRY,
.pos = { 340, 102, -89 },
.spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS,
.spawnFlag = AF_FLO_TreeDrop_BlueBerry1,
},
{
.itemID = ITEM_BLUE_BERRY,
.pos = { 440, 102, -89 },
.spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ALWAYS,
.spawnFlag = AF_FLO_TreeDrop_BlueBerry2,
},
}
};
ShakeTreeConfig N(ShakeTree_Tree1) = {
.leaves = &N(Tree1_LeafModels),
.trunk = &N(Tree1_TrunkModels),
.drops = &N(Tree1_Drops),
};
BombTrigger N(BombPos_Tree1) = {
.pos = { 391.0f, 0.0f, -102.0f },
.radius = 0.0f
};
EvtScript N(EVS_SetupFoliage) = {
EVT_SET(AF_FLO_TreeDrop_BlueBerry1, FALSE)
EVT_SET(AF_FLO_TreeDrop_BlueBerry2, FALSE)
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1)))
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o172, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,17 @@
#include "flo_08.h"
// unused extra import for flower-spawning regions
#define NAMESPACE dead_flo_08_vines
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
#define NAMESPACE dead_flo_08
#include "world/common/atomic/flo_DroppingVine.inc.c"
EvtScript N(EVS_SetupVines) = {
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o78, MODEL_o79, MODEL_o80, MODEL_o81)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o82, MODEL_o83, MODEL_o84, MODEL_o85)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o88, MODEL_o89, MODEL_o90, MODEL_o91)
EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o159, MODEL_o158, MODEL_o160, MODEL_o161)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,29 @@
// Older version of flo_09
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_09_shape.h"
#include "mapfs/flo_09_hit.h"
#include "sprite/npc/Dayzee.h"
#include "sprite/npc/Bzzap.h"
enum {
NPC_Dayzee_01 = 0,
NPC_Dayzee_02 = 1,
NPC_Bzzap_01 = 2,
NPC_Bzzap_02 = 3,
};
#define NAMESPACE dead_flo_09
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_SetupFoliage);
extern EvtScript N(EVS_SetupVines);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,14 @@
#include "flo_09.h"
EntryList N(Entrances) = {
[flo_09_ENTRY_0] { -520.0, 0.0, 0.0, 90.0 },
[flo_09_ENTRY_1] { 520.0, 0.0, 0.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_09 },
};

View File

@ -0,0 +1,12 @@
#include "flo_09.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,45 @@
#include "flo_09.h"
#include "effects.h"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
API_CALLABLE(N(SpawnSunEffect)) {
fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_ExitWalk_flo_00_5) = EVT_EXIT_WALK(60, flo_09_ENTRY_0, "flo_00", flo_00_ENTRY_5);
EvtScript N(EVS_ExitWalk_flo_03_0) = EVT_EXIT_WALK(60, flo_09_ENTRY_1, "flo_03", flo_03_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_5)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_03_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC(N(EVS_SetupVines))
EVT_EXEC(N(EVS_SetupFoliage))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_FLOWERS)
EVT_FLOWER_SPAWN_REGION( -511, -4, -319, 10, 0)
EVT_FLOWER_SPAWN_REGION( -302, 77, -32, 116, 0)
EVT_FLOWER_SPAWN_REGION( 51, 18, 141, 127, 0)
EVT_FLOWER_SPAWN_REGION( 234, 38, 502, 98, 0)
EVT_FLOWER_SPAWN_REGION( -525, -163, -400, -80, 60)
EVT_FLOWER_SPAWN_REGION( -346, -148, 517, -91, 60)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,19 @@
#include "flo_09.h"
// unused extra import for flower-spawning regions
#define NAMESPACE dead_flo_09_vines
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
#define NAMESPACE dead_flo_09
#include "world/common/atomic/flo_DroppingVine.inc.c"
EvtScript N(EVS_SetupVines) = {
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o76, MODEL_o77, MODEL_o78, MODEL_o79)
EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o72, MODEL_o73, MODEL_o74, MODEL_o75)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o80, MODEL_o81, MODEL_o82, MODEL_o83)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o84, MODEL_o85, MODEL_o86, MODEL_o87)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o96, MODEL_o97, MODEL_o98, MODEL_o99)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o92, MODEL_o93, MODEL_o94, MODEL_o95)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,149 @@
#include "flo_09.h"
#include "common/foliage.inc.c"
EvtScript N(EVS_SpawnBzzap) = {
EVT_CALL(GetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2)
EVT_IF_LT(LVar1, 0)
EVT_CALL(GetModelCenter, LVar9)
EVT_ADD(LVar2, 35)
EVT_CALL(SetNpcPos, NPC_Bzzap_02, LVar0, LVar1, LVar2)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(Tree1_CallbackScript) = {
EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE)
EVT_IF_EQ(AB_FLO_TreePuzzle_SecondCorrect, 1)
EVT_CALL(MakeItemEntity, ITEM_HAPPY_FLOWER_B, -250, 100, 0, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO09_Item_HappyFlowerB)
EVT_ELSE
EVT_SET(LVar9, MODEL_o10)
EVT_EXEC(N(EVS_SpawnBzzap))
EVT_END_IF
EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0)
EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(Tree2_CallbackScript) = {
EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE)
EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 1)
EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(Tree3_CallbackScript) = {
EVT_IF_EQ(GF_FLO09_Item_HappyFlowerB, FALSE)
EVT_IF_EQ(AB_FLO_TreePuzzle_FirstCorrect, 1)
EVT_IF_EQ(AB_FLO_TreePuzzle_SecondCorrect, 0)
EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 1)
EVT_RETURN
EVT_END_IF
EVT_END_IF
EVT_SET(LVar9, MODEL_o13)
EVT_EXEC(N(EVS_SpawnBzzap))
EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0)
EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};
FoliageModelList N(Tree1_LeafModels) = {
.count = 2,
.models = {
MODEL_o11,
MODEL_o12,
}
};
FoliageModelList N(Tree1_TrunkModels) = {
.count = 1,
.models = {
MODEL_o10,
}
};
ShakeTreeConfig N(ShakeTree_Tree1) = {
.leaves = &N(Tree1_LeafModels),
.trunk = &N(Tree1_TrunkModels),
.callback = &N(Tree1_CallbackScript),
};
BombTrigger N(BombPos_Tree1) = {
.pos = { -200.0f, 0.0f, 1.0f },
.radius = 0.0f
};
FoliageModelList N(Tree2_LeafModels) = {
.count = 2,
.models = {
MODEL_o4,
MODEL_o5,
}
};
FoliageModelList N(Tree2_TrunkModels) = {
.count = 1,
.models = {
MODEL_o3,
}
};
ShakeTreeConfig N(ShakeTree_Tree2) = {
.leaves = &N(Tree2_LeafModels),
.trunk = &N(Tree2_TrunkModels),
.callback = &N(Tree2_CallbackScript),
};
BombTrigger N(BombPos_Tree2) = {
.pos = { 0.0f, 0.0f, 1.0f },
.radius = 0.0f
};
FoliageModelList N(Tree3_LeafModels) = {
.count = 2,
.models = {
MODEL_o14,
MODEL_o15,
}
};
FoliageModelList N(Tree3_TrunkModels) = {
.count = 1,
.models = {
MODEL_o13,
}
};
ShakeTreeConfig N(ShakeTree_Tree3) = {
.leaves = &N(Tree3_LeafModels),
.trunk = &N(Tree3_TrunkModels),
.callback = &N(Tree3_CallbackScript),
};
BombTrigger N(BombPos_Tree3) = {
.pos = { 200.0f, 0.0f, 1.0f },
.radius = 0.0f
};
EvtScript N(EVS_SetupFoliage) = {
EVT_SET(AB_FLO_TreePuzzle_FirstCorrect, 0)
EVT_SET(AB_FLO_TreePuzzle_SecondCorrect, 0)
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1)))
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o10, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0)
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree2)))
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o3, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree2)), 1, 0)
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree3)))
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o13, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree3)), 1, 0)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,160 @@
#include "flo_09.h"
#include "world/common/enemy/complete/CrazyDayzee.inc.c"
#include "world/common/enemy/complete/Bzzap.inc.c"
NpcSettings N(NpcSettings_Bzzap_02) = {
.height = 24,
.radius = 24,
.level = 99,
};
EvtScript N(EVS_NpcAI_Bzzap_02) = {
EVT_LOOP(0)
EVT_CALL(GetSelfVar, 0, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_IF_GT(LVar1, 0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcJumpscale, NPC_SELF, 0)
EVT_CALL(NpcJump0, NPC_SELF, LVar0, 50, LVar2, 15)
EVT_CALL(SetSelfVar, 0, 1)
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap)))
EVT_END_IF
EVT_CASE_EQ(2)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(25)
EVT_CALL(SetNpcPos, NPC_SELF, NPC_DISPOSE_LOCATION)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_2, FALSE)
EVT_CALL(SetSelfVar, 0, 0)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_END_SWITCH
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_Bzzap_02) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(OUTCOME_PLAYER_WON)
EVT_CALL(SetSelfVar, 0, 2)
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap_02)))
EVT_CALL(DoNpcDefeat)
EVT_CASE_EQ(OUTCOME_PLAYER_LOST)
EVT_CASE_EQ(OUTCOME_PLAYER_FLED)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Bzzap_02) = {
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap_02)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Bzzap_02)))
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Dayzee_01) = {
.id = NPC_Dayzee_01,
.settings = &N(NpcSettings_CrazyDayzee),
.pos = { -350.0f, 0.0f, 40.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.drops = CRAZY_DAYZEE_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -350, 0, 40 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -350, 0, 40 },
.detectSize = { 200 },
}
},
.animations = CRAZY_DAYZEE_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Dayzee_02) = {
.id = NPC_Dayzee_02,
.settings = &N(NpcSettings_CrazyDayzee),
.pos = { 260.0f, 0.0f, 75.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.drops = CRAZY_DAYZEE_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 260, 0, 75 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 260, 0, 75 },
.detectSize = { 200 },
}
},
.animations = CRAZY_DAYZEE_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Bzzap_01) = {
.id = NPC_Bzzap_01,
.settings = &N(NpcSettings_Bzzap),
.pos = { -50.0f, 55.0f, 90.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.drops = BZZAP_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -50, 55, 90 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -50, 50, 90 },
.detectSize = { 250 },
}
},
.animations = BZZAP_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Bzzap_02) = {
.id = NPC_Bzzap_02,
.settings = &N(NpcSettings_Bzzap_02),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_2000,
.init = &N(EVS_NpcInit_Bzzap_02),
.drops = BZZAP_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -50, 55, 90 },
.wanderSize = { 100 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -50, 50, 90 },
.detectSize = { 250 },
}
},
.animations = BZZAP_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Dayzee_01), 0x1A10, BTL_FLO_STAGE_04),
NPC_GROUP(N(NpcData_Dayzee_02), 0x1A15, BTL_FLO_STAGE_04),
NPC_GROUP(N(NpcData_Bzzap_01), 0x1A17, BTL_FLO_STAGE_01),
NPC_GROUP(N(NpcData_Bzzap_02), 0x1A17, BTL_FLO_STAGE_01),
{}
};

View File

@ -0,0 +1,33 @@
// Older version of flo_10
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_10_shape.h"
#include "mapfs/flo_10_hit.h"
enum {
NPC_Lily = 0,
};
#define NAMESPACE dead_flo_10
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_PushFlowerSong);
extern EvtScript N(EVS_PopSong);
extern EvtScript N(EVS_SetupFoliage);
extern EvtScript N(EVS_MakeEntities);
extern EvtScript N(EVS_SetupFountain);
extern EvtScript N(EVS_SetupWaterStoneSocket);
extern EvtScript N(EVS_SetupWaterEffect);
extern EvtScript N(EVS_Scene_ReleaseFountain);
extern EvtScript N(EVS_Scene_PostReleaseFountain);
extern EvtScript N(EVS_Scene_SunReturns);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,23 @@
#include "flo_10.h"
s32 N(get_tattle)(void) {
if (evt_get_variable(NULL, GB_StoryProgress) < STORY_CH6_FILLED_SPRING_WITH_WATER) {
return MSG_MapTattle_flo_10_before;
} else {
return MSG_MapTattle_flo_10_after;
}
}
EntryList N(Entrances) = {
[flo_10_ENTRY_0] { -360.0, 0.0, 0.0, 90.0 },
[flo_10_ENTRY_1] { -360.0, 0.0, 0.0, 90.0 },
[flo_10_ENTRY_2] { -100.0, -10.0, -172.0, 135.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { .get = &N(get_tattle) },
};

View File

@ -0,0 +1,34 @@
#include "flo_10.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_10_ENTRY_1)
EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8)
EVT_ELSE
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_END_IF
EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_CALL(PlaySound, SOUND_80000022)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PushFlowerSong) = {
EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 2)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PopSong) = {
EVT_CALL(FadeOutMusic, 0, 250)
EVT_WAIT(10)
EVT_CALL(PopSong)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,9 @@
#include "flo_10.h"
EvtScript N(EVS_MakeEntities) = {
EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,53 @@
#include "flo_10.h"
#include "effects.h"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
API_CALLABLE(N(SpawnSunEffect)) {
fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_ExitWalk_flo_24_1) = EVT_EXIT_WALK(60, flo_10_ENTRY_0, "flo_24", flo_24_ENTRY_1);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_24_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupFoliage))
EVT_EXEC(N(EVS_SetupWaterStoneSocket))
EVT_EXEC(N(EVS_SetupFountain))
EVT_EXEC(N(EVS_SetupWaterEffect))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o80, SURFACE_TYPE_FLOWERS)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o93, SURFACE_TYPE_FLOWERS)
EVT_FLOWER_SPAWN_REGION( -265, 247, 199, 313, 0)
EVT_FLOWER_SPAWN_REGION( -300, -275, -140, -185, 0)
EVT_FLOWER_SPAWN_REGION( 263, -248, 362, 146, 0)
EVT_CALL(GetEntryID, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(flo_10_ENTRY_1)
EVT_EXEC(N(EVS_Scene_SunReturns))
EVT_CASE_EQ(flo_10_ENTRY_2)
EVT_EXEC(N(EVS_Scene_PostReleaseFountain))
EVT_EXEC(N(EVS_BindExitTriggers))
EVT_CASE_DEFAULT
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_END_SWITCH
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,315 @@
#include "flo_10.h"
#include "sprite/npc/Lily.h"
#include "world/common/complete/GiveReward.inc.c"
#include "world/common/atomic/TexturePan.inc.c"
#include "world/common/atomic/TexturePan.data.inc.c"
EvtScript N(EVS_RaiseFountain) = {
EVT_CALL(MakeLerp, -50, 170, 385, EASING_LINEAR)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, MODEL_g22, 0, LVar0, 0)
EVT_IF_EQ(LVar1, 1)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_GrowFountain) = {
EVT_CALL(MakeLerp, 0, 100, 90, EASING_QUADRATIC_IN)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_SETF(LVar2, LVar0)
EVT_SETF(LVar3, LVar0)
EVT_DIVF(LVar2, EVT_FLOAT(333.0))
EVT_DIVF(LVar3, EVT_FLOAT(100.0))
EVT_ADDF(LVar2, EVT_FLOAT(0.703125))
EVT_CALL(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2)
EVT_IF_EQ(LVar1, 1)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_TexPan_Rainbow) = {
EVT_CALL(EnableTexPanning, MODEL_o73, TRUE)
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_A)
TEX_PAN_PARAMS_STEP( -150, 0, 0, 0)
TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_RETURN
EVT_END
};
EvtScript N(EVS_EnableRainbow) = {
EVT_WAIT(60)
EVT_CALL(EnableModel, MODEL_o73, TRUE)
EVT_EXEC(N(EVS_TexPan_Rainbow))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_RaiseLily) = {
EVT_WAIT(80)
EVT_CALL(EnableNpcShadow, NPC_Lily, FALSE)
EVT_CALL(GetNpcPos, NPC_Lily, LVar3, LVar4, LVar5)
EVT_CALL(MakeLerp, 10, 55, 108, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_SET(LVar6, LVar4)
EVT_ADD(LVar6, LVar0)
EVT_ADD(LVar6, -10)
EVT_CALL(SetNpcPos, NPC_Lily, LVar3, LVar6, LVar5)
EVT_CALL(TranslateGroup, MODEL_g31, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_RaisePlayer) = {
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_WAIT(40)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80024)
EVT_CALL(GetPlayerPos, LVar2, LVar0, LVar3)
EVT_CALL(MakeLerp, -50, 90, 60, EASING_QUADRATIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_DIVF(LVar2, EVT_FLOAT(1.2))
EVT_DIVF(LVar3, EVT_FLOAT(1.2))
EVT_CALL(SetPlayerPos, LVar2, LVar0, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(MakeLerp, 90, 270, 280, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetPlayerPos, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_RaiseCamera) = {
EVT_WAIT(80)
EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(0.7))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-22.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 450)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_UnleashFountain) = {
EVT_CALL(DisablePartnerAI, 0)
EVT_EXEC(N(EVS_RaiseFountain))
EVT_EXEC(N(EVS_GrowFountain))
EVT_EXEC(N(EVS_EnableRainbow))
EVT_EXEC(N(EVS_RaiseLily))
EVT_EXEC(N(EVS_RaisePlayer))
EVT_EXEC(N(EVS_RaiseCamera))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_LowerFountain) = {
EVT_CALL(MakeLerp, 170, 75, 150, EASING_LINEAR)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, MODEL_g22, 0, LVar0, 0)
EVT_IF_EQ(LVar1, 1)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_ShrinkFountain) = {
EVT_CALL(MakeLerp, 100, 15, 150, EASING_QUADRATIC_IN)
EVT_LABEL(1)
EVT_CALL(UpdateLerp)
EVT_SETF(LVar2, LVar0)
EVT_SETF(LVar3, LVar0)
EVT_DIVF(LVar2, EVT_FLOAT(333.0))
EVT_DIVF(LVar3, EVT_FLOAT(100.0))
EVT_ADDF(LVar2, EVT_FLOAT(0.703125))
EVT_CALL(ScaleGroup, MODEL_g22, LVar2, LVar3, LVar2)
EVT_IF_EQ(LVar1, 1)
EVT_WAIT(1)
EVT_GOTO(1)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_FountainSlowing) = {
EVT_EXEC(N(EVS_LowerFountain))
EVT_EXEC(N(EVS_ShrinkFountain))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_ReleaseFountain) = {
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill)
EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar3, LVar4, LVar5)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar3, LVar4, LVar5)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 600)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(EnableGroup, MODEL_g22, TRUE)
EVT_CALL(TranslateGroup, MODEL_g22, 0, -50, 0)
EVT_CALL(ScaleGroup, MODEL_g22, 0, 0, 0)
EVT_CALL(EnableGroup, MODEL_g31, TRUE)
EVT_EXEC_WAIT(N(EVS_UnleashFountain))
EVT_WAIT(20)
EVT_CALL(PlaySound, SOUND_80000024)
EVT_WAIT(360)
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80017)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2))
EVT_CALL(PlayerJump1, -100, -10, -172, 75)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(1.0))
EVT_EXEC_WAIT(N(EVS_FountainSlowing))
EVT_WAIT(60)
EVT_CALL(GotoMap, EVT_PTR("flo_24"), flo_24_ENTRY_2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_PostReleaseFountain) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(SetPlayerPos, -100, -10, -172)
EVT_CALL(InterpPlayerYaw, 150, 0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_DeadStill)
EVT_CALL(SetNpcPos, NPC_PARTNER, -129, 9, -177)
EVT_CALL(EnablePartnerAI)
EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER)
EVT_CALL(EnableGroup, MODEL_water, TRUE)
EVT_CALL(EnableGroup, MODEL_g2, FALSE)
EVT_CALL(EnableGroup, MODEL_g12, FALSE)
EVT_CALL(EnableGroup, MODEL_g31, FALSE)
EVT_CALL(SetNpcPos, NPC_Lily, -57, -20, -105)
EVT_CALL(InterpNpcYaw, NPC_Lily, 90, 0)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(90.0), 0, 450, EVT_FLOAT(25.0), EVT_FLOAT(-6.0))
EVT_WAIT(30)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_GetUp)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_WAIT(10)
EVT_EXEC_WAIT(N(EVS_PushFlowerSong))
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_0082)
EVT_CALL(NpcFacePlayer, NPC_Lily, 1)
EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0083)
EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_GiveItem)
EVT_WAIT(20)
EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle)
EVT_GIVE_KEY_REWARD(ITEM_MIRACLE_WATER)
EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0084)
EVT_CALL(EndSpeech, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0)
EVT_CALL(SetNpcAnimation, NPC_Lily, ANIM_Lily_Idle)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(EVS_PopSong))
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupFountain) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_CALL(EnableGroup, MODEL_water, FALSE)
EVT_CALL(EnableGroup, MODEL_g12, FALSE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_water, COLLIDER_FLAGS_UPPER_MASK)
EVT_ELSE
EVT_CALL(EnableGroup, MODEL_g2, FALSE)
EVT_CALL(EnableGroup, MODEL_g12, FALSE)
EVT_CALL(EnableGroup, MODEL_g31, FALSE)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o1, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o83, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o86, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o87, COLLIDER_FLAGS_UPPER_MASK)
EVT_END_IF
EVT_CALL(EnableTexPanning, MODEL_o25, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o40, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o78, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o77, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o118, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o119, TRUE)
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_1)
TEX_PAN_PARAMS_STEP( 0,-2000, 0, 0)
TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_3)
TEX_PAN_PARAMS_STEP( -100, 80, 0, 0)
TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_5)
TEX_PAN_PARAMS_STEP(-1000, 2000, 0, 0)
TEX_PAN_PARAMS_FREQ( 1, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_6)
TEX_PAN_PARAMS_STEP( 0,-2000, 0, 0)
TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_8)
TEX_PAN_PARAMS_STEP( 0,-1500, 0, 0)
TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_9)
TEX_PAN_PARAMS_STEP( 0,-1000, 0, 0)
TEX_PAN_PARAMS_FREQ( 0, 1, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_IF_GE(GB_StoryProgress, STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_EXEC(N(EVS_TexPan_Rainbow))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,216 @@
#include "flo_10.h"
#include "world/common/npc/Lily.inc.c"
EvtScript N(EVS_Scene_SunReturns) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(SetNpcPos, NPC_Lily, 60, 0, 55)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 450)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_00C6)
EVT_WAIT(10)
EVT_CALL(GotoMap, EVT_PTR("flo_12"), flo_12_ENTRY_1)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
s32 N(KeyList)[] = {
ITEM_WATER_STONE,
ITEM_NONE
};
EvtScript N(EVS_OnInteract_WaterStoneSocket) = {
EVT_IF_EQ(GF_FLO10_ShowedLilyTheWaterStone, TRUE)
EVT_CALL(GetCurrentPartner, LVarA)
EVT_IF_NE(LVarA, 0)
EVT_CALL(AwaitPlayerLeave, 0, 0, 19)
EVT_RETURN
EVT_END_IF
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET_GROUP(EVT_GROUP_00)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL)
EVT_CALL(ShowKeyChoicePopup)
EVT_SET(LVar2, LVar0)
EVT_SWITCH(LVar2)
EVT_CASE_EQ(-1)
EVT_CALL(CloseChoicePopup)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_Lily, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0081)
EVT_CASE_DEFAULT
EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5)
EVT_CALL(PlayerMoveTo, -17, -17, 20)
EVT_CALL(func_802CF56C, 2)
EVT_CALL(InterpPlayerYaw, 100, 1)
EVT_WAIT(10)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(1.0), 0, 450, EVT_FLOAT(25.0), EVT_FLOAT(-6.0))
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_60006)
EVT_CALL(RemoveKeyItemAt, LVar1)
EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, 0, -60, 6, ITEM_SPAWN_MODE_DECORATION, 0)
EVT_SET(LVarA, LVar0)
EVT_CALL(CloseChoicePopup)
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
EVT_EXEC_WAIT(N(EVS_Scene_ReleaseFountain))
EVT_END_SWITCH
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(AwaitPlayerLeave, 0, 0, 19)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupWaterStoneSocket) = {
EVT_BIND_PADLOCK(EVT_PTR(N(EVS_OnInteract_WaterStoneSocket)), TRIGGER_FLOOR_TOUCH, COLLIDER_o83, EVT_PTR(N(KeyList)), 0, 1)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MovePlayerToTalk) = {
EVT_WAIT(10)
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(GetPlayerPos, LVar3, LVar4, LVar5)
EVT_IF_LT(LVar5, LVar2)
EVT_SET(LVar6, 30)
EVT_ELSE
EVT_SET(LVar6, 20)
EVT_END_IF
EVT_SET(LVar1, LVar0)
EVT_SET(LVar4, LVar0)
EVT_SUB(LVar1, LVar6)
EVT_ADD(LVar4, LVar6)
EVT_SWITCH(LVar3)
EVT_CASE_RANGE(LVar1, LVar4)
EVT_THREAD
EVT_IF_LT(LVar3, LVar0)
EVT_SUB(LVar0, 40)
EVT_ELSE
EVT_ADD(LVar0, 40)
EVT_END_IF
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
EVT_CALL(PlayerMoveTo, LVar0, LVar5, 15)
EVT_CALL(PlayerFaceNpc, NPC_Lily, TRUE)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE)
EVT_END_THREAD
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Lily) = {
EVT_EXEC_WAIT(N(EVS_PushFlowerSong))
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_MAGICAL_BEAN)
EVT_EXEC(N(EVS_MovePlayerToTalk))
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 325)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(23.0), EVT_FLOAT(-9.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0078)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_DreadLoop, ANIM_Lily_Dread, 5)
EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE)
EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE)
EVT_EXEC(N(EVS_MovePlayerToTalk))
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 325)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(23.0), EVT_FLOAT(-9.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_0079)
EVT_CALL(NpcFacePlayer, NPC_SELF, 1)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lily_Idle)
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_262, 0)
EVT_CALL(ShowEmote, NPC_SELF, EMOTE_EXCLAMATION, 0, 15, TRUE, 0, 0, 0, 0)
EVT_WAIT(15)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Idle, ANIM_Lily_Idle, 0, MSG_CH6_007A)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_Dread, ANIM_Lily_Idle, 0)
EVT_CALL(GetPlayerTargetYaw, LVar0)
EVT_CALL(InterpNpcYaw, NPC_SELF, LVar0, 1)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 5, MSG_CH6_007B)
EVT_CALL(NpcFacePlayer, NPC_SELF, 1)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_007C)
EVT_CALL(ShowChoice, MSG_Choice_0011)
EVT_WAIT(10)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_007D)
EVT_CASE_EQ(1)
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_007E)
EVT_END_SWITCH
EVT_WAIT(10)
EVT_SET(GF_FLO10_LilyRequestedWaterStone, TRUE)
EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAGS_400000, 0)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 5, MSG_CH6_007F)
EVT_END_IF
EVT_CASE_LT(STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0080)
EVT_SET(GF_FLO10_ShowedLilyTheWaterStone, TRUE)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0, MSG_CH6_0085)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0)
EVT_CALL(EndSpeech, NPC_SELF, ANIM_Lily_TalkPlead, ANIM_Lily_IdlePlead, 0)
EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_TalkHappy, ANIM_Lily_IdleHappy, 0, MSG_CH6_0086)
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Lily_Talk, ANIM_Lily_Idle, 0, MSG_CH6_0087)
EVT_END_SWITCH
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(EVS_PopSong))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Lily) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lily)))
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE)
EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Lily_IdlePlead)
EVT_CALL(InterpNpcYaw, NPC_SELF, 90, 1)
EVT_CALL(SetEnemyFlagBits, NPC_SELF, ENEMY_FLAGS_400000, 1)
EVT_END_IF
EVT_CASE_EQ(STORY_CH6_GOT_WATER_STONE)
EVT_CALL(InterpNpcYaw, NPC_SELF, 270, 1)
EVT_CASE_GE(STORY_CH6_FILLED_SPRING_WITH_WATER)
EVT_CALL(SetNpcPos, NPC_SELF, -67, -20, -105)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Lily) = {
.id = NPC_Lily,
.settings = &N(NpcSettings_Lily),
.pos = { 80.0f, -60.0f, 0.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Lily),
.drops = LILY_DROPS,
.animations = LILY_ANIMS,
.tattle = MSG_NpcTattle_Lily,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Lily)),
{}
};

View File

@ -1,11 +1,16 @@
#include "flo_10.h" #include "flo_10.h"
#include "nu/nusys.h" #include "nu/nusys.h"
#include "model.h" #include "model.h"
// rodata s32 N(WavePhase) = {
extern char D_80244BB8_ED8DD8[]; // 'GBI Error (aligned 8) File:%s Line:%d Adrs:%08x \n' 0
extern char D_80244BEC_ED8E0C[]; // evt_underwater.c };
// unused wavy distortion effect for edge water -- unclear how it would have been used
EvtScript N(EVS_SetupWaterEffect) = {
EVT_RETURN
EVT_END
};
void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) { void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) {
s32 i; s32 i;
@ -14,7 +19,7 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) {
u16* img; u16* img;
s32 alpha; s32 alpha;
N(D_80244160_ED8380) += 5; N(WavePhase) += 5;
if (x1 >= x2 || y1 >= y2) { if (x1 >= x2 || y1 >= y2) {
return; return;
@ -63,7 +68,7 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) {
if (alpha > 255) { if (alpha > 255) {
alpha = 255; alpha = 255;
} }
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0xFF, 0xFF, 0xFF, alpha); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, alpha);
//gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(img), G_IM_FMT_RGBA, G_IM_SIZ_16b, //gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(img), G_IM_FMT_RGBA, G_IM_SIZ_16b,
//SCREEN_WIDTH, 6, //SCREEN_WIDTH, 6,
@ -76,7 +81,8 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) {
Gfx *_g = (Gfx *)(gMasterGfxPos++); Gfx *_g = (Gfx *)(gMasterGfxPos++);
if ((osVirtualToPhysical(img) % 8) != 0) { if ((osVirtualToPhysical(img) % 8) != 0) {
osSyncPrintf(D_80244BB8_ED8DD8, D_80244BEC_ED8E0C, 83, osVirtualToPhysical(img)); osSyncPrintf("GBI Error (aligned 8) File:%s Line:%d Adrs:%08x \n",
"evt_underwater.c", 83, osVirtualToPhysical(img));
} }
_g->words.w0 = _SHIFTL(G_SETTIMG, 24, 8) | _SHIFTL(G_IM_FMT_RGBA, 21, 3) | _g->words.w0 = _SHIFTL(G_SETTIMG, 24, 8) | _SHIFTL(G_IM_FMT_RGBA, 21, 3) |
_SHIFTL(G_IM_SIZ_16b, 19, 2) | _SHIFTL((SCREEN_WIDTH)-1, 0, 12); _SHIFTL(G_IM_SIZ_16b, 19, 2) | _SHIFTL((SCREEN_WIDTH)-1, 0, 12);
@ -104,7 +110,7 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) {
(x2 - 1)<<G_TEXTURE_IMAGE_FRAC, (x2 - 1)<<G_TEXTURE_IMAGE_FRAC,
(y1 - 6 * i - 1)<<G_TEXTURE_IMAGE_FRAC) (y1 - 6 * i - 1)<<G_TEXTURE_IMAGE_FRAC)
gSPTextureRectangle(gMasterGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + 6) * 4, gSPTextureRectangle(gMasterGfxPos++, x1 * 4, (y1 + i * 6) * 4, x2 * 4, (y1 + i * 6 + 6) * 4,
G_TX_RENDERTILE, x1 * 32, (y1 - i * 6) * 32, 1024, (s32)(sin_deg(N(D_80244160_ED8380) + i * 30) * 500.0f) - 500); G_TX_RENDERTILE, x1 * 32, (y1 - i * 6) * 32, 1024, (s32)(sin_deg(N(WavePhase) + i * 30) * 500.0f) - 500);
} }
} }
@ -114,7 +120,7 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) {
if (alpha > 255) { if (alpha > 255) {
alpha = 255; alpha = 255;
} }
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0xFF, 0xFF, 0xFF, alpha); gDPSetPrimColor(gMasterGfxPos++, 0, 0, 255, 255, 255, alpha);
//gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(img), G_IM_FMT_RGBA, G_IM_SIZ_16b, //gDPLoadTextureTile(gMasterGfxPos++, osVirtualToPhysical(img), G_IM_FMT_RGBA, G_IM_SIZ_16b,
// SCREEN_WIDTH, 6, // SCREEN_WIDTH, 6,
// x1, y1 - 6 * i - m, x2 - 1, y1 - 6 * i - 1, 0, // x1, y1 - 6 * i - m, x2 - 1, y1 - 6 * i - 1, 0,
@ -125,7 +131,8 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) {
Gfx *_g = (Gfx *)(gMasterGfxPos++); Gfx *_g = (Gfx *)(gMasterGfxPos++);
if ((osVirtualToPhysical(img) % 8) != 0) { if ((osVirtualToPhysical(img) % 8) != 0) {
osSyncPrintf(D_80244BB8_ED8DD8, D_80244BEC_ED8E0C, 107, osVirtualToPhysical(img)); osSyncPrintf("GBI Error (aligned 8) File:%s Line:%d Adrs:%08x \n",
"evt_underwater.c", 107, osVirtualToPhysical(img));
} }
_g->words.w0 = _SHIFTL(G_SETTIMG, 24, 8) | _SHIFTL(G_IM_FMT_RGBA, 21, 3) | _g->words.w0 = _SHIFTL(G_SETTIMG, 24, 8) | _SHIFTL(G_IM_FMT_RGBA, 21, 3) |
_SHIFTL(G_IM_SIZ_16b, 19, 2) | _SHIFTL((SCREEN_WIDTH)-1, 0, 12); _SHIFTL(G_IM_SIZ_16b, 19, 2) | _SHIFTL((SCREEN_WIDTH)-1, 0, 12);
@ -158,10 +165,9 @@ void N(UnkModelFunc000)(s32 x1, s32 y1, s32 x2, s32 y2) {
} }
} }
// Similar to the flo_10 counterpart but contains debug code
void N(UnkModelFunc001)(void) { void N(UnkModelFunc001)(void) {
Camera* camera = &gCameras[gCurrentCameraID]; Camera* camera = &gCameras[gCurrentCameraID];
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(0x30)); Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(MODEL_o40));
ModelBoundingBox* bb = (ModelBoundingBox*) model->modelNode->propertyList; ModelBoundingBox* bb = (ModelBoundingBox*) model->modelNode->propertyList;
f32 bbHalfX = bb->halfSizeX; f32 bbHalfX = bb->halfSizeX;
f32 bbHalfZ = bb->halfSizeZ; f32 bbHalfZ = bb->halfSizeZ;
@ -297,7 +303,8 @@ void N(UnkModelFunc001)(void) {
new_var = gMasterGfxPos++; new_var = gMasterGfxPos++;
if ((osVirtualToPhysical(nuGfxZBuffer) % 8) != 0) { if ((osVirtualToPhysical(nuGfxZBuffer) % 8) != 0) {
osSyncPrintf(D_80244BB8_ED8DD8, D_80244BEC_ED8E0C, 175, osVirtualToPhysical(nuGfxZBuffer)); osSyncPrintf("GBI Error (aligned 8) File:%s Line:%d Adrs:%08x \n",
"evt_underwater.c", 175, osVirtualToPhysical(nuGfxZBuffer));
} }
gDPSetColorImage(new_var, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxZBuffer)); gDPSetColorImage(new_var, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxZBuffer));
@ -310,7 +317,8 @@ void N(UnkModelFunc001)(void) {
new_var = gMasterGfxPos++; new_var = gMasterGfxPos++;
if ((osVirtualToPhysical(nuGfxCfb_ptr) % 8) != 0) { if ((osVirtualToPhysical(nuGfxCfb_ptr) % 8) != 0) {
osSyncPrintf(D_80244BB8_ED8DD8, D_80244BEC_ED8E0C, 186, osVirtualToPhysical(nuGfxCfb_ptr)); osSyncPrintf("GBI Error (aligned 8) File:%s Line:%d Adrs:%08x \n",
"evt_underwater.c", 186, osVirtualToPhysical(nuGfxCfb_ptr));
} }
gDPSetColorImage(new_var, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); gDPSetColorImage(new_var, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
@ -333,3 +341,4 @@ void N(UnkModelFunc001)(void) {
gDPSetDepthSource(gMasterGfxPos++, G_ZS_PIXEL); gDPSetDepthSource(gMasterGfxPos++, G_ZS_PIXEL);
} }
} }

View File

@ -0,0 +1,50 @@
#include "flo_10.h"
#include "common/foliage.inc.c"
FoliageModelList N(Tree1_LeafModels) = {
.count = 3,
.models = {
MODEL_o47,
MODEL_o48,
MODEL_o49,
}
};
FoliageModelList N(Tree1_TrunkModels) = {
.count = 1,
.models = {
MODEL_o88,
}
};
FoliageDropList N(Tree1_Drops) = {
.count = 1,
.drops = {
{
.itemID = ITEM_JAMMIN_JELLY,
.pos = { 80, 100, -240 },
.spawnMode = ITEM_SPAWN_MODE_FALL_SPAWN_ONCE,
.pickupFlag = GF_FLO10_Tree1_JamminJelly,
},
}
};
ShakeTreeConfig N(ShakeTree_Tree1) = {
.leaves = &N(Tree1_LeafModels),
.trunk = &N(Tree1_TrunkModels),
.drops = &N(Tree1_Drops),
};
BombTrigger N(BombPos_Tree1) = {
.pos = { 137.0f, 0.0f, -283.0f },
.radius = 0.0f
};
EvtScript N(EVS_SetupFoliage) = {
EVT_SET(LVar0, EVT_PTR(N(ShakeTree_Tree1)))
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_WALL_HAMMER, COLLIDER_o85, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(shakeTree)), TRIGGER_POINT_BOMB, EVT_PTR(N(BombPos_Tree1)), 1, 0)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,30 @@
// Older version of flo_11
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_11_shape.h"
#include "mapfs/flo_11_hit.h"
enum {
NPC_Lakitu_01 = 0,
NPC_Lakitu_02 = 1,
};
enum {
MV_LakituAmbushState = MapVar(0),
MV_LakituSearchSync = MapVar(10),
MV_FlyingSoundsScript = MapVar(11),
};
#define NAMESPACE dead_flo_11
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern EvtScript N(EVS_Scene_LakituAmbush);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,20 @@
#include "flo_11.h"
EntryList N(Entrances) = {
[flo_11_ENTRY_0] { 470.0, 0.0, -15.0, 270.0 },
[flo_11_ENTRY_1] { -470.0, 0.0, -15.0, 90.0 },
[flo_11_ENTRY_2] { 360.0, 50.0, -237.0, 270.0 },
[flo_11_ENTRY_3] { 118.0, 50.0, -420.0, 270.0 },
[flo_11_ENTRY_4] { 0.0, 50.0, 0.0, 270.0 },
[flo_11_ENTRY_5] { -120.0, 50.0, 357.0, 90.0 },
[flo_11_ENTRY_6] { -360.0, 50.0, -240.0, 90.0 },
[flo_11_ENTRY_7] { -360.0, 35.0, 0.0, 90.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_11 },
};

View File

@ -0,0 +1,12 @@
#include "flo_11.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,94 @@
#include "flo_11.h"
#include "effects.h"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
#include "world/common/entity/Pipe.inc.c"
#include "world/common/entity/Pipe.data.inc.c"
API_CALLABLE(N(SpawnSunEffect)) {
fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_ExitWalk_flo_23_1) = EVT_EXIT_WALK(60, flo_11_ENTRY_0, "flo_23", flo_23_ENTRY_1);
EvtScript N(EVS_ExitWalk_flo_12_0) = EVT_EXIT_WALK(60, flo_11_ENTRY_1, "flo_12", flo_12_ENTRY_0);
// template for GotoMap exits used with pipes in the maze
#define EVT_GOTO_MAP(mapName, entry) \
{ \
EVT_SET_GROUP(EVT_GROUP_1B) \
EVT_CALL(GotoMap, EVT_PTR(mapName), entry) \
EVT_WAIT(100) \
EVT_RETURN \
EVT_END \
}
// template for binding the event for the generic EVS_OnEnterPipe
#define EVT_SETUP_PIPE(entry, collider, exitScript) \
EVT_SET(LVar0, entry) \
EVT_SET(LVar1, collider) \
EVT_SET(LVar2, EVT_PTR(exitScript)) \
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnEnterPipe)), TRIGGER_FLOOR_TOUCH, LVar1, 1, 0)
EvtScript N(EVS_GotoMap_flo_11_5) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_5);
EvtScript N(EVS_GotoMap_flo_11_6) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_6);
EvtScript N(EVS_GotoMap_flo_11_7) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_7);
EvtScript N(EVS_GotoMap_flo_11_2) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_2);
EvtScript N(EVS_GotoMap_flo_11_3) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_3);
EvtScript N(EVS_GotoMap_flo_11_4) = EVT_GOTO_MAP("flo_11", flo_11_ENTRY_4);
EvtScript N(EVS_OnEnterPipe) = {
EVT_SET(LVarA, LVar0)
EVT_SET(LVarB, LVar1)
EVT_SET(LVarC, LVar2)
EVT_EXEC_WAIT(N(EVS_Pipe_ExitVertical))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_12_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_23_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_SETUP_PIPE(flo_11_ENTRY_2, COLLIDER_o91, N(EVS_GotoMap_flo_11_5)) // link 2 <--> 5
EVT_SETUP_PIPE(flo_11_ENTRY_3, COLLIDER_o92, N(EVS_GotoMap_flo_11_6)) // link 3 <--> 6
EVT_SETUP_PIPE(flo_11_ENTRY_4, COLLIDER_o93, N(EVS_GotoMap_flo_11_7)) // link 4 <--> 7
EVT_SETUP_PIPE(flo_11_ENTRY_5, COLLIDER_o94, N(EVS_GotoMap_flo_11_2)) // link 2 <--> 5
EVT_SETUP_PIPE(flo_11_ENTRY_6, COLLIDER_o95, N(EVS_GotoMap_flo_11_3)) // link 3 <--> 6
EVT_SETUP_PIPE(flo_11_ENTRY_7, COLLIDER_o96, N(EVS_GotoMap_flo_11_4)) // link 4 <--> 7
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(func_80044238, 7)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(GetEntryID, LVar0)
EVT_IF_LE(LVar0, flo_11_ENTRY_1)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_EXEC(N(EVS_Scene_LakituAmbush))
EVT_WAIT(1)
EVT_ELSE
EVT_SET(LVarA, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(N(EVS_Pipe_EnterVertical))
EVT_WAIT(1)
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o90, SURFACE_TYPE_HEDGES)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o104, SURFACE_TYPE_HEDGES)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o105, SURFACE_TYPE_HEDGES)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o109, SURFACE_TYPE_HEDGES)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,397 @@
#include "flo_11.h"
#include "world/common/enemy/complete/Lakitu_Stationary.inc.c"
Vec3f N(FlightPath_Lakitu_01_Search)[] = {
{ 460.0, 200.0, -240.0 },
{ 360.0, 150.0, -140.0 },
{ 260.0, 100.0, -240.0 },
{ 360.0, 100.0, -440.0 },
{ 460.0, 100.0, -240.0 },
{ 360.0, 100.0, -140.0 },
{ 260.0, 100.0, -240.0 },
{ 360.0, 100.0, -440.0 },
};
Vec3f N(FlightPath_Lakitu_02_Search)[] = {
{ -100.0, 200.0, -50.0 },
{ 0.0, 150.0, -150.0 },
{ 100.0, 100.0, -50.0 },
{ 0.0, 100.0, 50.0 },
{ -100.0, 100.0, -50.0 },
{ 0.0, 100.0, -150.0 },
{ 100.0, 100.0, -50.0 },
{ 0.0, 100.0, 50.0 },
};
Vec3f N(FlightPath_Lakitu_01_Gather)[] = {
{ 360.0, 100.0, -440.0 },
{ 350.0, 120.0, -220.0 },
{ 300.0, 120.0, -164.0 },
{ 160.0, 110.0, -180.0 },
};
Vec3f N(FlightPath_Lakitu_02_Gather)[] = {
{ 0.0, 100.0, 50.0 },
{ 200.0, 110.0, 29.0 },
{ 231.0, 110.0, -18.0 },
{ 115.0, 100.0, -150.0 },
};
Vec3f N(FlightPath_Lakitu_01_Attack)[] = {
{ 285.0, 120.0, -108.0 },
{ 370.0, 100.0, -130.0 },
{ 454.0, 60.0, -20.0 },
};
Vec3f N(FlightPath_Lakitu_02_Attack)[] = {
{ 263.0, 110.0, -66.0 },
{ 360.0, 90.0, 50.0 },
{ 454.0, 50.0, 20.0 },
};
Vec3f N(FlightPath_Lakitu_01_Flee)[] = {
{ 400.0, 30.0, -40.0 },
{ 300.0, 80.0, -40.0 },
{ 150.0, 200.0, -40.0 },
{ 100.0, 350.0, -40.0 },
};
Vec3f N(FlightPath_Lakitu_02_Flee)[] = {
{ 400.0, 30.0, 40.0 },
{ 300.0, 80.0, 40.0 },
{ 150.0, 200.0, 40.0 },
{ 100.0, 350.0, 40.0 },
};
EvtScript N(EVS_PlayFlightSounds) = {
EVT_LOOP(0)
EVT_CALL(PlaySound, SOUND_295)
EVT_WAIT(LVar0)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_LakitusFlying_Search) = {
EVT_SET(LVar0, 5)
EVT_EXEC_GET_TID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript)
EVT_THREAD
EVT_CALL(LoadPath, 160, EVT_PTR(N(FlightPath_Lakitu_01_Search)),
ARRAY_COUNT(N(FlightPath_Lakitu_01_Search)), EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(LoadPath, 160, EVT_PTR(N(FlightPath_Lakitu_02_Search)),
ARRAY_COUNT(N(FlightPath_Lakitu_02_Search)), EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_SET(MV_LakituSearchSync, 1)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_LakitusFlying_Gather) = {
EVT_THREAD
EVT_CALL(LoadPath, 30, EVT_PTR(N(FlightPath_Lakitu_01_Gather)),
ARRAY_COUNT(N(FlightPath_Lakitu_01_Gather)), EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(LoadPath, 45, EVT_PTR(N(FlightPath_Lakitu_02_Gather)),
ARRAY_COUNT(N(FlightPath_Lakitu_02_Gather)), EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_KILL_THREAD(MV_FlyingSoundsScript)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_LakitusFlying_Attack) = {
EVT_SET(LVar0, 4)
EVT_EXEC_GET_TID(N(EVS_PlayFlightSounds), MV_FlyingSoundsScript)
EVT_THREAD
EVT_CALL(LoadPath, 35, EVT_PTR(N(FlightPath_Lakitu_01_Attack)),
ARRAY_COUNT(N(FlightPath_Lakitu_01_Attack)), EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(LoadPath, 35, EVT_PTR(N(FlightPath_Lakitu_02_Attack)),
ARRAY_COUNT(N(FlightPath_Lakitu_02_Attack)), EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_LakitusFlying_Flee) = {
EVT_THREAD
EVT_CALL(LoadPath, 40, EVT_PTR(N(FlightPath_Lakitu_01_Flee)),
ARRAY_COUNT(N(FlightPath_Lakitu_01_Flee)), EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakitu_01, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION)
EVT_END_THREAD
EVT_CALL(LoadPath, 40, EVT_PTR(N(FlightPath_Lakitu_02_Flee)),
ARRAY_COUNT(N(FlightPath_Lakitu_02_Flee)), EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakitu_02, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION)
EVT_WAIT(40)
EVT_KILL_THREAD(MV_FlyingSoundsScript)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_LakituAmbush) = {
EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, TRUE)
EVT_RETURN
EVT_END_IF
EVT_IF_LT(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN)
EVT_RETURN
EVT_END_IF
EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, FALSE)
EVT_RETURN
EVT_END_IF
EVT_CALL(SetNpcPos, NPC_Lakitu_01, 460, 200, -240)
EVT_CALL(SetNpcPos, NPC_Lakitu_02, -100, 200, -50)
EVT_LOOP(0)
EVT_WAIT(1)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_LT(LVar0, 440)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(DisablePlayerInput, TRUE)
EVT_SET(MV_LakituSearchSync, 0)
EVT_EXEC(N(EVS_LakitusFlying_Search))
EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE)
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(90.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-7.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 450)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(20)
EVT_SET(LVar0, 270)
EVT_SET(LVar1, 100)
EVT_SET(LVar2, -87)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(-11.0))
EVT_CALL(SetCamPosA, CAM_DEFAULT, 87, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 87, 0)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(30)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 150)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-16.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_LOOP(0)
EVT_WAIT(1)
EVT_IF_EQ(MV_LakituSearchSync, 1)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(NpcFaceNpc, NPC_Lakitu_01, NPC_Lakitu_02, 1)
EVT_CALL(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1)
EVT_EXEC(N(EVS_LakitusFlying_Gather))
EVT_WAIT(30)
EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0088)
EVT_CALL(NpcFaceNpc, NPC_Lakitu_02, NPC_Lakitu_01, 1)
EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_0089)
EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 0, 1)
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_Lakitu_01, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008A)
EVT_CALL(SpeakToPlayer, NPC_Lakitu_02, ANIM_Lakitu_Anim16, ANIM_Lakitu_Anim01, 0, MSG_CH6_008B)
EVT_CALL(SetCamType, CAM_DEFAULT, 1, FALSE)
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(90.0))
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(14.0), EVT_FLOAT(-11.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 450)
EVT_CALL(SetCamPosA, CAM_DEFAULT, 87, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_EXEC(N(EVS_LakitusFlying_Attack))
EVT_CALL(SetNpcVar, NPC_Lakitu_01, 0, 1)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_Lakitu_01) = {
EVT_LOOP(0)
EVT_CALL(GetSelfVar, 0, LVar0)
EVT_IF_NE(LVar0, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_THREAD
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(4.0), 0, 1000, EVT_FLOAT(14.0), EVT_FLOAT(-11.0))
EVT_END_THREAD
EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_Lakitu_01) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(OUTCOME_PLAYER_WON)
EVT_CALL(SetNpcPos, NPC_Lakitu_01, 400, 20, -40)
EVT_CALL(SetNpcPos, NPC_Lakitu_02, 400, 20, 40)
EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 0)
EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 270, 0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar2, -60)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 900)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(24.0), EVT_FLOAT(-4.0))
EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-95.0), EVT_FLOAT(0.0))
EVT_CALL(SetCamPosB, CAM_DEFAULT, EVT_FLOAT(0.0), EVT_FLOAT(-50.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_EXEC_WAIT(N(EVS_LakitusFlying_Flee))
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_SET(GF_FLO11_Defeated_Lakitus, TRUE)
EVT_SET(MV_LakituAmbushState, 1)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CASE_EQ(OUTCOME_PLAYER_LOST)
EVT_CASE_EQ(OUTCOME_PLAYER_FLED)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_Lakitu_02) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(OUTCOME_PLAYER_WON)
EVT_LABEL(0)
EVT_IF_EQ(MV_LakituAmbushState, 0)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_CASE_EQ(OUTCOME_PLAYER_LOST)
EVT_CASE_EQ(OUTCOME_PLAYER_FLED)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Lakitu_01) = {
EVT_CALL(SetNpcPos, NPC_Lakitu_01, NPC_DISPOSE_LOCATION)
EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, FALSE)
EVT_IF_GE(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN)
EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE)
EVT_SET(MV_LakituAmbushState, 0)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Lakitu_01)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu_01)))
EVT_CALL(SetNpcPos, NPC_Lakitu_01, 350, 120, -220)
EVT_CALL(InterpNpcYaw, NPC_Lakitu_01, 270, 1)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Lakitu_02) = {
EVT_CALL(SetNpcPos, NPC_Lakitu_02, NPC_DISPOSE_LOCATION)
EVT_IF_EQ(GF_FLO11_Defeated_Lakitus, FALSE)
EVT_IF_GE(GB_StoryProgress, STORY_CH6_GOT_MAGICAL_BEAN)
EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE)
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakitu_02)))
EVT_CALL(SetNpcPos, NPC_Lakitu_02, 200, 110, 29)
EVT_CALL(InterpNpcYaw, NPC_Lakitu_02, 0, 1)
EVT_END_IF
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Lakitus)[] = {
{
.id = NPC_Lakitu_01,
.settings = &N(NpcSettings_Lakitu),
.pos = { 553.0f, 60.0f, 52.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_40000,
.init = &N(EVS_NpcInit_Lakitu_01),
.drops = LAKITU_DROPS,
.animations = LAKITU_ANIMS,
},
{
.id = NPC_Lakitu_02,
.settings = &N(NpcSettings_Lakitu),
.pos = { 553.0f, 60.0f, 52.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_40000,
.init = &N(EVS_NpcInit_Lakitu_02),
.drops = LAKITU_DROPS,
.animations = LAKITU_ANIMS,
},
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Lakitus), 0x1A07, BTL_FLO_STAGE_08),
{}
};

View File

@ -0,0 +1,9 @@
#include "flo_11.h"
#include "entity.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeEntity, EVT_PTR(Entity_MulticoinBlock), -220, 60, -75, 0, MAKE_ENTITY_END)
EVT_CALL(AssignBlockFlag, GF_FLO11_MultiCoinBrick)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,25 @@
// Older version of flo_12
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_12_shape.h"
#include "mapfs/flo_12_hit.h"
enum {
NPC_Rosie = 0,
NPC_Dummy = 1,
};
#define NAMESPACE dead_flo_12
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_PushFlowerSong);
extern EvtScript N(EVS_PopMusic);
extern EvtScript N(EVS_Scene_SunReturns);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,14 @@
#include "flo_12.h"
EntryList N(Entrances) = {
[flo_12_ENTRY_0] { 280.0, 0.0, 0.0, 270.0 },
[flo_12_ENTRY_1] { 280.0, 0.0, 0.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_12 },
};

View File

@ -0,0 +1,31 @@
#include "flo_12.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_12_ENTRY_1)
EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8)
EVT_ELSE
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PushFlowerSong) = {
EVT_CALL(PushSong, SONG_FLOWER_NPC_THEME, 3)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PopMusic) = {
EVT_CALL(FadeOutMusic, 0, 250)
EVT_WAIT(10)
EVT_CALL(PopSong)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,44 @@
#include "flo_12.h"
#include "effects.h"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
API_CALLABLE(N(SpawnSunEffect)) {
fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_ExitWalk_flo_11_1) = EVT_EXIT_WALK(60, flo_12_ENTRY_0, "flo_11", flo_11_ENTRY_1);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_11_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_SET(AF_FLO_GivenCrystalBerry, FALSE)
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o180, SURFACE_TYPE_FLOWERS)
EVT_FLOWER_SPAWN_REGION( -65, -210, 90, -110, 0)
EVT_FLOWER_SPAWN_REGION( -200, 130, -80, 170, 0)
EVT_FLOWER_SPAWN_REGION( -270, -80, -225, 125, 0)
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_12_ENTRY_1)
EVT_EXEC(N(EVS_Scene_SunReturns))
EVT_ELSE
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,217 @@
#include "flo_12.h"
#include "world/common/npc/Rosie.inc.c"
#include "world/common/npc/Dummy.inc.c"
#include "common/foliage.inc.c"
#include "world/common/complete/GiveReward.inc.c"
#include "world/common/complete/KeyItemChoice.inc.c"
s32 N(KeyList)[] = {
ITEM_CRYSTAL_BERRY,
ITEM_NONE
};
EvtScript N(EVS_Scene_SunReturns) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(GetNpcPos, NPC_Rosie, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 350)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-9.5))
EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 0, -50)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(20)
EVT_CALL(SpeakToPlayer, NPC_Rosie, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_00C7)
EVT_WAIT(10)
EVT_CALL(GotoMap, EVT_PTR("flo_03"), flo_03_ENTRY_2)
EVT_WAIT(100)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PlayerApproachRosie) = {
EVT_WAIT(10)
EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_100, TRUE)
EVT_CALL(PlayerMoveTo, -5, 20, 20)
EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_100, FALSE)
EVT_CALL(PlayerFaceNpc, NPC_Rosie, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PlayerApproachRosieAndItem) = {
EVT_WAIT(10)
EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_100, TRUE)
EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, TRUE)
EVT_CALL(PlayerMoveTo, -5, 20, 20)
EVT_CALL(SetNpcFlagBits, NPC_Rosie, NPC_FLAG_100, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, FALSE)
EVT_CALL(PlayerFaceNpc, NPC_Rosie, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Rosie) = {
EVT_EXEC_WAIT(N(EVS_PushFlowerSong))
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY)
EVT_SWITCH(GF_FLO12_Met_Rosie)
EVT_CASE_EQ(0)
EVT_EXEC(N(EVS_PlayerApproachRosie))
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), LVar0, LVar1, LVar2, 325, EVT_FLOAT(19.0), EVT_FLOAT(-9.5))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008C)
EVT_CALL(ShowChoice, MSG_Choice_0011)
EVT_WAIT(10)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(0)
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008D)
EVT_CASE_EQ(1)
EVT_CALL(ContinueSpeech, NPC_SELF, ANIM_Rosie_Talk, ANIM_Rosie_Idle, 5, MSG_CH6_008E)
EVT_END_SWITCH
EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_TakeOut)
EVT_WAIT(10)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold)
EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, 0x00000564)
EVT_WAIT(10)
EVT_SWITCH(GF_FLO10_LilyRequestedWaterStone)
EVT_CASE_EQ(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F)
EVT_CASE_EQ(1)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_60002)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_008F)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_60005)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimPray)
EVT_WAIT(40)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092)
EVT_SET(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE)
EVT_END_SWITCH
EVT_SET(GF_FLO12_Met_Rosie, TRUE)
EVT_CASE_EQ(1)
EVT_SWITCH(GF_FLO12_RosieRequestedSomethingBeautiful)
EVT_CASE_EQ(0)
EVT_IF_EQ(GF_FLO10_LilyRequestedWaterStone, TRUE)
EVT_EXEC(N(EVS_PlayerApproachRosieAndItem))
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_60005)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0091)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_AnimPray)
EVT_WAIT(40)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0092)
EVT_SET(GF_FLO12_RosieRequestedSomethingBeautiful, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_TalkHold, 5, MSG_CH6_0090)
EVT_END_IF
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093)
EVT_END_SWITCH
EVT_END_SWITCH
EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE)
EVT_CALL(FindKeyItem, ITEM_CRYSTAL_BERRY, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_EXEC(N(EVS_PlayerApproachRosieAndItem))
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_CALL(SetCamProperties, CAM_DEFAULT, EVT_FLOAT(4.0), LVar0, LVar1, LVar2, 325, EVT_FLOAT(19.0), EVT_FLOAT(-9.5))
EVT_END_IF
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0094)
EVT_CHOOSE_KEY_ITEM_FROM(N(KeyList))
EVT_SWITCH(LVar0)
EVT_CASE_LE(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0093)
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0095)
EVT_CALL(RemoveItemEntity, LVar7)
EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup))
EVT_GIVE_KEY_REWARD(ITEM_WATER_STONE)
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096)
EVT_SET(AF_FLO_GivenCrystalBerry, TRUE)
EVT_SET(GB_StoryProgress, STORY_CH6_GOT_WATER_STONE)
EVT_END_SWITCH
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_SWITCH(AF_FLO_GivenCrystalBerry)
EVT_CASE_EQ(0)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0097)
EVT_CASE_EQ(1)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0096)
EVT_END_SWITCH
EVT_CASE_LT(STORY_CH6_RETURNED_TO_TOAD_TOWN)
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0098)
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Rosie_TalkHold, ANIM_Rosie_IdleHold, 5, MSG_CH6_0099)
EVT_END_SWITCH
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_EXEC_WAIT(N(EVS_PopMusic))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Rosie) = {
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Rosie)))
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 35)
EVT_CALL(SetNpcPos, NPC_Dummy, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_2, TRUE)
EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_HAS_SHADOW, TRUE)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_GOT_CRYSTAL_BERRY)
EVT_IF_EQ(GF_FLO12_Met_Rosie, TRUE)
EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold)
EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup))
EVT_SET(LVarA, LVar0)
EVT_END_IF
EVT_CASE_LT(STORY_CH6_GOT_WATER_STONE)
EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold)
EVT_CALL(MakeItemEntity, ITEM_WATER_STONE, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup))
EVT_SET(LVarA, LVar0)
EVT_CASE_DEFAULT
EVT_CALL(SetNpcFlagBits, NPC_Dummy, NPC_FLAG_100, FALSE)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Rosie_IdleHold)
EVT_CALL(MakeItemEntity, ITEM_CRYSTAL_BERRY, -33, 14, 19, ITEM_SPAWN_MODE_DECORATION, EVT_INDEX_OF_GAME_FLAG(GF_FLO12_HeldItemPickup))
EVT_SET(LVarA, LVar0)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Rosie)[] = {
{
.id = NPC_Rosie,
.settings = &N(NpcSettings_Rosie),
.pos = { -70.0f, 0.0f, 20.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_400000,
.init = &N(EVS_NpcInit_Rosie),
.drops = ROSIE_DROPS,
.animations = ROSIE_ANIMS,
.tattle = MSG_NpcTattle_Rosie,
},
{
.id = NPC_Dummy,
.settings = &N(NpcSettings_Dummy),
.pos = { -70.0f, 0.0f, 20.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_200,
.drops = ROSIE_DROPS,
.animations = ROSIE_ANIMS,
},
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Rosie)),
{}
};

View File

@ -0,0 +1,45 @@
// Older version of flo_13
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_13_shape.h"
#include "mapfs/flo_13_hit.h"
#include "sprite/npc/Lakilulu.h"
#include "sprite/npc/WorldLakilester.h"
#include "sprite/npc/Lakitu.h"
#include "sprite/npc/Spiny.h"
enum {
NPC_Lakilester = 0,
NPC_Lakilulu = 1,
NPC_Lakilulu_Spiny = 2,
NPC_Lakitu_01 = 3,
NPC_Lakitu_02 = 4,
NPC_Spiny_01 = 50,
NPC_Spiny_02 = 51,
NPC_Spiny_03 = 52,
NPC_Spiny_04 = 53,
NPC_Spiny_05 = 54,
NPC_Spiny_06 = 55,
};
enum {
MV_LakiluluSpinySceneState = MapVar(10),
};
#define NAMESPACE dead_flo_13
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_PushPartnerSong);
extern EvtScript N(EVS_PopSong);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);
API_CALLABLE(N(LoadPartyImage));

View File

@ -0,0 +1,14 @@
#include "flo_13.h"
EntryList N(Entrances) = {
[flo_13_ENTRY_0] { 570.0, 0.0, 0.0, 270.0 },
[flo_13_ENTRY_1] { -570.0, 0.0, 0.0, 90.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_13 },
};

View File

@ -0,0 +1,59 @@
#include "flo_13.h"
EvtScript N(EVS_PlaySongForPlayerPos) = {
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_LT(LVar0, -500)
EVT_GOTO(10)
EVT_END_IF
EVT_LABEL(0)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_LOOP(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_LT(LVar0, -500)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_LABEL(10)
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_LOOP(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_GT(LVar0, -500)
EVT_BREAK_LOOP
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupMusic) = {
EVT_EXEC(N(EVS_PlaySongForPlayerPos))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PushPartnerSong) = {
EVT_CALL(SetMusicTrack, 0, SONG_NEW_PARTNER, 0, 8)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_PopSong) = {
EVT_CALL(FadeOutMusic, 0, 500)
EVT_WAIT(15)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,21 @@
#include "flo_13.h"
#include "entity.h"
EvtScript N(EVS_OnBlast_Rock) = {
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeItemEntity, ITEM_MEGA_SMASH, -61, 60, -85, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_MegaSmash)
EVT_CALL(MakeItemEntity, ITEM_SHOOTING_STAR, 128, 0, 157, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO13_Item_ShootingStar)
EVT_IF_EQ(GF_FLO13_Item_MegaSmash, FALSE)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -160, 160, -90, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBlast_Rock)))
EVT_ELSE
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o85, COLLIDER_FLAGS_UPPER_MASK)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,43 @@
#include "flo_13.h"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
API_CALLABLE(N(SpawnSunEffect)) {
fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_ExitWalk_flo_14_1) = EVT_EXIT_WALK(60, flo_13_ENTRY_0, "flo_14", flo_14_ENTRY_1);
EvtScript N(EVS_ExitWalk_flo_15_0) = EVT_EXIT_WALK(60, flo_13_ENTRY_1, "flo_15", flo_15_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_15_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_14_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o48, SURFACE_TYPE_FLOWERS)
EVT_FLOWER_SPAWN_REGION( 274, -137, 583, -64, 0)
EVT_FLOWER_SPAWN_REGION( 433, 108, 580, 169, 0)
EVT_FLOWER_SPAWN_REGION( -460, 90, -125, 130, 0)
EVT_FLOWER_SPAWN_REGION( -420, -130, -260, -90, 0)
EVT_FLOWER_SPAWN_REGION( -220, -137, 0, -50, 160)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,898 @@
#include "flo_13.h"
#include "world/common/util/ChangeNpcToPartner.inc.c"
NpcSettings N(NpcSettings_Lakilester) = {
.height = 32,
.radius = 24,
.level = 20,
.onHit = &EnemyNpcHit,
.onDefeat = &EnemyNpcDefeat,
};
#define AI_LAKITU_FIRST_SPINY_ID NPC_Spiny_01
#define AI_LAKITU_LAST_SPINY_ID NPC_Spiny_06
#define DEBUG_LAKITU
#include "world/common/enemy/complete/Lakitu_SpinySpawner.inc.c"
#include "world/common/todo/UnkFunc42.inc.c"
API_CALLABLE(N(PlayLakiluluFlightSounds)) {
Npc* npc = get_npc_unsafe(NPC_Lakilulu);
s16 volume;
s16 pan;
script->functionTemp[1] = evt_get_variable(script, *script->ptrReadPos);
if (isInitialCall) {
script->functionTemp[0] = 0;
}
if (script->functionTemp[0] % 5 == 0) {
sfx_get_spatialized_sound_params(npc->pos.x, npc->pos.y, npc->pos.z,
&volume, &pan, SOUND_PARAM_MORE_QUIET | SOUND_SPACE_FULL);
sfx_play_sound_with_params(SOUND_295, volume, pan,
update_lerp(0, 500.0f, 0.0f, script->functionTemp[0], script->functionTemp[1]));
}
script->functionTemp[0]++;
if (script->functionTemp[0] > script->functionTemp[1]) {
return ApiStatus_DONE2;
} else {
return ApiStatus_BLOCK;
}
}
API_CALLABLE(N(PlayLakilesterFlightSounds)) {
Npc* npc = get_npc_unsafe(NPC_Lakilester);
s16 volume;
s16 pan;
if (isInitialCall) {
script->functionTemp[0] = 0;
}
if (script->functionTemp[0] % 5 == 0) {
sfx_get_spatialized_sound_params(npc->pos.x, npc->pos.y, npc->pos.z,
&volume, &pan, SOUND_PARAM_MORE_QUIET | SOUND_SPACE_FULL);
sfx_play_sound_with_params(SOUND_295, volume, pan,
update_lerp(0, 500.0f, 0.0f, script->functionTemp[0], 80));
}
script->functionTemp[0]++;
if (script->functionTemp[0] > 80) {
return ApiStatus_DONE2;
} else {
return ApiStatus_BLOCK;
}
}
Vec3f N(FlightPath_LakilesterAmbush)[] = {
{ -250.0, 130.0, 100.0 },
{ -150.0, 90.0, 70.0 },
{ 50.0, 70.0, 10.0 },
{ 200.0, 35.0, 30.0 },
{ 30.0, 10.0, 45.0 },
};
Vec3f N(FlightPath_LakiluluArrives)[] = {
{ -285.0, 130.0, 45.0 },
{ -185.0, 90.0, 25.0 },
{ 15.0, 70.0, 10.0 },
{ 165.0, 35.0, 30.0 },
{ -5.0, 10.0, 45.0 },
};
Vec3f N(FlightPath_LakiluluDeparts)[] = {
{ 10.0, 0.0, 45.0 },
{ -90.0, 20.0, 45.0 },
{ -190.0, 60.0, 45.0 },
{ -290.0, 140.0, 45.0 },
{ -390.0, 300.0, 45.0 },
};
EvtScript N(EVS_Lakliester_ManageYaw) = {
EVT_CALL(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2)
EVT_LABEL(0)
EVT_CALL(GetNpcPos, NPC_Lakilester, LVar3, LVar4, LVar5)
EVT_CALL(N(UnkFunc42))
EVT_CALL(InterpNpcYaw, NPC_Lakilester, LVarA, 0)
EVT_SET(LVar0, LVar3)
EVT_SET(LVar1, LVar4)
EVT_SET(LVar2, LVar5)
EVT_CALL(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilester, LVarA)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0)
EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Laklilulu_ManageYaw) = {
EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2)
EVT_LABEL(0)
EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar3, LVar4, LVar5)
EVT_CALL(N(UnkFunc42))
EVT_CALL(InterpNpcYaw, NPC_Lakilulu, LVarA, 0)
EVT_SET(LVar0, LVar3)
EVT_SET(LVar1, LVar4)
EVT_SET(LVar2, LVar5)
EVT_CALL(GetAngleBetweenNPCs, NPC_PARTNER, NPC_Lakilulu, LVarA)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, LVarA, 0)
EVT_IF_LT(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY)
EVT_CALL(GetAngleBetweenNPCs, NPC_Lakilester, NPC_Lakilulu, LVarB)
EVT_CALL(InterpNpcYaw, NPC_Lakilester, LVarB, 0)
EVT_END_IF
EVT_CALL(PlayerFaceNpc, NPC_Lakilulu, FALSE)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_LakiluluAndSpiny_HoverBobbing) = {
EVT_SET(MV_LakiluluSpinySceneState, 0)
EVT_LOOP(0)
EVT_LOOP(2)
EVT_CALL(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 1)
EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2)
EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 1)
EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2)
EVT_WAIT(2)
EVT_END_LOOP
EVT_WAIT(1)
EVT_LOOP(2)
EVT_CALL(GetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, -1)
EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar0, LVar1, LVar2)
EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, -1)
EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2)
EVT_WAIT(2)
EVT_END_LOOP
EVT_WAIT(1)
EVT_IF_EQ(MV_LakiluluSpinySceneState, 1)
EVT_SET(MV_LakiluluSpinySceneState, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Lakilulu_SpinyToss) = {
EVT_EXEC(N(EVS_LakiluluAndSpiny_HoverBobbing))
EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Lift)
EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3)
EVT_ADD(LVar1, -5)
EVT_ADD(LVar2, 30)
EVT_ADD(LVar3, 2)
EVT_CALL(SetNpcYaw, NPC_Lakilulu_Spiny, 270)
EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3)
EVT_THREAD
EVT_WAIT(5)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002B)
EVT_END_THREAD
EVT_CALL(ContinueSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200, MSG_CH6_00A8)
EVT_THREAD
EVT_WAIT(15)
EVT_CALL(EndSpeech, NPC_Lakilulu, -1, -1, SPEECH_FLAG_200)
EVT_END_THREAD
EVT_SET(MV_LakiluluSpinySceneState, 1)
EVT_LOOP(0)
EVT_WAIT(1)
EVT_IF_EQ(MV_LakiluluSpinySceneState, 2)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Throw)
EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3)
EVT_ADD(LVar1, 5)
EVT_ADD(LVar2, 20)
EVT_CALL(SetNpcJumpscale, NPC_Lakilulu_Spiny, EVT_FLOAT(0.0))
EVT_CALL(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 7)
EVT_ADD(LVar1, -100)
EVT_ADD(LVar2, 10)
EVT_THREAD
EVT_CALL(SetNpcJumpscale, NPC_Lakilulu_Spiny, EVT_FLOAT(1.5))
EVT_CALL(NpcJump0, NPC_Lakilulu_Spiny, LVar1, LVar2, LVar3, 15)
EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION)
EVT_END_THREAD
EVT_THREAD
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 10, EVT_FLOAT(2.0))
EVT_END_THREAD
EVT_CALL(PlaySoundAtPlayer, SOUND_HIT_PLAYER_NORMAL, 0)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_FallBack)
EVT_SET(LVar0, 90)
EVT_LOOP(20)
EVT_ADD(LVar0, 144)
EVT_IF_GT(LVar0, 359)
EVT_SUB(LVar0, 360)
EVT_END_IF
EVT_CALL(InterpPlayerYaw, LVar0, 1)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill)
EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcIdle_Lakilester) = {
EVT_IF_NE(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN)
EVT_RETURN
EVT_END_IF
EVT_CALL(AwaitPlayerApproach, 200, 20, 275)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(SetNpcPos, NPC_Lakilester, -250, 120, 45)
EVT_CALL(SetMusicTrack, 0, SONG_LAKILESTER_THEME, 0, 8)
EVT_CALL(ShowMessageAtScreenPos, MSG_CH6_00A0, 160, 40)
EVT_CALL(InterruptUsePartner)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A)
EVT_WAIT(20)
EVT_CALL(InterpPlayerYaw, 270, 1)
EVT_WAIT(20)
EVT_CALL(InterpPlayerYaw, 90, 1)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill)
EVT_CALL(func_802CF56C, 2)
EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run)
EVT_THREAD
EVT_CALL(N(PlayLakilesterFlightSounds))
EVT_END_THREAD
EVT_EXEC_GET_TID(N(EVS_Lakliester_ManageYaw), LVar9)
EVT_CALL(LoadPath, 80, EVT_PTR(N(FlightPath_LakilesterAmbush)), ARRAY_COUNT(N(FlightPath_LakilesterAmbush)), EASING_LINEAR)
EVT_LABEL(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakilester, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(0)
EVT_END_IF
EVT_KILL_THREAD(LVar9)
EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle)
EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE)
EVT_WAIT(15)
EVT_CALL(GetNpcPos, NPC_Lakilester, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 200)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(18.0), EVT_FLOAT(-8.5))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_THREAD
EVT_CALL(PlayerMoveTo, -75, 65, 10)
EVT_CALL(PlayerFaceNpc, NPC_Lakilester, FALSE)
EVT_END_THREAD
EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A1)
EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Run)
EVT_WAIT(10)
EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle)
EVT_THREAD
EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-6.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_CALL(DisablePlayerInput, FALSE)
EVT_CALL(StartBossBattle, SONG_SPECIAL_BATTLE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Lakilulu_FlyAway) = {
EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2)
EVT_CALL(AwaitPlayerLeave, LVar0, LVar2, 120)
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, 0, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 250)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-7.5))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(NpcFaceNpc, NPC_Lakilulu, NPC_Lakilester, 1)
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00B4)
EVT_CALL(NpcFaceNpc, NPC_PARTNER, NPC_Lakilulu, 1)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 600)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(-8.0))
EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, -200)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_THREAD
EVT_CALL(N(PlayLakiluluFlightSounds), 55)
EVT_END_THREAD
EVT_CALL(SetNpcFlagBits, NPC_Lakilulu, NPC_FLAG_100, TRUE)
EVT_EXEC_GET_TID(N(EVS_Laklilulu_ManageYaw), LVar9)
EVT_CALL(LoadPath, 55, EVT_PTR(N(FlightPath_LakiluluDeparts)), ARRAY_COUNT(N(FlightPath_LakiluluDeparts)), EASING_LINEAR)
EVT_LABEL(20)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(20)
EVT_END_IF
EVT_KILL_THREAD(LVar9)
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_CALL(BringPartnerOut, PARTNER_LAKILESTER)
EVT_IF_NE(LVar0, PARTNER_LAKILESTER)
EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.0))
EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3)
EVT_ADD(LVar1, 20)
EVT_ADD(LVar2, 20)
EVT_ADD(LVar3, 20)
EVT_CALL(NpcJump0, NPC_PARTNER, LVar1, LVar2, LVar3, 30)
EVT_END_IF
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(InterpNpcYaw, NPC_PARTNER, 270, 0)
EVT_WAIT(5)
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 5, MSG_CH6_00B5)
EVT_CALL(EnablePartnerAI)
EVT_CALL(PutPartnerAway)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_LakilesterDefeated) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(30)
EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_TiredTalk, ANIM_WorldLakilester_Tired, 0, MSG_CH6_00A2)
EVT_CALL(SetNpcPos, NPC_Lakilulu, -290, 120, 45)
EVT_THREAD
EVT_WAIT(10)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Idle)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_1002A)
EVT_WAIT(20)
EVT_CALL(InterpPlayerYaw, 270, 1)
EVT_END_THREAD
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 5, MSG_CH6_00A3)
EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Panic)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 0, 0, 0)
EVT_CALL(SetPanTarget, CAM_DEFAULT, 0, 0, 0)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 500)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-6.0))
EVT_CALL(SetCamPosA, CAM_DEFAULT, 0, 0)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, -200)
EVT_CALL(SetCamPosC, CAM_DEFAULT, 0, 0)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_WAIT(1)
EVT_THREAD
EVT_CALL(SetCamDistance, CAM_DEFAULT, 400)
EVT_CALL(SetCamPosB, CAM_DEFAULT, 130, 60)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_THREAD
EVT_CALL(N(PlayLakiluluFlightSounds), 80)
EVT_END_THREAD
EVT_EXEC_GET_TID(N(EVS_Laklilulu_ManageYaw), LVar9)
EVT_CALL(LoadPath, 80, EVT_PTR(N(FlightPath_LakiluluArrives)), ARRAY_COUNT(N(FlightPath_LakiluluArrives)), EASING_LINEAR)
EVT_LABEL(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(SetNpcPos, NPC_Lakilulu, LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(0)
EVT_END_IF
EVT_KILL_THREAD(LVar9)
EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill)
EVT_WAIT(20)
EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 250)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(5.5), EVT_FLOAT(-7.5))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00A4)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 300)
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(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Shout, ANIM_Lakilulu_Shout, 0, MSG_CH6_00A5)
EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 250)
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(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00A6)
EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle)
EVT_CALL(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 350)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(10.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_LABEL(10)
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 0, MSG_CH6_00A7)
EVT_CALL(ShowChoice, MSG_Choice_0020)
EVT_IF_NE(LVar0, 0)
EVT_EXEC_WAIT(N(EVS_Lakilulu_SpinyToss))
EVT_WAIT(10)
EVT_GOTO(10)
EVT_ELSE
EVT_CALL(ContinueSpeech, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_00A9)
EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_Idle)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_NodYes)
EVT_WAIT(10)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_StandStill)
EVT_WAIT(20)
EVT_CALL(GetNpcPos, NPC_Lakilulu, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 20)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 250)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AA)
EVT_CALL(SetNpcAnimation, NPC_Lakilester, ANIM_WorldLakilester_Idle)
EVT_CALL(EndSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 40)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 350)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_WAIT(10)
EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Shout, ANIM_WorldLakilester_IdleTough, 0, MSG_CH6_00AB)
EVT_WAIT(10)
EVT_CALL(ShowChoice, MSG_Choice_0021)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(-1)
EVT_CASE_EQ(0)
EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AC)
EVT_CASE_EQ(1)
EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AD)
EVT_CASE_EQ(2)
EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AE)
EVT_CASE_EQ(3)
EVT_CALL(ContinueSpeech, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00AF)
EVT_END_SWITCH
EVT_END_IF
EVT_CALL(InterpNpcYaw, NPC_Lakilulu, 90, 1)
EVT_CALL(SetNpcAnimation, NPC_Lakilulu, ANIM_Lakilulu_ConcernedNod)
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B0)
EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B1)
EVT_WAIT(15)
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_ConcernedTalk, ANIM_Lakilulu_ConcernedNod, 5, MSG_CH6_00B2)
EVT_CALL(SpeakToPlayer, NPC_Lakilester, ANIM_WorldLakilester_Talk, ANIM_WorldLakilester_Idle, 0, MSG_CH6_00B3)
EVT_WAIT(10)
EVT_THREAD
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_END_THREAD
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, 30)
EVT_CALL(SetNpcSpeed, NPC_Lakilester, EVT_FLOAT(3.5))
EVT_CALL(NpcMoveTo, NPC_Lakilester, LVar0, 60, 0)
EVT_CALL(N(ChangeNpcToPartner), 0, 8)
EVT_CALL(N(LoadPartyImage))
EVT_EXEC(N(EVS_PushPartnerSong))
EVT_WAIT(15)
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_0190, 160, 40)
EVT_EXEC(N(EVS_PopSong))
EVT_WAIT(10)
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
EVT_SET(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY)
EVT_CALL(EnablePartnerAI)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_EXEC_WAIT(N(EVS_Lakilulu_FlyAway))
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcDefeat_Lakilester) = {
EVT_CALL(GetBattleOutcome, LVar0)
EVT_SWITCH(LVar0)
EVT_CASE_EQ(OUTCOME_PLAYER_WON)
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_WorldLakilester_Tired)
EVT_CALL(SetCamType, CAM_DEFAULT, 6, TRUE)
EVT_CALL(GetNpcPos, NPC_SELF, LVar3, LVar1, LVar2)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar0, LVar3)
EVT_DIV(LVar0, 2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 300)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(17.0), EVT_FLOAT(-7.5))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_EXEC(N(EVS_Scene_LakilesterDefeated))
EVT_CASE_EQ(OUTCOME_PLAYER_LOST)
EVT_CASE_EQ(OUTCOME_PLAYER_FLED)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Lakilulu) = {
EVT_IF_LE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032)
EVT_ELSE
EVT_CALL(GetCurrentPartnerID, LVar0)
EVT_IF_NE(LVar0, PARTNER_LAKILESTER)
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0034)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_Lakilulu, ANIM_Lakilulu_Talk, ANIM_Lakilulu_Idle, 0, MSG_CH6_0032)
EVT_END_IF
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Lakilester) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH6_LAKILESTER_JOINED_PARTY)
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Lakilester)))
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_Lakilester)))
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Lakilulu) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH6_BEGAN_PEACH_MISSION)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Lakilulu)))
EVT_CALL(SetNpcCollisionSize, NPC_SELF, 36, 28)
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetNpcPos, NPC_SELF, -50, 180, -50)
EVT_END_IF
EVT_ELSE
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Lakilulu_Spiny) = {
EVT_CALL(SetNpcPos, NPC_Lakilulu_Spiny, NPC_DISPOSE_LOCATION)
EVT_CALL(SetNpcAnimation, NPC_Lakilulu_Spiny, ANIM_Lakilulu_Spiny)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Lakitu) = {
EVT_IF_EQ(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Spiny) = {
EVT_IF_EQ(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN)
EVT_CALL(RemoveNpc, NPC_SELF)
EVT_END_IF
EVT_CALL(SetSelfVar, 13, 1)
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Lakilester) = {
.id = NPC_Lakilester,
.settings = &N(NpcSettings_Lakilester),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_4 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_40000,
.init = &N(EVS_NpcInit_Lakilester),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_WorldLakilester_Idle,
.walk = ANIM_WorldLakilester_Idle,
.run = ANIM_WorldLakilester_Idle,
.chase = ANIM_WorldLakilester_Idle,
.anim_4 = ANIM_WorldLakilester_Idle,
.anim_5 = ANIM_WorldLakilester_Idle,
.death = ANIM_WorldLakilester_Idle,
.hit = ANIM_WorldLakilester_Idle,
.anim_8 = ANIM_WorldLakilester_Idle,
.anim_9 = ANIM_WorldLakilester_Idle,
.anim_A = ANIM_WorldLakilester_Idle,
.anim_B = ANIM_WorldLakilester_Idle,
.anim_C = ANIM_WorldLakilester_Idle,
.anim_D = ANIM_WorldLakilester_Idle,
.anim_E = ANIM_WorldLakilester_Idle,
.anim_F = ANIM_WorldLakilester_Idle,
},
};
StaticNpc N(NpcData_Lakilulu) = {
.id = NPC_Lakilulu,
.settings = &N(NpcSettings_Lakilester),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Lakilulu),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Lakilulu_Idle,
.walk = ANIM_Lakilulu_Idle,
.run = ANIM_Lakilulu_Idle,
.chase = ANIM_Lakilulu_Idle,
.anim_4 = ANIM_Lakilulu_Idle,
.anim_5 = ANIM_Lakilulu_Idle,
.death = ANIM_Lakilulu_Idle,
.hit = ANIM_Lakilulu_Idle,
.anim_8 = ANIM_Lakilulu_Idle,
.anim_9 = ANIM_Lakilulu_Idle,
.anim_A = ANIM_Lakilulu_Idle,
.anim_B = ANIM_Lakilulu_Idle,
.anim_C = ANIM_Lakilulu_Idle,
.anim_D = ANIM_Lakilulu_Idle,
.anim_E = ANIM_Lakilulu_Idle,
.anim_F = ANIM_Lakilulu_Idle,
},
.tattle = MSG_NpcTattle_Lakilulu,
};
StaticNpc N(NpcData_Lakilulu_Spiny) = {
.id = NPC_Lakilulu_Spiny,
.settings = &N(NpcSettings_Lakilester),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 90,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Lakilulu_Spiny),
.drops = {
.dropFlags = NPC_DROP_FLAGS_80,
.heartDrops = NO_DROPS,
.flowerDrops = NO_DROPS,
},
.animations = {
.idle = ANIM_Lakilulu_Idle,
.walk = ANIM_Lakilulu_Idle,
.run = ANIM_Lakilulu_Idle,
.chase = ANIM_Lakilulu_Idle,
.anim_4 = ANIM_Lakilulu_Idle,
.anim_5 = ANIM_Lakilulu_Idle,
.death = ANIM_Lakilulu_Idle,
.hit = ANIM_Lakilulu_Idle,
.anim_8 = ANIM_Lakilulu_Idle,
.anim_9 = ANIM_Lakilulu_Idle,
.anim_A = ANIM_Lakilulu_Idle,
.anim_B = ANIM_Lakilulu_Idle,
.anim_C = ANIM_Lakilulu_Idle,
.anim_D = ANIM_Lakilulu_Idle,
.anim_E = ANIM_Lakilulu_Idle,
.anim_F = ANIM_Lakilulu_Idle,
},
};
StaticNpc N(NpcData_Lakitu_01) = {
.id = NPC_Lakitu_01,
.settings = &N(NpcSettings_Lakitu_SpinySpawner),
.pos = { 335.0f, 90.0f, 45.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Lakitu),
.drops = LAKITU_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 335, 90, 45 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 335, 90, 45 },
.detectSize = { 250 },
}
},
.animations = LAKITU_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Lakitu_02) = {
.id = NPC_Lakitu_02,
.settings = &N(NpcSettings_Lakitu_SpinySpawner),
.pos = { -320.0f, 90.0f, 0.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.init = &N(EVS_NpcInit_Lakitu),
.drops = LAKITU_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -320, 90, 0 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -320, 90, 0 },
.detectSize = { 200 },
}
},
.animations = LAKITU_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Spiny_01) = {
.id = NPC_Spiny_01,
.settings = &N(NpcSettings_SpawnedSpiny),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = ENEMY_FLAGS_4 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Spiny),
.drops = SPINY_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 0, 0 },
.wanderSize = { 0 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 0, 0 },
.detectSize = { 0 },
}
},
.animations = SPINY_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Spiny_02) = {
.id = NPC_Spiny_02,
.settings = &N(NpcSettings_SpawnedSpiny),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = ENEMY_FLAGS_4 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Spiny),
.drops = SPINY_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 0, 0 },
.wanderSize = { 0 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 0, 0 },
.detectSize = { 0 },
}
},
.animations = SPINY_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Spiny_03) = {
.id = NPC_Spiny_03,
.settings = &N(NpcSettings_SpawnedSpiny),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = ENEMY_FLAGS_4 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Spiny),
.drops = SPINY_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 0, 0 },
.wanderSize = { 0 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 0, 0 },
.detectSize = { 0 },
}
},
.animations = SPINY_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Spiny_04) = {
.id = NPC_Spiny_04,
.settings = &N(NpcSettings_SpawnedSpiny),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = ENEMY_FLAGS_4 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Spiny),
.drops = SPINY_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 0, 0 },
.wanderSize = { 0 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 0, 0 },
.detectSize = { 0 },
}
},
.animations = SPINY_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Spiny_05) = {
.id = NPC_Spiny_05,
.settings = &N(NpcSettings_SpawnedSpiny),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = ENEMY_FLAGS_4 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Spiny),
.drops = SPINY_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 0, 0 },
.wanderSize = { 0 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 0, 0 },
.detectSize = { 0 },
}
},
.animations = SPINY_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_Spiny_06) = {
.id = NPC_Spiny_06,
.settings = &N(NpcSettings_SpawnedSpiny),
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 0,
.flags = ENEMY_FLAGS_4 | ENEMY_FLAGS_400,
.init = &N(EVS_NpcInit_Spiny),
.drops = SPINY_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 0, 0, 0 },
.wanderSize = { 0 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { 0, 0, 0 },
.detectSize = { 0 },
}
},
.animations = SPINY_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Lakitu_01), 0x1A06, BTL_FLO_STAGE_04),
NPC_GROUP(N(NpcData_Lakitu_02), 0x1A04, BTL_FLO_STAGE_04),
NPC_GROUP(N(NpcData_Spiny_01), 0x1A0C, BTL_FLO_STAGE_02),
NPC_GROUP(N(NpcData_Spiny_02), 0x1A0C, BTL_FLO_STAGE_02),
NPC_GROUP(N(NpcData_Spiny_03), 0x1A0C, BTL_FLO_STAGE_02),
NPC_GROUP(N(NpcData_Spiny_04), 0x1A0C, BTL_FLO_STAGE_02),
NPC_GROUP(N(NpcData_Spiny_05), 0x1A0C, BTL_FLO_STAGE_02),
NPC_GROUP(N(NpcData_Spiny_06), 0x1A0C, BTL_FLO_STAGE_02),
NPC_GROUP(N(NpcData_Lakilester), 0x1B05, BTL_FLO2_STAGE_01),
NPC_GROUP(N(NpcData_Lakilulu)),
NPC_GROUP(N(NpcData_Lakilulu_Spiny)),
{}
};

View File

@ -1,5 +1,4 @@
#include "flo_13.h" #include "flo_13.h"
#define PARTY_IMAGE "party_pokopi" #define PARTY_IMAGE "party_pokopi"
#include "world/common/todo/LoadPartyImage.inc.c" #include "world/common/todo/LoadPartyImage.inc.c"

View File

@ -0,0 +1,41 @@
// Older version of flo_14
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_14_shape.h"
#include "mapfs/flo_14_hit.h"
#include "sprite/npc/Bubulb.h"
#include "sprite/npc/Bzzap.h"
enum {
NPC_BubbleFlower = 0,
NPC_Bzzap = 1,
};
enum {
MV_SavedPartnerFlags = MapVar(0),
MV_BubbleCamScript = MapVar(9),
MV_RotAngle_Log_01 = MapVar(10),
MV_RotVelocity_Log_01 = MapVar(11),
MV_RotAngle_Log_02 = MapVar(12),
MV_RotVelocity_Log_02 = MapVar(13),
};
#define NAMESPACE dead_flo_14
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_SetupBubbles);
extern EvtScript N(EVS_SetupLogBridges);
extern EvtScript N(EVS_MakeEntities);
extern EvtScript N(EVS_BlowBigBubble);
extern EvtScript N(EVS_RideBigBubble);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,14 @@
#include "flo_14.h"
EntryList N(Entrances) = {
[flo_14_ENTRY_0] { 720.0, 0.0, 0.0, 270.0 },
[flo_14_ENTRY_1] { -720.0, 0.0, 0.0, 90.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_14 },
};

View File

@ -0,0 +1,12 @@
#include "flo_14.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,98 @@
#include "flo_14.h"
#include "effects.h"
#include "world/common/atomic/TexturePan.inc.c"
#include "world/common/atomic/TexturePan.data.inc.c"
API_CALLABLE(N(SpawnSunEffect)) {
fx_sun_undeclared(FX_SUN_FROM_LEFT, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_ExitWalk_flo_00_1) = EVT_EXIT_WALK(60, flo_14_ENTRY_0, "flo_00", flo_00_ENTRY_1);
EvtScript N(EVS_ExitWalk_flo_13_0) = EVT_EXIT_WALK(60, flo_14_ENTRY_1, "flo_13", flo_13_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_13_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
LavaReset N(SafeFloorColliders)[] = {
{ .colliderID = COLLIDER_o129, .pos = { -500.0, 0.0, -90.0 }},
{ .colliderID = COLLIDER_o137, .pos = { -510.0, 0.0, 0.0 }},
{ .colliderID = COLLIDER_o155, .pos = { -500.0, 0.0, 110.0 }},
{ .colliderID = COLLIDER_o156, .pos = { -250.0, 0.0, -90.0 }},
{ .colliderID = COLLIDER_o140, .pos = { -240.0, 0.0, 0.0 }},
{ .colliderID = COLLIDER_o157, .pos = { -250.0, 0.0, 110.0 }},
{ .colliderID = COLLIDER_o151, .pos = { -50.0, 0.0, 25.0 }},
{ .colliderID = COLLIDER_o152, .pos = { 70.0, 60.0, -95.0 }},
{ .colliderID = COLLIDER_o153, .pos = { 410.0, 60.0, -95.0 }},
{ .colliderID = COLLIDER_o154, .pos = { 550.0, 0.0, 50.0 }},
{ .colliderID = COLLIDER_o158, .pos = { -50.0, 0.0, 110.0 }},
{ .colliderID = -1 }
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC(N(EVS_MakeEntities))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o114, SURFACE_TYPE_SPIKES)
EVT_THREAD
EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders)))
EVT_END_THREAD
EVT_CALL(EnableTexPanning, MODEL_o39, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o41, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o43, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o49, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o51, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o55, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o123, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o125, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o127, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o129, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o131, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o133, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o135, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o40, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o44, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o48, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o52, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o54, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o124, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o126, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o128, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o130, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o132, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o134, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o136, TRUE)
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_1)
TEX_PAN_PARAMS_STEP( 140, 0, 0, 0)
TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_THREAD
TEX_PAN_PARAMS_ID(TEX_PANNER_2)
TEX_PAN_PARAMS_STEP( -200, 0, 0, 0)
TEX_PAN_PARAMS_FREQ( 1, 0, 0, 0)
TEX_PAN_PARAMS_INIT( 0, 0, 0, 0)
EVT_EXEC(N(EVS_UpdateTexturePan))
EVT_END_THREAD
EVT_EXEC(N(EVS_SetupBubbles))
EVT_EXEC(N(EVS_SetupLogBridges))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,402 @@
#include "flo_14.h"
#include "effects.h"
#include "model.h"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
#include "world/common/atomic/flo_DroppingVine.inc.c"
s32 N(BlowingBubbles) = FALSE;
EvtScript N(EVS_BubbleUpdateCamera) = {
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(MakeLerp, LVar1, 48, 15, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(GetPlayerPos, LVar2, LVar3, LVar4)
EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar2, LVar0, LVar4)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_LOOP(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, 48, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_TetherParterToPlayer) = {
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE)
EVT_LOOP(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 20)
EVT_ADD(LVar2, -5)
EVT_CALL(SetNpcPos, NPC_PARTNER, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_END_LOOP
EVT_RETURN
EVT_END
};
API_CALLABLE(N(SavePartnerFlags)) {
if (gPlayerData.currentPartner == PARTNER_NONE) {
script->varTable[14] = FALSE;
return ApiStatus_DONE2;
}
script->varTable[14] = TRUE;
evt_set_variable(NULL, MV_SavedPartnerFlags, get_npc_unsafe(NPC_PARTNER)->flags);
return ApiStatus_DONE2;
}
API_CALLABLE(N(RestorePartnerFlags)) {
get_npc_unsafe(NPC_PARTNER)->flags = evt_get_variable(NULL, MV_SavedPartnerFlags);
return ApiStatus_DONE2;
}
API_CALLABLE(N(UpdateBubbleSoundPos)) {
Bytecode* args = script->ptrReadPos;
script->functionTemp[0] = evt_get_variable(script, *args++);
script->functionTemp[1] = evt_get_variable(script, *args++);
script->functionTemp[2] = evt_get_variable(script, *args++);
sfx_adjust_env_sound_pos(SOUND_194, 0, script->functionTemp[0], script->functionTemp[1], script->functionTemp[2]);
return ApiStatus_DONE2;
}
Vec3f N(BubbleFlightPath)[] = {
{ 531.0, 75.0, 81.0 },
{ 481.0, 80.0, 81.0 },
{ 431.0, 75.0, 81.0 },
{ 381.0, 70.0, 81.0 },
{ 331.0, 75.0, 81.0 },
{ 281.0, 80.0, 81.0 },
{ 231.0, 75.0, 81.0 },
{ 181.0, 70.0, 81.0 },
{ 131.0, 75.0, 81.0 },
{ 81.0, 80.0, 81.0 },
{ 31.0, 75.0, 81.0 },
{ -19.0, 70.0, 81.0 },
{ -69.0, 75.0, 81.0 },
};
EvtScript N(EVS_BubbleFollowPath) = {
EVT_WAIT(20)
EVT_CALL(PlaySound, SOUND_80000023)
EVT_CALL(LoadPath, 165, EVT_PTR(N(BubbleFlightPath)), 13, EASING_COS_IN_OUT)
EVT_LABEL(0)
EVT_CALL(GetNextPathPos)
EVT_CALL(TranslateModel, MODEL_o167, LVar1, LVar2, LVar3)
EVT_ADD(LVar2, -27)
EVT_ADD(LVar3, -10)
EVT_CALL(SetPlayerPos, LVar1, LVar2, LVar3)
EVT_CALL(N(UpdateBubbleSoundPos), LVar1, LVar2, LVar3)
EVT_WAIT(1)
EVT_IF_EQ(LVar0, 1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(StopSound, SOUND_80000023)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_RideBigBubble) = {
EVT_CALL(IsPlayerWithin, 531, 81, 30, LVar0)
EVT_IF_EQ(LVar0, 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(GetCurrentPartner, LVar0)
EVT_IF_NE(LVar0, PARTNER_NONE)
EVT_CALL(InterruptUsePartner)
EVT_WAIT(20)
EVT_END_IF
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(DisablePartnerAI, 0)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, FALSE)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_100, TRUE)
EVT_CALL(GetModelCenter, MODEL_o167)
EVT_THREAD
EVT_ADD(LVar2, -10)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.2))
EVT_CALL(PlayerJump, 531, 48, LVar2, 10)
EVT_CALL(SetPlayerActionState, ACTION_STATE_LAND)
EVT_END_THREAD
EVT_THREAD
EVT_WAIT(5)
EVT_ADD(LVar2, -15)
EVT_CALL(SetNpcJumpscale, NPC_PARTNER, EVT_FLOAT(0.2))
EVT_CALL(NpcJump0, NPC_PARTNER, 531, 68, LVar2, 10)
EVT_END_THREAD
EVT_EXEC_GET_TID(N(EVS_BubbleUpdateCamera), MV_BubbleCamScript)
EVT_WAIT(15)
EVT_CALL(N(SavePartnerFlags))
EVT_IF_TRUE(LVarE)
EVT_EXEC_GET_TID(N(EVS_TetherParterToPlayer), LVarE)
EVT_END_IF
EVT_EXEC_WAIT(N(EVS_BubbleFollowPath))
EVT_IF_TRUE(LVarE)
EVT_KILL_THREAD(LVarE)
EVT_CALL(N(RestorePartnerFlags))
EVT_END_IF
EVT_CALL(GetModelCenter, MODEL_o167)
EVT_PLAY_EFFECT(EFFECT_FIREWORK, 0, LVar0, LVar1, LVar2, 2, 0)
EVT_CALL(PlaySoundAt, SOUND_2F3, 0, LVar0, LVar1, LVar2)
EVT_CALL(ClearPartnerMoveHistory, NPC_PARTNER)
EVT_CALL(EnableModel, MODEL_o167, FALSE)
EVT_SET(AF_FLO_BigBubbleReady, FALSE)
EVT_KILL_THREAD(MV_BubbleCamScript)
EVT_CALL(SetNpcFlagBits, NPC_PARTNER, NPC_FLAG_GRAVITY, TRUE)
EVT_CALL(EnablePartnerAI)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(EVS_BlowBigBubble) = {
EVT_CALL(PlaySoundAt, SOUND_193, 0, 591, 55, 121)
EVT_CALL(EnableModel, MODEL_o167, TRUE)
EVT_SETF(LVar2, EVT_FLOAT(1.0))
EVT_SETF(LVar4, EVT_FLOAT(0.0))
EVT_SETF(LVar5, EVT_FLOAT(0.0))
EVT_SETF(LVar6, EVT_FLOAT(0.0))
EVT_SET(LVar7, -30)
EVT_SET(LVar8, 20)
EVT_DIVF(LVar7, EVT_FLOAT(90.0))
EVT_DIVF(LVar8, EVT_FLOAT(90.0))
EVT_SET(LVar9, 180)
EVT_LOOP(LVar9)
EVT_CALL(TranslateModel, MODEL_o167, 591, 55, 121)
EVT_SETF(LVar3, LVar2)
EVT_DIVF(LVar3, 10)
EVT_CALL(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3)
EVT_CALL(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6)
EVT_ADDF(LVar2, EVT_FLOAT(0.05))
EVT_IF_GT(LVar9, 90)
EVT_ADDF(LVar4, LVar7)
EVT_ADDF(LVar5, LVar8)
EVT_END_IF
EVT_WAIT(1)
EVT_END_LOOP
EVT_SET(LVar7, -30)
EVT_SET(LVar8, -40)
EVT_DIVF(LVar7, EVT_FLOAT(60.0))
EVT_DIVF(LVar8, EVT_FLOAT(60.0))
EVT_LOOP(60)
EVT_CALL(TranslateModel, MODEL_o167, 591, 55, 121)
EVT_CALL(ScaleModel, MODEL_o167, LVar3, LVar3, LVar3)
EVT_CALL(TranslateModel, MODEL_o167, LVar4, LVar5, LVar6)
EVT_ADDF(LVar4, LVar7)
EVT_ADDF(LVar6, LVar8)
EVT_WAIT(1)
EVT_END_LOOP
EVT_SET(AF_FLO_BlowingBigBubble, FALSE)
EVT_SET(AF_FLO_BigBubbleReady, TRUE)
EVT_RETURN
EVT_END
};
f32 N(BubblePhase) = 0.0f;
void N(gfx_build_big_bubble)(void) {
Matrix4f matrix;
Vtx* src;
Vtx* dest;
s32 copyCount;
s32 new_var;
guMtxIdentF(matrix);
matrix[0][0] = (sin_rad(N(BubblePhase) / 11.0f) * 0.04) + 0.98;
matrix[0][1] = (sin_rad(N(BubblePhase) / 12.0f) * 0.04);
matrix[0][2] = (cos_rad(N(BubblePhase) / 13.0f) * 0.04);
matrix[1][1] = (sin_rad(N(BubblePhase) / 7.0f + 1.0f) * 0.04) + 0.98;
matrix[1][0] = (sin_rad(N(BubblePhase) / 14.0f) * 0.04);
matrix[1][2] = (cos_rad(N(BubblePhase) / 15.0f) * 0.04);
matrix[2][2] = (sin_rad(N(BubblePhase) * 0.25f + 2.0f) * 0.04) + 0.98;
matrix[2][0] = (sin_rad(N(BubblePhase) * 0.0625f) * 0.04);
matrix[2][1] = (cos_rad(N(BubblePhase) / 17.0f) * 0.04);
guMtxF2L(matrix, &gDisplayContext->matrixStack[gMatrixListPos]);
mdl_get_copied_vertices(0, &src, &dest, &copyCount);
new_var = 0;
while (new_var); // TODO required to match
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++],
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(0));
N(BubblePhase) += 1.0f;
}
s32 N(FlowerPhase) = 90;
void N(gfx_build_bubble_flower)(void) {
s32 i;
Vtx* verts;
Vtx* copied;
s32 numCopied;
f32 openedScale; // controls how open the flower is
f32 lengthScale; // controls longitudinal pulsing
mdl_get_copied_vertices(1, &verts, &copied, &numCopied);
for (i = 0; i < numCopied; i++) {
Vtx* src = &verts[i];
Vtx* copy = &copied[i];
if (src->v.ob[0] <= 600) {
openedScale = 0.7 + (sin_rad((N(FlowerPhase) / 180.0f) * PI_D) * 0.3);
lengthScale = 0.2 - (sin_rad((N(FlowerPhase) / 180.0f) * PI_D) * 0.2);
copy->v.ob[0] = ((src->v.ob[0] - 616) * openedScale) + 616.0f + (lengthScale * -48.0f);
copy->v.ob[1] = ((src->v.ob[1] - 44) * openedScale) + 44.0f + (lengthScale * 25.0f);
copy->v.ob[2] = ((src->v.ob[2] - 113) * openedScale) + 113.0f + (lengthScale * -87.0f);
}
}
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1));
if (evt_get_variable(NULL, AF_FLO_BlowingBigBubble)) {
if (N(FlowerPhase) > 90) {
N(FlowerPhase) -= 360;
}
if (N(FlowerPhase) >= -90) {
N(FlowerPhase) += 5;
} else {
N(FlowerPhase) += 20;
}
if (N(FlowerPhase) >= 90) {
N(FlowerPhase) = 90;
}
} else {
if (N(FlowerPhase) > 140 && N(FlowerPhase) < 260) {
N(BlowingBubbles) = TRUE;
} else {
N(BlowingBubbles) = FALSE;
}
N(FlowerPhase) += 5;
}
if (N(FlowerPhase) >= 360) {
N(FlowerPhase) -= 360;
}
}
EvtScript N(EVS_ManageBlownBubble) = {
EVT_SET_GROUP(EVT_GROUP_00)
EVT_SET(LVarF, LVar0)
EVT_LABEL(0)
EVT_IF_EQ(AF_FLO_PauseBlowingBubbles, TRUE)
EVT_WAIT(10)
EVT_GOTO(0)
EVT_END_IF
EVT_USE_BUF(EVT_PTR(N(BlowingBubbles)))
EVT_BUF_READ1(LVar0)
EVT_IF_EQ(LVar0, FALSE)
EVT_CALL(RandInt, 10, LVar0)
EVT_ADD(LVar0, 1)
EVT_WAIT(LVar0)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(EnableModel, LVarF, TRUE)
EVT_CALL(RandInt, 4, LVar0)
EVT_ADDF(LVar0, EVT_FLOAT(4.0))
EVT_MULF(LVar0, EVT_FLOAT(-1.0))
EVT_SETF(LVar1, EVT_FLOAT(2.0))
EVT_SETF(LVar2, LVar0)
EVT_DIVF(LVar2, EVT_FLOAT(10.0))
EVT_SETF(LVar3, EVT_FLOAT(0.4))
EVT_SETF(LVar4, EVT_FLOAT(591.0))
EVT_SETF(LVar5, EVT_FLOAT(60.0))
EVT_SETF(LVar6, EVT_FLOAT(121.0))
EVT_CALL(RandInt, 3, LVar7)
EVT_ADDF(LVar7, EVT_FLOAT(3.0))
EVT_MULF(LVar7, EVT_FLOAT(0.04))
EVT_SETF(LVar9, LVar7)
EVT_DIVF(LVar9, EVT_FLOAT(5.0))
EVT_CALL(RandInt, 50, LVar8)
EVT_ADD(LVar8, 50)
EVT_LOOP(LVar8)
EVT_SETF(LVarE, LVar2)
EVT_SUBF(LVarE, LVar0)
EVT_MULF(LVarE, EVT_FLOAT(0.046875))
EVT_ADDF(LVar0, LVarE)
EVT_SETF(LVarE, LVar3)
EVT_SUBF(LVarE, LVar1)
EVT_MULF(LVarE, EVT_FLOAT(0.046875))
EVT_ADDF(LVar1, LVarE)
EVT_ADDF(LVar4, LVar0)
EVT_ADDF(LVar5, LVar1)
EVT_SETF(LVarE, LVar7)
EVT_SUBF(LVarE, LVar9)
EVT_MULF(LVarE, EVT_FLOAT(0.203125))
EVT_ADDF(LVar9, LVarE)
EVT_CALL(TranslateModel, LVarF, LVar4, LVar5, LVar6)
EVT_CALL(ScaleModel, LVarF, LVar9, LVar9, LVar9)
EVT_WAIT(1)
EVT_END_LOOP
EVT_CALL(EnableModel, LVarF, FALSE)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupBubbles) = {
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o129, SURFACE_TYPE_FLOWERS)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o155, SURFACE_TYPE_FLOWERS)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o156, SURFACE_TYPE_FLOWERS)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o157, SURFACE_TYPE_FLOWERS)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o158, SURFACE_TYPE_FLOWERS)
EVT_FLOWER_SPAWN_REGION( -730, -130, -470, -70, 0)
EVT_FLOWER_SPAWN_REGION( -730, 70, -470, 140, 0)
EVT_FLOWER_SPAWN_REGION( -280, 130, -110, -70, 0)
EVT_FLOWER_SPAWN_REGION( -280, 70, -10, 140, 0)
EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o92, MODEL_o93, MODEL_o94, MODEL_o95)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o82, MODEL_o83, MODEL_o84, MODEL_o85)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o78, MODEL_o79, MODEL_o80, MODEL_o81)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o88, MODEL_o89, MODEL_o90, MODEL_o91)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o113, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(1))
EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(2))
EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(3))
EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(4))
EVT_CALL(CloneModel, MODEL_o169, CLONED_MODEL(5))
EVT_CALL(EnableModel, MODEL_o167, FALSE)
EVT_CALL(EnableModel, MODEL_o169, FALSE)
EVT_CALL(EnableModel, CLONED_MODEL(1), FALSE)
EVT_CALL(EnableModel, CLONED_MODEL(2), FALSE)
EVT_CALL(EnableModel, CLONED_MODEL(3), FALSE)
EVT_CALL(EnableModel, CLONED_MODEL(4), FALSE)
EVT_CALL(EnableModel, CLONED_MODEL(5), FALSE)
EVT_SET(LVar0, CLONED_MODEL(1))
EVT_EXEC(N(EVS_ManageBlownBubble))
EVT_SET(LVar0, CLONED_MODEL(2))
EVT_EXEC(N(EVS_ManageBlownBubble))
EVT_SET(LVar0, CLONED_MODEL(3))
EVT_EXEC(N(EVS_ManageBlownBubble))
EVT_SET(LVar0, CLONED_MODEL(4))
EVT_EXEC(N(EVS_ManageBlownBubble))
EVT_SET(LVar0, CLONED_MODEL(5))
EVT_EXEC(N(EVS_ManageBlownBubble))
EVT_CALL(MakeLocalVertexCopy, 0, MODEL_o167, TRUE)
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(gfx_build_big_bubble)), 0)
EVT_CALL(SetModelCustomGfx, MODEL_o167, 1, -1)
EVT_CALL(SetModelCustomGfx, CLONED_MODEL(1), 1, -1)
EVT_CALL(SetModelCustomGfx, CLONED_MODEL(2), 1, -1)
EVT_CALL(SetModelCustomGfx, CLONED_MODEL(3), 1, -1)
EVT_CALL(SetModelCustomGfx, CLONED_MODEL(4), 1, -1)
EVT_CALL(SetModelCustomGfx, CLONED_MODEL(5), 1, -1)
EVT_CALL(MakeLocalVertexCopy, 1, MODEL_o57, TRUE)
EVT_CALL(SetCustomGfxBuilders, 2, EVT_PTR(N(gfx_build_bubble_flower)), 0)
EVT_CALL(SetModelCustomGfx, MODEL_o57, 2, -1)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,120 @@
#include "flo_14.h"
#include "world/common/enemy/complete/Bzzap.inc.c"
#include "world/common/npc/Bubulb.h"
NpcSettings N(NpcSettings_BubbleFlower) = {
.height = 56,
.radius = 40,
.level = 99,
};
#include "world/common/npc/Dummy.inc.c"
#include "world/common/complete/NormalItemChoice.inc.c"
s32 N(KeyList)[] = {
ITEM_BUBBLE_BERRY,
ITEM_NONE
};
EvtScript N(EVS_NpcInteract_BubbleFlower) = {
EVT_IF_EQ(AF_FLO_BigBubbleReady, TRUE)
EVT_SET(AF_FLO_PauseBlowingBubbles, TRUE)
EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0063)
EVT_SET(AF_FLO_PauseBlowingBubbles, FALSE)
EVT_RETURN
EVT_END_IF
EVT_SET(AF_FLO_PauseBlowingBubbles, TRUE)
EVT_IF_EQ(GF_FLO14_GaveBerryToBubblePlant, FALSE)
EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_005F)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0060)
EVT_END_IF
EVT_CALL(FindItem, ITEM_BUBBLE_BERRY, LVar0)
EVT_IF_NE(LVar0, -1)
EVT_CHOOSE_CONSUMABLE_FROM(N(KeyList), 0)
EVT_IF_EQ(LVar0, -1)
EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0064)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0061)
EVT_SET(AF_FLO_BlowingBigBubble, TRUE)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, TRUE)
EVT_CALL(PlayerMoveTo, 555, 110, 20)
EVT_CALL(SetNpcFlagBits, NPC_SELF, NPC_FLAG_100, FALSE)
EVT_CALL(InterpPlayerYaw, 90, 0)
EVT_CALL(func_802CF56C, 2)
EVT_WAIT(5)
EVT_CALL(AdjustCam, CAM_DEFAULT, EVT_FLOAT(1.0), 0, 350, EVT_FLOAT(17.0), EVT_FLOAT(-6.0))
EVT_EXEC(N(EVS_BlowBigBubble))
EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 0, MSG_CH6_0062)
EVT_THREAD
EVT_WAIT(40)
EVT_CALL(InterpPlayerYaw, 315, 0)
EVT_END_THREAD
EVT_LABEL(10)
EVT_IF_EQ(AF_FLO_BigBubbleReady, FALSE)
EVT_WAIT(1)
EVT_GOTO(10)
EVT_END_IF
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
EVT_CALL(SpeakToPlayer, NPC_SELF, -1, -1, 5, MSG_CH6_0063)
EVT_SET(GF_FLO14_GaveBerryToBubblePlant, TRUE)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_RideBigBubble)), TRIGGER_FLOOR_PRESS_A, COLLIDER_o154, 1, 0)
EVT_END_IF
EVT_END_IF
EVT_SET(AF_FLO_PauseBlowingBubbles, FALSE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_BubbleFlower) = {
EVT_SET(AF_FLO_BlowingBigBubble, FALSE)
EVT_SET(AF_FLO_BigBubbleReady, FALSE)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_BubbleFlower)))
EVT_RETURN
EVT_END
};
// uses a dummy bubulb for collision
StaticNpc N(NpcData_BubbleFlower) = {
.id = NPC_BubbleFlower,
.settings = &N(NpcSettings_BubbleFlower),
.pos = { 617.0f, 0.0f, 108.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_4000,
.init = &N(EVS_NpcInit_BubbleFlower),
.drops = BUBULB_DROPS,
.animations = BUBULB_PINK_ANIMS,
.tattle = MSG_NpcTattle_BubblePlant,
};
StaticNpc N(NpcData_Bzzap) = {
.id = NPC_Bzzap,
.settings = &N(NpcSettings_Bzzap),
.pos = { -175.0f, 55.0f, 15.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = BZZAP_DROPS,
.territory = {
.wander = {
.isFlying = TRUE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { -175, 55, 15 },
.wanderSize = { 30 },
.detectShape = SHAPE_CYLINDER,
.detectPos = { -175, 55, 15 },
.detectSize = { 200 },
}
},
.animations = BZZAP_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_BubbleFlower)),
NPC_GROUP(N(NpcData_Bzzap), 0x1A19, BTL_FLO_STAGE_00),
{}
};

View File

@ -0,0 +1,7 @@
#include "flo_14.h"
EvtScript N(EVS_MakeEntities) = {
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 675, 60, -100, ITEM_SPAWN_MODE_FIXED_NEVER_VANISH, GF_FLO14_Item_StarPiece)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,10 @@
#include "flo_14.h"
#include "world/common/atomic/flo_LogBridge.inc.c"
EvtScript N(EVS_SetupLogBridges) = {
EVT_MAKE_LOG_BRIDGE(COLLIDER_o162, COLLIDER_o166, MODEL_o15, MODEL_o16, MV_RotAngle_Log_01, MV_RotVelocity_Log_01)
EVT_MAKE_LOG_BRIDGE(COLLIDER_o161, COLLIDER_o167, MODEL_o17, MODEL_o18, MV_RotAngle_Log_02, MV_RotVelocity_Log_02)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,27 @@
// Older version of flo_15
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_15_shape.h"
#include "mapfs/flo_15_hit.h"
#include "sprite/npc/Sun.h"
enum {
NPC_Sun_01 = 10,
NPC_Sun_02 = 11,
};
#define NAMESPACE dead_flo_15
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_MakeEntities);
extern EvtScript N(EVS_MonitorFallingStairs);
extern EvtScript N(EVS_Scene_SunReturns);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,14 @@
#include "flo_15.h"
EntryList N(Entrances) = {
[flo_15_ENTRY_0] { 320.0, 0.0, 0.0, 270.0 },
[flo_15_ENTRY_1] { -170.0, 0.0, 55.0, 0.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_15 },
};

View File

@ -0,0 +1,17 @@
#include "flo_15.h"
EvtScript N(EVS_SetupMusic) = {
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_15_ENTRY_1)
EVT_CALL(SetMusicTrack, 0, SONG_SUNSHINE_RETURNS, 0, 8)
EVT_ELSE
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_SUN_TOWER_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,31 @@
#include "flo_15.h"
EvtScript N(EVS_ExitWalk_flo_13_1) = EVT_EXIT_WALK(60, flo_15_ENTRY_0, "flo_13", flo_13_ENTRY_1);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_13_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_CALL(GetEntryID, LVar0)
EVT_IF_EQ(LVar0, flo_15_ENTRY_1)
EVT_EXEC(N(EVS_Scene_SunReturns))
EVT_ELSE
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_END_IF
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK)
EVT_EXEC(N(EVS_MonitorFallingStairs))
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,228 @@
#include "flo_15.h"
#include "world/common/npc/Sun.inc.c"
EvtScript N(EVS_Sun_AnimateBobbing) = {
EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_SET(LVar3, 7)
EVT_SET(LVar4, 5)
EVT_ELSE
EVT_SET(LVar3, 15)
EVT_SET(LVar4, 1)
EVT_END_IF
EVT_LOOP(0)
EVT_SET(LVar5, LVar3)
EVT_LOOP(LVar5)
EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 1)
EVT_CALL(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2)
EVT_WAIT(LVar4)
EVT_END_LOOP
EVT_SET(LVar5, LVar3)
EVT_LOOP(LVar5)
EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, -1)
EVT_CALL(SetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2)
EVT_CALL(SetNpcPos, NPC_Sun_02, LVar0, LVar1, LVar2)
EVT_WAIT(LVar4)
EVT_END_LOOP
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Scene_SunReturns) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 270, 0)
EVT_CALL(SetNpcPos, NPC_Sun_02, NPC_DISPOSE_LOCATION)
EVT_WAIT(1)
EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2)
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 1050)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(10.0), EVT_FLOAT(4.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SetCamDistance, CAM_DEFAULT, 300)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(15.0), EVT_FLOAT(-10.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(6.5))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkJoy, ANIM_Sun_TalkJoy, SPEECH_FLAG_200 | 5, MSG_CH6_00C3)
EVT_CALL(SetNpcAnimation, NPC_Sun_01, ANIM_Sun_TalkJoy)
EVT_THREAD
EVT_CALL(SetCamDistance, CAM_DEFAULT, 1000)
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(5.0))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_END_THREAD
EVT_WAIT(15)
EVT_CALL(SetNpcJumpscale, NPC_Sun_01, EVT_FLOAT(0.0))
EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2)
EVT_ADD(LVar1, 400)
EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, LVar1, LVar2, 40)
EVT_CALL(GotoMap, EVT_PTR("flo_00"), flo_00_ENTRY_9)
EVT_WAIT(70)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcAux_Sun_02) = {
EVT_CALL(func_802CDE68, 11, 48)
EVT_LOOP(0)
EVT_CALL(MakeLerp, -30, 30, 20, EASING_SIN_OUT)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0)
EVT_CALL(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4)
EVT_CALL(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(MakeLerp, 30, -30, 20, EASING_SIN_OUT)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(SetNpcRotation, NPC_Sun_02, 0, 0, LVar0)
EVT_CALL(GetNpcPos, NPC_Sun_01, LVar2, LVar3, LVar4)
EVT_CALL(SetNpcPos, NPC_Sun_02, LVar2, LVar3, LVar4)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_Sun_DescendFromSky) = {
EVT_LOOP(0)
EVT_WAIT(1)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_IF_GT(LVar1, 220)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_THREAD
EVT_WAIT(15)
EVT_CALL(PlayerFaceNpc, NPC_Sun_01, FALSE)
EVT_END_THREAD
EVT_CALL(SetNpcJumpscale, NPC_Sun_01, EVT_FLOAT(0.0))
EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2)
EVT_SUB(LVar1, 400)
EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, 275, LVar2, 30)
EVT_EXEC_GET_TID(N(EVS_Sun_AnimateBobbing), LVar9)
EVT_LOOP(0)
EVT_WAIT(1)
EVT_IF_EQ(AF_FLO_MetTheSun, TRUE)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(DisablePlayerInput, TRUE)
EVT_WAIT(10)
EVT_KILL_THREAD(LVar9)
EVT_CALL(SetNpcFlagBits, NPC_Sun_01, NPC_FLAG_100, TRUE)
EVT_CALL(GetNpcPos, NPC_Sun_01, LVar0, LVar1, LVar2)
EVT_CALL(NpcJump0, NPC_Sun_01, LVar0, 450, LVar2, 30)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_UNBIND
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInteract_Sun_01) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_SPOKE_WITH_THE_SUN)
EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009A)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_Thinking)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_80007)
EVT_WAIT(20)
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009B)
EVT_SET(GB_StoryProgress, STORY_CH6_SPOKE_WITH_THE_SUN)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009C)
EVT_CASE_LT(STORY_CH6_STAR_SPIRIT_RESCUED)
EVT_IF_EQ(GF_FLO15_SunThankedPlayer, FALSE)
EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009D)
EVT_SET(GF_FLO15_SunThankedPlayer, TRUE)
EVT_ELSE
EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009E)
EVT_END_IF
EVT_CASE_DEFAULT
EVT_CALL(SpeakToPlayer, NPC_Sun_01, ANIM_Sun_TalkSad, ANIM_Sun_Idle, 517, MSG_CH6_009F)
EVT_END_SWITCH
EVT_SET(AF_FLO_MetTheSun, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Sun_01) = {
EVT_CALL(SetNpcCollisionSize, NPC_Sun_01, 64, 40)
EVT_CALL(EnableNpcShadow, NPC_Sun_01, FALSE)
EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 270, 0)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Sun_01)))
EVT_EXEC(N(EVS_Sun_AnimateBobbing))
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_Sun_01, 0, 450, 0)
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Sun_01)))
EVT_SET(AF_FLO_MetTheSun, FALSE)
EVT_EXEC(N(EVS_Sun_DescendFromSky))
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_NpcInit_Sun_02) = {
EVT_CALL(EnableNpcShadow, NPC_Sun_02, FALSE)
EVT_CALL(SetNpcAnimation, NPC_Sun_02, ANIM_Sun_FireIdle)
EVT_CALL(SetNpcPaletteSwapMode, NPC_Sun_01, 3)
EVT_CALL(SetNpcPaletteSwapMode, NPC_Sun_02, 3)
EVT_CALL(SetNpcPaletteSwapping, NPC_Sun_01, 0, 1, 5, 5, 13, 5, 0, 0)
EVT_CALL(SetNpcPaletteSwapping, NPC_Sun_02, 0, 1, 5, 5, 13, 5, 0, 0)
EVT_IF_LT(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetNpcPos, NPC_Sun_02, 0, 270, -5)
EVT_ELSE
EVT_CALL(SetNpcPos, NPC_Sun_02, 0, 450, -5)
EVT_CALL(BindNpcAux, NPC_SELF, EVT_PTR(N(EVS_NpcAux_Sun_02)))
EVT_END_IF
EVT_RETURN
EVT_END
};
StaticNpc N(NpcData_Sun)[] = {
{
.id = NPC_Sun_01,
.settings = &N(NpcSettings_Sun),
.pos = { 0.0f, 250.0f, 0.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_400000,
.init = &N(EVS_NpcInit_Sun_01),
.drops = SUN_DROPS,
.animations = SUN_ANIMS,
.tattle = MSG_NpcTattle_TheSun,
},
{
.id = NPC_Sun_02,
.settings = &N(NpcSettings_Sun),
.pos = { 0.0f, 250.0f, 0.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_1 | ENEMY_FLAGS_100 | ENEMY_FLAGS_200 | ENEMY_FLAGS_400 | ENEMY_FLAGS_800 | ENEMY_FLAGS_8000,
.init = &N(EVS_NpcInit_Sun_02),
.drops = SUN_DROPS,
.animations = SUN_ANIMS,
.tattle = MSG_NpcTattle_TheSun,
},
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Sun)),
{}
};

View File

@ -0,0 +1,17 @@
#include "flo_15.h"
#include "entity.h"
EvtScript N(EVS_OnBlast_Rock) = {
EVT_SET(GF_FLO15_BombedRock, TRUE)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeEntities) = {
EVT_IF_EQ(GF_FLO15_BombedRock, FALSE)
EVT_CALL(MakeEntity, EVT_PTR(Entity_BombableRock), -180, 0, -18, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(EVS_OnBlast_Rock)))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,72 @@
#include "flo_15.h"
#include "effects.h"
s32 N(ShakeCamParams)[] = {
10, EVT_FLOAT(0.6),
13, EVT_FLOAT(0.75),
16, EVT_FLOAT(0.9),
19, EVT_FLOAT(1.05),
22, EVT_FLOAT(1.2),
25, EVT_FLOAT(1.05),
24, EVT_FLOAT(0.9),
25, EVT_FLOAT(0.75),
24, EVT_FLOAT(0.6),
10, EVT_FLOAT(1.7),
};
EvtScript N(EVS_MonitorFallingStairs) = {
EVT_IF_EQ(GF_FLO15_BombedRock, FALSE)
EVT_LABEL(0)
EVT_IF_EQ(GF_FLO15_BombedRock, FALSE)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_IF
EVT_CALL(DisablePlayerInput, TRUE)
EVT_THREAD
EVT_USE_BUF(EVT_PTR(N(ShakeCamParams)))
EVT_LOOP(10)
EVT_BUF_READ2(LVar1, LVar2)
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, LVar1, LVar2)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, -170, 0, 35)
EVT_CALL(SetPanTarget, CAM_DEFAULT, -170, 0, 35)
EVT_CALL(SetCamDistance, CAM_DEFAULT, 600)
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(25.0), EVT_FLOAT(-9.0))
EVT_CALL(SetCamPosA, CAM_DEFAULT, EVT_FLOAT(-50.0), EVT_FLOAT(25.0))
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.5))
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
EVT_THREAD
EVT_WAIT(100)
EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -180, 0, -15, 0)
EVT_PLAY_EFFECT(EFFECT_LANDING_DUST, 4, -190, 0, -35, 0)
EVT_END_THREAD
EVT_THREAD
EVT_LOOP(6)
EVT_CALL(PlaySoundAtCollider, COLLIDER_o175, SOUND_187, 0)
EVT_WAIT(20)
EVT_END_LOOP
EVT_END_THREAD
EVT_CALL(MakeLerp, 0, -50, 120, EASING_CUBIC_IN)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateGroup, MODEL_g20, 0, LVar0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK)
EVT_WAIT(15)
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(90.0))
EVT_CALL(DisablePlayerInput, FALSE)
EVT_ELSE
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_g54, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_CLEAR_BITS, COLLIDER_g58, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(TranslateGroup, MODEL_g20, 0, -50, 0)
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,32 @@
// Older version of flo_16
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_16_shape.h"
#include "mapfs/flo_16_hit.h"
#include "sprite/npc/TuffPuff.h"
enum {
NPC_TuffPuff_01 = 0,
NPC_TuffPuff_02 = 1,
};
enum {
MV_SuperBlock = MapVar(0),
};
#define NAMESPACE dead_flo_16
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_SetupVines);
extern EvtScript N(EVS_SetupPillarPuzzle);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,14 @@
#include "flo_16.h"
EntryList N(Entrances) = {
[flo_16_ENTRY_0] { -720.0, 0.0, 0.0, 90.0 },
[flo_16_ENTRY_1] { 710.0, 100.0, 0.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_16 },
};

View File

@ -0,0 +1,12 @@
#include "flo_16.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,74 @@
#include "flo_16.h"
#include "effects.h"
API_CALLABLE(N(SpawnSunEffect)) {
fx_sun_undeclared(FX_SUN_FROM_RIGHT, 0, 0, 0, 0, 0);
return ApiStatus_DONE2;
}
EvtScript N(EVS_ExitWalk_flo_00_4) = EVT_EXIT_WALK(60, flo_16_ENTRY_0, "flo_00", flo_00_ENTRY_4);
EvtScript N(EVS_ExitWalk_flo_17_0) = EVT_EXIT_WALK(60, flo_16_ENTRY_1, "flo_17", flo_17_ENTRY_0);
EvtScript N(EVS_BindExitTriggers) = {
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_00_4)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_flo_17_0)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
EVT_RETURN
EVT_END
};
LavaReset N(SafeFloorColliders)[] = {
{ .colliderID = COLLIDER_o190, .pos = { -310.0, 0.0, 0.0 }},
{ .colliderID = COLLIDER_o191, .pos = { 305.0, 100.0, 0.0 }},
{ .colliderID = -1 }
};
EvtScript N(EVS_Main) = {
EVT_SET(GB_WorldLocation, LOCATION_FLOWER_FIELDS)
EVT_CALL(SetSpriteShading, SHADING_NONE)
EVT_SETUP_CAMERA_DEFAULT()
EVT_CALL(MakeNpcs, FALSE, EVT_PTR(N(DefaultNPCs)))
EVT_EXEC_WAIT(N(EVS_MakeEntities))
EVT_EXEC(N(EVS_SetupVines))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o174, SURFACE_TYPE_SPIKES)
EVT_THREAD
EVT_CALL(ResetFromLava, EVT_PTR(N(SafeFloorColliders)))
EVT_END_THREAD
EVT_CALL(EnableTexPanning, MODEL_o59, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o142, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o58, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o136, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o146, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o143, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o135, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o138, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o139, TRUE)
EVT_CALL(EnableTexPanning, MODEL_o140, TRUE)
EVT_THREAD
EVT_SET(LVar0, 0)
EVT_SET(LVar1, 0)
EVT_LABEL(0)
EVT_ADD(LVar0, 140)
EVT_IF_GT(LVar0, 0x10000)
EVT_ADD(LVar0, -0x10000)
EVT_END_IF
EVT_CALL(SetTexPanOffset, 1, 0, LVar0, 0)
EVT_ADD(LVar1, -200)
EVT_IF_LT(LVar1, 0)
EVT_ADD(LVar1, 0x10000)
EVT_END_IF
EVT_CALL(SetTexPanOffset, 2, 0, LVar1, 0)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_END_THREAD
EVT_EXEC(N(EVS_SetupPillarPuzzle))
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitw, COLLIDER_FLAGS_UPPER_MASK)
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilite, COLLIDER_FLAGS_UPPER_MASK)
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
EVT_EXEC(EnterWalk)
EVT_EXEC_WAIT(N(EVS_SetupMusic))
EVT_IF_GE(GB_StoryProgress, STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(N(SpawnSunEffect))
EVT_END_IF
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,17 @@
#include "flo_16.h"
#include "entity.h"
#include "world/common/atomic/flo_FlowerSpawnRegion.inc.c"
#include "world/common/atomic/flo_DroppingVine.inc.c"
EvtScript N(EVS_SetupVines) = {
EVT_CALL(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_SURFACE, COLLIDER_o214, SURFACE_TYPE_FLOWERS)
EVT_FLOWER_SPAWN_REGION( -740, -140, -260, -55, 100)
EVT_FLOWER_SPAWN_REGION( 250, -140, 725, -55, 180)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o199, MODEL_o200, MODEL_o201, MODEL_o202)
EVT_DROPPING_VINE(ITEM_STINKY_HERB, MODEL_o203, MODEL_o204, MODEL_o205, MODEL_o206)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o209, MODEL_o210, MODEL_o211, MODEL_o212)
EVT_DROPPING_VINE(ITEM_NONE, MODEL_o213, MODEL_o214, MODEL_o215, MODEL_o216)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,68 @@
#include "flo_16.h"
#include "entity.h"
#define SUPER_BLOCK_MAPVAR MV_SuperBlock
#define SUPER_BLOCK_GAMEFLAG GF_FLO16_SuperBlock
#include "world/common/entity/SuperBlock.inc.c"
#include "world/common/entity/SuperBlock.data.inc.c"
EvtScript N(EVS_TetherCameraToPlayer) = {
EVT_LABEL(0)
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_CALL(SetCamTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
EVT_WAIT(1)
EVT_GOTO(0)
EVT_RETURN
EVT_END
};
EvtScript N(EVS_UseSpring) = {
EVT_CALL(DisablePlayerInput, TRUE)
EVT_CALL(DisablePlayerPhysics, TRUE)
EVT_CALL(SetPlayerActionState, ACTION_STATE_LAUNCH)
EVT_WAIT(2)
EVT_CALL(GetPlayerPos, LVar7, LVar8, LVar9)
EVT_EXEC_GET_TID(N(EVS_TetherCameraToPlayer), LVarA)
EVT_CALL(SetPlayerJumpscale, EVT_FLOAT(0.7))
EVT_CALL(PlayerJump, 450, 180, -120, 30)
EVT_CALL(SetPlayerActionState, ACTION_STATE_IDLE)
EVT_CALL(DisablePlayerPhysics, FALSE)
EVT_CALL(DisablePlayerInput, FALSE)
EVT_RETURN
EVT_END
};
API_CALLABLE(N(UnkFunc44)) {
script->varTable[0] = FALSE;
if (gPlayerStatus.actionState == ACTION_STATE_SPIN_POUND || gPlayerStatus.actionState == ACTION_STATE_TORNADO_POUND) {
script->varTable[0] = TRUE;
}
return ApiStatus_DONE2;
}
EvtScript N(EVS_MonitorCeilingPound) = {
EVT_IF_EQ(AF_FLO16_FoundHiddenStarPiece, FALSE)
EVT_CALL(N(UnkFunc44))
EVT_IF_EQ(LVar0, 0)
EVT_RETURN
EVT_END_IF
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
EVT_SWITCH(LVar0)
EVT_CASE_RANGE(620, 660)
EVT_CALL(MakeItemEntity, ITEM_STAR_PIECE, 640, 145, -100, ITEM_SPAWN_MODE_FALL_NEVER_VANISH, GF_FLO16_Item_StarPiece)
EVT_SET(AF_FLO16_FoundHiddenStarPiece, TRUE)
EVT_END_SWITCH
EVT_END_IF
EVT_RETURN
EVT_END
};
EvtScript N(EVS_MakeEntities) = {
EVT_SET(AF_FLO16_FoundHiddenStarPiece, FALSE)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_MonitorCeilingPound)), TRIGGER_FLOOR_TOUCH, COLLIDER_o214, 1, 0)
EVT_MAKE_SUPER_BLOCK(350, 240, -100, 0)
EVT_CALL(MakeEntity, EVT_PTR(Entity_ScriptSpring), 472, 100, -100, 0, MAKE_ENTITY_END)
EVT_CALL(AssignScript, EVT_PTR(N(EVS_UseSpring)))
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,56 @@
#include "flo_16.h"
#include "entity.h"
#include "world/common/enemy/complete/TuffPuff.inc.c"
StaticNpc N(NpcData_TuffPuff_01) = {
.id = NPC_TuffPuff_01,
.settings = &N(NpcSettings_TuffPuff),
.pos = { 440.0f, 145.0f, 15.0f },
.yaw = 90,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = TUFF_PUFF_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 440, 145, 15 },
.wanderSize = { 30 },
.detectShape = SHAPE_RECT,
.detectPos = { 485, 145, 55 },
.detectSize = { 225, 95 },
}
},
.animations = TUFF_PUFF_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
StaticNpc N(NpcData_TuffPuff_02) = {
.id = NPC_TuffPuff_02,
.settings = &N(NpcSettings_TuffPuff),
.pos = { 600.0f, 145.0f, 15.0f },
.yaw = 270,
.flags = ENEMY_FLAGS_400 | ENEMY_FLAGS_800,
.drops = TUFF_PUFF_DROPS,
.territory = {
.wander = {
.isFlying = FALSE,
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
.wanderShape = SHAPE_CYLINDER,
.centerPos = { 600, 145, 15 },
.wanderSize = { 30 },
.detectShape = SHAPE_RECT,
.detectPos = { 485, 145, 55 },
.detectSize = { 225, 95 },
}
},
.animations = TUFF_PUFF_ANIMS,
.aiDetectFlags = AI_DETECT_SIGHT | AI_DETECT_SENSITIVE_MOTION,
};
NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_TuffPuff_01), 0x1A24, BTL_FLO_STAGE_05),
NPC_GROUP(N(NpcData_TuffPuff_02), 0x1A20, BTL_FLO_STAGE_05),
{}
};

View File

@ -0,0 +1,235 @@
#include "flo_16.h"
API_CALLABLE(N(CheckForPoundInput)) {
script->varTable[0] = FALSE;
if (gPlayerStatus.actionState == ACTION_STATE_SPIN_POUND || gPlayerStatus.actionState == ACTION_STATE_TORNADO_POUND) {
script->varTable[0] = TRUE;
}
return ApiStatus_DONE2;
}
EvtScript N(EVS_OnTouch_RedPillar) = {
EVT_CALL(N(CheckForPoundInput))
EVT_IF_EQ(LVar0, FALSE)
EVT_RETURN
EVT_END_IF
EVT_CALL(DisablePlayerInput, TRUE)
EVT_IF_EQ(AF_FLO_RaisedRedPillar, FALSE)
EVT_SET(LVar5, 0)
EVT_SET(LVar6, 50)
EVT_SET(LVar7, 0)
EVT_SET(LVar8, 180)
EVT_SET(AF_FLO_RaisedRedPillar, TRUE)
EVT_ELSE
EVT_SET(LVar5, 50)
EVT_SET(LVar6, 0)
EVT_SET(LVar7, 180)
EVT_SET(LVar8, 0)
EVT_SET(AF_FLO_RaisedRedPillar, FALSE)
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(PlaySound, SOUND_204D)
EVT_THREAD
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8))
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2))
EVT_END_THREAD
EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_g81, 0, LVar0, 0)
EVT_CALL(TranslateGroup, MODEL_g82, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_g85, 0, LVar0, 0)
EVT_CALL(TranslateGroup, MODEL_g86, 0, LVar0, 0)
EVT_CALL(RotateGroup, MODEL_g82, LVar7, 1, 0, 0)
EVT_CALL(RotateGroup, MODEL_g86, LVar7, 1, 0, 0)
EVT_CALL(UpdateColliderTransform, COLLIDER_o242)
EVT_CALL(UpdateColliderTransform, COLLIDER_o250)
EVT_CALL(UpdateColliderTransform, COLLIDER_o244)
EVT_CALL(UpdateColliderTransform, COLLIDER_o252)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(DisablePlayerInput, FALSE)
EVT_WAIT(10)
EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_g81, 0, LVar6, 0)
EVT_CALL(TranslateGroup, MODEL_g82, 0, LVar6, 0)
EVT_CALL(TranslateModel, MODEL_g85, 0, LVar6, 0)
EVT_CALL(TranslateGroup, MODEL_g86, 0, LVar6, 0)
EVT_CALL(RotateGroup, MODEL_g82, LVar0, 1, 0, 0)
EVT_CALL(RotateGroup, MODEL_g86, LVar0, 1, 0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_OnTouch_GreenPillar) = {
EVT_CALL(N(CheckForPoundInput))
EVT_IF_EQ(LVar0, FALSE)
EVT_RETURN
EVT_END_IF
EVT_CALL(DisablePlayerInput, TRUE)
EVT_IF_EQ(AF_FLO_RaisedGreenPillar, FALSE)
EVT_SET(LVar5, 0)
EVT_SET(LVar6, 50)
EVT_SET(LVar7, 0)
EVT_SET(LVar8, 180)
EVT_SET(AF_FLO_RaisedGreenPillar, TRUE)
EVT_ELSE
EVT_SET(LVar5, 50)
EVT_SET(LVar6, 0)
EVT_SET(LVar7, 180)
EVT_SET(LVar8, 0)
EVT_SET(AF_FLO_RaisedGreenPillar, FALSE)
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(PlaySound, SOUND_204D)
EVT_THREAD
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8))
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2))
EVT_END_THREAD
EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_g83, 0, LVar0, 0)
EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_g87, 0, LVar0, 0)
EVT_CALL(TranslateGroup, MODEL_g88, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_g91, 0, LVar0, 0)
EVT_CALL(TranslateGroup, MODEL_g92, 0, LVar0, 0)
EVT_CALL(RotateGroup, MODEL_g84, LVar7, 1, 0, 0)
EVT_CALL(RotateGroup, MODEL_g88, LVar7, 1, 0, 0)
EVT_CALL(RotateGroup, MODEL_g92, LVar7, 1, 0, 0)
EVT_CALL(UpdateColliderTransform, COLLIDER_o243)
EVT_CALL(UpdateColliderTransform, COLLIDER_o251)
EVT_CALL(UpdateColliderTransform, COLLIDER_o245)
EVT_CALL(UpdateColliderTransform, COLLIDER_o253)
EVT_CALL(UpdateColliderTransform, COLLIDER_o247)
EVT_CALL(UpdateColliderTransform, COLLIDER_o255)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(DisablePlayerInput, FALSE)
EVT_WAIT(10)
EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_g83, 0, LVar6, 0)
EVT_CALL(TranslateGroup, MODEL_g84, 0, LVar6, 0)
EVT_CALL(TranslateModel, MODEL_g87, 0, LVar6, 0)
EVT_CALL(TranslateGroup, MODEL_g88, 0, LVar6, 0)
EVT_CALL(TranslateModel, MODEL_g91, 0, LVar6, 0)
EVT_CALL(TranslateGroup, MODEL_g92, 0, LVar6, 0)
EVT_CALL(RotateGroup, MODEL_g84, LVar0, 1, 0, 0)
EVT_CALL(RotateGroup, MODEL_g88, LVar0, 1, 0, 0)
EVT_CALL(RotateGroup, MODEL_g92, LVar0, 1, 0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_OnTouch_PurplePillar) = {
EVT_CALL(N(CheckForPoundInput))
EVT_IF_EQ(LVar0, FALSE)
EVT_RETURN
EVT_END_IF
EVT_CALL(DisablePlayerInput, TRUE)
EVT_IF_EQ(AF_FLO_LoweredPurplePillar, FALSE)
EVT_SET(LVar5, 0)
EVT_SET(LVar6, -50)
EVT_SET(LVar7, 0)
EVT_SET(LVar8, 180)
EVT_SET(AF_FLO_LoweredPurplePillar, TRUE)
EVT_ELSE
EVT_SET(LVar5, -50)
EVT_SET(LVar6, 0)
EVT_SET(LVar7, 180)
EVT_SET(LVar8, 0)
EVT_SET(AF_FLO_LoweredPurplePillar, FALSE)
EVT_END_IF
EVT_WAIT(15)
EVT_CALL(PlaySound, SOUND_204D)
EVT_THREAD
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 30, EVT_FLOAT(0.8))
EVT_CALL(ShakeCam, CAM_DEFAULT, 0, 5, EVT_FLOAT(0.2))
EVT_END_THREAD
EVT_CALL(MakeLerp, LVar5, LVar6, 30, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_g89, 0, LVar0, 0)
EVT_CALL(TranslateGroup, MODEL_g90, 0, LVar0, 0)
EVT_CALL(TranslateModel, MODEL_g93, 0, LVar0, 0)
EVT_CALL(TranslateGroup, MODEL_g94, 0, LVar0, 0)
EVT_CALL(RotateGroup, MODEL_g90, LVar7, 1, 0, 0)
EVT_CALL(RotateGroup, MODEL_g94, LVar7, 1, 0, 0)
EVT_CALL(UpdateColliderTransform, COLLIDER_o246)
EVT_CALL(UpdateColliderTransform, COLLIDER_o254)
EVT_CALL(UpdateColliderTransform, COLLIDER_o248)
EVT_CALL(UpdateColliderTransform, COLLIDER_o256)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_CALL(DisablePlayerInput, FALSE)
EVT_WAIT(10)
EVT_CALL(MakeLerp, LVar7, LVar8, 15, EASING_LINEAR)
EVT_LOOP(0)
EVT_CALL(UpdateLerp)
EVT_CALL(TranslateModel, MODEL_g89, 0, LVar6, 0)
EVT_CALL(TranslateGroup, MODEL_g90, 0, LVar6, 0)
EVT_CALL(TranslateModel, MODEL_g93, 0, LVar6, 0)
EVT_CALL(TranslateGroup, MODEL_g94, 0, LVar6, 0)
EVT_CALL(RotateGroup, MODEL_g90, LVar0, 1, 0, 0)
EVT_CALL(RotateGroup, MODEL_g94, LVar0, 1, 0, 0)
EVT_WAIT(1)
EVT_IF_EQ(LVar1, 0)
EVT_BREAK_LOOP
EVT_END_IF
EVT_END_LOOP
EVT_RETURN
EVT_END
};
EvtScript N(EVS_SetupPillarPuzzle) = {
EVT_SET(AF_FLO_RaisedRedPillar, FALSE)
EVT_SET(AF_FLO_RaisedGreenPillar, FALSE)
EVT_SET(AF_FLO_LoweredPurplePillar, FALSE)
EVT_CALL(ParentColliderToModel, COLLIDER_o242, MODEL_g81)
EVT_CALL(ParentColliderToModel, COLLIDER_o250, MODEL_g81)
EVT_CALL(ParentColliderToModel, COLLIDER_o243, MODEL_g83)
EVT_CALL(ParentColliderToModel, COLLIDER_o251, MODEL_g83)
EVT_CALL(ParentColliderToModel, COLLIDER_o244, MODEL_g85)
EVT_CALL(ParentColliderToModel, COLLIDER_o252, MODEL_g85)
EVT_CALL(ParentColliderToModel, COLLIDER_o245, MODEL_g87)
EVT_CALL(ParentColliderToModel, COLLIDER_o253, MODEL_g87)
EVT_CALL(ParentColliderToModel, COLLIDER_o246, MODEL_g89)
EVT_CALL(ParentColliderToModel, COLLIDER_o254, MODEL_g89)
EVT_CALL(ParentColliderToModel, COLLIDER_o247, MODEL_g91)
EVT_CALL(ParentColliderToModel, COLLIDER_o255, MODEL_g91)
EVT_CALL(ParentColliderToModel, COLLIDER_o248, MODEL_g93)
EVT_CALL(ParentColliderToModel, COLLIDER_o256, MODEL_g93)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o242, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o243, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_RedPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o244, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o245, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o246, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_GreenPillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o247, 1, 0)
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnTouch_PurplePillar)), TRIGGER_FLOOR_TOUCH, COLLIDER_o248, 1, 0)
EVT_RETURN
EVT_END
};

View File

@ -0,0 +1,37 @@
// Older version of flo_17
#include "dead.h"
#include "common.h"
#include "dead_structs.h"
#include "message_ids.h"
#include "map.h"
#include "../flo.h"
#include "mapfs/flo_17_shape.h"
#include "mapfs/flo_17_hit.h"
enum {
NPC_Lakitu_01 = 0,
NPC_Lakitu_02 = 1,
NPC_Spiny_01 = 50,
NPC_Spiny_02 = 51,
NPC_Spiny_03 = 52,
NPC_Spiny_04 = 53,
};
enum {
MV_RotAngle_Log_01 = MapVar(10),
MV_RotVelocity_Log_01 = MapVar(11),
MV_RotAngle_Log_02 = MapVar(12),
MV_RotVelocity_Log_02 = MapVar(13),
MV_RotAngle_Log_03 = MapVar(14),
MV_RotVelocity_Log_03 = MapVar(15),
};
#define NAMESPACE dead_flo_17
extern EvtScript N(EVS_Main);
extern EvtScript N(EVS_SetupMusic);
extern EvtScript N(EVS_SetupLogBridges);
extern EvtScript N(EVS_MakeEntities);
extern NpcGroupList N(DefaultNPCs);

View File

@ -0,0 +1,14 @@
#include "flo_17.h"
EntryList N(Entrances) = {
[flo_17_ENTRY_0] { -730.0, 0.0, 0.0, 90.0 },
[flo_17_ENTRY_1] { 730.0, 0.0, 0.0, 270.0 },
};
MapSettings N(settings) = {
.main = &N(EVS_Main),
.entryList = &N(Entrances),
.entryCount = ENTRY_COUNT(N(Entrances)),
.background = &gBackgroundImage,
.tattle = { MSG_MapTattle_flo_17 },
};

View File

@ -0,0 +1,12 @@
#include "flo_17.h"
EvtScript N(EVS_SetupMusic) = {
EVT_SWITCH(GB_StoryProgress)
EVT_CASE_LT(STORY_CH6_DESTROYED_PUFF_PUFF_MACHINE)
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_CLOUDY, 0, 8)
EVT_CASE_DEFAULT
EVT_CALL(SetMusicTrack, 0, SONG_FLOWER_FIELDS_SUNNY, 0, 8)
EVT_END_SWITCH
EVT_RETURN
EVT_END
};

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