Merge pull request #166 from rpadaki/kermalis-clean-again-lol

rebased/reconciled version of #165
This commit is contained in:
Seth Barberee
2023-10-22 21:11:05 -07:00
committed by GitHub
253 changed files with 7611 additions and 9807 deletions

View File

@@ -239,26 +239,33 @@
'カ' = 83 4A
'ナ' = 83 69
UNK_ICON_81_69 = 81 69
UNK_ICON_81_6A = 81 6A
RIGHT_ARROW = 81 A8
LEFT_ARROW = 81 A9
UP_ARROW = 81 AA
POKE = 83 BF 83 C4 @ This is actually two characters which can render separately; may need to be split eventually.
UNK_ICON_83_C0 = 83 C0
UNK_ICON_83_C1 = 83 C1
UNK_ICON_83_C2 = 83 C2
UNK_ICON_83_C3 = 83 C3
NDS_Y_BUTTON = 83 C7
R_BUTTON = 84 86
UNK_ICON_84_87 = 84 87
UNK_ICON_40 = 87 40
STAR_BULLET = 87 42
SPEECH_BUBBLE = 87 45
TM = 87 4E
ORB = 87 4F
A_BUTTON = 87 50
B_BUTTON = 87 51
L_BUTTON = 87 74
R_BUTTON = 84 86
SELECT_BUTTON = 87 72 87 73
START_BUTTON = 87 53 87 71
DPAD = 87 52
NDS_Y_BUTTON = 83 c7
START_BUTTON = 87 53 87 71
SELECT_BUTTON = 87 72 87 73
L_BUTTON = 87 74
@ Character codes escaped with a '~'.
DOUBLE_QUOTE = 7E 32 32 @ ~22 - double quote (") is a best guess until we find it in strings that are actually rendered
@@ -266,6 +273,7 @@ APOSTROPHE = 7E 32 37 @ ~27
COMMA = 7E 32 63 @ ~2c
QUOTE_START = 7E 39 33 @ ~93
QUOTE_END = 7E 39 34 @ ~94
UNK_95 = 7E 39 35 @ ~95 - Seems to be a special (?) symbol
@ Placeholders for message arguments to swap out for names within strings.
ARG_VALUE_0 = 24 64 30 @ $d0

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,10 @@
.section .rodata
@ sub_8048E04 - sub_805FC30
.align 2,0
.string "pksdir0\0"
.global gUnknown_8106A4C
gUnknown_8106A4C: @ 8106A4C
.4byte 0
@@ -10,7 +15,6 @@ gUnknown_8106A50: @ 8106A50
.global gUnknown_8106A54
gUnknown_8106A54: @ 8106A54
@ replacing .incbin "baserom.gba", 0x106A54, 0x38
.byte 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00
.byte 0x80, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00
.byte 0x80, 0x04, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00
@@ -18,7 +22,6 @@ gUnknown_8106A54: @ 8106A54
.global gUnknown_8106A8C
gUnknown_8106A8C: @ 8106A8C
@ replacing .incbin "baserom.gba", 0x106A8C, 0x3C
.byte 0x06, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00
.byte 0x18, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x70, 0x6b, 0x73, 0x64
.byte 0x69, 0x72, 0x30, 0x00, 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00, 0x70, 0x6b, 0x73, 0x64
@@ -26,7 +29,6 @@ gUnknown_8106A8C: @ 8106A8C
.global gUnknown_8106AC8
gUnknown_8106AC8: @ 8106AC8
@ replacing .incbin "baserom.gba", 0x106AC8, 0x20
.byte 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00
.byte 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00
@@ -36,7 +38,6 @@ gUnknown_8106AE8: @ 8106AE8
.global gUnknown_8106AEC
gUnknown_8106AEC: @ 8106AEC
@ replacing .incbin "baserom.gba", 0x106AEC, 0x64
.byte 0x12, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x13, 0x02, 0x00, 0x00
.byte 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x01, 0x00, 0xff, 0xff, 0x13, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff
@@ -48,6 +49,10 @@ gUnknown_8106AEC: @ 8106AEC
.global gUnknown_8106B50
gUnknown_8106B50: @ 8106B50
.string "{COLOR_1}%c%s\0"
@ CreateFieldItemMenu - sub_8062CA8
.align 2,0
.string "pksdir0\0"
.align 2,0
@@ -58,13 +63,11 @@ gUnknown_8106B60: @ 8106B60
.global gUnknown_8106B6C
gUnknown_8106B6C: @ 8106B6C
@ replacing .incbin "baserom.gba", 0x106B6C, 0x20
.byte 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x06, 0x00, 0x02, 0x00
.byte 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00
.global gUnknown_8106B8C
gUnknown_8106B8C: @ 8106B8C
@ replacing .incbin "baserom.gba", 0x106B8C, 0x24
.byte 0x01, 0x00, 0x38, 0x00, 0x00, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x38, 0x00
.byte 0x68, 0x00, 0x18, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
@@ -180,6 +183,9 @@ gUnknown_8106C98: @ 8106C98
.global gUnknown_8106C9C
gUnknown_8106C9C: @ 8106C9C
.string "None\0"
@ sub_80633E4 - sub_80639E4
.align 2,0
.string "pksdir0\0"
.align 2,0
@@ -205,12 +211,19 @@ gUnknown_8106CC8: @ 8106CC8
.global gUnknown_8106CCC
gUnknown_8106CCC: @ 8106CCC
.string "{ARG_POKEMON_0}\0"
@ ???
.align 2,0
.string "pksdir0\0"
@ ???
.align 2,0
.string "pksdir0\0"
@ CreateFieldDungeonMenu - CreateFieldOthersMenu
.align 2,0
.string "pksdir0\0"
.align 2,0
.global gUnknown_8106CE8
@@ -224,6 +237,8 @@ gUnknown_8106CF4: @ 8106CF4
.byte 0x13, 0x00, 0x00, 0x00
.byte 0x11, 0x00, 0x00, 0x00
.byte 0x19, 0x00, 0x00, 0x00
@ sub_8065FB4 - sub_8066358
.string "pksdir0\0"
.align 2,0
@@ -241,8 +256,12 @@ gUnknown_8106D68: @ 8106D68
.global gUnknown_8106D8C
gUnknown_8106D8C: @ 8106D8C
.string "{COLOR_2}%d{ARG_POKEMON_0}\0"
@ ???
.align 2,0
.string "pksdir0\0"
@ sub_8067A80 - sub_806806C
.align 2,0
.string "pksdir0\0"
.align 2,0
@@ -299,6 +318,8 @@ gUnknown_8106E80: @ 8106E80
.byte 0x03, 0x00, 0x00, 0x00
.byte 0x04, 0x00, 0x00, 0x00
.byte 0x05, 0x00, 0x00, 0x00
@ sub_8068614 - sub_806A3D4
.string "pksdir0\0"
.align 2,0
@@ -320,22 +341,24 @@ gUnknown_8106EA8: @ 8106EA8
.global gUnknown_8106EB0
gUnknown_8106EB0: @ 8106EB0
.string "talk%d\0"
@ ???
.align 2,0
.string "pksdir0\0"
@ sub_806C51C - sub_806E100
.align 2,0
.string "pksdir0\0"
.align 2,0
.global gUnknown_8106EC8
gUnknown_8106EC8: @ 8106EC8
@ replacing .incbin "baserom.gba", 0x106EC8, 0x27
.byte 0x00, 0x01, 0x07, 0x07, 0x07, 0x05, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07
.byte 0x07, 0x07, 0x05, 0x06, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x05
.byte 0x06, 0x07, 0x07, 0x07, 0x07, 0x0b, 0x07
.global gUnknown_8106EEF
gUnknown_8106EEF: @ 8106EEF
@ replacing .incbin "baserom.gba", 0x106EEF, 0xD
.byte 0x03, 0x04, 0x05, 0x00, 0x00, 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00
.global gUnknown_8106EFC
@@ -365,7 +388,6 @@ gUnknown_8106F1C: @ 8106F1C
.global gUnknown_8106F24
gUnknown_8106F24: @ 8106F24
@ replacing .incbin "baserom.gba", 0x106F24, 0x30
.byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x01, 0x00
.global gUnknown_8106F3C

View File

@@ -1227,16 +1227,12 @@ gUnknown_8108F10: @ 8108F10
.global gUnknown_8108F18
gUnknown_8108F18: @ 8108F18
.string "{COLOR_2 YELLOW_4}%s{END_COLOR_TEXT_2}"
.byte 0x81, 0x40
.string "{COLOR_2 CYAN}%d{END_COLOR_TEXT_2}F\0"
.string "{COLOR_2 YELLOW_4}%s{END_COLOR_TEXT_2} {COLOR_2 CYAN}%d{END_COLOR_TEXT_2}F\0"
.align 2,0
.global gUnknown_8108F2C
gUnknown_8108F2C: @ 8108F2C
.string "{COLOR_2 YELLOW_4}%s{END_COLOR_TEXT_2}"
.byte 0x81, 0x40
.string "B{COLOR_2 CYAN}%d{END_COLOR_TEXT_2}F\0"
.string "{COLOR_2 YELLOW_4}%s{END_COLOR_TEXT_2} B{COLOR_2 CYAN}%d{END_COLOR_TEXT_2}F\0"
.align 2,0
.global gUnknown_8108F40

View File

@@ -100,9 +100,7 @@ gUnknown_811617C: @ 811617C
.global gUnknown_8116180
gUnknown_8116180: @ 8116180
.string "{COLOR_1 YELLOW_5}"
.byte 0x87, 0x45
.string "{END_COLOR_TEXT_1}\0"
.string "{COLOR_1 YELLOW_5}{SPEECH_BUBBLE}{END_COLOR_TEXT_1}\0"
.global gUnknown_8116188
gUnknown_8116188: @ 8116188
@@ -116,171 +114,172 @@ gUnknown_8116190: @ 8116190
.global gUnknown_81161A8
gUnknown_81161A8: @ 81161A8
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte sub_809C39C
.4byte sub_801D0DC
.global gUnknown_81161B8
gUnknown_81161B8: @ 81161B8
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte sub_809C3D8
.4byte sub_801D0DC
.global gUnknown_81161C8
gUnknown_81161C8: @ 81161C8
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte DeleteKangaskhanStorage
.4byte KangaskhanStorageCallback
.global gUnknown_81161D8
gUnknown_81161D8: @ 81161D8
.byte 0x01, 0x00, 0x00, 0x00
.4byte 1
.4byte sub_8017E1C
.4byte sub_8017EF4
.4byte sub_8017E54
.global gUnknown_81161E8
gUnknown_81161E8: @ 81161E8
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte DestroyFelicityBank
.4byte FelicityBankCallback
.global gUnknown_81161F8
gUnknown_81161F8: @ 81161F8
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte DeleteKecleonBros
.4byte KecleonBrosCallback
.global gUnknown_8116208
gUnknown_8116208: @ 8116208
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte sub_801FD7C
.4byte sub_801FC40
.global gUnknown_8116218
gUnknown_8116218: @ 8116218
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte sub_8021D1C
.4byte sub_8021C5C
.global gUnknown_8116228
gUnknown_8116228: @ 8116228
.byte 0x01, 0x00, 0x00, 0x00
.4byte 1
.4byte sub_8027F88
.4byte sub_809C504
.4byte sub_8028078
.global gUnknown_8116238
gUnknown_8116238: @ 8116238
.byte 0x01, 0x00, 0x00, 0x00
.4byte 1
.4byte sub_802B2D4
.4byte sub_802B3B8
.4byte sub_802B358
.global gUnknown_8116248
gUnknown_8116248: @ 8116248
.byte 0x01, 0x00, 0x00, 0x00
.4byte 1
.4byte CreateThankYouMailPelipper
.4byte CleanThankYouMailPelipper
.4byte ThankYouMailPelipperCallback
.global gUnknown_8116258
gUnknown_8116258: @ 8116258
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte CleanHelperPelipper
.4byte HelperPelipperCallback
.global gUnknown_8116268
gUnknown_8116268: @ 8116268
.byte 0x01, 0x00, 0x00, 0x00
.4byte 1
.4byte sub_802E864
.4byte sub_809C550
.4byte sub_802E890
.global gUnknown_8116278
gUnknown_8116278: @ 8116278
.byte 0x01, 0x00, 0x00, 0x00
.4byte 1
.4byte sub_802DFB0
.4byte sub_802E06C
.4byte sub_802DFD8
.global gUnknown_8116288
gUnknown_8116288: @ 8116288
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte sub_802DC00
.4byte sub_802DBD4
.global gUnknown_8116298
gUnknown_8116298: @ 8116298
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte MakuhitaDojo_Delete
.4byte sub_802FE58
.global gUnknown_81162A8
gUnknown_81162A8: @ 81162A8
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte 1
.4byte 0
.4byte MakuhitaDojo_Delete
.4byte sub_802FE58
.global gUnknown_81162B8
gUnknown_81162B8: @ 81162B8
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte MakuhitaDojo_Delete
.4byte sub_802FE58
.4byte 1
.4byte 0
.4byte MakuhitaDojo_Delete
.4byte sub_802FE58
.global gUnknown_81162C8
gUnknown_81162C8: @ 81162C8
.byte 0x00, 0x00, 0x00, 0x00
.4byte CreateTestTracker
.4byte sub_809C464
.4byte HandleTestTrackerState
.4byte 0
.4byte CreateTestTracker
.4byte sub_809C464
.4byte HandleTestTrackerState
.global gUnknown_81162D8
gUnknown_81162D8: @ 81162D8
.byte 0x00, 0x00, 0x00, 0x00
.4byte sub_8035678
.4byte sub_809C478
.4byte sub_80356A0
.4byte 0
.4byte sub_8035678
.4byte sub_809C478
.4byte sub_80356A0
.global gUnknown_81162E8
gUnknown_81162E8: @ 81162E8
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte sub_809C4B0
.4byte sub_803B120
.4byte 0
.4byte 0
.4byte sub_809C4B0
.4byte sub_803B120
.global gUnknown_81162F8
gUnknown_81162F8: @ 81162F8
.byte 0x01, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte sub_809C414
.4byte sub_8025354
.4byte 1
.4byte 0
.4byte sub_809C414
.4byte sub_8025354
.global gUnknown_8116308
gUnknown_8116308: @ 8116308
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.byte 0x00, 0x00, 0x00, 0x00
.4byte sub_809CD48
.4byte 0
.4byte 0
.4byte 0
.4byte sub_809CD48
.global gUnknown_8116318
gUnknown_8116318: @ 8116318
@ replacing .incbin "baserom.gba", 0x116318, 0xA4
.byte 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
.4byte sub_801B72C
.4byte sub_801B6AC
.4byte 1
.4byte 0
.4byte sub_801B72C
.4byte sub_801B6AC
.byte 0x70, 0x6b, 0x73, 0x64, 0x69, 0x72, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x6b, 0x73, 0x64
.byte 0x69, 0x72, 0x30, 0x00
@@ -305,9 +304,16 @@ gUnknown_8116390: @ 8116390
.global gUnknown_81163BC
gUnknown_81163BC: @ 81163BC
@ replacing .incbin "baserom.gba", 0x1163BC, 0x28
.byte 0x37, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x69, 0x00, 0xf4, 0x01
.byte 0x3a, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x69, 0x00, 0xf4, 0x01, 0x14, 0x00, 0x00, 0x00
.byte 0x3f, 0x00, 0x00, 0x00, 0x69, 0x00, 0x10, 0x27
.byte 0x37, 0x00, 0x00, 0x00
.byte 0x42, 0x00, 0x00, 0x00
.byte 0x3f, 0x00, 0x00, 0x00
.byte 0x69, 0x00, 0xf4, 0x01
.byte 0x3a, 0x00, 0x00, 0x00
.byte 0x3f, 0x00, 0x00, 0x00
.byte 0x69, 0x00, 0xf4, 0x01
.byte 0x14, 0x00, 0x00, 0x00
.byte 0x3f, 0x00, 0x00, 0x00
.byte 0x69, 0x00, 0x10, 0x27
.global gUnknown_81163E4
gUnknown_81163E4: @ 81163E4

View File

@@ -664,7 +664,7 @@
"probability": 2000
},
{
"species": "MONSTER_ILLIMISE",
"species": "MONSTER_ILLUMISE",
"level": 15,
"probability": 2000
},

