mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
area_mim (#813)
* area_mim * fixes * mim is FINISHED, you hear me? FINISHED * slight improvement * and this Co-authored-by: HailSanta <Hail2Santa@gmail.com>
This commit is contained in:
parent
f918be9c7e
commit
2e8a4efa30
@ -1431,10 +1431,10 @@ typedef struct GameStatus {
|
||||
/* 0x14E */ s16 backgroundMaxX;
|
||||
/* 0x150 */ s16 backgroundMaxY;
|
||||
/* 0x152 */ s16 backgroundXOffset; /* (used for parallax scroll) */
|
||||
/* 0x154 */ UNK_PTR backgroundRaster;
|
||||
/* 0x158 */ u16* backgroundPalette;
|
||||
/* 0x15C */ s16 unk_15C;
|
||||
/* 0x15E */ u16 unk_15E;
|
||||
/* 0x154 */ IMG_PTR backgroundRaster;
|
||||
/* 0x158 */ PAL_PTR backgroundPalette;
|
||||
/* 0x15C */ s16 backgroundDarkness; // 255 = fully black
|
||||
/* 0x15E */ s16 savedBackgroundDarkness; // used during pause/unpause
|
||||
/* 0x160 */ Vec3s savedPos;
|
||||
/* 0x166 */ u8 saveSlot;
|
||||
/* 0x167 */ u8 loadType; /* (0 = from map, 1 = from main menu) */
|
||||
|
@ -2379,6 +2379,19 @@ enum NpcDecorationIDs {
|
||||
NPC_DECORATION_CHARGED = 0x00000006,
|
||||
};
|
||||
|
||||
enum SpeechFlags {
|
||||
SPEECH_FLAG_10 = 0x010,
|
||||
SPEECH_FLAG_HAS_OFFSET = 0x100,
|
||||
SPEECH_FLAG_200 = 0x200,
|
||||
// different facing orientations for speaker and listener
|
||||
SPEECH_ORIENTATION_MASK = 0xF,
|
||||
SPEECH_FACE_SPEAKER_ONLY = 4,
|
||||
SPEECH_FACE_AWAY_FROM = 3,
|
||||
SPEECH_FACE_LIKE_SPEAKER = 2,
|
||||
SPEECH_FACE_LIKE_LISTENER = 1,
|
||||
SPEECH_FACE_EACH_OTHER = 0,
|
||||
};
|
||||
|
||||
enum HitResults {
|
||||
HIT_RESULT_TRIGGERED_EXPLODE = -1,
|
||||
HIT_RESULT_HIT = 0,
|
||||
|
@ -75,4 +75,7 @@ MapSettings* get_current_map_settings(void);
|
||||
/// Zero-terminated.
|
||||
extern AreaConfig gAreas[29];
|
||||
|
||||
extern EvtScript EVS_NpcHitRecoil;
|
||||
extern EvtScript EVS_800936C0;
|
||||
|
||||
#endif
|
||||
|
@ -21,8 +21,6 @@ void spawn_drops(Enemy* enemy);
|
||||
|
||||
s32 D_80077C40 = 0;
|
||||
|
||||
extern EvtScript EVS_NpcHitRecoil;
|
||||
|
||||
EvtScript D_80077C44 = {
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(FadeBackgroundToBlack)
|
||||
|
@ -4,7 +4,7 @@ ApiStatus func_8005DB00(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8005DD54(Evt* script, s32 isInitialCall);
|
||||
ApiStatus func_8005DDF0(Evt* script, s32 isInitialCall);
|
||||
|
||||
EvtScript D_800936C0 = {
|
||||
EvtScript EVS_800936C0 = {
|
||||
EVT_CALL(func_8005DB00)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "common.h"
|
||||
#include "effects.h"
|
||||
|
||||
#include "FoliageTransform.inc.c"
|
||||
|
||||
@ -165,7 +166,7 @@ EvtScript N(shakeTree) = {
|
||||
EVT_BUF_READ1(LVar5)
|
||||
EVT_LOOP(LVar5)
|
||||
EVT_BUF_READ3(LVar6, LVar7, LVar8)
|
||||
EVT_CALL(PlayEffect, 0x14, 0, LVar6, LVar7, LVar8, 100, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||
EVT_PLAY_EFFECT(EFFECT_DROP_LEAVES, 0, LVar6, LVar7, LVar8, 100)
|
||||
EVT_END_LOOP
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
|
@ -28,7 +28,7 @@ void load_map_bg(char* optAssetName) {
|
||||
void reset_background_settings(void) {
|
||||
D_801595A0 = 0;
|
||||
D_8014F12F = 0;
|
||||
gGameStatusPtr->unk_15C = 180;
|
||||
gGameStatusPtr->backgroundDarkness = 180;
|
||||
gGameStatusPtr->backgroundFlags &= 0xF0;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "common.h"
|
||||
|
||||
extern s32 D_802DAE50;
|
||||
extern s32 D_802DAE54;
|
||||
extern s32 ShowMessageScreenOffsetX;
|
||||
extern s32 ShowMessageScreenOffsetY;
|
||||
extern s32 D_802DAE58[2]; // unused?
|
||||
extern char D_802DAE60[0x400]; // unused?
|
||||
extern MessagePrintState* gCurrentPrintContext;
|
||||
@ -10,121 +10,129 @@ extern MessagePrintState* D_802DB268;
|
||||
|
||||
ApiStatus _show_message(Evt* script, s32 isInitialCall, s32 arg2);
|
||||
|
||||
enum {
|
||||
SHOW_MESSAGE_SPEAK_TO_PLAYER = 0,
|
||||
SHOW_MESSAGE_END_SPEECH = 1,
|
||||
SHOW_MESSAGE_CONTINUE_SPEECH = 2,
|
||||
SHOW_MESSAGE_SPEAK_TO_NPC = 3,
|
||||
};
|
||||
|
||||
ApiStatus SpeakToPlayer(Evt* script, s32 isInitialCall) {
|
||||
return _show_message(script, isInitialCall, 0);
|
||||
return _show_message(script, isInitialCall, SHOW_MESSAGE_SPEAK_TO_PLAYER);
|
||||
}
|
||||
|
||||
ApiStatus EndSpeech(Evt* script, s32 isInitialCall) {
|
||||
return _show_message(script, isInitialCall, 1);
|
||||
return _show_message(script, isInitialCall, SHOW_MESSAGE_END_SPEECH);
|
||||
}
|
||||
|
||||
ApiStatus ContinueSpeech(Evt* script, s32 isInitialCall) {
|
||||
return _show_message(script, isInitialCall, 2);
|
||||
return _show_message(script, isInitialCall, SHOW_MESSAGE_CONTINUE_SPEECH);
|
||||
}
|
||||
|
||||
ApiStatus SpeakToNpc(Evt* script, s32 isInitialCall) {
|
||||
return _show_message(script, isInitialCall, 3);
|
||||
return _show_message(script, isInitialCall, SHOW_MESSAGE_SPEAK_TO_NPC);
|
||||
}
|
||||
|
||||
s32 _show_message(Evt* script, s32 isInitialCall, s32 arg2) {
|
||||
s32 _show_message(Evt* script, s32 isInitialCall, s32 mode) {
|
||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 screenX, screenY, screenZ;
|
||||
Npc* npc;
|
||||
Npc* npc2;
|
||||
f32 yaw;
|
||||
Npc* speakerNpc;
|
||||
Npc* targetNpc;
|
||||
f32 reverseAngle;
|
||||
f32 angle;
|
||||
f32 x, z;
|
||||
f32* yawPtr;
|
||||
s32 temp_fp;
|
||||
s32 npcID;
|
||||
f32* listenerYaw;
|
||||
s32 speakerNpcID;
|
||||
s32 targetNpcID;
|
||||
s32 msgID;
|
||||
s32 animID;
|
||||
s32 ret;
|
||||
|
||||
npc2 = NULL;
|
||||
targetNpc = NULL;
|
||||
|
||||
if (isInitialCall) {
|
||||
D_802DB264 = 0;
|
||||
temp_fp = evt_get_variable(script, *args++);
|
||||
speakerNpcID = evt_get_variable(script, *args++);
|
||||
script->varTable[13] = evt_get_variable(script, *args++);
|
||||
script->varTable[14] = evt_get_variable(script, *args++);
|
||||
script->functionTemp[1] = evt_get_variable(script, *args++);
|
||||
D_802DAE54 = 0;
|
||||
D_802DAE50 = 0;
|
||||
ShowMessageScreenOffsetY = 0;
|
||||
ShowMessageScreenOffsetX = 0;
|
||||
|
||||
if (script->functionTemp[1] & 0x100) {
|
||||
D_802DAE50 = evt_get_variable(script, *args++);
|
||||
D_802DAE54 = evt_get_variable(script, *args++);
|
||||
if (script->functionTemp[1] & SPEECH_FLAG_HAS_OFFSET) {
|
||||
ShowMessageScreenOffsetX = evt_get_variable(script, *args++);
|
||||
ShowMessageScreenOffsetY = evt_get_variable(script, *args++);
|
||||
}
|
||||
|
||||
switch (arg2) {
|
||||
case 0:
|
||||
switch (mode) {
|
||||
case SHOW_MESSAGE_SPEAK_TO_PLAYER:
|
||||
msgID = evt_get_variable(script, *args++);
|
||||
gCurrentPrintContext = msg_get_printer_for_msg(msgID, &D_802DB264);
|
||||
break;
|
||||
case 1:
|
||||
case SHOW_MESSAGE_END_SPEECH:
|
||||
close_message(gCurrentPrintContext);
|
||||
break;
|
||||
case 2:
|
||||
case SHOW_MESSAGE_CONTINUE_SPEECH:
|
||||
msgID = evt_get_variable(script, *args++);
|
||||
msg_printer_load_msg(msgID, gCurrentPrintContext);
|
||||
break;
|
||||
case 3:
|
||||
npcID = evt_get_variable(script, *args++);
|
||||
case SHOW_MESSAGE_SPEAK_TO_NPC:
|
||||
targetNpcID = evt_get_variable(script, *args++);
|
||||
msgID = evt_get_variable(script, *args++);
|
||||
npc2 = resolve_npc(script, npcID);
|
||||
targetNpc = resolve_npc(script, targetNpcID);
|
||||
gCurrentPrintContext = msg_get_printer_for_msg(msgID, &D_802DB264);
|
||||
break;
|
||||
}
|
||||
|
||||
if (temp_fp == NPC_PLAYER) {
|
||||
if (speakerNpcID == NPC_PLAYER) {
|
||||
get_screen_coords(gCurrentCameraID, playerStatus->position.x,
|
||||
playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z,
|
||||
&screenX, &screenY, &screenZ);
|
||||
script->functionTemp[3] = playerStatus->anim;
|
||||
npc = (Npc*) NPC_PLAYER;
|
||||
speakerNpc = (Npc*) NPC_PLAYER;
|
||||
script->varTable[15] = playerStatus->targetYaw;
|
||||
} else {
|
||||
npc = resolve_npc(script, temp_fp);
|
||||
get_screen_coords(gCurrentCameraID, npc->pos.x, npc->pos.y + npc->collisionHeight, npc->pos.z,
|
||||
speakerNpc = resolve_npc(script, speakerNpcID);
|
||||
get_screen_coords(gCurrentCameraID, speakerNpc->pos.x, speakerNpc->pos.y + speakerNpc->collisionHeight, speakerNpc->pos.z,
|
||||
&screenX, &screenY, &screenZ);
|
||||
script->functionTemp[3] = npc->currentAnim;
|
||||
script->varTable[15] = npc->yaw;
|
||||
script->functionTemp[3] = speakerNpc->currentAnim;
|
||||
script->varTable[15] = speakerNpc->yaw;
|
||||
}
|
||||
|
||||
msg_printer_set_origin_pos(gCurrentPrintContext, screenX + D_802DAE50, screenY + D_802DAE54);
|
||||
script->varTablePtr[12] = npc;
|
||||
msg_printer_set_origin_pos(gCurrentPrintContext,
|
||||
screenX + ShowMessageScreenOffsetX,
|
||||
screenY + ShowMessageScreenOffsetY);
|
||||
script->varTablePtr[12] = speakerNpc;
|
||||
|
||||
if (npc != (Npc*) NPC_PLAYER) {
|
||||
if (arg2 == 3) {
|
||||
yawPtr = &npc2->yaw;
|
||||
angle = atan2(npc->pos.x, npc->pos.z, npc2->pos.x, npc2->pos.z);
|
||||
if (speakerNpc != (Npc*) NPC_PLAYER) {
|
||||
if (mode == SHOW_MESSAGE_SPEAK_TO_NPC) {
|
||||
listenerYaw = &targetNpc->yaw;
|
||||
angle = atan2(speakerNpc->pos.x, speakerNpc->pos.z, targetNpc->pos.x, targetNpc->pos.z);
|
||||
} else {
|
||||
yawPtr = &playerStatus->targetYaw;
|
||||
angle = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z);
|
||||
listenerYaw = &playerStatus->targetYaw;
|
||||
angle = atan2(speakerNpc->pos.x, speakerNpc->pos.z, playerStatus->position.x, playerStatus->position.z);
|
||||
}
|
||||
|
||||
yaw = clamp_angle(angle + 180.0f);
|
||||
switch (script->functionTemp[1] & 0xF) {
|
||||
case 0:
|
||||
npc->yaw = angle;
|
||||
*yawPtr = yaw;
|
||||
reverseAngle = clamp_angle(angle + 180.0f);
|
||||
switch (script->functionTemp[1] & SPEECH_ORIENTATION_MASK) {
|
||||
case SPEECH_FACE_EACH_OTHER:
|
||||
speakerNpc->yaw = angle;
|
||||
*listenerYaw = reverseAngle;
|
||||
break;
|
||||
case 1:
|
||||
npc->yaw = yaw;
|
||||
*yawPtr = yaw;
|
||||
case SPEECH_FACE_LIKE_LISTENER:
|
||||
speakerNpc->yaw = reverseAngle;
|
||||
*listenerYaw = reverseAngle;
|
||||
break;
|
||||
case 2:
|
||||
npc->yaw = angle;
|
||||
*yawPtr = angle;
|
||||
case SPEECH_FACE_LIKE_SPEAKER:
|
||||
speakerNpc->yaw = angle;
|
||||
*listenerYaw = angle;
|
||||
break;
|
||||
case 3:
|
||||
npc->yaw = yaw;
|
||||
*yawPtr = angle;
|
||||
case SPEECH_FACE_AWAY_FROM:
|
||||
speakerNpc->yaw = reverseAngle;
|
||||
*listenerYaw = angle;
|
||||
break;
|
||||
case 4:
|
||||
npc->yaw = angle;
|
||||
case SPEECH_FACE_SPEAKER_ONLY:
|
||||
speakerNpc->yaw = angle;
|
||||
break;
|
||||
case 5:
|
||||
break;
|
||||
@ -132,15 +140,15 @@ s32 _show_message(Evt* script, s32 isInitialCall, s32 arg2) {
|
||||
}
|
||||
}
|
||||
|
||||
npc = script->varTablePtr[12];
|
||||
if (npc != (Npc*) NPC_PLAYER) {
|
||||
get_screen_coords(gCurrentCameraID, npc->pos.x, npc->pos.y + npc->collisionHeight, npc->pos.z, &screenX, &screenY, &screenZ);
|
||||
speakerNpc = script->varTablePtr[12];
|
||||
if (speakerNpc != (Npc*) NPC_PLAYER) {
|
||||
get_screen_coords(gCurrentCameraID, speakerNpc->pos.x, speakerNpc->pos.y + speakerNpc->collisionHeight, speakerNpc->pos.z, &screenX, &screenY, &screenZ);
|
||||
animID = script->varTable[13];
|
||||
if (animID != -1) {
|
||||
if (!(gCurrentPrintContext->stateFlags & 0x80)) {
|
||||
animID = script->varTable[14];
|
||||
}
|
||||
set_npc_animation(npc, animID);
|
||||
set_npc_animation(speakerNpc, animID);
|
||||
}
|
||||
} else {
|
||||
get_screen_coords(gCurrentCameraID, playerStatus->position.x, playerStatus->position.y + playerStatus->colliderHeight, playerStatus->position.z, &screenX, &screenY, &screenZ);
|
||||
@ -153,8 +161,8 @@ s32 _show_message(Evt* script, s32 isInitialCall, s32 arg2) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!(script->functionTemp[1] & 0x200)) {
|
||||
msg_printer_set_origin_pos(gCurrentPrintContext, screenX + D_802DAE50, screenY + D_802DAE54);
|
||||
if (!(script->functionTemp[1] & SPEECH_FLAG_200)) {
|
||||
msg_printer_set_origin_pos(gCurrentPrintContext, screenX + ShowMessageScreenOffsetX, screenY + ShowMessageScreenOffsetY);
|
||||
}
|
||||
|
||||
if (gCurrentPrintContext->stateFlags & 0x40) {
|
||||
@ -166,14 +174,14 @@ s32 _show_message(Evt* script, s32 isInitialCall, s32 arg2) {
|
||||
}
|
||||
|
||||
if (script->varTable[13] != -1) {
|
||||
if (npc != (Npc*) NPC_PLAYER) {
|
||||
set_npc_animation(npc, script->functionTemp[3]);
|
||||
if (speakerNpc != (Npc*) NPC_PLAYER) {
|
||||
set_npc_animation(speakerNpc, script->functionTemp[3]);
|
||||
} else {
|
||||
playerStatus->anim = script->functionTemp[3];
|
||||
}
|
||||
}
|
||||
if (script->functionTemp[1] & 0x10) {
|
||||
npc->yaw = script->varTable[0xF];
|
||||
if (script->functionTemp[1] & SPEECH_FLAG_10) {
|
||||
speakerNpc->yaw = script->varTable[0xF];
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -39,8 +39,8 @@ BSS s32 wExtraPartnerNpcID;
|
||||
BSS s32 D_802DAE4C[2]; // unused?
|
||||
|
||||
// msg_api
|
||||
BSS s32 D_802DAE50;
|
||||
BSS s32 D_802DAE54;
|
||||
BSS s32 ShowMessageScreenOffsetX;
|
||||
BSS s32 ShowMessageScreenOffsetY;
|
||||
BSS s32 D_802DAE58[2]; // unused?
|
||||
BSS char D_802DAE60[0x400]; // unused?
|
||||
BSS MessagePrintState* gCurrentPrintContext;
|
||||
|
@ -54,7 +54,7 @@ void state_step_pause(void) {
|
||||
if (D_800A0920 == 0) {
|
||||
D_800A0920 = -1;
|
||||
nuGfxSetCfb(&D_80077950, 2);
|
||||
gGameStatusPtr->unk_15E = gGameStatusPtr->unk_15C;
|
||||
gGameStatusPtr->savedBackgroundDarkness = gGameStatusPtr->backgroundDarkness;
|
||||
sfx_stop_env_sounds();
|
||||
func_8003B1A8();
|
||||
gGameStatusPtr->isBattle = oldIsBattle;
|
||||
@ -178,7 +178,7 @@ void state_step_unpause(void) {
|
||||
set_background_size(296, 200, 12, 20);
|
||||
}
|
||||
|
||||
gGameStatusPtr->unk_15C = gGameStatusPtr->unk_15E;
|
||||
gGameStatusPtr->backgroundDarkness = gGameStatusPtr->savedBackgroundDarkness;
|
||||
calculate_model_sizes();
|
||||
npc_reload_all();
|
||||
set_windows_visible(WINDOW_GROUP_ALL);
|
||||
|
@ -4,8 +4,8 @@
|
||||
#include "world/common/npc/Boo_Patrol.inc.c"
|
||||
#include "world/common/npc/Boo.inc.c"
|
||||
|
||||
//TODO understand this key item support
|
||||
#include "world/common/complete/KeyItems.inc.c"
|
||||
#include "world/common/complete/GiveReward.inc.c"
|
||||
#include "world/common/complete/KeyItemChoice.inc.c"
|
||||
|
||||
EvtScript N(EVS_PlayerReact) = {
|
||||
EVT_CALL(SetPlayerAnimation, ANIM_Mario_10002)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "iwa_04.h"
|
||||
#include "entity.h"
|
||||
|
||||
ApiStatus N(MonitorPlayerAltitude)(Evt* script, s32 isInitialCall) {
|
||||
API_CALLABLE(N(MonitorPlayerAltitude)) {
|
||||
s32 status = -1;
|
||||
|
||||
if (gPlayerStatus.lastGoodPosition.y > -100.0) {
|
||||
|
@ -1,32 +0,0 @@
|
||||
#include "iwa_10.h"
|
||||
|
||||
#include "world/common/util/ChangeNpcToPartner.inc.c"
|
||||
|
||||
#include "world/common/GetNpcCollisionHeight.inc.c"
|
||||
|
||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_802413E0_91F950);
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_80241434_91F9A4);
|
||||
|
||||
extern s32 iwa_10_D_80248480[];
|
||||
|
||||
ApiStatus func_8024146C_91F9DC(Evt* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32* ptr = (s32*) evt_get_variable(script, *args++);
|
||||
s32 i;
|
||||
|
||||
if (ptr != NULL) {
|
||||
for (i = 0; ptr[i] != 0; i++) {
|
||||
iwa_10_D_80248480[i] = ptr[i];
|
||||
}
|
||||
iwa_10_D_80248480[i] = 0;
|
||||
} else {
|
||||
for (i = 0; i < 112; i++) {
|
||||
iwa_10_D_80248480[i] = i + 16;
|
||||
iwa_10_D_80248480[112] = 0;
|
||||
}
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
@ -15,8 +15,7 @@ NpcSettings N(NpcSettings_Parakarry) = {
|
||||
|
||||
#include "world/common/util/ChangeNpcToPartner.inc.c"
|
||||
|
||||
#define _COMMON_GIVE_REWARD_H_ // not great!
|
||||
#include "world/common/complete/KeyItems.inc.c"
|
||||
#include "world/common/complete/KeyItemChoice.inc.c"
|
||||
MAP_STATIC_PAD(4,unk);
|
||||
|
||||
EvtScript N(EVS_Scene_MeetParakarry) = {
|
||||
@ -205,7 +204,7 @@ EvtScript N(EVS_NpcInteract_Parakarry) = {
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar0, EVT_PTR(N(LetterList)))
|
||||
EVT_SET(LVar1, 4)
|
||||
EVT_EXEC_WAIT(N(ChooseKeyItem))
|
||||
EVT_EXEC_WAIT(N(EVS_ChooseKeyItem))
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SWITCH(GB_IWA10_ReturnedLetterCount)
|
||||
|
109
src/world/area_mim/gates/animate.inc.c
Normal file
109
src/world/area_mim/gates/animate.inc.c
Normal file
@ -0,0 +1,109 @@
|
||||
#include "common.h"
|
||||
|
||||
EvtScript N(EVS_UseGate) = {
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_1D4, 0)
|
||||
EVT_WAIT(19)
|
||||
EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_1D5, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_SWITCH(AB_MIM_1)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, LVar7)
|
||||
EVT_ADD(LVar2, LVar8)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR)
|
||||
EVT_LABEL(20)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_ResetGates))
|
||||
EVT_SET(AB_MIM_1, 1)
|
||||
EVT_SET(GF_MIM_ChoosingPath, TRUE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(30)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(30)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_SUB(LVar0, LVar7)
|
||||
EVT_SUB(LVar2, LVar8)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 270, -10, 30, EASING_LINEAR)
|
||||
EVT_LABEL(40)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(40)
|
||||
EVT_END_IF
|
||||
EVT_SET(AB_MIM_1, 2)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, -10, 90, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(50)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(50)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, LVar7)
|
||||
EVT_ADD(LVar2, LVar8)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR)
|
||||
EVT_LABEL(60)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(60)
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_ResetGates))
|
||||
EVT_SET(AB_MIM_1, 1)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
30
src/world/area_mim/gates/setup.inc.c
Normal file
30
src/world/area_mim/gates/setup.inc.c
Normal file
@ -0,0 +1,30 @@
|
||||
#include "common.h"
|
||||
|
||||
EvtScript N(EVS_SetupGates) = {
|
||||
EVT_IF_EQ(GF_MIM_ChoosingPath, FALSE)
|
||||
EVT_SET(GF_MIM_ChoosingPath, TRUE)
|
||||
EVT_SET(AB_MIM_1, 2)
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_SET(LVar2, -10)
|
||||
EVT_ELSE
|
||||
EVT_SET(GF_MIM_ChoosingPath, FALSE)
|
||||
EVT_SET(AB_MIM_1, 0)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_SET(LVar2, 10)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(N(EVS_SetGateCameraZones))
|
||||
EVT_EXEC(N(EVS_InitializeGates))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_North)), TRIGGER_WALL_PRESS_A, COLLIDER_monn, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_South)), TRIGGER_WALL_PRESS_A, COLLIDER_mons, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_East)), TRIGGER_WALL_PRESS_A, COLLIDER_mone, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
71
src/world/area_mim/gates/support.inc.c
Normal file
71
src/world/area_mim/gates/support.inc.c
Normal file
@ -0,0 +1,71 @@
|
||||
#include "common.h"
|
||||
|
||||
EvtScript N(EVS_SetGateCameraZones) = {
|
||||
EVT_SWITCH(LVar1)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_north, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_west, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_south, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_east, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_higashi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_north, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_west, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_south, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_east, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_higashi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_stage, TRUE)
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_north, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_west, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_south, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_east, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_higashi, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_nishi, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_minami, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_kita, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE)
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InitializeGates) = {
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_monn, MODEL_n1)
|
||||
EVT_CALL(RotateGroup, MODEL_monn, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monn)
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_mons, MODEL_s1)
|
||||
EVT_CALL(RotateGroup, MODEL_mons, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mons)
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_mone, MODEL_e1)
|
||||
EVT_CALL(RotateGroup, MODEL_mone, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mone)
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_monw, MODEL_w1)
|
||||
EVT_CALL(RotateGroup, MODEL_monw, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monw)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ResetGates) = {
|
||||
EVT_CALL(RotateGroup, MODEL_monn, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monn)
|
||||
EVT_CALL(RotateGroup, MODEL_mons, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mons)
|
||||
EVT_CALL(RotateGroup, MODEL_mone, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mone)
|
||||
EVT_CALL(RotateGroup, MODEL_monw, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monw)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
49
src/world/area_mim/gates/use.inc.c
Normal file
49
src/world/area_mim/gates/use.inc.c
Normal file
@ -0,0 +1,49 @@
|
||||
#include "common.h"
|
||||
|
||||
EvtScript N(EVS_UseGate_North) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 0)
|
||||
EVT_SET(LVar8, 70)
|
||||
EVT_SET(LVar9, COLLIDER_monn)
|
||||
EVT_SET(LVarA, MODEL_monn)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_South) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 0)
|
||||
EVT_SET(LVar8, -70)
|
||||
EVT_SET(LVar9, COLLIDER_mons)
|
||||
EVT_SET(LVarA, MODEL_mons)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_East) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, -70)
|
||||
EVT_SET(LVar8, 0)
|
||||
EVT_SET(LVar9, COLLIDER_mone)
|
||||
EVT_SET(LVarA, MODEL_mone)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_West) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 70)
|
||||
EVT_SET(LVar8, 0)
|
||||
EVT_SET(LVar9, COLLIDER_monw)
|
||||
EVT_SET(LVarA, MODEL_monw)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -2,24 +2,29 @@
|
||||
#define _WORLD_AREA_MIM_MIM_H_
|
||||
|
||||
enum {
|
||||
AB_MIM_0 = AreaByte(0),
|
||||
AB_MIM_1 = AreaByte(1),
|
||||
AB_MIM_2 = AreaByte(2),
|
||||
AB_MIM_3 = AreaByte(3),
|
||||
AB_MIM_4 = AreaByte(4),
|
||||
AB_MIM_5 = AreaByte(5),
|
||||
AB_MIM_6 = AreaByte(6),
|
||||
AB_MIM_7 = AreaByte(7),
|
||||
AB_MIM_8 = AreaByte(8),
|
||||
AB_MIM_9 = AreaByte(9),
|
||||
AB_MIM_A = AreaByte(10),
|
||||
AB_MIM_B = AreaByte(11),
|
||||
AB_MIM_C = AreaByte(12),
|
||||
AB_MIM_D = AreaByte(13),
|
||||
AB_MIM_E = AreaByte(14),
|
||||
AB_MIM_F = AreaByte(15),
|
||||
AB_MIM_0 = AreaByte(0),
|
||||
AB_MIM_1 = AreaByte(1),
|
||||
AB_MIM_2 = AreaByte(2),
|
||||
AB_MIM_3 = AreaByte(3),
|
||||
AB_MIM_4 = AreaByte(4),
|
||||
AB_MIM_5 = AreaByte(5),
|
||||
AB_MIM_6 = AreaByte(6),
|
||||
AB_MIM_7 = AreaByte(7),
|
||||
AB_MIM_8 = AreaByte(8),
|
||||
AB_MIM_9 = AreaByte(9),
|
||||
AB_MIM_A = AreaByte(10),
|
||||
AB_MIM_B = AreaByte(11),
|
||||
AB_MIM_C = AreaByte(12),
|
||||
AB_MIM_D = AreaByte(13),
|
||||
AB_MIM_E = AreaByte(14),
|
||||
AB_MIM_F = AreaByte(15),
|
||||
};
|
||||
|
||||
#define AF_MIM(index) AreaFlag(index)
|
||||
enum {
|
||||
AF_MIM_01 = AreaFlag(1),
|
||||
AF_MIM03_Oaklie_DialogueToggle = AreaFlag(2),
|
||||
AF_MIM04_Bulbulb_DialogueToggle = AreaFlag(4),
|
||||
AF_MIM12_BackgroundLitUp = AreaFlag(3),
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,8 +0,0 @@
|
||||
#include "mim_01.h"
|
||||
|
||||
static char* N(exit_str_0) = "mim_01";
|
||||
static char* N(exit_str_1) = "mim_10";
|
||||
static char* N(exit_str_2) = "mim_02";
|
||||
static char* N(exit_str_3) = "";
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
@ -1,5 +0,0 @@
|
||||
#include "mim_01.h"
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_01/B934B0", func_80240070_B934B0);
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_01/B934B0", func_802403F0_B93830);
|
@ -1,3 +0,0 @@
|
||||
#include "mim_01.h"
|
||||
|
||||
#include "world/common/enemy/PiranhaPlantAI.inc.c"
|
@ -2,8 +2,26 @@
|
||||
/// @brief Forever Forest - Flower Sounds
|
||||
|
||||
#include "common.h"
|
||||
#include "../mim.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../mim.h"
|
||||
#include "mapfs/mim_01_shape.h"
|
||||
#include "mapfs/mim_01_hit.h"
|
||||
|
||||
#include "sprite/npc/SmallPiranha.h"
|
||||
|
||||
enum {
|
||||
NPC_PiranhaPlant = 1,
|
||||
NPC_PiranhaPlant_Hitbox = 2,
|
||||
};
|
||||
|
||||
#define NAMESPACE mim_01
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
extern EvtScript N(EVS_SetupExitHint);
|
||||
extern EvtScript N(EVS_SetupGates);
|
||||
extern EvtScript N(EVS_BindExitTriggers);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
16
src/world/area_mim/mim_01/mim_01_0_header.c
Normal file
16
src/world/area_mim/mim_01/mim_01_0_header.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include "mim_01.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[mim_01_ENTRY_0] { 0.0, 0.0, -530.0, 180.0 },
|
||||
[mim_01_ENTRY_1] { -530.0, 0.0, 0.0, 90.0 },
|
||||
[mim_01_ENTRY_2] { 0.0, 0.0, 530.0, 0.0 },
|
||||
[mim_01_ENTRY_3] { 530.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_mim_01 },
|
||||
};
|
8
src/world/area_mim/mim_01/mim_01_1_music.c
Normal file
8
src/world/area_mim/mim_01/mim_01_1_music.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "mim_01.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8)
|
||||
EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
43
src/world/area_mim/mim_01/mim_01_2_main.c
Normal file
43
src/world/area_mim/mim_01/mim_01_2_main.c
Normal file
@ -0,0 +1,43 @@
|
||||
#include "mim_01.h"
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_n) = EVT_EXIT_WALK(60, mim_01_ENTRY_0, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_w) = EVT_EXIT_WALK(60, mim_01_ENTRY_1, "mim_10", mim_10_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_01_ENTRY_2, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_01_ENTRY_3, "mim_02", mim_02_ENTRY_1);
|
||||
|
||||
MAP_RODATA_PAD(1,main);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST)
|
||||
EVT_CALL(SetSpriteShading, SHADING_MIM_01)
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 650)
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE)
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
|
||||
EVT_SET(GF_MAP_ForeverForest, TRUE)
|
||||
EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID)
|
||||
EVT_CALL(GetMapID, GB_MIM_CurrentMapID)
|
||||
EVT_EXEC_WAIT(N(EVS_SetupGates))
|
||||
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_EXEC_WAIT(N(EVS_MakeEntities))
|
||||
EVT_EXEC_WAIT(N(EVS_SetupExitHint))
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(N(SetForeverForestFog))
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
25
src/world/area_mim/mim_01/mim_01_3_entity.c
Normal file
25
src/world/area_mim/mim_01/mim_01_3_entity.c
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
#include "mim_01.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(EVS_ReadSign) = {
|
||||
EVT_CALL(IsStartingConversation, LVar0)
|
||||
EVT_IF_EQ(LVar0, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_017E, 160, 40)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), -300, 0, 0, 270, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
131
src/world/area_mim/mim_01/mim_01_4_hint.c
Normal file
131
src/world/area_mim/mim_01/mim_01_4_hint.c
Normal file
@ -0,0 +1,131 @@
|
||||
#include "mim_01.h"
|
||||
#include "model.h"
|
||||
|
||||
#include "world/common/util/GetFirstTriangleNormal.inc.c"
|
||||
|
||||
API_CALLABLE(N(GetFlowerNormal)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelID = evt_get_variable(script, *args++);
|
||||
s32 treeIndex = get_model_list_index_from_tree_index(modelID);
|
||||
Model* mdl = get_model_from_list_index(treeIndex);
|
||||
f32 x, y, z;
|
||||
|
||||
N(GetFirstTriangleNormal)(mdl->modelNode->displayData->displayList, &x, &y, &z);
|
||||
|
||||
evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(x));
|
||||
evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(y));
|
||||
evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(z));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_LaughingFlowers) = {
|
||||
EVT_CALL(PlaySoundAt, SOUND_DF, 0, 301, 0, -27)
|
||||
EVT_LOOP(6)
|
||||
EVT_SET(LVar0, 2)
|
||||
EVT_CALL(TranslateModel, MODEL_ea_1, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_ea_2, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_eb_1, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_eb_2, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_ec_1, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_ec_2, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_atari_kusa, 0, 0, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_SET(LVar0, -2)
|
||||
EVT_CALL(TranslateModel, MODEL_ea_1, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_ea_2, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_eb_1, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_eb_2, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_ec_1, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_ec_2, 0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_atari_kusa, 0, 0, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(TranslateModel, MODEL_ea_1, 0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_ea_2, 0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_eb_1, 0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_eb_2, 0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_ec_1, 0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_ec_2, 0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_atari_kusa, 0, 0, 0)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x10000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(PlaySoundAt, SOUND_205B, 0, 301, 0, -27)
|
||||
EVT_CALL(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(GetFlowerNormal), MODEL_ea_1, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ea_1, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ea_2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(N(GetFlowerNormal), MODEL_eb_1, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_eb_1, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_eb_2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(N(GetFlowerNormal), MODEL_ec_1, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ec_1, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ec_2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAt, SOUND_205B, 0, 301, 0, -27)
|
||||
EVT_CALL(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(20)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(GetFlowerNormal), MODEL_ea_1, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ea_1, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ea_2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(N(GetFlowerNormal), MODEL_eb_1, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_eb_1, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_eb_2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(N(GetFlowerNormal), MODEL_ec_1, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ec_1, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ec_2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySoundAt, SOUND_205B, 0, 301, 0, -27)
|
||||
EVT_CALL(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(30)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(N(GetFlowerNormal), MODEL_ea_1, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ea_1, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ea_2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(N(GetFlowerNormal), MODEL_eb_1, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_eb_1, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_eb_2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(N(GetFlowerNormal), MODEL_ec_1, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ec_1, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, MODEL_ec_2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(30)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, 0)
|
||||
EVT_WAIT(30)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_WaitForPlayerNearby) = {
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(AwaitPlayerApproach, 350, 0, 50)
|
||||
EVT_EXEC_WAIT(N(EVS_LaughingFlowers))
|
||||
EVT_CALL(AwaitPlayerLeave, 350, 0, 50)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupExitHint) = {
|
||||
EVT_CALL(SetTexPanner, MODEL_ea_2, TEX_PANNER_1)
|
||||
EVT_CALL(SetTexPanner, MODEL_eb_2, TEX_PANNER_1)
|
||||
EVT_CALL(SetTexPanner, MODEL_ec_2, TEX_PANNER_1)
|
||||
EVT_EXEC(N(EVS_WaitForPlayerNearby))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
293
src/world/area_mim/mim_01/mim_01_5_gate.c
Normal file
293
src/world/area_mim/mim_01/mim_01_5_gate.c
Normal file
@ -0,0 +1,293 @@
|
||||
#include "mim_01.h"
|
||||
|
||||
EvtScript N(EVS_SetGateCameraZones) = {
|
||||
EVT_SWITCH(LVar1)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_north, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_west, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_south, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_east, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_higashi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_north, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_west, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_south, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_east, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_higashi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_stage, TRUE)
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_north, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_west, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_south, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_east, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_higashi, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_minami, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_kita, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE)
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InitializeGates) = {
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_monn, MODEL_n1)
|
||||
EVT_CALL(RotateGroup, MODEL_monn, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monn)
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_mons, MODEL_s1)
|
||||
EVT_CALL(RotateGroup, MODEL_mons, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mons)
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_mone, MODEL_e1)
|
||||
EVT_CALL(RotateGroup, MODEL_mone, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mone)
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_monw, MODEL_w1)
|
||||
EVT_CALL(RotateGroup, MODEL_monw, 10, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monw)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ResetGates) = {
|
||||
EVT_CALL(RotateGroup, MODEL_monn, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monn)
|
||||
EVT_CALL(RotateGroup, MODEL_mons, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mons)
|
||||
EVT_CALL(RotateGroup, MODEL_mone, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mone)
|
||||
EVT_CALL(RotateGroup, MODEL_monw, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monw)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_PlayGateSounds) = {
|
||||
EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_1D4, 0)
|
||||
EVT_WAIT(19)
|
||||
EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_1D5, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate) = {
|
||||
EVT_EXEC(N(EVS_PlayGateSounds))
|
||||
EVT_SWITCH(AB_MIM_1)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, LVar7)
|
||||
EVT_ADD(LVar2, LVar8)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR)
|
||||
EVT_LABEL(20)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_ResetGates))
|
||||
EVT_SET(AB_MIM_1, 1)
|
||||
EVT_SET(GF_MIM_ChoosingPath, TRUE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(30)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(30)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_SUB(LVar0, LVar7)
|
||||
EVT_SUB(LVar2, LVar8)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 270, -10, 30, EASING_LINEAR)
|
||||
EVT_LABEL(40)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(40)
|
||||
EVT_END_IF
|
||||
EVT_SET(AB_MIM_1, 2)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, -10, 90, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(50)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(50)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, LVar7)
|
||||
EVT_ADD(LVar2, LVar8)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR)
|
||||
EVT_LABEL(60)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(60)
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_ResetGates))
|
||||
EVT_SET(AB_MIM_1, 1)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_North) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 0)
|
||||
EVT_SET(LVar8, 70)
|
||||
EVT_SET(LVar9, 26)
|
||||
EVT_SET(LVarA, 155)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_South) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 0)
|
||||
EVT_SET(LVar8, -70)
|
||||
EVT_SET(LVar9, 30)
|
||||
EVT_SET(LVarA, 161)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_East) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, -70)
|
||||
EVT_SET(LVar8, 0)
|
||||
EVT_SET(LVar9, 28)
|
||||
EVT_SET(LVarA, 158)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_West) = {
|
||||
EVT_SET(LVar9, 32)
|
||||
EVT_EXEC(N(EVS_PlayGateSounds))
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_IF_NE(AB_MIM_1, 1)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_monw, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monw)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, 70)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR)
|
||||
EVT_LABEL(20)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_monw, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monw)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_ResetGates))
|
||||
EVT_SET(AB_MIM_1, 1)
|
||||
EVT_SET(GF_MIM_ChoosingPath, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(30)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_monw, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monw)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(30)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_SUB(LVar0, 70)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 270, 10, 30, EASING_LINEAR)
|
||||
EVT_LABEL(40)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, MODEL_monw, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monw)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(40)
|
||||
EVT_END_IF
|
||||
EVT_SET(AB_MIM_1, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "../gates/setup.inc.c"
|
34
src/world/area_mim/mim_01/mim_01_6_npc.c
Normal file
34
src/world/area_mim/mim_01/mim_01_6_npc.c
Normal file
@ -0,0 +1,34 @@
|
||||
#include "mim_01.h"
|
||||
|
||||
#include "world/common/enemy/complete/PiranhaPlant.inc.c"
|
||||
|
||||
StaticNpc N(NpcData_PiranhaPlant)[] = {
|
||||
{
|
||||
.id = NPC_PiranhaPlant,
|
||||
.settings = &N(NpcSettings_PiranhaPlant),
|
||||
.pos = { 135.0f, 0.0f, -300.0f },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_LOCK_ANIMS,
|
||||
.drops = PIRANHA_PLANT_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 135, 0, -300 },
|
||||
.wanderSize = { 30 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = PIRANHA_PLANT_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
},
|
||||
PIRANHA_PLANT_HITBOX(NPC_PiranhaPlant_Hitbox)
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_PiranhaPlant), BTL_MIM_FORMATION_09, BTL_MIM_STAGE_00),
|
||||
{}
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
#include "mim_02.h"
|
||||
|
||||
static char* N(exit_str_0) = "mim_03";
|
||||
static char* N(exit_str_1) = "mim_01";
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
@ -1,13 +0,0 @@
|
||||
#include "mim_02.h"
|
||||
|
||||
#include "world/common/enemy/HoppingAI.inc.c"
|
||||
|
||||
#include "world/common/GetNpcCollisionHeight.inc.c"
|
||||
|
||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_802410B0_B98CB0);
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_80241104_B98D04);
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_8024113C_B98D3C);
|
@ -2,8 +2,27 @@
|
||||
/// @brief Forever Forest - Stump Eyes
|
||||
|
||||
#include "common.h"
|
||||
#include "../mim.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../mim.h"
|
||||
#include "mapfs/mim_02_shape.h"
|
||||
#include "mapfs/mim_02_hit.h"
|
||||
|
||||
#include "sprite/npc/Oaklie.h"
|
||||
#include "sprite/npc/Fuzzy.h"
|
||||
|
||||
enum {
|
||||
NPC_Oaklie = 0,
|
||||
NPC_Fuzzy_01 = 1,
|
||||
NPC_Fuzzy_02 = 2,
|
||||
};
|
||||
|
||||
#define NAMESPACE mim_02
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_SetupGates);
|
||||
extern EvtScript N(EVS_SetupExitHint);
|
||||
extern EvtScript N(EVS_EnableWestGate);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
16
src/world/area_mim/mim_02/mim_02_0_header.c
Normal file
16
src/world/area_mim/mim_02/mim_02_0_header.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include "mim_02.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[mim_02_ENTRY_0] { 0.0, 0.0, -530.0, 180.0 },
|
||||
[mim_02_ENTRY_1] { -530.0, 0.0, 0.0, 90.0 },
|
||||
[mim_02_ENTRY_2] { 0.0, 0.0, 530.0, 0.0 },
|
||||
[mim_02_ENTRY_3] { 530.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_mim_02 },
|
||||
};
|
8
src/world/area_mim/mim_02/mim_02_1_music.c
Normal file
8
src/world/area_mim/mim_02/mim_02_1_music.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "mim_02.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8)
|
||||
EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
39
src/world/area_mim/mim_02/mim_02_2_main.c
Normal file
39
src/world/area_mim/mim_02/mim_02_2_main.c
Normal file
@ -0,0 +1,39 @@
|
||||
#include "mim_02.h"
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_02_ENTRY_0, "mim_03", mim_03_ENTRY_2);
|
||||
EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_02_ENTRY_1, "mim_01", mim_01_ENTRY_3);
|
||||
EvtScript N(EVS_ExitWalk_n) = EVT_EXIT_WALK(60, mim_02_ENTRY_2, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_w) = EVT_EXIT_WALK(60, mim_02_ENTRY_3, "mim_01", mim_01_ENTRY_1);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST)
|
||||
EVT_CALL(SetSpriteShading, SHADING_MIM_02)
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 650)
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE)
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
|
||||
EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID)
|
||||
EVT_CALL(GetMapID, GB_MIM_CurrentMapID)
|
||||
EVT_EXEC_WAIT(N(EVS_SetupGates))
|
||||
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_WAIT(1)
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_EXEC(N(EVS_SetupExitHint))
|
||||
EVT_CALL(N(SetForeverForestFog))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
222
src/world/area_mim/mim_02/mim_02_3_npc.c
Normal file
222
src/world/area_mim/mim_02/mim_02_3_npc.c
Normal file
@ -0,0 +1,222 @@
|
||||
#include "mim_02.h"
|
||||
|
||||
EvtScript N(EVS_Unused_DoNothing) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
#include "world/common/npc/Oaklie.inc.c"
|
||||
|
||||
#include "world/common/enemy/complete/ForestFuzzy.inc.c"
|
||||
|
||||
s32 N(KeyList)[] = {
|
||||
ITEM_FOREST_PASS,
|
||||
ITEM_NONE
|
||||
};
|
||||
|
||||
#include "world/common/complete/KeyItemChoice.inc.c"
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Oaklie) = {
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH3_INVITED_TO_BOOS_MANSION)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0006)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0007)
|
||||
EVT_CALL(SetNpcFlagBits, NPC_Oaklie, NPC_FLAG_100, TRUE)
|
||||
EVT_WAIT(5)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, -426, 58, -70)
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(6.0), EVT_FLOAT(-6.0))
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, 250)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_32C, 0)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_Oaklie, EVT_FLOAT(1.0))
|
||||
EVT_CALL(NpcJump0, NPC_Oaklie, -426, 58, -70, 20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Idle)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0008)
|
||||
EVT_WAIT(5)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_Oaklie, -333, 0, -81, 20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land)
|
||||
EVT_WAIT(5)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_Oaklie, -300, 0, -170, 15)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land)
|
||||
EVT_WAIT(5)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_Oaklie, -226, 0, -245, 15)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land)
|
||||
EVT_WAIT(5)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_32C, 0)
|
||||
EVT_CALL(NpcJump0, NPC_Oaklie, -160, 0, -296, 15)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetNpcPos, NPC_Oaklie, NPC_DISPOSE_LOCATION)
|
||||
EVT_SET(GB_StoryProgress, STORY_CH3_ALLOWED_INTO_FOREVER_FOREST)
|
||||
EVT_EXEC_WAIT(N(EVS_EnableWestGate))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcIdle_Oaklie) = {
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH3_ALLOWED_INTO_FOREVER_FOREST)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_WAIT(25)
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(GetNpcPos, NPC_SELF, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(6.0), EVT_FLOAT(-6.0))
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, 300)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0003)
|
||||
EVT_WAIT(10)
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Jump)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Fall)
|
||||
EVT_END_THREAD
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_Oaklie, SOUND_32C, 0)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(1.0))
|
||||
EVT_CALL(NpcJump0, NPC_SELF, -455, 0, 0, 20)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Land)
|
||||
EVT_WAIT(5)
|
||||
EVT_CALL(SetNpcAnimation, NPC_Oaklie, ANIM_Oaklie_Idle)
|
||||
EVT_WAIT(15)
|
||||
EVT_IF_LT(GB_StoryProgress, STORY_CH1_RETURNED_TO_TOAD_TOWN)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0004)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_Oaklie, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0005)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Oaklie) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Oaklie)))
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Oaklie)))
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_GE(STORY_CH3_ALLOWED_INTO_FOREVER_FOREST)
|
||||
EVT_CALL(SetNpcPos, NPC_Oaklie, NPC_DISPOSE_LOCATION)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Oaklie) = {
|
||||
.id = NPC_Oaklie,
|
||||
.settings = &N(NpcSettings_Oaklie),
|
||||
.pos = { -426.0f, 58.0f, -70.0f },
|
||||
.yaw = 270,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_100 | NPC_FLAG_JUMPING | NPC_FLAG_400000,
|
||||
.init = &N(EVS_NpcInit_Oaklie),
|
||||
.drops = OAKLIE_DROPS,
|
||||
.animations = OAKLIE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_Oaklie,
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Fuzzy_01) = {
|
||||
.id = NPC_Fuzzy_01,
|
||||
.settings = &N(NpcSettings_ForestFuzzy),
|
||||
.pos = { 300.0f, 0.0f, 130.0f },
|
||||
.yaw = 0,
|
||||
.flags = 0,
|
||||
.drops = FOREST_FUZZY_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = FOREST_FUZZY_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Fuzzy_02) = {
|
||||
.id = NPC_Fuzzy_02,
|
||||
.settings = &N(NpcSettings_ForestFuzzy),
|
||||
.pos = { -100.0f, 0.0f, -320.0f },
|
||||
.yaw = 0,
|
||||
.flags = 0,
|
||||
.drops = FOREST_FUZZY_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = FOREST_FUZZY_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_Oaklie)),
|
||||
NPC_GROUP(N(NpcData_Fuzzy_01), BTL_MIM_FORMATION_00, BTL_MIM_STAGE_00),
|
||||
NPC_GROUP(N(NpcData_Fuzzy_02), BTL_MIM_FORMATION_01, BTL_MIM_STAGE_00),
|
||||
{}
|
||||
};
|
90
src/world/area_mim/mim_02/mim_02_4_gate.c
Normal file
90
src/world/area_mim/mim_02/mim_02_4_gate.c
Normal file
@ -0,0 +1,90 @@
|
||||
#include "mim_02.h"
|
||||
|
||||
#include "../gates/support.inc.c"
|
||||
|
||||
#include "../gates/animate.inc.c"
|
||||
|
||||
EvtScript N(EVS_UseGate_North) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 0)
|
||||
EVT_SET(LVar8, 70)
|
||||
EVT_SET(LVar9, COLLIDER_monn)
|
||||
EVT_SET(LVarA, MODEL_monn)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_South) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 0)
|
||||
EVT_SET(LVar8, -70)
|
||||
EVT_SET(LVar9, COLLIDER_mons)
|
||||
EVT_SET(LVarA, MODEL_mons)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_East) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, -70)
|
||||
EVT_SET(LVar8, 0)
|
||||
EVT_SET(LVar9, COLLIDER_mone)
|
||||
EVT_SET(LVarA, MODEL_mone)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_West) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 70)
|
||||
EVT_SET(LVar8, 0)
|
||||
EVT_SET(LVar9, COLLIDER_monw)
|
||||
EVT_SET(LVarA, MODEL_monw)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupGates) = {
|
||||
EVT_IF_EQ(GF_MIM_ChoosingPath, FALSE)
|
||||
EVT_SET(GF_MIM_ChoosingPath, TRUE)
|
||||
EVT_SET(AB_MIM_1, 2)
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_SET(LVar2, -10)
|
||||
EVT_ELSE
|
||||
EVT_SET(GF_MIM_ChoosingPath, FALSE)
|
||||
EVT_SET(AB_MIM_1, 0)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_SET(LVar2, 10)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(N(EVS_SetGateCameraZones))
|
||||
EVT_EXEC(N(EVS_InitializeGates))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_North)), TRIGGER_WALL_PRESS_A, COLLIDER_monn, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_South)), TRIGGER_WALL_PRESS_A, COLLIDER_mons, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_East)), TRIGGER_WALL_PRESS_A, COLLIDER_mone, 1, 0)
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH3_ALLOWED_INTO_FOREVER_FOREST)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_EnableWestGate) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
32
src/world/area_mim/mim_02/mim_02_5_hint.c
Normal file
32
src/world/area_mim/mim_02/mim_02_5_hint.c
Normal file
@ -0,0 +1,32 @@
|
||||
#include "mim_02.h"
|
||||
|
||||
EvtScript N(EVS_SetupExitHint) = {
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_CALL(EnableModel, MODEL_o414, TRUE)
|
||||
EVT_CALL(EnableModel, MODEL_me, FALSE)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(AwaitPlayerApproach, 20, -340, 50)
|
||||
EVT_CALL(RandInt, 1, LVar2)
|
||||
EVT_ADD(LVar2, 1)
|
||||
EVT_CALL(EnableModel, MODEL_o414, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_me, TRUE)
|
||||
EVT_CALL(PlaySoundAt, SOUND_2060, 0, 10, 110, -200)
|
||||
EVT_LOOP(LVar2)
|
||||
EVT_CALL(EnableModel, MODEL_o414, TRUE)
|
||||
EVT_CALL(EnableModel, MODEL_me, FALSE)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(EnableModel, MODEL_o414, FALSE)
|
||||
EVT_CALL(EnableModel, MODEL_me, TRUE)
|
||||
EVT_CALL(RandInt, 5, LVar3)
|
||||
EVT_ADD(LVar3, 2)
|
||||
EVT_WAIT(LVar3)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(EnableModel, MODEL_o414, TRUE)
|
||||
EVT_CALL(EnableModel, MODEL_me, FALSE)
|
||||
EVT_WAIT(60)
|
||||
EVT_GOTO(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
@ -1,14 +0,0 @@
|
||||
#include "mim_03.h"
|
||||
|
||||
static char* N(exit_str_0) = "mim_01";
|
||||
static char* N(exit_str_1) = "mim_04";
|
||||
static char* N(exit_str_2) = "mim_02";
|
||||
static char* N(exit_str_3) = "";
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_03/B9B480", func_80240068_B9B4E8);
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_03/B9B480", func_802400A0_B9B520);
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_03/B9B480", func_80240420_B9B8A0);
|
@ -2,8 +2,22 @@
|
||||
/// @brief Forever Forest - Flowers (Oaklie)
|
||||
|
||||
#include "common.h"
|
||||
#include "../mim.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../mim.h"
|
||||
#include "mapfs/mim_03_shape.h"
|
||||
#include "mapfs/mim_03_hit.h"
|
||||
|
||||
enum {
|
||||
NPC_Oaklie = 0,
|
||||
};
|
||||
|
||||
#define NAMESPACE mim_03
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
extern EvtScript N(EVS_SetupExitHint);
|
||||
extern EvtScript N(EVS_SetupGates);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
16
src/world/area_mim/mim_03/mim_03_0_header.c
Normal file
16
src/world/area_mim/mim_03/mim_03_0_header.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include "mim_03.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[mim_03_ENTRY_0] { 0.0, 0.0, -530.0, 180.0 },
|
||||
[mim_03_ENTRY_1] { -530.0, 0.0, 0.0, 90.0 },
|
||||
[mim_03_ENTRY_2] { 0.0, 0.0, 530.0, 0.0 },
|
||||
[mim_03_ENTRY_3] { 530.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_mim_03 },
|
||||
};
|
8
src/world/area_mim/mim_03/mim_03_1_music.c
Normal file
8
src/world/area_mim/mim_03/mim_03_1_music.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "mim_03.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8)
|
||||
EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
56
src/world/area_mim/mim_03/mim_03_2_main.c
Normal file
56
src/world/area_mim/mim_03/mim_03_2_main.c
Normal file
@ -0,0 +1,56 @@
|
||||
#include "mim_03.h"
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
API_CALLABLE(N(GetPlayerDistFromMapCenter)) {
|
||||
script->varTable[0] = get_xz_dist_to_player(0.0f, 0.0f);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_ExitWalk_n) = EVT_EXIT_WALK(60, mim_03_ENTRY_0, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_w) = EVT_EXIT_WALK(60, mim_03_ENTRY_1, "mim_04", mim_04_ENTRY_3);
|
||||
EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_03_ENTRY_2, "mim_02", mim_02_ENTRY_0);
|
||||
EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_03_ENTRY_3, "mim_01", mim_01_ENTRY_1);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST)
|
||||
EVT_CALL(SetSpriteShading, SHADING_MIM_03)
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 650)
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE)
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
|
||||
EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID)
|
||||
EVT_CALL(GetMapID, GB_MIM_CurrentMapID)
|
||||
EVT_SET(AF_MIM03_Oaklie_DialogueToggle, FALSE)
|
||||
EVT_EXEC_WAIT(N(EVS_SetupGates))
|
||||
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_EXEC_WAIT(N(EVS_MakeEntities))
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_WAIT(1)
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_EXEC_WAIT(N(EVS_SetupExitHint))
|
||||
EVT_CALL(N(SetForeverForestFog))
|
||||
EVT_THREAD
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(N(GetPlayerDistFromMapCenter))
|
||||
EVT_IF_LT(LVar0, 350)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_END_IF
|
||||
EVT_GOTO(0)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
6
src/world/area_mim/mim_03/mim_03_3_entity.c
Normal file
6
src/world/area_mim/mim_03/mim_03_3_entity.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "mim_03.h"
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
182
src/world/area_mim/mim_03/mim_03_4_hint.c
Normal file
182
src/world/area_mim/mim_03/mim_03_4_hint.c
Normal file
@ -0,0 +1,182 @@
|
||||
#include "mim_03.h"
|
||||
#include "model.h"
|
||||
|
||||
#include "world/common/util/GetFirstTriangleNormal.inc.c"
|
||||
|
||||
API_CALLABLE(N(GetFlowerNormal)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelID = evt_get_variable(script, *args++);
|
||||
s32 treeIndex = get_model_list_index_from_tree_index(modelID);
|
||||
Model* mdl = get_model_from_list_index(treeIndex);
|
||||
f32 x, y, z;
|
||||
|
||||
N(GetFirstTriangleNormal)(mdl->modelNode->displayData->displayList, &x, &y, &z);
|
||||
|
||||
evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(x));
|
||||
evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(y));
|
||||
evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(z));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
s32 N(FlowerModels_North)[] = {
|
||||
MODEL_o1, MODEL_o2,
|
||||
MODEL_o3, MODEL_o4,
|
||||
MODEL_o5, MODEL_o6,
|
||||
};
|
||||
|
||||
s32 N(FlowerModels_West)[] = {
|
||||
MODEL_o19, MODEL_o20,
|
||||
MODEL_o21, MODEL_o22,
|
||||
MODEL_o23, MODEL_o24,
|
||||
MODEL_o25, MODEL_o26,
|
||||
};
|
||||
|
||||
s32 N(FlowerModels_South)[] = {
|
||||
MODEL_o13, MODEL_o14,
|
||||
MODEL_o15, MODEL_o16,
|
||||
MODEL_o17, MODEL_o18,
|
||||
};
|
||||
|
||||
s32 N(FlowerModels_East)[] = {
|
||||
MODEL_o7, MODEL_o8,
|
||||
MODEL_o9, MODEL_o10,
|
||||
MODEL_o11, MODEL_o12,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_FlowersReact_Wrong) = {
|
||||
EVT_CALL(SetTexPanOffset, LVar9, 0, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetTexPanOffset, LVar9, 0, 0, -0x10000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(MakeLerp, 0, 720, 200, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_USE_BUF(LVar8)
|
||||
EVT_LOOP(3)
|
||||
EVT_BUF_READ2(LVar6, LVar7)
|
||||
EVT_CALL(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetTexPanOffset, LVar9, 0, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetTexPanOffset, LVar9, 0, 0, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_FlowersReact_Correct) = {
|
||||
EVT_LOOP(2)
|
||||
EVT_CALL(SetTexPanOffset, LVar9, 0, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(5)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_USE_BUF(LVar8)
|
||||
EVT_LOOP(4)
|
||||
EVT_BUF_READ2(LVar6, LVar7)
|
||||
EVT_CALL(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(5)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_USE_BUF(LVar8)
|
||||
EVT_LOOP(4)
|
||||
EVT_BUF_READ2(LVar6, LVar7)
|
||||
EVT_CALL(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(20)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_USE_BUF(LVar8)
|
||||
EVT_LOOP(4)
|
||||
EVT_BUF_READ2(LVar6, LVar7)
|
||||
EVT_CALL(N(GetFlowerNormal), LVar6, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(RotateModel, LVar6, LVar0, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(RotateModel, LVar7, LVar0, LVar3, LVar4, LVar5)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetTexPanOffset, LVar9, 0, 0, 0)
|
||||
EVT_WAIT(2)
|
||||
EVT_END_LOOP
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_CheckFlowers_North) = {
|
||||
EVT_CALL(PlaySoundAt, SOUND_2059, 0, 0, 0, -300)
|
||||
EVT_SET(LVar8, EVT_PTR(N(FlowerModels_North)))
|
||||
EVT_SET(LVar9, 0)
|
||||
EVT_EXEC_WAIT(N(EVS_FlowersReact_Wrong))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_CheckFlowers_West) = {
|
||||
EVT_CALL(PlaySoundAt, SOUND_205A, 0, -300, 0, 0)
|
||||
EVT_SET(LVar8, EVT_PTR(N(FlowerModels_West)))
|
||||
EVT_SET(LVar9, 1)
|
||||
EVT_EXEC_WAIT(N(EVS_FlowersReact_Correct))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_CheckFlowers_South) = {
|
||||
EVT_CALL(PlaySoundAt, SOUND_2059, 0, 0, 0, 300)
|
||||
EVT_SET(LVar8, EVT_PTR(N(FlowerModels_South)))
|
||||
EVT_SET(LVar9, 2)
|
||||
EVT_EXEC_WAIT(N(EVS_FlowersReact_Wrong))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_CheckFlowers_East) = {
|
||||
EVT_CALL(PlaySoundAt, SOUND_2059, 0, 300, 0, 0)
|
||||
EVT_SET(LVar8, EVT_PTR(N(FlowerModels_East)))
|
||||
EVT_SET(LVar9, 3)
|
||||
EVT_EXEC_WAIT(N(EVS_FlowersReact_Wrong))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupExitHint) = {
|
||||
EVT_CALL(SetTexPanner, MODEL_o2, 0)
|
||||
EVT_CALL(SetTexPanner, MODEL_o4, 0)
|
||||
EVT_CALL(SetTexPanner, MODEL_o6, 0)
|
||||
EVT_CALL(SetTexPanner, MODEL_o20, 1)
|
||||
EVT_CALL(SetTexPanner, MODEL_o22, 1)
|
||||
EVT_CALL(SetTexPanner, MODEL_o24, 1)
|
||||
EVT_CALL(SetTexPanner, MODEL_o26, 1)
|
||||
EVT_CALL(SetTexPanner, MODEL_o14, 2)
|
||||
EVT_CALL(SetTexPanner, MODEL_o16, 2)
|
||||
EVT_CALL(SetTexPanner, MODEL_o18, 2)
|
||||
EVT_CALL(SetTexPanner, MODEL_o8, 3)
|
||||
EVT_CALL(SetTexPanner, MODEL_o10, 3)
|
||||
EVT_CALL(SetTexPanner, MODEL_o12, 3)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_CheckFlowers_West)), TRIGGER_WALL_PRESS_A, COLLIDER_o132, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_CheckFlowers_North)), TRIGGER_WALL_PRESS_A, COLLIDER_o149, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_CheckFlowers_South)), TRIGGER_WALL_PRESS_A, COLLIDER_o151, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_CheckFlowers_East)), TRIGGER_WALL_PRESS_A, COLLIDER_o150, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
6
src/world/area_mim/mim_03/mim_03_5_gate.c
Normal file
6
src/world/area_mim/mim_03/mim_03_5_gate.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "mim_03.h"
|
||||
|
||||
#include "../gates/support.inc.c"
|
||||
#include "../gates/animate.inc.c"
|
||||
#include "../gates/use.inc.c"
|
||||
#include "../gates/setup.inc.c"
|
59
src/world/area_mim/mim_03/mim_03_6_npc.c
Normal file
59
src/world/area_mim/mim_03/mim_03_6_npc.c
Normal file
@ -0,0 +1,59 @@
|
||||
#include "mim_03.h"
|
||||
|
||||
#include "world/common/npc/Oaklie.inc.c"
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Oaklie) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH3_BOW_JOINED_PARTY)
|
||||
EVT_IF_EQ(AF_MIM03_Oaklie_DialogueToggle, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_0009)
|
||||
EVT_SET(AF_MIM03_Oaklie_DialogueToggle, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000A)
|
||||
EVT_SET(AF_MIM03_Oaklie_DialogueToggle, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CASE_LT(STORY_CH5_REACHED_LAVA_LAVA_ISLAND)
|
||||
EVT_IF_EQ(AF_MIM03_Oaklie_DialogueToggle, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000B)
|
||||
EVT_SET(AF_MIM03_Oaklie_DialogueToggle, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000C)
|
||||
EVT_SET(AF_MIM03_Oaklie_DialogueToggle, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_CASE_GE(STORY_CH5_REACHED_LAVA_LAVA_ISLAND)
|
||||
EVT_IF_EQ(AF_MIM03_Oaklie_DialogueToggle, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000D)
|
||||
EVT_SET(AF_MIM03_Oaklie_DialogueToggle, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Oaklie_Talk, ANIM_Oaklie_Idle, 0, MSG_CH3_000E)
|
||||
EVT_SET(AF_MIM03_Oaklie_DialogueToggle, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Oaklie) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Oaklie)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Oaklie) = {
|
||||
.id = NPC_Oaklie,
|
||||
.settings = &N(NpcSettings_Oaklie),
|
||||
.pos = { 0.0f, 32.0f, 0.0f },
|
||||
.yaw = 270,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING,
|
||||
.init = &N(EVS_NpcInit_Oaklie),
|
||||
.drops = OAKLIE_DROPS,
|
||||
.animations = OAKLIE_ANIMS,
|
||||
.tattle = MSG_NpcTattle_Oaklie,
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_Oaklie)),
|
||||
{}
|
||||
};
|
@ -1,8 +0,0 @@
|
||||
#include "mim_04.h"
|
||||
|
||||
static char* N(exit_str_0) = "mim_05";
|
||||
static char* N(exit_str_1) = "mim_01";
|
||||
static char* N(exit_str_2) = "mim_03";
|
||||
static char* N(exit_str_3) = "";
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
@ -1,43 +0,0 @@
|
||||
#include "mim_04.h"
|
||||
|
||||
extern s32 D_80241530_B9EE90;
|
||||
extern s32 D_80241534_B9EE94;
|
||||
extern s32 D_80241538_B9EE98;
|
||||
|
||||
void func_80240070_B9D9D0(s32 index) {
|
||||
switch (D_80241530_B9EE90) {
|
||||
case 1:
|
||||
D_80241538_B9EE98 = 0;
|
||||
D_80241530_B9EE90 = 2;
|
||||
break;
|
||||
case 2:
|
||||
D_80241538_B9EE98 += 10;
|
||||
if (D_80241538_B9EE98 >= 256) {
|
||||
D_80241538_B9EE98 = 255;
|
||||
D_80241534_B9EE94 = 20;
|
||||
D_80241530_B9EE90 = 3;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
D_80241534_B9EE94--;
|
||||
if (D_80241534_B9EE94 < 0) {
|
||||
D_80241534_B9EE94 = 0;
|
||||
D_80241530_B9EE90 = 4;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
D_80241538_B9EE98 -= 10;
|
||||
if (D_80241538_B9EE98 < 0) {
|
||||
D_80241538_B9EE98 = 0;
|
||||
D_80241530_B9EE90 = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_2CYCLE);
|
||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_80241538_B9EE98);
|
||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, COMBINED, 0, PRIMITIVE_ALPHA, 0, 0, 0, 0, COMBINED);
|
||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_DECAL2);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_04/B9D9D0", func_802401DC_B9DB3C);
|
@ -1,7 +0,0 @@
|
||||
#include "mim_04.h"
|
||||
|
||||
#include "world/common/enemy/HoppingAI.inc.c"
|
||||
|
||||
#include "world/common/StashVars.inc.c"
|
||||
|
||||
#include "world/common/GetItemName.inc.c"
|
@ -2,8 +2,25 @@
|
||||
/// @brief Forever Forest - Tree Face (Bub-ulb)
|
||||
|
||||
#include "common.h"
|
||||
#include "../mim.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../mim.h"
|
||||
#include "mapfs/mim_04_shape.h"
|
||||
#include "mapfs/mim_04_hit.h"
|
||||
|
||||
#include "sprite/npc/Bubulb.h"
|
||||
#include "sprite/npc/Fuzzy.h"
|
||||
|
||||
enum {
|
||||
NPC_Bubulb = 0,
|
||||
NPC_Fuzzy = 1,
|
||||
};
|
||||
|
||||
#define NAMESPACE mim_04
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_SetupGates);
|
||||
extern EvtScript N(EVS_SetupExitHint);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
16
src/world/area_mim/mim_04/mim_04_0_header.c
Normal file
16
src/world/area_mim/mim_04/mim_04_0_header.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include "mim_04.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[mim_04_ENTRY_0] { 0.0, 0.0, -530.0, 180.0 },
|
||||
[mim_04_ENTRY_1] { -530.0, 0.0, 0.0, 90.0 },
|
||||
[mim_04_ENTRY_2] { 0.0, 0.0, 530.0, 0.0 },
|
||||
[mim_04_ENTRY_3] { 530.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_mim_04 },
|
||||
};
|
8
src/world/area_mim/mim_04/mim_04_1_music.c
Normal file
8
src/world/area_mim/mim_04/mim_04_1_music.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "mim_04.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8)
|
||||
EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
41
src/world/area_mim/mim_04/mim_04_2_main.c
Normal file
41
src/world/area_mim/mim_04/mim_04_2_main.c
Normal file
@ -0,0 +1,41 @@
|
||||
#include "mim_04.h"
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_n) = EVT_EXIT_WALK(60, mim_04_ENTRY_0, "mim_05", mim_05_ENTRY_2);
|
||||
EvtScript N(EVS_ExitWalk_w) = EVT_EXIT_WALK(60, mim_04_ENTRY_1, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_04_ENTRY_2, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_04_ENTRY_3, "mim_03", mim_03_ENTRY_1);
|
||||
|
||||
MAP_RODATA_PAD(1,main);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST)
|
||||
EVT_CALL(SetSpriteShading, SHADING_MIM_04)
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 650)
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE)
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
|
||||
EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID)
|
||||
EVT_CALL(GetMapID, GB_MIM_CurrentMapID)
|
||||
EVT_EXEC_WAIT(N(EVS_SetupGates))
|
||||
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_WAIT(1)
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_EXEC(N(EVS_SetupExitHint))
|
||||
EVT_CALL(N(SetForeverForestFog))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
6
src/world/area_mim/mim_04/mim_04_3_entity.c
Normal file
6
src/world/area_mim/mim_04/mim_04_3_entity.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "mim_04.h"
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
86
src/world/area_mim/mim_04/mim_04_4_hint.c
Normal file
86
src/world/area_mim/mim_04/mim_04_4_hint.c
Normal file
@ -0,0 +1,86 @@
|
||||
#include "mim_04.h"
|
||||
|
||||
enum {
|
||||
EVIL_TREE_HIDDEN = 0,
|
||||
EVIL_TREE_BEGIN = 1,
|
||||
EVIL_TREE_FADE_IN = 2,
|
||||
EVIL_TREE_VISIBLE = 3,
|
||||
EVIL_TREE_FADE_OUT = 4,
|
||||
};
|
||||
|
||||
s32 N(EvilTreeState) = EVIL_TREE_HIDDEN;
|
||||
s32 N(EvilTreeVisibleTime) = 0;
|
||||
s32 N(EvilTreeFaceAlpha) = 0;
|
||||
|
||||
void N(gfx_build_evil_tree_face)(s32 index) {
|
||||
switch (N(EvilTreeState)) {
|
||||
case EVIL_TREE_BEGIN:
|
||||
N(EvilTreeFaceAlpha) = 0;
|
||||
N(EvilTreeState) = EVIL_TREE_FADE_IN;
|
||||
break;
|
||||
case EVIL_TREE_FADE_IN:
|
||||
N(EvilTreeFaceAlpha) += 10;
|
||||
if (N(EvilTreeFaceAlpha) >= 256) {
|
||||
N(EvilTreeFaceAlpha) = 255;
|
||||
N(EvilTreeVisibleTime) = 20;
|
||||
N(EvilTreeState) = EVIL_TREE_VISIBLE;
|
||||
}
|
||||
break;
|
||||
case EVIL_TREE_VISIBLE:
|
||||
N(EvilTreeVisibleTime)--;
|
||||
if (N(EvilTreeVisibleTime) < 0) {
|
||||
N(EvilTreeVisibleTime) = 0;
|
||||
N(EvilTreeState) = EVIL_TREE_FADE_OUT;
|
||||
}
|
||||
break;
|
||||
case EVIL_TREE_FADE_OUT:
|
||||
N(EvilTreeFaceAlpha) -= 10;
|
||||
if (N(EvilTreeFaceAlpha) < 0) {
|
||||
N(EvilTreeFaceAlpha) = 0;
|
||||
N(EvilTreeState) = EVIL_TREE_HIDDEN;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_2CYCLE);
|
||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, N(EvilTreeFaceAlpha));
|
||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, COMBINED, 0, PRIMITIVE_ALPHA, 0, 0, 0, 0, COMBINED);
|
||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_DECAL2);
|
||||
}
|
||||
|
||||
API_CALLABLE(N(TryEvilTreeLaugh)) {
|
||||
if (N(EvilTreeState) == EVIL_TREE_HIDDEN) {
|
||||
N(EvilTreeState) = EVIL_TREE_BEGIN;
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_ManageEvilTree) = {
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(AwaitPlayerApproach, 0, -340, 50)
|
||||
EVT_CALL(AwaitPlayerLeave, 0, -340, 50)
|
||||
EVT_CALL(N(TryEvilTreeLaugh))
|
||||
EVT_CALL(PlaySoundAt, SOUND_205F, 0, 55, 96, -254)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupExitHint) = {
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(gfx_build_evil_tree_face)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_kao, 1, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_kao, 16, TRUE)
|
||||
EVT_WAIT(20)
|
||||
EVT_EXEC(N(EVS_ManageEvilTree))
|
||||
EVT_THREAD
|
||||
EVT_CALL(SetTexPanner, MODEL_kao, 0)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(SetTexPanOffset, 0, 0, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetTexPanOffset, 0, 0, 0, 0)
|
||||
EVT_WAIT(3)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
6
src/world/area_mim/mim_04/mim_04_5_gate.c
Normal file
6
src/world/area_mim/mim_04/mim_04_5_gate.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "mim_04.h"
|
||||
|
||||
#include "../gates/support.inc.c"
|
||||
#include "../gates/animate.inc.c"
|
||||
#include "../gates/use.inc.c"
|
||||
#include "../gates/setup.inc.c"
|
96
src/world/area_mim/mim_04/mim_04_6_npc.c
Normal file
96
src/world/area_mim/mim_04/mim_04_6_npc.c
Normal file
@ -0,0 +1,96 @@
|
||||
#include "mim_04.h"
|
||||
|
||||
#include "world/common/enemy/complete/ForestFuzzy.inc.c"
|
||||
|
||||
#include "world/common/npc/Bulbulb.inc.c"
|
||||
|
||||
#include "world/common/complete/GiveReward.inc.c"
|
||||
|
||||
EvtScript N(EVS_NpcInteract_Bubulb) = {
|
||||
EVT_IF_EQ(GF_MIM04_Gift_MagicalSeed3, FALSE)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_BURROW_SURFACE, 0)
|
||||
EVT_CALL(PlaySoundAtNpc, NPC_SELF, SOUND_MOLE_POP, 0)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Green_PopUp)
|
||||
EVT_WAIT(45)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Green_Idle)
|
||||
EVT_CALL(SetNpcCollisionSize, NPC_SELF, 45, 26)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH3_000F)
|
||||
EVT_GIVE_KEY_REWARD(ITEM_MAGICAL_SEED3)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, MSG_CH3_0010)
|
||||
EVT_SET(GF_MIM04_Gift_MagicalSeed3, TRUE)
|
||||
EVT_CALL(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MIM_Bubulb_Revealed)
|
||||
EVT_ELSE
|
||||
EVT_SWITCH(GB_StoryProgress)
|
||||
EVT_CASE_LT(STORY_CH3_STAR_SPIRIT_RESCUED)
|
||||
EVT_SET(LVar0, MSG_CH3_0011)
|
||||
EVT_SET(LVar1, MSG_CH3_0012)
|
||||
EVT_CASE_LT(STORY_CH5_STAR_SPRIT_DEPARTED)
|
||||
EVT_SET(LVar0, MSG_CH3_0013)
|
||||
EVT_SET(LVar1, MSG_CH3_0014)
|
||||
EVT_CASE_DEFAULT
|
||||
EVT_SET(LVar0, MSG_CH3_0015)
|
||||
EVT_SET(LVar1, MSG_CH3_0016)
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_EQ(AF_MIM04_Bulbulb_DialogueToggle, FALSE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, LVar0)
|
||||
EVT_SET(AF_MIM04_Bulbulb_DialogueToggle, TRUE)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SpeakToPlayer, NPC_Bubulb, ANIM_Bubulb_Green_Talk, ANIM_Bubulb_Green_Idle, 0, LVar1)
|
||||
EVT_SET(AF_MIM04_Bulbulb_DialogueToggle, FALSE)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Bubulb) = {
|
||||
EVT_CALL(BindNpcInteract, NPC_SELF, EVT_PTR(N(EVS_NpcInteract_Bubulb)))
|
||||
EVT_IF_EQ(GF_MIM04_Gift_MagicalSeed3, FALSE)
|
||||
EVT_CALL(SetNpcCollisionSize, NPC_SELF, 25, 25)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_Bubulb_Green_BuriedIdle)
|
||||
EVT_CALL(SetTattleMessage, NPC_Bubulb, MSG_NpcTattle_MIM_Bubulb_Hidden)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Fuzzy) = {
|
||||
.id = NPC_Fuzzy,
|
||||
.settings = &N(NpcSettings_ForestFuzzy),
|
||||
.pos = { 240.0f, 0.0f, -240.0f },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_LOCK_ANIMS | NPC_FLAG_400000,
|
||||
.drops = FOREST_FUZZY_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 240, 0, -240 },
|
||||
.wanderSize = { 30 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 240, 0, -240 },
|
||||
.detectSize = { 200 },
|
||||
}
|
||||
},
|
||||
.animations = FOREST_FUZZY_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Bubulb) = {
|
||||
.id = NPC_Bubulb,
|
||||
.settings = &N(NpcSettings_Bubulb),
|
||||
.pos = { 0.0f, 32.0f, 0.0f },
|
||||
.yaw = 270,
|
||||
.flags = NPC_FLAG_PASSIVE | NPC_FLAG_JUMPING,
|
||||
.init = &N(EVS_NpcInit_Bubulb),
|
||||
.drops = BULBULB_DROPS,
|
||||
.animations = BULBULB_GREEN_ANIMS,
|
||||
.tattle = MSG_NpcTattle_MIM_Bubulb_Revealed,
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_Fuzzy), BTL_MIM_FORMATION_04, BTL_MIM_STAGE_00),
|
||||
NPC_GROUP(N(NpcData_Bubulb)),
|
||||
{}
|
||||
};
|
@ -1,8 +0,0 @@
|
||||
#include "mim_05.h"
|
||||
|
||||
static char* N(exit_str_0) = "mim_01";
|
||||
static char* N(exit_str_1) = "mim_06";
|
||||
static char* N(exit_str_2) = "mim_04";
|
||||
static char* N(exit_str_3) = "mim_08";
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
@ -1,3 +0,0 @@
|
||||
#include "mim_05.h"
|
||||
|
||||
#include "world/common/enemy/PiranhaPlantAI.inc.c"
|
@ -2,8 +2,26 @@
|
||||
/// @brief Forever Forest - Mushrooms (HP Plus)
|
||||
|
||||
#include "common.h"
|
||||
#include "../mim.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../mim.h"
|
||||
#include "mapfs/mim_05_shape.h"
|
||||
#include "mapfs/mim_05_hit.h"
|
||||
|
||||
#include "sprite/npc/SmallPiranha.h"
|
||||
|
||||
enum {
|
||||
NPC_PiranhaPlant_01 = 0,
|
||||
NPC_PiranhaPlant_01_Hitbox = 1,
|
||||
NPC_PiranhaPlant_02 = 2,
|
||||
NPC_PiranhaPlant_02_Hitbox = 3,
|
||||
};
|
||||
|
||||
#define NAMESPACE mim_05
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_SetupGates);
|
||||
extern EvtScript N(EVS_SetupExitHint);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
16
src/world/area_mim/mim_05/mim_05_0_header.c
Normal file
16
src/world/area_mim/mim_05/mim_05_0_header.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include "mim_05.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[mim_05_ENTRY_0] { 0.0, 0.0, -530.0, 180.0 },
|
||||
[mim_05_ENTRY_1] { -530.0, 0.0, 0.0, 90.0 },
|
||||
[mim_05_ENTRY_2] { 0.0, 0.0, 530.0, 0.0 },
|
||||
[mim_05_ENTRY_3] { 530.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_mim_05 },
|
||||
};
|
8
src/world/area_mim/mim_05/mim_05_1_music.c
Normal file
8
src/world/area_mim/mim_05/mim_05_1_music.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "mim_05.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8)
|
||||
EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
39
src/world/area_mim/mim_05/mim_05_2_main.c
Normal file
39
src/world/area_mim/mim_05/mim_05_2_main.c
Normal file
@ -0,0 +1,39 @@
|
||||
#include "mim_05.h"
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_n) = EVT_EXIT_WALK(60, mim_05_ENTRY_0, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_w) = EVT_EXIT_WALK(60, mim_05_ENTRY_1, "mim_06", mim_06_ENTRY_3);
|
||||
EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_05_ENTRY_2, "mim_04", mim_04_ENTRY_0);
|
||||
EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_05_ENTRY_3, "mim_08", mim_08_ENTRY_1);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST)
|
||||
EVT_CALL(SetSpriteShading, SHADING_MIM_05)
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 650)
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE)
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
|
||||
EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID)
|
||||
EVT_CALL(GetMapID, GB_MIM_CurrentMapID)
|
||||
EVT_EXEC_WAIT(N(EVS_SetupGates))
|
||||
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_WAIT(1)
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_EXEC_WAIT(N(EVS_SetupExitHint))
|
||||
EVT_CALL(N(SetForeverForestFog))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
6
src/world/area_mim/mim_05/mim_05_3_entity.c
Normal file
6
src/world/area_mim/mim_05/mim_05_3_entity.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "mim_05.h"
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
128
src/world/area_mim/mim_05/mim_05_4_hint.c
Normal file
128
src/world/area_mim/mim_05/mim_05_4_hint.c
Normal file
@ -0,0 +1,128 @@
|
||||
#include "mim_05.h"
|
||||
|
||||
EvtScript N(EVS_FlickerTexPanner) = {
|
||||
EVT_USE_ARRAY(LVar0)
|
||||
EVT_SWITCH(LVar1)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET(LVarA, ArrayVar(0))
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(LVarA, ArrayVar(1))
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_SET(LVarA, ArrayVar(2))
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_SET(LVarA, ArrayVar(4))
|
||||
EVT_CASE_EQ(5)
|
||||
EVT_SET(LVarA, ArrayVar(5))
|
||||
EVT_END_SWITCH
|
||||
EVT_IF_EQ(LVarA, 1)
|
||||
EVT_CALL(PlaySoundAt, SOUND_3A0, 0, -300, 0, -10)
|
||||
EVT_CALL(SetTexPanOffset, LVar1, 0, 0, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetTexPanOffset, LVar1, 0, 0, -0x8000)
|
||||
EVT_END_IF
|
||||
EVT_SET(LVar9, 1)
|
||||
EVT_SUB(LVar9, LVarA)
|
||||
EVT_SWITCH(LVar1)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_SET(ArrayVar(0), LVar9)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_SET(ArrayVar(1), LVar9)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_SET(ArrayVar(2), LVar9)
|
||||
EVT_CASE_EQ(4)
|
||||
EVT_SET(ArrayVar(4), LVar9)
|
||||
EVT_CASE_EQ(5)
|
||||
EVT_SET(ArrayVar(5), LVar9)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_AnimateMushroomSet) = {
|
||||
EVT_CALL(PlaySoundAt, SOUND_3A0, 0, -300, 0, -10)
|
||||
EVT_EXEC(N(EVS_FlickerTexPanner))
|
||||
EVT_WAIT(30)
|
||||
EVT_LOOP(4)
|
||||
EVT_EXEC(N(EVS_FlickerTexPanner))
|
||||
EVT_WAIT(3)
|
||||
EVT_EXEC(N(EVS_FlickerTexPanner))
|
||||
EVT_WAIT(3)
|
||||
EVT_END_LOOP
|
||||
EVT_EXEC(N(EVS_FlickerTexPanner))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InspectMushrooms_West) = {
|
||||
EVT_SET(LVar1, TEX_PANNER_2)
|
||||
EVT_EXEC(N(EVS_AnimateMushroomSet))
|
||||
EVT_WAIT(10)
|
||||
EVT_SET(LVar1, TEX_PANNER_4)
|
||||
EVT_EXEC(N(EVS_AnimateMushroomSet))
|
||||
EVT_WAIT(10)
|
||||
EVT_SET(LVar1, TEX_PANNER_5)
|
||||
EVT_EXEC(N(EVS_AnimateMushroomSet))
|
||||
EVT_WAIT(10)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InspectMushrooms_South) = {
|
||||
EVT_CALL(PlaySoundAt, SOUND_3A0, 0, -20, 0, 300)
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, -0x8000)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_0, TEX_PANNER_MAIN, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InspectMushrooms_North) = {
|
||||
EVT_CALL(PlaySoundAt, SOUND_3A0, 0, 20, 0, -300)
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, -0x8000)
|
||||
EVT_WAIT(20)
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_1, TEX_PANNER_MAIN, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InspectMushrooms_East) = {
|
||||
EVT_CALL(PlaySoundAt, SOUND_3A0, 0, 300, 0, 10)
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, -0x8000)
|
||||
EVT_WAIT(50)
|
||||
EVT_CALL(SetTexPanOffset, TEX_PANNER_3, TEX_PANNER_MAIN, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupExitHint) = {
|
||||
EVT_CALL(SetTexPanner, MODEL_o402, TEX_PANNER_0)
|
||||
EVT_CALL(SetTexPanner, MODEL_o510, TEX_PANNER_0)
|
||||
EVT_CALL(SetTexPanner, MODEL_o511, TEX_PANNER_0)
|
||||
EVT_CALL(SetTexPanner, MODEL_o403, TEX_PANNER_1)
|
||||
EVT_CALL(SetTexPanner, MODEL_o500, TEX_PANNER_1)
|
||||
EVT_CALL(SetTexPanner, MODEL_o501, TEX_PANNER_1)
|
||||
EVT_CALL(SetTexPanner, MODEL_o404, TEX_PANNER_3)
|
||||
EVT_CALL(SetTexPanner, MODEL_o498, TEX_PANNER_3)
|
||||
EVT_CALL(SetTexPanner, MODEL_o499, TEX_PANNER_3)
|
||||
EVT_CALL(SetTexPanner, MODEL_o505, TEX_PANNER_2)
|
||||
EVT_CALL(SetTexPanner, MODEL_o509, TEX_PANNER_2)
|
||||
EVT_CALL(SetTexPanner, MODEL_o507, TEX_PANNER_4)
|
||||
EVT_CALL(SetTexPanner, MODEL_o508, TEX_PANNER_4)
|
||||
EVT_CALL(SetTexPanner, MODEL_o405, TEX_PANNER_5)
|
||||
EVT_CALL(SetTexPanner, MODEL_o502, TEX_PANNER_5)
|
||||
EVT_CALL(SetTexPanner, MODEL_o503, TEX_PANNER_5)
|
||||
EVT_CALL(SetTexPanner, MODEL_o504, TEX_PANNER_5)
|
||||
EVT_MALLOC_ARRAY(6, LVar0)
|
||||
EVT_USE_ARRAY(LVar0)
|
||||
EVT_SET(ArrayVar(0), 0)
|
||||
EVT_SET(ArrayVar(1), 0)
|
||||
EVT_SET(ArrayVar(2), 0)
|
||||
EVT_SET(ArrayVar(4), 0)
|
||||
EVT_SET(ArrayVar(5), 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectMushrooms_South)), TRIGGER_WALL_PRESS_A, COLLIDER_o402, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectMushrooms_North)), TRIGGER_WALL_PRESS_A, COLLIDER_o403, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectMushrooms_West)), TRIGGER_WALL_PRESS_A, COLLIDER_o405, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectMushrooms_East)), TRIGGER_WALL_PRESS_A, COLLIDER_o404, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
6
src/world/area_mim/mim_05/mim_05_5_gate.c
Normal file
6
src/world/area_mim/mim_05/mim_05_5_gate.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "mim_05.h"
|
||||
|
||||
#include "../gates/support.inc.c"
|
||||
#include "../gates/animate.inc.c"
|
||||
#include "../gates/use.inc.c"
|
||||
#include "../gates/setup.inc.c"
|
61
src/world/area_mim/mim_05/mim_05_6_npc.c
Normal file
61
src/world/area_mim/mim_05/mim_05_6_npc.c
Normal file
@ -0,0 +1,61 @@
|
||||
#include "mim_05.h"
|
||||
|
||||
#include "world/common/enemy/complete/PiranhaPlant.inc.c"
|
||||
|
||||
StaticNpc N(NpcData_PiranhaPlant_01)[] = {
|
||||
{
|
||||
.id = NPC_PiranhaPlant_01,
|
||||
.settings = &N(NpcSettings_PiranhaPlant),
|
||||
.pos = { -240.0f, 0.0f, 240.0f },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.drops = PIRANHA_PLANT_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = PIRANHA_PLANT_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
},
|
||||
PIRANHA_PLANT_HITBOX(NPC_PiranhaPlant_01_Hitbox)
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_PiranhaPlant_02)[] = {
|
||||
{
|
||||
.id = NPC_PiranhaPlant_02,
|
||||
.settings = &N(NpcSettings_PiranhaPlant),
|
||||
.pos = { 240.0f, 0.0f, -240.0f },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.drops = PIRANHA_PLANT_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = PIRANHA_PLANT_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
},
|
||||
PIRANHA_PLANT_HITBOX(NPC_PiranhaPlant_02_Hitbox)
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_PiranhaPlant_01), BTL_MIM_FORMATION_0B, BTL_MIM_STAGE_00),
|
||||
NPC_GROUP(N(NpcData_PiranhaPlant_02), BTL_MIM_FORMATION_0A, BTL_MIM_STAGE_00),
|
||||
{}
|
||||
};
|
@ -1,8 +0,0 @@
|
||||
#include "mim_06.h"
|
||||
|
||||
static char* N(exit_str_0) = "mim_07";
|
||||
static char* N(exit_str_1) = "mim_01";
|
||||
static char* N(exit_str_2) = "mim_05";
|
||||
static char* N(exit_str_3) = "";
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
@ -1,7 +0,0 @@
|
||||
#include "mim_06.h"
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_06/BA47F0", func_80240070_BA47F0);
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_06/BA47F0", func_802403F0_BA4B70);
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_06/BA47F0", func_802404F8_BA4C78);
|
@ -1,5 +0,0 @@
|
||||
#include "mim_06.h"
|
||||
|
||||
#include "world/common/enemy/PiranhaPlantAI.inc.c"
|
||||
|
||||
#include "world/common/enemy/HoppingAI.inc.c"
|
@ -2,8 +2,29 @@
|
||||
/// @brief Forever Forest - Bee Hive (Path Splits)
|
||||
|
||||
#include "common.h"
|
||||
#include "../mim.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../mim.h"
|
||||
#include "mapfs/mim_06_shape.h"
|
||||
#include "mapfs/mim_06_hit.h"
|
||||
|
||||
#include "sprite/npc/SmallPiranha.h"
|
||||
#include "sprite/npc/Fuzzy.h"
|
||||
|
||||
enum {
|
||||
NPC_PiranhaPlant_01 = 0,
|
||||
NPC_PiranhaPlant_01_Hitbox = 1,
|
||||
NPC_PiranhaPlant_02 = 2,
|
||||
NPC_PiranhaPlant_02_Hitbox = 3,
|
||||
NPC_Fuzzy = 4,
|
||||
};
|
||||
|
||||
#define NAMESPACE mim_06
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupGates);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(D_802439F8_BA8178);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
||||
|
16
src/world/area_mim/mim_06/mim_06_0_header.c
Normal file
16
src/world/area_mim/mim_06/mim_06_0_header.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include "mim_06.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[mim_06_ENTRY_0] { 0.0, 0.0, -530.0, 180.0 },
|
||||
[mim_06_ENTRY_1] { -530.0, 0.0, 0.0, 90.0 },
|
||||
[mim_06_ENTRY_2] { 0.0, 0.0, 530.0, 0.0 },
|
||||
[mim_06_ENTRY_3] { 530.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_mim_06 },
|
||||
};
|
8
src/world/area_mim/mim_06/mim_06_1_music.c
Normal file
8
src/world/area_mim/mim_06/mim_06_1_music.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "mim_06.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8)
|
||||
EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
41
src/world/area_mim/mim_06/mim_06_2_main.c
Normal file
41
src/world/area_mim/mim_06/mim_06_2_main.c
Normal file
@ -0,0 +1,41 @@
|
||||
#include "mim_06.h"
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_n) = EVT_EXIT_WALK(60, mim_06_ENTRY_0, "mim_07", mim_07_ENTRY_2);
|
||||
EvtScript N(EVS_ExitWalk_w) = EVT_EXIT_WALK(60, mim_06_ENTRY_1, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_06_ENTRY_2, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_06_ENTRY_3, "mim_05", mim_05_ENTRY_1);
|
||||
|
||||
MAP_RODATA_PAD(1,main);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST)
|
||||
EVT_CALL(SetSpriteShading, SHADING_MIM_06)
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 650)
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE)
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
|
||||
EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID)
|
||||
EVT_CALL(GetMapID, GB_MIM_CurrentMapID)
|
||||
EVT_EXEC_WAIT(N(EVS_SetupGates))
|
||||
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_WAIT(1)
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_EXEC_WAIT(N(D_802439F8_BA8178))
|
||||
EVT_CALL(N(SetForeverForestFog))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
6
src/world/area_mim/mim_06/mim_06_3_entity.c
Normal file
6
src/world/area_mim/mim_06/mim_06_3_entity.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "mim_06.h"
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
212
src/world/area_mim/mim_06/mim_06_4_hint.c
Normal file
212
src/world/area_mim/mim_06/mim_06_4_hint.c
Normal file
@ -0,0 +1,212 @@
|
||||
#include "mim_06.h"
|
||||
#include "model.h"
|
||||
|
||||
#include "world/common/util/GetFirstTriangleNormal.inc.c"
|
||||
|
||||
API_CALLABLE(N(GetFlowerNormal)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 modelID = evt_get_variable(script, *args++);
|
||||
s32 treeIndex = get_model_list_index_from_tree_index(modelID);
|
||||
Model* mdl = get_model_from_list_index(treeIndex);
|
||||
f32 x, y, z;
|
||||
|
||||
N(GetFirstTriangleNormal)(mdl->modelNode->displayData->displayList, &x, &y, &z);
|
||||
|
||||
evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(x));
|
||||
evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(y));
|
||||
evt_set_variable(script, *args++, EVT_FLOAT_TO_FIXED(z));
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
API_CALLABLE(N(GetWitherTranslation)) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32 angle = evt_get_variable(script, *args++);
|
||||
|
||||
evt_set_variable(script, *args++, sin_deg(angle) * 10.0f);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
s32 N(FlowerModels_South)[] = {
|
||||
MODEL_sa_1, MODEL_sa_2,
|
||||
MODEL_sb_1, MODEL_sb_2,
|
||||
MODEL_sc_1, MODEL_sc_2,
|
||||
};
|
||||
|
||||
s32 N(FlowerModels_West)[] = {
|
||||
MODEL_wa_1, MODEL_wa_2,
|
||||
MODEL_wb_1, MODEL_wb_2,
|
||||
MODEL_wc_1, MODEL_wc_2,
|
||||
};
|
||||
|
||||
s32 N(FlowerModels_North)[] = {
|
||||
MODEL_na_1, MODEL_na_2,
|
||||
MODEL_nb_1, MODEL_nb_2,
|
||||
MODEL_nc_1, MODEL_nc_2,
|
||||
};
|
||||
|
||||
s32 N(FlowerModels_East)[] = {
|
||||
MODEL_ea_1, MODEL_ea_2,
|
||||
MODEL_eb_1, MODEL_eb_2,
|
||||
MODEL_ec_1, MODEL_ec_2,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_FlowersWither) = {
|
||||
EVT_CALL(RandInt, 20, LVar0)
|
||||
EVT_ADD(LVar0, 1)
|
||||
EVT_WAIT(LVar0)
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_SETF(LVar3, EVT_FLOAT(1.0))
|
||||
EVT_CALL(RandInt, 20, LVarC)
|
||||
EVT_SUB(LVarC, 10)
|
||||
EVT_LOOP(60)
|
||||
EVT_ADD(LVar0, LVarC)
|
||||
EVT_CALL(N(GetWitherTranslation), LVar0, LVar2)
|
||||
EVT_SUB(LVar1, 1)
|
||||
EVT_CALL(TranslateModel, LVarA, 0, LVar1, LVar2)
|
||||
EVT_CALL(N(GetFlowerNormal), LVarA, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, LVarA, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(ScaleModel, LVarA, LVar3, LVar3, LVar3)
|
||||
EVT_CALL(TranslateModel, LVarB, 0, LVar1, LVar2)
|
||||
EVT_CALL(N(GetFlowerNormal), LVarA, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, LVarB, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(ScaleModel, LVarB, LVar3, LVar3, LVar3)
|
||||
EVT_MULF(LVar3, EVT_FLOAT(0.9658203))
|
||||
EVT_WAIT(2)
|
||||
EVT_END_LOOP
|
||||
EVT_CALL(EnableModel, LVarA, FALSE)
|
||||
EVT_CALL(EnableModel, LVarB, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InspectFlowers_South) = {
|
||||
EVT_CALL(SetTexPanOffset, 0, 0, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetTexPanOffset, 0, 0, 0, -0x10000)
|
||||
EVT_CALL(PlaySoundAt, SOUND_205B, 0, -10, 0, -300)
|
||||
EVT_CALL(MakeLerp, 0, 30, 50, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_USE_BUF(EVT_PTR(N(FlowerModels_South)))
|
||||
EVT_LOOP(3)
|
||||
EVT_BUF_READ2(LVar2, LVar3)
|
||||
EVT_CALL(N(GetFlowerNormal), LVar2, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, LVar2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, LVar3, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySound, SOUND_205B)
|
||||
EVT_CALL(MakeLerp, 30, -30, 50, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_USE_BUF(EVT_PTR(N(FlowerModels_South)))
|
||||
EVT_LOOP(3)
|
||||
EVT_BUF_READ2(LVar2, LVar3)
|
||||
EVT_CALL(N(GetFlowerNormal), LVar2, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, LVar2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, LVar3, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(PlaySound, SOUND_205B)
|
||||
EVT_CALL(MakeLerp, -30, 0, 50, EASING_COS_IN_OUT)
|
||||
EVT_LABEL(20)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_USE_BUF(EVT_PTR(N(FlowerModels_South)))
|
||||
EVT_LOOP(3)
|
||||
EVT_BUF_READ2(LVar2, LVar3)
|
||||
EVT_CALL(N(GetFlowerNormal), LVar2, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, LVar2, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_CALL(RotateModel, LVar3, LVar0, LVar7, LVar8, LVar9)
|
||||
EVT_END_LOOP
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetTexPanOffset, 0, 0, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetTexPanOffset, 0, 0, 0, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InspectFlowers_West) = {
|
||||
EVT_CALL(SetTexPanOffset, 1, 0, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetTexPanOffset, 1, 0, 0, -0x10000)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(PlaySoundAt, SOUND_205C, 0, -300, 0, -10)
|
||||
EVT_USE_BUF(EVT_PTR(N(FlowerModels_West)))
|
||||
EVT_BUF_READ2(LVarA, LVarB)
|
||||
EVT_EXEC(N(EVS_FlowersWither))
|
||||
EVT_BUF_READ2(LVarA, LVarB)
|
||||
EVT_EXEC(N(EVS_FlowersWither))
|
||||
EVT_BUF_READ2(LVarA, LVarB)
|
||||
EVT_EXEC(N(EVS_FlowersWither))
|
||||
EVT_UNBIND
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InspectFlowers_North) = {
|
||||
EVT_CALL(SetTexPanOffset, 2, 0, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetTexPanOffset, 2, 0, 0, -0x10000)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(PlaySoundAt, SOUND_205C, 0, 10, 0, 300)
|
||||
EVT_USE_BUF(EVT_PTR(N(FlowerModels_North)))
|
||||
EVT_BUF_READ2(LVarA, LVarB)
|
||||
EVT_EXEC(N(EVS_FlowersWither))
|
||||
EVT_BUF_READ2(LVarA, LVarB)
|
||||
EVT_EXEC(N(EVS_FlowersWither))
|
||||
EVT_BUF_READ2(LVarA, LVarB)
|
||||
EVT_EXEC(N(EVS_FlowersWither))
|
||||
EVT_UNBIND
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InspectFlowers_East) = {
|
||||
EVT_CALL(SetTexPanOffset, 3, 0, 0, -0x8000)
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(SetTexPanOffset, 3, 0, 0, -0x10000)
|
||||
EVT_WAIT(15)
|
||||
EVT_CALL(PlaySoundAt, SOUND_205C, 0, 300, 0, -10)
|
||||
EVT_USE_BUF(EVT_PTR(N(FlowerModels_East)))
|
||||
EVT_BUF_READ2(LVarA, LVarB)
|
||||
EVT_EXEC(N(EVS_FlowersWither))
|
||||
EVT_BUF_READ2(LVarA, LVarB)
|
||||
EVT_EXEC(N(EVS_FlowersWither))
|
||||
EVT_BUF_READ2(LVarA, LVarB)
|
||||
EVT_EXEC(N(EVS_FlowersWither))
|
||||
EVT_UNBIND
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(D_802439F8_BA8178) = {
|
||||
EVT_CALL(SetTexPanner, MODEL_sa_2, 0)
|
||||
EVT_CALL(SetTexPanner, MODEL_sb_2, 0)
|
||||
EVT_CALL(SetTexPanner, MODEL_sc_2, 0)
|
||||
EVT_CALL(SetTexPanner, MODEL_wa_2, 1)
|
||||
EVT_CALL(SetTexPanner, MODEL_wb_2, 1)
|
||||
EVT_CALL(SetTexPanner, MODEL_wc_2, 1)
|
||||
EVT_CALL(SetTexPanner, MODEL_na_2, 2)
|
||||
EVT_CALL(SetTexPanner, MODEL_nb_2, 2)
|
||||
EVT_CALL(SetTexPanner, MODEL_nc_2, 2)
|
||||
EVT_CALL(SetTexPanner, MODEL_ea_2, 3)
|
||||
EVT_CALL(SetTexPanner, MODEL_eb_2, 3)
|
||||
EVT_CALL(SetTexPanner, MODEL_ec_2, 3)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectFlowers_South)), TRIGGER_WALL_PRESS_A, COLLIDER_o416, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectFlowers_West)), TRIGGER_WALL_PRESS_A, COLLIDER_o418, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectFlowers_North)), TRIGGER_WALL_PRESS_A, COLLIDER_o417, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_InspectFlowers_East)), TRIGGER_WALL_PRESS_A, COLLIDER_o331, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
6
src/world/area_mim/mim_06/mim_06_5_gate.c
Normal file
6
src/world/area_mim/mim_06/mim_06_5_gate.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "mim_06.h"
|
||||
|
||||
#include "../gates/support.inc.c"
|
||||
#include "../gates/animate.inc.c"
|
||||
#include "../gates/use.inc.c"
|
||||
#include "../gates/setup.inc.c"
|
86
src/world/area_mim/mim_06/mim_06_6_npc.c
Normal file
86
src/world/area_mim/mim_06/mim_06_6_npc.c
Normal file
@ -0,0 +1,86 @@
|
||||
#include "mim_06.h"
|
||||
|
||||
#include "world/common/enemy/complete/PiranhaPlant.inc.c"
|
||||
#include "world/common/enemy/complete/ForestFuzzy.inc.c"
|
||||
|
||||
StaticNpc N(NpcData_PiranhaPlant_01)[] = {
|
||||
{
|
||||
.id = NPC_PiranhaPlant_01,
|
||||
.settings = &N(NpcSettings_PiranhaPlant),
|
||||
.pos = { -240.0f, 0.0f, -240.0f },
|
||||
.yaw = 0,
|
||||
.flags = 0,
|
||||
.drops = PIRANHA_PLANT_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = PIRANHA_PLANT_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
},
|
||||
PIRANHA_PLANT_HITBOX(NPC_PiranhaPlant_01_Hitbox)
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_PiranhaPlant_02)[] = {
|
||||
{
|
||||
.id = NPC_PiranhaPlant_02,
|
||||
.settings = &N(NpcSettings_PiranhaPlant),
|
||||
.pos = { 240.0f, 0.0f, -240.0f },
|
||||
.yaw = 0,
|
||||
.flags = 0,
|
||||
.drops = PIRANHA_PLANT_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = PIRANHA_PLANT_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
},
|
||||
PIRANHA_PLANT_HITBOX(NPC_PiranhaPlant_02_Hitbox)
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Fuzzy) = {
|
||||
.id = NPC_Fuzzy,
|
||||
.settings = &N(NpcSettings_ForestFuzzy),
|
||||
.pos = { -140.0f, 0.0f, 300.0f },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_LOCK_ANIMS,
|
||||
.drops = FOREST_FUZZY_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = FOREST_FUZZY_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_PiranhaPlant_01), BTL_MIM_FORMATION_0D, BTL_MIM_STAGE_00),
|
||||
NPC_GROUP(N(NpcData_PiranhaPlant_02), BTL_MIM_FORMATION_0E, BTL_MIM_STAGE_00),
|
||||
NPC_GROUP(N(NpcData_Fuzzy), BTL_MIM_FORMATION_07, BTL_MIM_STAGE_00),
|
||||
{}
|
||||
};
|
@ -1,10 +0,0 @@
|
||||
#include "mim_07.h"
|
||||
|
||||
static char* N(exit_str_0) = "mim_09";
|
||||
static char* N(exit_str_1) = "mim_01";
|
||||
static char* N(exit_str_2) = "mim_06";
|
||||
static char* N(exit_str_3) = "mim_11";
|
||||
|
||||
#define NAMESPACE dup_mim_07
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
#define NAMESPACE mim_07
|
@ -1,45 +0,0 @@
|
||||
#include "mim_07.h"
|
||||
|
||||
extern s32 D_80241680_BAB7C0;
|
||||
extern s32 D_80241684_BAB7C4;
|
||||
extern s32 D_80241688_BAB7C8;
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
void func_802400D8_BAA218(s32 index) {
|
||||
switch (D_80241680_BAB7C0) {
|
||||
case 1:
|
||||
D_80241688_BAB7C8 = 0;
|
||||
D_80241680_BAB7C0 = 2;
|
||||
break;
|
||||
case 2:
|
||||
D_80241688_BAB7C8 += 10;
|
||||
if (D_80241688_BAB7C8 >= 256) {
|
||||
D_80241688_BAB7C8 = 255;
|
||||
D_80241684_BAB7C4 = 50;
|
||||
D_80241680_BAB7C0 = 3;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
D_80241684_BAB7C4--;
|
||||
if (D_80241684_BAB7C4 < 0) {
|
||||
D_80241684_BAB7C4 = 0;
|
||||
D_80241680_BAB7C0 = 4;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
D_80241688_BAB7C8 -= 7;
|
||||
if (D_80241688_BAB7C8 < 0) {
|
||||
D_80241688_BAB7C8 = 0;
|
||||
D_80241680_BAB7C0 = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_2CYCLE);
|
||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, D_80241688_BAB7C8);
|
||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, COMBINED, 0, PRIMITIVE_ALPHA, 0, 0, 0, 0, COMBINED);
|
||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_DECAL2);
|
||||
}
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_07/BAA1B0", func_80240244_BAA384);
|
@ -1,3 +0,0 @@
|
||||
#include "mim_07.h"
|
||||
|
||||
#include "world/common/enemy/HoppingAI.inc.c"
|
@ -2,8 +2,33 @@
|
||||
/// @brief Forever Forest - Flowers Vanish
|
||||
|
||||
#include "common.h"
|
||||
#include "../mim.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../mim.h"
|
||||
#include "mapfs/mim_07_shape.h"
|
||||
#include "mapfs/mim_07_hit.h"
|
||||
|
||||
#include "sprite/npc/JrTroopa.h"
|
||||
#include "sprite/npc/WorldGoombario.h"
|
||||
#include "sprite/npc/WorldKooper.h"
|
||||
#include "sprite/npc/WorldBombette.h"
|
||||
#include "sprite/npc/WorldParakarry.h"
|
||||
#include "sprite/npc/WorldBow.h"
|
||||
#include "sprite/npc/Fuzzy.h"
|
||||
|
||||
enum {
|
||||
NPC_Fuzzy_01 = 0,
|
||||
NPC_Fuzzy_02 = 1,
|
||||
NPC_JrTroopa = 2,
|
||||
};
|
||||
|
||||
#define NAMESPACE mim_07
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_PlayForestMusic);
|
||||
extern EvtScript N(EVS_JrTroopaMusic);
|
||||
extern EvtScript N(EVS_SetupGates);
|
||||
extern EvtScript N(EVS_SetupExitHint);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
16
src/world/area_mim/mim_07/mim_07_0_header.c
Normal file
16
src/world/area_mim/mim_07/mim_07_0_header.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include "mim_07.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[mim_07_ENTRY_0] { 0.0, 0.0, -530.0, 180.0 },
|
||||
[mim_07_ENTRY_1] { -530.0, 0.0, 0.0, 90.0 },
|
||||
[mim_07_ENTRY_2] { 0.0, 0.0, 530.0, 0.0 },
|
||||
[mim_07_ENTRY_3] { 530.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_mim_07 },
|
||||
};
|
14
src/world/area_mim/mim_07/mim_07_1_music.c
Normal file
14
src/world/area_mim/mim_07/mim_07_1_music.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include "mim_07.h"
|
||||
|
||||
EvtScript N(EVS_PlayForestMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8)
|
||||
EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_JrTroopaMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_JR_TROOPA_THEME, 0, 8)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
53
src/world/area_mim/mim_07/mim_07_2_main.c
Normal file
53
src/world/area_mim/mim_07/mim_07_2_main.c
Normal file
@ -0,0 +1,53 @@
|
||||
#include "mim_07.h"
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
EvtScript N(EVS_ExitWalk_n) = EVT_EXIT_WALK(60, mim_07_ENTRY_0, "mim_09", mim_09_ENTRY_2);
|
||||
EvtScript N(EVS_ExitWalk_w) = EVT_EXIT_WALK(60, mim_07_ENTRY_1, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_07_ENTRY_2, "mim_06", mim_06_ENTRY_0);
|
||||
EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_07_ENTRY_3, "mim_11", mim_11_ENTRY_0);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST)
|
||||
EVT_CALL(SetSpriteShading, SHADING_MIM_07)
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 650)
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE)
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
|
||||
EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID)
|
||||
EVT_CALL(GetMapID, GB_MIM_CurrentMapID)
|
||||
EVT_EXEC_WAIT(N(EVS_SetupGates))
|
||||
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_EXEC_WAIT(N(EVS_MakeEntities))
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_WAIT(1)
|
||||
EVT_EXEC(N(EVS_PlayForestMusic))
|
||||
EVT_EXEC_WAIT(N(EVS_SetupExitHint))
|
||||
EVT_CALL(N(SetForeverForestFog))
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_IF_EQ(LVar0, mim_07_ENTRY_3)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, 500, -100, 0)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, 530, 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(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_END_THREAD
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
24
src/world/area_mim/mim_07/mim_07_3_entity.c
Normal file
24
src/world/area_mim/mim_07/mim_07_3_entity.c
Normal file
@ -0,0 +1,24 @@
|
||||
#include "mim_07.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(EVS_ReadSign) = {
|
||||
EVT_CALL(IsStartingConversation, LVar0)
|
||||
EVT_IF_EQ(LVar0, TRUE)
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_SET_GROUP(EVT_GROUP_00)
|
||||
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_PARTIAL)
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_Menus_017F, 160, 40)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_CALL(SetTimeFreezeMode, TIME_FREEZE_NORMAL)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_Signpost), 280, 0, 0, 90, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignScript, EVT_PTR(N(EVS_ReadSign)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
121
src/world/area_mim/mim_07/mim_07_4_hint.c
Normal file
121
src/world/area_mim/mim_07/mim_07_4_hint.c
Normal file
@ -0,0 +1,121 @@
|
||||
#include "mim_07.h"
|
||||
|
||||
API_CALLABLE(N(ResetForeverForestFog)) {
|
||||
enable_world_fog();
|
||||
set_world_fog_dist(990, 1000);
|
||||
set_world_fog_color(0, 0, 0, 255);
|
||||
|
||||
enable_entity_fog();
|
||||
set_entity_fog_dist(990, 1000);
|
||||
set_entity_fog_color(0, 0, 0, 255);
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
enum {
|
||||
EVIL_ROCK_HIDDEN = 0,
|
||||
EVIL_ROCK_BEGIN = 1,
|
||||
EVIL_ROCK_FADE_IN = 2,
|
||||
EVIL_ROCK_VISIBLE = 3,
|
||||
EVIL_ROCK_FADE_OUT = 4,
|
||||
};
|
||||
|
||||
s32 N(EvilRockState) = EVIL_ROCK_HIDDEN;
|
||||
s32 N(EvilRockVisibleTime) = 0;
|
||||
s32 N(EvilRockAlpha) = 0;
|
||||
|
||||
void N(gfx_build_evil_rock_face)(s32 index) {
|
||||
switch (N(EvilRockState)) {
|
||||
case EVIL_ROCK_BEGIN:
|
||||
N(EvilRockAlpha) = 0;
|
||||
N(EvilRockState) = EVIL_ROCK_FADE_IN;
|
||||
break;
|
||||
case EVIL_ROCK_FADE_IN:
|
||||
N(EvilRockAlpha) += 10;
|
||||
if (N(EvilRockAlpha) > 255) {
|
||||
N(EvilRockAlpha) = 255;
|
||||
N(EvilRockVisibleTime) = 50;
|
||||
N(EvilRockState) = EVIL_ROCK_VISIBLE;
|
||||
}
|
||||
break;
|
||||
case EVIL_ROCK_VISIBLE:
|
||||
N(EvilRockVisibleTime)--;
|
||||
if (N(EvilRockVisibleTime) < 0) {
|
||||
N(EvilRockVisibleTime) = 0;
|
||||
N(EvilRockState) = EVIL_ROCK_FADE_OUT;
|
||||
}
|
||||
break;
|
||||
case EVIL_ROCK_FADE_OUT:
|
||||
N(EvilRockAlpha) -= 7;
|
||||
if (N(EvilRockAlpha) < 0) {
|
||||
N(EvilRockAlpha) = 0;
|
||||
N(EvilRockState) = EVIL_ROCK_HIDDEN;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_2CYCLE);
|
||||
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 0, 0, 0, N(EvilRockAlpha));
|
||||
gDPSetCombineLERP(gMasterGfxPos++, TEXEL0, 0, SHADE, 0, TEXEL0, 0, PRIMITIVE, 0, COMBINED, 0, PRIMITIVE_ALPHA, 0, 0, 0, 0, COMBINED);
|
||||
gDPSetRenderMode(gMasterGfxPos++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_DECAL2);
|
||||
}
|
||||
|
||||
API_CALLABLE(N(TryEvilRockLaugh)) {
|
||||
if (N(EvilRockState) == EVIL_ROCK_HIDDEN) {
|
||||
N(EvilRockState) = EVIL_ROCK_BEGIN;
|
||||
script->varTable[0] = 1;
|
||||
}
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_ManageEvilRock) = {
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(SetTexPanOffset, 0, 0, 0, -0x8000)
|
||||
EVT_WAIT(3)
|
||||
EVT_CALL(SetTexPanOffset, 0, 0, 0, 0)
|
||||
EVT_WAIT(3)
|
||||
EVT_GOTO(0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_OnInspectEvilRock) = {
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_CALL(N(TryEvilRockLaugh))
|
||||
EVT_IF_EQ(LVar0, 1)
|
||||
EVT_WAIT(10)
|
||||
EVT_EXEC_GET_TID(N(EVS_ManageEvilRock), LVar9)
|
||||
EVT_CALL(PlaySoundAt, SOUND_205E, 0, -34, 0, -300)
|
||||
EVT_LOOP(18)
|
||||
EVT_CALL(TranslateModel, MODEL_o289, EVT_FLOAT(1.0), 0, EVT_FLOAT(1.0))
|
||||
EVT_CALL(TranslateModel, MODEL_o440, EVT_FLOAT(1.0), 0, EVT_FLOAT(1.0))
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(TranslateModel, MODEL_o289, EVT_FLOAT(-1.0), 0, EVT_FLOAT(-1.0))
|
||||
EVT_CALL(TranslateModel, MODEL_o440, EVT_FLOAT(-1.0), 0, EVT_FLOAT(-1.0))
|
||||
EVT_WAIT(2)
|
||||
EVT_END_LOOP
|
||||
EVT_LOOP(10)
|
||||
EVT_CALL(TranslateModel, MODEL_o289, EVT_FLOAT(0.5), 0, EVT_FLOAT(0.5))
|
||||
EVT_CALL(TranslateModel, MODEL_o440, EVT_FLOAT(0.5), 0, EVT_FLOAT(0.5))
|
||||
EVT_WAIT(2)
|
||||
EVT_CALL(TranslateModel, MODEL_o289, EVT_FLOAT(-0.5), 0, EVT_FLOAT(-0.5))
|
||||
EVT_CALL(TranslateModel, MODEL_o440, EVT_FLOAT(-0.5), 0, EVT_FLOAT(-0.5))
|
||||
EVT_WAIT(2)
|
||||
EVT_END_LOOP
|
||||
EVT_KILL_THREAD(LVar9)
|
||||
EVT_CALL(TranslateModel, MODEL_o289, 0, 0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_o440, 0, 0, 0)
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupExitHint) = {
|
||||
EVT_CALL(SetCustomGfxBuilders, 1, EVT_PTR(N(gfx_build_evil_rock_face)), 0)
|
||||
EVT_CALL(SetModelCustomGfx, MODEL_o440, 1, -1)
|
||||
EVT_CALL(SetModelFlags, MODEL_o440, 16, TRUE)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_OnInspectEvilRock)), TRIGGER_WALL_PRESS_A, COLLIDER_o491, 1, 0)
|
||||
EVT_CALL(SetTexPanner, MODEL_o440, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
264
src/world/area_mim/mim_07/mim_07_5_gate.c
Normal file
264
src/world/area_mim/mim_07/mim_07_5_gate.c
Normal file
@ -0,0 +1,264 @@
|
||||
#include "mim_07.h"
|
||||
|
||||
EvtScript N(EVS_SetGateCameraZones) = {
|
||||
EVT_SWITCH(LVar1)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_north, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_west, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_south, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_east, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_higashi, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_north, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_west, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_south, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_east, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_higashi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_nishi, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_minami, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_kita, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_stage, TRUE)
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_north, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_west, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_south, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_east, FALSE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_higashi, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_nishi, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_minami, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_kita, TRUE)
|
||||
EVT_CALL(SetZoneEnabled, ZONE_stage, FALSE)
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_InitializeGates) = {
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_monn, MODEL_n1)
|
||||
EVT_CALL(RotateGroup, MODEL_monn, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monn)
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_mons, MODEL_s1)
|
||||
EVT_CALL(RotateGroup, MODEL_mons, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mons)
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_mone, MODEL_e1)
|
||||
EVT_CALL(RotateGroup, MODEL_mone, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mone)
|
||||
EVT_CALL(ParentColliderToModel, COLLIDER_monw, MODEL_w1)
|
||||
EVT_CALL(RotateGroup, MODEL_monw, LVar2, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monw)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_ResetGates) = {
|
||||
EVT_CALL(RotateGroup, MODEL_monn, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monn)
|
||||
EVT_CALL(RotateGroup, MODEL_mons, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mons)
|
||||
EVT_CALL(RotateGroup, MODEL_mone, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_mone)
|
||||
EVT_CALL(RotateGroup, MODEL_monw, 0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, COLLIDER_monw)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate) = {
|
||||
EVT_THREAD
|
||||
EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_1D4, 0)
|
||||
EVT_WAIT(19)
|
||||
EVT_CALL(PlaySoundAtCollider, LVar9, SOUND_1D5, 0)
|
||||
EVT_END_THREAD
|
||||
EVT_SWITCH(AB_MIM_1)
|
||||
EVT_CASE_EQ(0)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 10, 90, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(10)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, LVar7)
|
||||
EVT_ADD(LVar2, LVar8)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR)
|
||||
EVT_LABEL(20)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(20)
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_ResetGates))
|
||||
EVT_SET(AB_MIM_1, 1)
|
||||
EVT_SET(GF_MIM_ChoosingPath, TRUE)
|
||||
EVT_CASE_EQ(1)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, 360, 270, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(30)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(30)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_SUB(LVar0, LVar7)
|
||||
EVT_SUB(LVar2, LVar8)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 270, -10, 30, EASING_LINEAR)
|
||||
EVT_LABEL(40)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(40)
|
||||
EVT_END_IF
|
||||
EVT_SET(AB_MIM_1, 2)
|
||||
EVT_CASE_EQ(2)
|
||||
EVT_THREAD
|
||||
EVT_CALL(MakeLerp, -10, 90, 10, EASING_QUADRATIC_IN)
|
||||
EVT_LABEL(50)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(50)
|
||||
EVT_END_IF
|
||||
EVT_END_THREAD
|
||||
EVT_WAIT(15)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, LVar7)
|
||||
EVT_ADD(LVar2, LVar8)
|
||||
EVT_CALL(PlayerMoveTo, LVar0, LVar2, 15)
|
||||
EVT_END_THREAD
|
||||
EVT_SET(LVar1, 1)
|
||||
EVT_EXEC(N(EVS_SetGateCameraZones))
|
||||
EVT_CALL(MakeLerp, 90, 360, 30, EASING_LINEAR)
|
||||
EVT_LABEL(60)
|
||||
EVT_CALL(UpdateLerp)
|
||||
EVT_CALL(RotateGroup, LVarA, LVar0, 0, 1, 0)
|
||||
EVT_CALL(UpdateColliderTransform, LVar9)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(LVar1, 1)
|
||||
EVT_GOTO(60)
|
||||
EVT_END_IF
|
||||
EVT_EXEC(N(EVS_ResetGates))
|
||||
EVT_SET(AB_MIM_1, 1)
|
||||
EVT_END_SWITCH
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_North) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 0)
|
||||
EVT_SET(LVar8, 70)
|
||||
EVT_SET(LVar9, COLLIDER_monn)
|
||||
EVT_SET(LVarA, MODEL_monn)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_South) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 0)
|
||||
EVT_SET(LVar8, -70)
|
||||
EVT_SET(LVar9, COLLIDER_mons)
|
||||
EVT_SET(LVarA, MODEL_mons)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_East) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, -70)
|
||||
EVT_SET(LVar8, 0)
|
||||
EVT_SET(LVar9, COLLIDER_mone)
|
||||
EVT_SET(LVarA, MODEL_mone)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS)
|
||||
EVT_IF_EQ(GF_MIM10_Defeated_JrTroopa, FALSE)
|
||||
EVT_IF_EQ(GF_MIM10_JrTroopaFreakout, FALSE)
|
||||
EVT_SET(GF_MIM10_JrTroopaFreakout, TRUE)
|
||||
EVT_CALL(ShowMessageAtScreenPos, MSG_CH3_0017, 160, 40)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_UseGate_West) = {
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_SET(LVar7, 70)
|
||||
EVT_SET(LVar8, 0)
|
||||
EVT_SET(LVar9, COLLIDER_monw)
|
||||
EVT_SET(LVarA, MODEL_monw)
|
||||
EVT_EXEC_WAIT(N(EVS_UseGate))
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_SetupGates) = {
|
||||
EVT_IF_EQ(GF_MIM_ChoosingPath, FALSE)
|
||||
EVT_SET(GF_MIM_ChoosingPath, TRUE)
|
||||
EVT_SET(AB_MIM_1, 2)
|
||||
EVT_SET(LVar1, 2)
|
||||
EVT_SET(LVar2, -10)
|
||||
EVT_ELSE
|
||||
EVT_SET(GF_MIM_ChoosingPath, FALSE)
|
||||
EVT_SET(AB_MIM_1, 0)
|
||||
EVT_SET(LVar1, 0)
|
||||
EVT_SET(LVar2, 10)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(N(EVS_SetGateCameraZones))
|
||||
EVT_EXEC(N(EVS_InitializeGates))
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(90.0))
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_North)), TRIGGER_WALL_PRESS_A, COLLIDER_monn, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_South)), TRIGGER_WALL_PRESS_A, COLLIDER_mons, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_West)), TRIGGER_WALL_PRESS_A, COLLIDER_monw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_UseGate_East)), TRIGGER_WALL_PRESS_A, COLLIDER_mone, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
270
src/world/area_mim/mim_07/mim_07_6_npc.c
Normal file
270
src/world/area_mim/mim_07/mim_07_6_npc.c
Normal file
@ -0,0 +1,270 @@
|
||||
#include "mim_07.h"
|
||||
|
||||
#include "world/common/enemy/complete/ForestFuzzy.inc.c"
|
||||
|
||||
NpcSettings N(NpcSettings_JrTroopa) = {
|
||||
.height = 32,
|
||||
.radius = 24,
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
s32 N(D_80242944_BACA84)[] = {
|
||||
0, -350,
|
||||
};
|
||||
|
||||
s32 N(D_8024294C_BACA8C)[] = {
|
||||
0, 350,
|
||||
};
|
||||
|
||||
s32 N(D_80242954_BACA94)[] = {
|
||||
350, 0,
|
||||
};
|
||||
|
||||
s32 N(D_8024295C_BACA9C)[] = {
|
||||
-270, -245, -150, -310,
|
||||
};
|
||||
|
||||
s32 N(D_8024296C_BACAAC)[] = {
|
||||
270, -245, 150, -310,
|
||||
};
|
||||
|
||||
s32 N(D_8024297C_BACABC)[] = {
|
||||
-270, 245, -150, 310,
|
||||
};
|
||||
|
||||
s32 N(D_8024298C_BACACC)[] = {
|
||||
270, 245, 150, 310,
|
||||
};
|
||||
|
||||
s32 N(D_8024299C_BACADC)[] = {
|
||||
245, -270, 310, -150,
|
||||
};
|
||||
|
||||
s32 N(D_802429AC_BACAEC)[] = {
|
||||
245, 270, 310, 150,
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcIdle_JrTroopa) = {
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(mim_07_ENTRY_0)
|
||||
EVT_USE_BUF(EVT_PTR(N(D_80242944_BACA84)))
|
||||
EVT_CASE_EQ(mim_07_ENTRY_1)
|
||||
EVT_USE_BUF(EVT_PTR(N(D_80242944_BACA84)))
|
||||
EVT_CASE_EQ(mim_07_ENTRY_2)
|
||||
EVT_USE_BUF(EVT_PTR(N(D_8024294C_BACA8C)))
|
||||
EVT_CASE_EQ(mim_07_ENTRY_3)
|
||||
EVT_USE_BUF(EVT_PTR(N(D_80242954_BACA94)))
|
||||
EVT_END_SWITCH
|
||||
EVT_BUF_READ2(LVar1, LVar2)
|
||||
EVT_CALL(AwaitPlayerApproach, LVar1, LVar2, 80)
|
||||
EVT_LABEL(10)
|
||||
EVT_WAIT(1)
|
||||
EVT_CALL(AwaitPlayerLeave, LVar1, LVar2, 100)
|
||||
EVT_CALL(IsPlayerWithin, 0, 0, 410, LVar0)
|
||||
EVT_IF_EQ(LVar0, 0)
|
||||
EVT_GOTO(10)
|
||||
EVT_END_IF
|
||||
EVT_CALL(DisablePlayerInput, TRUE)
|
||||
EVT_CALL(GetCurrentPartner, LVar0)
|
||||
EVT_IF_NE(LVar0, 0)
|
||||
EVT_CALL(InterruptUsePartner)
|
||||
EVT_WAIT(20)
|
||||
EVT_END_IF
|
||||
EVT_EXEC_WAIT(N(EVS_JrTroopaMusic))
|
||||
EVT_CALL(GetPlayerPos, LVar1, LVar2, LVar3)
|
||||
EVT_CALL(GetEntryID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(mim_07_ENTRY_0)
|
||||
EVT_IF_LT(LVar1, 0)
|
||||
EVT_USE_BUF(EVT_PTR(N(D_8024295C_BACA9C)))
|
||||
EVT_ELSE
|
||||
EVT_USE_BUF(EVT_PTR(N(D_8024296C_BACAAC)))
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(mim_07_ENTRY_2)
|
||||
EVT_IF_LT(LVar1, 0)
|
||||
EVT_USE_BUF(EVT_PTR(N(D_8024297C_BACABC)))
|
||||
EVT_ELSE
|
||||
EVT_USE_BUF(EVT_PTR(N(D_8024298C_BACACC)))
|
||||
EVT_END_IF
|
||||
EVT_CASE_EQ(mim_07_ENTRY_3)
|
||||
EVT_IF_LT(LVar3, 0)
|
||||
EVT_USE_BUF(EVT_PTR(N(D_8024299C_BACADC)))
|
||||
EVT_ELSE
|
||||
EVT_USE_BUF(EVT_PTR(N(D_802429AC_BACAEC)))
|
||||
EVT_END_IF
|
||||
EVT_END_SWITCH
|
||||
EVT_BUF_READ4(LVar2, LVar3, LVar4, LVar5)
|
||||
EVT_CALL(SetSelfVar, 0, LVar2)
|
||||
EVT_CALL(SetSelfVar, 1, LVar3)
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, LVar2, 0, LVar3)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_0018)
|
||||
EVT_THREAD
|
||||
EVT_CALL(GetPlayerPos, LVar0, LVar1, LVar2)
|
||||
EVT_ADD(LVar0, LVar4)
|
||||
EVT_ADD(LVar2, LVar5)
|
||||
EVT_DIV(LVar0, 2)
|
||||
EVT_DIV(LVar2, 2)
|
||||
EVT_CALL(UseSettingsFrom, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetPanTarget, CAM_DEFAULT, LVar0, LVar1, LVar2)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(4.0))
|
||||
EVT_CALL(SetCamDistance, CAM_DEFAULT, EVT_FLOAT(300.0))
|
||||
EVT_CALL(SetCamPitch, CAM_DEFAULT, EVT_FLOAT(20.0), EVT_FLOAT(-6.0))
|
||||
EVT_CALL(PanToTarget, CAM_DEFAULT, 0, 1)
|
||||
EVT_END_THREAD
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Run)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, LVar4, LVar5, 30)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_Idle)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_0019)
|
||||
EVT_CALL(DisablePartnerAI, 0)
|
||||
EVT_CALL(GetCurrentPartnerID, LVar0)
|
||||
EVT_SWITCH(LVar0)
|
||||
EVT_CASE_EQ(PARTNER_GOOMBARIO)
|
||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldGoombario_Talk, ANIM_WorldGoombario_Idle, 5, MSG_CH3_001A)
|
||||
EVT_CASE_EQ(PARTNER_KOOPER)
|
||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldKooper_Talk, ANIM_WorldKooper_Idle, 5, MSG_CH3_001B)
|
||||
EVT_CASE_EQ(PARTNER_BOMBETTE)
|
||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBombette_Talk, ANIM_WorldBombette_Idle, 5, MSG_CH3_001C)
|
||||
EVT_CASE_EQ(PARTNER_PARAKARRY)
|
||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldParakarry_Talk, ANIM_WorldParakarry_Idle, 5, MSG_CH3_001D)
|
||||
EVT_CASE_EQ(PARTNER_BOW)
|
||||
EVT_CALL(SpeakToPlayer, NPC_PARTNER, ANIM_WorldBow_Talk, ANIM_WorldBow_Idle, 5, MSG_CH3_001E)
|
||||
EVT_END_SWITCH
|
||||
EVT_CALL(EnablePartnerAI)
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_001F)
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeArmsUp)
|
||||
EVT_CALL(DisablePlayerInput, FALSE)
|
||||
EVT_CALL(StartBossBattle, SONG_JR_TROOPA_BATTLE)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcDefeat_JrTroopa) = {
|
||||
EVT_CALL(SpeakToPlayer, NPC_SELF, ANIM_JrTroopa_Talk, ANIM_JrTroopa_Idle, 0, MSG_CH3_0022)
|
||||
EVT_CALL(GetSelfVar, 0, LVar0)
|
||||
EVT_CALL(GetSelfVar, 1, LVar1)
|
||||
EVT_IF_GE(LVar1, 0)
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 200, 0)
|
||||
EVT_ELSE
|
||||
EVT_CALL(InterpNpcYaw, NPC_SELF, 330, 0)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetNpcAnimation, NPC_SELF, ANIM_JrTroopa_ChargeArmsUp)
|
||||
EVT_WAIT(10)
|
||||
EVT_CALL(NpcMoveTo, NPC_SELF, LVar0, LVar1, 15)
|
||||
EVT_SET(GF_MIM10_Defeated_JrTroopa, TRUE)
|
||||
EVT_EXEC_WAIT(N(EVS_PlayForestMusic))
|
||||
EVT_CALL(ResetCam, CAM_DEFAULT, EVT_FLOAT(4.0))
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_JrTroopa) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS)
|
||||
EVT_IF_EQ(GF_MIM10_Defeated_JrTroopa, FALSE)
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_JrTroopa)))
|
||||
EVT_CALL(BindNpcDefeat, NPC_SELF, EVT_PTR(N(EVS_NpcDefeat_JrTroopa)))
|
||||
EVT_RETURN
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Fuzzy) = {
|
||||
EVT_IF_GE(GB_StoryProgress, STORY_CH3_GOT_SUPER_BOOTS)
|
||||
EVT_IF_EQ(GF_MIM10_Defeated_JrTroopa, FALSE)
|
||||
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||
EVT_END_IF
|
||||
EVT_END_IF
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Fuzzy_01) = {
|
||||
.id = NPC_Fuzzy_01,
|
||||
.settings = &N(NpcSettings_ForestFuzzy),
|
||||
.pos = { -240.0f, 0.0f, -240.0f },
|
||||
.yaw = 0,
|
||||
.flags = 0,
|
||||
.init = &N(EVS_NpcInit_Fuzzy),
|
||||
.drops = FOREST_FUZZY_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = FOREST_FUZZY_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Fuzzy_02) = {
|
||||
.id = NPC_Fuzzy_02,
|
||||
.settings = &N(NpcSettings_ForestFuzzy),
|
||||
.pos = { 270.0f, 0.0f, 200.0f },
|
||||
.yaw = 0,
|
||||
.flags = 0,
|
||||
.init = &N(EVS_NpcInit_Fuzzy),
|
||||
.drops = FOREST_FUZZY_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = FOREST_FUZZY_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_JrTroopa) = {
|
||||
.id = NPC_JrTroopa,
|
||||
.settings = &N(NpcSettings_JrTroopa),
|
||||
.pos = { -338.0f, 0.0f, 0.0f },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_4 | NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_40000 | NPC_FLAG_200000 | NPC_FLAG_NO_DROPS,
|
||||
.init = &N(EVS_NpcInit_JrTroopa),
|
||||
.drops = {
|
||||
.dropFlags = NPC_DROP_FLAGS_80,
|
||||
.heartDrops = NO_DROPS,
|
||||
.flowerDrops = NO_DROPS,
|
||||
},
|
||||
.animations = {
|
||||
.idle = ANIM_JrTroopa_Idle,
|
||||
.walk = ANIM_JrTroopa_Walk,
|
||||
.run = ANIM_JrTroopa_Walk,
|
||||
.chase = ANIM_JrTroopa_Walk,
|
||||
.anim_4 = ANIM_JrTroopa_Idle,
|
||||
.anim_5 = ANIM_JrTroopa_Idle,
|
||||
.death = ANIM_JrTroopa_Idle,
|
||||
.hit = ANIM_JrTroopa_Idle,
|
||||
.anim_8 = ANIM_JrTroopa_Idle,
|
||||
.anim_9 = ANIM_JrTroopa_Idle,
|
||||
.anim_A = ANIM_JrTroopa_Idle,
|
||||
.anim_B = ANIM_JrTroopa_Idle,
|
||||
.anim_C = ANIM_JrTroopa_Idle,
|
||||
.anim_D = ANIM_JrTroopa_Idle,
|
||||
.anim_E = ANIM_JrTroopa_Idle,
|
||||
.anim_F = ANIM_JrTroopa_Idle,
|
||||
},
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_Fuzzy_01), BTL_MIM_FORMATION_02, BTL_MIM_STAGE_00),
|
||||
NPC_GROUP(N(NpcData_Fuzzy_02), BTL_MIM_FORMATION_06, BTL_MIM_STAGE_00),
|
||||
NPC_GROUP(N(NpcData_JrTroopa), BTL_KMR_PART_3_FORMATION_04),
|
||||
{}
|
||||
};
|
@ -1,15 +0,0 @@
|
||||
#include "mim_08.h"
|
||||
|
||||
static char* N(exit_str_0) = "mim_01";
|
||||
static char* N(exit_str_1) = "mim_05";
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
ApiStatus func_80240068_BAD9A8(Evt* script, s32 isInitialCall) {
|
||||
script->varTable[0] = get_xz_dist_to_player(0.0f, 0.0f);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
#include "world/common/enemy/FlyingAI.inc.c"
|
||||
|
||||
#include "world/common/enemy/PiranhaPlantAI.inc.c"
|
@ -2,8 +2,32 @@
|
||||
/// @brief Forever Forest - Laughing Rock
|
||||
|
||||
#include "common.h"
|
||||
#include "../mim.h"
|
||||
#include "message_ids.h"
|
||||
#include "map.h"
|
||||
|
||||
#include "../mim.h"
|
||||
#include "mapfs/mim_08_shape.h"
|
||||
#include "mapfs/mim_08_hit.h"
|
||||
|
||||
#include "sprite/npc/Bzzap.h"
|
||||
#include "sprite/npc/SmallPiranha.h"
|
||||
|
||||
enum {
|
||||
NPC_Bzzap = 0,
|
||||
NPC_PiranhaPlant_01 = 1,
|
||||
NPC_PiranhaPlant_01_Hitbox = 2,
|
||||
NPC_PiranhaPlant_02 = 3,
|
||||
NPC_PiranhaPlant_02_Hitbox = 4,
|
||||
};
|
||||
|
||||
enum {
|
||||
MV_Unk_00 = MapVar(0),
|
||||
};
|
||||
|
||||
#define NAMESPACE mim_08
|
||||
|
||||
extern EvtScript N(EVS_Main);
|
||||
extern EvtScript N(EVS_SetupMusic);
|
||||
extern EvtScript N(EVS_SetupGates);
|
||||
extern EvtScript N(EVS_MakeEntities);
|
||||
extern NpcGroupList N(DefaultNPCs);
|
||||
|
16
src/world/area_mim/mim_08/mim_08_0_header.c
Normal file
16
src/world/area_mim/mim_08/mim_08_0_header.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include "mim_08.h"
|
||||
|
||||
EntryList N(Entrances) = {
|
||||
[mim_08_ENTRY_0] { 0.0, 0.0, -530.0, 180.0 },
|
||||
[mim_08_ENTRY_1] { -530.0, 0.0, 0.0, 90.0 },
|
||||
[mim_08_ENTRY_2] { 0.0, 0.0, 530.0, 0.0 },
|
||||
[mim_08_ENTRY_3] { 530.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_mim_08 },
|
||||
};
|
8
src/world/area_mim/mim_08/mim_08_1_music.c
Normal file
8
src/world/area_mim/mim_08/mim_08_1_music.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "mim_08.h"
|
||||
|
||||
EvtScript N(EVS_SetupMusic) = {
|
||||
EVT_CALL(SetMusicTrack, 0, SONG_FOREVER_FOREST, 0, 8)
|
||||
EVT_CALL(PlayAmbientSounds, AMBIENT_SPOOKY)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
75
src/world/area_mim/mim_08/mim_08_2_main.c
Normal file
75
src/world/area_mim/mim_08/mim_08_2_main.c
Normal file
@ -0,0 +1,75 @@
|
||||
#include "mim_08.h"
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
API_CALLABLE(N(GetPlayerDistFromMapCenter)) {
|
||||
script->varTable[0] = get_xz_dist_to_player(0.0f, 0.0f);
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
EvtScript N(EVS_ExitWalk_n) = EVT_EXIT_WALK(60, mim_08_ENTRY_0, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_w) = EVT_EXIT_WALK(60, mim_08_ENTRY_1, "mim_05", mim_05_ENTRY_3);
|
||||
EvtScript N(EVS_ExitWalk_s) = EVT_EXIT_WALK(60, mim_08_ENTRY_2, "mim_01", mim_01_ENTRY_1);
|
||||
EvtScript N(EVS_ExitWalk_e) = EVT_EXIT_WALK(60, mim_08_ENTRY_3, "mim_01", mim_01_ENTRY_1);
|
||||
|
||||
EvtScript N(EVS_BindExitTriggers) = {
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_n)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilin, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_w)), TRIGGER_FLOOR_ABOVE, COLLIDER_deiliw, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_s)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilis, 1, 0)
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(EVS_ExitWalk_e)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilie, 1, 0)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(D_802431F0_BB0B30) = {
|
||||
EVT_LOOP(6)
|
||||
EVT_SET(LVar0, 2)
|
||||
EVT_CALL(TranslateModel, MODEL_o507, LVar0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_o508, LVar0, 0, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_SET(LVar0, -2)
|
||||
EVT_CALL(TranslateModel, MODEL_o507, LVar0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_o508, LVar0, 0, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_END_LOOP
|
||||
EVT_SET(LVar0, 0)
|
||||
EVT_CALL(TranslateModel, MODEL_o507, LVar0, 0, LVar0)
|
||||
EVT_CALL(TranslateModel, MODEL_o508, LVar0, 0, LVar0)
|
||||
EVT_WAIT(1)
|
||||
EVT_SET(MV_Unk_00, 1)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_Main) = {
|
||||
EVT_SET(GB_WorldLocation, LOCATION_FOREVER_FOREST)
|
||||
EVT_CALL(SetSpriteShading, SHADING_MIM_08)
|
||||
EVT_CALL(SetCamPerspective, CAM_DEFAULT, 3, 25, 16, 650)
|
||||
EVT_CALL(SetCamBGColor, CAM_DEFAULT, 0, 0, 0)
|
||||
EVT_CALL(SetCamEnabled, CAM_DEFAULT, TRUE)
|
||||
EVT_CALL(SetCamLeadPlayer, CAM_DEFAULT, FALSE)
|
||||
EVT_SET(AB_MIM_2, GB_MIM_CurrentMapID)
|
||||
EVT_CALL(GetMapID, GB_MIM_CurrentMapID)
|
||||
EVT_EXEC_WAIT(N(EVS_SetupGates))
|
||||
EVT_CALL(MakeNpcs, TRUE, EVT_PTR(N(DefaultNPCs)))
|
||||
EVT_EXEC_WAIT(N(EVS_MakeEntities))
|
||||
EVT_SET(LVar0, EVT_PTR(N(EVS_BindExitTriggers)))
|
||||
EVT_EXEC(EnterWalk)
|
||||
EVT_WAIT(1)
|
||||
EVT_EXEC(N(EVS_SetupMusic))
|
||||
EVT_BIND_TRIGGER(EVT_PTR(N(D_802431F0_BB0B30)), TRIGGER_WALL_HAMMER, COLLIDER_o473, 1, 0)
|
||||
EVT_CALL(N(SetForeverForestFog))
|
||||
EVT_THREAD
|
||||
EVT_LABEL(0)
|
||||
EVT_CALL(WaitForCam, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_CALL(N(GetPlayerDistFromMapCenter))
|
||||
EVT_IF_LT(LVar0, 350)
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(1.0))
|
||||
EVT_ELSE
|
||||
EVT_CALL(SetCamSpeed, CAM_DEFAULT, EVT_FLOAT(3.0))
|
||||
EVT_END_IF
|
||||
EVT_GOTO(0)
|
||||
EVT_END_THREAD
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
9
src/world/area_mim/mim_08/mim_08_3_entity.c
Normal file
9
src/world/area_mim/mim_08/mim_08_3_entity.c
Normal file
@ -0,0 +1,9 @@
|
||||
#include "mim_08.h"
|
||||
#include "entity.h"
|
||||
|
||||
EvtScript N(EVS_MakeEntities) = {
|
||||
EVT_CALL(MakeEntity, EVT_PTR(Entity_RedBlock), 0, 93, 0, 45, ITEM_HP_PLUS_A, MAKE_ENTITY_END)
|
||||
EVT_CALL(AssignBlockFlag, GF_MIM08_BadgeBlock_HPPlusA)
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
6
src/world/area_mim/mim_08/mim_08_4_gate.c
Normal file
6
src/world/area_mim/mim_08/mim_08_4_gate.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "mim_08.h"
|
||||
|
||||
#include "../gates/support.inc.c"
|
||||
#include "../gates/animate.inc.c"
|
||||
#include "../gates/use.inc.c"
|
||||
#include "../gates/setup.inc.c"
|
108
src/world/area_mim/mim_08/mim_08_5_npc.c
Normal file
108
src/world/area_mim/mim_08/mim_08_5_npc.c
Normal file
@ -0,0 +1,108 @@
|
||||
#include "mim_08.h"
|
||||
|
||||
#include "world/common/enemy/complete/Bzzap.inc.c"
|
||||
|
||||
#include "world/common/enemy/complete/PiranhaPlant.inc.c"
|
||||
|
||||
EvtScript N(EVS_NpcIdle_Bzzap) = {
|
||||
EVT_LABEL(100)
|
||||
EVT_WAIT(1)
|
||||
EVT_IF_EQ(MV_Unk_00, 0)
|
||||
EVT_GOTO(100)
|
||||
EVT_END_IF
|
||||
EVT_CALL(SetNpcPos, NPC_SELF, -280, 108, 0)
|
||||
EVT_CALL(SetNpcJumpscale, NPC_SELF, EVT_FLOAT(0.0))
|
||||
EVT_CALL(NpcJump1, NPC_SELF, -280, 50, 10, 5)
|
||||
EVT_WAIT(50)
|
||||
EVT_CALL(BindNpcAI, NPC_SELF, EVT_PTR(N(EVS_NpcAI_Bzzap)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
EvtScript N(EVS_NpcInit_Bzzap) = {
|
||||
EVT_CALL(BindNpcIdle, NPC_SELF, EVT_PTR(N(EVS_NpcIdle_Bzzap)))
|
||||
EVT_RETURN
|
||||
EVT_END
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_Bzzap) = {
|
||||
.id = NPC_Bzzap,
|
||||
.settings = &N(NpcSettings_Bzzap),
|
||||
.pos = { NPC_DISPOSE_LOCATION },
|
||||
.yaw = 270,
|
||||
.flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW | NPC_FLAG_200000,
|
||||
.init = &N(EVS_NpcInit_Bzzap),
|
||||
.drops = BZZAP_NO_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { -300, 60, 0 },
|
||||
.wanderSize = { 60 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { -300, 60, 0 },
|
||||
.detectSize = { 200 },
|
||||
}
|
||||
},
|
||||
.animations = BZZAP_ANIMS,
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_PiranhaPlant_01)[] = {
|
||||
{
|
||||
.id = NPC_PiranhaPlant_01,
|
||||
.settings = &N(NpcSettings_PiranhaPlant),
|
||||
.pos = { -240.0f, 0.0f, -240.0f },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.drops = PIRANHA_PLANT_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = PIRANHA_PLANT_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
},
|
||||
PIRANHA_PLANT_HITBOX(NPC_PiranhaPlant_01_Hitbox)
|
||||
};
|
||||
|
||||
StaticNpc N(NpcData_PiranhaPlant_02)[] = {
|
||||
{
|
||||
.id = NPC_PiranhaPlant_02,
|
||||
.settings = &N(NpcSettings_PiranhaPlant),
|
||||
.pos = { 240.0f, 0.0f, 240.0f },
|
||||
.yaw = 0,
|
||||
.flags = NPC_FLAG_100 | NPC_FLAG_LOCK_ANIMS | NPC_FLAG_JUMPING | NPC_FLAG_NO_PROJECT_SHADOW,
|
||||
.drops = PIRANHA_PLANT_DROPS,
|
||||
.territory = {
|
||||
.wander = {
|
||||
.isFlying = TRUE,
|
||||
.moveSpeedOverride = NO_OVERRIDE_MOVEMENT_SPEED,
|
||||
.wanderShape = SHAPE_CYLINDER,
|
||||
.centerPos = { 0, 0, 0 },
|
||||
.wanderSize = { 400 },
|
||||
.detectShape = SHAPE_CYLINDER,
|
||||
.detectPos = { 0, 0, 0 },
|
||||
.detectSize = { 400 },
|
||||
}
|
||||
},
|
||||
.animations = PIRANHA_PLANT_ANIMS,
|
||||
.aiDetectFlags = AI_DETECT_SIGHT,
|
||||
},
|
||||
PIRANHA_PLANT_HITBOX(NPC_PiranhaPlant_02_Hitbox)
|
||||
};
|
||||
|
||||
NpcGroupList N(DefaultNPCs) = {
|
||||
NPC_GROUP(N(NpcData_Bzzap), BTL_MIM_FORMATION_10, BTL_MIM_STAGE_00),
|
||||
NPC_GROUP(N(NpcData_PiranhaPlant_01), BTL_MIM_FORMATION_0F, BTL_MIM_STAGE_00),
|
||||
NPC_GROUP(N(NpcData_PiranhaPlant_02), BTL_MIM_FORMATION_09, BTL_MIM_STAGE_00),
|
||||
{}
|
||||
};
|
@ -1,10 +0,0 @@
|
||||
#include "mim_09.h"
|
||||
|
||||
static char* N(exit_str_0) = "mim_01";
|
||||
static char* N(exit_str_1) = "mim_07";
|
||||
|
||||
#include "world/common/SetForeverForestFog.inc.c"
|
||||
|
||||
INCLUDE_ASM(s32, "world/area_mim/mim_09/BB2E00", func_80240068_BB2E68);
|
||||
|
||||
#include "world/common/enemy/HoppingAI.inc.c"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user