get rid of dungeon music externs

This commit is contained in:
DizzyEggg
2025-08-28 15:21:13 +02:00
parent 43776192e9
commit 1e0ca503e8
21 changed files with 31 additions and 51 deletions

View File

@@ -0,0 +1,6 @@
#ifndef GUARD_CLEARED_WINDOW_H
#define GUARD_CLEARED_WINDOW_H
void ShowDungeonClearedWindow(void);
#endif // GUARD_CLEARED_WINDOW_H

View File

@@ -1,17 +1,26 @@
#ifndef GUARD_DUNGEON_MUSIC_H
#define GUARD_DUNGEON_MUSIC_H
u16 DungeonGetCurrentBGSong(void);
void PlayDungeonCursorSE(bool8 checkMenuEntriesCount);
void PlayDungeonConfirmationSE(void);
void sub_8083D1C(void);
void PlayDungeonCancelSE(void);
void PlayDungeonStartButtonSE(void);
void sub_8083D58(void);
void sub_8083D68(void);
void sub_8083D78(void);
void sub_8083D88(void);
void PlayDungeonFailBGM(void);
void PlayDungeonCompleteBGM(void);
void sub_8083E28(void);
void PlaySoundEffect(u32 songIndex);
void StopSoundEffect(u32 songIndex);
bool8 IsFanfareSEPlaying_2(u16 songIndex);
void DungeonStartNewBGM(u16 songIndex);
void DungeonFadeInNewBGM(u16 songIndex, u32 fadeInSpeed);
void DungeonFadeOutBGM(u16 speed);
void DungeonStartNewBGM(u16 songIndex);
void DungeonStopBGM(void);
bool8 IsFanfareSEPlaying_2(u16 songIndex);
void PlayDungeonCursorSE(bool8 checkMenuEntriesCount);
void PlayDungeonStartButtonSE(void);
void PlaySoundEffect(u32 songIndex);
void StopDungeonBGM(void);
void StopSoundEffect(u32 songIndex);
void UpdateDungeonMusic(void);
#endif // GUARD_DUNGEON_MUSIC_H

View File

@@ -36,7 +36,6 @@
// Unknown dungeon file. File split is correct.
extern void PlaySoundEffect(u32);
void EntityUpdateStatusSprites(Entity *entity);

View File

@@ -24,12 +24,12 @@
#include "math.h"
#include "dungeon_config.h"
#include "dungeon_strings.h"
#include "dungeon_music.h"
#include "string_format.h"
extern u8 gUnknown_202EE70[MAX_TEAM_BODY_SIZE];
u8 sub_806B8CC();
void sub_8083D88();
u8 sub_808529C(s32);
void nullsub_96(Entity *pokemon,Entity *target);
u8 sub_8097900(s16);

View File

@@ -27,14 +27,13 @@
#include "structs/str_pokemon.h"
#include "structs/str_806B7F8.h"
#include "dungeon_pos_data.h"
#include "dungeon_music.h"
EWRAM_DATA s32 gUnknown_202F31C[2] = {0, 0};
EWRAM_DATA s32 gUnknown_202F324[2] = {0, 0};
extern void ResetMonEntityData(EntityInfo *, u32);
void sub_8042A44(Entity *r0);
void sub_8083D78(void);
void sub_8083D58(void);
void sub_8072778(Entity *, Entity *, u8, u8);
bool8 sub_80725A4(Entity *, Entity *);
void GetUnlockedTacticFlags(u8 *tacticsBuffer, s32 pokeLevel);

View File

@@ -61,11 +61,9 @@ extern void sub_808A718(void);
extern s32 sub_800E700(s32);
extern void sub_8085F44(s32);
extern void sub_8052FB8(const u8 *);
extern void PlaySoundEffect(u32);
extern void sub_8085EB0(void);
extern void sub_8086A54(Entity *);
extern void sub_8086A3C(Entity *);
extern void PlaySoundEffect(u32);
extern u32 sub_8002A70(u32, s32, u8);
extern s8 sub_8002984(s8, u8);

View File

