summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/intro.h1
-rw-r--r--include/link.h2
-rw-r--r--include/link_rfu.h2
-rw-r--r--include/load_save.h2
-rw-r--r--include/m4a.h1
-rw-r--r--include/overworld.h2
-rw-r--r--include/save_failed_screen.h2
-rw-r--r--include/text.h1
-rw-r--r--src/main.c57
9 files changed, 29 insertions, 41 deletions
diff --git a/include/intro.h b/include/intro.h
index f01c81a9e..19cdcd032 100644
--- a/include/intro.h
+++ b/include/intro.h
@@ -2,5 +2,6 @@
#define GUARD_INTRO_H
void sub_80EC864(void);
+void c2_copyright_1(void);
#endif //GUARD_INTRO_H
diff --git a/include/link.h b/include/link.h
index 9465f0404..d61152d8a 100644
--- a/include/link.h
+++ b/include/link.h
@@ -259,5 +259,7 @@ void sub_80FA42C(void);
void sub_800B284(struct LinkPlayer * linkPlayer);
bool8 IsWirelessAdapterConnected(void);
bool8 sub_800A474(u8 a0);
+void LinkVSync(void);
+bool8 HandleLinkConnection(void);
#endif // GUARD_LINK_H
diff --git a/include/link_rfu.h b/include/link_rfu.h
index d1bc2b2bc..033f4c8d4 100644
--- a/include/link_rfu.h
+++ b/include/link_rfu.h
@@ -46,6 +46,8 @@ void sub_80FBB20(void);
bool8 sub_80FA484(bool32 a0);
void var_800D_set_xB(void);
struct UnkLinkRfuStruct_02022B14 *sub_80F9800(void);
+void sub_80FCF34(void);
+void InitRFU(void);
#include "mevent_server.h"
extern const struct mevent_server_cmd gMEventSrvScript_OtherTrainerCanceled[];
diff --git a/include/load_save.h b/include/load_save.h
index 10d1083a8..20df691e5 100644
--- a/include/load_save.h
+++ b/include/load_save.h
@@ -4,6 +4,8 @@
#include "global.h"
extern bool32 gFlashMemoryPresent;
+extern struct SaveBlock1 gSaveBlock1;
+extern struct SaveBlock2 gSaveBlock2;
void ClearSav2(void);
void ClearSav1(void);
diff --git a/include/m4a.h b/include/m4a.h
index 2bb7f2124..ee23d917a 100644
--- a/include/m4a.h
+++ b/include/m4a.h
@@ -9,6 +9,7 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM;
extern struct MusicPlayerInfo gMPlayInfo_SE1;
extern struct MusicPlayerInfo gMPlayInfo_SE2;
extern struct MusicPlayerInfo gMPlayInfo_SE3;
+extern struct SoundInfo gSoundInfo;
void m4aSoundVSync(void);
void m4aSoundVSyncOn(void);
diff --git a/include/overworld.h b/include/overworld.h
index 324150779..69c1e964f 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -150,5 +150,7 @@ void sub_8055738(u8 loc);
void sub_8056078(void *, void *);
void sub_805546C(u8 a0);
+bool32 sub_80582E0(void);
+bool32 sub_8058274(void);
#endif //GUARD_OVERWORLD_H
diff --git a/include/save_failed_screen.h b/include/save_failed_screen.h
index feffa2014..5950430d2 100644
--- a/include/save_failed_screen.h
+++ b/include/save_failed_screen.h
@@ -2,5 +2,7 @@
#define GUARD_SAVE_FAILED_SCREEN_H
extern void DoSaveFailedScreen(u8 saveType); // save_failed_screen
+void sub_80F50F4(void);
+bool32 sub_80F5118(void);
#endif //GUARD_SAVE_FAILED_SCREEN_H
diff --git a/include/text.h b/include/text.h
index 578a0d735..a15b42c92 100644
--- a/include/text.h
+++ b/include/text.h
@@ -255,7 +255,6 @@ u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y);
u8 GetKeypadIconTileOffset(u8 keypadIconId);
u8 GetKeypadIconWidth(u8 keypadIconId);
u8 GetKeypadIconHeight(u8 keypadIconId);
-void SetDefaultFontsPointer(void);
u8 GetFontAttribute(u8 fontId, u8 attributeId);
u8 GetMenuCursorDimensionByFont(u8 fontId, u8 whichDimension);
void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese);
diff --git a/src/main.c b/src/main.c
index 60f762a62..5d2db95be 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,4 +1,9 @@
#include "global.h"
+#include "bg.h"
+#include "gpu_regs.h"
+#include "link.h"
+#include "link_rfu.h"
+#include "load_save.h"
#include "main.h"
#include "m4a.h"
#include "random.h"
@@ -6,48 +11,20 @@
#include "gba/flash_internal.h"
#include "battle.h"
#include "help_system.h"
+#include "sound.h"
+#include "new_menu_helpers.h"
+#include "malloc.h"
+#include "overworld.h"
+#include "sprite.h"
+#include "play_time.h"
+#include "pokemon.h"
+#include "intro.h"
+#include "battle_controllers.h"
+#include "scanline_effect.h"
+#include "save_failed_screen.h"
+#include "battle.h"
-extern u16 GetGpuReg(u8);
-extern void SetGpuReg(u8, u16);
-extern void RFUVSync(void);
-extern void LinkVSync(void);
-extern void sub_80FCF34(void);
-extern void LinkVSync(void);
-extern void InitGpuRegManager(void);
-extern void InitRFU(void);
-extern void CheckForFlashMemory(void);
-extern void InitMapMusic(void);
-extern void ResetBgs(void);
-extern void SetDefaultFontsPointer(void);
-extern void InitHeap(void *heapStart, u32 heapSize); // malloc.h
-extern void rfu_REQ_stopMode(void);
-extern void rfu_waitREQComplete(void);
-extern bool32 sub_80582E0(void);
-extern bool32 sub_8058274(void);
-extern void ClearSpriteCopyRequests(void);
-extern void PlayTimeCounter_Update(void);
-extern void MapMusicMain(void);
-extern void EnableInterrupts(u16);
-extern void sub_800DD28(void);
-extern u16 SetFlashTimerIntr(u8 timerNum, void (**intrFunc)(void));
-extern void ScanlineEffect_Stop(void);
-extern void sub_80F50F4(void);
-extern bool32 sub_80F5118(void);
-
-extern struct SoundInfo gSoundInfo;
-extern u32 gFlashMemoryPresent;
extern u32 intr_main[];
-extern u8 gHeap[];
-extern struct SaveBlock1 gSaveBlock1;
-extern struct SaveBlock2 gSaveBlock2;
-extern struct PokemonStorage gPokemonStorage;
-extern u32 gBattleTypeFlags;
-extern u8 gUnknown_03002748;
-extern u32 *gUnknown_0203CF5C;
-
-void Timer3Intr(void);
-bool8 HandleLinkConnection(void);
-void c2_copyright_1(void);
static void VBlankIntr(void);
static void HBlankIntr(void);