Split rom asm file in half

The first half is ui/menu stuff, while the second half is link-related
stuff.
This commit is contained in:
Phlosioneer 2019-03-04 23:26:51 -05:00
parent cae63cf1c7
commit 907492fd6e
8 changed files with 3934 additions and 3916 deletions

3725
asm/player_pc_ui.s Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

196
data/player_pc_ui.s Normal file
View File

@ -0,0 +1,196 @@
.include "asm/macros.inc"
.include "constants/constants.inc"
.section .rodata
gUnknown_086253E8:: @ 86253E8
.4byte 0x8010100
.4byte 0x80F02
.4byte 0x8011500
.4byte 0x180F12
.4byte 0xB010100
.4byte 0x180F08
gUnknown_08625400:: @ 8625400
.byte 1, 2, 3
gUnknown_08625403:: @ 8625403
.byte 0xFF
@ ScanlineEffectParams
gUnknown_08625404:: @ 8625404
.4byte 0x04000040 @ REG_ADDR_WIN0H
.4byte 0xA6600001 @ SCANLINE_EFFECT_DMACNT_32BIT
.byte 1, @ initState
.byte 0, @ unused9
.byte 0, 0 @ Padding
gUnknown_08625410:: @ 8625410
.byte 4, 5, 6, 7, 8, 9, 9, 0xA, 0xA, 0xB, 0xB, 0xC, 0xC, 0xD, 0xD, 0xD, 0xD, 0xE, 0xE, 0xE, 0xE, 0xF, 0xF, 0xF, 0xF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23
gMoveRelearnerWindowTemplates:: @ 8625510s
window_template 1, 1, 1, 16, 12, 0xF, 0x000A
window_template 1, 1, 1, 16, 12, 0xF, 0x00CA
window_template 1, 19, 1, 10, 12, 0xF, 0x018A
window_template 1, 4, 15, 22, 4, 0xF, 0x0202
window_template 0, 22, 8, 5, 4, 0xF, 0x025A
null_window_template
gMoveRelearnerYesNoMenuTemplate:: @ 8625540
window_template 0, 22, 8, 5, 4, 0xF, 0x025A
gMoveRelearnerMovesListTemplate:: @ 8625548 struct ListMenuTemplate
.4byte NULL
.4byte MoveRelearnerCursorCallback
.4byte NULL
.2byte 0
.2byte 0
.byte 2
.byte 0
.byte 8
.byte 0
.4byte 0x1003121
gUnknown_08625560:: @ 8625560
.incbin "graphics/pokenav/pokeball.4bpp"
gUnknown_08625660:: @ 8625660
.incbin "graphics/pokenav/8625660.4bpp"
gUnknown_08625680:: @ 8625680
.incbin "graphics/pokenav/sparkle.gbapal"
gUnknown_086256A0:: @ 86255A0
.incbin "graphics/pokenav/sparkle.4bpp"
gUnknown_08625A20:: @ 8625A20
.2byte 0
.2byte 0xC000
.2byte 0x400
.2byte 0
gUnknown_08625A28:: @ 8625A28
.2byte 0
.2byte 0x4000
.2byte 0x800
.2byte 0
gUnknown_08625A30:: @ 8625A30
.2byte 0
.2byte 5
.2byte 0xFFFF
.2byte 0
gUnknown_08625A38:: @ 8625A38
.2byte 4
.2byte 5
.2byte 0xFFFF
.2byte 0
gUnknown_08625A40:: @ 8625A40
.4byte gUnknown_08625A30
.4byte gUnknown_08625A38
gUnknown_08625A48:: @ 8625A48
.4byte NULL
.4byte 0x640800
gUnknown_08625A50:: @ 8625A50
spr_template 0x64, 0x64, gUnknown_08625A20, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_08625A68:: @ 8625A68
.4byte NULL
.4byte 0x64
gUnknown_08625A70:: @ 8625A70
.4byte gUnknown_08625560
.byte 0, 1, 0x65, 0
.4byte gUnknown_08625660
.2byte 0x20, 0x67
.4byte gPokenavConditionCancel_Gfx
.byte 0, 1, 0x66, 0
.4byte NULL, NULL
gUnknown_08625A90:: @ 8625A90
.4byte gPokenavConditionCancel_Pal + 0x0
.byte 0x65, 0, 0, 0
.4byte gPokenavConditionCancel_Pal + 0x20
.byte 0x66, 0, 0, 0
.4byte NULL, NULL
gUnknown_08625AA8:: @ 8625AA8
spr_template 0x65, 0x65, gUnknown_08625A28, gUnknown_08625A40, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_08625AC0:: @ 8625AC0
.4byte gUnknown_086256A0
.byte 0x80, 3, 0x68, 0
gUnknown_08625AC8:: @ 8625AC8
.4byte gUnknown_08625680
.byte 0x68, 0, 0, 0
gUnknown_08625AD0:: @ 8625AD0
.2byte 0
.2byte 0x4000
.2byte 0
.2byte 0
gUnknown_08625AD8:: @ 8625AD8
.2byte 0
.2byte 5
.2byte 4
.2byte 5
gUnknown_08625AE0:: @ 8625AE0
.2byte 8
.2byte 5
.2byte 12
.2byte 5
gUnknown_08625AE8:: @ 8625AE8
.2byte 16
.2byte 5
.2byte 20
.2byte 5
gUnknown_08625AF0:: @ 8625AF0
.2byte 24
.2byte 5
.2byte 0xFFFF
.2byte 0
gUnknown_08625AF8:: @ 8625AF8
.4byte gUnknown_08625AD8
.4byte gUnknown_08625AE0
gUnknown_08625B00:: @ 8625B00
.4byte gUnknown_08625AE8
.4byte gUnknown_08625AF0
gUnknown_08625B08:: @ 8625B08
.4byte gUnknown_08625AF8
.4byte gUnknown_08625B00
.4byte gUnknown_08625B08
gUnknown_08625B14:: @ 8625B14
spr_template 0x68, 0x68, gUnknown_08625AD0, gUnknown_08625AF8, NULL gDummySpriteAffineAnimTable, sub_81D3564
gUnknown_08625B2C:: @ 8625B2C
.2byte 0, 0xFFDD
.2byte 20, 0xFFE4
.2byte 33, 0xFFF6
.2byte 33, 10
.2byte 20, 28
.2byte 0, 35
.2byte 0xFFEC, 28
.2byte 0xFFDF, 10
.2byte 0xFFDF, 0xFFF6
.2byte 0xFFEC, 0xFFE4
gUnknown_08625B54:: @ 8625B54
.4byte gUnknown_085EEA46
.4byte gUnknown_085EEA4E
.4byte gUnknown_085EEA55
.4byte gUnknown_085EEA63
.4byte gUnknown_085EEA6B
.4byte gUnknown_085EEA5D

