summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-05-15 16:59:55 -0700
committerGitHub <noreply@github.com>2021-05-15 18:59:55 -0500
commitf402e46cd3c8b7236673d6edbae77903a7cc0618 (patch)
tree37a19f3ab35a73c29d4d6da565741beaf7bb547f /include
parentf65dee5a143bd543c74c010d7252eb76893ee243 (diff)
Sese's April/May Dump (#37)
* splitting lots of pokemon square and labeling lots of other things * actually commit this stuff * more moving data and things * more screen work * split out some pokemon dungeon data * lots of data work * push more data work * split kecleon, decomp another kanghaskhan func, and try to doc UpdateBGControl more * lots of item work * label more item things * subtype -> category and doc types/category
Diffstat (limited to 'include')
-rw-r--r--include/constants/bg_music.h5
-rw-r--r--include/debug_menu.h15
-rw-r--r--include/felicity_bank.h37
-rw-r--r--include/gUnknown_203B460.h28
-rw-r--r--include/gba/defines.h8
-rw-r--r--include/gba/io_reg.h2
-rw-r--r--include/gba/m4a_internal.h140
-rw-r--r--include/input.h23
-rw-r--r--include/item.h58
-rw-r--r--include/kangaskhan_storage.h41
-rw-r--r--include/kecleon_items.h43
-rw-r--r--include/main_menu.h1
-rw-r--r--include/menu.h10
-rw-r--r--include/pokemon.h17
-rw-r--r--include/save.h16
-rw-r--r--include/text.h1
-rw-r--r--include/trade_items_menu.h10
17 files changed, 371 insertions, 84 deletions
diff --git a/include/constants/bg_music.h b/include/constants/bg_music.h
index df4c318..a51e244 100644
--- a/include/constants/bg_music.h
+++ b/include/constants/bg_music.h
@@ -1,6 +1,7 @@
#ifndef GUARD_BG_MUSIC_H
#define GUARD_BG_MUSIC_H
+#define MUS_TEAM_BASE 1
#define MUS_POKEMON_SQUARE 7
#define MUS_LOADING_SCREEN 8
#define MUS_THERES_TROUBLE 10
@@ -9,6 +10,10 @@
#define MUS_WORLD_CALAMITY 19
#define MUS_INTRO 40
#define MUS_TITLE_SCREEN 43
+#define MUS_CREDITS 44
+#define MUS_EPILOGUE 45
+#define MUS_DUNGEON_FAIL 51
+#define MUS_DUNGEON_COMPLETE 52
#define NUM_BG_SONGS 128
diff --git a/include/debug_menu.h b/include/debug_menu.h
index 7ca58f7..c70712f 100644
--- a/include/debug_menu.h
+++ b/include/debug_menu.h
@@ -13,6 +13,21 @@ enum DebugMenuOptions
MENU_DEBUG_MENU_H_OPEN = 9,
};
+struct unkData
+{
+ u8 unk0[24];
+};
+
+
+struct DebugMenu
+{
+ // size: 0x1A4
+ u8 fill0[0x140];
+ /* 0x140 */ struct unkData unk140[4];
+ u32 fill1A0;
+};
+
+
void CreateDebugMenu(void);
void DeleteDebugMenu(void);
u32 UpdateDebugMenu(void);
diff --git a/include/felicity_bank.h b/include/felicity_bank.h
new file mode 100644
index 0000000..a224ffd
--- /dev/null
+++ b/include/felicity_bank.h
@@ -0,0 +1,37 @@
+#ifndef FELICITY_BANK_H
+#define FELICITY_BANK_H
+
+#include "file_system.h"
+
+struct unkData
+{
+ u8 unk0[24];
+};
+
+struct unkStruct_203B204
+{
+ // size: 0x108
+ u32 unk0;
+ s32 currState;
+ u32 unk8;
+ u32 chosenAmount;
+ u32 unk10;
+ u8 fill14[0x64 - 0x14];
+ u32 unk64;
+ u8 fill68[0x78 - 0x68];
+ u32 unk78;
+ u8 fill7C[0x94 - 0x7C];
+ /* 0x94 */ struct OpenedFile *faceFile;
+ /* 0x98 */ u8 *faceData;
+ u16 unk9C;
+ u16 unk9E;
+ u8 unkA0;
+ u8 unkA1;
+ u8 unkA2;
+ u8 unkA3;
+ struct OpenedFile **unkA4;
+ struct unkData unkA8[4];
+};
+
+
+#endif
diff --git a/include/gUnknown_203B460.h b/include/gUnknown_203B460.h
new file mode 100644
index 0000000..bab85d8
--- /dev/null
+++ b/include/gUnknown_203B460.h
@@ -0,0 +1,28 @@
+#ifndef GUNKNOWN_203B460_H
+#define GUNKNOWN_203B460_H
+
+struct ItemStruct_203B460
+{
+ u8 unk0;
+ u8 numItems;
+ u8 itemIndex;
+};
+
+struct subStruct_203B460
+{
+ u8 unk0;
+ u8 unk1;
+};
+
+struct unkStruct_203B460
+{
+ struct ItemStruct_203B460 fill0[20];
+ u16 unk50[0x10];
+ u8 fill70[0x230 - 0x70];
+ struct subStruct_203B460 unk230[8];
+ struct subStruct_203B460 unk250[4]; // TODO: idk if this is identical struct or not.. Ghidra says sizes are same
+ /* 0x260 */ s32 teamMoney;
+ /* 0x264 */ u32 teamSavings;
+};
+
+#endif
diff --git a/include/gba/defines.h b/include/gba/defines.h
index 5f0123a..3dc76f6 100644
--- a/include/gba/defines.h
+++ b/include/gba/defines.h
@@ -31,8 +31,10 @@
#define BG_VRAM VRAM
#define BG_VRAM_SIZE 0x10000
-#define BG_CHAR_ADDR(n) (void *)(BG_VRAM + (0x4000 * (n)))
-#define BG_SCREEN_ADDR(n) (void *)(BG_VRAM + (0x800 * (n)))
+#define BG_CHAR_SIZE 0x4000
+#define BG_SCREEN_SIZE 0x800
+#define BG_CHAR_ADDR(n) (void *)(BG_VRAM + (BG_CHAR_SIZE * (n)))
+#define BG_SCREEN_ADDR(n) (void *)(BG_VRAM + (BG_SCREEN_SIZE * (n)))
#define BG_TILE_ADDR(n) (void *)(BG_VRAM + (0x80 * (n)))
// text-mode BG
@@ -61,4 +63,4 @@
#define WIN_RANGE(a, b) (((a) << 8) | (b))
-#endif // GUARD_GBA_DEFINES \ No newline at end of file
+#endif // GUARD_GBA_DEFINES
diff --git a/include/gba/io_reg.h b/include/gba/io_reg.h
index e50b580..93ee23f 100644
--- a/include/gba/io_reg.h
+++ b/include/gba/io_reg.h
@@ -698,7 +698,7 @@
#define KEY_INTR_ENABLE 0x0400
#define KEY_OR_INTR 0x0000
#define KEY_AND_INTR 0x8000
-#define DPAD_ANY 0x00F0
+#define DPAD_ANY ((DPAD_RIGHT | DPAD_LEFT | DPAD_UP | DPAD_DOWN)) // 0xF0
#define JOY_EXCL_DPAD 0x030F
// interrupt flags
diff --git a/include/gba/m4a_internal.h b/include/gba/m4a_internal.h
index b241eb3..d03d1a5 100644
--- a/include/gba/m4a_internal.h
+++ b/include/gba/m4a_internal.h
@@ -69,50 +69,50 @@ struct ToneData
struct CgbChannel
{
- u8 sf;
- u8 ty;
+ u8 statusFlags;
+ u8 type;
u8 rightVolume;
u8 leftVolume;
- u8 at;
- u8 de;
- u8 su;
- u8 re;
- u8 ky;
- u8 ev;
- u8 eg;
- u8 ec;
+ u8 attack;
+ u8 decay;
+ u8 sustain;
+ u8 release;
+ u8 key;
+ u8 envelopeVolume;
+ u8 envelopeGoal;
+ u8 envelopeCounter;
u8 echoVolume;
u8 echoLength;
- u8 d1;
- u8 d2;
- u8 gt;
- u8 mk;
- u8 ve;
- u8 pr;
- u8 rp;
- u8 d3[3];
- u8 d5;
- u8 sg;
- u8 n4;
+ u8 dummy1;
+ u8 dummy2;
+ u8 gateTime;
+ u8 midiKey;
+ u8 velocity;
+ u8 priority;
+ u8 rhythmPan;
+ u8 dummy3[3];
+ u8 dummy5;
+ u8 sustainGoal;
+ u8 n4; // NR[1-4]4 register (initial, length bit)
u8 pan;
u8 panMask;
- u8 mo;
- u8 le;
- u8 sw;
- u32 fr;
- u32* wp;
- u32 cp;
- u32 tp;
- u32 pp;
- u32 np;
- u8 d4[8];
+ u8 modify;
+ u8 length;
+ u8 sweep;
+ u32 frequency;
+ u32 *wavePointer; // instructs CgbMain to load targeted wave
+ u32 *currentPointer; // stores the currently loaded wave
+ struct MusicPlayerTrack *track;
+ void *prevChannelPointer;
+ void *nextChannelPointer;
+ u8 dummy4[8];
};
struct MusicPlayerTrack;
struct SoundChannel
{
- u8 status;
+ u8 statusFlags;
u8 type;
u8 rightVolume;
u8 leftVolume;
@@ -120,28 +120,28 @@ struct SoundChannel
u8 decay;
u8 sustain;
u8 release;
- u8 ky;
- u8 ev;
- u8 er;
- u8 el;
+ u8 key; // midi key as it was translated into final pitch
+ u8 envelopeVolume;
+ u8 envelopeVolumeRight;
+ u8 envelopeVolumeLeft;
u8 echoVolume;
u8 echoLength;
- u8 d1;
- u8 d2;
- u8 gt;
- u8 mk;
- u8 ve;
- u8 pr;
- u8 rp;
+ u8 dummy1;
+ u8 dummy2;
+ u8 gateTime;
+ u8 midiKey; // midi key as it was used in the track data
+ u8 velocity;
+ u8 priority;
+ u8 rhythmPan;
u8 d3[3];
- u32 ct;
+ u32 count;
u32 fw;
- u32 freq;
+ u32 frequency;
struct WaveData *wav;
- u32 cp;
+ s8 *currentPointer;
struct MusicPlayerTrack *track;
- u32 pp;
- u32 np;
+ void *prevChannelPointer;
+ void *nextChannelPointer;
u32 d4;
u16 xpi;
u16 xpc;
@@ -151,6 +151,16 @@ struct SoundChannel
#define PCM_DMA_BUF_SIZE 1584 // size of Direct Sound buffer
+struct MusicPlayerInfo;
+
+typedef void (*MPlayFunc)();
+typedef void (*PlyNoteFunc)(u32, struct MusicPlayerInfo *, struct MusicPlayerTrack *);
+typedef void (*CgbSoundFunc)(void);
+typedef void (*CgbOscOffFunc)(u8);
+typedef u32 (*MidiKeyToCgbFreqFunc)(u8, u8, u8);
+typedef void (*ExtVolPitFunc)(void);
+typedef void (*MPlayMainFunc)(struct MusicPlayerInfo *);
+
struct SoundInfo
{
// This field is normally equal to ID_NUMBER but it is set to other
@@ -168,7 +178,7 @@ struct SoundInfo
u8 freq;
u8 mode;
- u8 c15;
+ u8 c15; // periodically counts from 14 down to 0 (15 states)
u8 pcmDmaPeriod; // number of V-blanks per PCM DMA
u8 maxLines;
u8 gap[3];
@@ -176,14 +186,14 @@ struct SoundInfo
s32 pcmFreq;
s32 divFreq;
struct CgbChannel *cgbChans;
- u32 func;
- u32 intp;
- void (*CgbSound)(void);
- void (*CgbOscOff)(u8);
- u32 (*MidiKeyToCgbFreq)(u8, u8, u8);
- u32 MPlayJumpTable;
- u32 plynote;
- u32 ExtVolPit;
+ MPlayMainFunc MPlayMainHead;
+ struct MusicPlayerInfo *musicPlayerHead;
+ CgbSoundFunc CgbSound;
+ CgbOscOffFunc CgbOscOff;
+ MidiKeyToCgbFreqFunc MidiKeyToCgbFreq;
+ MPlayFunc *MPlayJumpTable;
+ PlyNoteFunc plynote;
+ ExtVolPitFunc ExtVolPit;
u8 gap2[16];
struct SoundChannel chans[MAX_DIRECTSOUND_CHANNELS];
s8 pcmBuffer[PCM_DMA_BUF_SIZE * 2];
@@ -270,8 +280,8 @@ struct MusicPlayerTrack
u8 lfoDelay;
u8 lfoDelayC;
u8 priority;
- u8 echoVolume;
- u8 echoLength;
+ u8 pseudoEchoVolume;
+ u8 pseudoEchoLength;
struct SoundChannel *chan;
struct ToneData tone;
u8 gap[10];
@@ -312,8 +322,8 @@ struct MusicPlayerInfo
struct MusicPlayerTrack *tracks;
struct ToneData *tone;
u32 ident;
- u32 func;
- u32 intp;
+ MPlayMainFunc MPlayMainNext;
+ struct MusicPlayerInfo *musicPlayerNext;
};
struct MusicPlayer
@@ -351,7 +361,7 @@ extern struct MusicPlayerTrack gPokemonCryTracks[];
extern char SoundMainRAM[];
-extern void *gMPlayJumpTable[];
+extern MPlayFunc gMPlayJumpTable[];
typedef void (*XcmdFunc)(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
extern const XcmdFunc gXcmdTable[];
@@ -380,7 +390,7 @@ u32 umul3232H32(u32 multiplier, u32 multiplicand);
void SoundMain(void);
void SoundMainBTM(void);
void TrackStop(struct MusicPlayerInfo *mplayInfo, struct MusicPlayerTrack *track);
-void MPlayMain(void);
+void MPlayMain(struct MusicPlayerInfo *);
void RealClearChain(void *x);
void MPlayContinue(struct MusicPlayerInfo *mplayInfo);
@@ -399,7 +409,7 @@ void CgbSound(void);
void CgbOscOff(u8);
u32 MidiKeyToCgbFreq(u8, u8, u8);
void DummyFunc(void);
-void MPlayJumpTableCopy(void **mplayJumpTable);
+void MPlayJumpTableCopy(MPlayFunc *mplayJumpTable);
void SampleFreqSet(u32 freq);
void m4aSoundVSyncOn(void);
void m4aSoundVSyncOff(void);
@@ -443,7 +453,7 @@ void ply_tune(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
void ply_port(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
void ply_xcmd(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
void ply_endtie(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
-void ply_note(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
+void ply_note(u32 note_cmd, struct MusicPlayerInfo *, struct MusicPlayerTrack *);
// extended sound command handler functions
void ply_xxx(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
diff --git a/include/input.h b/include/input.h
index 9c93128..89b6039 100644
--- a/include/input.h
+++ b/include/input.h
@@ -46,6 +46,29 @@ struct UnusedInputStruct
/* 0x2A..0x2B - padding */
};
+struct UnkInputStruct
+{
+ /* 0x0 */ u8 unk0;
+ /* 0x1 */ u8 unk1;
+ /* 0x2 */ u8 unk2;
+ /* 0x3 */ u8 unk3;
+ /* 0x4 */ u8 unk4;
+ /* 0x5 */ u32 unk5;
+ /* 0x9 */ u32 unk9;
+ /* 0xD */ u32 unkD;
+ /* 0x12 */ u32 unk11;
+ /* 0x16 */ u32 unk15;
+ /* 0x1A */ u32 unk19;
+ /* 0x1E */ u32 unk1D;
+ /* 0x24 */ u32 unk24;
+ /* 0x28 */ u8 unk28;
+ /* 0x29 */ u8 a_button;
+ /* 0x2A */ u8 b_button;
+ /* 0x2B */ u8 dpad_right;
+ /* 0x2C */ u8 dpad_left;
+};
+
+
void InitInput(void);
void LoadBufferedInputs(void);
u8 sub_80048B8(void);
diff --git a/include/item.h b/include/item.h
new file mode 100644
index 0000000..060b750
--- /dev/null
+++ b/include/item.h
@@ -0,0 +1,58 @@
+#ifndef ITEMS_H
+#define ITEMS_H
+
+struct Item
+{
+ /* 0x0 */ u8 *namePointer;
+ /* 0x4 */ u32 buyPrice;
+ /* 0x8 */ u32 sellPrice;
+ /* 0xC */ u8 type;
+ /* 0xD */ u8 icon;
+ /* 0xE */ u16 fill;
+ /* 0x10 */ u8 *descriptionPointer;
+ /* 0x14 */ bool8 unkFood1[2];
+ /* 0x16 */ u8 throwDmg;
+ /* 0x17 */ u8 fill2;
+ /* 0x18 */ s16 move;
+ /* 0x1A */ u8 order; // Numbered order they are in storage
+ /* 0x1B */ u8 unkThrow1B[2];
+ /* 0x1D */ u8 palette;
+ /* 0x1E */ u8 category;
+ /* 0x1F */ u8 fill3;
+};
+
+enum ItemType
+{
+ ITEM_TYPE_THROWABLE,
+ ITEM_TYPE_ROCK,
+ ITEM_TYPE_BERRY_SEED,
+ ITEM_TYPE_APPLE_GUMMI,
+ ITEM_TYPE_HOLD_ITEM,
+ ITEM_TYPE_TM,
+ ITEM_TYPE_MONEY,
+ ITEM_TYPE_UNUSED,
+ ITEM_TYPE_MISC,
+ ITEM_TYPE_ORB,
+ ITEM_TYPE_LINK_BOX,
+ ITEM_TYPE_USED_TM
+};
+
+enum ItemCategory
+{
+ ITEM_CATEGORY_NOTHING,
+ ITEM_CATEGORY_THROWABLE,
+ ITEM_CATEGORY_ROCKS,
+ ITEM_CATEGORY_RIBBONS,
+ ITEM_CATEGORY_FOOD,
+ ITEM_CATEGORY_HEALING,
+ ITEM_CATEGORY_CHESTNUT,
+ ITEM_CATEGORY_MONEY_WISH_STONE,
+ ITEM_CATEGORY_MISC,
+ ITEM_CATEGORY_TM,
+ ITEM_CATEGORY_LINK_BOX,
+ ITEM_CATEGORY_SPECS,
+ ITEM_CATEGORY_SCARFS,
+ ITEM_CATEGORY_ORBS
+};
+
+#endif
diff --git a/include/kangaskhan_storage.h b/include/kangaskhan_storage.h
new file mode 100644
index 0000000..0d7ac52
--- /dev/null
+++ b/include/kangaskhan_storage.h
@@ -0,0 +1,41 @@
+#ifndef KANGASKHAN_STORAGE_H
+#define KANGASKHAN_STORAGE_H
+
+struct unkData
+{
+ u8 unk0[20];
+ u8 *array;
+};
+
+struct unkStruct_203B208
+{
+ // size: 0x14C
+ u32 unk0;
+ u32 currState;
+ u32 unk8;
+ u32 unkC;
+ u32 unk10;
+ u32 unk14;
+ u32 unk18;
+ u32 unk1C;
+ u32 unk20;
+ u8 fill24[0x58 - 0x24];
+ u32 unk58;
+ u8 unk5C[0xA8 - 0x5C];
+ u32 unkA8;
+ u8 unkAC[0xBC - 0xAC];
+ u32 unkBC;
+ u8 unkC0[0xD8 - 0xC0];
+ struct OpenedFile *faceFile;
+ u8 *faceData;
+ u16 unkE0;
+ u16 unkE2;
+ u8 unkE4;
+ u8 unkE5;
+ u8 unkE6;
+ u8 unkE7;
+ struct OpenedFile **unkE8;
+ struct unkData unkEC[4];
+};
+
+#endif
diff --git a/include/kecleon_items.h b/include/kecleon_items.h
new file mode 100644
index 0000000..f9added
--- /dev/null
+++ b/include/kecleon_items.h
@@ -0,0 +1,43 @@
+#ifndef KECLEON_ITEMS_H
+#define KECLEON_ITEMS_H
+
+#include "gUnknown_203B460.h"
+
+struct unkData
+{
+ u8 unk0[24];
+};
+
+struct unkStruct_203B210
+{
+ // size: 0x148
+ u32 unk0;
+ u8 unk4;
+ u8 fill5[3];
+ u32 currState;
+ u32 unkC;
+ s32 unk10;
+ u32 unk14;
+ u32 unk18;
+ struct ItemStruct_203B460 unk1C;
+ u32 unk20;
+ u32 unk24;
+ u32 unk28;
+ u32 unk2C;
+ u32 unk30;
+ u8 fill34[0x84 - 0x34];
+ u32 unk84;
+ u8 fill88[0xD4 - 0x88];
+ struct OpenedFile *unkD4;
+ u8 *unkD8;
+ u16 unkDC;
+ u16 unkDE;
+ u8 unkE0;
+ u8 unkE1;
+ u8 unkE2;
+ u8 unkE3;
+ struct OpenedFile **unkE4;
+ struct unkData unkE8[4];
+};
+
+#endif
diff --git a/include/main_menu.h b/include/main_menu.h
index db92f83..8a0b22d 100644
--- a/include/main_menu.h
+++ b/include/main_menu.h
@@ -8,6 +8,7 @@ enum MainMenuScreens
MENU_AWAITING_RESCUE = 6,
MENU_CONTINUE = 7,
MENU_DELETE_SAVE_PROMPT,
+ MENU_DELETE_SAVE_CONFIRM,
MENU_ADVENTURE_LOG = 10,
MENU_FRIEND_RESCUE,
MENU_TRADE_ITEMS,
diff --git a/include/menu.h b/include/menu.h
new file mode 100644
index 0000000..dbaeea6
--- /dev/null
+++ b/include/menu.h
@@ -0,0 +1,10 @@
+#ifndef MENU_H
+#define MENU_H
+
+struct MenuItem
+{
+ const char *text;
+ u32 menuAction; // action??
+};
+
+#endif
diff --git a/include/pokemon.h b/include/pokemon.h
index df87594..8014015 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -55,14 +55,19 @@ struct gPokemon
/* 0x33 */ bool8 unk33;
/* 0x34 */ struct EvolveStruct1 pre;
/* 0x38 */ struct EvolveNeeds need;
- /* 0x3C */ s16 unk3C[2]; // dexNo and internalNo
+ /* 0x3C */ s16 dexInternal[2]; // dexNo and internalNo
/* 0x40 */ s16 base_recruit;
- /* 0x42 */ s16 unk42[2]; // alphabetNo and parentNo
+ /* 0x42 */ s16 alphabetParent[2]; // alphabetNo and parentNo
};
+void CopySpeciesNametoBuffer(u8 * buffer, s16 index);
+void CopyYellowSpeciesNametoBuffer(u8 *buffer, s16 index);
+void CopyCyanSpeciesNametoBuffer(u8 *buffer, s16 index);
+
u8 *GetCategoryString(s16 index);
u8 GetPokemonSize(s16 index);
u8 GetShadowSize(s16 index);
+char * GetMonSpecies(s16 index);
s32 GetMoveSpeed(s16 index);
u8 GetWalkableTiles(s16 index);
u8 GetUnk1B(s16 index);
@@ -79,12 +84,12 @@ u16 GetPokemonAttSpatt(s16 index, u32 r1);
u16 GetPokemonDefSpdef(s16 index, u32 r1);
u8 GetPokemonType(s32 index, u32 typeIndex);;
u8 GetPokemonAbility(s16 index, u32 abilityIndex);
-s16 sub_808DCA0(s16 index, u32 r1);
+s16 GetDexInternalNo(s16 index, u32 r1);
s16 GetBaseRecruit(s16 index);
-s16 sub_808DCDC(s16 index, s32 r1);
-s16 sub_808DCFC(s16 index);
+s16 GetAlphabetParentNo(s16 index, s32 r1);
+s16 GetInternalNo(s16 index);
u32 CalculateEXPGain(s16 index, s32 level);
-s16 sub_808DD48(s16 index, struct unkEvolve *r1);
+s16 GetPokemonEvolveConditons(s16 index, struct unkEvolve *r1);
u8 GetPokemonOverworldPalette(s16 index, u32 r1);
bool8 IsPokemonDialogueSpriteAvail(s16 index, s32 r1);
struct OpenedFile *OpenPokemonDialogueSpriteFile(s16 index);
diff --git a/include/save.h b/include/save.h
index 2b4c1ec..da23b47 100644
--- a/include/save.h
+++ b/include/save.h
@@ -5,6 +5,14 @@
#include "exclusive_pokemon.h"
#include "rescue_team_info.h"
+enum
+{
+ SAVE_COMPLETED,
+ SAVE_NOT_WRTTEN,
+ SAVE_FAILED
+};
+
+
struct UnkStruct_sub_8011DAC {
u8 fill000[0x4];
u8 unk004[0x400];
@@ -18,7 +26,7 @@ struct UnkStruct_sub_8011DAC {
u8 fill42C[0x4];
u32 unk430;
u32 unk434;
- u32 unk438;
+ u32 savedFriendAreas;
u32 unk43C;
u32 unk440;
u32 unk444;
@@ -56,11 +64,11 @@ u32 sub_8011C1C(void);
void sub_8011C28(u32 in);
s32 sub_8011C34(void);
void sub_8011C40(s32 in);
-u32 sub_8011C4C(void);
+char *sub_8011C4C(void);
void sub_8011CA8(u32 *out, s32 size);
-u32 sub_8011DAC(u32 *a);
+u32 ReadSaveFromPak(u32 *a);
u32 sub_8011F9C(s32 *r0, u8 *dest, s32 size);
-bool8 sub_8011FF8(void);
+bool8 IsSaveCorrupted(void);
void sub_8012284(void);
void sub_8012298(void);
void sub_80122A8(void);
diff --git a/include/text.h b/include/text.h
index b786812..01e701d 100644
--- a/include/text.h
+++ b/include/text.h
@@ -25,4 +25,5 @@ void sub_8006554(void *a0, void *a1, void *a2, void *a3, u32 a4, const struct Un
void sub_800898C(void);
void sub_80089AC(const struct UnkTextStruct2 *a0, void *a1);
void sub_8009388(void);
+void sub_800641C(struct UnkTextStruct2 *a0, u8 a1, u8 a2);
#endif
diff --git a/include/trade_items_menu.h b/include/trade_items_menu.h
index 73435a3..36e6054 100644
--- a/include/trade_items_menu.h
+++ b/include/trade_items_menu.h
@@ -8,9 +8,9 @@ struct unkData
struct TradeSubStruct
{
- u8 unk0; // item id?
+ u8 itemIndex; // item id?
u8 fill3[0x3];
- u32 unk4; // number of items?
+ u32 numItems; // number of items?
};
@@ -22,7 +22,7 @@ struct TradeItemsMenu
u32 itemMode;
u32 linkStatus;
u32 unk10;
- u32 unk14; // item #
+ u32 numItemsToSend; // item #
u32 unk18;
u32 unk1C;
u32 unk20;
@@ -49,8 +49,8 @@ struct TradeItemsMenu
struct TradeSubStruct unk254;
u8 unk25C;
- u8 unk25D;
- u8 unk25E;
+ u8 chosenNum;
+ u8 chosenItem;
u8 fill25F[0x3A0 - 0x25F];
};