Skip to content

Commit

Permalink
clear printers on boss warps
Browse files Browse the repository at this point in the history
  • Loading branch information
JCog committed Sep 25, 2024
1 parent 68f07e4 commit 91093b3
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-patches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
xdelta3 -e -S none -s base-jp.z64 fp-jp.z64 fp-jp.xdelta
xdelta3 -e -S none -s base-us.z64 fp-us.z64 fp-us.xdelta
- name: Upload JP patch
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4
with:
name: fp-jp.xdelta
path: fp-jp.xdelta
Expand Down
1 change: 1 addition & 0 deletions lib/libpm-jp.a
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ pm_disable_player_input = 0x800E0158;
pm_is_ability_active = 0x800E9CE8;
pm_hidePopupMenu = 0x800F1340;
pm_destroyPopupMenu = 0x800F14C8;
pm_clear_printers = 0x80128884;
pm_set_screen_overlay_alpha = 0x8013D184;
pm_setMapTransitionEffect = 0x8013D350;
pm_updateExitMapScreenOverlay = 0x8013D35C;
Expand Down
1 change: 1 addition & 0 deletions lib/libpm-us.a
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ pm_disable_player_input = 0x800E0178;
pm_is_ability_active = 0x800E9D48;
pm_hidePopupMenu = 0x800F13B0;
pm_destroyPopupMenu = 0x800F1538;
pm_clear_printers = 0x80123674;
pm_set_screen_overlay_alpha = 0x801380D4;
pm_setMapTransitionEffect = 0x801382A0;
pm_updateExitMapScreenOverlay = 0x801382AC;
Expand Down
2 changes: 1 addition & 1 deletion src/fp.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ void fpUpdate(void) {
}

fpUpdateWarps();
battleUpdateWarps();
bossesUpdateWarps();

// Override updateMode so update_cameras switch always defaults
if (fp.freeCam) {
Expand Down
11 changes: 4 additions & 7 deletions src/fp/warps/bosses.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,8 @@ static BattlePage *pageList[] = {&pageBowser, &pageChapterBosses, &pageJrT

pm_Npc bossesDummyNpc = {0};

static pm_Enemy dummyEnemy = {
.npcID = BOSSES_DUMMY_ID,
};

static pm_Encounter dummyEncounter = {.enemy[0] = &dummyEnemy, .count = 0, .battle = 0, .stage = 0};

static pm_Enemy dummyEnemy = {.npcID = BOSSES_DUMMY_ID};
static pm_Encounter dummyEncounter = {.enemy[0] = &dummyEnemy};
static s8 warpCountdown = 0;
static bool leavingBattle = FALSE;
static u8 page = 0;
Expand Down Expand Up @@ -140,6 +136,7 @@ static void bossWarpProc(struct MenuItem *item, void *data) {
page = (u8)((s32)data >> 8);
battle = (u8)((s32)data & 0xFF);
pm_clearWindows();
pm_clear_printers();
// isBattle is also true when paused, so checking game mode
if (pm_gGameStatus.isBattle && pm_gameMode != 10 && pm_gameMode != 11) {
// end battle cleanly so next fight can start fresh
Expand All @@ -152,7 +149,7 @@ static void bossWarpProc(struct MenuItem *item, void *data) {
bossWarp();
}

void battleUpdateWarps() {
void bossesUpdateWarps() {
if (leavingBattle && !pm_gGameStatus.isBattle) {
leavingBattle = FALSE;
bossWarp();
Expand Down
2 changes: 1 addition & 1 deletion src/fp/warps/bosses.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

extern pm_Npc bossesDummyNpc;

void battleUpdateWarps(void);
void bossesUpdateWarps(void);

void createBossesMenu(struct Menu *menu);

Expand Down
1 change: 1 addition & 0 deletions src/pm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,7 @@ void pm_disable_player_input(void);
s32 pm_is_ability_active(s32 arg0);
void pm_hidePopupMenu(void);
void pm_destroyPopupMenu(void);
void pm_clear_printers(void);
void pm_set_screen_overlay_alpha(s32 idx, f32 alpha);
s32 pm_setMapTransitionEffect(s32 transition);
s32 pm_updateExitMapScreenOverlay(s16 *progress);
Expand Down

0 comments on commit 91093b3

Please sign in to comment.