Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JP] World Areas (dro, isk, trd, nok, hos, kpa, osr, kkj, tst, jan, mim, obk, arn) #1204

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions include/mapfs/kpa_08_hit.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#if VERSION_JP
#define COLLIDER_o90 0x12
#define COLLIDER_o19 0x10
#define COLLIDER_ttw 0x6
#define COLLIDER_deilie 0x0
#else
#define COLLIDER_Root 0x13
#define COLLIDER_move2 0x12
#define COLLIDER_o90 0x11
Expand All @@ -18,6 +24,7 @@
#define COLLIDER_ne 0x2
#define COLLIDER_deilite 0x1
#define COLLIDER_deilie 0x0
#endif

#define ZONE_Root 0x4
#define ZONE_g14 0x3
Expand Down
8 changes: 8 additions & 0 deletions include/mapfs/kpa_09_hit.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#if VERSION_JP
#define COLLIDER_o106 0x13
#define COLLIDER_o19 0x11
#define COLLIDER_tte 0x7
#define COLLIDER_deilie 0x5
#define COLLIDER_ttw 0x2
#else
#define COLLIDER_Root 0x14
#define COLLIDER_move2 0x13
#define COLLIDER_o106 0x12
Expand All @@ -19,6 +26,7 @@
#define COLLIDER_ttw 0x2
#define COLLIDER_deilitw 0x1
#define COLLIDER_deiliw 0x0
#endif

#define ZONE_Root 0x4
#define ZONE_g14 0x3
Expand Down
7 changes: 7 additions & 0 deletions include/mapfs/kpa_130_shape.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#if VERSION_JP
#define MODEL_o455 0x13
#define MODEL_o454 0x11
#define MODEL_o11 0xF
#define MODEL_o9 0xD
#else
#define MODEL_Root 0xB5
#define MODEL_g128 0xB4
#define MODEL_o464 0xB3
Expand Down Expand Up @@ -180,4 +186,5 @@
#define MODEL_ew_hisi 0x2
#define MODEL_ew_sai 0x1
#define MODEL_ew_yuka 0x0
#endif

7 changes: 7 additions & 0 deletions include/mapfs/kpa_41_hit.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#if VERSION_JP
#define COLLIDER_deili4 0x1C
#define COLLIDER_deili3 0x17
#define COLLIDER_deilie 0x12
#define COLLIDER_deiliw 0xD
#else
#define COLLIDER_Root 0x1F
#define COLLIDER_exit4 0x1E
#define COLLIDER_tt4 0x1D
Expand Down Expand Up @@ -30,6 +36,7 @@
#define COLLIDER_kaidann 0x2
#define COLLIDER_k_sokumen2 0x1
#define COLLIDER_k_sokumen 0x0
#endif

#define ZONE_Root 0x4
#define ZONE_yuka 0x3
Expand Down
6 changes: 6 additions & 0 deletions include/mapfs/kpa_50_hit.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#if VERSION_JP
#define COLLIDER_tte 0xF
#define COLLIDER_ttw 0xA
#define COLLIDER_deiliw 0x9
#else
#define COLLIDER_Root 0x11
#define COLLIDER_exit 0x10
#define COLLIDER_e2 0xF
Expand All @@ -16,6 +21,7 @@
#define COLLIDER_1_isi 0x2
#define COLLIDER_e1_sai 0x1
#define COLLIDER_e2_sai 0x0
#endif

#define ZONE_Root 0x5
#define ZONE_exit 0x4
Expand Down
6 changes: 6 additions & 0 deletions include/mapfs/kpa_52_hit.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#if VERSION_JP
#define COLLIDER_tte2 0x1A
#define COLLIDER_ttw 0x15
#define COLLIDER_tte1 0x10
#else
#define COLLIDER_Root 0x1C
#define COLLIDER_exit3 0x1B
#define COLLIDER_ne2 0x1A
Expand Down Expand Up @@ -27,6 +32,7 @@
#define COLLIDER_kaidann 0x2
#define COLLIDER_o159 0x1
#define COLLIDER_o158 0x0
#endif

