Merge pull request #213 from golemgalvanize/decompile_main_menu

Decompile main menu
This commit is contained in:
Diegoisawesome 2018-02-14 21:16:47 -06:00 committed by GitHub
commit e706d89ff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 2072 additions and 5635 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,141 +0,0 @@
@ the second big chunk of data
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
.align 2
gUnknown_082FECFC:: @ 82FECFC
.incbin "graphics/birch_speech/bg0.gbapal"
.incbin "graphics/birch_speech/bg1.gbapal"
.align 2
gBirchIntroShadowGfx:: @ 82FED3C
.incbin "graphics/birch_speech/shadow.4bpp.lz"
.align 2
gUnknown_082FEEF0:: @ 82FEEF0
.incbin "graphics/birch_speech/map.bin.lz"
.align 2
gUnknown_082FF018:: @ 82FF018
.incbin "graphics/birch_speech/bg2.gbapal"
.align 2
gUnknown_082FF028:: @ 82FF028
.space 16
.align 2
gUnknown_082FF038:: @ 82FF038
window_template 0x00, 0x02, 0x01, 0x1a, 0x02, 0x0f, 0x0001
window_template 0x00, 0x02, 0x05, 0x1a, 0x02, 0x0f, 0x0035
.align 2
gUnknown_082FF048:: @ 82FF048
window_template 0x00, 0x02, 0x01, 0x1a, 0x06, 0x0f, 0x0001
window_template 0x00, 0x02, 0x09, 0x1a, 0x02, 0x0f, 0x009d
window_template 0x00, 0x02, 0x0d, 0x1a, 0x02, 0x0f, 0x00d1
window_template 0x00, 0x02, 0x11, 0x1a, 0x02, 0x0f, 0x0105
window_template 0x00, 0x02, 0x15, 0x1a, 0x02, 0x0f, 0x0139
.align 2
gUnknown_082FF070:: @ 82FF070
window_template 0x00, 0x02, 0x0f, 0x1a, 0x04, 0x0f, 0x016d
null_window_template
.align 2
gUnknown_082FF080:: @ 82FF080
window_template 0x00, 0x02, 0x0f, 0x1b, 0x04, 0x0f, 0x0001
.align 2
gUnknown_082FF088:: @ 82FF088
window_template 0x00, 0x03, 0x05, 0x06, 0x04, 0x0f, 0x006d
window_template 0x00, 0x03, 0x02, 0x09, 0x0a, 0x0f, 0x0085
null_window_template
.align 2
gMainMenuBgPal:: @ 82FF0A0
.incbin "graphics/misc/main_menu_bg.gbapal"
.align 2
gMainMenuTextPal:: @ 82FF0C0
.incbin "graphics/misc/main_menu_text.gbapal"
.align 2
gUnknown_082FF0E0:: @ 82FF0E0
.byte 0x0a, 0x0b, 0x0c
gUnknown_082FF0E3:: @ 82FF0E3
.byte 0x0a, 0x01, 0x0c
.align 2
gUnknown_082FF0E8:: @ 82FF0E8
.4byte 0x000001e8, 0x00003071
.align 2
gUnknown_082FF0F0:: @ 82FF0F0
.4byte 0x000001ec
.align 2
gUnknown_082FF0F4:: @ 82FF0F4
.byte 0x02, 0x78, 0x08, 0x03, 0x78, 0x98, 0x03, 0x00, 0x04, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00
.align 2
gUnknown_082FF104:: @ 82FF104
.2byte 0xfffe, 0xfffe, 0x3000, 0x0000, 0x7fff, 0x0000, 0x0000, 0x0000
.align 2
gUnknown_082FF114:: @ 82FF114
.4byte gUnknown_082FF104
.align 2
gUnknown_082FF118:: @ 82FF118
.4byte gText_BirchBoy, 0x00000000
.4byte gText_BirchGirl, 0x00000000
.align 2
gMalePresetNames:: @ 82FF128
.4byte gText_DefaultNameStu
.4byte gText_DefaultNameMilton
.4byte gText_DefaultNameTom
.4byte gText_DefaultNameKenny
.4byte gText_DefaultNameReid
.4byte gText_DefaultNameJude
.4byte gText_DefaultNameJaxson
.4byte gText_DefaultNameEaston
.4byte gText_DefaultNameWalker
.4byte gText_DefaultNameTeru
.4byte gText_DefaultNameJohnny
.4byte gText_DefaultNameBrett
.4byte gText_DefaultNameSeth
.4byte gText_DefaultNameTerry
.4byte gText_DefaultNameCasey
.4byte gText_DefaultNameDarren
.4byte gText_DefaultNameLandon
.4byte gText_DefaultNameCollin
.4byte gText_DefaultNameStanley
.4byte gText_DefaultNameQuincy
.align 2
gFemalePresetNames:: @ 82FF178
.4byte gText_DefaultNameKimmy
.4byte gText_DefaultNameTiara
.4byte gText_DefaultNameBella
.4byte gText_DefaultNameJayla
.4byte gText_DefaultNameAllie
.4byte gText_DefaultNameLianna
.4byte gText_DefaultNameSara
.4byte gText_DefaultNameMonica
.4byte gText_DefaultNameCamila
.4byte gText_DefaultNameAubree
.4byte gText_DefaultNameRuthie
.4byte gText_DefaultNameHazel
.4byte gText_DefaultNameNadine
.4byte gText_DefaultNameTanja
.4byte gText_DefaultNameYasmin
.4byte gText_DefaultNameNicola
.4byte gText_DefaultNameLillie
.4byte gText_DefaultNameTerra
.4byte gText_DefaultNameLucy
.4byte gText_DefaultNameHalie