@@ -35,6 +35,7 @@
#include "string_format.h"
#include "text_1.h"
#include "trap.h"
#include "dungeon_submenu.h"
extern void sub_80684C4(void);
void sub_8045064(void);
@@ -42,13 +43,8 @@ extern void sub_8068344(void);
bool8 CanSubMenuItemBeChosen(s32 param_1);
void sub_8068310(s32 n, Pokemon **monPtrs);
void sub_8067F00(u8 a0, Pokemon **a1, s32 a2, s32 a3, s32 a4);
void sub_8083D1C(void);
void PlayDungeonConfirmationSE(void);
void PlayDungeonCancelSE(void);
void sub_806806C(Pokemon *a0);
void CreateDungeonMenuSubWindow(WindowTemplates *a0, s32 a1);
extern const s32 gUnknown_8106E80[];
extern MenuInputStruct gDungeonMenu;
extern s32 gDungeonSubMenuItemsCount;
@@ -278,7 +274,7 @@ void sub_8067A80(u8 a0, s32 a1, s32 a2, Pokemon **a3)
}
sub_8045064();
CreateDungeonMenuSubWindow(&spTxtStruct, 0x15);
CreateDungeonMenuSubWindow(&spTxtStruct.id[0], 0x15);
while (1) {
AddMenuCursorSprite(&gDungeonMenu);

View File

@@ -1,5 +1,6 @@
#include "global.h"
#include "globaldata.h"
#include "dungeon_cleared_window.h"
#include "dungeon_info.h"
#include "dungeon_strings.h"
#include "dungeon_vram.h"
@@ -7,11 +8,8 @@
#include "text_1.h"
#include "run_dungeon.h"
#include "dungeon_run_end.h"
#include "dungeon_music.h"
extern void PlayDungeonCompleteBGM(void);
extern void PlayDungeonFailBGM(void);
extern void PlayDungeonConfirmationSE(void);
extern void UpdateDungeonMusic(void);
extern u8 sub_8094D14(void);
void ShowDungeonClearedWindow(void)

View File

@@ -31,7 +31,6 @@
extern void sub_80416E0(PixelPos *r0, u32, bool8);
extern void sub_80855E4(void *);
extern void PlaySoundEffect(u32);
extern void sub_804178C(u32);
extern void sub_804219C(PixelPos *pos);

View File

@@ -61,8 +61,6 @@
extern void HandleUnsetItemAction(Entity *,bool8);
extern Item *sub_8044D90(Entity *, s32, u32);
extern void PlayDungeonCancelSE(void);
extern void PlayDungeonConfirmationSE(void);
extern void sub_806A6E8(Entity *);
extern void TryTriggerTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4);
void TryPointCameraToMonster(Entity *a0, u8 a1);

View File

@@ -27,8 +27,6 @@
#include "dungeon_action.h"
#include "code_801B3C0.h"
extern void PlayDungeonCancelSE(void);
extern void PlayDungeonConfirmationSE(void);
extern void TryPointCameraToMonster(Entity *a0, u8 a1);
extern void SetLeaderActionToNothing(u8 a0);
extern Item *sub_8044D90(Entity *, s32, u32);

View File

@@ -28,8 +28,6 @@
#include "text_2.h"
#include "text_3.h"
extern void PlayDungeonCancelSE(void);
extern void PlayDungeonConfirmationSE(void);
extern u8 *GetDungeonSubMenuItemString(s32 param_1);
extern bool8 CanSubMenuItemBeChosen(s32 param_1);
extern void sub_8045064(void);
@@ -41,7 +39,6 @@ extern void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 a1);
extern void sub_8067768(ActionContainer *a0);
extern void TryPointCameraToMonster(Entity *a0, u8 a1);
extern bool8 sub_8071A8C(Entity *pokemon);
extern void sub_8083D1C(void);
extern s32 ActionToDungeonSubMenuId(u16 param_1);
extern s32 gDungeonSubMenuItemsCount;

View File