View File

@@ -63,7 +63,7 @@
"probability": 3334
},
{
"species": "MONSTER_ILLIMISE",
"species": "MONSTER_ILLUMISE",
"level": 15,
"probability": 3333
},

View File

@@ -2299,7 +2299,7 @@
"probability": 800
},
{
"species": "MONSTER_ILLIMISE",
"species": "MONSTER_ILLUMISE",
"level": 20,
"probability": 1200
},
@@ -2349,7 +2349,7 @@
"probability": 2105
},
{
"species": "MONSTER_ILLIMISE",
"species": "MONSTER_ILLUMISE",
"level": 20,
"probability": 1579
},
@@ -2404,7 +2404,7 @@
"probability": 1333
},
{
"species": "MONSTER_ILLIMISE",
"species": "MONSTER_ILLUMISE",
"level": 20,
"probability": 1000
},
@@ -2459,7 +2459,7 @@
"probability": 1380
},
{
"species": "MONSTER_ILLIMISE",
"species": "MONSTER_ILLUMISE",
"level": 20,
"probability": 1034
},

View File

@@ -969,7 +969,7 @@
"probability": 816
},
{
"species": "MONSTER_ILLIMISE",
"species": "MONSTER_ILLUMISE",
"level": 20,
"probability": 1224
},
@@ -1029,7 +1029,7 @@
"probability": 1510
},
{
"species": "MONSTER_ILLIMISE",
"species": "MONSTER_ILLUMISE",
"level": 20,
"probability": 1132
},
@@ -1074,7 +1074,7 @@
"probability": 1861
},
{
"species": "MONSTER_ILLIMISE",
"species": "MONSTER_ILLUMISE",
"level": 20,
"probability": 1395
},

View File

@@ -1,6 +1,7 @@
.section .rodata
@ friend_rescue.c
.align 2,0
.string "pksdir0\0"
.global gUnknown_80E2068
gUnknown_80E2068: @ 80E2068

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,13 @@
#ifndef GUARD_ADVENTURE_LOG_H
#define GUARD_ADVENTURE_LOG_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA0
typedef struct AdventureLog
{
MenuInputStruct input;
/* 0x0 */ MenuInputStruct input;
u32 unk34;
UnkTextStruct2 *unk38;
UnkTextStruct2 unk3C[4];
@@ -16,6 +16,6 @@ typedef struct AdventureLog
void CleanAdventureLogScreen(void);
bool8 CreateAdventureLogScreen(u32 kind);
u32 HandleAdventureLogInput(u8);
u32 HandleAdventureLogInput(bool8);
#endif // GUARD_ADVENTURE_LOG_H

8
include/code_2.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef GUARD_CODE_2_H
#define GUARD_CODE_2_H
// code_2.s
extern void sub_8001024(u32 *);
extern void sub_8001044(u32 *);
#endif // GUARD_CODE_2_H

View File

@@ -1,8 +1,8 @@
#ifndef GUARD_CODE_801B3C0_H
#define GUARD_CODE_801B3C0_H
#include "input.h"
#include "items.h"
#include "structs/menu.h"
#include "structs/subStruct_203B240.h"
#include "structs/str_text.h"

View File

@@ -2,9 +2,8 @@
#define CODE_801EE10_H
#include "constants/move.h"
#include "input.h"
#include "pokemon.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size 0xBC

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_CODE_8023144_H
#define GUARD_CODE_8023144_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x3FC

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_CODE_8024458_H
#define GUARD_CODE_8024458_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
struct unkStruct_203B2AC

View File

@@ -2,8 +2,8 @@
#define GUARD_CODE_802DB28_H
#include "file_system.h"
#include "wonder_mail.h"
#include "structs/str_text.h"
#include "structs/str_wonder_mail.h"
// size: 0xA8
struct unkStruct_203B2FC

View File

@@ -1,8 +1,8 @@
#ifndef GUARD_CODE_802DE84_H
#define GUARD_CODE_802DE84_H
#include "code_802C39C.h"
#include "input.h"
#include "structs/str_802C39C.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x7C

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_CODE_802F204_H
#define GUARD_CODE_802F204_H
#include "wonder_mail.h"
#include "structs/str_wonder_mail.h"
u32 sub_802F204(unkStruct_802F204 *, bool8 displayClientSprite);
u32 sub_802F298(void);

View File

@@ -1,31 +1,10 @@
#ifndef GUARD_CODE_803B050_H
#define GUARD_CODE_803B050_H
#include "code_802C39C.h"
// size: 0x8
typedef struct unkStruct_80E9920
{
/* 0x0 */ s16 unkA;
/* 0x2 */ s16 unkB;
/* 0x4 */ u8 *text;
} unkStruct_80E9920;
// size: 0xC
typedef struct unkStruct_80E9F8C
{
/* 0x0 */ s16 unkA;
/* 0x2 */ s16 unkB;
/* 0x4 */ u8 *text1;
/* 0x8 */ u8 *text2;
} unkStruct_80E9F8C;
void CreateRescueDescription(unkStruct_802C39C *);
void CreateRescueTitle(unkStruct_802C39C *);
void sub_803B6B0(s32 x, s32 y, u8 index, u32);
#include "structs/str_802C39C.h"
// code_803B050.s
extern unkStruct_803B344 *sub_803B344(u8);
extern void sub_803B35C(WonderMail *, unkStruct_802C39C *);
#endif // GUARD_CODE_803B050_H

View File

@@ -1,9 +1,11 @@
#ifndef GUARD_CODE_803C1D0_H
#define GUARD_CODE_803C1D0_H
#include "wonder_mail.h"
#include "structs/str_wonder_mail.h"
// code_803C1D0.s
extern void sub_803C21C(WonderMail *, unkStruct_802F204*);
extern u8 sub_803C1D0(DungeonLocation *, u8);
extern u8 *sub_803C1F0(u8);
extern void sub_803C21C(WonderMail *, unkStruct_802F204 *);
#endif // GUARD_CODE_803C1D0_H

9
include/code_803D110.h Normal file
View File

@@ -0,0 +1,9 @@
#ifndef GUARD_CODE_803D110_H
#define GUARD_CODE_803D110_H
#include "structs/str_wonder_mail.h"
// code_803D110.s
extern void sub_803D414(u8 *, WonderMail *);
#endif // GUARD_CODE_803D110_H

8
include/code_8094D28.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef GUARD_CODE_8094D28_H
#define GUARD_CODE_8094D28_H
// code_8094D28.s
extern void sub_8094D28(s32);
extern s32 sub_8094E4C(void);
#endif // GUARD_CODE_8094D28_H

View File

@@ -5,34 +5,7 @@
#include "structs/str_dungeon.h"
#include "items.h"
#include "pokemon.h"
// size: 0x8
typedef struct WonderMailSub
{
/* 0x0 */ DungeonLocation dungeon;
/* 0x4 */ u32 seed;
} WonderMailSub;
// size: 0x30
typedef struct unkStruct_203B480
{
/* 0x0 */ u8 mailType;
/* 0x1 */ u8 missionType;
WonderMailSub unk4;
/* 0xC */ s16 clientSpecies;
/* 0xE */ s16 targetSpecies;
union unk10_temp
{
u32 unk10;
u16 unk10_u16;
} unk10;
/* 0x14 */ u8 playerName[0x20 - 0x14];
Item item;
u32 unk24;
u32 unk28;
/* 0x2C */ s8 rescuesAllowed;
u8 unk2D;
} unkStruct_203B480;
#include "structs/str_wonder_mail.h"
// size: 0x5C
typedef struct unkStruct_203B484

View File

@@ -1,8 +1,8 @@
#ifndef GUARD_CODE_80958E8_H
#define GUARD_CODE_80958E8_H
#include "wonder_mail.h"
#include "constants/mailbox.h"
#include "structs/str_wonder_mail.h"
// size: 0xC
typedef struct subStruct_203B490
@@ -18,8 +18,8 @@ typedef struct unkStruct_203B490
/* 0x0 */ WonderMail mailboxSlots[NUM_MAILBOX_SLOTS];
/* 0x50 */ WonderMail pelipperBoardJobs[MAX_ACCEPTED_JOBS];
/* 0xF0 */ WonderMail jobSlots[MAX_ACCEPTED_JOBS];
u8 unk190[0x28];
u8 unk1B8[0x78];
u8 unk190[40];
u8 unk1B8[120];
subStruct_203B490 unk230[16];
/* 0x2F0 */ u8 PKMNNewsReceived[NUM_POKEMON_NEWS];
bool8 unk328;

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_CODE_80958E8_1_H
#define GUARD_CODE_80958E8_1_H
#include "wonder_mail.h"
#include "structs/str_wonder_mail.h"
// size: 0x8
struct unkStruct_8096AF8
@@ -11,11 +11,17 @@ struct unkStruct_8096AF8
/* 0x4 */ u16 targetSpecies;
};
bool8 AcceptJob(WonderMail *mail);
s32 CountJobsinDungeon(u8 dungeon);
WonderMail *GetJobSlotInfo(u8 index);
s32 GetNumAcceptedJobs(void);
bool8 IsJobSlotEmpty(u8 index);
bool8 IsMailinJobSlot(WonderMail *mail);
void ResetJobSlot(u8 index);
bool8 sub_809693C(WonderMail *mail);
void sub_8096AF8(struct unkStruct_8096AF8 *, u8 slotIndex, u8 dungeon);
bool8 sub_8096C08(u8 *jobIndex);
// code_80958E8_1.s
extern WonderMail *GetPelipperBoardSlotInfo(u8);