View File

@ -1,4 +1,4 @@
gUnknown_082C897B:: @ 82C897B gText_Birch_Welcome:: @ 82C897B
.string "Hi! Sorry to keep you waiting!\p" .string "Hi! Sorry to keep you waiting!\p"
.string "Welcome to the world of POKéMON!\p" .string "Welcome to the world of POKéMON!\p"
.string "My name is BIRCH.\p" .string "My name is BIRCH.\p"
@ -6,12 +6,12 @@ gUnknown_082C897B:: @ 82C897B
.string "PROFESSOR.\p" .string "PROFESSOR.\p"
.string "$" .string "$"
gUnknown_082C89FB:: @ 82C89FB gText_Birch_Pokemon:: @ 82C89FB
.string "This is what we call a “POKéMON.”\p" .string "This is what we call a “POKéMON.”\p"
.string "\n" .string "\n"
.string "$" .string "$"
gUnknown_082C8A1F:: @ 82C8A1F gText_Birch_MainSpeech:: @ 82C8A1F
.string "This world is widely inhabited by\n" .string "This world is widely inhabited by\n"
.string "creatures known as POKéMON.\p" .string "creatures known as POKéMON.\p"
.string "We humans live alongside POKéMON,\n" .string "We humans live alongside POKéMON,\n"
@ -28,28 +28,28 @@ gUnknown_082C8A1F:: @ 82C8A1F
.string "Thats what I do.\p" .string "Thats what I do.\p"
.string "$" .string "$"
gUnknown_082C8BD0:: @ 82C8BD0 gText_Birch_AndYouAre:: @ 82C8BD0
.string "And you are?$" .string "And you are?$"
gUnknown_082C8BDD:: @ 82C8BDD gText_Birch_BoyOrGirl:: @ 82C8BDD
.string "Are you a boy?\n" .string "Are you a boy?\n"
.string "Or are you a girl?$" .string "Or are you a girl?$"
gUnknown_082C8BFF:: @ 82C8BFF gText_Birch_WhatsYourName:: @ 82C8BFF
.string "All right.\n" .string "All right.\n"
.string "Whats your name?$" .string "Whats your name?$"
gUnknown_082C8C1C:: @ 82C8C1C gText_Birch_SoItsPlayer:: @ 82C8C1C
.string "So its {PLAYER}{KUN}?$" .string "So its {PLAYER}{KUN}?$"
gUnknown_082C8C2A:: @ 82C8C2A gText_Birch_YourePlayer:: @ 82C8C2A
.string "Ah, okay!\p" .string "Ah, okay!\p"
.string "Youre {PLAYER}{KUN} whos moving to my\n" .string "Youre {PLAYER}{KUN} whos moving to my\n"
.string "hometown of LITTLEROOT.\l" .string "hometown of LITTLEROOT.\l"
.string "I get it now!\p" .string "I get it now!\p"
.string "$" .string "$"
gUnknown_082C8C7A:: @ 82C8C7A gText_Birch_AreYouReady:: @ 82C8C7A
.string "All right, are you ready?\p" .string "All right, are you ready?\p"
.string "Your very own adventure is about\n" .string "Your very own adventure is about\n"
.string "to unfold.\p" .string "to unfold.\p"