@@ -29,8 +29,6 @@
#include "text_3.h"
#include "run_dungeon.h"
extern void PlayDungeonCancelSE(void);
extern void PlayDungeonConfirmationSE(void);
extern bool8 CanSubMenuItemBeChosen(s32 param_1);
extern void sub_8045064(void);
extern bool8 IsBossFight(void);

View File

@@ -18,8 +18,6 @@
#include "text_2.h"
#include "text_3.h"
extern void PlayDungeonCancelSE(void);
extern void PlayDungeonConfirmationSE(void);
extern bool8 CanSubMenuItemBeChosen(s32 param_1);
extern u16 GetLeaderActionId(void);
extern u8 sub_806F9BC(s32);

View File

@@ -19,8 +19,6 @@
#include "text_1.h"
#include "text_3.h"
extern void PlayDungeonCancelSE(void);
extern void PlayDungeonConfirmationSE(void);
extern bool8 CanSubMenuItemBeChosen(s32 param_1);
extern void sub_8045064(void);
extern u8 GetFloorType(void);

View File

@@ -46,8 +46,6 @@
#include "weather.h"
extern Item *sub_8044D90(Entity *, s32, u32);
extern void PlayDungeonCancelSE(void);
extern void PlayDungeonConfirmationSE(void);
extern void sub_806A6E8(Entity *);
extern void TryTriggerTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4);
void TryPointCameraToMonster(Entity *a0, u8 a1);

View File

@@ -19,8 +19,6 @@
#include "text_3.h"
#include "trap.h"
extern void PlayDungeonCancelSE(void);
extern void PlayDungeonConfirmationSE(void);
extern bool8 CanSubMenuItemBeChosen(s32 param_1);
extern void sub_8045064(void);

View File

@@ -33,9 +33,6 @@ static bool8 sub_8052DC0(Entity *);
static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2);
extern void sub_805E804(void);
extern void sub_8083E28(void);
extern void PlayDungeonCancelSE(void);
extern void PlayDungeonConfirmationSE(void);
extern u8 gUnknown_202EE01;

View File

@@ -17,10 +17,7 @@
#define MESSAGE_LOG_ROW_COUNT 8 // How many log messages are shown
extern void sub_805E804(void);
extern void sub_8083E28(void);
extern u32 GetTouchScreenArrowPress(s32 a0, const void *a1);
extern void PlayDungeonCancelSE(void);
extern void PlayDungeonConfirmationSE(void);
static void PutStringsOnMessageLog(void);

View File

@@ -1,10 +1,10 @@
#include "global.h"
#include "globaldata.h"
#include "dungeon_music.h"
#include "constants/bg_music.h"
#include "structs/menu.h"
#include "music_util.h"
#include "dungeon_info.h"
#include "dungeon_music.h"
#include "music.h"
#include "run_dungeon.h"
@@ -128,7 +128,7 @@ void DungeonStopBGM(void)
StopBGMusic();
}
u16 DungeonGetCurrentBGSong(void)
UNUSED static u16 DungeonGetCurrentBGSong(void)
{
return GetCurrentBGSong();
}

View File

@@ -52,6 +52,7 @@
#include "dungeon_data.h"
#include "dungeon_jobs.h"
#include "dungeon_tilemap.h"
#include "dungeon_cleared_window.h"
EWRAM_INIT struct UnkStruct_203B414 *gUnknown_203B414 = NULL;
EWRAM_INIT Dungeon *gDungeon = NULL;
@@ -64,7 +65,6 @@ extern void sub_804513C(void);
extern void sub_8068F28(void);
extern void sub_806C1D8(void);
extern void IncrementThievingSuccesses(void);
extern void ShowDungeonClearedWindow(void);
extern void sub_8086130(void);
extern void sub_80847D4(void);
extern void sub_8043D60(void);
@@ -74,7 +74,6 @@ extern void IncrementAdventureFloorsExplored(void);
extern void sub_806AB2C(void);
extern void DisplayPreFightDialogue(void);
extern void EnemyEvolution(Entity *);
extern void sub_8083D68(void);
extern void UpdateMinimap(void);
extern void sub_807E5AC(void);
extern void TryActivateArtificialWeatherAbilities(void);