View File

@@ -3,6 +3,10 @@
// code_8096AF8.s
extern u8 CheckPKMNNewsSlot(u8);
extern void sub_8096C80(void);
extern void sub_8096D24(void);
extern u8 *sub_8096DD8(void);
extern u8 *sub_8096DE8(void);
extern bool8 sub_8096E2C(void);
extern void sub_8096EEC(void);

View File

@@ -1,6 +1,8 @@
#ifndef GUARD_CODE_80972F4_H
#define GUARD_CODE_80972F4_H
#include "structs/str_wonder_mail.h"
// size: 0x8
typedef struct MissionText
{
@@ -15,6 +17,8 @@ const u8 *GetCurrentMissionText(s16 index);
// TODO: this should probably be bool8 but can't get a match just yet
bool32 IsMazeCompleted(s16 mazeIndex);
bool8 sub_8096F50(WonderMail *mail);
void sub_8097418(s16 index, bool32);
bool8 sub_8097504(s16 mazeIndex);
const u8 *sub_80975DC(u32);

View File

@@ -3,6 +3,7 @@
// code_8098DBC.s
extern void nullsub_104(void);
extern u8 sub_8099328(u8 *);
extern void sub_80993D8(void);
extern void sub_80993E4(void);
extern void sub_8099690(u32);

View File

@@ -37,246 +37,246 @@
#define ITEM_ACTION_TYPE_ORBS 13
// see https://bulbapedia.bulbagarden.net/wiki/List_of_items_by_index_number_(Rescue_Team)
#define ITEM_NOTHING 0x0
#define ITEM_STICK 0x1
#define ITEM_IRON_THORN 0x2
#define ITEM_SILVER_SPIKE 0x3
#define ITEM_GOLD_FANG 0x4
#define ITEM_CACNEA_SPIKE 0x5
#define ITEM_CORSOLA_TWIG 0x6
#define ITEM_GRAVELEROCK 0x7
#define ITEM_GEO_PEBBLE 0x8
#define ITEM_MOBILE_SCARF 0x9
#define ITEM_HEAL_RIBBON 0xA
#define ITEM_TWIST_BAND 0xB
#define ITEM_SCOPE_LENS 0xC
#define ITEM_PATSY_BAND 0xD
#define ITEM_NOSTICK_CAP 0xE
#define ITEM_PIERCE_BAND 0xF
#define ITEM_JOY_RIBBON 0x10
#define ITEM_X_RAY_SPECS 0x11
#define ITEM_PERSIM_BAND 0x12
#define ITEM_POWER_BAND 0x13
#define ITEM_PECHA_SCARF 0x14
#define ITEM_INSOMNISCOPE 0x15
#define ITEM_WARP_SCARF 0x16
#define ITEM_TIGHT_BELT 0x17
#define ITEM_SNEAK_SCARF 0x18
#define ITEM_GOLD_RIBBON 0x19
#define ITEM_GOGGLE_SPECS 0x1A
#define ITEM_DIET_RIBBON 0x1B
#define ITEM_TRAP_SCARF 0x1C
#define ITEM_RACKET_BAND 0x1D
#define ITEM_DEF_SCARF 0x1E
#define ITEM_STAMINA_BAND 0x1F
#define ITEM_PLAIN_RIBBON 0x20
#define ITEM_SPECIAL_BAND 0x21
#define ITEM_ZINC_BAND 0x22
#define ITEM_DETECT_BAND 0x23
#define ITEM_ALERT_SPECS 0x24
#define ITEM_DODGE_SCARF 0x25
#define ITEM_BOUNCE_BAND 0x26
#define ITEM_CURVE_BAND 0x27
#define ITEM_WHIFF_SPECS 0x28
#define ITEM_NO_AIM_SCOPE 0x29
#define ITEM_LOCKON_SPECS 0x2A
#define ITEM_MUNCH_BELT 0x2B
#define ITEM_PASS_SCARF 0x2C
#define ITEM_WEATHER_BAND 0x2D
#define ITEM_FRIEND_BOW 0x2E
#define ITEM_BEAUTY_SCARF 0x2F
#define ITEM_SUN_RIBBON 0x30
#define ITEM_LUNAR_RIBBON 0x31
#define ITEM_RING_D 0x32
#define ITEM_RING_E 0x33
#define ITEM_RING_F 0x34
#define ITEM_HEAL_SEED 0x35
#define ITEM_WISH_STONE 0x36
#define ITEM_ORAN_BERRY 0x37
#define ITEM_SITRUS_BERRY 0x38
#define ITEM_EYEDROP_SEED 0x39
#define ITEM_REVIVER_SEED 0x3A
#define ITEM_BLINKER_SEED 0x3B
#define ITEM_DOOM_SEED 0x3C
#define ITEM_ALLURE_SEED 0x3D
#define ITEM_LIFE_SEED 0x3E
#define ITEM_RAWST_BERRY 0x3F
#define ITEM_HUNGER_SEED 0x40
#define ITEM_QUICK_SEED 0x41
#define ITEM_PECHA_BERRY 0x42
#define ITEM_CHERI_BERRY 0x43
#define ITEM_TOTTER_SEED 0x44
#define ITEM_SLEEP_SEED 0x45
#define ITEM_PLAIN_SEED 0x46
#define ITEM_WARP_SEED 0x47
#define ITEM_BLAST_SEED 0x48
#define ITEM_GINSENG 0x49
#define ITEM_JOY_SEED 0x4A
#define ITEM_CHESTO_BERRY 0x4B
#define ITEM_STUN_SEED 0x4C
#define ITEM_MAX_ELIXIR 0x4D
#define ITEM_PROTEIN 0x4E
#define ITEM_CALCIUM 0x4F
#define ITEM_IRON 0x50
#define ITEM_ZINC 0x51
#define ITEM_APPLE 0x52
#define ITEM_BIG_APPLE 0x53
#define ITEM_GRIMY_FOOD 0x54
#define ITEM_HUGE_APPLE 0x55
#define ITEM_WHITE_GUMMI 0x56
#define ITEM_RED_GUMMI 0x57
#define ITEM_BLUE_GUMMI 0x58
#define ITEM_GRASS_GUMMI 0x59
#define ITEM_YELLOW_GUMMI 0x5A
#define ITEM_CLEAR_GUMMI 0x5B
#define ITEM_ORANGE_GUMMI 0x5C
#define ITEM_PINK_GUMMI 0x5D
#define ITEM_BROWN_GUMMI 0x5E
#define ITEM_SKY_GUMMI 0x5F
#define ITEM_GOLD_GUMMI 0x60
#define ITEM_GREEN_GUMMI 0x61
#define ITEM_GRAY_GUMMI 0x62
#define ITEM_PURPLE_GUMMI 0x63
#define ITEM_ROYAL_GUMMI 0x64
#define ITEM_BLACK_GUMMI 0x65
#define ITEM_SILVER_GUMMI 0x66
#define ITEM_BANANA 0x67
#define ITEM_CHESTNUT 0x68
#define ITEM_POKE 0x69 // 105 (0x69)
#define ITEM_UPGRADE 0x6A
#define ITEM_KINGS_ROCK 0x6B
#define ITEM_THUNDERSTONE 0x6C
#define ITEM_DEEPSEASCALE 0x6D
#define ITEM_DEEPSEATOOTH 0x6E
#define ITEM_SUN_STONE 0x6F
#define ITEM_MOON_STONE 0x70
#define ITEM_FIRE_STONE 0x71
#define ITEM_WATER_STONE 0x72
#define ITEM_METAL_COAT 0x73
#define ITEM_LEAF_STONE 0x74
#define ITEM_DRAGON_SCALE 0x75
#define ITEM_LINK_CABLE 0x76
#define ITEM_ICE_PART 0x77
#define ITEM_STEEL_PART 0x78
#define ITEM_ROCK_PART 0x79
#define ITEM_MUSIC_BOX 0x7A
#define ITEM_KEY 0x7B
#define ITEM_TM_USED_TM 0x7C
#define ITEM_TM_FOCUS_PUNCH 0x7D
#define ITEM_TM_DRAGON_CLAW 0x7E
#define ITEM_TM_WATER_PULSE 0x7F
#define ITEM_TM_CALM_MIND 0x80
#define ITEM_TM_ROAR 0x81
#define ITEM_TM_TOXIC 0x82
#define ITEM_TM_HAIL 0x83
#define ITEM_TM_BULK_UP 0x84
#define ITEM_TM_BULLET_SEED 0x85
#define ITEM_TM_HIDDEN_POWER 0x86
#define ITEM_TM_SUNNY_DAY 0x87
#define ITEM_TM_TAUNT 0x88
#define ITEM_TM_ICE_BEAM 0x89
#define ITEM_TM_BLIZZARD 0x8A
#define ITEM_TM_HYPER_BEAM 0x8B
#define ITEM_TM_LIGHT_SCREEN 0x8C
#define ITEM_TM_PROTECT 0x8D
#define ITEM_TM_RAIN_DANCE 0x8E
#define ITEM_TM_GIGA_DRAIN 0x8F
#define ITEM_TM_SAFEGUARD 0x90
#define ITEM_TM_FRUSTRATION 0x91
#define ITEM_TM_SOLARBEAM 0x92
#define ITEM_TM_IRON_TAIL 0x93
#define ITEM_TM_THUNDERBOLT 0x94
#define ITEM_TM_THUNDER 0x95
#define ITEM_TM_EARTHQUAKE 0x96
#define ITEM_TM_RETURN 0x97
#define ITEM_TM_DIG 0x98
#define ITEM_TM_PSYCHIC 0x99
#define ITEM_TM_SHADOW_BALL 0x9A
#define ITEM_TM_BRICK_BREAK 0x9B
#define ITEM_TM_DOUBLE_TEAM 0x9C
#define ITEM_TM_REFLECT 0x9D
#define ITEM_TM_SHOCK_WAVE 0x9E
#define ITEM_TM_FLAMETHROWER 0x9F
#define ITEM_TM_SLUDGE_BOMB 0xA0
#define ITEM_TM_SANDSTORM 0xA1
#define ITEM_TM_FIRE_BLAST 0xA2
#define ITEM_TM_ROCK_TOMB 0xA3
#define ITEM_TM_AERIAL_ACE 0xA4
#define ITEM_TM_TORMENT 0xA5
#define ITEM_TM_FACADE 0xA6
#define ITEM_TM_SECRET_POWER 0xA7
#define ITEM_TM_REST 0xA8
#define ITEM_TM_ATTRACT 0xA9
#define ITEM_TM_THIEF 0xAA
#define ITEM_TM_STEEL_WING 0xAB
#define ITEM_TM_SKILL_SWAP 0xAC
#define ITEM_TM_SNATCH 0xAD
#define ITEM_TM_OVERHEAT 0xAE
#define ITEM_TM_WIDE_SLASH 0xAF
#define ITEM_TM_EXCAVATE 0xB0
#define ITEM_TM_SPIN_SLASH 0xB1
#define ITEM_SEE_TRAP_ORB 0xB2
#define ITEM_MUG_ORB 0xB3
#define ITEM_REBOUND_ORB 0xB4
#define ITEM_LOB_ORB 0xB5
#define ITEM_SWITCHER_ORB 0xB6
#define ITEM_BLOWBACK_ORB 0xB7
#define ITEM_WARP_ORB 0xB8
#define ITEM_TRANSFER_ORB 0xB9
#define ITEM_SLOW_ORB 0xBA
#define ITEM_QUICK_ORB 0xBB
#define ITEM_LUMINOUS_ORB 0xBC
#define ITEM_PETRIFY_ORB 0xBD
#define ITEM_STAYAWAY_ORB 0xBE
#define ITEM_POUNCE_ORB 0xBF
#define ITEM_TRAWL_ORB 0xC0
#define ITEM_CLEANSE_ORB 0xC1
#define ITEM_OBSERVER_ORB 0xC2
#define ITEM_DECOY_ORB 0xC3
#define ITEM_SLUMBER_ORB 0xC4
#define ITEM_TOTTER_ORB 0xC5
#define ITEM_TWO_EDGE_ORB 0xC6
#define ITEM_SILENCE_ORB 0xC7
#define ITEM_ESCAPE_ORB 0xC8
#define ITEM_SCANNER_ORB 0xC9
#define ITEM_RADAR_ORB 0xCA
#define ITEM_DROUGHT_ORB 0xCB
#define ITEM_TRAPBUST_ORB 0xCC
#define ITEM_ROLLCALL_ORB 0xCD
#define ITEM_INVISIFY_ORB 0xCE
#define ITEM_ONE_SHOT_ORB 0xCF
#define ITEM_IDENTIFY_ORB 0xD0
#define ITEM_VACUUM_CUT 0xD1
#define ITEM_REVIVER_ORB 0xD2
#define ITEM_SHOCKER_ORB 0xD3
#define ITEM_SIZEBUST_ORB 0xD4
#define ITEM_ONE_ROOM_ORB 0xD5
#define ITEM_FILL_IN_ORB 0xD6
#define ITEM_TRAPPER_ORB 0xD7
#define ITEM_POSSESS_ORB 0xD8
#define ITEM_ITEMIZER_ORB 0xD9
#define ITEM_HURL_ORB 0xDA
#define ITEM_MOBILE_ORB 0xDB
#define ITEM_TOSS_ORB 0xDC
#define ITEM_STAIRS_ORB 0xDD
#define ITEM_LONGTOSS_ORB 0xDE
#define ITEM_PIERCE_ORB 0xDF
#define ITEM_HM_CUT 0xE0
#define ITEM_HM_FLY 0xE1
#define ITEM_HM_SURF 0xE2
#define ITEM_HM_STRENGTH 0xE3
#define ITEM_HM_FLASH 0xE4
#define ITEM_HM_ROCK_SMASH 0xE5
#define ITEM_HM_WATERFALL 0xE6
#define ITEM_HM_DIVE 0xE7
#define ITEM_LINK_BOX 0xE8
#define ITEM_SWITCH_BOX 0xE9
#define ITEM_WEAVILE_FIG 0xEA
#define ITEM_MIME_JR_FIG 0xEB
#define ITEM_BEATUP_ORB 0xEC
#define ITEM_G_MACHINE_6 0xED
#define ITEM_G_MACHINE_7 0xEE
#define ITEM_G_MACHINE_8 0xEF
#define ITEM_NOTHING 0
#define ITEM_STICK 1
#define ITEM_IRON_THORN 2
#define ITEM_SILVER_SPIKE 3
#define ITEM_GOLD_FANG 4
#define ITEM_CACNEA_SPIKE 5
#define ITEM_CORSOLA_TWIG 6
#define ITEM_GRAVELEROCK 7
#define ITEM_GEO_PEBBLE 8
#define ITEM_MOBILE_SCARF 9
#define ITEM_HEAL_RIBBON 10
#define ITEM_TWIST_BAND 11
#define ITEM_SCOPE_LENS 12
#define ITEM_PATSY_BAND 13
#define ITEM_NOSTICK_CAP 14
#define ITEM_PIERCE_BAND 15
#define ITEM_JOY_RIBBON 16
#define ITEM_X_RAY_SPECS 17
#define ITEM_PERSIM_BAND 18
#define ITEM_POWER_BAND 19
#define ITEM_PECHA_SCARF 20
#define ITEM_INSOMNISCOPE 21
#define ITEM_WARP_SCARF 22
#define ITEM_TIGHT_BELT 23
#define ITEM_SNEAK_SCARF 24
#define ITEM_GOLD_RIBBON 25
#define ITEM_GOGGLE_SPECS 26
#define ITEM_DIET_RIBBON 27
#define ITEM_TRAP_SCARF 28
#define ITEM_RACKET_BAND 29
#define ITEM_DEF_SCARF 30
#define ITEM_STAMINA_BAND 31
#define ITEM_PLAIN_RIBBON 32
#define ITEM_SPECIAL_BAND 33
#define ITEM_ZINC_BAND 34
#define ITEM_DETECT_BAND 35
#define ITEM_ALERT_SPECS 36
#define ITEM_DODGE_SCARF 37
#define ITEM_BOUNCE_BAND 38
#define ITEM_CURVE_BAND 39
#define ITEM_WHIFF_SPECS 40
#define ITEM_NO_AIM_SCOPE 41
#define ITEM_LOCKON_SPECS 42
#define ITEM_MUNCH_BELT 43
#define ITEM_PASS_SCARF 44
#define ITEM_WEATHER_BAND 45
#define ITEM_FRIEND_BOW 46
#define ITEM_BEAUTY_SCARF 47
#define ITEM_SUN_RIBBON 48
#define ITEM_LUNAR_RIBBON 49
#define ITEM_RING_D 50
#define ITEM_RING_E 51
#define ITEM_RING_F 52
#define ITEM_HEAL_SEED 53
#define ITEM_WISH_STONE 54
#define ITEM_ORAN_BERRY 55
#define ITEM_SITRUS_BERRY 56
#define ITEM_EYEDROP_SEED 57
#define ITEM_REVIVER_SEED 58
#define ITEM_BLINKER_SEED 59
#define ITEM_DOOM_SEED 60
#define ITEM_ALLURE_SEED 61
#define ITEM_LIFE_SEED 62
#define ITEM_RAWST_BERRY 63
#define ITEM_HUNGER_SEED 64
#define ITEM_QUICK_SEED 65
#define ITEM_PECHA_BERRY 66
#define ITEM_CHERI_BERRY 67
#define ITEM_TOTTER_SEED 68
#define ITEM_SLEEP_SEED 69
#define ITEM_PLAIN_SEED 70
#define ITEM_WARP_SEED 71
#define ITEM_BLAST_SEED 72
#define ITEM_GINSENG 73
#define ITEM_JOY_SEED 74
#define ITEM_CHESTO_BERRY 75
#define ITEM_STUN_SEED 76
#define ITEM_MAX_ELIXIR 77
#define ITEM_PROTEIN 78
#define ITEM_CALCIUM 79
#define ITEM_IRON 80
#define ITEM_ZINC 81
#define ITEM_APPLE 82
#define ITEM_BIG_APPLE 83
#define ITEM_GRIMY_FOOD 84
#define ITEM_HUGE_APPLE 85
#define ITEM_WHITE_GUMMI 86
#define ITEM_RED_GUMMI 87
#define ITEM_BLUE_GUMMI 88
#define ITEM_GRASS_GUMMI 89
#define ITEM_YELLOW_GUMMI 90
#define ITEM_CLEAR_GUMMI 91
#define ITEM_ORANGE_GUMMI 92
#define ITEM_PINK_GUMMI 93
#define ITEM_BROWN_GUMMI 94
#define ITEM_SKY_GUMMI 95
#define ITEM_GOLD_GUMMI 96
#define ITEM_GREEN_GUMMI 97
#define ITEM_GRAY_GUMMI 98
#define ITEM_PURPLE_GUMMI 99
#define ITEM_ROYAL_GUMMI 100
#define ITEM_BLACK_GUMMI 101
#define ITEM_SILVER_GUMMI 102
#define ITEM_BANANA 103
#define ITEM_CHESTNUT 104
#define ITEM_POKE 105
#define ITEM_UPGRADE 106
#define ITEM_KINGS_ROCK 107
#define ITEM_THUNDERSTONE 108
#define ITEM_DEEPSEASCALE 109
#define ITEM_DEEPSEATOOTH 110
#define ITEM_SUN_STONE 111
#define ITEM_MOON_STONE 112
#define ITEM_FIRE_STONE 113
#define ITEM_WATER_STONE 114
#define ITEM_METAL_COAT 115
#define ITEM_LEAF_STONE 116
#define ITEM_DRAGON_SCALE 117
#define ITEM_LINK_CABLE 118
#define ITEM_ICE_PART 119
#define ITEM_STEEL_PART 120
#define ITEM_ROCK_PART 121
#define ITEM_MUSIC_BOX 122
#define ITEM_KEY 123
#define ITEM_TM_USED_TM 124
#define ITEM_TM_FOCUS_PUNCH 125
#define ITEM_TM_DRAGON_CLAW 126
#define ITEM_TM_WATER_PULSE 127
#define ITEM_TM_CALM_MIND 128
#define ITEM_TM_ROAR 129
#define ITEM_TM_TOXIC 130
#define ITEM_TM_HAIL 131
#define ITEM_TM_BULK_UP 132
#define ITEM_TM_BULLET_SEED 133
#define ITEM_TM_HIDDEN_POWER 134
#define ITEM_TM_SUNNY_DAY 135
#define ITEM_TM_TAUNT 136
#define ITEM_TM_ICE_BEAM 137
#define ITEM_TM_BLIZZARD 138
#define ITEM_TM_HYPER_BEAM 139
#define ITEM_TM_LIGHT_SCREEN 140
#define ITEM_TM_PROTECT 141
#define ITEM_TM_RAIN_DANCE 142
#define ITEM_TM_GIGA_DRAIN 143
#define ITEM_TM_SAFEGUARD 144
#define ITEM_TM_FRUSTRATION 145
#define ITEM_TM_SOLARBEAM 146
#define ITEM_TM_IRON_TAIL 147
#define ITEM_TM_THUNDERBOLT 148
#define ITEM_TM_THUNDER 149
#define ITEM_TM_EARTHQUAKE 150
#define ITEM_TM_RETURN 151
#define ITEM_TM_DIG 152
#define ITEM_TM_PSYCHIC 153
#define ITEM_TM_SHADOW_BALL 154
#define ITEM_TM_BRICK_BREAK 155
#define ITEM_TM_DOUBLE_TEAM 156
#define ITEM_TM_REFLECT 157
#define ITEM_TM_SHOCK_WAVE 158
#define ITEM_TM_FLAMETHROWER 159
#define ITEM_TM_SLUDGE_BOMB 160
#define ITEM_TM_SANDSTORM 161
#define ITEM_TM_FIRE_BLAST 162
#define ITEM_TM_ROCK_TOMB 163
#define ITEM_TM_AERIAL_ACE 164
#define ITEM_TM_TORMENT 165
#define ITEM_TM_FACADE 166
#define ITEM_TM_SECRET_POWER 167
#define ITEM_TM_REST 168
#define ITEM_TM_ATTRACT 169
#define ITEM_TM_THIEF 170
#define ITEM_TM_STEEL_WING 171
#define ITEM_TM_SKILL_SWAP 172
#define ITEM_TM_SNATCH 173
#define ITEM_TM_OVERHEAT 174
#define ITEM_TM_WIDE_SLASH 175
#define ITEM_TM_EXCAVATE 176
#define ITEM_TM_SPIN_SLASH 177
#define ITEM_SEE_TRAP_ORB 178
#define ITEM_MUG_ORB 179
#define ITEM_REBOUND_ORB 180
#define ITEM_LOB_ORB 181
#define ITEM_SWITCHER_ORB 182
#define ITEM_BLOWBACK_ORB 183
#define ITEM_WARP_ORB 184
#define ITEM_TRANSFER_ORB 185
#define ITEM_SLOW_ORB 186
#define ITEM_QUICK_ORB 187
#define ITEM_LUMINOUS_ORB 188
#define ITEM_PETRIFY_ORB 189
#define ITEM_STAYAWAY_ORB 190
#define ITEM_POUNCE_ORB 191
#define ITEM_TRAWL_ORB 192
#define ITEM_CLEANSE_ORB 193
#define ITEM_OBSERVER_ORB 194
#define ITEM_DECOY_ORB 195
#define ITEM_SLUMBER_ORB 196
#define ITEM_TOTTER_ORB 197
#define ITEM_TWO_EDGE_ORB 198
#define ITEM_SILENCE_ORB 199
#define ITEM_ESCAPE_ORB 200
#define ITEM_SCANNER_ORB 201
#define ITEM_RADAR_ORB 202
#define ITEM_DROUGHT_ORB 203
#define ITEM_TRAPBUST_ORB 204
#define ITEM_ROLLCALL_ORB 205
#define ITEM_INVISIFY_ORB 206
#define ITEM_ONE_SHOT_ORB 207
#define ITEM_IDENTIFY_ORB 208
#define ITEM_VACUUM_CUT 209
#define ITEM_REVIVER_ORB 210
#define ITEM_SHOCKER_ORB 211
#define ITEM_SIZEBUST_ORB 212
#define ITEM_ONE_ROOM_ORB 213
#define ITEM_FILL_IN_ORB 214
#define ITEM_TRAPPER_ORB 215
#define ITEM_POSSESS_ORB 216
#define ITEM_ITEMIZER_ORB 217
#define ITEM_HURL_ORB 218
#define ITEM_MOBILE_ORB 219
#define ITEM_TOSS_ORB 220
#define ITEM_STAIRS_ORB 221
#define ITEM_LONGTOSS_ORB 222
#define ITEM_PIERCE_ORB 223
#define ITEM_HM_CUT 224
#define ITEM_HM_FLY 225
#define ITEM_HM_SURF 226
#define ITEM_HM_STRENGTH 227
#define ITEM_HM_FLASH 228
#define ITEM_HM_ROCK_SMASH 229
#define ITEM_HM_WATERFALL 230
#define ITEM_HM_DIVE 231
#define ITEM_LINK_BOX 232
#define ITEM_SWITCH_BOX 233
#define ITEM_WEAVILE_FIG 234
#define ITEM_MIME_JR_FIG 235
#define ITEM_BEATUP_ORB 236
#define ITEM_G_MACHINE_6 237
#define ITEM_G_MACHINE_7 238
#define ITEM_G_MACHINE_8 239
#define NUMBER_OF_ITEM_IDS (ITEM_G_MACHINE_8 + 1)

View File

@@ -341,7 +341,7 @@
#define MONSTER_PLUSLE 336
#define MONSTER_MINUN 337
#define MONSTER_VOLBEAT 338
#define MONSTER_ILLIMISE 339
#define MONSTER_ILLUMISE 339
#define MONSTER_ROSELIA 340
#define MONSTER_GULPIN 341
#define MONSTER_SWALOT 342

View File

@@ -1,7 +1,8 @@
#ifndef GUARD_CONSTANTS_PERSONALITY_TEST_H
#define GUARD_CONSTANTS_PERSONALITY_TEST_H
enum NaturePersonalities {
enum NaturePersonalities
{
HARDY,
DOCILE,
BRAVE,
@@ -25,4 +26,4 @@ enum NaturePersonalities {
#define BRAVE_2B_TRIGGER 99
#endif
#endif // GUARD_CONSTANTS_PERSONALITY_TEST_H

View File

@@ -42,6 +42,7 @@ u32 GetMaxItemsAllowed(u8 dungeon);
s8 GetRescuesAllowed(u8 dungeon);
bool8 HasCheckpoint(u8 dungeon);
void PrintYellowDungeonNametoBuffer(u8 *buffer, DungeonLocation *dungeonLocation);
void PrintDungeonLocationtoBuffer(u8 *buffer, DungeonLocation *dungeonLocation);
u32 sub_80908D8(DungeonLocation *dungeon);
u8 sub_8090910(DungeonLocation *dungeon, u32 param_2);

View File

@@ -4,8 +4,8 @@
#include "code_8094F88.h"
#include "items.h"
#include "pokemon.h"
#include "wonder_mail.h"
#include "structs/menu.h"
#include "structs/str_wonder_mail.h"
// size: 0x568
typedef struct WonderMailStruct_203B33C
@@ -53,4 +53,4 @@ enum FriendRescueMenuStates {
FRIEND_RESCUE_MENU_DEFAULT_FALLBACK = 0x7e,
};
#endif
#endif

8
include/globaldata.h Normal file
View File

@@ -0,0 +1,8 @@
// This file exists because every file introduces this string into the (.rodata).
// There was no #ifdef guard in this file in the source, which is why it happens for every source file.
// Luckily, this tells us where file boundaries are exactly.
// This file gets included by each source file, just like in Chunsoft's original source, so we can have this string easily just like they did.
// Later, we can move this into "global.h" before the #ifdef guard. But we can only do this if "global.h" isn't included outside of .c files...
ALIGNED(4) static const u8 sFill[] = _("pksdir0");

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_HINTS_MENU1_H
#define GUARD_HINTS_MENU1_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x9C

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_HINTS_MENU2_H
#define GUARD_HINTS_MENU2_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA0

View File

@@ -47,43 +47,6 @@ typedef struct UnusedInputStruct
u8 unk29;
} UnusedInputStruct;
// size: 0xC
typedef struct MenuInputStructSub
{
u8 unk0;
/* 0x1 */ u8 a_button;
/* 0x2 */ u8 b_button;
/* 0x3 */ u8 dpad_right;
/* 0x4 */ u8 dpad_left;
u8 fill5[3];
u16 unk8;
s16 unkA;
} MenuInputStructSub;
// size: 0x34
typedef struct MenuInputStruct
{
s32 unk0;
u16 unk4;
s16 unk6;
s16 unk8; // Maybe Position
s16 unkA;
s16 unkC; // Maybe Position
s16 unkE;
u32 unk10;
s16 unk14; // Maybe Position
s16 unk16;
/* 0x18 */ s16 menuIndex;
s16 unk1A;
s16 unk1C;
s16 unk1E;
s16 unk20;
s16 unk22;
u16 unk24;
u16 unk26;
MenuInputStructSub unk28;
} MenuInputStruct;
extern Inputs gRealInputs;
void InitInput(void);

View File

@@ -2,8 +2,8 @@
#define GUARD_KANGASKHAN_STORAGE1_H
#include "file_system.h"
#include "items.h"
#include "structs/menu.h"
#include "structs/str_items.h"
#include "structs/str_text.h"
enum KangaskhanStorageStates

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_KECLEON_BROS2_H
#define GUARD_KECLEON_BROS2_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA0

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_KECLEON_BROS3_H
#define GUARD_KECLEON_BROS3_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA0

View File

@@ -2,7 +2,7 @@
#define GUARD_KECLEON_BROS4_H
#include "constants/item.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xF4

View File

@@ -4,7 +4,7 @@
#include "structs/menu.h"
#include "structs/str_text.h"
#include "constants/mailbox.h"
#include "code_802C39C.h"
#include "structs/str_802C39C.h"
struct unkStruct_203B304
{
@@ -23,7 +23,6 @@ struct unkStruct_203B304
};
extern void SetMailboxState(u32);
extern s32 GetNumAcceptedJobs(void);
enum MailBoxStates
{

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_MAILBOX_8095F8C_H
#define GUARD_MAILBOX_8095F8C_H
#include "wonder_mail.h"
#include "structs/str_wonder_mail.h"
WonderMail *GetMailboxSlotInfo(u8 index);
bool8 IsMailSlotEmpty(u8 index);

View File

@@ -2,7 +2,7 @@
#define GUARD_MAKUHITA_DOJO2_H
#include "constants/dungeon.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xD0

View File

@@ -1,87 +0,0 @@
#ifndef GUARD_PERSONALITY_TEST_H
#define GUARD_PERSONALITY_TEST_H
#include "constants/personality_test.h"
#include "input.h"
#include "structs/str_text.h"
// Definitely wrong but need to figure out better structure later
struct FaceData
{
/* 0x0 */ u8 *unk0[5];
};
struct PersonalityAnswer
{
const char * text;
int effect;
};
struct PersonalityQuestion
{
const char * question;
const struct PersonalityAnswer * answers;
const u8 (*effects);
};
struct PersonalityTestTracker
{
/* 0x0 */ s32 FrameCounter;
/* 0x4 */ u32 unk4;
/* 0x8 */ s16 StarterID;
/* 0xA */ s16 PartnerID;
u8 padding[0x20 - 0xC];
/* 0x20 */ char PartnerNick[0x14];
/* 0x34 */ u32 TestState;
/* 0x38 */ s32 QuestionCounter;
/* 0x3C */ u32 currQuestionIndex;
/* 0x40 */ u8 playerNature;
/* 0x44 */ s32 NatureTotals[NUM_PERSONALITIES];
/* 0x78 */ u8 QuestionTracker[NUM_QUIZ_QUESTIONS];
/* 0xB0 */ u32 playerGender; // 1 = Female, 0 = Male
/* 0xB4 */ MenuInputStructSub input;
};
struct PersonalityStruct_203B404
{
// Size: 0xB8
/* 0x0 */ s16 StarterID;
/* 0x2 */ s16 PartnerArray[NUM_PARTNERS];
u8 unk16;
/* 0x18 */ MenuInputStruct input;
u32 unk4C;
/* 0x50 */ UnkTextStruct2 *unk50;
/* 0x54 */ UnkTextStruct2 unk54[4];
/* 0xB4 */ u8 unkb4[4];
};
void InitializeTestStats(void);
void GenerateNewQuestionOrGender(void);
void CallPromptNewQuestion(void);
void PrintPersonalityTypeDescription(void);
void SetPlayerGender(void);
void RevealPersonality(void);
void RevealStarter(void);
void AdvanceToPickPartnerPrompt(void);
void PromptPickPartner(void);
void AdvanceToPartnerSelection(void);
void CallCreatePartnerSelectionMenu(void);
void PromptForPartnerNickname(void);
void AdvanceToPartnerNickhameScreen(void);
void NicknamePartner(void);
void PrintEndIntroText(void);
void AdvanceToTestEnd(void);
s32 GetValidPartners(void);
void UpdateNatureTotals(void);
void PromptNewQuestion(void);
void PersonalityTest_DisplayPartnerSprite(void);
u16 HandlePartnerSelectionInput(void);
void PersonalityTest_DisplayStarterSprite(void);
void CreatePartnerSelectionMenu(s16);
void sub_803CE6C(void);
void sub_803CEAC(void);
void sub_803CECC(void);
void nullsub_135(void);
#endif

View File

@@ -0,0 +1,37 @@
#ifndef GUARD_PERSONALITY_TEST1_H
#define GUARD_PERSONALITY_TEST1_H
#include "constants/personality_test.h"
#include "structs/menu.h"
// size: 0xC
typedef struct PersonalityQuestion
{
/* 0x0 */ const u8 *question;
/* 0x4 */ const MenuItem *answers;
/* 0x8 */ const u8 *effects;
} PersonalityQuestion;
struct PersonalityTestTracker
{
/* 0x0 */ s32 FrameCounter;
u32 unk4;
/* 0x8 */ s16 StarterID;
/* 0xA */ s16 PartnerID;
u8 fillC[0x20 - 0xC];
/* 0x20 */ u8 PartnerNick[20];
/* 0x34 */ u32 TestState;
/* 0x38 */ s32 QuestionCounter;
/* 0x3C */ u32 currQuestionIndex;
/* 0x40 */ u8 playerNature;
/* 0x44 */ s32 NatureTotals[NUM_PERSONALITIES];
/* 0x78 */ u8 QuestionTracker[NUM_QUIZ_QUESTIONS];
/* 0xB0 */ u32 playerGender; // 1 = Female, 0 = Male
/* 0xB4 */ MenuInputStructSub input;
};
bool8 CreateTestTracker(void);
void DeleteTestTracker(void);
u8 HandleTestTrackerState(void);
#endif // GUARD_PERSONALITY_TEST1_H

View File

@@ -0,0 +1,26 @@
#ifndef GUARD_PERSONALITY_TEST2_H
#define GUARD_PERSONALITY_TEST2_H
#include "constants/personality_test.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// Size: 0xB8
struct PersonalityStruct_203B404
{
/* 0x0 */ s16 StarterID;
/* 0x2 */ s16 PartnerArray[NUM_PARTNERS];
u8 unk16;
/* 0x18 */ MenuInputStruct input;
u32 unk4C;
UnkTextStruct2 *unk50;
UnkTextStruct2 unk54[4];
u8 unkb4[4];
};
void CreatePartnerSelectionMenu(s16 starterID);
u16 HandlePartnerSelectionInput(void);
void sub_803CE6C(void);
#endif // GUARD_PERSONALITY_TEST2_H

View File

@@ -92,6 +92,7 @@ s32 sub_808E218(unkStruct_808E218_arg *, PokemonStruct1 *pokemon);
extern PokemonStruct1 *GetPlayerPokemonStruct(void);
extern void sub_808CFD0(u8 *, s16, u8 *, u8, u32 *, u16 *);
extern u32 sub_808D1DC(u8 *);
extern PokemonStruct1 *sub_808D378(void);
extern PokemonStruct1 *sub_808D3BC(void);
extern PokemonStruct1 *sub_808D3F8(void);
extern s32 sub_808D544(u32);

View File

@@ -1,15 +1,41 @@
#ifndef POKEMON_MAIL_H
#define POKEMON_MAIL_H
struct PokemonMail
#include "structs/str_802C39C.h"
// size: 0x8
typedef struct PokemonMail
{
const u8 *headline;
const u8 *text;
};
} PokemonMail;
// size: 0x8
typedef struct unkStruct_80E9920
{
/* 0x0 */ s16 parentSpecies;
/* 0x2 */ s16 childSpecies;
/* 0x4 */ const u8 *text;
} unkStruct_80E9920;
// size: 0xC
typedef struct unkStruct_80E9F8C
{
/* 0x0 */ s16 speciesA;
/* 0x2 */ s16 speciesB;
/* 0x4 */ const u8 *headline;
/* 0x8 */ const u8 *text;
} unkStruct_80E9F8C;
#define NUM_POKEMON_MAIL 56
void CreateRescueDescription(unkStruct_802C39C *);
void CreateRescueTitle(unkStruct_802C39C *);
const u8 *GetPokemonMailHeadline(u8 index);
const u8 *GetPokemonMailText(u8 index);
void sub_803B6B0(s32 x, s32 y, u8 index, u32);
bool8 sub_803C0DC(s16 species);
bool8 sub_803C110(s16 index);
#endif // POKEMON_MAIL_H

View File

@@ -0,0 +1,38 @@
#ifndef POKEMON_MAIL_PRE_H
#define POKEMON_MAIL_PRE_H
extern const s16 gUnknown_80E80E0[35];
extern const s16 gUnknown_80E8126[33];
extern const u8 gMankeyMission[];
extern const u8 gSmeargleMission[];
extern const u8 gMedichamMission[];
extern const u8 gUnknown_80E8830[];
extern const u8 gUnknown_80E8848[];
extern const u8 gUnknown_80E885C[];
extern const u8 gUnknown_80E886C[];
extern const u8 gUnknown_80E8884[];
extern const u8 gUnknown_80E888C[];
extern const u8 gMankeyMissionDescription[];
extern const u8 gSmeargleMissionDescription[];
extern const u8 gMedichamMissionDescription[];
extern const u8 gUnknown_80E8968[];
extern const u8 gUnknown_80E89B0[];
extern const u8 gUnknown_80E89FC[];
extern const u8 gUnknown_80E8A40[];
extern const u8 gUnknown_80E8A7C[];
extern const u8 gUnknown_80E8AC8[];
extern const u8 gUnknown_80E8AD0[];
extern const u8 gUnknown_80E8AE0[];
extern const u8 gUnknown_80E8AEC[];
extern const u8 gUnknown_80E8AFC[];
extern const u8 gUnknown_80E8B10[];
extern const u8 gUnknown_80E8B20[];
extern const u8 gUnknown_80E8B2C[];
extern const u8 gUnknown_80E8B40[];
extern const u8 gSpecialMissionText[];
extern const u8 gPlaceText[];
extern const u8 gDifficultyText[];
extern const u8 gRewardText[];
extern const u8 gUnknown_80E8B7C[];
#endif // POKEMON_MAIL_PRE_H

View File

@@ -2,7 +2,7 @@
#define GUARD_POKEMON_NEWS1_H
#include "constants/wonder_mail.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xD4;

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_POKEMON_NEWS2_H
#define GUARD_POKEMON_NEWS2_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x94

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_POKEMON_NEWS3_H
#define GUARD_POKEMON_NEWS3_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA4

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_POST_OFFICE_GUIDE2_H
#define GUARD_POST_OFFICE_GUIDE2_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x78

View File

@@ -7,6 +7,7 @@
#include "rescue_team_info.h"
#include "pokemon.h"
#include "items.h"
#include "code_8094F88.h"
#include "code_80958E8.h"
enum

View File

@@ -1,10 +1,46 @@
#ifndef GUARD_MENU_H
#define GUARD_MENU_H
#include "input.h"
#include "sprite_oam.h"
#include "structs/str_text.h"
// size: 0xC
typedef struct MenuInputStructSub
{
u8 unk0;
/* 0x1 */ u8 a_button;
/* 0x2 */ u8 b_button;
/* 0x3 */ u8 dpad_right;
/* 0x4 */ u8 dpad_left;
u8 fill5[3];
u16 unk8;
s16 unkA;
} MenuInputStructSub;
// size: 0x34
typedef struct MenuInputStruct
{
s32 unk0;
u16 unk4;
s16 unk6;
s16 unk8; // Maybe Position
s16 unkA;
s16 unkC; // Maybe Position
s16 unkE;
u32 unk10;
s16 unk14; // Maybe Position
s16 unk16;
/* 0x18 */ s16 menuIndex;
s16 unk1A;
s16 unk1C;
s16 unk1E;
s16 unk20;
s16 unk22;
u16 unk24;
u16 unk26;
MenuInputStructSub unk28;
} MenuInputStruct;
// size: 0x8
typedef struct MenuItem
{

View File

@@ -1,8 +1,7 @@
#ifndef GUARD_CODE_802C39C_H
#define GUARD_CODE_802C39C_H
#ifndef GUARD_STR_802C39C_H
#define GUARD_STR_802C39C_H
#include "code_8094F88.h"
#include "wonder_mail.h"
#include "structs/str_wonder_mail.h"
// size: 0x58
typedef struct unkStruct_802C39C
@@ -30,4 +29,4 @@ typedef struct unkStruct_802C39C
/* 0x54 */ WonderMail *mail;
} unkStruct_802C39C;
#endif // GUARD_CODE_802C39C_H
#endif // GUARD_STR_802C39C_H

View File

@@ -164,4 +164,10 @@ typedef struct LevelData
u16 fillA;
} LevelData;
// Definitely wrong but need to figure out better structure later
struct FaceData
{
u8 *unk0[5];
};
#endif // GUARD_STR_POKEMON_H

View File

@@ -0,0 +1,82 @@
#ifndef GUARD_STR_WONDER_MAIL_H
#define GUARD_STR_WONDER_MAIL_H
#include "constants/wonder_mail.h"
#include "structs/str_dungeon.h"
#include "structs/str_pokemon.h"
// size: 0x8
typedef struct WonderMailSub
{
/* 0x0 */ DungeonLocation dungeon;
/* 0x4 */ u32 seed;
} WonderMailSub;
// size: 0x14
typedef struct WonderMail
{
/* 0x0 */ u8 mailType;
/* 0x1 */ u8 missionType;
u8 unk2;
/* 0x4 */ WonderMailSub unk4;
/* 0xC */ s16 clientSpecies;
/* 0xE */ s16 targetSpecies;
/* 0x10 */ u8 targetItem;
/* 0x11 */ u8 rewardType;
/* 0x12 */ u8 itemReward;
/* 0x13 */ u8 friendAreaReward;
} WonderMail;
// size: 0x28
typedef struct unkStruct_802F204
{
/* 0x0 */ u8 clientName[POKEMON_NAME_LENGTH];
/* 0xA */ u8 name2[POKEMON_NAME_LENGTH]; // target name?
/* 0x14 */ s16 clientSpecies;
u8 unk16;
/* 0x18 */ s32 moneyReward;
/* 0x1C */ u8 itemRewards[MAX_ITEM_REWARDS];
/* 0x1F */ u8 quantity;
/* 0x20 */ u8 friendAreaReward;
/* 0x24 */ u32 teamRankPtsReward;
} unkStruct_802F204;
// size: 0xB4
typedef struct unkStruct_803B344
{
/* 0x0 */ WonderMail mail;
u8 *unk14;
u8 *unk18;
u8 fill1C[0x3C - 0x1C];
u8 unk3C[0xB4 - 0x3C];
} unkStruct_803B344;
// size: 0x30
typedef struct unkStruct_203B480
{
/* 0x0 */ u8 mailType;
/* 0x1 */ u8 missionType;
WonderMailSub unk4;
/* 0xC */ s16 clientSpecies;
/* 0xE */ s16 targetSpecies;
union unk10_temp
{
u32 unk10;
u16 unk10_u16;
} unk10;
/* 0x14 */ u8 playerName[0x20 - 0x14];
Item item;
u32 unk24;
u32 unk28;
/* 0x2C */ s8 rescuesAllowed;
u8 unk2D;
} unkStruct_203B480;
// size: 0x88
typedef struct WonderMailStruct_203B2C0_sub
{
/* 0x0 */ unkStruct_203B480 mail;
/* 0x30 */ PokemonStruct1 pokemon;
} WonderMailStruct_203B2C0_sub;
#endif // GUARD_STR_WONDER_MAIL_H

View File

@@ -44,6 +44,7 @@ void sub_8007E20(u32, u32, u32, u32, u32, u8 *, u32);
// text.s
extern struct unkChar *GetCharacter(u32);
extern void InitGraphics(void);
extern void sub_800836C(u32, u8 *, u32);
extern void sub_800898C(void);
extern void sub_80089AC(const UnkTextStruct2 *, UnkTextStruct2_sub *);
extern void sub_8008C54(u32);

View File

@@ -0,0 +1,42 @@
#ifndef GUARD_THANK_YOU_WONDER_MAIL_H
#define GUARD_THANK_YOU_WONDER_MAIL_H
#include "constants/wonder_mail.h"
#include "file_system.h"
#include "structs/menu.h"
#include "structs/str_items.h"
#include "structs/str_text.h"
#include "structs/str_wonder_mail.h"
// size: 0x564
typedef struct WonderMailStruct_203B2C4
{
/* 0x0 */ u8 state;
/* 0x4 */ u32 fallbackState; // wonder mail link status??
/* 0x8 */ u8 passwordBuffer[PASSWORD_BUFFER_SIZE]; // Probably a buffer for entry
u8 unk3E;
u32 unk40;
/* 0x44 */ u32 linkError; // another link status
u8 filler48[0x1B8 - 0x48];
unkStruct_203B480 unk1B8;
unkStruct_203B480 unk1E8;
/* 0x218 */ s8 mailIndex;
MenuStruct unk21C[4];
UnkTextStruct2 unk35C[4];
UnkTextStruct2 unk3BC[4];
Item unk41C;
/* 0x420 */ OpenedFile *faceFile;
/* 0x424 */ u8 *faceData;
u16 unk428;
u16 unk42A;
u8 unk42C;
u8 unk42D;
u8 unk42E;
u32 unk430;
/* 0x434 */ u8 formattedString[0x100];
/* 0x534 */ s32 wonderMailMethod;
/* 0x538 */ u32 wonderMailMode;
unkStruct_802F204 unk53C;
} WonderMailStruct_203B2C4;
#endif // GUARD_THANK_YOU_WONDER_MAIL_H

View File

@@ -1,7 +1,7 @@
#ifndef GUARD_WIGGLYTUFF_SHOP2_H
#define GUARD_WIGGLYTUFF_SHOP2_H
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
typedef struct WigglytuffShop2Work

View File

@@ -1,49 +1,10 @@
#ifndef GUARD_WONDER_MAIL_H
#define GUARD_WONDER_MAIL_H
#include "code_8094F88.h"
#include "constants/wonder_mail.h"
#include "file_system.h"
#include "items.h"
#include "structs/menu.h"
#include "pokemon.h"
#include "structs/str_text.h"
// size: 0x28
typedef struct unkStruct_802F204
{
/* 0x0 */ u8 clientName[POKEMON_NAME_LENGTH];
/* 0xA */ u8 name2[POKEMON_NAME_LENGTH]; // target name?
/* 0x14 */ s16 clientSpecies;
u8 unk16;
/* 0x18 */ s32 moneyReward;
/* 0x1C */ u8 itemRewards[MAX_ITEM_REWARDS];
/* 0x1F */ u8 quantity;
/* 0x20 */ u8 friendAreaReward;
/* 0x24 */ u32 teamRankPtsReward;
} unkStruct_802F204;
// size: 0x14
typedef struct WonderMail
{
/* 0x0 */ u8 mailType; // mail type
/* 0x1 */ u8 missionType; // mission type
u8 unk2;
/* 0x4 */ WonderMailSub unk4;
/* 0xC */ s16 clientSpecies; // client pokemon
/* 0xE */ s16 targetSpecies; // target
/* 0x10 */ u8 targetItem; // item to find/deliver
/* 0x11 */ u8 rewardType; // reward type
/* 0x12 */ u8 itemReward; // item reward
/* 0x13 */ u8 friendAreaReward; // friend area
} WonderMail;
// size: 0x88
typedef struct WonderMailStruct_203B2C0_sub
{
/* 0x0 */ unkStruct_203B480 mail;
/* 0x30 */ PokemonStruct1 pokemon;
} WonderMailStruct_203B2C0_sub;
#include "structs/str_wonder_mail.h"
// size: 0x548
typedef struct WonderMailStruct_203B2C0
@@ -79,37 +40,4 @@ typedef struct WonderMailStruct_203B2C0
/* 0x544 */ s16 speciesNum;
} WonderMailStruct_203B2C0;
// size: 0x564
typedef struct WonderMailStruct_203B2C4
{
/* 0x0 */ u8 state;
/* 0x4 */ u32 fallbackState; // wonder mail link status??
/* 0x8 */ u8 passwordBuffer[PASSWORD_BUFFER_SIZE]; // Probably a buffer for entry
u8 unk3E;
u32 unk40;
/* 0x44 */ u32 linkError; // another link status
u8 filler48[0x1B8 - 0x48];
unkStruct_203B480 unk1B8;
unkStruct_203B480 unk1E8;
/* 0x218 */ s8 mailIndex;
MenuStruct unk21C[4];
UnkTextStruct2 unk35C[4];
UnkTextStruct2 unk3BC[4];
Item unk41C;
/* 0x420 */ OpenedFile *faceFile;
/* 0x424 */ u8 *faceData;
u16 unk428;
u16 unk42A;
u8 unk42C;
u8 unk42D;
u8 unk42E;
u32 unk430;
/* 0x434 */ u8 formattedString[0x100];
/* 0x534 */ s32 wonderMailMethod;
/* 0x538 */ u32 wonderMailMode;
unkStruct_802F204 unk53C;
} WonderMailStruct_203B2C4;
void SetFriendRescueCounterState(u32 r0);
#endif // GUARD_WONDER_MAIL_H

View File

@@ -1,44 +0,0 @@
#ifndef GUARD_WONDER_MAIL_2_1_H
#define GUARD_WONDER_MAIL_2_1_H
#include "code_802C39C.h"
#include "constants/mailbox.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA8
struct unkStruct_203B2E8
{
u8 pelipperBoardSlots[MAX_ACCEPTED_JOBS];
MenuInputStruct input;
u32 unk3C;
UnkTextStruct2 *unk40;
UnkTextStruct2 unk44[4];
u8 unkA4[4];
};
// size: 0x1FC
struct unkStruct_203B2F0
{
u32 unk0;
u32 state;
u8 unk8[0xC - 0x8];
u8 unkC;
unkStruct_802C39C unk10;
u32 menuAction;
MenuStruct unk6C;
MenuStruct unkBC;
MenuItem unk10C[8];
MenuItem unk14C[8];
u8 fill18C[0x19C - 0x18C];
UnkTextStruct2 unk19C[4];
};
bool8 HasNoAcceptedJobs(void);
bool8 InitializeJobListMenu(u32);
u32 sub_802C898(void);
void sub_802C8F4(void);
#endif // GUARD_WONDER_MAIL_2_1_H

View File

@@ -1,79 +0,0 @@
#ifndef GUARD_WONDER_MAIL_3_H
#define GUARD_WONDER_MAIL_3_H
#include "code_802C39C.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
#include "wonder_mail.h"
// size: 0xB4
typedef struct unkStruct_803B344
{
/* 0x0 */ WonderMail mail;
u8 *unk14;
u8 *unk18;
u8 fill1C[0x3C - 0x1C];
u8 unk3C[0xB4 - 0x3C];
} unkStruct_803B344;
// size: 0xA0
typedef struct unkStruct_203B2F4
{
MenuInputStruct input;
u32 unk34;
UnkTextStruct2 *unk38;
UnkTextStruct2 unk3C[4];
u8 unk9C[4];
} unkStruct_203B2F4;
// size: 0x1C
typedef struct unkSubStruct_203B2F8
{
/* 0x0 */ WonderMail wonderMail;
/* 0x14 */ u8 *unk14;
/* 0x18 */ u8 *unk18;
} unkSubStruct_203B2F8;
// size: 0x208
typedef struct unkStruct_203B2F8
{
/* 0x0 */ s32 state;
/* 0x4 */ s32 fallbackState;
/* 0x8 */ u8 wonderMailAccepted;
/* 0x9 */ bool8 unk9;
/* 0xA */ u8 dungeonID;
u8 unkB;
/* 0xC */ unkSubStruct_203B2F8 *mail;
/* 0x10 */ u8 jobSlotIndex;
unkStruct_802C39C unk14;
/* 0x6C */ u32 menuAction1;
/* 0x70 */ u32 menuAction2;
/* 0x74 */ u32 menuAction3;
/* 0x78 */ MenuStruct unk78;
/* 0xC8 */ MenuStruct unkC8;
MenuItem unk118[8];
MenuItem unk158[8];
u16 unk198[8];
UnkTextStruct2 unk1A8[4];
} unkStruct_203B2F8;
enum WonderMailRescueStates
{
INITIAL_WONDER_MAIL_CHECK = 0,
// 1
WONDER_MAIL_EXIT = 2,
DUPLICATE_WONDER_MAIL,
DUPLICATE_WONDER_MAIL_1,
// 5 - 7
RECEIVE_WONDER_MAIL = 8,
// 9
JOB_LIST_FULL = 10,
DRAW_JOB_LIST,
DRAW_JOB_LIST_1,
// 13 - 16
};
u32 sub_802D098(unkSubStruct_203B2F8 *mail);
#endif // GUARD_WONDER_MAIL_3_H

View File

@@ -2,7 +2,7 @@
#define GUARD_WONDER_MAIL_802C10C_H
#include "constants/mailbox.h"
#include "input.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA8

View File

@@ -0,0 +1,28 @@
#ifndef GUARD_WONDER_MAIL_802C4C8_H
#define GUARD_WONDER_MAIL_802C4C8_H
#include "constants/mailbox.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA8
struct unkStruct_203B2E8
{
/* 0x0 */ u8 pelipperBoardSlots[MAX_ACCEPTED_JOBS];
/* 0x8 */ MenuInputStruct input;
u32 unk3C;
UnkTextStruct2 *unk40;
UnkTextStruct2 unk44[4];
u8 unkA4[4];
};
void DrawJobListMenu(void);
bool8 HasNoAcceptedJobs(void);
u8 GetPelipperBoardSlotIndex(void);
bool8 sub_802C4C8(s32, UnkTextStruct2_sub *, u32);
u32 sub_802C598(bool8);
void sub_802C640(bool8 cursorSprite);
void sub_802C688(void);
#endif // GUARD_WONDER_MAIL_802C4C8_H

View File

@@ -0,0 +1,30 @@
#ifndef GUARD_WONDER_MAIL_802C860_H
#define GUARD_WONDER_MAIL_802C860_H
#include "structs/str_802C39C.h"
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0x1FC
struct unkStruct_203B2F0
{
u32 unk0;
/* 0x4 */ u32 state;
u8 unk8[0xC - 0x8];
u8 unkC;
unkStruct_802C39C unk10;
/* 0x68 */ u32 menuAction;
MenuStruct unk6C;
MenuStruct unkBC;
MenuItem unk10C[8];
MenuItem unk14C[8];
u8 fill18C[0x19C - 0x18C];
UnkTextStruct2 unk19C[4];
};
bool8 InitializeJobListMenu(u32);
u32 sub_802C898(void);
void sub_802C8F4(void);
#endif // GUARD_WONDER_MAIL_802C860_H

View File

@@ -0,0 +1,24 @@
#ifndef GUARD_WONDER_MAIL_802CDD4_H
#define GUARD_WONDER_MAIL_802CDD4_H
#include "structs/menu.h"
#include "structs/str_text.h"
// size: 0xA0
typedef struct unkStruct_203B2F4
{
MenuInputStruct input;
u32 unk34;
UnkTextStruct2 *unk38;
UnkTextStruct2 unk3C[4];
u8 unk9C[4];
} unkStruct_203B2F4;
bool8 sub_802CDD4(u32);
u32 sub_802CE5C(bool8);
u8 sub_802CEBC(void);
void sub_802CED8(bool8 cursorSprite);
void sub_802CF14(void);
void sub_802CFD0(void);
#endif // GUARD_WONDER_MAIL_802CDD4_H

View File

@@ -0,0 +1,46 @@
#ifndef GUARD_WONDER_MAIL_802D098_H
#define GUARD_WONDER_MAIL_802D098_H
#include "structs/str_802C39C.h"
#include "structs/menu.h"
#include "structs/str_text.h"
#include "structs/str_wonder_mail.h"
// size: 0x1C
typedef struct unkSubStruct_203B2F8
{
/* 0x0 */ WonderMail wonderMail;
u8 *unk14;
u8 *unk18;
} unkSubStruct_203B2F8;
// size: 0x208
typedef struct unkStruct_203B2F8
{
/* 0x0 */ s32 state;
/* 0x4 */ s32 fallbackState;
/* 0x8 */ u8 wonderMailAccepted;
bool8 unk9;
/* 0xA */ u8 dungeonID;
u8 unkB;
/* 0xC */ unkSubStruct_203B2F8 *mail;
/* 0x10 */ u8 jobSlotIndex;
unkStruct_802C39C unk14;
/* 0x6C */ u32 menuAction1;
/* 0x70 */ u32 menuAction2;
/* 0x74 */ u32 menuAction3;
MenuStruct unk78;
MenuStruct unkC8;
MenuItem unk118[8];
MenuItem unk158[8];
u16 unk198[8];
UnkTextStruct2 unk1A8[4];
} unkStruct_203B2F8;
bool8 GetWonderMailAccepted(void);
bool8 sub_802D098(unkSubStruct_203B2F8 *mail);
u32 sub_802D0E0(void);
void sub_802D184(void);
#endif // GUARD_WONDER_MAIL_802D098_H

View File

@@ -141,8 +141,10 @@ SECTIONS {
src/pokemon_news2.o(.text);
src/pokemon_news3.o(.text);
src/wonder_mail_802C10C.o(.text);
src/wonder_mail_2_1.o(.text);
src/wonder_mail_3.o(.text);
src/wonder_mail_802C4C8.o(.text);
src/wonder_mail_802C860.o(.text);
src/wonder_mail_802CDD4.o(.text);
src/wonder_mail_802D098.o(.text);
src/code_802DB28.o(.text);
src/code_802DE84.o(.text);
src/mailbox.o(.text);
@@ -181,11 +183,11 @@ SECTIONS {
src/debug_menu3.o(.text);
src/debug_menu4.o(.text);
asm/code_803B050.o(.text);
src/code_803B050.o(.text);
src/pokemon_mail.o(.text);
src/code_803C1B4.o(.text);
asm/code_803C1D0.o(.text);
src/personality_test.o(.text);
src/personality_test1.o(.text);
src/personality_test2.o(.text);
src/code_803D0D8.o(.text);
asm/code_803D110.o(.text);
src/code_8040094.o(.text);
@@ -461,8 +463,10 @@ SECTIONS {
src/pokemon_news2.o(.rodata);
src/pokemon_news3.o(.rodata);
src/wonder_mail_802C10C.o(.rodata);
src/wonder_mail_2_1.o(.rodata);
src/wonder_mail_3.o(.rodata);
src/wonder_mail_802C4C8.o(.rodata);
src/wonder_mail_802C860.o(.rodata);
src/wonder_mail_802CDD4.o(.rodata);
src/wonder_mail_802D098.o(.rodata);
src/code_802DB28.o(.rodata);
src/code_802DE84.o(.rodata);
src/mailbox.o(.rodata);
@@ -495,9 +499,10 @@ SECTIONS {
src/debug_menu3.o(.rodata);
src/debug_menu4.o(.rodata);
data/data_80E7D40.o(.rodata);
src/pokemon_mail_pre.o(.rodata);
src/pokemon_mail.o(.rodata);
data/personality_test.o(.rodata);
src/personality_test.o(.rodata);
src/personality_test1.o(.rodata);
src/personality_test2.o(.rodata);
src/code_803D0D8.o(.rodata);
data/data_80F4278.o(.rodata);
src/dungeon_util.o(.rodata);

View File

@@ -1,41 +1,24 @@
#include "global.h"
#include "globaldata.h"
#include "adventure_log.h"
#include "code_80118A4.h"
#include "code_80130A8.h"
#include "code_8097670.h"
#include "constants/input.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"
#include "text1.h"
#include "text2.h"
static EWRAM_DATA_2 AdventureLog *sAdventureLog = {0};
static const UnkTextStruct2 sUnknown_80E1FF0 = {
0x00, 0x00, 0x00, 0x00,
0x03,
0x00, 0x00,
0x00, 0x00,
0x00, 0x00,
NULL
};
static const UnkTextStruct2 sUnknown_80E2008 = {
0x00, 0x00, 0x00, 0x00,
0x06,
0x02, 0x02,
0x1A, 0x04,
0x06, 0x00,
NULL
};
static const u8 sAdventureLogHeaderText[] = "Adventure Log";
static const u8 sAdventureLogTextPlaceholder[] = "~95~95~95~95~95~95~95~95~95~95~95~95~95~95~95 "; // string of ???????
static const u8 sFill1[] = "pksdir0";
// ???
extern u32 gUnknown_202DE30;
static EWRAM_DATA_2 AdventureLog *sAdventureLog = {0};
#include "data/adventure_log.h"
static void DisplayAdventureLog();
static void sub_8032084();
bool8 CreateAdventureLogScreen(u32 kind)
@@ -55,9 +38,9 @@ bool8 CreateAdventureLogScreen(u32 kind)
return TRUE;
}
u32 HandleAdventureLogInput(u8 param_1)
u32 HandleAdventureLogInput(bool8 a0)
{
if (param_1 == 0) {
if (!a0) {
sub_8013660(&sAdventureLog->input);
return 0;
}
@@ -113,66 +96,66 @@ static void sub_8032084(void)
NAKED
static void sub_8032084(void)
{
asm_unified("\tpush {r4,lr}\n"
"\tldr r4, _080320F4\n"
"\tldr r0, [r4]\n"
"\tldrh r1, [r0, 0x20]\n"
"\tadds r0, 0x9C\n"
"\tmovs r2, 0\n"
"\tstrb r1, [r0]\n"
"\tldr r0, [r4]\n"
"\tldrh r1, [r0, 0x1E]\n"
"\tadds r0, 0x9D\n"
"\tstrb r1, [r0]\n"
"\tldr r0, [r4]\n"
"\tadds r0, 0x9E\n"
"\tmovs r1, 0xB\n"
"\tstrb r1, [r0]\n"
"\tldr r0, [r4]\n"
"\tadds r0, 0x9F\n"
"\tstrb r2, [r0]\n"
"\tldr r0, [r4]\n"
"\tmovs r1, 0x1A\n"
"\tldrsh r0, [r0, r1]\n"
"\tmovs r1, 0xC\n"
"\tbl sub_80095E4\n"
"\tadds r0, 0x2\n"
"\tlsls r0, 16\n"
"\tldr r2, [r4]\n"
"\tldr r3, [r2, 0x34]\n"
"\tlsls r1, r3, 1\n"
"\tadds r1, r3\n"
"\tlsls r1, 3\n"
"\tadds r1, r2, r1\n"
"\tadds r1, 0x4A\n"
"\tasrs r3, r0, 16\n"
"\tlsrs r0, 16\n"
"\tstrh r0, [r1]\n"
"\tldr r1, [r2, 0x34]\n"
"\tlsls r0, r1, 1\n"
"\tadds r0, r1\n"
"\tlsls r0, 3\n"
"\tadds r2, r0\n"
"\tadds r3, 0x2\n"
"\tadds r2, 0x4C\n"
"\tstrh r3, [r2]\n"
"\tbl ResetUnusedInputStruct\n"
"\tldr r0, [r4]\n"
"\tadds r0, 0x3C\n"
"\tmovs r1, 0x1\n"
"\tmovs r2, 0x1\n"
"\tbl sub_800641C\n"
"\tpop {r4}\n"
"\tpop {r0}\n"
"\tbx r0\n"
"\t.align 2, 0\n"
asm_unified("\tpush {r4,lr}\n"
"\tldr r4, _080320F4\n"
"\tldr r0, [r4]\n"
"\tldrh r1, [r0, 0x20]\n"
"\tadds r0, 0x9C\n"
"\tmovs r2, 0\n"
"\tstrb r1, [r0]\n"
"\tldr r0, [r4]\n"
"\tldrh r1, [r0, 0x1E]\n"
"\tadds r0, 0x9D\n"
"\tstrb r1, [r0]\n"
"\tldr r0, [r4]\n"
"\tadds r0, 0x9E\n"
"\tmovs r1, 0xB\n"
"\tstrb r1, [r0]\n"
"\tldr r0, [r4]\n"
"\tadds r0, 0x9F\n"
"\tstrb r2, [r0]\n"
"\tldr r0, [r4]\n"
"\tmovs r1, 0x1A\n"
"\tldrsh r0, [r0, r1]\n"
"\tmovs r1, 0xC\n"
"\tbl sub_80095E4\n"
"\tadds r0, 0x2\n"
"\tlsls r0, 16\n"
"\tldr r2, [r4]\n"
"\tldr r3, [r2, 0x34]\n"
"\tlsls r1, r3, 1\n"
"\tadds r1, r3\n"
"\tlsls r1, 3\n"
"\tadds r1, r2, r1\n"
"\tadds r1, 0x4A\n"
"\tasrs r3, r0, 16\n"
"\tlsrs r0, 16\n"
"\tstrh r0, [r1]\n"
"\tldr r1, [r2, 0x34]\n"
"\tlsls r0, r1, 1\n"
"\tadds r0, r1\n"
"\tlsls r0, 3\n"
"\tadds r2, r0\n"
"\tadds r3, 0x2\n"
"\tadds r2, 0x4C\n"
"\tstrh r3, [r2]\n"
"\tbl ResetUnusedInputStruct\n"
"\tldr r0, [r4]\n"
"\tadds r0, 0x3C\n"
"\tmovs r1, 0x1\n"
"\tmovs r2, 0x1\n"
"\tbl sub_800641C\n"
"\tpop {r4}\n"
"\tpop {r0}\n"
"\tbx r0\n"
"\t.align 2, 0\n"
"_080320F4: .4byte sAdventureLog");
}
#endif
static void DisplayAdventureLog(void)
{
s32 counter;
s32 i;
s32 r4; // r4
s32 r6; // r6
u8 temp;
@@ -183,56 +166,53 @@ static void DisplayAdventureLog(void)
r4 = sAdventureLog->input.unk1E * 8;
r6 = r4;
r6 += 10;
// Draw Header
xxx_call_draw_string(r6, 0, sAdventureLogHeaderText, sAdventureLog->unk34, 0);
xxx_call_draw_string(r6, 0, sAdventureLogText, sAdventureLog->unk34, 0);
r4 += 4;
r6 = r4 + sAdventureLog->unk9C[2] * 8;
// Draw Page #
r6 = r4 + (sAdventureLog->unk9C[2] * 8);
sub_8012BC4(r6, 0, sAdventureLog->input.unk1E + 1, 1, 7, sAdventureLog->unk34);
for (counter = 0; counter < sAdventureLog->input.unk1A; counter++) {
temp = sAdventureLog->input.unk1E * sAdventureLog->input.unk1C + counter;
for (i = 0; i < sAdventureLog->input.unk1A; i++) {
temp = (sAdventureLog->input.unk1E * sAdventureLog->input.unk1C) + i;
if (sub_8097710(temp)) {
switch (temp) {
case 12:
v1 = sub_80978B8();
gUnknown_202DE30 = (s16)v1;
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, counter), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, i), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
break;
case 7:
v2 = sub_8097880();
gUnknown_202DE30 = (s16)v2;
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, counter), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, i), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
break;
case 11:
v3 = sub_8097838();
gUnknown_202DE30 = (s16)v3;
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, counter), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, i), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
break;
case 8:
v4 = sub_80977B8();
gUnknown_202DE30 = v4;
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, counter), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, i), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
break;
case 9:
v5 = sub_80977F8();
gUnknown_202DE30 = v5;
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, counter), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, i), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
break;
case 10:
v6 = sub_8097870();
gUnknown_202DE30 = (s16)v6;
// fallthrough
default:
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, counter), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
xxx_format_and_draw(8, sub_8013800(&sAdventureLog->input, i), GetAdventureLogLine(temp), sAdventureLog->unk34, 0);
break;
}
}
else {
// Draw the ?????????? across the row
xxx_call_draw_string(8, sub_8013800(&sAdventureLog->input, counter), sAdventureLogTextPlaceholder, sAdventureLog->unk34, 0);
}
else
xxx_call_draw_string(8, sub_8013800(&sAdventureLog->input, i), sPlaceholder, sAdventureLog->unk34, 0);
}
sub_80073E0(sAdventureLog->unk34);