#define ZONE_Root 0x4
#define ZONE_g9 0x3
Expand Down
4 changes: 2 additions & 2 deletions src/battle/popup_messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ s32 BattleMessages[] = {
[BTL_MSG_NO_HAMMER_TARGET] MSG_Menus_Battle_NoTarget_Hammer,
[BTL_MSG_NO_ITEM_TARGET] MSG_Menus_Battle_NoTarget_Item,
#if VERSION_JP
[BTL_MSG_46] MSG_MENUS_00DB,
[BTL_MSG_47] MSG_MENUS_00DC,
[BTL_MSG_46] MSG_Menus_JP_00DB,
[BTL_MSG_47] MSG_Menus_JP_00DC,
#else
[BTL_MSG_46] MSG_NONE,
[BTL_MSG_47] MSG_NONE,
Expand Down
4 changes: 4 additions & 0 deletions src/world/area_hos/common/FallingStars.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ EvtScript N(EVS_Starfall_Directed) = {
#define LV_Dz LVarC
#define LV_Time LVarD
#define LV_SoundDelay LVarE
#if VERSION_JP
SetGroup(EVT_GROUP_00)
#else
SetGroup(EVT_GROUP_0B)
#endif
Set(LV_Time, 0)
Set(LV_SoundDelay, 0)
Label(0)
Expand Down
4 changes: 4 additions & 0 deletions src/world/area_hos/common/Narrator.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ void N(UpdateIntroMessages)(IntroMessage** introMessageLists) {
if (opacity > 0) {
messageID = N(CurMessageList)->messageID;
if (messageID != 0) {
#if VERSION_JP
draw_msg(N(CurMessageList)->messageID, 0, 200, opacity, -1, 0);
#else
yOffset = 0;
if (get_msg_lines(messageID) >= 2) {
yOffset = -7;
}
draw_msg(N(CurMessageList)->messageID, 0, yOffset + 196, opacity, -1, 0);
#endif
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions src/world/area_hos/hos_04/intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ EvtScript N(EVS_ControlTwink) = {
Call(SetNpcAnimation, NPC_Twink, ANIM_Twink_Back)
Call(SetNpcYaw, NPC_Twink, 180)
Call(N(AnimateBoomLengthPostHeist))
#if VERSION_JP
Wait(30 * DT)
#else
Wait(15 * DT)
#endif
Thread
Wait(10 * DT)
Call(InterpNpcYaw, NPC_Twink, 0, 0)
Expand Down Expand Up @@ -189,6 +193,9 @@ EvtScript N(EVS_Intro_PreHeist_Unused) = {
End
};

// TODO: this has moved to starship.c in JP. This is a possible indication that
// file spitting in other versions might be off.
#if !VERSION_JP
#include "world/common/npc/StarSpirit.inc.c"
#include "world/common/npc/Twink.h"

Expand All @@ -212,3 +219,4 @@ NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Twink)),
{}
};
#endif
20 changes: 20 additions & 0 deletions src/world/area_hos/hos_04/main.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
#include "hos_04.h"

EvtScript N(EVS_ExitWalk_hos_03_1) = EVT_EXIT_WALK(60, hos_04_ENTRY_0, "hos_03", hos_03_ENTRY_1);

#if VERSION_JP
EvtScript N(EVS_ExitWalk_hos_05_0) = {
SetGroup(EVT_GROUP_1B)
Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_o162, COLLIDER_FLAGS_UPPER_MASK)
Call(UseExitHeading, 60, hos_04_ENTRY_1)
Exec(ExitWalk)
Call(GotoMap, Ref("hos_05"), hos_05_ENTRY_0)
Wait(100)
Return
End
};
#else
EvtScript N(EVS_ExitWalk_hos_05_0) = EVT_EXIT_WALK(60, hos_04_ENTRY_1, "hos_05", hos_05_ENTRY_0);
#endif

EvtScript N(EVS_BindExitTriggers) = {
BindTrigger(Ref(N(EVS_ExitWalk_hos_03_1)), TRIGGER_FLOOR_ABOVE, COLLIDER_deilinw, 1, 0)
Expand All @@ -17,8 +31,13 @@ EvtScript N(EVS_EnterMap) = {
CaseEq(hos_04_ENTRY_0)
Call(ModifyColliderFlags, MODIFY_COLLIDER_FLAGS_SET_BITS, COLLIDER_deilitnw, COLLIDER_FLAGS_UPPER_MASK)
IfEq(GF_HOS04_Visited, FALSE)
#if VERSION_JP
Call(SetPlayerPos, -630, 0, 0)
Call(SetNpcPos, NPC_PARTNER, -630, 0, 0)
#endif
Thread
Call(DisablePlayerInput, TRUE)
#if !VERSION_JP
Call(SetPlayerPos, -630, 0, 0)
Call(GetPartnerInUse, LVar0)
IfEq(LVar0, PARTNER_NONE)
Expand All @@ -27,6 +46,7 @@ EvtScript N(EVS_EnterMap) = {
Wait(1)
Call(EnablePartnerAI)
EndIf
#endif
Call(UseSettingsFrom, CAM_DEFAULT, -565, 0, 0)
Call(SetPanTarget, CAM_DEFAULT, -565, 0, 0)
Call(SetCamDistance, CAM_DEFAULT, 1350)
Expand Down
50 changes: 50 additions & 0 deletions src/world/area_hos/hos_04/narrator.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,51 @@
#if VERSION_PAL
#define DURATION_INTRO_MSG (35)
#define DURATION_BLANK (73)
#elif VERSION_JP
#define DURATION_INTRO_MSG (50)
#define DURATION_BLANK (95)
#else
#define DURATION_INTRO_MSG (44)
#define DURATION_BLANK (89)
#endif

#if VERSION_JP
IntroMessage N(D_80241EFC_A321EC)[] = {
{ MSG_Intro_JP_0022, DURATION_INTRO_MSG },
{ MSG_Intro_JP_0023, DURATION_INTRO_MSG },
{ MSG_Intro_JP_0024, DURATION_INTRO_MSG },
{}, // end of list
};

IntroMessage N(D_80241F1C_A3220C)[] = {
{ MSG_Intro_JP_0035, DURATION_INTRO_MSG },
{ MSG_Intro_JP_0036, DURATION_INTRO_MSG },
{ MSG_Intro_JP_0037, DURATION_INTRO_MSG },
{}, // end of list
};

IntroMessage N(D_80241F3C_A3222C)[] = {
{ MSG_Intro_JP_0048, DURATION_INTRO_MSG },
{ MSG_Intro_JP_0049, DURATION_INTRO_MSG },
{ MSG_Intro_JP_004A, DURATION_INTRO_MSG },
{}, // end of list
};

IntroMessage N(D_80241F5C_A3224C)[] = {
{ MSG_Intro_JP_005B, DURATION_INTRO_MSG },
{ MSG_Intro_JP_005C, DURATION_INTRO_MSG },
{ MSG_Intro_JP_005D, DURATION_INTRO_MSG },
{}, // end of list
};

IntroMessage* N(func_80241F7C_A3226C)[] = {
N(D_80241EFC_A321EC),
N(D_80241F1C_A3220C),
N(D_80241F3C_A3222C),
N(D_80241F5C_A3224C)
};
#endif

IntroMessage N(HeistMessageList)[] = {
{ INTRO_MSG_BLANK, DURATION_BLANK },
{ MSG_Intro_001B, DURATION_INTRO_MSG },
Expand All @@ -25,13 +65,23 @@ IntroMessage* N(IntroMessages)[] = {
N(HeistMessageList),
};

#if VERSION_JP
void N(func_80240DC8_A310B8)(void) {
N(UpdateIntroMessages)(N(func_80241F7C_A3226C));
}
#endif

void N(curtain_callback_narration)(void) {
N(UpdateIntroMessages)(N(IntroMessages));
}

EvtScript N(EVS_SetupNarrator) = {
Call(GetEntryID, LVar0)
Switch(LVar0)
#if VERSION_JP
CaseEq(hos_04_ENTRY_3)
Call(N(SetCurtainCallback), Ref(N(func_80240DC8_A310B8)))
#endif
CaseEq(hos_04_ENTRY_4)
Call(N(SetCurtainCallback), Ref(N(curtain_callback_narration)))
EndSwitch
Expand Down
31 changes: 31 additions & 0 deletions src/world/area_hos/hos_04/starship.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,37 @@ API_CALLABLE(N(ScreenOverlayFadeIn)) {
}
}

// TODO: this was moved from the end of intro.c. This is a possible indication that
// file spitting in other versions might be off.
#if VERSION_JP
#include "world/common/npc/StarSpirit.inc.c"
#include "world/common/npc/Twink.h"

EvtScript N(EVS_NpcInit_Twink) = {
Return
End
};

NpcData N(NpcData_Twink) = {
.id = NPC_Twink,
.pos = { NPC_DISPOSE_LOCATION },
.yaw = 270,
.init = &N(EVS_NpcInit_Twink),
.settings = &N(NpcSettings_StarSpirit),
.flags = ENEMY_FLAG_PASSIVE | ENEMY_FLAG_FLYING,
.drops = NO_DROPS,
.animations = TWINK_ANIMS,
};

NpcGroupList N(DefaultNPCs) = {
NPC_GROUP(N(NpcData_Twink)),
{}
};

// TODO: required. File splitting?
u8 N(D_802422CC)[4] = { 0 };
#endif

EvtScript N(EVS_Starship_FlyingAway) = {
Call(DisablePlayerInput, TRUE)
Call(DisablePlayerPhysics, TRUE)
Expand Down
6 changes: 6 additions & 0 deletions src/world/area_hos/hos_05/intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -2046,7 +2046,9 @@ EvtScript N(EVS_Scene_IntroStory) = {
Call(SetNpcRotation, NPC_Bowser_Body, 0, LVar0, 0)
Wait(1)
EndLoop
#if !VERSION_JP
Call(SetNpcRotation, NPC_Bowser_Body, 0, 0, 0)
#endif
Call(InterpNpcYaw, NPC_Bowser_Body, 90, 0)
EndThread
Thread
Expand Down Expand Up @@ -2519,7 +2521,11 @@ EvtScript N(EVS_Scene_IntroStory) = {
EndThread
Wait(10 * DT)
Call(N(AnimKammy_FlyOff))
#if VERSION_JP
Wait(28 * DT)
#else
Wait(20 * DT)
#endif
Call(N(ResumeIntro))
Return
End
Expand Down
4 changes: 4 additions & 0 deletions src/world/area_hos/hos_06/merlow.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,15 @@ EvtScript N(EVS_NpcInteract_Merlow) = {
Call(SetMessageText, LVar4, 0)
Call(SetMessageValue, LVar1, 1)
Call(SetMessageValue, LVar5, 2)
#if VERSION_JP
Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0052)
#else
IfEq(LVar1, 1)
Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0053)
Else
Call(SpeakToPlayer, NPC_Merlow, ANIM_Merlow_Talk, ANIM_Merlow_Idle, 0, MSG_HOS_0052)
EndIf
#endif
Set(LVar3, LVar0)
Call(ShowChoice, MSG_Choice_000D)
IfEq(LVar0, 1)
Expand Down
3 changes: 3 additions & 0 deletions src/world/area_hos/hos_10/hos_10.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@ extern EvtScript N(EVS_Scene_SpiritsFlyingAway);
extern EvtScript N(EVS_Scene_RisingAboveClouds);
extern EvtScript N(EVS_Scene_UnusedWhiteScreen);
extern EvtScript N(EVS_Scene_PreTitle);
#if VERSION_JP
extern EvtScript N(EVS_SetupNarrator);
#endif
extern NpcGroupList N(NpcGroup_Descent);
extern NpcGroupList N(NpcGroup_FlyAway);
3 changes: 3 additions & 0 deletions src/world/area_hos/hos_10/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ EvtScript N(EVS_Main) = {
Wait(30)
Exec(N(EVS_Scene_PreTitle))
EndSwitch
#if VERSION_JP
Exec(N(EVS_SetupNarrator))
#endif
Return
End
};
Loading
Loading