summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/battle_tower.h1
-rw-r--r--include/ewram.h1
-rw-r--r--include/field_specials.h1
-rw-r--r--include/global.berry.h2
-rw-r--r--include/global.h59
-rw-r--r--include/item.h21
-rw-r--r--include/link.h10
-rw-r--r--include/new_game.h2
-rw-r--r--include/overworld.h10
-rw-r--r--include/pokeblock.h1
-rw-r--r--include/rtc.h1
-rw-r--r--include/shop.h2
-rw-r--r--include/slot_machine.h71
-rw-r--r--include/start_menu.h2
14 files changed, 49 insertions, 135 deletions
diff --git a/include/battle_tower.h b/include/battle_tower.h
index a3e1ff28c..fe9d4ae6e 100644
--- a/include/battle_tower.h
+++ b/include/battle_tower.h
@@ -98,5 +98,6 @@ void SetEReaderTrainerName(u8*);
u8 GetEReaderTrainerPicIndex(void);
u8 GetEReaderTrainerClassNameIndex(void);
void ValidateEReaderTrainer(void);
+void SetEReaderTrainerChecksum(struct BattleTowerEReaderTrainer *ereaderTrainer);
#endif // GUARD_BATTLE_TOWER_H
diff --git a/include/ewram.h b/include/ewram.h
index cafb418fb..f1d9baa78 100644
--- a/include/ewram.h
+++ b/include/ewram.h
@@ -13,7 +13,6 @@ extern u8 gSharedMem[];
#define ewram0_2 (*(struct Struct2000000 *)(gSharedMem + 0x0))
#define namingScreenData (*(struct NamingScreenData *)(gSharedMem + 0x0))
#define ewramBerryPic (gSharedMem + 0x0)
-#define ewram0_3 (*(struct UnknownStruct3 *)(gSharedMem + 0x0))
#define ewram0_4 (*(struct Unk2000000 *)(gSharedMem + 0x0))
#define ewram0_5 (*(struct UnkStruct *)(gSharedMem + 0x0))
#define eMatsudaDebugVar (gSharedMem[0x0])
diff --git a/include/field_specials.h b/include/field_specials.h
index 52325879c..a8e8d3da7 100644
--- a/include/field_specials.h
+++ b/include/field_specials.h
@@ -26,5 +26,6 @@ void SetShoalItemFlag(u16);
u8 GetLeadMonIndex(void);
void ResetFanClub(void);
u8 sub_810FB10(u8 a0);
+void sub_810FEFC(void);
#endif // GUARD_FIELD_SPECIALS_H
diff --git a/include/global.berry.h b/include/global.berry.h
index 21a0dd500..8f185c8f9 100644
--- a/include/global.berry.h
+++ b/include/global.berry.h
@@ -3,7 +3,7 @@
struct Berry
{
- /*0x00*/ const u8 name[7];
+ /*0x00*/ u8 name[7];
/*0x07*/ u8 firmness;
/*0x08*/ u16 size;
/*0x0A*/ u8 maxYield;
diff --git a/include/global.h b/include/global.h
index 6dd772795..ec82d5d1d 100644
--- a/include/global.h
+++ b/include/global.h
@@ -734,46 +734,37 @@ struct Pokedex
struct BattleTowerTrainer
{
- u8 trainerClass;
- u8 name[8];
- u8 teamFlags;
- struct {
- u16 easyChat[6];
- } greeting;
+ /*0x00*/ u8 trainerClass;
+ /*0x01*/ u8 name[8];
+ /*0x09*/ u8 teamFlags;
+ u8 filler0A[2];
+ /*0x0C*/ u16 greeting[6];
};
struct BattleTowerRecord // record mixing
{
- /*0x00*/u8 battleTowerLevelType; // 0 = level 50, 1 = level 100
- /*0x01*/u8 trainerClass;
- /*0x02*/u16 winStreak;
- /*0x04*/u8 name[8];
- /*0x0C*/u8 trainerId[4];
- /*0x10*/struct {
- u16 easyChat[6];
- } greeting;
- /*0x1C*/struct UnknownPokemonStruct party[3];
- /*0xA0*/u32 checksum;
+ /*0x00*/ u8 battleTowerLevelType; // 0 = level 50, 1 = level 100
+ /*0x01*/ u8 trainerClass;
+ /*0x02*/ u16 winStreak;
+ /*0x04*/ u8 name[8];
+ /*0x0C*/ u8 trainerId[4];
+ /*0x10*/ u16 greeting[6];
+ /*0x1C*/ struct UnknownPokemonStruct party[3];
+ /*0xA0*/ u32 checksum;
};
struct BattleTowerEReaderTrainer
{
- /*0x00*/u8 unk0;
- /*0x01*/u8 trainerClass;
- /*0x02*/u16 winStreak;
- /*0x04*/u8 name[8];
- /*0x0C*/u8 trainerId[4];
- /*0x10*/struct {
- u16 easyChat[6];
- } greeting;
- /*0x1C*/struct {
- u16 easyChat[6];
- } farewellPlayerLost;
- /*0x28*/struct {
- u16 easyChat[6];
- } farewellPlayerWon;
- /*0x34*/struct UnknownPokemonStruct party[3];
- /*0xB8*/u32 checksum;
+ /*0x00*/ u8 unk0;
+ /*0x01*/ u8 trainerClass;
+ /*0x02*/ u16 winStreak;
+ /*0x04*/ u8 name[8];
+ /*0x0C*/ u8 trainerId[4];
+ /*0x10*/ u16 greeting[6];
+ /*0x1C*/ u16 farewellPlayerLost[6];
+ /*0x28*/ u16 farewellPlayerWon[6];
+ /*0x34*/ struct UnknownPokemonStruct party[3];
+ /*0xB8*/ u32 checksum;
};
struct BattleTowerData
@@ -831,7 +822,7 @@ struct MapPosition
{
s16 x;
s16 y;
- u8 height;
+ s8 height;
};
struct UnkStruct_8054FF8
@@ -850,8 +841,6 @@ struct HallOfFame
u8 filler[0x1F00];
};
-extern struct HallOfFame gHallOfFame;
extern struct SaveBlock2 gSaveBlock2;
-extern u8 ewram[];
#endif // GUARD_GLOBAL_H
diff --git a/include/item.h b/include/item.h
index bafa8a3fd..57aebf88e 100644
--- a/include/item.h
+++ b/include/item.h
@@ -1,27 +1,8 @@
#ifndef GUARD_ITEM_H
#define GUARD_ITEM_H
-
typedef void (*ItemUseFunc)(u8);
-struct Item
-{
- u8 name[14];
- u16 itemId;
- u16 price;
- u8 holdEffect;
- u8 holdEffectParam;
- const u8 *description;
- u8 importance;
- u8 unk19;
- u8 pocket;
- u8 type;
- ItemUseFunc fieldUseFunc;
- u8 battleUsage;
- ItemUseFunc battleUseFunc;
- u8 secondaryId;
-};
-
struct BagPocket
{
struct ItemSlot *itemSlots;
@@ -43,7 +24,7 @@ bool8 CheckPCHasItem(u16 itemId, u16 count);
bool8 AddPCItem(u16 itemId, u16 count);
void RemovePCItem(u8 index, u16 count);
void SwapRegisteredBike(void);
-const struct Item *ItemId_GetItem(u16 itemId);
+const u8 *ItemId_GetName(u16 itemId);
u16 ItemId_GetId(u16 itemId);
u16 ItemId_GetPrice(u16 itemId);
u8 ItemId_GetHoldEffect(u16 itemId);
diff --git a/include/link.h b/include/link.h
index 6a7212645..ca6c368ff 100644
--- a/include/link.h
+++ b/include/link.h
@@ -131,10 +131,11 @@ extern const struct BlockRequest sBlockRequestLookupTable[5];
extern struct Link gLink;
extern u16 gRecvCmds[CMD_LENGTH][MAX_LINK_PLAYERS];
+// TODO: Why is gBlockSendBuffer a u8 array, while gBlockRecvBuffer is a u16 array?
extern u8 gBlockSendBuffer[BLOCK_BUFFER_SIZE];
+extern u16 gBlockRecvBuffer[MAX_LINK_PLAYERS][BLOCK_BUFFER_SIZE / 2];
extern u16 gLinkType;
extern u32 gLinkStatus;
-extern u16 gBlockRecvBuffer[MAX_LINK_PLAYERS][BLOCK_BUFFER_SIZE / 2];
extern u16 gSendCmd[CMD_LENGTH];
extern u8 gShouldAdvanceLinkState;
#if GERMAN
@@ -145,6 +146,9 @@ extern struct LinkPlayer gLinkPlayers[];
extern u16 word_3002910[];
extern bool8 gReceivedRemoteLinkPlayers;
extern bool8 gLinkOpen;
+extern bool8 gLinkPlayerPending[MAX_LINK_PLAYERS];
+void (*gLinkCallback)(void);
+extern u8 gUnknown_Debug_30030E0;
void Task_DestroySelf(u8);
void sub_8007270(u8);
@@ -195,8 +199,10 @@ void LinkVSync(void);
void Timer3Intr(void);
void SerialCB(void);
void LinkTestScreen(void);
-void debug_sub_8008218(u16 *buffer, void *arg1, u16 (*arg2)[], u32 arg3);
+void debug_sub_8008218(u16 *buffer, u32 arg1, u16 *arg2, u32 arg3);
void debug_sub_8008264(u32 value, int left, int top, int r3, int sp0);
u32 sub_8007E40(void);
+void PrintHex(u32, u8, u8, u8);
+void InitLinkTestBG_Unused(u8, u8, u8, u8);
#endif // GUARD_LINK_H
diff --git a/include/new_game.h b/include/new_game.h
index 5be7f6265..c90606b5a 100644
--- a/include/new_game.h
+++ b/include/new_game.h
@@ -1,6 +1,8 @@
#ifndef GUARD_NEW_GAME_H
#define GUARD_NEW_GAME_H
+extern u8 gUnknown_020297ED;
+
void write_word_to_mem(u32 var, u8 *dataPtr);
void copy_word_to_mem(u8 *copyTo, u8 *copyFrom);
void InitPlayerTrainerId(void);
diff --git a/include/overworld.h b/include/overworld.h
index 50089593f..dc393cc63 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -24,6 +24,8 @@ struct UCoords32
extern const struct UCoords32 gUnknown_0821664C[];
extern void (*gFieldCallback)(void);
+extern u8 gFieldLinkPlayerCount;
+extern u8 gUnknown_03004860;
// sub_8052F5C
void Overworld_ResetStateAfterFly(void);
@@ -91,7 +93,7 @@ void sub_8053D14(u16);
// GetLocationMusic
// GetCurrLocationDefaultMusic
// GetWarpDestinationMusic
-// Overworld_ResetMapMusic
+void Overworld_ResetMapMusic(void);
void Overworld_PlaySpecialMapMusic(void);
void Overworld_SetSavedMusic(u16);
void Overworld_ClearSavedMusic(void);
@@ -185,11 +187,11 @@ u16 sub_8055438(u32);
// sub_80554B8
// sub_80554BC
// sub_80554E4
-// sub_80554F8
+s32 sub_80554F8(void);
// unref_sub_8055568
-// sub_8055574
+u16 sub_8055574(void);
u16 sub_8055588(void);
-// sub_805559C
+u16 sub_805559C(void);
void sub_80555B0(int linkPlayerId, int a2, struct UnkStruct_8054FF8 *a3);
bool32 sub_8055618(struct UnkStruct_8054FF8 *);
bool32 sub_8055630(struct UnkStruct_8054FF8 *);
diff --git a/include/pokeblock.h b/include/pokeblock.h
index cda598f6c..a606a32ad 100644
--- a/include/pokeblock.h
+++ b/include/pokeblock.h
@@ -42,6 +42,7 @@ s16 PokeblockGetGain(u8, const struct Pokeblock *);
u8 sub_810CB68(u8, u8*);
void PokeblockCopyName(struct Pokeblock *pokeblock, u8 *dest);
void CB2_PreparePokeblockFeedScene(void);
+bool8 sub_810CA34(const struct Pokeblock *);
#include "main.h"
diff --git a/include/rtc.h b/include/rtc.h
index fdc5ad709..e117cf753 100644
--- a/include/rtc.h
+++ b/include/rtc.h
@@ -44,5 +44,6 @@ void RtcInitLocalTimeOffset(s32 hour, s32 minute);
void RtcCalcLocalTimeOffset(s32 days, s32 hours, s32 minutes, s32 seconds);
void CalcTimeDifference(struct Time *result, struct Time *t1, struct Time *t2);
u32 RtcGetMinuteCount(void);
+void debug_sub_8009894(u8 *);
#endif // GUARD_RTC_UTIL_H
diff --git a/include/shop.h b/include/shop.h
index 80602e26c..347d46d3c 100644
--- a/include/shop.h
+++ b/include/shop.h
@@ -28,7 +28,7 @@ enum
struct MartInfo
{
/* 0x0 */ void (* callback) (void);
- /* 0x4 */ u16 *itemList;
+ /* 0x4 */ const u16 *itemList;
/* 0x8 */ u8 itemCount; // how many unique items are there for sale?
/* 0x9 */ u8 cursor; // this shows the on-screen true index of the cursor and not the current item selected.
/* 0xA */ u8 numChoices; // how many options does the mart have? can be either 2 or 1 (BUY/SELL vs BUY)
diff --git a/include/slot_machine.h b/include/slot_machine.h
index 7759ca1b2..456f2bed6 100644
--- a/include/slot_machine.h
+++ b/include/slot_machine.h
@@ -1,77 +1,6 @@
#ifndef GUARD_SLOT_MACHINE_H
#define GUARD_SLOT_MACHINE_H
-enum {
- SLOT_MACHINE_TAG_7_RED,
- SLOT_MACHINE_TAG_7_BLUE,
- SLOT_MACHINE_TAG_AZURILL,
- SLOT_MACHINE_TAG_LOTAD,
- SLOT_MACHINE_TAG_CHERRY,
- SLOT_MACHINE_TAG_POWER,
- SLOT_MACHINE_TAG_REPLAY
-};
-
-enum {
- SLOT_MACHINE_MATCHED_1CHERRY,
- SLOT_MACHINE_MATCHED_2CHERRY,
- SLOT_MACHINE_MATCHED_REPLAY,
- SLOT_MACHINE_MATCHED_LOTAD,
- SLOT_MACHINE_MATCHED_AZURILL,
- SLOT_MACHINE_MATCHED_POWER,
- SLOT_MACHINE_MATCHED_777_MIXED,
- SLOT_MACHINE_MATCHED_777_RED,
- SLOT_MACHINE_MATCHED_777_BLUE,
- SLOT_MACHINE_MATCHED_NONE
-};
-
-struct SlotMachineEwramStruct {
- /*0x00*/ u8 state;
- /*0x01*/ u8 unk01;
- /*0x02*/ u8 pikaPower;
- /*0x03*/ u8 unk03;
- /*0x04*/ u8 unk04;
- /*0x05*/ u8 unk05;
- /*0x06*/ u8 unk06;
- /*0x07*/ u8 unk07;
- /*0x08*/ u16 matchedSymbols;
- /*0x0A*/ u8 unk0A;
- /*0x0B*/ u8 unk0B;
- /*0x0C*/ s16 coins;
- /*0x0E*/ s16 payout;
- /*0x10*/ s16 unk10;
- /*0x12*/ s16 bet;
- /*0x14*/ s16 unk14;
- /*0x16*/ s16 unk16;
- /*0x18*/ s16 unk18;
- /*0x1A*/ s16 unk1A;
- /*0x1C*/ s16 unk1C[3];
- /*0x22*/ u16 unk22[3];
- /*0x28*/ s16 reelPositions[3];
- /*0x2E*/ s16 unk2E[3];
- /*0x34*/ s16 unk34[3];
- /*0x3A*/ u8 reelTasks[3];
- /*0x3D*/ u8 unk3D;
- /*0x3E*/ u8 unk3E;
- /*0x3F*/ u8 unk3F;
- /*0x40*/ u8 unk40;
- /*0x41*/ u8 unk41;
- /*0x42*/ u8 unk42;
- /*0x43*/ u8 unk43;
- /*0x44*/ u8 unk44[5];
- /*0x49*/ u8 unk49[2];
- /*0x49*/ u8 unk4B[3];
- /*0x4E*/ u8 unk4E[2];
- /*0x50*/ u8 unk50[2];
- /*0x52*/ u8 unk52[2];
- /*0x54*/ u8 unk54[4];
- /*0x58*/ u16 win0h;
- /*0x5a*/ u16 win0v;
- /*0x5c*/ u16 winIn;
- /*0x5e*/ u16 winOut;
- /*0x60*/ u16 backupMapMusic;
- /*0x64*/ MainCallback prevMainCb;
-};
-
void PlaySlotMachine(u8 arg0, MainCallback cb);
void sub_8104DA4(void);
u8 sub_8105BB4(u8 templateIdx, u8 cbAndCoordsIdx, s16 a2);
diff --git a/include/start_menu.h b/include/start_menu.h
index d3f77dc99..5e513b9dc 100644
--- a/include/start_menu.h
+++ b/include/start_menu.h
@@ -1,6 +1,8 @@
#ifndef GUARD_STARTER_CHOOSE_H
#define GUARD_STARTER_CHOOSE_H
+extern u8 (*gMenuCallback)(void);
+
//Public functions
void CreateStartMenuTask(void (*func)(u8));
void sub_80712B4(u8 taskId);