View File

@ -12,5 +12,6 @@
#define RGB_YELLOW RGB(31, 31, 0) #define RGB_YELLOW RGB(31, 31, 0)
#define RGB_MAGENTA RGB(31, 0, 31) #define RGB_MAGENTA RGB(31, 0, 31)
#define RGB_CYAN RGB(0, 31, 31) #define RGB_CYAN RGB(0, 31, 31)
#define RGB_WHITEALPHA RGB_WHITE | 0x8000
#endif // GUARD_RGB_H #endif // GUARD_RGB_H

View File

@ -74,6 +74,7 @@ extern u32 gFieldEffectArguments[8];
u32 FieldEffectStart(u8); u32 FieldEffectStart(u8);
bool8 FieldEffectActiveListContains(u8 id); bool8 FieldEffectActiveListContains(u8 id);
void sub_80B69DC(void); void sub_80B69DC(void);
u8 AddNewGameBirchObject(s16, s16, u8);
void FieldEffectStop(struct Sprite *sprite, u8 id); void FieldEffectStop(struct Sprite *sprite, u8 id);
u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer); u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer);
void sub_80B7FC8(void); void sub_80B7FC8(void);

View File

@ -198,6 +198,10 @@ extern u32 gUnknown_020223C0;
extern bool8 gLinkVSyncDisabled; extern bool8 gLinkVSyncDisabled;
extern u32 gLinkStatus; extern u32 gLinkStatus;
void c2_mystery_gift(void);
void sub_801867C(void);
bool8 sub_80093CC(void);
void Task_DestroySelf(u8 taskId); void Task_DestroySelf(u8 taskId);
void OpenLink(void); void OpenLink(void);
void CloseLink(void); void CloseLink(void);

View File

@ -34,6 +34,7 @@ void sub_8197930(void);
u8 GetPlayerTextSpeed(void); u8 GetPlayerTextSpeed(void);
void sub_81978B0(u16 arg0); void sub_81978B0(u16 arg0);
void AddTextPrinterWithCallbackForMessage(bool8 a1, void (*callback)(struct TextSubPrinter *, u16));
void box_print(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str); void box_print(u8 windowId, u8 fontId, u8 left, u8 top, const u8 *color, s8 speed, const u8 *str);
void sub_8198070(u8 windowId, bool8 copyToVram); void sub_8198070(u8 windowId, bool8 copyToVram);
void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock); void SetWindowTemplateFields(struct WindowTemplate* template, u8 priority, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 palNum, u16 baseBlock);

View File

@ -6,9 +6,17 @@
// Exported RAM declarations // Exported RAM declarations
// Exported ROM declarations // Exported ROM declarations
struct ArrowStruct {
u8 unk0[6];
u16 unk6[4];
u8 unkE;
};
void Task_ScrollIndicatorArrowPairOnMainMenu(u8);
u8 AddScrollIndicatorArrowPairParametrized(u8, u8, u8, u8, s32, u16, u16, u16 *); u8 AddScrollIndicatorArrowPairParametrized(u8, u8, u8, u8, s32, u16, u16, u16 *);
void RemoveScrollIndicatorArrowPair(u8); void RemoveScrollIndicatorArrowPair(u8);
u8 AddScrollIndicatorArrowPair(void*, void*); u8 AddScrollIndicatorArrowPair(const struct ArrowStruct*, void*);
void sub_81AF15C(u8, u8, u8); void sub_81AF15C(u8, u8, u8);
#endif //GUARD_MENU_INDICATORS_H #endif //GUARD_MENU_INDICATORS_H