View File

@ -3,193 +3,6 @@
.section .rodata
gUnknown_086253E8:: @ 86253E8
.4byte 0x8010100
.4byte 0x80F02
.4byte 0x8011500
.4byte 0x180F12
.4byte 0xB010100
.4byte 0x180F08
gUnknown_08625400:: @ 8625400
.byte 1, 2, 3
gUnknown_08625403:: @ 8625403
.byte 0xFF
gUnknown_08625404:: @ 8625404
.byte 0x40, 0, 0, 4, 1, 0, 0x60, 0xA6, 1, 0, 0, 0
gUnknown_08625410:: @ 8625410
.byte 4, 5, 6, 7, 8, 9, 9, 0xA, 0xA, 0xB, 0xB, 0xC, 0xC, 0xD, 0xD, 0xD, 0xD, 0xE, 0xE, 0xE, 0xE, 0xF, 0xF, 0xF, 0xF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1D, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23
gMoveRelearnerWindowTemplates:: @ 8625510s
window_template 1, 1, 1, 16, 12, 0xF, 0x000A
window_template 1, 1, 1, 16, 12, 0xF, 0x00CA
window_template 1, 19, 1, 10, 12, 0xF, 0x018A
window_template 1, 4, 15, 22, 4, 0xF, 0x0202
window_template 0, 22, 8, 5, 4, 0xF, 0x025A
null_window_template
gMoveRelearnerYesNoMenuTemplate:: @ 8625540
window_template 0, 22, 8, 5, 4, 0xF, 0x025A
gMoveRelearnerMovesListTemplate:: @ 8625548 struct ListMenuTemplate
.4byte NULL
.4byte MoveRelearnerCursorCallback
.4byte NULL
.2byte 0
.2byte 0
.byte 2
.byte 0
.byte 8
.byte 0
.4byte 0x1003121
gUnknown_08625560:: @ 8625560
.incbin "graphics/pokenav/pokeball.4bpp"
gUnknown_08625660:: @ 8625660
.incbin "graphics/pokenav/8625660.4bpp"
gUnknown_08625680:: @ 8625680
.incbin "graphics/pokenav/sparkle.gbapal"
gUnknown_086256A0:: @ 86255A0
.incbin "graphics/pokenav/sparkle.4bpp"
gUnknown_08625A20:: @ 8625A20
.2byte 0
.2byte 0xC000
.2byte 0x400
.2byte 0
gUnknown_08625A28:: @ 8625A28
.2byte 0
.2byte 0x4000
.2byte 0x800
.2byte 0
gUnknown_08625A30:: @ 8625A30
.2byte 0
.2byte 5
.2byte 0xFFFF
.2byte 0
gUnknown_08625A38:: @ 8625A38
.2byte 4
.2byte 5
.2byte 0xFFFF
.2byte 0
gUnknown_08625A40:: @ 8625A40
.4byte gUnknown_08625A30
.4byte gUnknown_08625A38
gUnknown_08625A48:: @ 8625A48
.4byte NULL
.4byte 0x640800
gUnknown_08625A50:: @ 8625A50
spr_template 0x64, 0x64, gUnknown_08625A20, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_08625A68:: @ 8625A68
.4byte NULL
.4byte 0x64
gUnknown_08625A70:: @ 8625A70
.4byte gUnknown_08625560
.byte 0, 1, 0x65, 0
.4byte gUnknown_08625660
.2byte 0x20, 0x67
.4byte gPokenavConditionCancel_Gfx
.byte 0, 1, 0x66, 0
.4byte NULL, NULL
gUnknown_08625A90:: @ 8625A90
.4byte gPokenavConditionCancel_Pal + 0x0
.byte 0x65, 0, 0, 0
.4byte gPokenavConditionCancel_Pal + 0x20
.byte 0x66, 0, 0, 0
.4byte NULL, NULL
gUnknown_08625AA8:: @ 8625AA8
spr_template 0x65, 0x65, gUnknown_08625A28, gUnknown_08625A40, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
gUnknown_08625AC0:: @ 8625AC0
.4byte gUnknown_086256A0
.byte 0x80, 3, 0x68, 0
gUnknown_08625AC8:: @ 8625AC8
.4byte gUnknown_08625680
.byte 0x68, 0, 0, 0
gUnknown_08625AD0:: @ 8625AD0
.2byte 0
.2byte 0x4000
.2byte 0
.2byte 0
gUnknown_08625AD8:: @ 8625AD8
.2byte 0
.2byte 5
.2byte 4
.2byte 5
gUnknown_08625AE0:: @ 8625AE0
.2byte 8
.2byte 5
.2byte 12
.2byte 5
gUnknown_08625AE8:: @ 8625AE8
.2byte 16
.2byte 5
.2byte 20
.2byte 5
gUnknown_08625AF0:: @ 8625AF0
.2byte 24
.2byte 5
.2byte 0xFFFF
.2byte 0
gUnknown_08625AF8:: @ 8625AF8
.4byte gUnknown_08625AD8
.4byte gUnknown_08625AE0
gUnknown_08625B00:: @ 8625B00
.4byte gUnknown_08625AE8
.4byte gUnknown_08625AF0
gUnknown_08625B08:: @ 8625B08
.4byte gUnknown_08625AF8
.4byte gUnknown_08625B00
.4byte gUnknown_08625B08
gUnknown_08625B14:: @ 8625B14
spr_template 0x68, 0x68, gUnknown_08625AD0, gUnknown_08625AF8, NULL gDummySpriteAffineAnimTable, sub_81D3564
gUnknown_08625B2C:: @ 8625B2C
.2byte 0, 0xFFDD
.2byte 20, 0xFFE4
.2byte 33, 0xFFF6
.2byte 33, 10
.2byte 20, 28
.2byte 0, 35
.2byte 0xFFEC, 28
.2byte 0xFFDF, 10
.2byte 0xFFDF, 0xFFF6
.2byte 0xFFEC, 0xFFE4
gUnknown_08625B54:: @ 8625B54
.4byte gUnknown_085EEA46
.4byte gUnknown_085EEA4E
.4byte gUnknown_085EEA55
.4byte gUnknown_085EEA63
.4byte gUnknown_085EEA6B
.4byte gUnknown_085EEA5D
gUnknown_08625B6C:: @ 8625B6C
@ apparently e-reader trainer data? idk
.byte 0x6f, 0x57, 0x54, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x00, 0x2e, 0x14, 0x0c, 0x0e, 0x23, 0x10, 0x47, 0x0a, 0x1f, 0x06, 0x24, 0x0e, 0x48, 0x0a, 0x0f, 0x06