View File

@@ -21,7 +21,7 @@ u32 UpdateAdventureLogMenu(void)
u32 nextMenu;
nextMenu = MENU_NO_SCREEN_CHANGE;
switch (HandleAdventureLogInput(1)) {
switch (HandleAdventureLogInput(TRUE)) {
case 0:
case 1:
break;

View File

@@ -1,6 +1,5 @@
#include "global.h"
#include "bg_control.h"
#include "input.h"
EWRAM_DATA BGControlStruct gBG0Control = {0};
EWRAM_DATA BGControlStruct gBG1Control = {0};

View File

@@ -39,8 +39,6 @@ const u32 gMultiTurnChargingStatuses[10] = {
STATUS_NONE
};
ALIGNED(4) const char chargingStatusFill[] = "pksdir0";
u32 sub_8057070(Move *move)
{
u32 numberOfChainedHits;

View File

@@ -17,7 +17,6 @@
#include "file_system.h"
#include "friend_area.h"
#include "game_options.h"
#include "input.h"
#include "main_menu1.h"
#include "main_menu2.h"
#include "memory.h"

View File

@@ -1,6 +1,5 @@
#include "global.h"
#include "code_800C9CC.h"
#include "input.h"
#include "random.h"
#include "reg_control.h"

View File

@@ -11,7 +11,6 @@
#include "constants/bg_music.h"
#include "play_time.h"
#include "bg_control.h"
#include "input.h"
#include "config.h"
#include "game_options.h"
#include "sprite.h"

View File

@@ -6,7 +6,6 @@
#include "code_80118A4.h"
#include "code_80130A8.h"
#include "game_options.h"
#include "input.h"
#include "sprite.h"
extern void nullsub_8(u8);

View File

@@ -1,8 +1,10 @@
#include "global.h"
#include "globaldata.h"
#include "code_8012A18_1.h"
#include "code_80130A8.h"
#include "code_801602C.h"
#include "common_strings.h"
#include "input.h"
#include "memory.h"
#include "text_util.h"
#include "text1.h"

View File

@@ -1,4 +1,5 @@
#include "global.h"
#include "globaldata.h"
#include "code_80118A4.h"
#include "code_80130A8.h"
#include "code_801AFA4.h"

View File

@@ -1,7 +1,9 @@
#include "global.h"
#include "globaldata.h"
#include "code_80118A4.h"
#include "code_80130A8.h"
#include "code_801B3C0.h"
#include "input.h"
#include "items.h"
#include "memory.h"
#include "menu_input.h"

View File

@@ -1,4 +1,5 @@
#include "global.h"
#include "globaldata.h"
#include "code_80118A4.h"
#include "code_80130A8.h"
#include "code_801B3C0.h"
@@ -6,6 +7,7 @@
#include "code_8098BDC.h"
#include "common_strings.h"
#include "constants/colors.h"
#include "input.h"
#include "items.h"
#include "kecleon_bros4.h"
#include "memory.h"

View File

@@ -1,9 +1,11 @@
#include "global.h"
#include "globaldata.h"
#include "code_80118A4.h"
#include "code_801BEEC.h"
#include "code_801C244.h"
#include "code_801C620.h"
#include "common_strings.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"
#include "pokemon_3.h"

View File

@@ -1,7 +1,9 @@
#include "global.h"
#include "globaldata.h"
#include "code_80118A4.h"
#include "code_80130A8.h"
#include "code_801C244.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"
#include "pokemon_3.h"

View File

@@ -1,8 +1,10 @@
#include "global.h"
#include "globaldata.h"
#include "code_80118A4.h"
#include "code_80130A8.h"
#include "code_801C620.h"
#include "code_8097DD0.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"
#include "pokemon_3.h"

View File

@@ -1,6 +1,8 @@
#include "global.h"
#include "globaldata.h"
#include "code_80118A4.h"
#include "code_801C8C4.h"
#include "input.h"
#include "items.h"
#include "memory.h"
#include "menu_input.h"

View File

@@ -1,4 +1,5 @@
#include "global.h"
#include "globaldata.h"
#include "bg_palette_buffer.h"
#include "code_800D090.h"
#include "code_80130A8.h"
@@ -17,6 +18,7 @@
#include "ground_lives.h"
#include "ground_main.h"
#include "ground_map_1.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"
#include "options_menu1.h"
@@ -25,7 +27,8 @@
#include "text1.h"
#include "text2.h"
#include "wigglytuff_shop2.h"
#include "wonder_mail_2_1.h"
#include "wonder_mail_802C4C8.h"
#include "wonder_mail_802C860.h"
extern u8 gAvailablePokemonNames[]; // 202DF98

View File

@@ -1,8 +1,10 @@
#include "global.h"
#include "globaldata.h"
#include "code_80118A4.h"
#include "code_801D9E4.h"
#include "constants/input.h"
#include "ground_main.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"
#include "text1.h"

View File

@@ -1,4 +1,5 @@
#include "global.h"
#include "input.h"
#include "text1.h"
#include "text2.h"
#include "memory.h"

View File

@@ -12,6 +12,7 @@
#include "code_80130A8.h"
#include "code_801EE10_mid.h"
#include "code_80118A4.h"
#include "input.h"
extern unkStruct_203B270 *gUnknown_203B270;

View File

@@ -1,4 +1,5 @@
#include "global.h"
#include "globaldata.h"
#include "code_80130A8.h"
#include "code_801AFA4.h"
#include "code_801B3C0.h"
@@ -6,6 +7,7 @@
#include "code_8098BDC.h"
#include "common_strings.h"
#include "constants/colors.h"
#include "input.h"
#include "kecleon_bros4.h"
#include "memory.h"
#include "menu_input.h"

View File

@@ -1,4 +1,5 @@
#include "global.h"
#include "globaldata.h"
#include "code_800D090.h"
#include "code_80118A4.h"
#include "code_8023144.h"
@@ -6,6 +7,7 @@
#include "constants/input.h"
#include "exclusive_pokemon.h"
#include "friend_area.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"
#include "pokemon_3.h"

View File

@@ -1,4 +1,5 @@
#include "global.h"
#include "globaldata.h"
#include "code_800D090.h"
#include "code_8023868.h"
#include "pokemon.h"

View File

@@ -1,8 +1,10 @@
#include "global.h"
#include "globaldata.h"
#include "code_80118A4.h"
#include "code_8024458.h"
#include "constants/input.h"
#include "event_flag.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"
#include "pokemon.h"

View File

@@ -1,4 +1,5 @@
#include "global.h"
#include "globaldata.h"
#include "code_80130A8.h"
#include "code_802DB28.h"
#include "code_802F204.h"
@@ -6,8 +7,10 @@
#include "code_80958E8_1.h"
#include "code_8096AF8.h"
#include "exclusive_pokemon.h"
#include "input.h"
#include "items.h"
#include "memory.h"
#include "pokemon.h"
#include "text1.h"
#include "text2.h"

View File

@@ -1,9 +1,11 @@
#include "global.h"
#include "globaldata.h"
#include "code_80118A4.h"
#include "code_802DE84.h"
#include "code_803B050.h"
#include "input.h"
#include "memory.h"
#include "menu_input.h"
#include "pokemon_mail.h"
#include "text1.h"
#include "text2.h"

Some files were not shown because too many files have changed in this diff Show More