View File

@ -54,6 +54,7 @@ void Overworld_ChangeMusicTo(u16);
bool32 is_c1_link_related_active(void); bool32 is_c1_link_related_active(void);
extern u16 gUnknown_03005DA8; extern u16 gUnknown_03005DA8;
void CB2_NewGame(void);
void strange_npc_table_clear(void); void strange_npc_table_clear(void);
const struct MapHeader *get_mapheader_by_bank_and_number(u16, u16); const struct MapHeader *get_mapheader_by_bank_and_number(u16, u16);
void FieldObjectMoveDestCoords(struct MapObject *, u32, s16 *, s16 *); void FieldObjectMoveDestCoords(struct MapObject *, u32, s16 *, s16 *);

10
include/pokemon_3.h Normal file
View File

@ -0,0 +1,10 @@
#ifndef GUARD_POKEMON_3_H
#define GUARD_POKEMON_3_H
u16 sub_806EFF0(u16);
const u8* GetTrainerClassNameFromId(u16 trainerId);
const u8* GetTrainerNameFromId(u16 trainerId);
void PlayMapChosenOrBattleBGM(u16 song);
u8 GetTrainerEncounterMusicId(u16 trainerOpponentId);
#endif // GUARD_POKEMON_3_H

View File

@ -231,6 +231,76 @@ extern const u8 gText_FemaleSymbol[];
extern const u8 gText_SelectorArrow3[]; extern const u8 gText_SelectorArrow3[];
extern const u8 gText_YesNo[]; extern const u8 gText_YesNo[];
// main menu/birch speech text
extern const u8 gText_SaveFileErased[];
extern const u8 gText_SaveFileCorrupted[];
extern const u8 gJPText_No1MSubCircuit[];
extern const u8 gText_BatteryRunDry[];
extern const u8 gText_MainMenuNewGame[];
extern const u8 gText_MainMenuOption[];
extern const u8 gText_MainMenuContinue[];
extern const u8 gText_MainMenuMysteryGift2[];
extern const u8 gText_MainMenuMysteryEvents[];
extern const u8 gText_MainMenuMysteryGift[];
extern const u8 gText_WirelessNotConnected[];
extern const u8 gText_MysteryGiftCantUse[];
extern const u8 gText_MysteryEventsCantUse[];
extern const u8 gText_Birch_Welcome[];
extern const u8 gText_ThisIsAPokemon[];
extern const u8 gText_Birch_MainSpeech[];
extern const u8 gText_Birch_AndYouAre[];
extern const u8 gText_Birch_BoyOrGirl[];
extern const u8 gText_Birch_WhatsYourName[];
extern const u8 gText_Birch_SoItsPlayer[];
extern const u8 gText_Birch_YourePlayer[];
extern const u8 gText_Birch_AreYouReady[];
extern const u8 gText_ContinueMenuPlayer[];
extern const u8 gText_ContinueMenuTime[];
extern const u8 gText_ContinueMenuPokedex[];
extern const u8 gText_ContinueMenuBadges[];
extern const u8 gText_BirchBoy[];
extern const u8 gText_BirchGirl[];
extern const u8 gText_DefaultNameStu[];
extern const u8 gText_DefaultNameMilton[];
extern const u8 gText_DefaultNameTom[];
extern const u8 gText_DefaultNameKenny[];
extern const u8 gText_DefaultNameReid[];
extern const u8 gText_DefaultNameJude[];
extern const u8 gText_DefaultNameJaxson[];
extern const u8 gText_DefaultNameEaston[];
extern const u8 gText_DefaultNameWalker[];
extern const u8 gText_DefaultNameTeru[];
extern const u8 gText_DefaultNameJohnny[];
extern const u8 gText_DefaultNameBrett[];
extern const u8 gText_DefaultNameSeth[];
extern const u8 gText_DefaultNameTerry[];
extern const u8 gText_DefaultNameCasey[];
extern const u8 gText_DefaultNameDarren[];
extern const u8 gText_DefaultNameLandon[];
extern const u8 gText_DefaultNameCollin[];
extern const u8 gText_DefaultNameStanley[];
extern const u8 gText_DefaultNameQuincy[];
extern const u8 gText_DefaultNameKimmy[];
extern const u8 gText_DefaultNameTiara[];
extern const u8 gText_DefaultNameBella[];
extern const u8 gText_DefaultNameJayla[];
extern const u8 gText_DefaultNameAllie[];
extern const u8 gText_DefaultNameLianna[];
extern const u8 gText_DefaultNameSara[];
extern const u8 gText_DefaultNameMonica[];
extern const u8 gText_DefaultNameCamila[];
extern const u8 gText_DefaultNameAubree[];
extern const u8 gText_DefaultNameRuthie[];
extern const u8 gText_DefaultNameHazel[];
extern const u8 gText_DefaultNameNadine[];
extern const u8 gText_DefaultNameTanja[];
extern const u8 gText_DefaultNameYasmin[];
extern const u8 gText_DefaultNameNicola[];
extern const u8 gText_DefaultNameLillie[];
extern const u8 gText_DefaultNameTerra[];
extern const u8 gText_DefaultNameLucy[];
extern const u8 gText_DefaultNameHalie[];
// mystery event menu text // mystery event menu text
extern const u8 gText_EventSafelyLoaded[]; extern const u8 gText_EventSafelyLoaded[];
extern const u8 gText_LoadErrorEndingSession[]; extern const u8 gText_LoadErrorEndingSession[];

