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

Some JP splits and decomp #1116

Merged
merged 6 commits into from
Oct 14, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
9 changes: 9 additions & 0 deletions src/77480.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@
#define i_spy_VRAM (void*)0x802B7000
#endif

extern Addr i_spy_ROM_START;
extern Addr i_spy_ROM_END;
extern Addr pulse_stone_ROM_START;
extern Addr pulse_stone_ROM_END;
extern Addr speech_bubble_ROM_START;
extern Addr speech_bubble_ROM_END;
extern Addr inspect_icon_ROM_START;
extern Addr inspect_icon_ROM_END;

SHIFT_BSS UNK_FUN_PTR(ISpyNotificationCallback);
SHIFT_BSS UNK_FUN_PTR(PulseStoneNotificationCallback);
SHIFT_BSS UNK_FUN_PTR(TalkNotificationCallback);
Expand Down
2 changes: 2 additions & 0 deletions src/7bb60_len_41b0.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,9 @@ void phys_main_collision_below(void) {
break;
}
} else if (!(playerStatus->flags & PS_FLAG_FLYING)
#ifndef VERSION_JP
&& playerStatus->actionState != ACTION_STATE_USE_SPINNING_FLOWER
#endif
) {
if (outLength <= collHeightHalf + temp_f24 && hitDirX == 0.0f && hitDirZ == 0.0f) {
set_action_state(ACTION_STATE_STEP_DOWN);
Expand Down
11 changes: 10 additions & 1 deletion src/7fd10_len_b40.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,9 @@ void check_input_open_menus(void) {
do {
use_consumable(popup->userIndex[D_8010CCFC - 1]);
} while (0); // todo required to match
#ifndef VERSION_JP
gOverrideFlags |= GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS;
#endif
break;
}
}
Expand Down Expand Up @@ -386,16 +388,23 @@ void check_input_status_bar(void) {
if (!(playerStatus->curButtons & (Z_TRIG | R_TRIG)) && (pressedButtons & BUTTON_C_UP) && func_800E9860()) {
open_status_bar_long();

#ifdef VERSION_JP
sfx_play_sound(SOUND_LOWER_STATUS_BAR);
#else
if (!is_picking_up_item()) {
sfx_play_sound(SOUND_LOWER_STATUS_BAR);
}
#endif
}
} else if (!(playerStatus->curButtons & (Z_TRIG | R_TRIG)) && (pressedButtons & BUTTON_C_UP) && func_800E9860()) {
close_status_bar();

#ifdef VERSION_JP
sfx_play_sound(SOUND_RAISE_STATUS_BAR);
#else
if (!is_picking_up_item()) {
sfx_play_sound(SOUND_RAISE_STATUS_BAR);
}
#endif
}
}
}
37 changes: 37 additions & 0 deletions src/world/actions.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,43 @@ void action_update_use_munchlesia(void);
void action_update_use_tweester(void);
void action_update_state_23(void);

extern Addr world_action_idle_ROM_START;
extern Addr world_action_idle_ROM_END;
extern Addr world_action_walk_ROM_START;
extern Addr world_action_walk_ROM_END;
extern Addr world_action_jump_ROM_START;
extern Addr world_action_jump_ROM_END;
extern Addr world_action_land_ROM_START;
extern Addr world_action_land_ROM_END;
extern Addr world_action_misc_ROM_START;
extern Addr world_action_misc_ROM_END;
extern Addr world_action_spin_jump_ROM_START;
extern Addr world_action_spin_jump_ROM_END;
extern Addr world_action_tornado_jump_ROM_START;
extern Addr world_action_tornado_jump_ROM_END;
extern Addr world_action_slide_ROM_START;
extern Addr world_action_slide_ROM_END;
extern Addr world_action_hammer_ROM_START;
extern Addr world_action_hammer_ROM_END;
extern Addr world_action_hit_fire_ROM_START;
extern Addr world_action_hit_fire_ROM_END;
extern Addr world_action_knockback_ROM_START;
extern Addr world_action_knockback_ROM_END;
extern Addr world_action_hit_lava_ROM_START;
extern Addr world_action_hit_lava_ROM_END;
extern Addr world_action_step_up_ROM_START;
extern Addr world_action_step_up_ROM_END;
extern Addr world_action_sneaky_parasol_ROM_START;
extern Addr world_action_sneaky_parasol_ROM_END;
extern Addr world_action_spin_ROM_START;
extern Addr world_action_spin_ROM_END;
extern Addr world_action_use_spinning_flower_ROM_START;
extern Addr world_action_use_spinning_flower_ROM_END;
extern Addr world_action_use_munchlesia_ROM_START;
extern Addr world_action_use_munchlesia_ROM_END;
extern Addr world_action_use_tweester_ROM_START;
extern Addr world_action_use_tweester_ROM_END;