View File

@ -28,7 +28,7 @@ void InitMoveRelearnerWindows(bool8 useContextWindow);
bool8 EventObjectIsFarawayIslandMew(struct EventObject *);
u32 sub_81D427C(void);
void sub_81D4998(void);
void sub_81D3640(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5);
void sub_81D3784(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4);
void DrawLevelUpWindowPg1(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5);
void DrawLevelUpWindowPg2(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4);
#endif //GUARD_POKENAV_H

View File

@ -291,6 +291,7 @@ SECTIONS {
src/pokenav.o(.text);
asm/pokenav.o(.text);
src/pokenav_match_call.o(.text);
asm/player_pc_ui.o(.text);
asm/rom_81D1C44.o(.text);
src/trainer_hill.o(.text);
src/rayquaza_scene.o(.text);
@ -594,6 +595,7 @@ SECTIONS {
src/pokenav.o(.rodata);
data/pokenav.o(.rodata);
src/pokenav_match_call.o(.rodata);
data/player_pc_ui.o(.rodata);
data/rom_81D1C44.o(.rodata);
src/trainer_hill.o(.rodata);
src/rayquaza_scene.o(.rodata);

View File

@ -54,9 +54,9 @@ extern struct MusicPlayerInfo gMPlayInfo_BGM;
extern const u8* const gBattleScriptsForMoveEffects[];
// functions
extern void sub_81D388C(struct Pokemon* mon, void* statStoreLocation); // pokenav.s
extern void sub_81D3640(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); // pokenav.s
extern void sub_81D3784(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); // pokenav.s
extern void GetMonLevelUpWindowStats(struct Pokemon* mon, void* statStoreLocation); // pokenav.s
extern void DrawLevelUpWindowPg1(u16 arg0, void* statStoreLocation1, void* statStoreLocation2, u8 arg3, u8 arg4, u8 arg5); // pokenav.s
extern void DrawLevelUpWindowPg2(u16 arg0, void* statStoreLocation1, u8 arg2, u8 arg3, u8 arg4); // pokenav.s
extern u8 sub_813B21C(void);
#define DEFENDER_IS_PROTECTED ((gProtectStructs[gBattlerTarget].protected) && (gBattleMoves[gCurrentMove].flags & FLAG_PROTECT_AFFECTED))
@ -6321,16 +6321,16 @@ static void sub_804F100(void)
{
struct StatsArray currentStats;
sub_81D388C(&gPlayerParty[gBattleStruct->expGetterMonId], &currentStats);
sub_81D3640(0xD, gBattleResources->statsBeforeLvlUp, &currentStats, 0xE, 0xD, 0xF);
GetMonLevelUpWindowStats(&gPlayerParty[gBattleStruct->expGetterMonId], &currentStats);
DrawLevelUpWindowPg1(0xD, gBattleResources->statsBeforeLvlUp, &currentStats, 0xE, 0xD, 0xF);
}
static void sub_804F144(void)
{
struct StatsArray currentStats;
sub_81D388C(&gPlayerParty[gBattleStruct->expGetterMonId], &currentStats);
sub_81D3784(0xD, &currentStats, 0xE, 0xD, 0xF);
GetMonLevelUpWindowStats(&gPlayerParty[gBattleStruct->expGetterMonId], &currentStats);
DrawLevelUpWindowPg2(0xD, &currentStats, 0xE, 0xD, 0xF);
}
static void sub_804F17C(void)

View File

@ -6005,7 +6005,7 @@ static void sub_81B767C(u8 taskId)
s16 *arrayPtr = gUnknown_0203CEC4->data;
arrayPtr[12] = sub_81B3364();
sub_81D3640(arrayPtr[12], arrayPtr, &arrayPtr[6], 1, 2, 3);
DrawLevelUpWindowPg1(arrayPtr[12], arrayPtr, &arrayPtr[6], 1, 2, 3);
CopyWindowToVram(arrayPtr[12], 2);
schedule_bg_copy_tilemap_to_vram(2);
}
@ -6014,7 +6014,7 @@ static void sub_81B76C8(u8 taskId)
{
s16 *arrayPtr = gUnknown_0203CEC4->data;
sub_81D3784(arrayPtr[12], &arrayPtr[6], 1, 2, 3);
DrawLevelUpWindowPg2(arrayPtr[12], &arrayPtr[6], 1, 2, 3);
CopyWindowToVram(arrayPtr[12], 2);
schedule_bg_copy_tilemap_to_vram(2);
}