View File

@ -57,7 +57,7 @@ SECTIONS {
asm/link_rfu.o(.text); asm/link_rfu.o(.text);
asm/rom_8011DC0.o(.text); asm/rom_8011DC0.o(.text);
src/rtc.o(.text); src/rtc.o(.text);
asm/main_menu.o(.text); src/main_menu.o(.text);
src/battle_controllers.o(.text); src/battle_controllers.o(.text);
src/decompress.o(.text); src/decompress.o(.text);
asm/rom_8034C54.o(.text); asm/rom_8034C54.o(.text);
@ -371,7 +371,7 @@ SECTIONS {
src/link_rfu.o(.rodata); src/link_rfu.o(.rodata);
data/rom_8011DC0.o(.rodata); data/rom_8011DC0.o(.rodata);
src/rtc.o(.rodata); src/rtc.o(.rodata);
data/main_menu.o(.rodata); src/main_menu.o(.rodata);
data/battle_1.o(.rodata); data/battle_1.o(.rodata);
data/data2b.o(.rodata); data/data2b.o(.rodata);
src/battle_main.o(.rodata); src/battle_main.o(.rodata);

View File

@ -214,7 +214,7 @@ const struct YesNoFuncTable gUnknown_08614084 = {BagMenuActuallyToss, BagMenuCan
const struct YesNoFuncTable gUnknown_0861408C = {sub_81AD84C, sub_81AD6FC}; const struct YesNoFuncTable gUnknown_0861408C = {sub_81AD84C, sub_81AD6FC};
const u16 gUnknown_08614094[] = {0x1C00, 0x110, 0x1064, -1, -1, 0x6F, 0x6F, 0}; const struct ArrowStruct gUnknown_08614094 = {0, 0x1C, 16, 1, 100, 16, -1, -1, 0x6F, 0x6F, 0};
const u8 gUnknown_086140A4[] = INCBIN_U8("graphics/interface/select_button.4bpp"); const u8 gUnknown_086140A4[] = INCBIN_U8("graphics/interface/select_button.4bpp");

File diff suppressed because it is too large Load Diff

View File

@ -119,10 +119,7 @@ gUnknown_02022D00: @ 2022D00
@ src/main_menu.c @ src/main_menu.c
gUnknown_02022D04: @ 2022D04 gUnknown_02022D04: @ 2022D04
.space 0x2 .include "src/main_menu.o"
gUnknown_02022D06: @ 2022D06
.space 0x2
gUnknown_02022D08: @ 2022D08 gUnknown_02022D08: @ 2022D08
.space 0x1 .space 0x1