summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-10-31 09:19:33 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-10-31 09:19:33 -0400
commit2b0bcdcad9336defc82f50a329b12e631b1f33ce (patch)
tree05ae3de2bc0130040d48e800fe4e962f2a818aef
parenteff29ff7ae2e84fd8e9d92c8509c148912f4db20 (diff)
Resolve externed prototypes in C files
-rw-r--r--include/berry_powder.h1
-rw-r--r--include/item.h2
-rw-r--r--include/overworld.h2
-rw-r--r--include/quest_log.h1
-rw-r--r--include/save_failed_screen.h6
-rw-r--r--src/load_save.c11
-rw-r--r--src/save.c9
7 files changed, 18 insertions, 14 deletions
diff --git a/include/berry_powder.h b/include/berry_powder.h
index f0e77c44b..d944ae44d 100644
--- a/include/berry_powder.h
+++ b/include/berry_powder.h
@@ -3,5 +3,6 @@
u32 GetBerryPowder(void);
void SetBerryPowder(u32 *powder, u32 amount);
+void sub_815EE6C(u32 newKey);
#endif //GUARD_BERRY_POWDER_H
diff --git a/include/item.h b/include/item.h
index dd6271d13..ccc9cd3bb 100644
--- a/include/item.h
+++ b/include/item.h
@@ -72,10 +72,12 @@ u16 BagGetQuantityByPocketPosition(u8 pocketId, u16 itemId);
bool8 itemid_is_unique(u16 itemId);
void BagPocketCompaction(struct ItemSlot * slots, u8 capacity);
u16 GetPcItemQuantity(u16 *);
+void SetBagPocketsPointers(void);
void ItemPcCompaction(void);
void RemoveItemFromPC(u16 itemId, u16 quantity);
void SortAndCompactBagPocket(struct BagPocket * pocket);
u8 CountItemsInPC(void);
+void ApplyNewEncryptionKeyToBagItems_(u32 newKey);
#endif // GUARD_ITEM_H
diff --git a/include/overworld.h b/include/overworld.h
index 2e591a599..36c890eb5 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -143,5 +143,7 @@ bool32 sub_8058318(void);
void CB2_ReturnToStartMenu(void);
void CB2_WhiteOut(void);
void c2_8056854(void);
+void sub_8054F38(u32 newKey);
+void sub_8055778(int);
#endif //GUARD_OVERWORLD_H
diff --git a/include/quest_log.h b/include/quest_log.h
index 8165486ce..3f6c94de5 100644
--- a/include/quest_log.h
+++ b/include/quest_log.h
@@ -46,6 +46,7 @@ void sub_811231C(void);
void sub_81139BC(void);
void *QuestLogGetFlagOrVarPtr(bool8 isFlag, u16 idx);
void QuestLogSetFlagOrVar(bool8 isFlag, u16 idx, u16 value);
+void sub_8110840(void *oldSave);
extern u8 gUnknown_203ADFA;
diff --git a/include/save_failed_screen.h b/include/save_failed_screen.h
new file mode 100644
index 000000000..feffa2014
--- /dev/null
+++ b/include/save_failed_screen.h
@@ -0,0 +1,6 @@
+#ifndef GUARD_SAVE_FAILED_SCREEN_H
+#define GUARD_SAVE_FAILED_SCREEN_H
+
+extern void DoSaveFailedScreen(u8 saveType); // save_failed_screen
+
+#endif //GUARD_SAVE_FAILED_SCREEN_H
diff --git a/src/load_save.c b/src/load_save.c
index 583844d17..da469d4e6 100644
--- a/src/load_save.c
+++ b/src/load_save.c
@@ -7,13 +7,10 @@
#include "malloc.h"
#include "item.h"
#include "save_location.h"
-
-extern void SetBagPocketsPointers(void);
-extern void sub_8110840(void *oldSave);
-extern void sub_8055778(int);
-extern void sub_8054F38(u32 newKey);
-extern void ApplyNewEncryptionKeyToBagItems_(u32 newKey);
-extern void sub_815EE6C(u32 newKey);
+#include "berry_powder.h"
+#include "item.h"
+#include "overworld.h"
+#include "quest_log.h"
#define SAVEBLOCK_MOVE_RANGE 128
diff --git a/src/save.c b/src/save.c
index 30d2c22a9..57364b10b 100644
--- a/src/save.c
+++ b/src/save.c
@@ -6,6 +6,8 @@
#include "load_save.h"
#include "task.h"
#include "link.h"
+#include "save_failed_screen.h"
+#include "fieldmap.h"
#include "gba/flash_internal.h"
#define FILE_SIGNATURE 0x08012025 // signature value to determine if a sector is in use
@@ -66,13 +68,6 @@ const struct SaveSectionOffsets gSaveSectionOffsets[] =
SAVEBLOCK_CHUNK(struct PokemonStorage, 8)
};
-extern void DoSaveFailedScreen(u8 saveType); // save_failed_screen
-extern void sub_800AB9C(void); // link
-extern bool8 IsLinkTaskFinished(void); // link
-extern void save_serialize_map(void); // fieldmap
-extern void SetContinueGameWarpStatusToDynamicWarp(void); // load_save
-extern void ClearContinueGameWarpStatus2(void); // load_save
-
// Sector num to begin writing save data. Sectors are rotated each time the game is saved. (possibly to avoid wear on flash memory?)
u16 gFirstSaveSector;
u32 gPrevSaveCounter;