s32 PrevPlayerCamRelativeYaw = 0;
s32 D_800F7B44 = 0;
f32 D_800F7B48 = 0.0f;
Expand Down
43 changes: 43 additions & 0 deletions src/world/partners.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,45 @@ extern HudScript HES_StatusSPIncrement7;

extern EvtScript EVS_World_UseItem;

extern Addr world_use_item_ROM_START;
extern Addr world_use_item_ROM_END;
extern Addr world_use_item_VRAM;
extern Addr world_partner_goombario_ROM_START;
extern Addr world_partner_goombario_ROM_END;
extern Addr world_partner_goombario_VRAM;
extern Addr world_partner_kooper_ROM_START;
extern Addr world_partner_kooper_ROM_END;
extern Addr world_partner_kooper_VRAM;
extern Addr world_partner_bombette_ROM_START;
extern Addr world_partner_bombette_ROM_END;
extern Addr world_partner_bombette_VRAM;
extern Addr world_partner_parakarry_ROM_START;
extern Addr world_partner_parakarry_ROM_END;
extern Addr world_partner_parakarry_VRAM;
extern Addr world_partner_goompa_ROM_START;
extern Addr world_partner_goompa_ROM_END;
extern Addr world_partner_goompa_VRAM;
extern Addr world_partner_watt_ROM_START;
extern Addr world_partner_watt_ROM_END;
extern Addr world_partner_watt_VRAM;
extern Addr world_partner_sushie_ROM_START;
extern Addr world_partner_sushie_ROM_END;
extern Addr world_partner_sushie_VRAM;
extern Addr world_partner_lakilester_ROM_START;
extern Addr world_partner_lakilester_ROM_END;
extern Addr world_partner_lakilester_VRAM;
extern Addr world_partner_bow_ROM_START;
extern Addr world_partner_bow_ROM_END;
extern Addr world_partner_bow_VRAM;
extern Addr world_partner_goombaria_ROM_START;
extern Addr world_partner_goombaria_ROM_END;
extern Addr world_partner_goombaria_VRAM;
extern Addr world_partner_twink_ROM_START;
extern Addr world_partner_twink_ROM_END;
extern Addr world_partner_twink_VRAM;



s32 partner_is_idle(Npc* partner);
s32 world_partner_can_player_pause_default(Npc* partner);
void _use_partner_ability(void);
Expand Down Expand Up @@ -654,9 +693,13 @@ void _use_partner_ability(void) {
}

if (PartnerCommand >= PARTNER_CMD_INSTA_SWITCH) {
#ifdef VERSION_JP
D_8010CFC4 = 0;
#else
if (PartnerCommand != PARTNER_CMD_USE_ABILITY) {
D_8010CFC4 = 0;
}
#endif
}

switch (PartnerCommand) {
Expand Down
114 changes: 114 additions & 0 deletions ver/jp/asm/bss2.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
.include "macro.inc"

# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers

#ifndef SHIFT

.section .bss

dlabel PulseStoneNotificationCallback
.space 4

dlabel D_8010C924
.space 4

dlabel D_8010C928
.space 4

dlabel D_8010C92C
.space 4

dlabel wPartnerNpc
.space 4

dlabel TweesterTouchingPlayer
.space 4

dlabel D_8010C938
.space 4

dlabel ISpyNotificationCallback
.space 4

dlabel TalkNotificationCallback
.space 4

dlabel gSpinHistoryBufferPos
.space 4

dlabel D_8010C948
.space 4

dlabel D_8010C94C
.space 4

dlabel D_8010C950
.space 4

dlabel TweesterTouchingPartner
.space 4

dlabel InteractNotificationCallback
.space 4

dlabel PrevPlayerDirection
.space 4

dlabel JumpedOnSwitchX
.space 4

dlabel D_8010C964
.space 4

dlabel D_8010C968
.space 4

dlabel PeachDisguiseNpcIndex
.space 4

dlabel D_8010C970
.space 4

dlabel D_8010C974
.space 4

dlabel NpcHitQueryColliderID
.space 4

dlabel JumpedOnSwitchZ
.space 4

dlabel D_8010C980
.space 4

dlabel D_8010C984
.space 4

dlabel D_8010C988
.space 4

dlabel D_8010C98C
.space 4

dlabel D_8010C990
.space 4

dlabel D_8010C994
.space 0x0000000c

dlabel D_8010C9A0
.space 4

dlabel D_8010C9A4
.space 0x0000000c

dlabel D_8010C9B0
.space 4

dlabel D_8010C9B4
.space 0x0000000c

#endif
Loading