summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/battle_frontier_2.s74
-rw-r--r--asm/battle_records.s1285
-rw-r--r--asm/cable_club.s14
-rw-r--r--asm/easy_chat.s8
-rw-r--r--asm/field_screen.s2
-rw-r--r--asm/fieldmap.s2285
-rw-r--r--asm/item.s1921
-rw-r--r--asm/mauville_old_man.s2519
-rw-r--r--asm/party_menu.s2
-rw-r--r--asm/pokemon_storage_system.s4
-rw-r--r--asm/pokemon_summary_screen.s4
-rw-r--r--asm/pokenav.s6
-rw-r--r--asm/record_mixing.s2
-rw-r--r--asm/rom_8011DC0.s20
-rw-r--r--asm/shop.s6
-rw-r--r--asm/trader.s558
-rw-r--r--asm/trainer_card.s4
-rw-r--r--common_syms/field_camera.txt3
-rw-r--r--common_syms/fieldmap.txt1
-rw-r--r--common_syms/load_save.txt4
-rw-r--r--common_syms/mauville_old_man.txt1
-rw-r--r--common_syms/random.txt2
-rw-r--r--constants/constants.inc1
-rw-r--r--constants/item_data_constants.inc5
-rw-r--r--data/battle_records.s37
-rw-r--r--data/event_scripts.s4
-rw-r--r--data/fieldmap.s8
-rw-r--r--data/graphics/items/item_icon_table.inc1513
-rw-r--r--data/item_icon.s8
-rw-r--r--data/item_menu_icons.s11
-rw-r--r--data/items.inc5656
-rw-r--r--data/mauville_old_man.s58
-rw-r--r--data/scripts/cable_club.inc8
-rw-r--r--data/scripts/maps/BattleFrontier_BattleArenaBattleRoom.inc4
-rw-r--r--data/scripts/maps/BattleFrontier_BattleArenaLobby.inc12
-rw-r--r--data/scripts/maps/BattleFrontier_BattleDomeLobby.inc20
-rw-r--r--data/scripts/maps/BattleFrontier_BattleDomePreBattleRoom.inc2
-rw-r--r--data/scripts/maps/BattleFrontier_BattleFactoryLobby.inc14
-rw-r--r--data/scripts/maps/BattleFrontier_BattleFactoryPreBattleRoom.inc2
-rw-r--r--data/scripts/maps/BattleFrontier_BattlePalaceBattleRoom.inc4
-rw-r--r--data/scripts/maps/BattleFrontier_BattlePalaceLobby.inc14
-rw-r--r--data/scripts/maps/BattleFrontier_BattlePikeLobby.inc14
-rw-r--r--data/scripts/maps/BattleFrontier_BattlePikeThreePathRoom.inc4
-rw-r--r--data/scripts/maps/BattleFrontier_BattlePyramidEmptySquare.inc2
-rw-r--r--data/scripts/maps/BattleFrontier_BattlePyramidLobby.inc14
-rw-r--r--data/scripts/maps/BattleFrontier_BattlePyramidTop.inc2
-rw-r--r--data/scripts/maps/BattleFrontier_BattleTowerBattleRoom2.inc2
-rw-r--r--data/scripts/maps/BattleFrontier_BattleTowerLobby.inc30
-rw-r--r--data/scripts/maps/BattleFrontier_RankingHall.inc2
-rw-r--r--data/scripts/maps/FallarborTown_BattleTentBattleRoom.inc8
-rw-r--r--data/scripts/maps/FallarborTown_BattleTentLobby.inc8
-rw-r--r--data/scripts/maps/LilycoveCity_ContestLobby.inc4
-rw-r--r--data/scripts/maps/MauvilleCity_BikeShop.inc2
-rw-r--r--data/scripts/maps/MauvilleCity_PokemonCenter_1F.inc2
-rw-r--r--data/scripts/maps/MossdeepCity_SpaceCenter_2F.inc6
-rw-r--r--data/scripts/maps/PetalburgCity.inc4
-rw-r--r--data/scripts/maps/SlateportCity_BattleTentBattleRoom.inc4
-rw-r--r--data/scripts/maps/SlateportCity_BattleTentCorridor.inc2
-rw-r--r--data/scripts/maps/SlateportCity_BattleTentLobby.inc4
-rw-r--r--data/scripts/maps/SootopolisCity_MysteryEventsHouse_1F.inc10
-rw-r--r--data/scripts/maps/SootopolisCity_MysteryEventsHouse_B1F.inc2
-rw-r--r--data/scripts/maps/TrainerHill_Entrance.inc2
-rw-r--r--data/scripts/maps/VerdanturfTown_BattleTentBattleRoom.inc8
-rw-r--r--data/scripts/maps/VerdanturfTown_BattleTentLobby.inc8
-rw-r--r--data/scripts/mauville_man.inc46
-rw-r--r--data/specials.inc58
-rw-r--r--data/text/item_descriptions.inc929
-rw-r--r--data/trader.s22
-rw-r--r--include/bard_music.h4
-rw-r--r--include/battle_frontier_2.h1
-rw-r--r--include/battle_records.h12
-rw-r--r--include/bg.h2
-rw-r--r--include/constants/decorations.h1
-rw-r--r--include/constants/items.h10
-rw-r--r--include/data/item_icon_table.h414
-rw-r--r--include/data/items.h6079
-rw-r--r--include/data/text/item_descriptions.h329
-rw-r--r--include/decoration.h3
-rw-r--r--include/easy_chat.h32
-rw-r--r--include/event_scripts.h130
-rw-r--r--include/fieldmap.h23
-rw-r--r--include/fldeff_80F9BCC.h1
-rw-r--r--include/fldeff_cut.h7
-rw-r--r--include/fldeff_groundshake.h6
-rw-r--r--include/global.h157
-rw-r--r--include/graphics.h495
-rw-r--r--include/item.h63
-rw-r--r--include/item_menu.h2
-rw-r--r--include/item_use.h2
-rw-r--r--include/load_save.h26
-rw-r--r--include/mauville_old_man.h13
-rw-r--r--include/overworld.h4
-rw-r--r--include/palette.h2
-rw-r--r--include/pokenav.h1
-rw-r--r--include/script_menu.h3
-rw-r--r--include/secret_base.h3
-rw-r--r--include/strings.h22
-rw-r--r--include/trader.h2
-rw-r--r--include/trainer_card.h35
-rw-r--r--include/tv.h1
-rw-r--r--ld_script.txt19
-rw-r--r--src/bard_music.c1
-rw-r--r--src/battle_records.c510
-rw-r--r--src/berry.c2
-rw-r--r--src/berry_blender.c20
-rw-r--r--src/berry_tag_screen.c6
-rw-r--r--src/bg.c4
-rw-r--r--src/field_camera.c6
-rw-r--r--src/field_map_obj.c2
-rw-r--r--src/fieldmap.c1034
-rw-r--r--src/item.c1027
-rw-r--r--src/item_icon.c2
-rwxr-xr-xsrc/item_menu.c40
-rw-r--r--src/item_menu_icons.c6
-rw-r--r--src/lilycove_lady.c4
-rw-r--r--src/load_save.c83
-rw-r--r--src/mail.c2
-rw-r--r--src/mauville_old_man.c1247
-rw-r--r--src/new_game.c12
-rw-r--r--src/overworld.c5
-rw-r--r--src/player_pc.c12
-rw-r--r--src/pokeblock.c2
-rw-r--r--src/pokemon_summary_screen.c4
-rw-r--r--src/random.c4
-rw-r--r--src/save.c31
-rw-r--r--src/secret_base.c2
-rw-r--r--src/trader.c209
-rw-r--r--src/tv.c30
-rw-r--r--sym_bss.txt6
-rw-r--r--sym_common.txt37
-rw-r--r--sym_ewram.txt37
131 files changed, 12109 insertions, 17487 deletions
diff --git a/asm/battle_frontier_2.s b/asm/battle_frontier_2.s
index 491a87948..7f2dbcc73 100644
--- a/asm/battle_frontier_2.s
+++ b/asm/battle_frontier_2.s
@@ -12985,7 +12985,7 @@ _081A10F4:
adds r1, r0
adds r1, 0xBA
ldrh r0, [r1]
- bl ItemId_GetItem
+ bl ItemId_GetName
adds r1, r0, 0
b _081A1174
.pool
@@ -14344,7 +14344,7 @@ sub_81A1C4C: @ 81A1C4C
adds r3, r0, 0
lsls r0, r5, 3
adds r5, r0, 0x1
- ldr r0, =gResultsWindowId
+ ldr r0, =gRecordsWindowId
ldrb r0, [r0]
lsls r3, 24
lsrs r3, 24
@@ -14370,7 +14370,7 @@ sub_81A1C90: @ 81A1C90
push {r4,lr}
sub sp, 0x34
adds r2, r0, 0
- ldr r3, =gResultsWindowId
+ ldr r3, =gRecordsWindowId
movs r1, 0xAE
mov r0, sp
adds r0, 0x2F
@@ -14425,7 +14425,7 @@ sub_81A1CD8: @ 81A1CD8
lsls r0, 24
lsrs r0, 24
adds r7, r0, 0
- ldr r0, =gResultsWindowId
+ ldr r0, =gRecordsWindowId
mov r10, r0
ldrb r0, [r0]
str r7, [sp]
@@ -14644,7 +14644,7 @@ sub_81A1EA8: @ 81A1EA8
sub sp, 0xC
lsls r0, 24
lsrs r7, r0, 24
- ldr r4, =gResultsWindowId
+ ldr r4, =gRecordsWindowId
ldr r0, =gUnknown_08611C74
bl AddWindow
strb r0, [r4]
@@ -14685,7 +14685,7 @@ _081A1F28:
ldr r0, =gStringVar4
movs r1, 0x2
bl sub_81A1C4C
- ldr r6, =gResultsWindowId
+ ldr r6, =gRecordsWindowId
ldrb r0, [r6]
ldr r2, =gText_Lv502
movs r1, 0x31
@@ -14798,7 +14798,7 @@ sub_81A2008: @ 81A2008
lsrs r6, 24
lsls r5, 24
lsrs r5, 24
- ldr r0, =gResultsWindowId
+ ldr r0, =gRecordsWindowId
mov r10, r0
ldrb r0, [r0]
str r5, [sp]
@@ -14932,7 +14932,7 @@ sub_81A2134: @ 81A2134
sub sp, 0xC
lsls r0, 24
lsrs r7, r0, 24
- ldr r4, =gResultsWindowId
+ ldr r4, =gRecordsWindowId
ldr r0, =gUnknown_08611C74
bl AddWindow
strb r0, [r4]
@@ -14957,7 +14957,7 @@ _081A2184:
ldr r0, =gStringVar4
movs r1, 0
bl sub_81A1C4C
- ldr r1, =gResultsWindowId
+ ldr r1, =gRecordsWindowId
ldrb r0, [r1]
ldr r2, =gText_Lv502
movs r6, 0x21
@@ -14969,7 +14969,7 @@ _081A2184:
movs r1, 0x1
movs r3, 0x8
bl PrintTextOnWindow
- ldr r1, =gResultsWindowId
+ ldr r1, =gRecordsWindowId
ldrb r0, [r1]
ldr r2, =gText_OpenLv
movs r1, 0x61
@@ -15052,10 +15052,10 @@ _081A2184:
mov r1, r8
movs r3, 0x40
bl sub_81A2008
- ldr r1, =gResultsWindowId
+ ldr r1, =gRecordsWindowId
ldrb r0, [r1]
bl PutWindowTilemap
- ldr r1, =gResultsWindowId
+ ldr r1, =gRecordsWindowId
ldrb r0, [r1]
movs r1, 0x3
bl CopyWindowToVram
@@ -15091,7 +15091,7 @@ sub_81A22B8: @ 81A22B8
lsls r0, 24
lsrs r0, 24
adds r7, r0, 0
- ldr r0, =gResultsWindowId
+ ldr r0, =gRecordsWindowId
mov r10, r0
ldrb r0, [r0]
str r7, [sp]
@@ -15285,7 +15285,7 @@ sub_81A2460: @ 81A2460
sub sp, 0xC
lsls r0, 24
lsrs r7, r0, 24
- ldr r4, =gResultsWindowId
+ ldr r4, =gRecordsWindowId
ldr r0, =gUnknown_08611C74
bl AddWindow
strb r0, [r4]
@@ -15310,7 +15310,7 @@ _081A24B0:
ldr r0, =gStringVar4
movs r1, 0x2
bl sub_81A1C4C
- ldr r6, =gResultsWindowId
+ ldr r6, =gRecordsWindowId
ldrb r0, [r6]
ldr r2, =gText_Lv502
movs r1, 0x31
@@ -15420,7 +15420,7 @@ sub_81A258C: @ 81A258C
lsrs r6, 24
lsls r5, 24
lsrs r5, 24
- ldr r0, =gResultsWindowId
+ ldr r0, =gRecordsWindowId
mov r10, r0
ldrb r0, [r0]
str r5, [sp]
@@ -15533,7 +15533,7 @@ sub_81A2698: @ 81A2698
mov r5, r8
push {r5-r7}
sub sp, 0xC
- ldr r6, =gResultsWindowId
+ ldr r6, =gRecordsWindowId
ldr r0, =gUnknown_08611C74
bl AddWindow
strb r0, [r6]
@@ -15672,7 +15672,7 @@ sub_81A27E8: @ 81A27E8
lsls r0, 24
lsrs r0, 24
adds r7, r0, 0
- ldr r0, =gResultsWindowId
+ ldr r0, =gRecordsWindowId
mov r10, r0
ldrb r0, [r0]
str r7, [sp]
@@ -15836,7 +15836,7 @@ _081A2956:
sub_81A2968: @ 81A2968
push {r4-r6,lr}
sub sp, 0xC
- ldr r5, =gResultsWindowId
+ ldr r5, =gRecordsWindowId
ldr r0, =gUnknown_08611C74
bl AddWindow
strb r0, [r5]
@@ -15935,7 +15935,7 @@ sub_81A2A28: @ 81A2A28
lsls r0, 24
lsrs r0, 24
adds r6, r0, 0
- ldr r0, =gResultsWindowId
+ ldr r0, =gRecordsWindowId
mov r10, r0
ldrb r0, [r0]
str r6, [sp]
@@ -16211,7 +16211,7 @@ sub_81A2C94: @ 81A2C94
sub sp, 0xC
lsls r0, 24
lsrs r7, r0, 24
- ldr r4, =gResultsWindowId
+ ldr r4, =gRecordsWindowId
ldr r0, =gUnknown_08611C74
bl AddWindow
strb r0, [r4]
@@ -16236,7 +16236,7 @@ _081A2CE0:
ldr r0, =gStringVar4
movs r1, 0
bl sub_81A1C4C
- ldr r0, =gResultsWindowId
+ ldr r0, =gRecordsWindowId
mov r8, r0
ldrb r0, [r0]
ldr r2, =gText_Lv502
@@ -16340,7 +16340,7 @@ sub_81A2DB4: @ 81A2DB4
lsls r0, 24
lsrs r0, 24
adds r7, r0, 0
- ldr r0, =gResultsWindowId
+ ldr r0, =gRecordsWindowId
mov r10, r0
ldrb r0, [r0]
str r7, [sp]
@@ -16506,7 +16506,7 @@ _081A2F26:
sub_81A2F38: @ 81A2F38
push {r4-r6,lr}
sub sp, 0xC
- ldr r5, =gResultsWindowId
+ ldr r5, =gRecordsWindowId
ldr r0, =gUnknown_08611C74
bl AddWindow
strb r0, [r5]
@@ -16584,7 +16584,7 @@ sub_81A2FF8: @ 81A2FF8
mov r6, r8
push {r6,r7}
sub sp, 0xC
- ldr r4, =gResultsWindowId
+ ldr r4, =gRecordsWindowId
ldr r0, =gUnknown_08611C7C
bl AddWindow
strb r0, [r4]
@@ -16750,7 +16750,7 @@ _081A315C:
movs r2, 0x1
movs r3, 0x4
bl ConvertIntToDecimalStringN
- ldr r6, =gResultsWindowId
+ ldr r6, =gRecordsWindowId
ldrb r0, [r6]
movs r1, 0x26
adds r3, r5, 0
@@ -19026,7 +19026,7 @@ sub_81A4594: @ 81A4594
sub sp, 0x2C
mov r8, r1
adds r6, r3, 0
- ldr r1, =gResultsWindowId
+ ldr r1, =gRecordsWindowId
ldrb r5, [r1]
lsls r4, r0, 1
adds r4, r0
@@ -19062,7 +19062,7 @@ sub_81A4594: @ 81A4594
ldrb r2, [r6, 0xE]
add r0, sp, 0xC
bl TVShowConvertInternationalString
- ldr r1, =gResultsWindowId
+ ldr r1, =gRecordsWindowId
ldrb r0, [r1]
mov r3, r8
adds r3, 0x2
@@ -19102,7 +19102,7 @@ _081A4618:
adds r3, r0, 0
lsls r3, 24
lsrs r3, 24
- ldr r1, =gResultsWindowId
+ ldr r1, =gRecordsWindowId
ldrb r0, [r1]
str r7, [sp]
mov r1, r10
@@ -19136,7 +19136,7 @@ sub_81A4684: @ 81A4684
adds r7, r1, 0
mov r10, r2
adds r5, r3, 0
- ldr r1, =gResultsWindowId
+ ldr r1, =gRecordsWindowId
ldrb r0, [r1]
lsls r2, r6, 1
adds r2, r6
@@ -19176,7 +19176,7 @@ sub_81A4684: @ 81A4684
ldrb r2, [r5, 0x1A]
add r0, sp, 0xC
bl TVShowConvertInternationalString
- ldr r1, =gResultsWindowId
+ ldr r1, =gRecordsWindowId
ldrb r0, [r1]
adds r3, r7, 0x2
lsls r3, 27
@@ -19211,7 +19211,7 @@ _081A4734:
adds r1, r4, 0
bl StringCopy
_081A473C:
- ldr r2, =gResultsWindowId
+ ldr r2, =gRecordsWindowId
mov r9, r2
ldrb r0, [r2]
adds r3, r7, 0x4
@@ -19532,7 +19532,7 @@ sub_81A4998: @ 81A4998
ldr r1, [r5]
adds r0, r6, 0
bl StringExpandPlaceholders
- ldr r0, =gResultsWindowId
+ ldr r0, =gRecordsWindowId
mov r8, r0
ldrb r0, [r0]
movs r1, 0x1
@@ -19631,7 +19631,7 @@ _081A4A90:
thumb_func_start sub_81A4AA0
sub_81A4AA0: @ 81A4AA0
push {r4,lr}
- ldr r4, =gResultsWindowId
+ ldr r4, =gRecordsWindowId
ldr r0, =gUnknown_08611C84
bl AddWindow
strb r0, [r4]
@@ -19659,7 +19659,7 @@ sub_81A4AA0: @ 81A4AA0
thumb_func_start sub_81A4AE8
sub_81A4AE8: @ 81A4AE8
push {r4,lr}
- ldr r4, =gResultsWindowId
+ ldr r4, =gRecordsWindowId
ldrb r0, [r4]
movs r1, 0x11
bl FillWindowPixelBuffer
@@ -19841,7 +19841,7 @@ _081A4C4E:
ble _081A4C4E
ldr r4, =gPlayerPartyCount
ldrb r5, [r4]
- bl copy_player_party_from_sav1
+ bl LoadPlayerParty
bl sub_8076D5C
movs r0, 0x1
bl TrySavingData
@@ -29770,7 +29770,7 @@ sub_81A9E90: @ 81A9E90
ldr r0, =0x0000400e
movs r1, 0
bl VarSet
- bl copy_player_party_from_sav1
+ bl LoadPlayerParty
_081A9EB8:
pop {r0}
bx r0
diff --git a/asm/battle_records.s b/asm/battle_records.s
deleted file mode 100644
index 1880e7b45..000000000
--- a/asm/battle_records.s
+++ /dev/null
@@ -1,1285 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start sub_813BF94
-sub_813BF94: @ 813BF94
- push {r4,lr}
- sub sp, 0x4
- adds r4, r0, 0
- mov r1, sp
- movs r0, 0
- strh r0, [r1]
- ldr r2, =0x01000008
- mov r0, sp
- adds r1, r4, 0
- bl CpuSet
- movs r0, 0xFF
- strb r0, [r4]
- movs r0, 0
- strh r0, [r4, 0x8]
- strh r0, [r4, 0xA]
- strh r0, [r4, 0xC]
- strh r0, [r4, 0xE]
- add sp, 0x4
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813BF94
-
- thumb_func_start sub_813BFC4
-sub_813BFC4: @ 813BFC4
- push {r4,r5,lr}
- adds r4, r0, 0
- movs r5, 0x4
-_0813BFCA:
- adds r0, r4, 0
- bl sub_813BF94
- adds r4, 0x10
- subs r5, 0x1
- cmp r5, 0
- bge _0813BFCA
- movs r0, 0x17
- movs r1, 0
- bl SetGameStat
- movs r0, 0x18
- movs r1, 0
- bl SetGameStat
- movs r0, 0x19
- movs r1, 0
- bl SetGameStat
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end sub_813BFC4
-
- thumb_func_start sub_813BFF8
-sub_813BFF8: @ 813BFF8
- adds r1, r0, 0
- ldrh r0, [r1, 0xA]
- ldrh r2, [r1, 0xC]
- adds r0, r2
- ldrh r1, [r1, 0xE]
- adds r0, r1
- bx lr
- thumb_func_end sub_813BFF8
-
- thumb_func_start sub_813C008
-sub_813C008: @ 813C008
- push {r4-r7,lr}
- adds r7, r1, 0
- lsls r2, 16
- lsrs r6, r2, 16
- movs r5, 0
- adds r4, r0, 0
-_0813C014:
- adds r0, r4, 0
- adds r1, r7, 0
- movs r2, 0x7
- bl StringCompareN
- cmp r0, 0
- bne _0813C02C
- ldrh r0, [r4, 0x8]
- cmp r0, r6
- bne _0813C02C
- adds r0, r5, 0
- b _0813C036
-_0813C02C:
- adds r4, 0x10
- adds r5, 0x1
- cmp r5, 0x4
- ble _0813C014
- movs r0, 0x5
-_0813C036:
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end sub_813C008
-
- thumb_func_start sub_813C03C
-sub_813C03C: @ 813C03C
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x18
- mov r10, r0
- movs r1, 0x4
-_0813C04C:
- subs r3, r1, 0x1
- adds r6, r3, 0
- cmp r3, 0
- blt _0813C0BA
- lsls r0, r1, 4
- add r0, r10
- str r0, [sp, 0x14]
- lsls r0, r3, 4
- mov r2, r10
- adds r5, r0, r2
- movs r4, 0x50
- add r4, r10
- mov r9, r4
- add r1, r9
- mov r8, r1
-_0813C06A:
- ldr r0, [sp, 0x14]
- str r3, [sp, 0x10]
- bl sub_813BFF8
- adds r4, r0, 0
- adds r0, r5, 0
- bl sub_813BFF8
- ldr r3, [sp, 0x10]
- cmp r4, r0
- ble _0813C0B2
- mov r1, sp
- ldr r0, [sp, 0x14]
- ldm r0!, {r2,r4,r7}
- stm r1!, {r2,r4,r7}
- ldr r0, [r0]
- str r0, [r1]
- ldr r1, [sp, 0x14]
- adds r0, r5, 0
- ldm r0!, {r2,r4,r7}
- stm r1!, {r2,r4,r7}
- ldr r0, [r0]
- str r0, [r1]
- adds r1, r5, 0
- mov r0, sp
- ldm r0!, {r2,r4,r7}
- stm r1!, {r2,r4,r7}
- ldr r0, [r0]
- str r0, [r1]
- mov r7, r8
- ldrb r2, [r7]
- mov r0, r9
- adds r1, r0, r6
- ldrb r0, [r1]
- strb r0, [r7]
- strb r2, [r1]
-_0813C0B2:
- subs r5, 0x10
- subs r6, 0x1
- cmp r6, 0
- bge _0813C06A
-_0813C0BA:
- adds r1, r3, 0
- cmp r1, 0
- bgt _0813C04C
- add sp, 0x18
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_813C03C
-
- thumb_func_start sub_813C0D0
-sub_813C0D0: @ 813C0D0
- push {lr}
- adds r2, r0, 0
- cmp r1, 0x2
- beq _0813C100
- cmp r1, 0x2
- bgt _0813C0E2
- cmp r1, 0x1
- beq _0813C0E8
- b _0813C12A
-_0813C0E2:
- cmp r1, 0x3
- beq _0813C118
- b _0813C12A
-_0813C0E8:
- ldrh r0, [r2, 0xA]
- adds r0, 0x1
- strh r0, [r2, 0xA]
- lsls r0, 16
- lsrs r0, 16
- ldr r1, =0x0000270f
- cmp r0, r1
- bls _0813C12A
- strh r1, [r2, 0xA]
- b _0813C12A
- .pool
-_0813C100:
- ldrh r0, [r2, 0xC]
- adds r0, 0x1
- strh r0, [r2, 0xC]
- lsls r0, 16
- lsrs r0, 16
- ldr r1, =0x0000270f
- cmp r0, r1
- bls _0813C12A
- strh r1, [r2, 0xC]
- b _0813C12A
- .pool
-_0813C118:
- ldrh r0, [r2, 0xE]
- adds r0, 0x1
- strh r0, [r2, 0xE]
- lsls r0, 16
- lsrs r0, 16
- ldr r1, =0x0000270f
- cmp r0, r1
- bls _0813C12A
- strh r1, [r2, 0xE]
-_0813C12A:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C0D0
-
- thumb_func_start sub_813C134
-sub_813C134: @ 813C134
- push {r4,lr}
- cmp r0, 0x2
- beq _0813C14E
- cmp r0, 0x2
- bgt _0813C144
- cmp r0, 0x1
- beq _0813C14A
- b _0813C166
-_0813C144:
- cmp r0, 0x3
- beq _0813C152
- b _0813C166
-_0813C14A:
- movs r4, 0x17
- b _0813C154
-_0813C14E:
- movs r4, 0x18
- b _0813C154
-_0813C152:
- movs r4, 0x19
-_0813C154:
- adds r0, r4, 0
- bl GetGameStat
- ldr r1, =0x0000270e
- cmp r0, r1
- bhi _0813C166
- adds r0, r4, 0
- bl IncrementGameStat
-_0813C166:
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C134
-
- thumb_func_start sub_813C170
-sub_813C170: @ 813C170
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- adds r6, r0, 0
- mov r8, r1
- mov r10, r3
- ldr r0, [sp, 0x20]
- lsls r2, 16
- lsrs r7, r2, 16
- lsls r0, 24
- lsrs r0, 24
- mov r9, r0
- mov r0, r10
- bl sub_813C134
- adds r0, r6, 0
- bl sub_813C03C
- adds r0, r6, 0
- mov r1, r8
- adds r2, r7, 0
- bl sub_813C008
- adds r5, r0, 0
- cmp r5, 0x5
- bne _0813C1D4
- movs r5, 0x4
- adds r4, r6, 0
- adds r4, 0x40
- adds r0, r4, 0
- bl sub_813BF94
- adds r0, r4, 0
- mov r1, r8
- movs r2, 0x7
- bl StringCopyN
- strh r7, [r4, 0x8]
- adds r2, r6, 0
- adds r2, 0x54
- ldr r1, =gLinkPlayers
- mov r3, r9
- lsls r0, r3, 3
- subs r0, r3
- lsls r0, 2
- adds r0, r1
- ldrh r0, [r0, 0x1A]
- strb r0, [r2]
-_0813C1D4:
- lsls r0, r5, 4
- adds r0, r6, r0
- mov r1, r10
- bl sub_813C0D0
- adds r0, r6, 0
- bl sub_813C03C
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C170
-
- thumb_func_start InitLinkBattleRecords
-InitLinkBattleRecords: @ 813C1F8
- push {lr}
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00003150
- adds r0, r1
- bl sub_813BFC4
- pop {r0}
- bx r0
- .pool
- thumb_func_end InitLinkBattleRecords
-
- thumb_func_start sub_813C214
-sub_813C214: @ 813C214
- push {lr}
- movs r1, 0x64
- muls r1, r0
- ldr r0, =gUnknown_02039B6C
- adds r1, r0
- ldrh r0, [r1]
- adds r0, 0x1
- strh r0, [r1]
- lsls r0, 16
- lsrs r0, 16
- ldr r2, =0x0000270f
- cmp r0, r2
- bls _0813C230
- strh r2, [r1]
-_0813C230:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C214
-
- thumb_func_start sub_813C23C
-sub_813C23C: @ 813C23C
- push {lr}
- movs r1, 0x64
- muls r1, r0
- ldr r0, =gUnknown_02039B6E
- adds r1, r0
- ldrh r0, [r1]
- adds r0, 0x1
- strh r0, [r1]
- lsls r0, 16
- lsrs r0, 16
- ldr r2, =0x0000270f
- cmp r0, r2
- bls _0813C258
- strh r2, [r1]
-_0813C258:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C23C
-
- thumb_func_start sub_813C264
-sub_813C264: @ 813C264
- push {r4,lr}
- adds r4, r0, 0
- ldr r0, =gBattleOutcome
- ldrb r0, [r0]
- cmp r0, 0x1
- beq _0813C27C
- cmp r0, 0x2
- beq _0813C28A
- b _0813C298
- .pool
-_0813C27C:
- eors r0, r4
- bl sub_813C214
- adds r0, r4, 0
- bl sub_813C23C
- b _0813C298
-_0813C28A:
- movs r0, 0x1
- eors r0, r4
- bl sub_813C23C
- adds r0, r4, 0
- bl sub_813C214
-_0813C298:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_813C264
-
- thumb_func_start sub_813C2A0
-sub_813C2A0: @ 813C2A0
- push {r4,lr}
- sub sp, 0x4
- adds r4, r0, 0
- bl InUnionRoom
- cmp r0, 0x1
- beq _0813C2DA
- adds r0, r4, 0
- bl sub_813C264
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00003150
- adds r0, r1
- movs r1, 0x64
- adds r3, r4, 0
- muls r3, r1
- ldr r2, =gUnknown_02039B88
- adds r1, r3, r2
- subs r2, 0x30
- adds r3, r2
- ldrh r2, [r3, 0xE]
- ldr r3, =gBattleOutcome
- ldrb r3, [r3]
- lsls r4, 24
- lsrs r4, 24
- str r4, [sp]
- bl sub_813C170
-_0813C2DA:
- add sp, 0x4
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C2A0
-
- thumb_func_start sub_813C2F4
-sub_813C2F4: @ 813C2F4
- push {r4,lr}
- sub sp, 0xC
- ldr r4, =gStringVar1
- movs r0, 0x17
- bl GetGameStat
- adds r1, r0, 0
- adds r0, r4, 0
- movs r2, 0
- movs r3, 0x4
- bl ConvertIntToDecimalStringN
- ldr r4, =gStringVar2
- movs r0, 0x18
- bl GetGameStat
- adds r1, r0, 0
- adds r0, r4, 0
- movs r2, 0
- movs r3, 0x4
- bl ConvertIntToDecimalStringN
- ldr r4, =gStringVar3
- movs r0, 0x19
- bl GetGameStat
- adds r1, r0, 0
- adds r0, r4, 0
- movs r2, 0
- movs r3, 0x4
- bl ConvertIntToDecimalStringN
- ldr r4, =gStringVar4
- ldr r1, =gText_TotalRecordWLD
- adds r0, r4, 0
- bl StringExpandPlaceholders
- movs r0, 0x1
- adds r1, r4, 0
- movs r2, 0xD0
- bl GetStringCenterAlignXOffset
- adds r3, r0, 0
- ldr r0, =gResultsWindowId
- ldrb r0, [r0]
- lsls r3, 24
- lsrs r3, 24
- movs r1, 0x11
- str r1, [sp]
- movs r1, 0
- str r1, [sp, 0x4]
- str r1, [sp, 0x8]
- movs r1, 0x1
- adds r2, r4, 0
- bl PrintTextOnWindow
- add sp, 0xC
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C2F4
-
- thumb_func_start sub_813C384
-sub_813C384: @ 813C384
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- sub sp, 0xC
- adds r6, r0, 0
- adds r5, r2, 0
- lsls r1, 24
- lsrs r4, r1, 24
- ldrh r0, [r6, 0xA]
- cmp r0, 0
- bne _0813C40C
- ldr r7, [r6, 0xC]
- cmp r7, 0
- bne _0813C40C
- ldr r0, =gResultsWindowId
- mov r8, r0
- ldrb r0, [r0]
- ldr r2, =gUnknown_085B3D84
- lsls r4, 3
- adds r4, 0x1
- lsls r4, 24
- lsrs r4, 24
- str r4, [sp]
- str r7, [sp, 0x4]
- str r7, [sp, 0x8]
- movs r1, 0x1
- movs r3, 0x8
- bl PrintTextOnWindow
- mov r1, r8
- ldrb r0, [r1]
- ldr r5, =gUnknown_085B3D8C
- str r4, [sp]
- str r7, [sp, 0x4]
- str r7, [sp, 0x8]
- movs r1, 0x1
- adds r2, r5, 0
- movs r3, 0x50
- bl PrintTextOnWindow
- mov r1, r8
- ldrb r0, [r1]
- str r4, [sp]
- str r7, [sp, 0x4]
- str r7, [sp, 0x8]
- movs r1, 0x1
- adds r2, r5, 0
- movs r3, 0x80
- bl PrintTextOnWindow
- mov r1, r8
- ldrb r0, [r1]
- str r4, [sp]
- str r7, [sp, 0x4]
- str r7, [sp, 0x8]
- movs r1, 0x1
- adds r2, r5, 0
- movs r3, 0xB0
- bl PrintTextOnWindow
- b _0813C4A8
- .pool
-_0813C40C:
- ldr r0, =gStringVar1
- movs r1, 0x8
- bl StringFillWithTerminator
- ldr r0, =gStringVar1
- adds r1, r6, 0
- movs r2, 0x7
- bl StringCopyN
- lsls r1, r5, 24
- lsrs r1, 24
- ldr r0, =gStringVar1
- bl ConvertInternationalString
- ldr r0, =gResultsWindowId
- mov r8, r0
- ldrb r0, [r0]
- lsls r4, 3
- adds r4, 0x1
- lsls r4, 24
- lsrs r4, 24
- str r4, [sp]
- movs r5, 0
- str r5, [sp, 0x4]
- str r5, [sp, 0x8]
- movs r1, 0x1
- ldr r2, =gStringVar1
- movs r3, 0x8
- bl PrintTextOnWindow
- ldrh r1, [r6, 0xA]
- ldr r0, =gStringVar1
- movs r2, 0x1
- movs r3, 0x4
- bl ConvertIntToDecimalStringN
- mov r1, r8
- ldrb r0, [r1]
- str r4, [sp]
- str r5, [sp, 0x4]
- str r5, [sp, 0x8]
- movs r1, 0x1
- ldr r2, =gStringVar1
- movs r3, 0x50
- bl PrintTextOnWindow
- ldrh r1, [r6, 0xC]
- ldr r0, =gStringVar1
- movs r2, 0x1
- movs r3, 0x4
- bl ConvertIntToDecimalStringN
- mov r1, r8
- ldrb r0, [r1]
- str r4, [sp]
- str r5, [sp, 0x4]
- str r5, [sp, 0x8]
- movs r1, 0x1
- ldr r2, =gStringVar1
- movs r3, 0x80
- bl PrintTextOnWindow
- ldrh r1, [r6, 0xE]
- ldr r0, =gStringVar1
- movs r2, 0x1
- movs r3, 0x4
- bl ConvertIntToDecimalStringN
- mov r1, r8
- ldrb r0, [r1]
- str r4, [sp]
- str r5, [sp, 0x4]
- str r5, [sp, 0x8]
- movs r1, 0x1
- ldr r2, =gStringVar1
- movs r3, 0xB0
- bl PrintTextOnWindow
-_0813C4A8:
- add sp, 0xC
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C384
-
- thumb_func_start sub_813C4BC
-sub_813C4BC: @ 813C4BC
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- sub sp, 0xC
- ldr r6, =gResultsWindowId
- ldr r0, =gUnknown_085B3D7C
- bl AddWindow
- strb r0, [r6]
- ldrb r0, [r6]
- movs r1, 0
- bl NewMenuHelpers_DrawStdWindowFrame
- ldrb r0, [r6]
- movs r1, 0x11
- bl FillWindowPixelBuffer
- ldr r5, =gStringVar4
- ldr r1, =gText_PlayersBattleResults
- adds r0, r5, 0
- bl StringExpandPlaceholders
- movs r0, 0x1
- adds r1, r5, 0
- movs r2, 0xD0
- bl GetStringCenterAlignXOffset
- adds r3, r0, 0
- ldrb r0, [r6]
- lsls r3, 24
- lsrs r3, 24
- movs r1, 0x1
- str r1, [sp]
- movs r4, 0
- str r4, [sp, 0x4]
- str r4, [sp, 0x8]
- adds r2, r5, 0
- bl PrintTextOnWindow
- ldr r0, =gSaveBlock1Ptr
- mov r8, r0
- ldr r0, [r0]
- ldr r1, =0x00003150
- mov r9, r1
- add r0, r9
- bl sub_813C2F4
- ldr r1, =gText_WinLoseDraw
- adds r0, r5, 0
- bl StringExpandPlaceholders
- ldrb r0, [r6]
- movs r1, 0x29
- str r1, [sp]
- str r4, [sp, 0x4]
- str r4, [sp, 0x8]
- movs r1, 0x1
- adds r2, r5, 0
- movs r3, 0
- bl PrintTextOnWindow
- mov r7, r8
- movs r6, 0xE0
- lsls r6, 19
- mov r5, r9
-_0813C540:
- ldr r2, [r7]
- adds r0, r2, r5
- lsrs r1, r6, 24
- ldr r3, =0x000031a0
- adds r2, r3
- adds r2, r4
- ldrb r2, [r2]
- bl sub_813C384
- movs r0, 0x80
- lsls r0, 18
- adds r6, r0
- adds r5, 0x10
- adds r4, 0x1
- cmp r4, 0x4
- ble _0813C540
- ldr r4, =gResultsWindowId
- ldrb r0, [r4]
- bl PutWindowTilemap
- ldrb r0, [r4]
- movs r1, 0x3
- bl CopyWindowToVram
- add sp, 0xC
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C4BC
-
- thumb_func_start sub_813C5A0
-sub_813C5A0: @ 813C5A0
- push {r4,lr}
- ldr r4, =gResultsWindowId
- ldrb r0, [r4]
- movs r1, 0
- bl sub_819746C
- ldrb r0, [r4]
- bl RemoveWindow
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C5A0
-
- thumb_func_start sub_813C5BC
-sub_813C5BC: @ 813C5BC
- push {lr}
- lsls r0, 24
- lsrs r2, r0, 24
- ldr r0, =gPaletteFade
- ldrb r1, [r0, 0x7]
- movs r0, 0x80
- ands r0, r1
- cmp r0, 0
- bne _0813C5DC
- ldr r0, =gTasks
- lsls r1, r2, 2
- adds r1, r2
- lsls r1, 3
- adds r1, r0
- ldr r0, =sub_813C5EC
- str r0, [r1]
-_0813C5DC:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C5BC
-
- thumb_func_start sub_813C5EC
-sub_813C5EC: @ 813C5EC
- push {r4,lr}
- lsls r0, 24
- lsrs r0, 24
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- ldr r0, =gTasks
- adds r4, r1, r0
- ldr r0, =gMain
- ldrh r1, [r0, 0x2E]
- movs r0, 0x1
- ands r0, r1
- cmp r0, 0
- bne _0813C610
- movs r0, 0x2
- ands r0, r1
- cmp r0, 0
- beq _0813C61A
-_0813C610:
- movs r0, 0x5
- bl PlaySE
- ldr r0, =sub_813C62C
- str r0, [r4]
-_0813C61A:
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C5EC
-
- thumb_func_start sub_813C62C
-sub_813C62C: @ 813C62C
- push {r4,lr}
- sub sp, 0x4
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- movs r0, 0x1
- negs r0, r0
- movs r1, 0
- str r1, [sp]
- movs r2, 0
- movs r3, 0x10
- bl BeginNormalPaletteFade
- ldr r1, =gTasks
- lsls r0, r4, 2
- adds r0, r4
- lsls r0, 3
- adds r0, r1
- ldr r1, =sub_813C664
- str r1, [r0]
- add sp, 0x4
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C62C
-
- thumb_func_start sub_813C664
-sub_813C664: @ 813C664
- push {r4,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- ldr r0, =gPaletteFade
- ldrb r1, [r0, 0x7]
- movs r0, 0x80
- ands r0, r1
- cmp r0, 0
- bne _0813C694
- ldr r0, =CB2_ReturnToFieldContinueScript
- bl SetMainCallback2
- ldr r0, =gUnknown_0203AB78
- ldr r0, [r0]
- bl Free
- movs r0, 0
- bl sub_813C6A8
- bl FreeAllWindowBuffers
- adds r0, r4, 0
- bl DestroyTask
-_0813C694:
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C664
-
- thumb_func_start sub_813C6A8
-sub_813C6A8: @ 813C6A8
- push {r4,lr}
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- adds r0, r4, 0
- movs r1, 0
- bl FillWindowPixelBuffer
- adds r0, r4, 0
- bl ClearWindowTilemap
- adds r0, r4, 0
- movs r1, 0x2
- bl CopyWindowToVram
- adds r0, r4, 0
- bl RemoveWindow
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end sub_813C6A8
-
- thumb_func_start sub_813C6D4
-sub_813C6D4: @ 813C6D4
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- sub sp, 0x8
- movs r3, 0xC0
- lsls r3, 19
- movs r4, 0xC0
- lsls r4, 9
- add r0, sp, 0x4
- mov r8, r0
- mov r2, sp
- movs r6, 0
- ldr r1, =0x040000d4
- movs r5, 0x80
- lsls r5, 5
- ldr r7, =0x81000800
- movs r0, 0x81
- lsls r0, 24
- mov r12, r0
-_0813C6FA:
- strh r6, [r2]
- mov r0, sp
- str r0, [r1]
- str r3, [r1, 0x4]
- str r7, [r1, 0x8]
- ldr r0, [r1, 0x8]
- adds r3, r5
- subs r4, r5
- cmp r4, r5
- bhi _0813C6FA
- strh r6, [r2]
- mov r2, sp
- str r2, [r1]
- str r3, [r1, 0x4]
- lsrs r0, r4, 1
- mov r2, r12
- orrs r0, r2
- str r0, [r1, 0x8]
- ldr r0, [r1, 0x8]
- movs r0, 0xE0
- lsls r0, 19
- movs r3, 0x80
- lsls r3, 3
- movs r4, 0
- str r4, [sp, 0x4]
- ldr r2, =0x040000d4
- mov r1, r8
- str r1, [r2]
- str r0, [r2, 0x4]
- lsrs r0, r3, 2
- movs r1, 0x85
- lsls r1, 24
- orrs r0, r1
- str r0, [r2, 0x8]
- ldr r0, [r2, 0x8]
- movs r1, 0xA0
- lsls r1, 19
- mov r0, sp
- strh r4, [r0]
- str r0, [r2]
- str r1, [r2, 0x4]
- lsrs r3, 1
- movs r0, 0x81
- lsls r0, 24
- orrs r3, r0
- str r3, [r2, 0x8]
- ldr r0, [r2, 0x8]
- movs r0, 0
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x8
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x10
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x12
- movs r1, 0
- bl SetGpuReg
- movs r0, 0xA
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x14
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x16
- movs r1, 0
- bl SetGpuReg
- movs r0, 0xC
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x18
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x1A
- movs r1, 0
- bl SetGpuReg
- movs r0, 0xE
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x1C
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x1E
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x40
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x44
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x48
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x4A
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x50
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x52
- movs r1, 0
- bl SetGpuReg
- movs r0, 0x54
- movs r1, 0
- bl SetGpuReg
- add sp, 0x8
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C6D4
-
- thumb_func_start sub_813C80C
-sub_813C80C: @ 813C80C
- push {lr}
- bl ScanlineEffect_Stop
- bl ResetTasks
- bl ResetSpriteData
- bl ResetPaletteFade
- bl FreeAllSpritePalettes
- pop {r0}
- bx r0
- thumb_func_end sub_813C80C
-
- thumb_func_start sub_813C828
-sub_813C828: @ 813C828
- push {lr}
- movs r0, 0
- movs r1, 0
- movs r2, 0
- bl ChangeBgX
- movs r0, 0
- movs r1, 0
- movs r2, 0
- bl ChangeBgY
- movs r0, 0x1
- movs r1, 0
- movs r2, 0
- bl ChangeBgX
- movs r0, 0x1
- movs r1, 0
- movs r2, 0
- bl ChangeBgY
- movs r0, 0x2
- movs r1, 0
- movs r2, 0
- bl ChangeBgX
- movs r0, 0x2
- movs r1, 0
- movs r2, 0
- bl ChangeBgY
- movs r0, 0x3
- movs r1, 0
- movs r2, 0
- bl ChangeBgX
- movs r0, 0x3
- movs r1, 0
- movs r2, 0
- bl ChangeBgY
- pop {r0}
- bx r0
- thumb_func_end sub_813C828
-
- thumb_func_start sub_813C880
-sub_813C880: @ 813C880
- push {lr}
- movs r1, 0x94
- lsls r1, 4
- movs r0, 0
- bl SetGpuReg
- pop {r0}
- bx r0
- thumb_func_end sub_813C880
-
- thumb_func_start sub_813C890
-sub_813C890: @ 813C890
- push {r4,lr}
- sub sp, 0x8
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- ldr r1, =gUnknown_085B3484
- adds r0, r4, 0
- movs r2, 0xC0
- movs r3, 0
- bl LoadBgTiles
- ldr r1, =gUnknown_085B3564
- movs r0, 0x20
- str r0, [sp]
- str r0, [sp, 0x4]
- adds r0, r4, 0
- movs r2, 0
- movs r3, 0
- bl CopyToBgTilemapBufferRect
- ldr r0, =gUnknown_085B3544
- movs r1, 0
- movs r2, 0x20
- bl LoadPalette
- add sp, 0x8
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C890
-
- thumb_func_start sub_813C8D8
-sub_813C8D8: @ 813C8D8
- push {lr}
- bl LoadOam
- bl ProcessSpriteCopyRequests
- bl TransferPlttBuffer
- pop {r0}
- bx r0
- thumb_func_end sub_813C8D8
-
- thumb_func_start sub_813C8EC
-sub_813C8EC: @ 813C8EC
- push {lr}
- bl RunTasks
- bl AnimateSprites
- bl BuildOamBuffer
- bl UpdatePaletteFade
- pop {r0}
- bx r0
- thumb_func_end sub_813C8EC
-
- thumb_func_start sub_813C904
-sub_813C904: @ 813C904
- push {lr}
- movs r0, 0
- bl SetVBlankCallback
- ldr r0, =sub_813C91C
- bl SetMainCallback2
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C904
-
- thumb_func_start sub_813C91C
-sub_813C91C: @ 813C91C
- push {r4,lr}
- sub sp, 0x4
- ldr r0, =gMain
- movs r1, 0x87
- lsls r1, 3
- adds r0, r1
- ldrb r0, [r0]
- cmp r0, 0x7
- bls _0813C930
- b _0813CA3C
-_0813C930:
- lsls r0, 2
- ldr r1, =_0813C944
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .pool
- .align 2, 0
-_0813C944:
- .4byte _0813C964
- .4byte _0813C970
- .4byte _0813C976
- .4byte _0813C9A8
- .4byte _0813C9BE
- .4byte _0813C9DE
- .4byte _0813C9F0
- .4byte _0813CA14
-_0813C964:
- movs r0, 0
- bl SetVBlankCallback
- bl sub_813C6D4
- b _0813CA00
-_0813C970:
- bl sub_813C80C
- b _0813CA00
-_0813C976:
- ldr r4, =gUnknown_0203AB78
- movs r0, 0x80
- lsls r0, 4
- bl AllocZeroed
- str r0, [r4]
- movs r0, 0
- bl ResetBgsAndClearDma3BusyFlags
- ldr r1, =gUnknown_085B3D64
- movs r0, 0
- movs r2, 0x2
- bl InitBgsFromTemplates
- ldr r1, [r4]
- movs r0, 0x3
- bl SetBgTilemapBuffer
- bl sub_813C828
- b _0813CA00
- .pool
-_0813C9A8:
- movs r0, 0x3
- bl sub_813C890
- movs r0, 0
- bl stdpal_get
- movs r1, 0xF0
- movs r2, 0x20
- bl LoadPalette
- b _0813CA00
-_0813C9BE:
- bl IsDma3ManagerBusyWithBgCopy
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- beq _0813CA3C
- movs r0, 0
- bl ShowBg
- movs r0, 0x3
- bl ShowBg
- movs r0, 0x3
- bl CopyBgTilemapBufferToVram
- b _0813CA00
-_0813C9DE:
- ldr r0, =gUnknown_085B3D6C
- bl InitWindows
- bl DeactivateAllTextPrinters
- b _0813CA00
- .pool
-_0813C9F0:
- movs r0, 0x1
- negs r0, r0
- movs r1, 0
- str r1, [sp]
- movs r2, 0x10
- movs r3, 0
- bl BeginNormalPaletteFade
-_0813CA00:
- ldr r1, =gMain
- movs r0, 0x87
- lsls r0, 3
- adds r1, r0
- ldrb r0, [r1]
- adds r0, 0x1
- strb r0, [r1]
- b _0813CA3C
- .pool
-_0813CA14:
- bl sub_813C880
- ldr r0, =sub_813C8D8
- bl SetVBlankCallback
- bl sub_81D5C8C
- ldr r0, =sub_813C5BC
- movs r1, 0x8
- bl CreateTask
- ldr r0, =sub_813C8EC
- bl SetMainCallback2
- ldr r0, =gMain
- movs r1, 0x87
- lsls r1, 3
- adds r0, r1
- movs r1, 0
- strb r1, [r0]
-_0813CA3C:
- add sp, 0x4
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_813C91C
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/cable_club.s b/asm/cable_club.s
index e6fbd1886..7ef499226 100644
--- a/asm/cable_club.s
+++ b/asm/cable_club.s
@@ -960,7 +960,7 @@ task_map_chg_seq_0807EC34: @ 80B2B94
push {r4,r5,lr}
adds r5, r0, 0
adds r4, r1, 0
- ldr r1, =gUnknown_02039B58
+ ldr r1, =gTrainerCards
ldrh r0, [r5]
cmp r0, 0x1
bne _080B2C10
@@ -1044,7 +1044,7 @@ sub_80B2C30: @ 80B2C30
_080B2C5C:
movs r0, 0x64
muls r0, r4
- ldr r1, =gUnknown_02039B58
+ ldr r1, =gTrainerCards
adds r0, r1
lsls r1, r4, 8
ldr r2, =gBlockRecvBuffer
@@ -2157,8 +2157,8 @@ sub_80B360C: @ 80B360C
ands r0, r1
str r0, [r2]
bl Overworld_ResetMapMusic
- bl copy_player_party_from_sav1
- bl copy_bags_and_unk_data_to_save_blocks
+ bl LoadPlayerParty
+ bl SavePlayerBag
bl sub_813BF10
ldr r0, =gSpecialVar_0x8004
ldrh r0, [r0]
@@ -2171,7 +2171,7 @@ sub_80B360C: @ 80B360C
ldrb r0, [r0]
movs r5, 0x1
eors r0, r5
- bl sub_813C2A0
+ bl UpdatePlayerLinkBattleRecords
ldr r0, =gWirelessCommType
ldrb r0, [r0]
cmp r0, 0
@@ -2251,8 +2251,8 @@ sub_80B36EC: @ 80B36EC
cmp r0, 0x9
bne _080B370E
_080B3706:
- bl copy_player_party_from_sav1
- bl copy_bags_and_unk_data_to_save_blocks
+ bl LoadPlayerParty
+ bl SavePlayerBag
_080B370E:
movs r0, 0x7F
bl copy_saved_warp2_bank_and_enter_x_to_warp1
diff --git a/asm/easy_chat.s b/asm/easy_chat.s
index 0cbe1f1ae..7f2a7ca88 100644
--- a/asm/easy_chat.s
+++ b/asm/easy_chat.s
@@ -9243,8 +9243,8 @@ _0811EA68:
bx r1
thumb_func_end sub_811EA28
- thumb_func_start start_menu_is_selected_item_valid
-start_menu_is_selected_item_valid: @ 811EA6C
+ thumb_func_start EasyChat_GetNumWordsInGroup
+EasyChat_GetNumWordsInGroup: @ 811EA6C
push {r4,lr}
lsls r0, 24
lsrs r0, 24
@@ -9273,7 +9273,7 @@ _0811EA9A:
pop {r1}
bx r1
.pool
- thumb_func_end start_menu_is_selected_item_valid
+ thumb_func_end EasyChat_GetNumWordsInGroup
thumb_func_start sub_811EAA4
sub_811EAA4: @ 811EAA4
@@ -10145,7 +10145,7 @@ sub_811F0F8: @ 811F0F8
sub_811F108: @ 811F108
push {r4-r7,lr}
movs r0, 0
- bl start_menu_is_selected_item_valid
+ bl EasyChat_GetNumWordsInGroup
lsls r0, 16
lsrs r4, r0, 16
cmp r4, 0
diff --git a/asm/field_screen.s b/asm/field_screen.s
index 2a539d111..e3d48f882 100644
--- a/asm/field_screen.s
+++ b/asm/field_screen.s
@@ -8861,7 +8861,7 @@ sub_80AF87C: @ 80AF87C
movs r0, 0x1
bl sub_8085540
bl ScriptContext2_Enable
- bl save_serialize_npcs
+ bl SaveMapObjects
bl music_something
bl sub_80AF0B4
movs r0, 0x2D
diff --git a/asm/fieldmap.s b/asm/fieldmap.s
deleted file mode 100644
index 21aea8ad7..000000000
--- a/asm/fieldmap.s
+++ /dev/null
@@ -1,2285 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start mapconnection_get_mapheader
-mapconnection_get_mapheader: @ 8087D44
- push {lr}
- ldrb r2, [r0, 0x8]
- ldrb r1, [r0, 0x9]
- adds r0, r2, 0
- bl Overworld_GetMapHeaderByGroupAndId
- pop {r1}
- bx r1
- thumb_func_end mapconnection_get_mapheader
-
- thumb_func_start not_trainer_hill_battle_pyramid
-not_trainer_hill_battle_pyramid: @ 8087D54
- push {r4,lr}
- ldr r4, =gMapHeader
- adds r0, r4, 0
- bl mapheader_copy_mapdata_with_padding
- ldr r0, [r4, 0x4]
- bl sub_80E8EE0
- bl mapheader_run_script_with_tag_x1
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end not_trainer_hill_battle_pyramid
-
- thumb_func_start sub_8087D74
-sub_8087D74: @ 8087D74
- push {r4,lr}
- ldr r4, =gMapHeader
- adds r0, r4, 0
- bl mapheader_copy_mapdata_with_padding
- movs r0, 0
- bl sub_80E9238
- ldr r0, [r4, 0x4]
- bl sub_80E8EE0
- bl mapdata_from_sav2
- bl mapheader_run_script_with_tag_x1
- ldr r1, =gUnknown_03005DC0
- ldr r0, [r1]
- ldr r1, [r1, 0x4]
- bl UpdateTVScreensOnMap
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8087D74
-
- thumb_func_start battle_pyramid_map_load_related
-battle_pyramid_map_load_related: @ 8087DAC
- push {r4,r5,lr}
- sub sp, 0x4
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- ldr r0, =0x03ff03ff
- str r0, [sp]
- ldr r5, =gUnknown_02032318
- ldr r2, =0x01001400
- mov r0, sp
- adds r1, r5, 0
- bl CpuFastSet
- adds r0, r5, 0
- adds r1, r4, 0
- bl sub_81AA078
- add sp, 0x4
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end battle_pyramid_map_load_related
-
- thumb_func_start trainer_hill_map_load_related
-trainer_hill_map_load_related: @ 8087DE4
- push {r4,lr}
- sub sp, 0x4
- ldr r0, =0x03ff03ff
- str r0, [sp]
- ldr r4, =gUnknown_02032318
- ldr r2, =0x01001400
- mov r0, sp
- adds r1, r4, 0
- bl CpuFastSet
- adds r0, r4, 0
- bl sub_81D5FB4
- add sp, 0x4
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end trainer_hill_map_load_related
-
- thumb_func_start mapheader_copy_mapdata_with_padding
-@ void mapheader_copy_mapdata_with_padding(struct mapheader *mapHeader)
-mapheader_copy_mapdata_with_padding: @ 8087E14
- push {r4-r6,lr}
- sub sp, 0x4
- adds r6, r0, 0
- ldr r5, [r6]
- ldr r0, =0x03ff03ff
- str r0, [sp]
- ldr r4, =gUnknown_02032318
- ldr r2, =0x01001400
- mov r0, sp
- adds r1, r4, 0
- bl CpuFastSet
- ldr r2, =gUnknown_03005DC0
- str r4, [r2, 0x8]
- ldr r1, [r5]
- adds r1, 0xF
- str r1, [r2]
- ldr r0, [r5, 0x4]
- adds r0, 0xE
- str r0, [r2, 0x4]
- muls r1, r0
- movs r0, 0xA0
- lsls r0, 6
- cmp r1, r0
- bgt _08087E56
- ldr r0, [r5, 0xC]
- ldrh r1, [r5]
- ldrh r2, [r5, 0x4]
- bl map_copy_with_padding
- adds r0, r6, 0
- bl mapheader_copy_mapdata_of_adjacent_maps
-_08087E56:
- add sp, 0x4
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end mapheader_copy_mapdata_with_padding
-
- thumb_func_start map_copy_with_padding
-@ int map_copy_with_padding(void *src)
-map_copy_with_padding: @ 8087E70
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- adds r7, r0, 0
- lsls r1, 16
- lsrs r1, 16
- mov r8, r1
- lsls r2, 16
- lsrs r2, 16
- ldr r0, =gUnknown_03005DC0
- ldr r4, [r0, 0x8]
- ldr r1, [r0]
- lsls r0, r1, 3
- subs r0, r1
- lsls r0, 1
- adds r0, 0xE
- adds r4, r0
- cmp r2, 0
- beq _08087EB8
- mov r0, r8
- lsls r6, r0, 1
- adds r5, r2, 0
- movs r0, 0x1E
- adds r0, r6
- mov r9, r0
-_08087EA4:
- adds r0, r7, 0
- adds r1, r4, 0
- mov r2, r8
- bl CpuSet
- add r4, r9
- adds r7, r6
- subs r5, 0x1
- cmp r5, 0
- bne _08087EA4
-_08087EB8:
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end map_copy_with_padding
-
- thumb_func_start mapheader_copy_mapdata_of_adjacent_maps
-@ void mapheader_copy_mapdata_of_adjacent_maps(struct mapheader *mapHeader)
-mapheader_copy_mapdata_of_adjacent_maps: @ 8087EC8
- push {r4-r7,lr}
- adds r6, r0, 0
- ldr r0, [r6, 0xC]
- cmp r0, 0
- beq _08087F4C
- ldr r1, [r0]
- ldr r5, [r0, 0x4]
- ldr r2, =gUnknown_02037340
- ldr r0, =gUnknown_08486EF8
- ldr r0, [r0]
- str r0, [r2]
- cmp r1, 0
- ble _08087F4C
- adds r4, r2, 0
- adds r7, r1, 0
-_08087EE6:
- adds r0, r5, 0
- bl mapconnection_get_mapheader
- adds r1, r0, 0
- ldr r2, [r5, 0x4]
- ldrb r0, [r5]
- cmp r0, 0x2
- beq _08087F1E
- cmp r0, 0x2
- bgt _08087F08
- cmp r0, 0x1
- beq _08087F12
- b _08087F44
- .pool
-_08087F08:
- cmp r0, 0x3
- beq _08087F2A
- cmp r0, 0x4
- beq _08087F36
- b _08087F44
-_08087F12:
- adds r0, r6, 0
- bl sub_8087FB8
- ldrb r0, [r4]
- movs r1, 0x1
- b _08087F40
-_08087F1E:
- adds r0, r6, 0
- bl sub_8088020
- ldrb r0, [r4]
- movs r1, 0x2
- b _08087F40
-_08087F2A:
- adds r0, r6, 0
- bl sub_8088080
- ldrb r0, [r4]
- movs r1, 0x4
- b _08087F40
-_08087F36:
- adds r0, r6, 0
- bl sub_80880E0
- ldrb r0, [r4]
- movs r1, 0x8
-_08087F40:
- orrs r0, r1
- strb r0, [r4]
-_08087F44:
- subs r7, 0x1
- adds r5, 0xC
- cmp r7, 0
- bne _08087EE6
-_08087F4C:
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end mapheader_copy_mapdata_of_adjacent_maps
-
- thumb_func_start sub_8087F54
-sub_8087F54: @ 8087F54
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- ldr r5, [sp, 0x18]
- ldr r4, [r2]
- ldr r7, [r4]
- adds r2, r7, 0
- muls r2, r5
- adds r2, r3
- lsls r2, 1
- ldr r3, [r4, 0xC]
- adds r6, r3, r2
- ldr r3, =gUnknown_03005DC0
- ldr r2, [r3]
- muls r1, r2
- adds r1, r0
- lsls r1, 1
- ldr r0, [r3, 0x8]
- adds r5, r0, r1
- ldr r0, [sp, 0x20]
- cmp r0, 0
- ble _08087FA6
- adds r4, r0, 0
- ldr r3, =0x001fffff
- mov r8, r3
-_08087F86:
- adds r0, r6, 0
- adds r1, r5, 0
- ldr r2, [sp, 0x1C]
- mov r3, r8
- ands r2, r3
- bl CpuSet
- ldr r0, =gUnknown_03005DC0
- ldr r0, [r0]
- lsls r0, 1
- adds r5, r0
- lsls r0, r7, 1
- adds r6, r0
- subs r4, 0x1
- cmp r4, 0
- bne _08087F86
-_08087FA6:
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8087F54
-
- thumb_func_start sub_8087FB8
-sub_8087FB8: @ 8087FB8
- push {r4-r7,lr}
- sub sp, 0xC
- adds r3, r0, 0
- adds r5, r1, 0
- cmp r5, 0
- beq _08088012
- ldr r0, [r5]
- ldr r4, [r0]
- adds r2, 0x7
- ldr r0, [r3]
- ldr r0, [r0, 0x4]
- adds r7, r0, 0x7
- cmp r2, 0
- bge _08087FEC
- negs r6, r2
- adds r2, r4
- ldr r0, =gUnknown_03005DC0
- ldr r3, [r0]
- cmp r2, r3
- bge _08087FE2
- adds r3, r2, 0
-_08087FE2:
- movs r2, 0
- b _08087FFC
- .pool
-_08087FEC:
- movs r6, 0
- adds r0, r2, r4
- ldr r1, =gUnknown_03005DC0
- ldr r1, [r1]
- subs r3, r1, r2
- cmp r0, r1
- bge _08087FFC
- adds r3, r4, 0
-_08087FFC:
- movs r0, 0
- str r0, [sp]
- str r3, [sp, 0x4]
- movs r0, 0x7
- str r0, [sp, 0x8]
- adds r0, r2, 0
- adds r1, r7, 0
- adds r2, r5, 0
- adds r3, r6, 0
- bl sub_8087F54
-_08088012:
- add sp, 0xC
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8087FB8
-
- thumb_func_start sub_8088020
-sub_8088020: @ 8088020
- push {r4-r7,lr}
- sub sp, 0xC
- adds r5, r1, 0
- cmp r5, 0
- beq _08088074
- ldr r0, [r5]
- ldr r4, [r0]
- ldr r0, [r0, 0x4]
- adds r2, 0x7
- subs r7, r0, 0x7
- cmp r2, 0
- bge _08088050
- negs r6, r2
- adds r2, r4
- ldr r0, =gUnknown_03005DC0
- ldr r3, [r0]
- cmp r2, r3
- bge _08088046
- adds r3, r2, 0
-_08088046:
- movs r2, 0
- b _08088060
- .pool
-_08088050:
- movs r6, 0
- adds r0, r2, r4
- ldr r1, =gUnknown_03005DC0
- ldr r1, [r1]
- subs r3, r1, r2
- cmp r0, r1
- bge _08088060
- adds r3, r4, 0
-_08088060:
- str r7, [sp]
- str r3, [sp, 0x4]
- movs r0, 0x7
- str r0, [sp, 0x8]
- adds r0, r2, 0
- movs r1, 0
- adds r2, r5, 0
- adds r3, r6, 0
- bl sub_8087F54
-_08088074:
- add sp, 0xC
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8088020
-
- thumb_func_start sub_8088080
-sub_8088080: @ 8088080
- push {r4-r7,lr}
- sub sp, 0xC
- adds r5, r1, 0
- cmp r5, 0
- beq _080880D4
- ldr r0, [r5]
- ldr r1, [r0]
- ldr r4, [r0, 0x4]
- adds r2, 0x7
- subs r7, r1, 0x7
- cmp r2, 0
- bge _080880B0
- negs r6, r2
- adds r1, r2, r4
- ldr r0, =gUnknown_03005DC0
- ldr r3, [r0, 0x4]
- cmp r1, r3
- bge _080880A6
- adds r3, r1, 0
-_080880A6:
- movs r2, 0
- b _080880C0
- .pool
-_080880B0:
- movs r6, 0
- adds r0, r2, r4
- ldr r1, =gUnknown_03005DC0
- ldr r1, [r1, 0x4]
- subs r3, r1, r2
- cmp r0, r1
- bge _080880C0
- adds r3, r4, 0
-_080880C0:
- str r6, [sp]
- movs r0, 0x7
- str r0, [sp, 0x4]
- str r3, [sp, 0x8]
- movs r0, 0
- adds r1, r2, 0
- adds r2, r5, 0
- adds r3, r7, 0
- bl sub_8087F54
-_080880D4:
- add sp, 0xC
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8088080
-
- thumb_func_start sub_80880E0
-sub_80880E0: @ 80880E0
- push {r4-r7,lr}
- sub sp, 0xC
- adds r3, r0, 0
- adds r5, r1, 0
- cmp r5, 0
- beq _08088138
- ldr r0, [r5]
- ldr r4, [r0, 0x4]
- ldr r0, [r3]
- ldr r0, [r0]
- adds r7, r0, 0x7
- adds r2, 0x7
- cmp r2, 0
- bge _08088114
- negs r6, r2
- adds r1, r2, r4
- ldr r0, =gUnknown_03005DC0
- ldr r3, [r0, 0x4]
- cmp r1, r3
- bge _0808810A
- adds r3, r1, 0
-_0808810A:
- movs r2, 0
- b _08088124
- .pool
-_08088114:
- movs r6, 0
- adds r0, r2, r4
- ldr r1, =gUnknown_03005DC0
- ldr r1, [r1, 0x4]
- subs r3, r1, r2
- cmp r0, r1
- bge _08088124
- adds r3, r4, 0
-_08088124:
- str r6, [sp]
- movs r0, 0x8
- str r0, [sp, 0x4]
- str r3, [sp, 0x8]
- adds r0, r7, 0
- adds r1, r2, 0
- adds r2, r5, 0
- movs r3, 0
- bl sub_8087F54
-_08088138:
- add sp, 0xC
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_80880E0
-
- thumb_func_start MapGridGetZCoordAt
-@ u8 MapGridGetZCoordAt(s32 x, s32 y)
-MapGridGetZCoordAt: @ 8088144
- push {r4,lr}
- adds r2, r0, 0
- adds r4, r1, 0
- cmp r2, 0
- blt _08088174
- ldr r1, =gUnknown_03005DC0
- ldr r3, [r1]
- cmp r2, r3
- bge _08088174
- cmp r4, 0
- blt _08088174
- ldr r0, [r1, 0x4]
- cmp r4, r0
- bge _08088174
- adds r0, r3, 0
- muls r0, r4
- adds r0, r2, r0
- ldr r1, [r1, 0x8]
- lsls r0, 1
- adds r0, r1
- ldrh r1, [r0]
- b _08088196
- .pool
-_08088174:
- ldr r0, =gMapHeader
- ldr r3, [r0]
- adds r1, r2, 0x1
- movs r2, 0x1
- ands r1, r2
- adds r0, r4, 0x1
- ands r0, r2
- lsls r0, 1
- adds r1, r0
- ldr r0, [r3, 0x8]
- lsls r1, 1
- adds r1, r0
- ldrh r1, [r1]
- movs r2, 0xC0
- lsls r2, 4
- adds r0, r2, 0
- orrs r1, r0
-_08088196:
- ldr r0, =0x000003ff
- cmp r1, r0
- beq _080881A8
- lsrs r0, r1, 12
- b _080881AA
- .pool
-_080881A8:
- movs r0, 0
-_080881AA:
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end MapGridGetZCoordAt
-
- thumb_func_start MapGridIsImpassableAt
-@ u8 MapGridIsImpassableAt(s32 x, s32 y)
-MapGridIsImpassableAt: @ 80881B0
- push {r4,lr}
- adds r2, r0, 0
- adds r4, r1, 0
- cmp r2, 0
- blt _080881E0
- ldr r1, =gUnknown_03005DC0
- ldr r3, [r1]
- cmp r2, r3
- bge _080881E0
- cmp r4, 0
- blt _080881E0
- ldr r0, [r1, 0x4]
- cmp r4, r0
- bge _080881E0
- adds r0, r3, 0
- muls r0, r4
- adds r0, r2, r0
- ldr r1, [r1, 0x8]
- lsls r0, 1
- adds r0, r1
- ldrh r1, [r0]
- b _08088202
- .pool
-_080881E0:
- ldr r0, =gMapHeader
- ldr r3, [r0]
- adds r1, r2, 0x1
- movs r2, 0x1
- ands r1, r2
- adds r0, r4, 0x1
- ands r0, r2
- lsls r0, 1
- adds r1, r0
- ldr r0, [r3, 0x8]
- lsls r1, 1
- adds r1, r0
- ldrh r1, [r1]
- movs r2, 0xC0
- lsls r2, 4
- adds r0, r2, 0
- orrs r1, r0
-_08088202:
- ldr r0, =0x000003ff
- cmp r1, r0
- beq _0808821C
- movs r0, 0xC0
- lsls r0, 4
- ands r1, r0
- lsrs r0, r1, 10
- b _0808821E
- .pool
-_0808821C:
- movs r0, 0x1
-_0808821E:
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end MapGridIsImpassableAt
-
- thumb_func_start MapGridGetMetatileIdAt
-@ u16 MapGridGetMetatileIdAt(s32 x, s32 y)
-MapGridGetMetatileIdAt: @ 8088224
- push {r4-r6,lr}
- adds r5, r0, 0
- adds r6, r1, 0
- cmp r5, 0
- blt _08088254
- ldr r1, =gUnknown_03005DC0
- ldr r2, [r1]
- cmp r5, r2
- bge _08088254
- cmp r6, 0
- blt _08088254
- ldr r0, [r1, 0x4]
- cmp r6, r0
- bge _08088254
- adds r0, r2, 0
- muls r0, r6
- adds r0, r5, r0
- ldr r1, [r1, 0x8]
- lsls r0, 1
- adds r0, r1
- ldrh r4, [r0]
- b _08088278
- .pool
-_08088254:
- ldr r0, =gMapHeader
- ldr r3, [r0]
- adds r1, r5, 0x1
- movs r2, 0x1
- ands r1, r2
- adds r0, r6, 0x1
- ands r0, r2
- lsls r0, 1
- adds r1, r0
- ldr r0, [r3, 0x8]
- lsls r1, 1
- adds r1, r0
- ldrh r1, [r1]
- movs r2, 0xC0
- lsls r2, 4
- adds r0, r2, 0
- adds r4, r0, 0
- orrs r4, r1
-_08088278:
- ldr r0, =0x000003ff
- cmp r4, r0
- beq _0808828C
- ands r4, r0
- adds r0, r4, 0
- b _080882B0
- .pool
-_0808828C:
- ldr r0, =gMapHeader
- ldr r3, [r0]
- adds r1, r5, 0x1
- movs r2, 0x1
- ands r1, r2
- adds r0, r6, 0x1
- ands r0, r2
- lsls r0, 1
- adds r1, r0
- ldr r0, [r3, 0x8]
- lsls r1, 1
- adds r1, r0
- ldrh r0, [r1]
- movs r2, 0xC0
- lsls r2, 4
- adds r1, r2, 0
- orrs r0, r1
- ands r0, r4
-_080882B0:
- pop {r4-r6}
- pop {r1}
- bx r1
- .pool
- thumb_func_end MapGridGetMetatileIdAt
-
- thumb_func_start MapGridGetMetatileBehaviorAt
-@ u8 MapGridGetMetatileBehaviorAt(s32 x, s32 y)
-MapGridGetMetatileBehaviorAt: @ 80882BC
- push {lr}
- bl MapGridGetMetatileIdAt
- lsls r0, 16
- lsrs r0, 16
- bl GetBehaviorByMetatileId
- adds r1, r0, 0
- movs r0, 0xFF
- ands r0, r1
- pop {r1}
- bx r1
- thumb_func_end MapGridGetMetatileBehaviorAt
-
- thumb_func_start MapGridGetMetatileLayerTypeAt
-@ u8 MapGridGetMetatileLayerTypeAt(s32 x, s32 y)
-MapGridGetMetatileLayerTypeAt: @ 80882D4
- push {lr}
- bl MapGridGetMetatileIdAt
- lsls r0, 16
- lsrs r0, 16
- bl GetBehaviorByMetatileId
- adds r1, r0, 0
- movs r0, 0xF0
- lsls r0, 8
- ands r0, r1
- lsrs r0, 12
- pop {r1}
- bx r1
- thumb_func_end MapGridGetMetatileLayerTypeAt
-
- thumb_func_start MapGridSetMetatileIdAt
-@ void MapGridSetMetatileIdAt(s32 x, s32 y, u16 metatileId)
-MapGridSetMetatileIdAt: @ 80882F0
- push {r4,r5,lr}
- adds r3, r0, 0
- lsls r2, 16
- lsrs r5, r2, 16
- cmp r3, 0
- blt _08088328
- ldr r2, =gUnknown_03005DC0
- ldr r4, [r2]
- cmp r3, r4
- bge _08088328
- cmp r1, 0
- blt _08088328
- ldr r0, [r2, 0x4]
- cmp r1, r0
- bge _08088328
- muls r1, r4
- adds r1, r3, r1
- ldr r0, [r2, 0x8]
- lsls r1, 1
- adds r1, r0
- ldrh r0, [r1]
- movs r2, 0xF0
- lsls r2, 8
- ands r2, r0
- ldr r0, =0x00000fff
- ands r0, r5
- orrs r2, r0
- strh r2, [r1]
-_08088328:
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end MapGridSetMetatileIdAt
-
- thumb_func_start MapGridSetMetatileEntryAt
-@ void MapGridSetMetatileEntryAt(s32 x, s32 y, u16 metatileEntry)
-MapGridSetMetatileEntryAt: @ 8088338
- push {r4,r5,lr}
- adds r3, r0, 0
- lsls r2, 16
- lsrs r5, r2, 16
- cmp r3, 0
- blt _08088364
- ldr r2, =gUnknown_03005DC0
- ldr r4, [r2]
- cmp r3, r4
- bge _08088364
- cmp r1, 0
- blt _08088364
- ldr r0, [r2, 0x4]
- cmp r1, r0
- bge _08088364
- adds r0, r4, 0
- muls r0, r1
- adds r0, r3, r0
- ldr r1, [r2, 0x8]
- lsls r0, 1
- adds r0, r1
- strh r5, [r0]
-_08088364:
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end MapGridSetMetatileEntryAt
-
- thumb_func_start GetBehaviorByMetatileId
-@ u16 GetBehaviorByMetatileId(u16 metatileId)
-GetBehaviorByMetatileId: @ 8088370
- push {lr}
- lsls r0, 16
- lsrs r2, r0, 16
- adds r3, r2, 0
- ldr r0, =0x000001ff
- cmp r2, r0
- bhi _08088394
- ldr r0, =gMapHeader
- ldr r0, [r0]
- ldr r0, [r0, 0x10]
- ldr r1, [r0, 0x10]
- lsls r0, r2, 1
- b _080883B2
- .pool
-_08088394:
- ldr r0, =0x000003ff
- cmp r2, r0
- bls _080883A4
- movs r0, 0xFF
- b _080883B6
- .pool
-_080883A4:
- ldr r0, =gMapHeader
- ldr r0, [r0]
- ldr r0, [r0, 0x14]
- ldr r1, [r0, 0x10]
- lsls r0, r3, 1
- adds r0, r1
- ldr r1, =0xfffffc00
-_080883B2:
- adds r0, r1
- ldrh r0, [r0]
-_080883B6:
- pop {r1}
- bx r1
- .pool
- thumb_func_end GetBehaviorByMetatileId
-
- thumb_func_start save_serialize_map
-save_serialize_map: @ 80883C4
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- adds r4, r1, 0
- adds r4, 0x34
- ldr r0, =gUnknown_03005DC0
- ldr r0, [r0]
- mov r8, r0
- movs r0, 0
- ldrsh r6, [r1, r0]
- movs r2, 0x2
- ldrsh r0, [r1, r2]
- adds r1, r0, 0
- adds r1, 0xE
- cmp r0, r1
- bge _08088420
- mov r12, r1
- ldr r1, =gUnknown_02032318
- mov r9, r1
- lsls r7, r6, 1
-_080883F2:
- adds r1, r6, 0
- adds r3, r1, 0
- adds r3, 0xF
- adds r5, r0, 0x1
- cmp r1, r3
- bge _0808841A
- mov r2, r8
- muls r2, r0
- adds r0, r2, 0
- lsls r0, 1
- add r0, r9
- adds r2, r7, r0
- subs r1, r3, r1
-_0808840C:
- ldrh r0, [r2]
- strh r0, [r4]
- adds r4, 0x2
- adds r2, 0x2
- subs r1, 0x1
- cmp r1, 0
- bne _0808840C
-_0808841A:
- adds r0, r5, 0
- cmp r0, r12
- blt _080883F2
-_08088420:
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end save_serialize_map
-
- thumb_func_start sub_8088438
-sub_8088438: @ 8088438
- push {r4,lr}
- movs r2, 0
- movs r1, 0
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- adds r3, r0, 0
- adds r3, 0x34
- ldr r4, =0x000001ff
-_08088448:
- lsls r0, r1, 1
- adds r0, r3, r0
- ldrh r0, [r0]
- orrs r2, r0
- adds r0, r1, 0x1
- lsls r0, 16
- lsrs r1, r0, 16
- cmp r1, r4
- bls _08088448
- cmp r2, 0
- beq _0808846C
- movs r0, 0
- b _0808846E
- .pool
-_0808846C:
- movs r0, 0x1
-_0808846E:
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end sub_8088438
-
- thumb_func_start sav2_mapdata_clear
-sav2_mapdata_clear: @ 8088474
- push {lr}
- sub sp, 0x4
- mov r1, sp
- movs r0, 0
- strh r0, [r1]
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- adds r1, 0x34
- ldr r2, =0x01000100
- mov r0, sp
- bl CpuSet
- add sp, 0x4
- pop {r0}
- bx r0
- .pool
- thumb_func_end sav2_mapdata_clear
-
- thumb_func_start mapdata_from_sav2
-mapdata_from_sav2: @ 808849C
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x10
- ldr r4, =gSaveBlock1Ptr
- ldr r0, [r4]
- adds r7, r0, 0
- adds r7, 0x34
- bl sub_8088438
- cmp r0, 0
- bne _080885AC
- ldr r0, =gUnknown_03005DC0
- ldr r0, [r0]
- str r0, [sp]
- ldr r0, [r4]
- movs r2, 0
- ldrsh r1, [r0, r2]
- mov r10, r1
- movs r2, 0x2
- ldrsh r1, [r0, r2]
- mov r8, r1
- mov r6, r8
- adds r0, r6, 0
- adds r0, 0xE
- cmp r6, r0
- bge _0808855A
-_080884D6:
- cmp r6, r8
- bne _080884EC
- cmp r6, 0
- beq _080884EC
- movs r0, 0
- mov r9, r0
- b _08088508
- .pool
-_080884EC:
- mov r0, r8
- adds r0, 0xD
- movs r1, 0xFF
- mov r9, r1
- cmp r6, r0
- bne _08088508
- ldr r0, =gMapHeader
- ldr r0, [r0]
- ldr r0, [r0, 0x4]
- subs r0, 0x1
- cmp r6, r0
- beq _08088508
- movs r2, 0x1
- mov r9, r2
-_08088508:
- mov r5, r10
- adds r0, r5, 0
- adds r0, 0xF
- mov r1, r8
- adds r1, 0xE
- str r1, [sp, 0x8]
- adds r2, r6, 0x1
- str r2, [sp, 0x4]
- cmp r5, r0
- bge _08088552
- ldr r0, [sp]
- lsls r3, r0, 16
-_08088520:
- ldr r1, [sp]
- adds r0, r1, 0
- muls r0, r6
- adds r0, r5, r0
- lsls r0, 1
- ldr r1, =gUnknown_02032318
- adds r4, r0, r1
- adds r0, r4, 0
- lsrs r1, r3, 16
- mov r2, r9
- str r3, [sp, 0xC]
- bl sub_8088BF0
- lsls r0, 24
- ldr r3, [sp, 0xC]
- cmp r0, 0
- bne _08088546
- ldrh r0, [r7]
- strh r0, [r4]
-_08088546:
- adds r7, 0x2
- adds r5, 0x1
- mov r0, r10
- adds r0, 0xF
- cmp r5, r0
- blt _08088520
-_08088552:
- ldr r6, [sp, 0x4]
- ldr r2, [sp, 0x8]
- cmp r6, r2
- blt _080884D6
-_0808855A:
- mov r5, r10
- adds r0, r5, 0
- adds r0, 0xF
- cmp r5, r0
- bge _080885A8
- mov r0, r8
- subs r0, 0x1
- lsls r0, 16
- mov r9, r0
- lsls r4, r5, 16
- mov r0, r8
- adds r0, 0xD
- lsls r7, r0, 16
-_08088574:
- mov r0, r8
- cmp r0, 0
- beq _08088584
- asrs r0, r4, 16
- mov r2, r9
- asrs r1, r2, 16
- bl sub_80D423C
-_08088584:
- ldr r0, =gMapHeader
- ldr r0, [r0]
- ldr r0, [r0, 0x4]
- subs r0, 0x1
- cmp r6, r0
- bge _08088598
- asrs r0, r4, 16
- asrs r1, r7, 16
- bl sub_80D42B8
-_08088598:
- movs r0, 0x80
- lsls r0, 9
- adds r4, r0
- adds r5, 0x1
- mov r0, r10
- adds r0, 0xF
- cmp r5, r0
- blt _08088574
-_080885A8:
- bl sav2_mapdata_clear
-_080885AC:
- add sp, 0x10
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end mapdata_from_sav2
-
- thumb_func_start sub_80885C4
-sub_80885C4: @ 80885C4
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0xC
- lsls r0, 24
- lsrs r3, r0, 24
- adds r2, r3, 0
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- adds r0, r1, 0
- adds r0, 0x34
- str r0, [sp, 0x4]
- ldr r0, =gUnknown_03005DC0
- ldr r0, [r0]
- str r0, [sp]
- movs r4, 0
- mov r9, r4
- mov r8, r4
- movs r0, 0
- ldrsh r6, [r1, r0]
- str r6, [sp, 0x8]
- movs r4, 0x2
- ldrsh r5, [r1, r4]
- movs r7, 0xF
- movs r6, 0xE
- mov r12, r6
- cmp r3, 0x2
- beq _0808861E
- cmp r3, 0x2
- bgt _08088614
- cmp r3, 0x1
- beq _08088626
- b _0808863E
- .pool
-_08088614:
- cmp r2, 0x3
- beq _08088630
- cmp r2, 0x4
- beq _08088638
- b _0808863E
-_0808861E:
- adds r5, 0x1
- movs r0, 0xD
- mov r12, r0
- b _0808863E
-_08088626:
- movs r1, 0x1
- mov r8, r1
- movs r3, 0xD
- mov r12, r3
- b _0808863E
-_08088630:
- ldr r4, [sp, 0x8]
- adds r4, 0x1
- str r4, [sp, 0x8]
- b _0808863C
-_08088638:
- movs r6, 0x1
- mov r9, r6
-_0808863C:
- movs r7, 0xE
-_0808863E:
- movs r1, 0
- cmp r1, r12
- bge _08088682
- ldr r0, =gUnknown_02032318
- mov r10, r0
-_08088648:
- adds r4, r1, 0x1
- cmp r7, 0
- beq _0808867C
- adds r0, r1, r5
- ldr r3, [sp]
- adds r2, r3, 0
- muls r2, r0
- add r1, r8
- lsls r0, r1, 4
- subs r0, r1
- add r0, r9
- ldr r6, [sp, 0x8]
- adds r2, r6, r2
- adds r3, r7, 0
- lsls r2, 1
- add r2, r10
- lsls r0, 1
- ldr r6, [sp, 0x4]
- adds r1, r0, r6
-_0808866E:
- ldrh r0, [r1]
- strh r0, [r2]
- adds r1, 0x2
- adds r2, 0x2
- subs r3, 0x1
- cmp r3, 0
- bne _0808866E
-_0808867C:
- adds r1, r4, 0
- cmp r1, r12
- blt _08088648
-_08088682:
- bl sav2_mapdata_clear
- add sp, 0xC
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_80885C4
-
- thumb_func_start GetMapBorderIdAt
-@ u32 GetMapBorderIdAt(s32 x, s32 y)
-GetMapBorderIdAt: @ 808869C
- push {r4,r5,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- cmp r4, 0
- blt _080886D8
- ldr r1, =gUnknown_03005DC0
- ldr r2, [r1]
- cmp r4, r2
- bge _080886D8
- cmp r5, 0
- blt _080886D8
- ldr r0, [r1, 0x4]
- cmp r5, r0
- bge _080886D8
- adds r0, r2, 0
- muls r0, r5
- adds r0, r4, r0
- ldr r1, [r1, 0x8]
- lsls r0, 1
- adds r0, r1
- ldrh r1, [r0]
- ldr r0, =0x000003ff
- cmp r1, r0
- beq _08088770
- b _08088700
- .pool
-_080886D8:
- ldr r0, =gMapHeader
- ldr r3, [r0]
- adds r1, r4, 0x1
- movs r2, 0x1
- ands r1, r2
- adds r0, r5, 0x1
- ands r0, r2
- lsls r0, 1
- adds r1, r0
- ldr r0, [r3, 0x8]
- lsls r1, 1
- adds r1, r0
- ldrh r1, [r1]
- movs r2, 0xC0
- lsls r2, 4
- adds r0, r2, 0
- orrs r0, r1
- ldr r1, =0x000003ff
- cmp r0, r1
- beq _08088770
-_08088700:
- ldr r1, =gUnknown_03005DC0
- ldr r0, [r1]
- subs r0, 0x8
- cmp r4, r0
- blt _0808872C
- ldr r0, =gUnknown_02037340
- ldrb r1, [r0]
- movs r0, 0x8
- ands r0, r1
- cmp r0, 0
- beq _08088770
- movs r0, 0x4
- b _08088782
- .pool
-_0808872C:
- cmp r4, 0x6
- bgt _08088744
- ldr r0, =gUnknown_02037340
- ldrb r1, [r0]
- movs r0, 0x4
- ands r0, r1
- cmp r0, 0
- beq _08088770
- movs r0, 0x3
- b _08088782
- .pool
-_08088744:
- ldr r0, [r1, 0x4]
- subs r0, 0x7
- cmp r5, r0
- blt _08088760
- ldr r0, =gUnknown_02037340
- ldrb r1, [r0]
- movs r0, 0x1
- ands r0, r1
- cmp r0, 0
- beq _08088770
- movs r0, 0x1
- b _08088782
- .pool
-_08088760:
- cmp r5, 0x6
- bgt _08088780
- ldr r0, =gUnknown_02037340
- ldrb r1, [r0]
- movs r0, 0x2
- ands r0, r1
- cmp r0, 0
- bne _0808877C
-_08088770:
- movs r0, 0x1
- negs r0, r0
- b _08088782
- .pool
-_0808877C:
- movs r0, 0x2
- b _08088782
-_08088780:
- movs r0, 0
-_08088782:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end GetMapBorderIdAt
-
- thumb_func_start GetPostCameraMoveMapBorderId
-@ u32 GetPostCameraMoveMapBorderId(s32 deltaX, s32 deltaY)
-GetPostCameraMoveMapBorderId: @ 8088788
- push {r4,lr}
- adds r3, r1, 0
- ldr r1, =gSaveBlock1Ptr
- ldr r1, [r1]
- movs r4, 0
- ldrsh r2, [r1, r4]
- adds r0, 0x7
- adds r2, r0
- movs r0, 0x2
- ldrsh r1, [r1, r0]
- adds r3, 0x7
- adds r1, r3
- adds r0, r2, 0
- bl GetMapBorderIdAt
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end GetPostCameraMoveMapBorderId
-
- thumb_func_start CanCameraMoveInDirection
-@ bool32 CanCameraMoveInDirection(u8 direction)
-CanCameraMoveInDirection: @ 80887B0
- push {r4,r5,lr}
- ldr r1, =gSaveBlock1Ptr
- ldr r4, [r1]
- movs r1, 0
- ldrsh r3, [r4, r1]
- ldr r2, =gUnknown_08339D64
- lsls r0, 3
- adds r1, r0, r2
- ldr r1, [r1]
- adds r1, 0x7
- adds r3, r1
- movs r5, 0x2
- ldrsh r1, [r4, r5]
- adds r2, 0x4
- adds r0, r2
- ldr r0, [r0]
- adds r0, 0x7
- adds r1, r0
- adds r0, r3, 0
- bl GetMapBorderIdAt
- movs r1, 0x1
- negs r1, r1
- cmp r0, r1
- beq _080887F0
- movs r0, 0x1
- b _080887F2
- .pool
-_080887F0:
- movs r0, 0
-_080887F2:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end CanCameraMoveInDirection
-
- thumb_func_start sub_80887F8
-sub_80887F8: @ 80887F8
- push {r4-r7,lr}
- adds r5, r0, 0
- adds r4, r1, 0
- adds r6, r2, 0
- adds r7, r3, 0
- bl mapconnection_get_mapheader
- adds r3, r0, 0
- cmp r4, 0x2
- beq _08088860
- cmp r4, 0x2
- bgt _08088816
- cmp r4, 0x1
- beq _0808884C
- b _08088872
-_08088816:
- cmp r4, 0x3
- beq _08088834
- cmp r4, 0x4
- bne _08088872
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- negs r0, r6
- strh r0, [r1]
- ldr r2, [r5, 0x4]
- ldrh r0, [r1, 0x2]
- subs r0, r2
- b _08088870
- .pool
-_08088834:
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- ldr r0, [r3]
- ldr r0, [r0]
- strh r0, [r1]
- ldr r2, [r5, 0x4]
- ldrh r0, [r1, 0x2]
- subs r0, r2
- b _08088870
- .pool
-_0808884C:
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- ldr r2, [r5, 0x4]
- ldrh r0, [r1]
- subs r0, r2
- strh r0, [r1]
- negs r0, r7
- b _08088870
- .pool
-_08088860:
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- ldr r2, [r5, 0x4]
- ldrh r0, [r1]
- subs r0, r2
- strh r0, [r1]
- ldr r0, [r3]
- ldr r0, [r0, 0x4]
-_08088870:
- strh r0, [r1, 0x2]
-_08088872:
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_80887F8
-
- thumb_func_start CameraMove
-@ u8 CameraMove(s32 deltaX, s32 deltaY)
-CameraMove: @ 808887C
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- mov r10, r0
- mov r9, r1
- ldr r1, =gCamera
- ldrb r0, [r1]
- movs r1, 0x2
- negs r1, r1
- ands r1, r0
- ldr r2, =gCamera
- strb r1, [r2]
- mov r0, r10
- mov r1, r9
- bl GetPostCameraMoveMapBorderId
- adds r7, r0, 0
- adds r0, r7, 0x1
- cmp r0, 0x1
- bhi _080888C4
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- ldrh r0, [r1]
- add r0, r10
- strh r0, [r1]
- ldrh r0, [r1, 0x2]
- add r0, r9
- strh r0, [r1, 0x2]
- b _08088932
- .pool
-_080888C4:
- bl save_serialize_map
- bl sub_81BE72C
- ldr r1, =gSaveBlock1Ptr
- ldr r0, [r1]
- movs r2, 0
- ldrsh r5, [r0, r2]
- movs r1, 0x2
- ldrsh r6, [r0, r1]
- lsls r2, r7, 24
- lsrs r2, 24
- mov r8, r2
- mov r0, r8
- adds r1, r5, 0
- adds r2, r6, 0
- bl sub_8088950
- adds r4, r0, 0
- adds r1, r7, 0
- mov r2, r10
- mov r3, r9
- bl sub_80887F8
- ldrb r0, [r4, 0x8]
- ldrb r1, [r4, 0x9]
- bl mliX_load_map
- ldr r1, =gCamera
- ldrb r0, [r1]
- movs r1, 0x1
- orrs r0, r1
- ldr r2, =gCamera
- strb r0, [r2]
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- movs r2, 0
- ldrsh r0, [r1, r2]
- subs r5, r0
- ldr r0, =gCamera
- str r5, [r0, 0x4]
- movs r2, 0x2
- ldrsh r0, [r1, r2]
- subs r6, r0
- ldr r0, =gCamera
- str r6, [r0, 0x8]
- ldrh r0, [r1]
- add r0, r10
- strh r0, [r1]
- ldrh r0, [r1, 0x2]
- add r0, r9
- strh r0, [r1, 0x2]
- mov r0, r8
- bl sub_80885C4
-_08088932:
- ldr r0, =gCamera
- ldrb r0, [r0]
- lsls r0, 31
- lsrs r0, 31
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r1}
- bx r1
- .pool
- thumb_func_end CameraMove
-
- thumb_func_start sub_8088950
-sub_8088950: @ 8088950
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- mov r9, r1
- mov r8, r2
- lsls r0, 24
- lsrs r6, r0, 24
- ldr r0, =gMapHeader
- ldr r0, [r0, 0xC]
- ldr r7, [r0]
- ldr r4, [r0, 0x4]
- movs r5, 0
- cmp r5, r7
- bge _08088998
-_0808896E:
- ldrb r0, [r4]
- cmp r0, r6
- bne _08088990
- adds r0, r6, 0
- mov r1, r9
- mov r2, r8
- adds r3, r4, 0
- bl sub_80889A8
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bne _08088990
- adds r0, r4, 0
- b _0808899A
- .pool
-_08088990:
- adds r5, 0x1
- adds r4, 0xC
- cmp r5, r7
- blt _0808896E
-_08088998:
- movs r0, 0
-_0808899A:
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end sub_8088950
-
- thumb_func_start sub_80889A8
-sub_80889A8: @ 80889A8
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- adds r7, r1, 0
- mov r8, r2
- adds r5, r3, 0
- lsls r0, 24
- lsrs r4, r0, 24
- adds r6, r4, 0
- adds r0, r5, 0
- bl mapconnection_get_mapheader
- adds r2, r0, 0
- cmp r4, 0x1
- blt _08088A00
- cmp r4, 0x2
- bgt _080889E0
- ldr r0, =gMapHeader
- ldr r0, [r0]
- ldr r1, [r0]
- ldr r0, [r2]
- ldr r2, [r0]
- ldr r3, [r5, 0x4]
- adds r0, r7, 0
- b _080889F2
- .pool
-_080889E0:
- cmp r6, 0x4
- bgt _08088A00
- ldr r0, =gMapHeader
- ldr r0, [r0]
- ldr r1, [r0, 0x4]
- ldr r0, [r2]
- ldr r2, [r0, 0x4]
- ldr r3, [r5, 0x4]
- mov r0, r8
-_080889F2:
- bl sub_8088A0C
- lsls r0, 24
- lsrs r0, 24
- b _08088A02
- .pool
-_08088A00:
- movs r0, 0
-_08088A02:
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end sub_80889A8
-
- thumb_func_start sub_8088A0C
-sub_8088A0C: @ 8088A0C
- push {r4,lr}
- adds r4, r0, 0
- adds r0, r2, 0
- adds r2, r3, 0
- cmp r3, 0
- bge _08088A1A
- movs r3, 0
-_08088A1A:
- adds r2, r0, r2
- cmp r2, r1
- bge _08088A22
- adds r1, r2, 0
-_08088A22:
- cmp r3, r4
- bgt _08088A2E
- cmp r4, r1
- bgt _08088A2E
- movs r0, 0x1
- b _08088A30
-_08088A2E:
- movs r0, 0
-_08088A30:
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end sub_8088A0C
-
- thumb_func_start sub_8088A38
-sub_8088A38: @ 8088A38
- push {lr}
- cmp r0, 0
- blt _08088A46
- cmp r0, r1
- bge _08088A46
- movs r0, 0x1
- b _08088A48
-_08088A46:
- movs r0, 0
-_08088A48:
- pop {r1}
- bx r1
- thumb_func_end sub_8088A38
-
- thumb_func_start sub_8088A4C
-sub_8088A4C: @ 8088A4C
- push {r4-r6,lr}
- adds r4, r0, 0
- adds r5, r1, 0
- adds r6, r2, 0
- bl mapconnection_get_mapheader
- adds r1, r0, 0
- ldrb r0, [r4]
- cmp r0, 0x1
- blt _08088A84
- cmp r0, 0x2
- bgt _08088A72
- ldr r0, [r4, 0x4]
- subs r0, r5, r0
- ldr r1, [r1]
- ldr r1, [r1]
- bl sub_8088A38
- b _08088A86
-_08088A72:
- cmp r0, 0x4
- bgt _08088A84
- ldr r0, [r4, 0x4]
- subs r0, r6, r0
- ldr r1, [r1]
- ldr r1, [r1, 0x4]
- bl sub_8088A38
- b _08088A86
-_08088A84:
- movs r0, 0
-_08088A86:
- pop {r4-r6}
- pop {r1}
- bx r1
- thumb_func_end sub_8088A4C
-
- thumb_func_start sub_8088A8C
-sub_8088A8C: @ 8088A8C
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- lsls r0, 16
- lsrs r0, 16
- mov r8, r0
- lsls r1, 16
- lsrs r1, 16
- ldr r2, =gMapHeader
- ldr r0, [r2, 0xC]
- cmp r0, 0
- bne _08088AB4
- b _08088B2A
- .pool
-_08088AB0:
- adds r0, r4, 0
- b _08088B2C
-_08088AB4:
- ldr r7, [r0]
- ldr r4, [r0, 0x4]
- movs r6, 0
- cmp r6, r7
- bge _08088B2A
- lsls r0, r1, 16
- asrs r5, r0, 16
- mov r9, r2
- mov r1, r8
- lsls r0, r1, 16
- asrs r0, 16
- mov r10, r0
-_08088ACC:
- ldrb r1, [r4]
- adds r3, r1, 0
- subs r0, r1, 0x5
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bls _08088B22
- cmp r1, 0x2
- bne _08088AE2
- cmp r5, 0x6
- bgt _08088B22
-_08088AE2:
- cmp r1, 0x1
- bne _08088AF2
- mov r2, r9
- ldr r0, [r2]
- ldr r0, [r0, 0x4]
- adds r0, 0x7
- cmp r5, r0
- blt _08088B22
-_08088AF2:
- mov r0, r8
- lsls r2, r0, 16
- cmp r1, 0x3
- bne _08088B00
- mov r1, r10
- cmp r1, 0x6
- bgt _08088B22
-_08088B00:
- cmp r3, 0x4
- bne _08088B12
- asrs r1, r2, 16
- mov r3, r9
- ldr r0, [r3]
- ldr r0, [r0]
- adds r0, 0x7
- cmp r1, r0
- blt _08088B22
-_08088B12:
- asrs r1, r2, 16
- subs r1, 0x7
- adds r0, r4, 0
- subs r2, r5, 0x7
- bl sub_8088A4C
- cmp r0, 0x1
- beq _08088AB0
-_08088B22:
- adds r6, 0x1
- adds r4, 0xC
- cmp r6, r7
- blt _08088ACC
-_08088B2A:
- movs r0, 0
-_08088B2C:
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end sub_8088A8C
-
- thumb_func_start sub_8088B3C
-sub_8088B3C: @ 8088B3C
- lsls r0, 16
- lsrs r0, 16
- lsls r1, 16
- lsrs r1, 16
- ldr r2, =gSaveBlock1Ptr
- ldr r2, [r2]
- subs r0, 0x7
- strh r0, [r2]
- subs r1, 0x7
- strh r1, [r2, 0x2]
- bx lr
- .pool
- thumb_func_end sub_8088B3C
-
- thumb_func_start sav1_camera_get_focus_coords
-sav1_camera_get_focus_coords: @ 8088B58
- ldr r2, =gSaveBlock1Ptr
- ldr r3, [r2]
- ldrh r2, [r3]
- adds r2, 0x7
- strh r2, [r0]
- ldrh r0, [r3, 0x2]
- adds r0, 0x7
- strh r0, [r1]
- bx lr
- .pool
- thumb_func_end sav1_camera_get_focus_coords
-
- thumb_func_start SetCameraCoords
-@ void SetCameraCoords(u16 x, u16 y)
-SetCameraCoords: @ 8088B70
- ldr r2, =gSaveBlock1Ptr
- ldr r2, [r2]
- strh r0, [r2]
- strh r1, [r2, 0x2]
- bx lr
- .pool
- thumb_func_end SetCameraCoords
-
- thumb_func_start GetCameraCoords
-@ void GetCameraCoords(u16 *x, u16 *y)
-GetCameraCoords: @ 8088B80
- ldr r2, =gSaveBlock1Ptr
- ldr r3, [r2]
- ldrh r2, [r3]
- strh r2, [r0]
- ldrh r0, [r3, 0x2]
- strh r0, [r1]
- bx lr
- .pool
- thumb_func_end GetCameraCoords
-
- thumb_func_start sub_8088B94
-sub_8088B94: @ 8088B94
- push {r4,r5,lr}
- adds r4, r0, 0
- adds r3, r1, 0
- adds r5, r2, 0
- cmp r4, 0
- blt _08088BE6
- ldr r2, =gUnknown_03005DC0
- ldr r1, [r2]
- cmp r4, r1
- bge _08088BE6
- cmp r3, 0
- blt _08088BE6
- ldr r0, [r2, 0x4]
- cmp r3, r0
- bge _08088BE6
- cmp r5, 0
- beq _08088BD4
- adds r0, r1, 0
- muls r0, r3
- adds r0, r4, r0
- ldr r1, [r2, 0x8]
- lsls r0, 1
- adds r0, r1
- ldrh r1, [r0]
- movs r3, 0xC0
- lsls r3, 4
- adds r2, r3, 0
- orrs r1, r2
- strh r1, [r0]
- b _08088BE6
- .pool
-_08088BD4:
- muls r1, r3
- adds r1, r4, r1
- ldr r0, [r2, 0x8]
- lsls r1, 1
- adds r1, r0
- ldrh r2, [r1]
- ldr r0, =0x0000f3ff
- ands r0, r2
- strh r0, [r1]
-_08088BE6:
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8088B94
-
- thumb_func_start sub_8088BF0
-sub_8088BF0: @ 8088BF0
- push {lr}
- adds r3, r0, 0
- lsls r1, 16
- lsrs r0, r1, 16
- adds r1, r0, 0
- lsls r2, 24
- lsrs r2, 24
- cmp r2, 0xFF
- beq _08088C24
- cmp r2, 0
- bne _08088C0C
- lsls r0, 1
- subs r3, r0
- b _08088C10
-_08088C0C:
- lsls r0, r1, 1
- adds r3, r0
-_08088C10:
- ldrh r1, [r3]
- ldr r0, =0x000003ff
- ands r0, r1
- adds r1, r2, 0
- bl sub_80FADE4
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- beq _08088C2C
-_08088C24:
- movs r0, 0
- b _08088C2E
- .pool
-_08088C2C:
- movs r0, 0x1
-_08088C2E:
- pop {r1}
- bx r1
- thumb_func_end sub_8088BF0
-
- thumb_func_start copy_tileset_patterns_to_vram
-@ void copy_tileset_patterns_to_vram(tileset *tileset, int num_tiles, int offset)
-copy_tileset_patterns_to_vram: @ 8088C34
- push {r4-r7,lr}
- sub sp, 0x4
- adds r3, r0, 0
- lsls r1, 16
- lsrs r4, r1, 16
- adds r6, r4, 0
- lsls r2, 16
- lsrs r5, r2, 16
- adds r7, r5, 0
- cmp r3, 0
- beq _08088C70
- ldrb r0, [r3]
- cmp r0, 0
- bne _08088C60
- ldr r1, [r3, 0x4]
- lsls r2, r4, 21
- lsrs r2, 16
- movs r0, 0x2
- adds r3, r5, 0
- bl LoadBgTiles
- b _08088C70
-_08088C60:
- ldr r1, [r3, 0x4]
- lsls r2, r6, 5
- movs r0, 0
- str r0, [sp]
- movs r0, 0x2
- adds r3, r7, 0
- bl decompress_and_copy_tile_data_to_vram
-_08088C70:
- add sp, 0x4
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end copy_tileset_patterns_to_vram
-
- thumb_func_start copy_tileset_patterns_to_vram2
-@ void copy_tileset_patterns_to_vram2(tileset *tileset, int num_tiles, int offset)
-copy_tileset_patterns_to_vram2: @ 8088C78
- push {r4-r7,lr}
- sub sp, 0x4
- adds r3, r0, 0
- lsls r1, 16
- lsrs r4, r1, 16
- adds r6, r4, 0
- lsls r2, 16
- lsrs r5, r2, 16
- adds r7, r5, 0
- cmp r3, 0
- beq _08088CB4
- ldrb r0, [r3]
- cmp r0, 0
- bne _08088CA4
- ldr r1, [r3, 0x4]
- lsls r2, r4, 21
- lsrs r2, 16
- movs r0, 0x2
- adds r3, r5, 0
- bl LoadBgTiles
- b _08088CB4
-_08088CA4:
- ldr r1, [r3, 0x4]
- lsls r2, r6, 5
- movs r0, 0
- str r0, [sp]
- movs r0, 0x2
- adds r3, r7, 0
- bl copy_decompressed_tile_data_to_vram_autofree
-_08088CB4:
- add sp, 0x4
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end copy_tileset_patterns_to_vram2
-
- thumb_func_start nullsub_3
-nullsub_3: @ 8088CBC
- bx lr
- thumb_func_end nullsub_3
-
- thumb_func_start nullsub_90
-nullsub_90: @ 8088CC0
- bx lr
- thumb_func_end nullsub_90
-
- thumb_func_start apply_map_tileset_palette
-@ void apply_map_tileset_palette(tileset *tileset, int dest_offset, int size)
-apply_map_tileset_palette: @ 8088CC4
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- sub sp, 0x4
- adds r4, r0, 0
- lsls r1, 16
- lsrs r5, r1, 16
- mov r8, r5
- lsls r6, r2, 16
- lsrs r7, r6, 16
- adds r2, r7, 0
- movs r1, 0
- mov r0, sp
- strh r1, [r0]
- cmp r4, 0
- beq _08088D42
- ldrb r0, [r4, 0x1]
- cmp r0, 0
- bne _08088D18
- mov r0, sp
- adds r1, r5, 0
- movs r2, 0x2
- bl LoadPalette
- ldr r0, [r4, 0x8]
- adds r0, 0x2
- adds r5, 0x1
- lsls r5, 16
- lsrs r5, 16
- subs r4, r7, 0x2
- lsls r2, r4, 16
- lsrs r2, 16
- adds r1, r5, 0
- bl LoadPalette
- lsls r4, 15
- lsrs r4, 16
- adds r0, r5, 0
- adds r1, r4, 0
- bl nullsub_3
- b _08088D42
-_08088D18:
- cmp r0, 0x1
- bne _08088D32
- ldr r0, [r4, 0x8]
- adds r0, 0xC0
- adds r1, r5, 0
- adds r2, r7, 0
- bl LoadPalette
- lsrs r1, r6, 17
- adds r0, r5, 0
- bl nullsub_3
- b _08088D42
-_08088D32:
- ldr r0, [r4, 0x8]
- mov r1, r8
- bl LoadCompressedPalette
- lsrs r1, r6, 17
- mov r0, r8
- bl nullsub_3
-_08088D42:
- add sp, 0x4
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end apply_map_tileset_palette
-
- thumb_func_start copy_map_tileset1_to_vram
-@ void copy_map_tileset1_to_vram(mapdata_header *a1)
-copy_map_tileset1_to_vram: @ 8088D50
- push {lr}
- ldr r0, [r0, 0x10]
- movs r1, 0x80
- lsls r1, 2
- movs r2, 0
- bl copy_tileset_patterns_to_vram
- pop {r0}
- bx r0
- thumb_func_end copy_map_tileset1_to_vram
-
- thumb_func_start copy_map_tileset2_to_vram
-@ void copy_map_tileset2_to_vram(mapdata_header *a1)
-copy_map_tileset2_to_vram: @ 8088D64
- push {lr}
- ldr r0, [r0, 0x14]
- movs r2, 0x80
- lsls r2, 2
- adds r1, r2, 0
- bl copy_tileset_patterns_to_vram
- pop {r0}
- bx r0
- thumb_func_end copy_map_tileset2_to_vram
-
- thumb_func_start copy_map_tileset2_to_vram_2
-@ void copy_map_tileset2_to_vram_2(mapdata_header *a1)
-copy_map_tileset2_to_vram_2: @ 8088D78
- push {lr}
- ldr r0, [r0, 0x14]
- movs r2, 0x80
- lsls r2, 2
- adds r1, r2, 0
- bl copy_tileset_patterns_to_vram2
- pop {r0}
- bx r0
- thumb_func_end copy_map_tileset2_to_vram_2
-
- thumb_func_start apply_map_tileset1_palette
-@ void apply_map_tileset1_palette(mapdata_header *a1)
-apply_map_tileset1_palette: @ 8088D8C
- push {lr}
- ldr r0, [r0, 0x10]
- movs r1, 0
- movs r2, 0xC0
- bl apply_map_tileset_palette
- pop {r0}
- bx r0
- thumb_func_end apply_map_tileset1_palette
-
- thumb_func_start apply_map_tileset2_palette
-@ void apply_map_tileset2_palette(mapdata_header *a1)
-apply_map_tileset2_palette: @ 8088D9C
- push {lr}
- ldr r0, [r0, 0x14]
- movs r1, 0x60
- movs r2, 0xE0
- bl apply_map_tileset_palette
- pop {r0}
- bx r0
- thumb_func_end apply_map_tileset2_palette
-
- thumb_func_start copy_map_tileset1_tileset2_to_vram
-@ void copy_map_tileset1_tileset2_to_vram(mapdata_header *a1)
-copy_map_tileset1_tileset2_to_vram: @ 8088DAC
- push {r4,r5,lr}
- adds r5, r0, 0
- cmp r5, 0
- beq _08088DCC
- ldr r0, [r5, 0x10]
- movs r4, 0x80
- lsls r4, 2
- adds r1, r4, 0
- movs r2, 0
- bl copy_tileset_patterns_to_vram2
- ldr r0, [r5, 0x14]
- adds r1, r4, 0
- adds r2, r4, 0
- bl copy_tileset_patterns_to_vram2
-_08088DCC:
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end copy_map_tileset1_tileset2_to_vram
-
- thumb_func_start apply_map_tileset1_tileset2_palette
-@ void apply_map_tileset1_tileset2_palette(mapdata_header *a1)
-apply_map_tileset1_tileset2_palette: @ 8088DD4
- push {r4,lr}
- adds r4, r0, 0
- cmp r4, 0
- beq _08088DE6
- bl apply_map_tileset1_palette
- adds r0, r4, 0
- bl apply_map_tileset2_palette
-_08088DE6:
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end apply_map_tileset1_tileset2_palette
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/item.s b/asm/item.s
deleted file mode 100644
index 89177c5d4..000000000
--- a/asm/item.s
+++ /dev/null
@@ -1,1921 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
-
- thumb_func_start CheckBagHasSpace
-CheckBagHasSpace: @ 80D6800
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x4
- lsls r0, 16
- lsrs r0, 16
- mov r8, r0
- lsls r1, 16
- lsrs r5, r1, 16
- bl ItemId_GetPocket
- lsls r0, 24
- cmp r0, 0
- beq _080D6906
- bl InBattlePyramid
- lsls r0, 24
- cmp r0, 0
- bne _080D6838
- ldr r0, =0x00004004
- bl FlagGet
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bne _080D684C
-_080D6838:
- mov r0, r8
- adds r1, r5, 0
- bl CheckPyramidBagHasSpace
- lsls r0, 24
- lsrs r0, 24
- b _080D6916
- .pool
-_080D684C:
- mov r0, r8
- bl ItemId_GetPocket
- subs r0, 0x1
- lsls r0, 24
- lsrs r2, r0, 24
- ldr r7, =0x000003e7
- cmp r2, 0x3
- beq _080D6860
- movs r7, 0x63
-_080D6860:
- movs r6, 0
- ldr r1, =gBagPockets
- lsls r4, r2, 3
- adds r0, r4, r1
- mov r9, r4
- ldrb r0, [r0, 0x4]
- cmp r6, r0
- bcs _080D68BC
- subs r0, r2, 0x2
- lsls r0, 24
- lsrs r0, 24
- mov r10, r0
-_080D6878:
- adds r0, r4, r1
- ldr r1, [r0]
- lsls r0, r6, 2
- adds r1, r0, r1
- ldrh r0, [r1]
- cmp r0, r8
- bne _080D68AC
- adds r0, r1, 0x2
- str r2, [sp]
- bl GetBagItemQuantity
- lsls r0, 16
- lsrs r1, r0, 16
- adds r0, r1, r5
- ldr r2, [sp]
- cmp r0, r7
- ble _080D6914
- mov r0, r10
- cmp r0, 0x1
- bls _080D6906
- subs r0, r7, r1
- subs r0, r5, r0
- lsls r0, 16
- lsrs r5, r0, 16
- cmp r5, 0
- beq _080D6914
-_080D68AC:
- adds r0, r6, 0x1
- lsls r0, 24
- lsrs r6, r0, 24
- ldr r1, =gBagPockets
- adds r0, r4, r1
- ldrb r0, [r0, 0x4]
- cmp r6, r0
- bcc _080D6878
-_080D68BC:
- cmp r5, 0
- beq _080D6914
- movs r6, 0
- ldr r3, =gBagPockets
- mov r1, r9
- adds r0, r1, r3
- ldrb r0, [r0, 0x4]
- cmp r6, r0
- bcs _080D6902
- adds r4, r3, 0
- subs r0, r2, 0x2
- lsls r0, 24
- lsrs r2, r0, 24
-_080D68D6:
- adds r0, r1, r4
- ldr r1, [r0]
- lsls r0, r6, 2
- adds r0, r1
- ldrh r0, [r0]
- cmp r0, 0
- bne _080D68F2
- cmp r5, r7
- bls _080D6914
- cmp r2, 0x1
- bls _080D6906
- subs r0, r5, r7
- lsls r0, 16
- lsrs r5, r0, 16
-_080D68F2:
- adds r0, r6, 0x1
- lsls r0, 24
- lsrs r6, r0, 24
- mov r1, r9
- adds r0, r1, r3
- ldrb r0, [r0, 0x4]
- cmp r6, r0
- bcc _080D68D6
-_080D6902:
- cmp r5, 0
- beq _080D6914
-_080D6906:
- movs r0, 0
- b _080D6916
- .pool
-_080D6914:
- movs r0, 0x1
-_080D6916:
- add sp, 0x4
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end CheckBagHasSpace
-
- thumb_func_start AddBagItem
-@ int AddBagItem(int item_id, int quantity)
-AddBagItem: @ 80D6928
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x8
- lsls r0, 16
- lsrs r0, 16
- mov r9, r0
- lsls r1, 16
- lsrs r5, r1, 16
- bl ItemId_GetPocket
- lsls r0, 24
- cmp r0, 0
- bne _080D694C
- movs r0, 0
- b _080D6A92
-_080D694C:
- bl InBattlePyramid
- lsls r0, 24
- cmp r0, 0
- bne _080D6964
- ldr r0, =0x00004004
- bl FlagGet
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bne _080D6978
-_080D6964:
- mov r0, r9
- adds r1, r5, 0
- bl AddPyramidBagItem
- lsls r0, 24
- lsrs r0, 24
- b _080D6A92
- .pool
-_080D6978:
- mov r0, r9
- bl ItemId_GetPocket
- subs r0, 0x1
- lsls r0, 24
- lsrs r0, 24
- mov r10, r0
- lsls r1, r0, 3
- ldr r0, =gBagPockets
- adds r7, r1, r0
- ldrb r0, [r7, 0x4]
- lsls r0, 2
- bl AllocZeroed
- mov r8, r0
- ldr r1, [r7]
- ldrb r2, [r7, 0x4]
- lsls r2, 2
- bl memcpy
- ldr r2, =0x000003e7
- mov r0, r10
- cmp r0, 0x3
- beq _080D69AA
- movs r2, 0x63
-_080D69AA:
- movs r6, 0
- ldrb r0, [r7, 0x4]
- cmp r6, r0
- bcs _080D6A06
- mov r0, r10
- subs r0, 0x2
- lsls r0, 24
- lsrs r0, 24
- str r0, [sp]
-_080D69BC:
- lsls r0, r6, 2
- mov r3, r8
- adds r1, r0, r3
- ldrh r0, [r1]
- cmp r0, r9
- bne _080D69FA
- adds r4, r1, 0x2
- adds r0, r4, 0
- str r2, [sp, 0x4]
- bl GetBagItemQuantity
- lsls r0, 16
- lsrs r0, 16
- adds r1, r0, r5
- ldr r2, [sp, 0x4]
- cmp r1, r2
- ble _080D6A68
- ldr r1, [sp]
- cmp r1, 0x1
- bls _080D6A74
- subs r0, r2, r0
- subs r0, r5, r0
- lsls r0, 16
- lsrs r5, r0, 16
- adds r0, r4, 0
- adds r1, r2, 0
- bl SetBagItemQuantity
- ldr r2, [sp, 0x4]
- cmp r5, 0
- beq _080D6A7E
-_080D69FA:
- adds r0, r6, 0x1
- lsls r0, 24
- lsrs r6, r0, 24
- ldrb r0, [r7, 0x4]
- cmp r6, r0
- bcc _080D69BC
-_080D6A06:
- cmp r5, 0
- beq _080D6A7E
- movs r6, 0
- cmp r6, r0
- bcs _080D6A62
- mov r0, r10
- subs r0, 0x2
- lsls r0, 24
- lsrs r4, r0, 24
-_080D6A18:
- lsls r0, r6, 2
- mov r3, r8
- adds r1, r0, r3
- ldrh r0, [r1]
- cmp r0, 0
- bne _080D6A56
- mov r0, r9
- strh r0, [r1]
- cmp r5, r2
- bhi _080D6A40
- adds r0, r1, 0x2
- adds r1, r5, 0
- bl SetBagItemQuantity
- b _080D6A7E
- .pool
-_080D6A40:
- cmp r4, 0x1
- bls _080D6A74
- subs r0, r5, r2
- lsls r0, 16
- lsrs r5, r0, 16
- adds r0, r1, 0x2
- adds r1, r2, 0
- str r2, [sp, 0x4]
- bl SetBagItemQuantity
- ldr r2, [sp, 0x4]
-_080D6A56:
- adds r0, r6, 0x1
- lsls r0, 24
- lsrs r6, r0, 24
- ldrb r1, [r7, 0x4]
- cmp r6, r1
- bcc _080D6A18
-_080D6A62:
- cmp r5, 0
- beq _080D6A7E
- b _080D6A74
-_080D6A68:
- lsls r1, 16
- lsrs r1, 16
- adds r0, r4, 0
- bl SetBagItemQuantity
- b _080D6A7E
-_080D6A74:
- mov r0, r8
- bl Free
- movs r0, 0
- b _080D6A92
-_080D6A7E:
- ldr r0, [r7]
- ldrb r2, [r7, 0x4]
- lsls r2, 2
- mov r1, r8
- bl memcpy
- mov r0, r8
- bl Free
- movs r0, 0x1
-_080D6A92:
- add sp, 0x8
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end AddBagItem
-
- thumb_func_start RemoveBagItem
-@ pokescrcmd
-RemoveBagItem: @ 80D6AA4
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- lsls r0, 16
- lsrs r0, 16
- mov r8, r0
- lsls r1, 16
- lsrs r7, r1, 16
- movs r4, 0
- bl ItemId_GetPocket
- lsls r0, 24
- cmp r0, 0
- beq _080D6B38
- mov r0, r8
- cmp r0, 0
- beq _080D6B38
- bl InBattlePyramid
- lsls r0, 24
- cmp r0, 0
- bne _080D6AE0
- ldr r0, =0x00004004
- bl FlagGet
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bne _080D6AF4
-_080D6AE0:
- mov r0, r8
- adds r1, r7, 0
- bl RemovePyramidBagItem
- lsls r0, 24
- lsrs r0, 24
- b _080D6C5A
- .pool
-_080D6AF4:
- mov r0, r8
- bl ItemId_GetPocket
- subs r0, 0x1
- lsls r0, 24
- lsrs r0, 24
- mov r9, r0
- lsls r1, r0, 3
- ldr r0, =gBagPockets
- adds r5, r1, r0
- movs r6, 0
- ldrb r2, [r5, 0x4]
- cmp r6, r2
- bcs _080D6B34
-_080D6B10:
- ldr r0, [r5]
- lsls r1, r6, 2
- adds r1, r0
- ldrh r0, [r1]
- cmp r0, r8
- bne _080D6B28
- adds r0, r1, 0x2
- bl GetBagItemQuantity
- adds r0, r4, r0
- lsls r0, 16
- lsrs r4, r0, 16
-_080D6B28:
- adds r0, r6, 0x1
- lsls r0, 24
- lsrs r6, r0, 24
- ldrb r0, [r5, 0x4]
- cmp r6, r0
- bcc _080D6B10
-_080D6B34:
- cmp r4, r7
- bcs _080D6B40
-_080D6B38:
- movs r0, 0
- b _080D6C5A
- .pool
-_080D6B40:
- bl CurrentMapIsSecretBase
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bne _080D6B70
- ldr r4, =0x000040ee
- adds r0, r4, 0
- bl VarGet
- adds r1, r0, 0
- movs r2, 0x80
- lsls r2, 2
- adds r0, r2, 0
- orrs r1, r0
- lsls r1, 16
- lsrs r1, 16
- adds r0, r4, 0
- bl VarSet
- ldr r0, =0x000040ed
- mov r1, r8
- bl VarSet
-_080D6B70:
- mov r0, r9
- bl sub_81ABB2C
- lsls r0, 24
- lsrs r1, r0, 24
- ldrb r0, [r5, 0x4]
- cmp r0, r1
- bls _080D6BE6
- ldr r0, [r5]
- lsls r1, 2
- adds r2, r1, r0
- ldrh r0, [r2]
- adds r4, r1, 0
- cmp r0, r8
- bne _080D6BE6
- adds r0, r2, 0x2
- bl GetBagItemQuantity
- lsls r0, 16
- lsrs r1, r0, 16
- cmp r1, r7
- bcc _080D6BB8
- ldr r0, [r5]
- adds r0, r4
- adds r0, 0x2
- subs r1, r7
- lsls r1, 16
- lsrs r1, 16
- bl SetBagItemQuantity
- movs r7, 0
- b _080D6BCA
- .pool
-_080D6BB8:
- subs r0, r7, r1
- lsls r0, 16
- lsrs r7, r0, 16
- ldr r0, [r5]
- adds r0, r4
- adds r0, 0x2
- movs r1, 0
- bl SetBagItemQuantity
-_080D6BCA:
- ldr r0, [r5]
- adds r0, r4
- adds r0, 0x2
- bl GetBagItemQuantity
- lsls r0, 16
- lsrs r2, r0, 16
- cmp r2, 0
- bne _080D6BE2
- ldr r0, [r5]
- adds r0, r4, r0
- strh r2, [r0]
-_080D6BE2:
- cmp r7, 0
- beq _080D6C58
-_080D6BE6:
- movs r6, 0
- ldrb r0, [r5, 0x4]
- cmp r6, r0
- bcs _080D6C58
-_080D6BEE:
- ldr r0, [r5]
- lsls r1, r6, 2
- adds r2, r1, r0
- ldrh r0, [r2]
- adds r4, r1, 0
- cmp r0, r8
- bne _080D6C4C
- adds r0, r2, 0x2
- bl GetBagItemQuantity
- lsls r0, 16
- lsrs r1, r0, 16
- cmp r1, r7
- bcc _080D6C1E
- ldr r0, [r5]
- adds r0, r4
- adds r0, 0x2
- subs r1, r7
- lsls r1, 16
- lsrs r1, 16
- bl SetBagItemQuantity
- movs r7, 0
- b _080D6C30
-_080D6C1E:
- subs r0, r7, r1
- lsls r0, 16
- lsrs r7, r0, 16
- ldr r0, [r5]
- adds r0, r4
- adds r0, 0x2
- movs r1, 0
- bl SetBagItemQuantity
-_080D6C30:
- ldr r0, [r5]
- adds r0, r4
- adds r0, 0x2
- bl GetBagItemQuantity
- lsls r0, 16
- lsrs r2, r0, 16
- cmp r2, 0
- bne _080D6C48
- ldr r0, [r5]
- adds r0, r4, r0
- strh r2, [r0]
-_080D6C48:
- cmp r7, 0
- beq _080D6C58
-_080D6C4C:
- adds r0, r6, 0x1
- lsls r0, 24
- lsrs r6, r0, 24
- ldrb r2, [r5, 0x4]
- cmp r6, r2
- bcc _080D6BEE
-_080D6C58:
- movs r0, 0x1
-_080D6C5A:
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end RemoveBagItem
-
- thumb_func_start GetPocketByItemId
-GetPocketByItemId: @ 80D6C68
- push {lr}
- lsls r0, 16
- lsrs r0, 16
- bl ItemId_GetPocket
- lsls r0, 24
- lsrs r0, 24
- pop {r1}
- bx r1
- thumb_func_end GetPocketByItemId
-
- thumb_func_start ClearItemSlots
-ClearItemSlots: @ 80D6C7C
- push {r4-r7,lr}
- adds r6, r0, 0
- lsls r1, 24
- movs r4, 0
- lsrs r1, 24
- cmp r4, r1
- bcs _080D6CA6
- adds r5, r1, 0
- movs r7, 0
-_080D6C8E:
- lsls r0, r4, 2
- adds r0, r6
- strh r7, [r0]
- adds r0, 0x2
- movs r1, 0
- bl SetBagItemQuantity
- adds r0, r4, 0x1
- lsls r0, 16
- lsrs r4, r0, 16
- cmp r4, r5
- bcc _080D6C8E
-_080D6CA6:
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end ClearItemSlots
-
- thumb_func_start sub_80D6CAC
-sub_80D6CAC: @ 80D6CAC
- push {lr}
- movs r1, 0
- ldr r0, =gSaveBlock1Ptr
- ldr r2, [r0]
- movs r3, 0x93
- lsls r3, 3
-_080D6CB8:
- lsls r0, r1, 24
- asrs r1, r0, 24
- lsls r0, r1, 2
- adds r0, r2, r0
- adds r0, r3
- ldrh r0, [r0]
- cmp r0, 0
- bne _080D6CD0
- adds r0, r1, 0
- b _080D6CE0
- .pool
-_080D6CD0:
- adds r0, r1, 0x1
- lsls r0, 24
- lsrs r1, r0, 24
- asrs r0, 24
- cmp r0, 0x31
- ble _080D6CB8
- movs r0, 0x1
- negs r0, r0
-_080D6CE0:
- pop {r1}
- bx r1
- thumb_func_end sub_80D6CAC
-
- thumb_func_start sub_80D6CE4
-sub_80D6CE4: @ 80D6CE4
- push {r4,lr}
- movs r2, 0
- movs r1, 0
- ldr r0, =gSaveBlock1Ptr
- ldr r3, [r0]
- movs r4, 0x93
- lsls r4, 3
-_080D6CF2:
- lsls r0, r1, 2
- adds r0, r3, r0
- adds r0, r4
- ldrh r0, [r0]
- cmp r0, 0
- beq _080D6D04
- adds r0, r2, 0x1
- lsls r0, 24
- lsrs r2, r0, 24
-_080D6D04:
- adds r0, r1, 0x1
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x31
- bls _080D6CF2
- adds r0, r2, 0
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end sub_80D6CE4
-
- thumb_func_start CheckPCHasItem
-CheckPCHasItem: @ 80D6D1C
- push {r4-r6,lr}
- lsls r0, 16
- lsrs r6, r0, 16
- lsls r1, 16
- lsrs r5, r1, 16
- movs r4, 0
-_080D6D28:
- ldr r0, =gSaveBlock1Ptr
- ldr r2, [r0]
- lsls r1, r4, 2
- adds r0, r2, r1
- movs r3, 0x93
- lsls r3, 3
- adds r0, r3
- ldrh r0, [r0]
- cmp r0, r6
- bne _080D6D5C
- adds r0, r1, r2
- ldr r1, =0x0000049a
- adds r0, r1
- bl GetBagItemId
- lsls r0, 16
- lsrs r0, 16
- cmp r0, r5
- bcc _080D6D5C
- movs r0, 0x1
- b _080D6D68
- .pool
-_080D6D5C:
- adds r0, r4, 0x1
- lsls r0, 24
- lsrs r4, r0, 24
- cmp r4, 0x31
- bls _080D6D28
- movs r0, 0
-_080D6D68:
- pop {r4-r6}
- pop {r1}
- bx r1
- thumb_func_end CheckPCHasItem
-
- thumb_func_start AddPCItem
-AddPCItem: @ 80D6D70
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- lsls r0, 16
- lsrs r0, 16
- mov r8, r0
- lsls r1, 16
- lsrs r5, r1, 16
- movs r0, 0xC8
- bl AllocZeroed
- adds r7, r0, 0
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- movs r0, 0x93
- lsls r0, 3
- adds r1, r0
- adds r0, r7, 0
- movs r2, 0xC8
- bl memcpy
- movs r6, 0
-_080D6D9C:
- lsls r0, r6, 2
- adds r1, r0, r7
- ldrh r0, [r1]
- cmp r0, r8
- bne _080D6DD0
- adds r4, r1, 0x2
- adds r0, r4, 0
- bl GetBagItemId
- lsls r0, 16
- lsrs r2, r0, 16
- adds r1, r2, r5
- ldr r3, =0x000003e7
- cmp r1, r3
- ble _080D6E04
- ldr r1, =0x0000fc19
- adds r0, r5, r1
- adds r0, r2, r0
- lsls r0, 16
- lsrs r5, r0, 16
- adds r0, r4, 0
- adds r1, r3, 0
- bl SetBagItemId
- cmp r5, 0
- beq _080D6E20
-_080D6DD0:
- adds r0, r6, 0x1
- lsls r0, 24
- lsrs r6, r0, 24
- cmp r6, 0x31
- bls _080D6D9C
- cmp r5, 0
- beq _080D6E20
- bl sub_80D6CAC
- lsls r0, 24
- asrs r1, r0, 24
- movs r0, 0x1
- negs r0, r0
- cmp r1, r0
- bne _080D6E10
- adds r0, r7, 0
- bl Free
- movs r0, 0
- b _080D6E3A
- .pool
-_080D6E04:
- lsls r1, 16
- lsrs r1, 16
- adds r0, r4, 0
- bl SetBagItemId
- b _080D6E20
-_080D6E10:
- lsls r0, r1, 2
- adds r0, r7
- mov r1, r8
- strh r1, [r0]
- adds r0, 0x2
- adds r1, r5, 0
- bl SetBagItemId
-_080D6E20:
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- movs r1, 0x93
- lsls r1, 3
- adds r0, r1
- adds r1, r7, 0
- movs r2, 0xC8
- bl memcpy
- adds r0, r7, 0
- bl Free
- movs r0, 0x1
-_080D6E3A:
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r1}
- bx r1
- .pool
- thumb_func_end AddPCItem
-
- thumb_func_start sub_80D6E48
-sub_80D6E48: @ 80D6E48
- push {lr}
- lsls r0, 24
- lsls r1, 16
- lsrs r1, 16
- ldr r2, =gSaveBlock1Ptr
- ldr r2, [r2]
- lsrs r0, 22
- adds r3, r2, r0
- ldr r0, =0x0000049a
- adds r2, r3, r0
- ldrh r0, [r2]
- subs r0, r1
- strh r0, [r2]
- lsls r0, 16
- lsrs r1, r0, 16
- cmp r1, 0
- bne _080D6E76
- movs r2, 0x93
- lsls r2, 3
- adds r0, r3, r2
- strh r1, [r0]
- bl sub_80D6E84
-_080D6E76:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_80D6E48
-
- thumb_func_start sub_80D6E84
-sub_80D6E84: @ 80D6E84
- push {r4-r7,lr}
- movs r2, 0
-_080D6E88:
- adds r1, r2, 0x1
- lsls r0, r1, 16
- lsrs r4, r0, 16
- adds r6, r1, 0
- cmp r4, 0x31
- bhi _080D6ECA
- ldr r0, =gSaveBlock1Ptr
- mov r12, r0
- lsls r5, r2, 2
- movs r7, 0x93
- lsls r7, 3
-_080D6E9E:
- mov r0, r12
- ldr r1, [r0]
- adds r0, r1, r5
- adds r0, r7
- ldrh r0, [r0]
- cmp r0, 0
- bne _080D6EC0
- movs r0, 0x93
- lsls r0, 3
- adds r1, r0
- adds r2, r1, r5
- ldr r3, [r2]
- lsls r0, r4, 2
- adds r1, r0
- ldr r0, [r1]
- str r0, [r2]
- str r3, [r1]
-_080D6EC0:
- adds r0, r4, 0x1
- lsls r0, 16
- lsrs r4, r0, 16
- cmp r4, 0x31
- bls _080D6E9E
-_080D6ECA:
- lsls r0, r6, 16
- lsrs r2, r0, 16
- cmp r2, 0x30
- bls _080D6E88
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_80D6E84
-
- thumb_func_start sub_80D6EDC
-sub_80D6EDC: @ 80D6EDC
- push {lr}
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r2, =0x00000496
- adds r1, r0, r2
- ldrh r2, [r1]
- ldr r3, =0x00000103
- cmp r2, r3
- beq _080D6F04
- movs r0, 0x88
- lsls r0, 1
- cmp r2, r0
- beq _080D6F0C
- b _080D6F0E
- .pool
-_080D6F04:
- movs r0, 0x88
- lsls r0, 1
- strh r0, [r1]
- b _080D6F0E
-_080D6F0C:
- strh r3, [r1]
-_080D6F0E:
- pop {r0}
- bx r0
- thumb_func_end sub_80D6EDC
-
- thumb_func_start BagGetItemIdByPocketPosition
-@ int BagGetItemIdByPocketPosition(int pocket_id_plus_1, int item_index_in_pocket)
-BagGetItemIdByPocketPosition: @ 80D6F14
- lsls r0, 24
- lsls r1, 16
- ldr r2, =gBagPockets
- lsrs r0, 21
- subs r0, 0x8
- adds r0, r2
- ldr r0, [r0]
- lsrs r1, 14
- adds r1, r0
- ldrh r0, [r1]
- bx lr
- .pool
- thumb_func_end BagGetItemIdByPocketPosition
-
- thumb_func_start BagGetQuantityByPocketPosition
-@ int BagGetQuantityByPocketPosition(int pocket_id_plus_1, int item_index_in_pocket)
-BagGetQuantityByPocketPosition: @ 80D6F30
- push {lr}
- lsls r0, 24
- lsls r1, 16
- ldr r2, =gBagPockets
- lsrs r0, 21
- subs r0, 0x8
- adds r0, r2
- lsrs r1, 14
- ldr r0, [r0]
- adds r0, r1
- adds r0, 0x2
- bl GetBagItemQuantity
- lsls r0, 16
- lsrs r0, 16
- pop {r1}
- bx r1
- .pool
- thumb_func_end BagGetQuantityByPocketPosition
-
- thumb_func_start swap32
-swap32: @ 80D6F58
- ldr r3, [r0]
- ldr r2, [r1]
- str r2, [r0]
- str r3, [r1]
- bx lr
- thumb_func_end swap32
-
- thumb_func_start sub_80D6F64
-sub_80D6F64: @ 80D6F64
- push {r4-r7,lr}
- adds r6, r0, 0
- movs r3, 0
- b _080D6FA6
-_080D6F6C:
- adds r1, r3, 0x1
- lsls r0, r1, 16
- lsrs r4, r0, 16
- adds r7, r1, 0
- cmp r4, r2
- bcs _080D6FA2
- lsls r5, r3, 2
-_080D6F7A:
- ldr r0, [r6]
- adds r0, r5
- adds r0, 0x2
- bl GetBagItemQuantity
- lsls r0, 16
- cmp r0, 0
- bne _080D6F96
- ldr r1, [r6]
- adds r0, r1, r5
- lsls r2, r4, 2
- adds r1, r2
- bl swap32
-_080D6F96:
- adds r0, r4, 0x1
- lsls r0, 16
- lsrs r4, r0, 16
- ldrb r0, [r6, 0x4]
- cmp r4, r0
- bcc _080D6F7A
-_080D6FA2:
- lsls r0, r7, 16
- lsrs r3, r0, 16
-_080D6FA6:
- ldrb r2, [r6, 0x4]
- subs r0, r2, 0x1
- cmp r3, r0
- blt _080D6F6C
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_80D6F64
-
- thumb_func_start sub_80D6FB4
-sub_80D6FB4: @ 80D6FB4
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- adds r6, r0, 0
- movs r3, 0
- b _080D701A
-_080D6FC0:
- adds r1, r3, 0x1
- lsls r0, r1, 16
- lsrs r5, r0, 16
- mov r8, r1
- cmp r5, r2
- bcs _080D7014
- lsls r7, r3, 2
-_080D6FCE:
- ldr r0, [r6]
- adds r0, r7
- adds r0, 0x2
- bl GetBagItemQuantity
- lsls r0, 16
- lsls r4, r5, 2
- cmp r0, 0
- beq _080D6FFE
- ldr r0, [r6]
- adds r0, r4
- adds r0, 0x2
- bl GetBagItemQuantity
- lsls r0, 16
- cmp r0, 0
- beq _080D7008
- ldr r0, [r6]
- adds r1, r7, r0
- adds r0, r4, r0
- ldrh r1, [r1]
- ldrh r0, [r0]
- cmp r1, r0
- bls _080D7008
-_080D6FFE:
- ldr r1, [r6]
- adds r0, r1, r7
- adds r1, r4
- bl swap32
-_080D7008:
- adds r0, r5, 0x1
- lsls r0, 16
- lsrs r5, r0, 16
- ldrb r0, [r6, 0x4]
- cmp r5, r0
- bcc _080D6FCE
-_080D7014:
- mov r1, r8
- lsls r0, r1, 16
- lsrs r3, r0, 16
-_080D701A:
- ldrb r2, [r6, 0x4]
- subs r0, r2, 0x1
- cmp r3, r0
- blt _080D6FC0
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_80D6FB4
-
- thumb_func_start sub_80D702C
-sub_80D702C: @ 80D702C
- push {r4-r6,lr}
- adds r4, r0, 0
- adds r3, r2, 0
- cmp r1, r3
- beq _080D708C
- lsls r0, r1, 2
- adds r0, r4
- ldr r6, [r0]
- cmp r3, r1
- bls _080D7064
- subs r3, 0x1
- lsls r1, 16
- lsls r0, r3, 16
- asrs r2, r0, 16
- cmp r1, r0
- bge _080D7086
- adds r5, r2, 0
-_080D704E:
- asrs r2, r1, 16
- lsls r0, r2, 2
- adds r0, r4
- ldr r1, [r0, 0x4]
- str r1, [r0]
- adds r2, 0x1
- lsls r1, r2, 16
- asrs r0, r1, 16
- cmp r0, r5
- blt _080D704E
- b _080D7086
-_080D7064:
- lsls r1, 16
- lsls r0, r3, 16
- asrs r2, r0, 16
- cmp r1, r0
- ble _080D7086
- adds r5, r2, 0
-_080D7070:
- asrs r2, r1, 16
- lsls r1, r2, 2
- adds r1, r4
- subs r0, r1, 0x4
- ldr r0, [r0]
- str r0, [r1]
- subs r2, 0x1
- lsls r1, r2, 16
- asrs r0, r1, 16
- cmp r0, r5
- bgt _080D7070
-_080D7086:
- lsls r0, r3, 2
- adds r0, r4
- str r6, [r0]
-_080D708C:
- pop {r4-r6}
- pop {r0}
- bx r0
- thumb_func_end sub_80D702C
-
- thumb_func_start ClearBag
-ClearBag: @ 80D7094
- push {r4,r5,lr}
- movs r4, 0
- ldr r5, =gBagPockets
-_080D709A:
- lsls r1, r4, 3
- adds r1, r5
- ldr r0, [r1]
- ldrb r1, [r1, 0x4]
- bl ClearItemSlots
- adds r0, r4, 0x1
- lsls r0, 16
- lsrs r4, r0, 16
- cmp r4, 0x4
- bls _080D709A
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end ClearBag
-
- thumb_func_start CountTotalItemQuantityInBag
-@ u16 CountTotalItemQuantityInBag(u16 itemId)
-CountTotalItemQuantityInBag: @ 80D70BC
- push {r4-r7,lr}
- lsls r0, 16
- lsrs r6, r0, 16
- movs r7, 0
- adds r0, r6, 0
- bl ItemId_GetPocket
- lsls r0, 24
- lsrs r0, 21
- ldr r1, =gUnknown_02039DD0
- adds r5, r0, r1
- movs r4, 0
- ldrb r0, [r5, 0x4]
- cmp r7, r0
- bcs _080D70FE
-_080D70DA:
- ldr r0, [r5]
- lsls r1, r4, 2
- adds r1, r0
- ldrh r0, [r1]
- cmp r0, r6
- bne _080D70F2
- adds r0, r1, 0x2
- bl GetBagItemQuantity
- adds r0, r7, r0
- lsls r0, 16
- lsrs r7, r0, 16
-_080D70F2:
- adds r0, r4, 0x1
- lsls r0, 16
- lsrs r4, r0, 16
- ldrb r0, [r5, 0x4]
- cmp r4, r0
- bcc _080D70DA
-_080D70FE:
- adds r0, r7, 0
- pop {r4-r7}
- pop {r1}
- bx r1
- .pool
- thumb_func_end CountTotalItemQuantityInBag
-
- thumb_func_start CheckPyramidBagHasItem
-CheckPyramidBagHasItem: @ 80D710C
- push {r4,r5,lr}
- lsls r0, 16
- lsrs r5, r0, 16
- lsls r1, 16
- lsrs r4, r1, 16
- ldr r0, =gSaveBlock2Ptr
- ldr r3, [r0]
- ldr r1, =0x00000ca9
- adds r0, r3, r1
- ldrb r1, [r0]
- lsls r1, 30
- lsrs r2, r1, 30
- lsls r0, r2, 2
- adds r0, r2
- lsls r0, 2
- ldr r2, =0x00000e2c
- adds r0, r2
- adds r2, r3, r0
- lsrs r1, 30
- lsls r0, r1, 2
- adds r0, r1
- lsls r0, 1
- ldr r1, =0x00000e54
- adds r0, r1
- adds r3, r0
- movs r1, 0
-_080D7140:
- lsls r0, r1, 1
- adds r0, r2
- ldrh r0, [r0]
- cmp r0, r5
- bne _080D7170
- adds r0, r3, r1
- ldrb r0, [r0]
- cmp r0, r4
- bcs _080D715C
- subs r0, r4, r0
- lsls r0, 16
- lsrs r4, r0, 16
- cmp r4, 0
- bne _080D7170
-_080D715C:
- movs r0, 0x1
- b _080D717C
- .pool
-_080D7170:
- adds r0, r1, 0x1
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x9
- bls _080D7140
- movs r0, 0
-_080D717C:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end CheckPyramidBagHasItem
-
- thumb_func_start CheckPyramidBagHasSpace
-CheckPyramidBagHasSpace: @ 80D7184
- push {r4,r5,lr}
- lsls r0, 16
- lsrs r5, r0, 16
- lsls r1, 16
- lsrs r4, r1, 16
- ldr r0, =gSaveBlock2Ptr
- ldr r3, [r0]
- ldr r1, =0x00000ca9
- adds r0, r3, r1
- ldrb r1, [r0]
- lsls r1, 30
- lsrs r2, r1, 30
- lsls r0, r2, 2
- adds r0, r2
- lsls r0, 2
- ldr r2, =0x00000e2c
- adds r0, r2
- adds r2, r3, r0
- lsrs r1, 30
- lsls r0, r1, 2
- adds r0, r1
- lsls r0, 1
- ldr r1, =0x00000e54
- adds r0, r1
- adds r3, r0
- movs r1, 0
-_080D71B8:
- lsls r0, r1, 1
- adds r0, r2
- ldrh r0, [r0]
- cmp r0, r5
- beq _080D71C6
- cmp r0, 0
- bne _080D71F0
-_080D71C6:
- adds r0, r3, r1
- ldrb r0, [r0]
- adds r0, r4
- cmp r0, 0x63
- ble _080D71DA
- subs r0, 0x63
- lsls r0, 16
- lsrs r4, r0, 16
- cmp r4, 0
- bne _080D71F0
-_080D71DA:
- movs r0, 0x1
- b _080D71FC
- .pool
-_080D71F0:
- adds r0, r1, 0x1
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x9
- bls _080D71B8
- movs r0, 0
-_080D71FC:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end CheckPyramidBagHasSpace
-
- thumb_func_start AddPyramidBagItem
-AddPyramidBagItem: @ 80D7204
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- lsls r0, 16
- lsrs r7, r0, 16
- lsls r1, 16
- lsrs r4, r1, 16
- ldr r0, =gSaveBlock2Ptr
- ldr r3, [r0]
- ldr r1, =0x00000ca9
- adds r0, r3, r1
- ldrb r1, [r0]
- lsls r1, 30
- lsrs r2, r1, 30
- lsls r0, r2, 2
- adds r0, r2
- lsls r0, 2
- ldr r2, =0x00000e2c
- adds r0, r2
- adds r0, r3
- mov r9, r0
- lsrs r1, 30
- lsls r0, r1, 2
- adds r0, r1
- lsls r0, 1
- ldr r1, =0x00000e54
- adds r0, r1
- adds r3, r0
- mov r8, r3
- movs r0, 0x14
- bl Alloc
- adds r5, r0, 0
- movs r0, 0xA
- bl Alloc
- adds r6, r0, 0
- adds r0, r5, 0
- mov r1, r9
- movs r2, 0x14
- bl memcpy
- adds r0, r6, 0
- mov r1, r8
- movs r2, 0xA
- bl memcpy
- movs r2, 0
-_080D7266:
- lsls r0, r2, 1
- adds r0, r5
- ldrh r0, [r0]
- cmp r0, r7
- bne _080D72AA
- adds r1, r6, r2
- ldrb r0, [r1]
- cmp r0, 0x62
- bhi _080D72AA
- adds r0, r4
- strb r0, [r1]
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x63
- bls _080D72A4
- ldrb r0, [r1]
- subs r0, 0x63
- lsls r0, 16
- lsrs r4, r0, 16
- movs r0, 0x63
- strb r0, [r1]
- b _080D72A6
- .pool
-_080D72A4:
- movs r4, 0
-_080D72A6:
- cmp r4, 0
- beq _080D7304
-_080D72AA:
- adds r0, r2, 0x1
- lsls r0, 16
- lsrs r2, r0, 16
- cmp r2, 0x9
- bls _080D7266
- cmp r4, 0
- beq _080D7304
- movs r2, 0
-_080D72BA:
- lsls r0, r2, 1
- adds r1, r0, r5
- ldrh r0, [r1]
- cmp r0, 0
- bne _080D72E6
- strh r7, [r1]
- adds r1, r6, r2
- strb r4, [r1]
- lsls r0, r4, 24
- lsrs r0, 24
- cmp r0, 0x63
- bls _080D72E0
- ldrb r0, [r1]
- subs r0, 0x63
- lsls r0, 16
- lsrs r4, r0, 16
- movs r0, 0x63
- strb r0, [r1]
- b _080D72E2
-_080D72E0:
- movs r4, 0
-_080D72E2:
- cmp r4, 0
- beq _080D7304
-_080D72E6:
- adds r0, r2, 0x1
- lsls r0, 16
- lsrs r2, r0, 16
- cmp r2, 0x9
- bls _080D72BA
- cmp r4, 0
- beq _080D7304
- adds r0, r5, 0
- bl Free
- adds r0, r6, 0
- bl Free
- movs r0, 0
- b _080D7326
-_080D7304:
- mov r0, r9
- adds r1, r5, 0
- movs r2, 0x14
- bl memcpy
- mov r0, r8
- adds r1, r6, 0
- movs r2, 0xA
- bl memcpy
- adds r0, r5, 0
- bl Free
- adds r0, r6, 0
- bl Free
- movs r0, 0x1
-_080D7326:
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end AddPyramidBagItem
-
- thumb_func_start RemovePyramidBagItem
-RemovePyramidBagItem: @ 80D7334
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- lsls r0, 16
- lsrs r0, 16
- mov r9, r0
- lsls r1, 16
- lsrs r4, r1, 16
- ldr r0, =gSaveBlock2Ptr
- ldr r3, [r0]
- ldr r1, =0x00000ca9
- adds r0, r3, r1
- ldrb r1, [r0]
- lsls r1, 30
- lsrs r2, r1, 30
- lsls r0, r2, 2
- adds r0, r2
- lsls r0, 2
- ldr r2, =0x00000e2c
- adds r0, r2
- adds r0, r3
- mov r8, r0
- lsrs r1, 30
- lsls r0, r1, 2
- adds r0, r1
- lsls r0, 1
- ldr r1, =0x00000e54
- adds r0, r1
- adds r7, r3, r0
- ldr r1, =gUnknown_0203CF30
- ldrh r0, [r1, 0x8]
- ldrh r1, [r1, 0x6]
- adds r0, r1
- lsls r0, 16
- lsrs r2, r0, 16
- lsls r0, r2, 1
- mov r1, r8
- adds r3, r0, r1
- ldrh r0, [r3]
- cmp r0, r9
- bne _080D73B4
- adds r1, r7, r2
- ldrb r0, [r1]
- cmp r0, r4
- bcc _080D73B4
- subs r0, r4
- strb r0, [r1]
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0
- bne _080D744C
- strh r0, [r3]
- b _080D744C
- .pool
-_080D73B4:
- movs r0, 0x14
- bl Alloc
- adds r5, r0, 0
- movs r0, 0xA
- bl Alloc
- adds r6, r0, 0
- adds r0, r5, 0
- mov r1, r8
- movs r2, 0x14
- bl memcpy
- adds r0, r6, 0
- adds r1, r7, 0
- movs r2, 0xA
- bl memcpy
- movs r2, 0
-_080D73DA:
- lsls r0, r2, 1
- adds r3, r0, r5
- ldrh r0, [r3]
- cmp r0, r9
- bne _080D740E
- adds r1, r6, r2
- ldrb r0, [r1]
- cmp r0, r4
- bcc _080D73FC
- subs r0, r4
- strb r0, [r1]
- movs r4, 0
- lsls r0, 24
- cmp r0, 0
- bne _080D740A
- strh r4, [r3]
- b _080D740A
-_080D73FC:
- subs r0, r4, r0
- lsls r0, 16
- lsrs r4, r0, 16
- movs r0, 0
- strb r0, [r1]
- movs r0, 0
- strh r0, [r3]
-_080D740A:
- cmp r4, 0
- beq _080D742C
-_080D740E:
- adds r0, r2, 0x1
- lsls r0, 16
- lsrs r2, r0, 16
- cmp r2, 0x9
- bls _080D73DA
- cmp r4, 0
- beq _080D742C
- adds r0, r5, 0
- bl Free
- adds r0, r6, 0
- bl Free
- movs r0, 0
- b _080D744E
-_080D742C:
- mov r0, r8
- adds r1, r5, 0
- movs r2, 0x14
- bl memcpy
- adds r0, r7, 0
- adds r1, r6, 0
- movs r2, 0xA
- bl memcpy
- adds r0, r5, 0
- bl Free
- adds r0, r6, 0
- bl Free
-_080D744C:
- movs r0, 0x1
-_080D744E:
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end RemovePyramidBagItem
-
- thumb_func_start SanitizeItemId
-SanitizeItemId: @ 80D745C
- push {lr}
- lsls r0, 16
- lsrs r1, r0, 16
- movs r0, 0xBC
- lsls r0, 1
- cmp r1, r0
- bhi _080D746E
- adds r0, r1, 0
- b _080D7470
-_080D746E:
- movs r0, 0
-_080D7470:
- pop {r1}
- bx r1
- thumb_func_end SanitizeItemId
-
- thumb_func_start ItemId_GetItem
-@ item *ItemId_GetItem(s16 itemId)
-ItemId_GetItem: @ 80D7474
- push {lr}
- lsls r0, 16
- lsrs r0, 16
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- ldr r1, =gItems
- adds r0, r1
- pop {r1}
- bx r1
- .pool
- thumb_func_end ItemId_GetItem
-
- thumb_func_start itemid_get_number
-itemid_get_number: @ 80D7494
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r0, r4
- ldrh r0, [r0, 0xE]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end itemid_get_number
-
- thumb_func_start itemid_get_market_price
-itemid_get_market_price: @ 80D74B8
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r0, r4
- ldrh r0, [r0, 0x10]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end itemid_get_market_price
-
- thumb_func_start ItemId_GetHoldEffect
-ItemId_GetHoldEffect: @ 80D74DC
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r0, r4
- ldrb r0, [r0, 0x12]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end ItemId_GetHoldEffect
-
- thumb_func_start ItemId_GetHoldEffectParam
-ItemId_GetHoldEffectParam: @ 80D7500
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r0, r4
- ldrb r0, [r0, 0x13]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end ItemId_GetHoldEffectParam
-
- thumb_func_start ItemId_GetDescription
-ItemId_GetDescription: @ 80D7524
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r4, 0x14
- adds r0, r4
- ldr r0, [r0]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end ItemId_GetDescription
-
- thumb_func_start itemid_is_unique
-itemid_is_unique: @ 80D7548
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r0, r4
- ldrb r0, [r0, 0x18]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end itemid_is_unique
-
- thumb_func_start itemid_get_x19
-itemid_get_x19: @ 80D756C
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r0, r4
- ldrb r0, [r0, 0x19]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end itemid_get_x19
-
- thumb_func_start ItemId_GetPocket
-ItemId_GetPocket: @ 80D7590
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r0, r4
- ldrb r0, [r0, 0x1A]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end ItemId_GetPocket
-
- thumb_func_start ItemId_GetType
-ItemId_GetType: @ 80D75B4
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r0, r4
- ldrb r0, [r0, 0x1B]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end ItemId_GetType
-
- thumb_func_start ItemId_GetFieldFunc
-ItemId_GetFieldFunc: @ 80D75D8
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r4, 0x1C
- adds r0, r4
- ldr r0, [r0]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end ItemId_GetFieldFunc
-
- thumb_func_start ItemId_GetBattleUsage
-ItemId_GetBattleUsage: @ 80D75FC
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r0, r4
- adds r0, 0x20
- ldrb r0, [r0]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end ItemId_GetBattleUsage
-
- thumb_func_start ItemId_GetBattleFunc
-ItemId_GetBattleFunc: @ 80D7620
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r4, 0x24
- adds r0, r4
- ldr r0, [r0]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end ItemId_GetBattleFunc
-
- thumb_func_start ItemId_GetSecondaryId
-ItemId_GetSecondaryId: @ 80D7644
- push {r4,lr}
- lsls r0, 16
- lsrs r0, 16
- ldr r4, =gItems
- bl SanitizeItemId
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0x2C
- muls r0, r1
- adds r0, r4
- adds r0, 0x28
- ldrb r0, [r0]
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end ItemId_GetSecondaryId
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/mauville_old_man.s b/asm/mauville_old_man.s
deleted file mode 100644
index af4764d76..000000000
--- a/asm/mauville_old_man.s
+++ /dev/null
@@ -1,2519 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start sub_81200A0
-sub_81200A0: @ 81200A0
- push {r4,lr}
- ldr r0, =gSaveBlock1Ptr
- ldr r2, [r0]
- ldr r1, =0x00002e28
- adds r0, r2, r1
- movs r1, 0
- strb r1, [r0]
- ldr r3, =0x00002e51
- adds r0, r2, r3
- strb r1, [r0]
- ldr r0, =gGameLanguage
- ldrb r1, [r0]
- adds r3, 0x1
- adds r0, r2, r3
- strb r1, [r0]
- movs r3, 0
- ldr r0, =0x00002e2a
- adds r2, r0
- ldr r4, =gUnknown_0859EFE4
-_081200C6:
- lsls r0, r3, 1
- adds r1, r2, r0
- adds r0, r4
- ldrh r0, [r0]
- strh r0, [r1]
- adds r0, r3, 0x1
- lsls r0, 16
- lsrs r3, r0, 16
- cmp r3, 0x5
- bls _081200C6
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81200A0
-
- thumb_func_start sub_81200F8
-sub_81200F8: @ 81200F8
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- ldr r0, =0x00002e28
- adds r1, r0
- movs r2, 0
- movs r0, 0x1
- strb r0, [r1]
- strb r2, [r1, 0x1]
- ldr r0, =gGameLanguage
- ldrb r0, [r0]
- strb r0, [r1, 0x2]
- bx lr
- .pool
- thumb_func_end sub_81200F8
-
- thumb_func_start sub_812011C
-sub_812011C: @ 812011C
- push {lr}
- bl sub_8120E08
- pop {r0}
- bx r0
- thumb_func_end sub_812011C
-
- thumb_func_start sub_8120128
-sub_8120128: @ 8120128
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- ldr r0, =0x00002e28
- adds r2, r1, r0
- movs r3, 0
- movs r0, 0x4
- strb r0, [r2]
- strb r3, [r2, 0x1]
- ldr r0, =gGameLanguage
- ldrb r0, [r0]
- ldr r2, =0x00002e48
- adds r1, r2
- strb r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8120128
-
- thumb_func_start sub_8120154
-sub_8120154: @ 8120154
- push {lr}
- bl sub_81339F8
- pop {r0}
- bx r0
- thumb_func_end sub_8120154
-
- thumb_func_start SetMauvilleOldMan
-SetMauvilleOldMan: @ 8120160
- push {lr}
- ldr r0, =gSaveBlock2Ptr
- ldr r0, [r0]
- ldrb r1, [r0, 0xB]
- lsls r1, 8
- ldrb r0, [r0, 0xA]
- orrs r0, r1
- movs r1, 0xA
- bl __umodsi3
- lsls r0, 16
- lsrs r0, 17
- cmp r0, 0x4
- bhi _081201C0
- lsls r0, 2
- ldr r1, =_08120190
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .pool
- .align 2, 0
-_08120190:
- .4byte _081201A4
- .4byte _081201AA
- .4byte _081201B0
- .4byte _081201B6
- .4byte _081201BC
-_081201A4:
- bl sub_81200A0
- b _081201C0
-_081201AA:
- bl sub_81200F8
- b _081201C0
-_081201B0:
- bl sub_8120154
- b _081201C0
-_081201B6:
- bl sub_812011C
- b _081201C0
-_081201BC:
- bl sub_8120128
-_081201C0:
- bl sub_8120B5C
- pop {r0}
- bx r0
- thumb_func_end SetMauvilleOldMan
-
- thumb_func_start sub_81201C8
-sub_81201C8: @ 81201C8
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00002e28
- adds r0, r1
- ldrb r0, [r0]
- bx lr
- .pool
- thumb_func_end sub_81201C8
-
- thumb_func_start sub_81201DC
-sub_81201DC: @ 81201DC
- push {r4,lr}
- ldr r4, =gSpecialVar_Result
- bl sub_81201C8
- lsls r0, 24
- lsrs r0, 24
- strh r0, [r4]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81201DC
-
- thumb_func_start sub_81201F4
-sub_81201F4: @ 81201F4
- ldr r1, =gSpecialVar_Result
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r2, =0x00002e51
- adds r0, r2
- ldrb r0, [r0]
- strh r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_81201F4
-
- thumb_func_start sub_8120210
-sub_8120210: @ 8120210
- push {r4-r6,lr}
- ldr r0, =gSaveBlock1Ptr
- ldr r4, [r0]
- ldr r0, =0x00002e28
- adds r6, r4, r0
- ldr r1, =0x00002e42
- adds r0, r4, r1
- ldr r5, =gSaveBlock2Ptr
- ldr r1, [r5]
- bl StringCopy
- movs r2, 0
- ldr r0, =0x00002e4d
- adds r4, r0
-_0812022C:
- adds r1, r4, r2
- ldr r0, [r5]
- adds r0, 0xA
- adds r0, r2
- ldrb r0, [r0]
- strb r0, [r1]
- adds r0, r2, 0x1
- lsls r0, 16
- lsrs r2, r0, 16
- cmp r2, 0x3
- bls _0812022C
- movs r2, 0
- adds r5, r6, 0
- adds r5, 0x29
- adds r3, r6, 0x2
- adds r4, r6, 0
- adds r4, 0xE
-_0812024E:
- lsls r0, r2, 1
- adds r1, r3, r0
- adds r0, r4, r0
- ldrh r0, [r0]
- strh r0, [r1]
- adds r0, r2, 0x1
- lsls r0, 16
- lsrs r2, r0, 16
- cmp r2, 0x5
- bls _0812024E
- movs r0, 0x1
- strb r0, [r5]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120210
-
- thumb_func_start sub_8120280
-sub_8120280: @ 8120280
- push {r4-r7,lr}
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- ldr r0, =gSpecialVar_0x8004
- ldrh r0, [r0]
- ldr r2, =0x00002e36
- adds r5, r1, r2
- cmp r0, 0
- bne _08120296
- ldr r0, =0x00002e2a
- adds r5, r1, r0
-_08120296:
- ldr r2, =gStringVar4
- adds r4, r2, 0
- movs r6, 0
-_0812029C:
- ldrh r1, [r5]
- adds r5, 0x2
- adds r0, r2, 0
- bl CopyEasyChatWord
- adds r2, r0, 0
- adds r7, r6, 0x1
- cmp r2, r4
- beq _081202BE
- movs r1, 0x37
-_081202B0:
- ldrb r0, [r4]
- cmp r0, 0
- bne _081202B8
- strb r1, [r4]
-_081202B8:
- adds r4, 0x1
- cmp r2, r4
- bne _081202B0
-_081202BE:
- adds r4, 0x1
- movs r0, 0
- strb r0, [r2]
- adds r2, 0x1
- ldrh r1, [r5]
- adds r5, 0x2
- adds r0, r2, 0
- bl CopyEasyChatWord
- adds r2, r0, 0
- cmp r2, r4
- beq _081202E6
- movs r1, 0x37
-_081202D8:
- ldrb r0, [r4]
- cmp r0, 0
- bne _081202E0
- strb r1, [r4]
-_081202E0:
- adds r4, 0x1
- cmp r2, r4
- bne _081202D8
-_081202E6:
- adds r4, 0x1
- movs r0, 0xFE
- strb r0, [r2]
- adds r2, 0x1
- ldrh r1, [r5]
- adds r5, 0x2
- adds r0, r2, 0
- bl CopyEasyChatWord
- adds r2, r0, 0
- cmp r2, r4
- beq _0812030E
- movs r1, 0x37
-_08120300:
- ldrb r0, [r4]
- cmp r0, 0
- bne _08120308
- strb r1, [r4]
-_08120308:
- adds r4, 0x1
- cmp r2, r4
- bne _08120300
-_0812030E:
- cmp r6, 0
- bne _0812031E
- movs r0, 0xFC
- strb r0, [r2]
- adds r2, 0x1
- movs r0, 0xF
- strb r0, [r2]
- adds r2, 0x1
-_0812031E:
- lsls r0, r7, 16
- lsrs r6, r0, 16
- cmp r6, 0x1
- bls _0812029C
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120280
-
- thumb_func_start sub_8120340
-sub_8120340: @ 8120340
- push {lr}
- ldr r0, =gSpecialVar_0x8004
- ldrb r0, [r0]
- bl sub_81206C0
- bl ScriptContext1_Stop
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120340
-
- thumb_func_start sub_8120358
-sub_8120358: @ 8120358
- ldr r1, =gSpecialVar_Result
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r2, =0x00002e28
- adds r0, r2
- ldrb r0, [r0, 0x1]
- strh r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8120358
-
- thumb_func_start sub_8120374
-sub_8120374: @ 8120374
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00002e28
- adds r0, r1
- movs r1, 0x1
- strb r1, [r0, 0x1]
- bx lr
- .pool
- thumb_func_end sub_8120374
-
- thumb_func_start sub_812038C
-sub_812038C: @ 812038C
- push {lr}
- bl sub_811F01C
- lsls r0, 16
- lsrs r1, r0, 16
- ldr r0, =0x0000ffff
- cmp r1, r0
- bne _081203AC
- ldr r1, =gSpecialVar_Result
- movs r0, 0
- b _081203B6
- .pool
-_081203AC:
- ldr r0, =gStringVar1
- bl CopyEasyChatWord
- ldr r1, =gSpecialVar_Result
- movs r0, 0x1
-_081203B6:
- strh r0, [r1]
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_812038C
-
- thumb_func_start sub_81203C4
-sub_81203C4: @ 81203C4
- push {lr}
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00002e28
- adds r2, r0, r1
- ldrb r0, [r2, 0x1]
- cmp r0, 0xA
- bne _081203EC
- ldr r1, =gSpecialVar_Result
- movs r0, 0
- strh r0, [r1]
- strb r0, [r2, 0x1]
- b _081203F2
- .pool
-_081203EC:
- ldr r1, =gSpecialVar_Result
- movs r0, 0x1
- strh r0, [r1]
-_081203F2:
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81203C4
-
- thumb_func_start sub_81203FC
-sub_81203FC: @ 81203FC
- push {r4-r6,lr}
- ldr r0, =gSaveBlock1Ptr
- ldr r4, [r0]
- ldr r0, =0x00002e28
- adds r5, r4, r0
- ldrb r0, [r5, 0x1]
- cmp r0, 0
- bne _08120410
- bl sub_81204DC
-_08120410:
- ldrb r0, [r5, 0x1]
- lsls r0, 1
- ldr r1, =0x00002e2c
- adds r6, r4, r1
- adds r0, r6, r0
- ldrh r1, [r0]
- ldr r0, =0x0000ffff
- cmp r1, r0
- beq _08120480
- bl Random
- adds r4, r0, 0
- lsls r4, 16
- lsrs r4, 16
- movs r0, 0x7
- ands r4, r0
- ldr r0, =gStringVar4
- ldrb r1, [r5, 0x1]
- lsls r1, 1
- adds r1, r6, r1
- ldrh r1, [r1]
- bl CopyEasyChatWord
- adds r2, r0, 0
- ldr r1, =gUnknown_082942FD
- bl StringCopy
- adds r2, r0, 0
- ldr r0, =gUnknown_0859EFF0
- lsls r4, 2
- adds r4, r0
- ldr r1, [r4]
- adds r0, r2, 0
- bl StringCopy
- adds r2, r0, 0
- ldr r1, =gUnknown_08294301
- bl StringCopy
- b _081204A2
- .pool
-_08120480:
- ldr r0, =gStringVar4
- ldr r3, =gUnknown_0859F010
- ldrb r2, [r5, 0x2]
- adds r1, r2, 0x1
- strb r1, [r5, 0x2]
- lsls r2, 24
- lsrs r2, 24
- movs r6, 0xB9
- lsls r6, 6
- adds r1, r4, r6
- adds r1, r2
- ldrb r1, [r1]
- lsls r1, 2
- adds r1, r3
- ldr r1, [r1]
- bl StringCopy
-_081204A2:
- bl Random
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0xA
- bl __umodsi3
- lsls r0, 16
- cmp r0, 0
- bne _081204C4
- movs r0, 0xA
- b _081204C8
- .pool
-_081204C4:
- ldrb r0, [r5, 0x1]
- adds r0, 0x1
-_081204C8:
- strb r0, [r5, 0x1]
- ldr r1, =gSpecialVar_Result
- movs r0, 0x1
- strh r0, [r1]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81203FC
-
- thumb_func_start sub_81204DC
-sub_81204DC: @ 81204DC
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x1C
- ldr r0, =gSaveBlock1Ptr
- ldr r4, [r0]
- ldr r0, =0x00002e28
- adds r0, r4, r0
- str r0, [sp, 0x18]
- ldr r1, =gUnknown_0859F030
- mov r0, sp
- movs r2, 0x18
- bl memcpy
- movs r5, 0
- movs r1, 0x2
- add r1, sp
- mov r8, r1
- movs r2, 0xB9
- lsls r2, 6
- adds r3, r4, r2
- adds r1, r3, 0
-_0812050C:
- adds r0, r3, r5
- strb r5, [r0]
- adds r0, r5, 0x1
- lsls r0, 16
- lsrs r5, r0, 16
- cmp r5, 0x7
- bls _0812050C
- movs r5, 0
- ldr r3, [sp, 0x18]
- adds r3, 0x4
- mov r9, r3
- adds r6, r1, 0
-_08120524:
- bl Random
- lsls r0, 16
- lsrs r0, 16
- adds r4, r5, 0x1
- adds r1, r4, 0
- bl __modsi3
- lsls r0, 16
- lsrs r1, r0, 16
- adds r2, r6, r5
- ldrb r7, [r2]
- adds r1, r6, r1
- ldrb r0, [r1]
- strb r0, [r2]
- strb r7, [r1]
- lsls r4, 16
- lsrs r5, r4, 16
- cmp r5, 0x7
- bls _08120524
- movs r0, 0
- mov r10, r0
- movs r5, 0
-_08120552:
- lsls r4, r5, 2
- mov r1, sp
- adds r0, r1, r4
- ldrb r0, [r0]
- bl start_menu_is_selected_item_valid
- add r4, r8
- strh r0, [r4]
- add r0, r10
- lsls r0, 16
- lsrs r0, 16
- mov r10, r0
- adds r0, r5, 0x1
- lsls r0, 16
- lsrs r5, r0, 16
- cmp r5, 0x5
- bls _08120552
- movs r0, 0
- ldr r2, [sp, 0x18]
- strb r0, [r2, 0x2]
- movs r7, 0
- movs r5, 0
-_0812057E:
- bl Random
- lsls r0, 16
- lsrs r0, 16
- movs r1, 0xA
- bl __umodsi3
- lsls r0, 16
- lsrs r1, r0, 16
- cmp r1, 0x2
- bhi _081205BC
- cmp r7, 0x7
- bhi _081205BC
- lsls r0, r5, 1
- add r0, r9
- ldr r1, =0x0000ffff
- strh r1, [r0]
- adds r0, r7, 0x1
- lsls r0, 16
- lsrs r7, r0, 16
- adds r4, r5, 0x1
- b _0812060E
- .pool
-_081205BC:
- bl Random
- lsls r0, 16
- lsrs r0, 16
- mov r1, r10
- bl __umodsi3
- lsls r0, 16
- lsrs r2, r0, 16
- movs r1, 0
- adds r4, r5, 0x1
- lsls r6, r5, 1
- cmp r5, 0x5
- bhi _081205F8
- mov r3, r8
- ldrh r0, [r3]
- b _081205EE
-_081205DE:
- adds r0, r1, 0x1
- lsls r0, 16
- lsrs r1, r0, 16
- cmp r5, 0x5
- bhi _081205F8
- lsls r0, r1, 2
- adds r0, r3, r0
- ldrh r0, [r0]
-_081205EE:
- subs r0, r2, r0
- lsls r0, 16
- lsrs r2, r0, 16
- cmp r0, 0
- bgt _081205DE
-_081205F8:
- cmp r1, 0x6
- bne _081205FE
- movs r1, 0
-_081205FE:
- lsls r0, r1, 2
- add r0, sp
- ldrh r0, [r0]
- bl sub_811EE90
- mov r2, r9
- adds r1, r2, r6
- strh r0, [r1]
-_0812060E:
- lsls r0, r4, 16
- lsrs r5, r0, 16
- cmp r5, 0x9
- bls _0812057E
- add sp, 0x1C
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_81204DC
-
- thumb_func_start sub_8120628
-sub_8120628: @ 8120628
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00002e51
- adds r0, r1
- movs r1, 0
- strb r1, [r0]
- bx lr
- .pool
- thumb_func_end sub_8120628
-
- thumb_func_start sub_8120640
-sub_8120640: @ 8120640
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00002e28
- adds r0, r1
- movs r1, 0
- strb r1, [r0, 0x1]
- bx lr
- .pool
- thumb_func_end sub_8120640
-
- thumb_func_start sub_8120658
-sub_8120658: @ 8120658
- push {lr}
- bl sub_8133A60
- pop {r0}
- bx r0
- thumb_func_end sub_8120658
-
- thumb_func_start sub_8120664
-sub_8120664: @ 8120664
- push {lr}
- bl sub_8120E50
- pop {r0}
- bx r0
- thumb_func_end sub_8120664
-
- thumb_func_start sub_8120670
-sub_8120670: @ 8120670
- push {lr}
- bl sub_81201C8
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x4
- bhi _081206B6
- lsls r0, 2
- ldr r1, =_0812068C
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .pool
- .align 2, 0
-_0812068C:
- .4byte _081206A0
- .4byte _081206A6
- .4byte _081206B2
- .4byte _081206AC
- .4byte _081206B6
-_081206A0:
- bl sub_8120628
- b _081206B6
-_081206A6:
- bl sub_8120640
- b _081206B6
-_081206AC:
- bl sub_8120664
- b _081206B6
-_081206B2:
- bl sub_8120658
-_081206B6:
- bl sub_8120B5C
- pop {r0}
- bx r0
- thumb_func_end sub_8120670
-
- thumb_func_start sub_81206C0
-sub_81206C0: @ 81206C0
- push {r4,lr}
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- ldr r0, =sub_8120944
- movs r1, 0x50
- bl CreateTask
- lsls r0, 24
- lsrs r0, 24
- ldr r2, =gTasks
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- adds r1, r2
- strh r4, [r1, 0x12]
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81206C0
-
- thumb_func_start sub_81206F0
-sub_81206F0: @ 81206F0
- ldr r1, =gUnknown_03002F84
- movs r0, 0
- strb r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_81206F0
-
- thumb_func_start sub_81206FC
-sub_81206FC: @ 81206FC
- ldr r1, =gUnknown_03002F84
- movs r0, 0x1
- strb r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_81206FC
-
- thumb_func_start sub_8120708
-sub_8120708: @ 8120708
- push {r4,r5,lr}
- sub sp, 0xC
- adds r5, r0, 0
- movs r0, 0
- movs r1, 0
- bl NewMenuHelpers_DrawDialogueFrame
- movs r4, 0x1
- str r4, [sp]
- str r4, [sp, 0x4]
- ldr r0, =sub_81206FC
- str r0, [sp, 0x8]
- movs r0, 0
- movs r1, 0x1
- adds r2, r5, 0
- movs r3, 0
- bl PrintTextOnWindow
- ldr r0, =gUnknown_03002F84
- strb r4, [r0]
- movs r0, 0
- movs r1, 0x3
- bl CopyWindowToVram
- add sp, 0xC
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120708
-
- thumb_func_start sub_8120748
-sub_8120748: @ 8120748
- push {r4-r6,lr}
- adds r6, r1, 0
- movs r1, 0x8
- ldrsh r0, [r0, r1]
- cmp r0, 0x5
- bls _08120756
- b _08120938
-_08120756:
- lsls r0, 2
- ldr r1, =_08120764
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .pool
- .align 2, 0
-_08120764:
- .4byte _0812077C
- .4byte _08120938
- .4byte _081207BC
- .4byte _081207F8
- .4byte _081207F8
- .4byte _08120938
-_0812077C:
- ldr r0, =gSaveBlock1Ptr
- ldr r2, [r0]
- ldr r0, =gSpecialVar_0x8004
- ldrh r0, [r0]
- ldr r3, =0x00002e36
- adds r1, r2, r3
- cmp r0, 0
- bne _08120790
- ldr r0, =0x00002e2a
- adds r1, r2, r0
-_08120790:
- adds r2, r1, 0
- adds r1, r6, 0
- adds r1, 0xC
- movs r3, 0x5
-_08120798:
- ldrh r0, [r2]
- strh r0, [r1]
- adds r2, 0x2
- adds r1, 0x2
- subs r3, 0x1
- cmp r3, 0
- bge _08120798
- movs r0, 0
- strb r0, [r6]
- b _08120938
- .pool
-_081207BC:
- ldrb r1, [r6]
- lsls r1, 1
- adds r0, r6, 0
- adds r0, 0xC
- adds r0, r1
- ldrh r4, [r0]
- adds r0, r4, 0
- bl GetWordSounds
- str r0, [r6, 0x30]
- movs r1, 0x3
- ands r1, r4
- lsrs r4, 3
- movs r0, 0x1
- ands r4, r0
- adds r1, r4
- adds r0, r6, 0
- bl GetWordPhonemes
- ldrb r0, [r6]
- adds r0, 0x1
- strb r0, [r6]
- ldr r0, [r6, 0x30]
- ldrb r0, [r0]
- cmp r0, 0xFF
- beq _081207F4
- movs r0, 0
- b _08120936
-_081207F4:
- movs r0, 0x3
- b _0812091A
-_081207F8:
- ldrb r3, [r6, 0x1]
- lsls r1, r3, 3
- ldr r0, [r6, 0x30]
- adds r2, r0, r1
- ldrb r1, [r6, 0x3]
- cmp r1, 0x1
- beq _081208A0
- cmp r1, 0x1
- bgt _08120810
- cmp r1, 0
- beq _0812081C
- b _08120938
-_08120810:
- cmp r1, 0x2
- beq _08120850
- cmp r1, 0x3
- bne _0812081A
- b _08120922
-_0812081A:
- b _08120938
-_0812081C:
- lsls r0, r3, 2
- adds r0, r6, r0
- ldrh r0, [r0, 0x18]
- strb r0, [r6, 0x2]
- ldrb r0, [r2]
- cmp r0, 0x32
- bhi _08120844
- movs r1, 0x3
- bl __udivsi3
- adds r1, r0, 0
- lsls r1, 24
- lsrs r1, 24
- lsls r0, r1, 1
- adds r0, r1
- movs r1, 0x8C
- lsls r1, 2
- adds r0, r1
- bl m4aSongNumStart
-_08120844:
- movs r0, 0x2
- strb r0, [r6, 0x3]
- ldrb r0, [r6, 0x2]
- subs r0, 0x1
- strb r0, [r6, 0x2]
- b _08120938
-_08120850:
- movs r0, 0x1
- strb r0, [r6, 0x3]
- ldrb r0, [r2]
- cmp r0, 0x32
- bhi _08120938
- movs r3, 0x4
- ldrsh r0, [r2, r3]
- lsls r0, 4
- movs r1, 0x80
- lsls r1, 1
- adds r0, r1
- strh r0, [r6, 0x6]
- ldr r4, =gMPlayInfo_SE2
- ldr r5, =0x0000ffff
- ldrh r2, [r6, 0x6]
- adds r0, r4, 0
- adds r1, r5, 0
- bl m4aMPlayVolumeControl
- ldrb r1, [r6, 0x1]
- lsls r1, 2
- adds r1, r6, r1
- movs r2, 0x80
- lsls r2, 2
- adds r0, r2, 0
- ldrh r1, [r1, 0x1A]
- adds r0, r1
- strh r0, [r6, 0x8]
- movs r3, 0x8
- ldrsh r2, [r6, r3]
- adds r0, r4, 0
- adds r1, r5, 0
- bl m4aMPlayPitchControl
- b _08120938
- .pool
-_081208A0:
- ldrh r2, [r6, 0xA]
- movs r3, 0xA
- ldrsh r0, [r6, r3]
- cmp r0, 0xA
- ble _081208B0
- ldrh r0, [r6, 0x6]
- subs r0, 0x2
- strh r0, [r6, 0x6]
-_081208B0:
- ands r1, r2
- cmp r1, 0
- beq _081208BC
- ldrh r0, [r6, 0x8]
- adds r0, 0x40
- b _081208C0
-_081208BC:
- ldrh r0, [r6, 0x8]
- subs r0, 0x40
-_081208C0:
- strh r0, [r6, 0x8]
- ldr r4, =gMPlayInfo_SE2
- ldr r5, =0x0000ffff
- ldrh r2, [r6, 0x6]
- adds r0, r4, 0
- adds r1, r5, 0
- bl m4aMPlayVolumeControl
- movs r0, 0x8
- ldrsh r2, [r6, r0]
- adds r0, r4, 0
- adds r1, r5, 0
- bl m4aMPlayPitchControl
- ldrh r0, [r6, 0xA]
- adds r0, 0x1
- strh r0, [r6, 0xA]
- ldrb r0, [r6, 0x2]
- subs r0, 0x1
- strb r0, [r6, 0x2]
- lsls r0, 24
- cmp r0, 0
- bne _08120938
- ldrb r0, [r6, 0x1]
- adds r0, 0x1
- strb r0, [r6, 0x1]
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x6
- beq _08120918
- ldrb r0, [r6, 0x1]
- ldr r1, [r6, 0x30]
- lsls r0, 3
- adds r0, r1
- ldrb r0, [r0]
- cmp r0, 0xFF
- beq _08120918
- movs r0, 0
- b _08120936
- .pool
-_08120918:
- movs r0, 0x3
-_0812091A:
- strb r0, [r6, 0x3]
- movs r0, 0x2
- strb r0, [r6, 0x2]
- b _08120938
-_08120922:
- ldrb r0, [r6, 0x2]
- subs r0, 0x1
- strb r0, [r6, 0x2]
- lsls r0, 24
- cmp r0, 0
- bne _08120938
- ldr r0, =gMPlayInfo_SE2
- bl m4aMPlayStop
- movs r0, 0x4
-_08120936:
- strb r0, [r6, 0x3]
-_08120938:
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120748
-
- thumb_func_start sub_8120944
-sub_8120944: @ 8120944
- push {r4-r7,lr}
- lsls r0, 24
- lsrs r6, r0, 24
- lsls r0, r6, 2
- adds r0, r6
- lsls r0, 3
- ldr r1, =gTasks
- adds r5, r0, r1
- ldr r1, =gUnknown_03006130
- adds r0, r5, 0
- bl sub_8120748
- movs r1, 0x8
- ldrsh r0, [r5, r1]
- cmp r0, 0x5
- bls _08120966
- b _08120B50
-_08120966:
- lsls r0, 2
- ldr r1, =_0812097C
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .pool
- .align 2, 0
-_0812097C:
- .4byte _08120994
- .4byte _081209B8
- .4byte _081209C8
- .4byte _08120A7E
- .4byte _08120B40
- .4byte _08120A6E
-_08120994:
- bl sub_8120280
- ldr r0, =gStringVar4
- bl sub_8120708
- movs r0, 0
- strh r0, [r5, 0xA]
- strh r0, [r5, 0xC]
- strh r0, [r5, 0xE]
- strh r0, [r5, 0x10]
- movs r0, 0x4
- bl FadeOutBGMTemporarily
- movs r0, 0x1
- b _08120B4E
- .pool
-_081209B8:
- bl IsBGMPausedOrStopped
- lsls r0, 24
- cmp r0, 0
- bne _081209C4
- b _08120B50
-_081209C4:
- movs r0, 0x2
- b _08120B4E
-_081209C8:
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r2, =0x00002e28
- adds r4, r0, r2
- movs r0, 0xE
- ldrsh r1, [r5, r0]
- ldr r0, =gStringVar4
- adds r1, r0
- movs r3, 0
- ldrb r0, [r1]
- ldr r7, =gUnknown_03006130
- ldrh r2, [r5, 0x12]
- ldr r6, =gUnknown_0203A128
- b _08120A02
- .pool
-_081209F8:
- adds r1, 0x1
- adds r0, r3, 0x1
- lsls r0, 16
- lsrs r3, r0, 16
- ldrb r0, [r1]
-_08120A02:
- cmp r0, 0
- beq _08120A12
- cmp r0, 0xFE
- beq _08120A12
- cmp r0, 0xFC
- beq _08120A12
- cmp r0, 0xFF
- bne _081209F8
-_08120A12:
- cmp r2, 0
- bne _08120A20
- movs r2, 0x10
- ldrsh r1, [r5, r2]
- lsls r1, 1
- adds r0, r4, 0x2
- b _08120A2A
-_08120A20:
- movs r0, 0x10
- ldrsh r1, [r5, r0]
- lsls r1, 1
- adds r0, r4, 0
- adds r0, 0xE
-_08120A2A:
- adds r0, r1
- ldrh r0, [r0]
- movs r1, 0x3
- ands r1, r0
- lsrs r0, 3
- movs r2, 0x1
- ands r0, r2
- adds r1, r0
- strh r1, [r6]
- movs r1, 0x4
- ldrsh r0, [r7, r1]
- adds r1, r3, 0
- bl __divsi3
- movs r1, 0
- strh r0, [r7, 0x4]
- lsls r0, 16
- cmp r0, 0
- bgt _08120A54
- movs r0, 0x1
- strh r0, [r7, 0x4]
-_08120A54:
- ldrh r0, [r5, 0x10]
- adds r0, 0x1
- strh r0, [r5, 0x10]
- movs r2, 0xC
- ldrsh r0, [r5, r2]
- cmp r0, 0
- bne _08120A66
- movs r0, 0x3
- b _08120A68
-_08120A66:
- movs r0, 0x5
-_08120A68:
- strh r0, [r5, 0x8]
- strh r1, [r5, 0xA]
- b _08120B50
-_08120A6E:
- ldrh r1, [r5, 0xC]
- movs r2, 0xC
- ldrsh r0, [r5, r2]
- cmp r0, 0
- beq _08120B4C
- subs r0, r1, 0x1
- strh r0, [r5, 0xC]
- b _08120B50
-_08120A7E:
- ldr r1, =gStringVar4
- movs r2, 0xE
- ldrsh r0, [r5, r2]
- adds r0, r1
- ldrb r4, [r0]
- cmp r4, 0xFF
- bne _08120AB0
- movs r0, 0x6
- bl FadeInBGM
- ldr r0, =gMPlayInfo_SE2
- movs r1, 0x2
- bl m4aMPlayFadeOutTemporarily
- bl EnableBothScriptContexts
- adds r0, r6, 0
- bl DestroyTask
- b _08120B50
- .pool
-_08120AB0:
- cmp r4, 0
- bne _08120AC6
- bl sub_81206F0
- ldrh r0, [r5, 0xE]
- adds r0, 0x1
- strh r0, [r5, 0xE]
- movs r0, 0x2
- strh r0, [r5, 0x8]
- strh r4, [r5, 0xC]
- b _08120B50
-_08120AC6:
- cmp r4, 0xFE
- bne _08120ADA
- ldrh r0, [r5, 0xE]
- adds r0, 0x1
- movs r1, 0
- strh r0, [r5, 0xE]
- movs r0, 0x2
- strh r0, [r5, 0x8]
- strh r1, [r5, 0xC]
- b _08120B50
-_08120ADA:
- cmp r4, 0xFC
- bne _08120AEE
- ldrh r0, [r5, 0xE]
- adds r0, 0x2
- strh r0, [r5, 0xE]
- movs r0, 0x2
- strh r0, [r5, 0x8]
- movs r0, 0x8
- strh r0, [r5, 0xC]
- b _08120B50
-_08120AEE:
- cmp r4, 0x37
- bne _08120B04
- movs r4, 0
- strb r4, [r0]
- bl sub_81206F0
- ldrh r0, [r5, 0xE]
- adds r0, 0x1
- strh r0, [r5, 0xE]
- strh r4, [r5, 0xC]
- b _08120B50
-_08120B04:
- movs r1, 0xA
- ldrsh r0, [r5, r1]
- cmp r0, 0x1
- beq _08120B20
- cmp r0, 0x1
- bgt _08120B16
- cmp r0, 0
- beq _08120B1C
- b _08120B50
-_08120B16:
- cmp r0, 0x2
- beq _08120B28
- b _08120B50
-_08120B1C:
- bl sub_81206F0
-_08120B20:
- ldrh r0, [r5, 0xA]
- adds r0, 0x1
- strh r0, [r5, 0xA]
- b _08120B50
-_08120B28:
- ldrh r0, [r5, 0xE]
- adds r0, 0x1
- movs r1, 0
- strh r0, [r5, 0xE]
- strh r1, [r5, 0xA]
- ldr r0, =gUnknown_03006130
- ldrh r0, [r0, 0x4]
- strh r0, [r5, 0xC]
- movs r0, 0x4
- b _08120B4E
- .pool
-_08120B40:
- ldrh r0, [r5, 0xC]
- subs r0, 0x1
- strh r0, [r5, 0xC]
- lsls r0, 16
- cmp r0, 0
- bne _08120B50
-_08120B4C:
- movs r0, 0x3
-_08120B4E:
- strh r0, [r5, 0x8]
-_08120B50:
- bl sub_8197224
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_8120944
-
- thumb_func_start sub_8120B5C
-sub_8120B5C: @ 8120B5C
- push {lr}
- ldr r0, =0x00004010
- movs r1, 0x45
- bl VarSet
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120B5C
-
- thumb_func_start sub_8120B70
-sub_8120B70: @ 8120B70
- push {r4-r7,lr}
- sub sp, 0x8
- ldrb r1, [r0]
- cmp r1, 0x2
- beq _08120B80
- cmp r1, 0x3
- beq _08120BA6
- b _08120C00
-_08120B80:
- adds r5, r0, 0
- movs r4, 0
-_08120B84:
- adds r0, r5, 0
- adds r0, 0x32
- adds r0, r4
- ldrb r0, [r0]
- cmp r0, 0x1
- bne _08120B9E
- movs r0, 0xB
- muls r0, r4
- adds r0, 0x5
- adds r0, r5, r0
- movs r1, 0x1
- bl ConvertInternationalString
-_08120B9E:
- adds r4, 0x1
- cmp r4, 0x3
- ble _08120B84
- b _08120C00
-_08120BA6:
- adds r6, r0, 0
- movs r4, 0
- mov r7, sp
- adds r5, r6, 0
- adds r5, 0x8
-_08120BB0:
- adds r0, r6, 0x4
- adds r0, r4
- ldrb r0, [r0]
- cmp r0, 0
- beq _08120BF8
- mov r0, sp
- adds r1, r5, 0
- movs r2, 0x7
- bl memcpy
- movs r0, 0xFF
- strb r0, [r7, 0x7]
- mov r0, sp
- bl IsStringJapanese
- cmp r0, 0
- beq _08120BF8
- mov r0, sp
- movs r1, 0
- movs r2, 0x8
- bl memset
- mov r0, sp
- ldr r1, =gText_Friend
- bl StringCopy
- adds r0, r5, 0
- mov r1, sp
- movs r2, 0x7
- bl memcpy
- adds r0, r6, 0
- adds r0, 0x34
- adds r0, r4
- movs r1, 0x2
- strb r1, [r0]
-_08120BF8:
- adds r5, 0x7
- adds r4, 0x1
- cmp r4, 0x3
- ble _08120BB0
-_08120C00:
- add sp, 0x8
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120B70
-
- thumb_func_start sub_8120C0C
-sub_8120C0C: @ 8120C0C
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- adds r5, r0, 0
- mov r8, r1
- adds r7, r2, 0
- ldrb r0, [r5]
- cmp r0, 0x4
- bhi _08120CC4
- lsls r0, 2
- ldr r1, =_08120C2C
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .pool
- .align 2, 0
-_08120C2C:
- .4byte _08120C92
- .4byte _08120CA2
- .4byte _08120C40
- .4byte _08120C6A
- .4byte _08120CB0
-_08120C40:
- adds r6, r5, 0
- movs r5, 0
- adds r4, r6, 0
- adds r4, 0x32
-_08120C48:
- movs r0, 0xB
- muls r0, r5
- adds r0, 0x5
- adds r0, r6, r0
- bl IsStringJapanese
- cmp r0, 0
- beq _08120C5E
- mov r0, r8
- strb r0, [r4]
- b _08120C60
-_08120C5E:
- strb r7, [r4]
-_08120C60:
- adds r4, 0x1
- adds r5, 0x1
- cmp r5, 0x3
- ble _08120C48
- b _08120CC4
-_08120C6A:
- adds r4, r5, 0
- adds r4, 0x34
- adds r6, r5, 0
- adds r6, 0x8
- movs r5, 0x3
-_08120C74:
- adds r0, r6, 0
- bl IsStringJapanese
- cmp r0, 0
- beq _08120C84
- mov r1, r8
- strb r1, [r4]
- b _08120C86
-_08120C84:
- strb r7, [r4]
-_08120C86:
- adds r4, 0x1
- adds r6, 0x7
- subs r5, 0x1
- cmp r5, 0
- bge _08120C74
- b _08120CC4
-_08120C92:
- cmp r3, 0x1
- bne _08120C9C
- adds r0, r5, 0
- adds r0, 0x2A
- b _08120CB8
-_08120C9C:
- adds r0, r5, 0
- adds r0, 0x2A
- b _08120CC2
-_08120CA2:
- cmp r3, 0x1
- bne _08120CAC
- mov r0, r8
- strb r0, [r5, 0x2]
- b _08120CC4
-_08120CAC:
- strb r7, [r5, 0x2]
- b _08120CC4
-_08120CB0:
- cmp r3, 0x1
- bne _08120CBE
- adds r0, r5, 0
- adds r0, 0x20
-_08120CB8:
- mov r1, r8
- strb r1, [r0]
- b _08120CC4
-_08120CBE:
- adds r0, r5, 0
- adds r0, 0x20
-_08120CC2:
- strb r7, [r0]
-_08120CC4:
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_8120C0C
-
- thumb_func_start sub_8120CD0
-sub_8120CD0: @ 8120CD0
- push {r4-r7,lr}
- mov r7, r8
- push {r7}
- sub sp, 0x8
- adds r1, r0, 0
- ldrb r0, [r1]
- cmp r0, 0x3
- bne _08120D28
- cmp r2, 0x1
- bne _08120D28
- adds r7, r1, 0
- movs r6, 0
- mov r8, sp
- adds r4, r7, 0
- adds r4, 0x34
- adds r5, r7, 0
- adds r5, 0x8
-_08120CF2:
- adds r0, r7, 0x4
- adds r0, r6
- ldrb r0, [r0]
- cmp r0, 0
- beq _08120D1E
- mov r0, sp
- adds r1, r5, 0
- movs r2, 0x7
- bl memcpy
- movs r0, 0xFF
- mov r1, r8
- strb r0, [r1, 0x7]
- mov r0, sp
- bl IsStringJapanese
- cmp r0, 0
- beq _08120D1A
- movs r0, 0x1
- b _08120D1C
-_08120D1A:
- movs r0, 0x2
-_08120D1C:
- strb r0, [r4]
-_08120D1E:
- adds r4, 0x1
- adds r5, 0x7
- adds r6, 0x1
- cmp r6, 0x3
- ble _08120CF2
-_08120D28:
- add sp, 0x8
- pop {r3}
- mov r8, r3
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_8120CD0
-
- thumb_func_start sub_8120D34
-sub_8120D34: @ 8120D34
- push {r4-r7,lr}
- adds r3, r0, 0
- adds r6, r2, 0
- movs r2, 0
- subs r1, 0x1
- cmp r1, 0x1
- bhi _08120D44
- movs r2, 0x1
-_08120D44:
- ldrb r0, [r3]
- cmp r0, 0x4
- bhi _08120E02
- lsls r0, 2
- ldr r1, =_08120D58
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .pool
- .align 2, 0
-_08120D58:
- .4byte _08120DE6
- .4byte _08120DF0
- .4byte _08120D6C
- .4byte _08120DC6
- .4byte _08120DF8
-_08120D6C:
- adds r7, r3, 0
- cmp r2, 0
- beq _08120DA4
- movs r5, 0
- adds r4, r3, 0
- adds r4, 0x32
-_08120D78:
- movs r0, 0xB
- muls r0, r5
- adds r0, 0x5
- adds r1, r7, r0
- ldrb r0, [r1]
- cmp r0, 0xFC
- bne _08120D98
- ldrb r0, [r1, 0x1]
- cmp r0, 0x15
- bne _08120D98
- adds r0, r1, 0
- bl StripExtCtrlCodes
- movs r0, 0x1
- strb r0, [r4]
- b _08120D9A
-_08120D98:
- strb r6, [r4]
-_08120D9A:
- adds r4, 0x1
- adds r5, 0x1
- cmp r5, 0x3
- ble _08120D78
- b _08120E02
-_08120DA4:
- movs r5, 0
- adds r4, r3, 0
- adds r4, 0x32
-_08120DAA:
- adds r0, r4, r5
- ldrb r0, [r0]
- cmp r0, 0x1
- bne _08120DBE
- movs r0, 0xB
- muls r0, r5
- adds r0, 0x5
- adds r0, r7, r0
- bl StripExtCtrlCodes
-_08120DBE:
- adds r5, 0x1
- cmp r5, 0x3
- ble _08120DAA
- b _08120E02
-_08120DC6:
- cmp r2, 0
- beq _08120E02
- movs r1, 0
- adds r4, r3, 0x4
- adds r2, r3, 0
- adds r2, 0x34
-_08120DD2:
- adds r0, r4, r1
- ldrb r0, [r0]
- cmp r0, 0
- beq _08120DDE
- adds r0, r2, r1
- strb r6, [r0]
-_08120DDE:
- adds r1, 0x1
- cmp r1, 0x3
- ble _08120DD2
- b _08120E02
-_08120DE6:
- cmp r2, 0
- beq _08120E02
- adds r0, r3, 0
- adds r0, 0x2A
- b _08120E00
-_08120DF0:
- cmp r2, 0
- beq _08120E02
- strb r6, [r3, 0x2]
- b _08120E02
-_08120DF8:
- cmp r2, 0
- beq _08120E02
- adds r0, r3, 0
- adds r0, 0x20
-_08120E00:
- strb r6, [r0]
-_08120E02:
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_8120D34
-
- thumb_func_start sub_8120E08
-sub_8120E08: @ 8120E08
- push {r4,r5,lr}
- ldr r2, =gUnknown_0203A12C
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00002e28
- adds r0, r1
- str r0, [r2]
- movs r3, 0
- movs r1, 0x3
- strb r1, [r0]
- ldr r0, [r2]
- strb r3, [r0, 0x1]
- movs r5, 0
- movs r4, 0xFF
-_08120E24:
- ldr r0, [r2]
- adds r0, 0x4
- adds r0, r3
- strb r5, [r0]
- ldr r1, [r2]
- adds r1, 0x8
- adds r1, r3
- ldrb r0, [r1]
- orrs r0, r4
- strb r0, [r1]
- adds r3, 0x1
- cmp r3, 0x3
- ble _08120E24
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120E08
-
- thumb_func_start sub_8120E50
-sub_8120E50: @ 8120E50
- ldr r3, =gUnknown_0203A12C
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00002e28
- adds r0, r1
- str r0, [r3]
- movs r2, 0
- movs r1, 0x3
- strb r1, [r0]
- ldr r0, [r3]
- strb r2, [r0, 0x1]
- bx lr
- .pool
- thumb_func_end sub_8120E50
-
- thumb_func_start sub_8120E74
-sub_8120E74: @ 8120E74
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x32
- bne _08120E80
- movs r0, 0
-_08120E80:
- bl GetGameStat
- pop {r1}
- bx r1
- thumb_func_end sub_8120E74
-
- thumb_func_start sub_8120E88
-sub_8120E88: @ 8120E88
- push {lr}
- adds r3, r0, 0
- movs r2, 0
- ldr r1, =gUnknown_0859F048
-_08120E90:
- ldrb r0, [r1]
- cmp r0, r3
- bne _08120EA0
- adds r0, r1, 0
- b _08120EAA
- .pool
-_08120EA0:
- adds r1, 0x10
- adds r2, 0x1
- cmp r2, 0x23
- ble _08120E90
- ldr r0, =gUnknown_0859F278
-_08120EAA:
- pop {r1}
- bx r1
- .pool
- thumb_func_end sub_8120E88
-
- thumb_func_start sub_8120EB4
-sub_8120EB4: @ 8120EB4
- push {lr}
- bl sub_8120E88
- ldr r0, [r0, 0x4]
- pop {r1}
- bx r1
- thumb_func_end sub_8120EB4
-
- thumb_func_start sub_8120EC0
-sub_8120EC0: @ 8120EC0
- push {lr}
- bl sub_8120E88
- ldr r0, [r0, 0xC]
- pop {r1}
- bx r1
- thumb_func_end sub_8120EC0
-
- thumb_func_start sub_8120ECC
-sub_8120ECC: @ 8120ECC
- push {lr}
- bl sub_8120E88
- ldr r0, [r0, 0x8]
- pop {r1}
- bx r1
- thumb_func_end sub_8120ECC
-
- thumb_func_start sub_8120ED8
-sub_8120ED8: @ 8120ED8
- push {lr}
- movs r1, 0
- ldr r2, =gUnknown_0203A12C
- ldr r0, [r2]
- ldrb r0, [r0, 0x4]
- cmp r0, 0
- beq _08120EFC
-_08120EE6:
- adds r0, r1, 0x1
- lsls r0, 24
- lsrs r1, r0, 24
- cmp r1, 0x3
- bhi _08120EFC
- ldr r0, [r2]
- adds r0, 0x4
- adds r0, r1
- ldrb r0, [r0]
- cmp r0, 0
- bne _08120EE6
-_08120EFC:
- adds r0, r1, 0
- pop {r1}
- bx r1
- .pool
- thumb_func_end sub_8120ED8
-
- thumb_func_start sub_8120F08
-sub_8120F08: @ 8120F08
- ldr r1, =gUnknown_0203A12C
- lsls r0, 2
- adds r0, 0x24
- ldr r2, [r1]
- adds r2, r0
- ldrb r0, [r2]
- ldrb r1, [r2, 0x1]
- lsls r1, 8
- orrs r0, r1
- ldrb r1, [r2, 0x2]
- lsls r1, 16
- orrs r0, r1
- ldrb r1, [r2, 0x3]
- lsls r1, 24
- orrs r0, r1
- bx lr
- .pool
- thumb_func_end sub_8120F08
-
- thumb_func_start sub_8120F2C
-sub_8120F2C: @ 8120F2C
- ldr r2, =gUnknown_0203A12C
- lsls r0, 2
- adds r0, 0x24
- ldr r2, [r2]
- adds r2, r0
- strb r1, [r2]
- lsrs r0, r1, 8
- strb r0, [r2, 0x1]
- lsrs r0, r1, 16
- strb r0, [r2, 0x2]
- lsrs r1, 24
- strb r1, [r2, 0x3]
- bx lr
- .pool
- thumb_func_end sub_8120F2C
-
- thumb_func_start sub_8120F4C
-sub_8120F4C: @ 8120F4C
- push {r4,r5,lr}
- adds r5, r0, 0
- ldr r0, =gUnknown_0203A12C
- ldr r0, [r0]
- adds r0, 0x4
- adds r0, r5
- ldrb r0, [r0]
- bl sub_8120E74
- adds r4, r0, 0
- adds r0, r5, 0
- bl sub_8120F08
- cmp r4, r0
- bhi _08120F74
- movs r0, 0
- b _08120F76
- .pool
-_08120F74:
- movs r0, 0x1
-_08120F76:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end sub_8120F4C
-
- thumb_func_start sub_8120F7C
-sub_8120F7C: @ 8120F7C
- push {r4,r5,lr}
- adds r5, r1, 0
- ldr r2, =gUnknown_0203A12C
- lsls r1, r0, 3
- subs r1, r0
- adds r1, 0x8
- ldr r4, [r2]
- adds r4, r1
- adds r0, r5, 0
- movs r1, 0xFF
- movs r2, 0x8
- bl memset
- adds r0, r5, 0
- adds r1, r4, 0
- movs r2, 0x7
- bl memcpy
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120F7C
-
- thumb_func_start sub_8120FAC
-sub_8120FAC: @ 8120FAC
- push {r4,r5,lr}
- adds r5, r1, 0
- ldr r2, =gUnknown_0203A12C
- lsls r1, r0, 3
- subs r1, r0
- adds r1, 0x8
- ldr r4, [r2]
- adds r4, r1
- adds r0, r4, 0
- movs r1, 0xFF
- movs r2, 0x7
- bl memset
- adds r0, r4, 0
- adds r1, r5, 0
- movs r2, 0x7
- bl memcpy
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120FAC
-
- thumb_func_start sub_8120FDC
-sub_8120FDC: @ 8120FDC
- push {r4-r6,lr}
- mov r6, r9
- mov r5, r8
- push {r5,r6}
- mov r8, r0
- adds r6, r1, 0
- ldr r0, =gUnknown_0203A12C
- mov r9, r0
- ldr r0, [r0]
- adds r0, 0x4
- add r0, r8
- strb r6, [r0]
- ldr r0, =gSaveBlock2Ptr
- ldr r1, [r0]
- mov r0, r8
- bl sub_8120FAC
- lsls r4, r6, 24
- lsrs r4, 24
- adds r0, r4, 0
- bl sub_8120E74
- adds r1, r0, 0
- mov r0, r8
- bl sub_8120F2C
- ldr r5, =gStringVar1
- adds r0, r4, 0
- bl sub_8120E74
- adds r1, r0, 0
- adds r0, r5, 0
- movs r2, 0
- movs r3, 0xA
- bl ConvertIntToDecimalStringN
- ldr r4, =gStringVar2
- adds r0, r6, 0
- bl sub_8120ECC
- adds r1, r0, 0
- adds r0, r4, 0
- bl StringCopy
- mov r1, r9
- ldr r0, [r1]
- adds r0, 0x34
- add r0, r8
- ldr r1, =gGameLanguage
- ldrb r1, [r1]
- strb r1, [r0]
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8120FDC
-
- thumb_func_start sub_8121064
-sub_8121064: @ 8121064
- push {r4-r7,lr}
- adds r7, r0, 0
- adds r6, r1, 0
- movs r5, 0
- cmp r5, r6
- bge _0812107A
-_08121070:
- adds r0, r7, r5
- strb r5, [r0]
- adds r5, 0x1
- cmp r5, r6
- blt _08121070
-_0812107A:
- cmp r6, 0
- ble _081210B0
- adds r5, r6, 0
-_08121080:
- bl Random
- lsls r0, 16
- lsrs r0, 16
- adds r1, r6, 0
- bl __modsi3
- adds r4, r0, 0
- bl Random
- lsls r0, 16
- lsrs r0, 16
- adds r1, r6, 0
- bl __modsi3
- adds r4, r7, r4
- ldrb r2, [r4]
- adds r0, r7, r0
- ldrb r1, [r0]
- strb r1, [r4]
- strb r2, [r0]
- subs r5, 0x1
- cmp r5, 0
- bne _08121080
-_081210B0:
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end sub_8121064
-
- thumb_func_start sub_81210B8
-sub_81210B8: @ 81210B8
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- mov r7, sp
- mov r8, sp
- ldr r0, =gUnknown_0859F288
- ldr r0, [r0]
- lsls r0, 3
- lsrs r0, 3
- adds r0, 0x3
- lsrs r0, 2
- lsls r0, 2
- mov r1, sp
- subs r1, r0
- mov sp, r1
- mov r9, sp
- mov r0, sp
- movs r1, 0x24
- bl sub_8121064
- movs r5, 0
-_081210E4:
- ldr r1, =gUnknown_0859F048
- mov r2, r9
- adds r0, r2, r5
- ldrb r0, [r0]
- lsls r0, 4
- adds r0, r1
- ldrb r4, [r0]
- ldrb r6, [r0, 0x1]
- movs r1, 0
- ldr r2, =gUnknown_0203A12C
- ldr r0, [r2]
- ldrb r0, [r0, 0x4]
- cmp r0, r4
- beq _08121112
-_08121100:
- adds r1, 0x1
- cmp r1, 0x3
- bgt _08121112
- ldr r0, [r2]
- adds r0, 0x4
- adds r0, r1
- ldrb r0, [r0]
- cmp r0, r4
- bne _08121100
-_08121112:
- cmp r1, 0x4
- bne _08121162
- adds r0, r4, 0
- bl sub_8120E74
- cmp r0, r6
- bcc _08121162
- ldr r0, =gUnknown_0203A12C
- ldr r1, [r0]
- movs r0, 0x1
- strb r0, [r1, 0x1]
- bl sub_8120ED8
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x4
- bne _08121150
- ldr r0, =gUnknown_03001178
- ldrb r0, [r0]
- adds r1, r4, 0
- bl sub_8120FDC
- b _0812115E
- .pool
-_08121150:
- bl sub_8120ED8
- lsls r0, 24
- lsrs r0, 24
- adds r1, r4, 0
- bl sub_8120FDC
-_0812115E:
- movs r0, 0x1
- b _0812116A
-_08121162:
- adds r5, 0x1
- cmp r5, 0x23
- ble _081210E4
- movs r0, 0
-_0812116A:
- mov sp, r8
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r1}
- bx r1
- thumb_func_end sub_81210B8
-
- thumb_func_start sub_8121178
-sub_8121178: @ 8121178
- push {r4-r6,lr}
- mov r6, r8
- push {r6}
- adds r5, r0, 0
- ldr r6, =gUnknown_0203A12C
- ldr r0, [r6]
- adds r0, 0x4
- adds r0, r5
- ldrb r0, [r0]
- mov r8, r0
- ldr r4, =gStringVar1
- adds r0, r5, 0
- bl sub_8120F08
- adds r1, r0, 0
- adds r0, r4, 0
- movs r2, 0
- movs r3, 0xA
- bl ConvertIntToDecimalStringN
- ldr r4, =gStringVar2
- mov r0, r8
- bl sub_8120ECC
- adds r1, r0, 0
- adds r0, r4, 0
- bl StringCopy
- ldr r4, =gStringVar3
- adds r0, r5, 0
- adds r1, r4, 0
- bl sub_8120F7C
- ldr r0, [r6]
- adds r0, 0x34
- adds r0, r5
- ldrb r1, [r0]
- adds r0, r4, 0
- bl ConvertInternationalString
- mov r0, r8
- bl sub_8120EC0
- bl ShowFieldMessage
- pop {r3}
- mov r8, r3
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8121178
-
- thumb_func_start sub_81211EC
-sub_81211EC: @ 81211EC
- push {r4,r5,lr}
- sub sp, 0xC
- ldr r1, =gText_Exit
- movs r0, 0x1
- movs r2, 0
- bl GetStringWidth
- adds r5, r0, 0
- movs r4, 0
- ldr r0, =gUnknown_0203A12C
- ldr r0, [r0]
- ldrb r0, [r0, 0x4]
- cmp r0, 0
- beq _08121230
-_08121208:
- bl sub_8120EB4
- adds r1, r0, 0
- movs r0, 0x1
- movs r2, 0
- bl GetStringWidth
- cmp r0, r5
- ble _0812121C
- adds r5, r0, 0
-_0812121C:
- adds r4, 0x1
- cmp r4, 0x3
- bgt _08121230
- ldr r0, =gUnknown_0203A12C
- ldr r0, [r0]
- adds r0, 0x4
- adds r0, r4
- ldrb r0, [r0]
- cmp r0, 0
- bne _08121208
-_08121230:
- adds r0, r5, 0
- bl convert_pixel_width_to_tile_width
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- bl sub_8120ED8
- adds r3, r0, 0
- lsls r3, 25
- movs r0, 0x80
- lsls r0, 18
- adds r3, r0
- lsrs r3, 24
- movs r0, 0
- movs r1, 0
- adds r2, r4, 0
- bl CreateWindowFromRect
- ldr r1, =gUnknown_0203A130
- strb r0, [r1]
- ldrb r0, [r1]
- movs r1, 0
- bl SetStandardWindowBorderStyle
- movs r4, 0
- ldr r0, =gUnknown_0203A12C
- ldr r0, [r0]
- ldrb r0, [r0, 0x4]
- cmp r0, 0
- beq _081212AA
- movs r5, 0x80
- lsls r5, 17
-_08121272:
- bl sub_8120EB4
- adds r2, r0, 0
- ldr r0, =gUnknown_0203A130
- ldrb r0, [r0]
- lsrs r1, r5, 24
- str r1, [sp]
- movs r1, 0xFF
- str r1, [sp, 0x4]
- movs r1, 0
- str r1, [sp, 0x8]
- movs r1, 0x1
- movs r3, 0x8
- bl PrintTextOnWindow
- movs r0, 0x80
- lsls r0, 21
- adds r5, r0
- adds r4, 0x1
- cmp r4, 0x3
- bgt _081212AA
- ldr r0, =gUnknown_0203A12C
- ldr r0, [r0]
- adds r0, 0x4
- adds r0, r4
- ldrb r0, [r0]
- cmp r0, 0
- bne _08121272
-_081212AA:
- ldr r5, =gUnknown_0203A130
- ldrb r0, [r5]
- ldr r2, =gText_Exit
- lsls r1, r4, 4
- adds r1, 0x1
- lsls r1, 24
- lsrs r1, 24
- str r1, [sp]
- movs r1, 0xFF
- str r1, [sp, 0x4]
- movs r1, 0
- str r1, [sp, 0x8]
- movs r1, 0x1
- movs r3, 0x8
- bl PrintTextOnWindow
- ldrb r4, [r5]
- bl sub_8120ED8
- adds r1, r0, 0
- adds r1, 0x1
- lsls r1, 24
- lsrs r1, 24
- adds r0, r4, 0
- movs r2, 0
- bl InitMenuInUpperLeftCornerPlaySoundWhenAPressed
- ldrb r0, [r5]
- movs r1, 0x3
- bl CopyWindowToVram
- add sp, 0xC
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81211EC
-
- thumb_func_start sub_81212FC
-sub_81212FC: @ 81212FC
- push {r4-r6,lr}
- lsls r0, 24
- lsrs r6, r0, 24
- lsls r0, r6, 2
- adds r0, r6
- lsls r0, 3
- ldr r1, =gTasks
- adds r4, r0, r1
- movs r0, 0x8
- ldrsh r5, [r4, r0]
- cmp r5, 0
- beq _08121320
- cmp r5, 0x1
- beq _0812132C
- b _08121376
- .pool
-_08121320:
- bl sub_81211EC
- ldrh r0, [r4, 0x8]
- adds r0, 0x1
- strh r0, [r4, 0x8]
- b _08121376
-_0812132C:
- bl ProcessMenuInput
- lsls r0, 24
- asrs r4, r0, 24
- movs r0, 0x2
- negs r0, r0
- cmp r4, r0
- beq _08121376
- adds r0, 0x1
- cmp r4, r0
- beq _0812134E
- bl sub_8120ED8
- lsls r0, 24
- lsrs r0, 24
- cmp r4, r0
- bne _0812135C
-_0812134E:
- ldr r1, =gSpecialVar_Result
- movs r0, 0
- strh r0, [r1]
- b _08121364
- .pool
-_0812135C:
- ldr r0, =gSpecialVar_Result
- strh r5, [r0]
- ldr r0, =gUnknown_03001178
- strb r4, [r0]
-_08121364:
- ldr r0, =gUnknown_0203A130
- ldrb r0, [r0]
- bl sub_80E2A78
- adds r0, r6, 0
- bl DestroyTask
- bl EnableBothScriptContexts
-_08121376:
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81212FC
-
- thumb_func_start sub_8121388
-sub_8121388: @ 8121388
- push {lr}
- ldr r0, =sub_81212FC
- movs r1, 0x50
- bl CreateTask
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8121388
-
- thumb_func_start sub_812139C
-sub_812139C: @ 812139C
- push {lr}
- ldr r0, =gUnknown_03001178
- ldrb r0, [r0]
- bl sub_8121178
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_812139C
-
- thumb_func_start sub_81213B0
-sub_81213B0: @ 81213B0
- push {lr}
- ldr r1, =gUnknown_0203A12C
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r2, =0x00002e28
- adds r0, r2
- str r0, [r1]
- bl sub_8120ED8
- lsls r0, 24
- lsrs r0, 24
- pop {r1}
- bx r1
- .pool
- thumb_func_end sub_81213B0
-
- thumb_func_start sub_81213D8
-sub_81213D8: @ 81213D8
- push {r4,r5,lr}
- ldr r2, =gUnknown_0203A12C
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- ldr r3, =0x00002e28
- adds r0, r1, r3
- str r0, [r2]
- ldr r5, =gUnknown_03001178
- ldrb r0, [r5]
- ldr r2, =0x00002e2c
- adds r1, r2
- adds r1, r0
- ldrb r4, [r1]
- bl sub_8120F4C
- cmp r0, 0x1
- beq _08121414
- movs r0, 0
- b _0812141E
- .pool
-_08121414:
- ldrb r0, [r5]
- adds r1, r4, 0
- bl sub_8120FDC
- movs r0, 0x1
-_0812141E:
- pop {r4,r5}
- pop {r1}
- bx r1
- thumb_func_end sub_81213D8
-
- thumb_func_start sub_8121424
-sub_8121424: @ 8121424
- push {lr}
- ldr r1, =gUnknown_0203A12C
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r2, =0x00002e28
- adds r0, r2
- str r0, [r1]
- ldrb r0, [r0, 0x1]
- cmp r0, 0
- beq _08121448
- movs r0, 0x1
- b _0812144A
- .pool
-_08121448:
- movs r0, 0
-_0812144A:
- pop {r1}
- bx r1
- thumb_func_end sub_8121424
-
- thumb_func_start sub_8121450
-sub_8121450: @ 8121450
- push {lr}
- ldr r1, =gUnknown_0203A12C
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r2, =0x00002e28
- adds r0, r2
- str r0, [r1]
- bl sub_81210B8
- lsls r0, 24
- lsrs r0, 24
- pop {r1}
- bx r1
- .pool
- thumb_func_end sub_8121450
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/party_menu.s b/asm/party_menu.s
index 29e2e67a6..185d26109 100644
--- a/asm/party_menu.s
+++ b/asm/party_menu.s
@@ -15368,7 +15368,7 @@ sub_81B83F0: @ 81B83F0
lsls r0, r1, 24
lsrs r0, 24
movs r1, 0x1
- bl sub_80D6E48
+ bl RemovePCItem
b _081B8418
.pool
_081B8410:
diff --git a/asm/pokemon_storage_system.s b/asm/pokemon_storage_system.s
index 21647dfdf..111093bee 100644
--- a/asm/pokemon_storage_system.s
+++ b/asm/pokemon_storage_system.s
@@ -14810,7 +14810,7 @@ _080CF020:
beq _080CF0AC
ldr r3, =0x00000d65
adds r4, r3
- bl ItemId_GetItem
+ bl ItemId_GetName
adds r1, r0, 0
adds r0, r4, 0
movs r2, 0
@@ -19057,7 +19057,7 @@ sub_80D12B8: @ 80D12B8
ldr r1, =0x00002234
adds r0, r1
ldrh r0, [r0]
- bl ItemId_GetItem
+ bl ItemId_GetName
pop {r1}
bx r1
.pool
diff --git a/asm/pokemon_summary_screen.s b/asm/pokemon_summary_screen.s
index 3b41afb55..c7f2ad085 100644
--- a/asm/pokemon_summary_screen.s
+++ b/asm/pokemon_summary_screen.s
@@ -4686,7 +4686,7 @@ sub_81C6648: @ 81C6648
.pool
_081C667C:
ldrh r0, [r5]
- bl itemid_is_unique
+ bl ItemId_GetImportance
lsls r0, 24
cmp r0, 0
bne _081C66A0
@@ -4799,7 +4799,7 @@ sub_81C674C: @ 81C674C
.pool
_081C677C:
ldrh r0, [r5]
- bl itemid_is_unique
+ bl ItemId_GetImportance
lsls r0, 24
cmp r0, 0
bne _081C6790
diff --git a/asm/pokenav.s b/asm/pokenav.s
index 47f350b29..9c42ed730 100644
--- a/asm/pokenav.s
+++ b/asm/pokenav.s
@@ -28718,8 +28718,8 @@ nullsub_2: @ 81D5C88
bx lr
thumb_func_end nullsub_2
- thumb_func_start sub_81D5C8C
-sub_81D5C8C: @ 81D5C8C
+ thumb_func_start PrintOnTrainerHillRecordsWindow
+PrintOnTrainerHillRecordsWindow: @ 81D5C8C
push {r4-r7,lr}
mov r7, r10
mov r6, r9
@@ -28857,7 +28857,7 @@ _081D5CD6:
pop {r0}
bx r0
.pool
- thumb_func_end sub_81D5C8C
+ thumb_func_end PrintOnTrainerHillRecordsWindow
thumb_func_start free_203F458
free_203F458: @ 81D5DF0
diff --git a/asm/record_mixing.s b/asm/record_mixing.s
index 2dab009a5..acfcf48ed 100644
--- a/asm/record_mixing.s
+++ b/asm/record_mixing.s
@@ -1438,7 +1438,7 @@ _080E791A:
add r1, r9
movs r2, 0x40
bl memcpy
- bl sub_8120670
+ bl ResetMauvilleOldManFlag
add sp, 0x10
pop {r3,r4}
mov r8, r3
diff --git a/asm/rom_8011DC0.s b/asm/rom_8011DC0.s
index 3a7f41d0b..2ba5926aa 100644
--- a/asm/rom_8011DC0.s
+++ b/asm/rom_8011DC0.s
@@ -3181,7 +3181,7 @@ _08014138:
adds r3, r1, r0
movs r0, 0x64
muls r0, r4
- ldr r1, =gUnknown_02039B58
+ ldr r1, =gTrainerCards
adds r0, r1
ldrb r2, [r5]
adds r1, r3, 0
@@ -3278,8 +3278,8 @@ sub_8014210: @ 8014210
lsls r6, 16
lsrs r6, 16
bl HealPlayerParty
- bl copy_player_party_to_sav1
- bl copy_bags_and_unk_data_from_save_blocks
+ bl SavePlayerParty
+ bl LoadPlayerBag
ldr r5, =gLinkPlayers
ldr r0, =0x00002211
str r0, [r5, 0x14]
@@ -3646,8 +3646,8 @@ _080145F4:
movs r1, 0x1
bl sub_80143E4
bl HealPlayerParty
- bl copy_player_party_to_sav1
- bl copy_bags_and_unk_data_from_save_blocks
+ bl SavePlayerParty
+ bl LoadPlayerBag
movs r0, 0x1
str r0, [sp]
movs r0, 0x19
@@ -3659,8 +3659,8 @@ _080145F4:
_08014620:
bl overworld_free_bg_tilemaps
bl HealPlayerParty
- bl copy_player_party_to_sav1
- bl copy_bags_and_unk_data_from_save_blocks
+ bl SavePlayerParty
+ bl LoadPlayerBag
ldr r0, =gBlockSendBuffer
movs r1, 0x1
bl sub_80143E4
@@ -3675,8 +3675,8 @@ _08014620:
_0801464C:
bl overworld_free_bg_tilemaps
bl HealPlayerParty
- bl copy_player_party_to_sav1
- bl copy_bags_and_unk_data_from_save_blocks
+ bl SavePlayerParty
+ bl LoadPlayerBag
ldr r0, =gBlockSendBuffer
movs r1, 0x1
bl sub_80143E4
@@ -10615,7 +10615,7 @@ sub_8018220: @ 8018220
lsrs r0, 24
movs r1, 0x64
muls r1, r0
- ldr r0, =gUnknown_02039B58
+ ldr r0, =gTrainerCards
adds r1, r0
mov r8, r1
bl UnkTextUtil_Reset
diff --git a/asm/shop.s b/asm/shop.s
index ae60eb364..eac0956cb 100644
--- a/asm/shop.s
+++ b/asm/shop.s
@@ -790,7 +790,7 @@ BuyMenuPrintPriceInList: @ 80E0114
ldr r5, =gStringVar1
lsls r0, r1, 16
lsrs r0, 16
- bl itemid_get_market_price
+ bl ItemId_GetPrice
adds r4, r0, 0
movs r0, 0x1
bl GetPriceReduction
@@ -2017,7 +2017,7 @@ _080E0B32:
bne _080E0B80
lsls r0, r5, 16
lsrs r0, 16
- bl itemid_get_market_price
+ bl ItemId_GetPrice
adds r4, r0, 0
movs r0, 0x1
bl GetPriceReduction
@@ -2259,7 +2259,7 @@ Task_BuyHowManyDialogueHandleInput: @ 80E0D88
cmp r0, 0x1
bne _080E0DF0
ldrh r0, [r5, 0xA]
- bl itemid_get_market_price
+ bl ItemId_GetPrice
adds r4, r0, 0
movs r0, 0x1
bl GetPriceReduction
diff --git a/asm/trader.s b/asm/trader.s
deleted file mode 100644
index a43f59402..000000000
--- a/asm/trader.s
+++ /dev/null
@@ -1,558 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start sub_81339F8
-sub_81339F8: @ 81339F8
- push {r4-r6,lr}
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- ldr r0, =0x00002e28
- adds r5, r1, r0
- movs r2, 0
- movs r0, 0x2
- strb r0, [r5]
- ldr r0, =0x00002e59
- adds r1, r0
- strb r2, [r1]
- movs r4, 0
- ldr r6, =gUnknown_085B09E4
-_08133A12:
- movs r0, 0xB
- muls r0, r4
- adds r0, 0x5
- adds r0, r5, r0
- lsls r1, r4, 2
- adds r1, r6
- ldr r1, [r1]
- bl StringCopy
- adds r1, r5, 0x1
- adds r1, r4
- ldr r0, =gUnknown_085B09F4
- adds r0, r4, r0
- ldrb r0, [r0]
- strb r0, [r1]
- adds r0, r5, 0
- adds r0, 0x32
- adds r0, r4
- movs r1, 0x2
- strb r1, [r0]
- adds r0, r4, 0x1
- lsls r0, 24
- lsrs r4, r0, 24
- cmp r4, 0x3
- bls _08133A12
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_81339F8
-
- thumb_func_start sub_8133A60
-sub_8133A60: @ 8133A60
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00002e59
- adds r0, r1
- movs r1, 0
- strb r1, [r0]
- bx lr
- .pool
- thumb_func_end sub_8133A60
-
- thumb_func_start sub_8133A78
-sub_8133A78: @ 8133A78
- push {r4-r7,lr}
- mov r7, r9
- mov r6, r8
- push {r6,r7}
- sub sp, 0x14
- lsls r0, 24
- lsrs r0, 24
- lsls r1, r0, 2
- adds r1, r0
- lsls r1, 3
- ldr r0, =gTasks + 0x8
- adds r7, r1, r0
- ldr r0, =gSaveBlock1Ptr
- ldr r4, [r0]
- ldr r0, =0x00002e28
- adds r0, r4
- mov r9, r0
- ldr r0, =gUnknown_085B09F8
- ldr r1, [r0, 0x4]
- ldr r0, [r0]
- str r0, [sp, 0xC]
- str r1, [sp, 0x10]
- ldr r1, =gText_Exit
- movs r0, 0x1
- movs r2, 0
- bl GetStringWidth
- adds r6, r0, 0
- ldr r1, =gText_FiveMarks
- movs r0, 0x1
- movs r2, 0
- bl GetStringWidth
- mov r8, r0
- movs r5, 0
- ldr r0, =0x00002e29
- adds r4, r0
-_08133AC2:
- mov r0, r9
- adds r0, 0x1
- adds r1, r0, r5
- ldrb r0, [r1]
- cmp r0, 0x78
- bls _08133AF0
- mov r0, r8
- b _08133B00
- .pool
-_08133AF0:
- ldrb r1, [r1]
- lsls r1, 5
- ldr r0, =gDecorations + 1
- adds r1, r0
- movs r0, 0x1
- movs r2, 0
- bl GetStringWidth
-_08133B00:
- cmp r0, r6
- ble _08133B06
- adds r6, r0, 0
-_08133B06:
- adds r0, r5, 0x1
- lsls r0, 24
- lsrs r5, r0, 24
- cmp r5, 0x3
- bls _08133AC2
- adds r0, r6, 0
- bl convert_pixel_width_to_tile_width
- lsls r0, 24
- ldr r2, =0x00ffffff
- ldr r1, [sp, 0xC]
- ands r1, r2
- orrs r1, r0
- str r1, [sp, 0xC]
- add r0, sp, 0xC
- bl AddWindow
- strh r0, [r7, 0x6]
- lsls r0, 24
- lsrs r0, 24
- movs r2, 0x85
- lsls r2, 2
- movs r1, 0
- movs r3, 0xE
- bl SetWindowBorderStyle
- movs r5, 0
-_08133B3C:
- adds r1, r4, r5
- ldrb r0, [r1]
- cmp r0, 0x78
- bls _08133B70
- ldrb r0, [r7, 0x6]
- lsls r1, r5, 4
- adds r1, 0x1
- lsls r1, 24
- lsrs r1, 24
- str r1, [sp]
- movs r1, 0xFF
- str r1, [sp, 0x4]
- movs r1, 0
- str r1, [sp, 0x8]
- movs r1, 0x1
- ldr r2, =gText_FiveMarks
- movs r3, 0x8
- bl PrintTextOnWindow
- b _08133B94
- .pool
-_08133B70:
- ldrb r0, [r7, 0x6]
- ldrb r2, [r1]
- lsls r2, 5
- ldr r1, =gDecorations + 1
- adds r2, r1
- lsls r1, r5, 4
- adds r1, 0x1
- lsls r1, 24
- lsrs r1, 24
- str r1, [sp]
- movs r1, 0xFF
- str r1, [sp, 0x4]
- movs r1, 0
- str r1, [sp, 0x8]
- movs r1, 0x1
- movs r3, 0x8
- bl PrintTextOnWindow
-_08133B94:
- adds r0, r5, 0x1
- lsls r0, 24
- lsrs r5, r0, 24
- cmp r5, 0x3
- bls _08133B3C
- ldrb r0, [r7, 0x6]
- ldr r2, =gText_Exit
- lsls r1, r5, 4
- adds r1, 0x1
- lsls r1, 24
- lsrs r1, 24
- str r1, [sp]
- movs r1, 0xFF
- str r1, [sp, 0x4]
- movs r1, 0
- str r1, [sp, 0x8]
- movs r1, 0x1
- movs r3, 0x8
- bl PrintTextOnWindow
- ldrb r0, [r7, 0x6]
- movs r1, 0x5
- movs r2, 0
- bl InitMenuInUpperLeftCornerPlaySoundWhenAPressed
- movs r0, 0
- bl schedule_bg_copy_tilemap_to_vram
- add sp, 0x14
- pop {r3,r4}
- mov r8, r3
- mov r9, r4
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8133A78
-
- thumb_func_start sub_8133BE4
-sub_8133BE4: @ 8133BE4
- push {r4,r5,lr}
- lsls r0, 24
- lsrs r5, r0, 24
- lsls r1, 24
- lsrs r2, r1, 24
- lsls r0, r5, 2
- adds r0, r5
- lsls r0, 3
- ldr r1, =gTasks + 0x8
- adds r4, r0, r1
- cmp r2, 0x78
- bls _08133C14
- ldr r1, =gSpecialVar_0x8004
- ldr r2, =0x0000ffff
- adds r0, r2, 0
- strh r0, [r1]
- b _08133C18
- .pool
-_08133C14:
- ldr r0, =gSpecialVar_0x8004
- strh r2, [r0]
-_08133C18:
- ldrb r0, [r4, 0x6]
- movs r1, 0
- bl sub_8198070
- ldrb r0, [r4, 0x6]
- bl ClearWindowTilemap
- ldrb r0, [r4, 0x6]
- bl RemoveWindow
- movs r0, 0
- bl schedule_bg_copy_tilemap_to_vram
- adds r0, r5, 0
- bl DestroyTask
- bl EnableBothScriptContexts
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8133BE4
-
- thumb_func_start sub_8133C48
-sub_8133C48: @ 8133C48
- push {r4-r7,lr}
- lsls r0, 24
- lsrs r7, r0, 24
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x00002e28
- adds r6, r0, r1
- bl ProcessMenuInput
- lsls r0, 24
- lsrs r4, r0, 24
- asrs r1, r0, 24
- movs r0, 0x1
- negs r0, r0
- cmp r1, r0
- beq _08133C80
- cmp r1, r0
- bgt _08133C7C
- subs r0, 0x1
- cmp r1, r0
- beq _08133CCA
- b _08133C90
- .pool
-_08133C7C:
- cmp r1, 0x4
- bne _08133C90
-_08133C80:
- movs r0, 0x5
- bl PlaySE
- adds r0, r7, 0
- movs r1, 0
- bl sub_8133BE4
- b _08133CCA
-_08133C90:
- movs r0, 0x5
- bl PlaySE
- ldr r0, =gSpecialVar_0x8005
- lsls r4, 24
- asrs r4, 24
- strh r4, [r0]
- ldr r5, =gStringVar1
- movs r0, 0xB
- adds r1, r4, 0
- muls r1, r0
- adds r1, 0x5
- adds r1, r6, r1
- adds r0, r5, 0
- bl StringCopy
- adds r0, r6, 0
- adds r0, 0x32
- adds r0, r4
- ldrb r1, [r0]
- adds r0, r5, 0
- bl ConvertInternationalString
- adds r0, r6, 0x1
- adds r0, r4
- ldrb r1, [r0]
- adds r0, r7, 0
- bl sub_8133BE4
-_08133CCA:
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8133C48
-
- thumb_func_start sub_8133CD8
-sub_8133CD8: @ 8133CD8
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =gSpecialVar_Result
- ldr r2, =0x00002e59
- adds r0, r2
- ldrb r0, [r0]
- strh r0, [r1]
- bx lr
- .pool
- thumb_func_end sub_8133CD8
-
- thumb_func_start sub_8133CF4
-sub_8133CF4: @ 8133CF4
- push {r4,r5,lr}
- movs r4, 0
- ldr r5, =gSpecialVar_Result
-_08133CFA:
- adds r0, r4, 0
- bl CountDecorationCategoryN
- lsls r0, 24
- cmp r0, 0
- beq _08133D10
- movs r0, 0
- strh r0, [r5]
- b _08133D20
- .pool
-_08133D10:
- adds r0, r4, 0x1
- lsls r0, 24
- lsrs r4, r0, 24
- cmp r4, 0x7
- bls _08133CFA
- ldr r1, =gSpecialVar_Result
- movs r0, 0x1
- strh r0, [r1]
-_08133D20:
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8133CF4
-
- thumb_func_start sub_8133D2C
-sub_8133D2C: @ 8133D2C
- push {r4-r6,lr}
- ldr r6, =gSpecialVar_Result
- movs r0, 0
- strh r0, [r6]
- ldr r4, =gDecorations
- ldr r5, =gSpecialVar_0x8004
- ldrh r0, [r5]
- lsls r0, 5
- adds r2, r0, r4
- ldr r0, =gSpecialVar_0x8006
- ldrh r0, [r0]
- lsls r0, 5
- adds r0, r4
- ldrb r1, [r2, 0x13]
- ldrb r0, [r0, 0x13]
- cmp r1, r0
- beq _08133D72
- adds r0, r1, 0
- bl GetFirstEmptyDecorSlot
- lsls r0, 24
- asrs r0, 24
- movs r1, 0x1
- negs r1, r1
- cmp r0, r1
- bne _08133D72
- ldr r0, =gStringVar2
- ldrh r1, [r5]
- lsls r1, 5
- adds r1, r4
- ldrb r1, [r1, 0x13]
- bl sub_8127250
- movs r0, 0x1
- strh r0, [r6]
-_08133D72:
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8133D2C
-
- thumb_func_start sub_8133D8C
-sub_8133D8C: @ 8133D8C
- push {lr}
- ldr r0, =sub_8127208
- movs r1, 0
- bl CreateTask
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8133D8C
-
- thumb_func_start sub_8133DA0
-sub_8133DA0: @ 8133DA0
- push {r4-r6,lr}
- lsls r0, 24
- lsrs r6, r0, 24
- bl IsSelectedDecorInThePC
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x1
- bne _08133DFC
- ldr r5, =gSpecialVar_0x8006
- ldr r0, =gCurDecorationIndex
- ldrb r1, [r0]
- ldr r0, =gCurDecorInventoryItems
- ldr r0, [r0]
- adds r0, r1
- ldrb r0, [r0]
- strh r0, [r5]
- ldr r0, =gStringVar3
- ldr r1, =gSpecialVar_0x8004
- ldrh r1, [r1]
- lsls r1, 5
- ldr r4, =gDecorations + 1
- adds r1, r4
- bl StringCopy
- ldr r0, =gStringVar2
- ldrh r1, [r5]
- lsls r1, 5
- adds r1, r4
- bl StringCopy
- b _08133E04
- .pool
-_08133DFC:
- ldr r1, =gSpecialVar_0x8006
- ldr r2, =0x0000ffff
- adds r0, r2, 0
- strh r0, [r1]
-_08133E04:
- adds r0, r6, 0
- bl DestroyTask
- bl EnableBothScriptContexts
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8133DA0
-
- thumb_func_start sub_8133E1C
-sub_8133E1C: @ 8133E1C
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- ldr r2, =gSpecialVar_0x8006
- movs r1, 0
- strh r1, [r2]
- bl DestroyTask
- bl EnableBothScriptContexts
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8133E1C
-
- thumb_func_start sub_8133E38
-sub_8133E38: @ 8133E38
- push {r4-r6,lr}
- mov r6, r8
- push {r6}
- ldr r0, =gSaveBlock1Ptr
- ldr r6, [r0]
- ldr r0, =0x00002e28
- adds r5, r6, r0
- ldr r1, =gSpecialVar_0x8006
- mov r8, r1
- ldrb r0, [r1]
- bl DecorationRemove
- ldr r0, =gSpecialVar_0x8004
- ldrb r0, [r0]
- bl DecorationAdd
- ldr r4, =gSpecialVar_0x8005
- ldrh r1, [r4]
- movs r0, 0xB
- muls r0, r1
- adds r0, 0x5
- adds r5, r0
- ldr r0, =gSaveBlock2Ptr
- ldr r1, [r0]
- adds r0, r5, 0
- bl StringCopy
- ldr r2, =0x00002e29
- adds r0, r6, r2
- ldrh r1, [r4]
- adds r0, r1
- mov r2, r8
- ldrh r1, [r2]
- strb r1, [r0]
- ldr r1, =0x00002e5a
- adds r0, r6, r1
- ldrh r4, [r4]
- adds r0, r4
- movs r1, 0x2
- strb r1, [r0]
- ldr r2, =0x00002e59
- adds r6, r2
- movs r0, 0x1
- strb r0, [r6]
- pop {r3}
- mov r8, r3
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8133E38
-
- thumb_func_start sub_8133EC0
-sub_8133EC0: @ 8133EC0
- push {lr}
- ldr r0, =sub_8133C48
- movs r1, 0
- bl CreateTask
- lsls r0, 24
- lsrs r0, 24
- bl sub_8133A78
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_8133EC0
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/trainer_card.s b/asm/trainer_card.s
index a56dbd157..6d1be17cb 100644
--- a/asm/trainer_card.s
+++ b/asm/trainer_card.s
@@ -3894,7 +3894,7 @@ _080C48F6:
sub_80C4904: @ 80C4904
lsls r0, 24
lsrs r0, 24
- ldr r2, =gUnknown_02039B58
+ ldr r2, =gTrainerCards
movs r1, 0x64
muls r0, r1
adds r0, r2
@@ -4578,7 +4578,7 @@ sub_80C4E74: @ 80C4E74
ldr r0, [r5]
ldr r1, =0x00000534
adds r0, r1
- ldr r2, =gUnknown_02039B58
+ ldr r2, =gTrainerCards
movs r1, 0x64
muls r1, r4
adds r1, r2
diff --git a/common_syms/field_camera.txt b/common_syms/field_camera.txt
new file mode 100644
index 000000000..615026aee
--- /dev/null
+++ b/common_syms/field_camera.txt
@@ -0,0 +1,3 @@
+gUnknown_03005DD0
+gUnknown_03005DE8
+gUnknown_03005DEC
diff --git a/common_syms/fieldmap.txt b/common_syms/fieldmap.txt
new file mode 100644
index 000000000..49e0fb980
--- /dev/null
+++ b/common_syms/fieldmap.txt
@@ -0,0 +1 @@
+gUnknown_03005DC0
diff --git a/common_syms/load_save.txt b/common_syms/load_save.txt
new file mode 100644
index 000000000..2d3d9b802
--- /dev/null
+++ b/common_syms/load_save.txt
@@ -0,0 +1,4 @@
+gFlashMemoryPresent
+gSaveBlock1Ptr
+gSaveBlock2Ptr
+gPokemonStoragePtr
diff --git a/common_syms/mauville_old_man.txt b/common_syms/mauville_old_man.txt
new file mode 100644
index 000000000..edb40a31c
--- /dev/null
+++ b/common_syms/mauville_old_man.txt
@@ -0,0 +1 @@
+gBardSong \ No newline at end of file
diff --git a/common_syms/random.txt b/common_syms/random.txt
new file mode 100644
index 000000000..8037c6958
--- /dev/null
+++ b/common_syms/random.txt
@@ -0,0 +1,2 @@
+gRngValue
+gRng2Value
diff --git a/constants/constants.inc b/constants/constants.inc
index 28f2b2658..5e133bba4 100644
--- a/constants/constants.inc
+++ b/constants/constants.inc
@@ -2,7 +2,6 @@
.include "constants/misc_constants.inc"
.include "constants/contest_constants.inc"
.include "constants/pokemon_data_constants.inc"
- .include "constants/item_data_constants.inc"
.include "constants/battle_frontier_constants.inc"
.include "constants/map_constants.inc"
.include "constants/berry_constants.inc"
diff --git a/constants/item_data_constants.inc b/constants/item_data_constants.inc
deleted file mode 100644
index 07ceb6e3b..000000000
--- a/constants/item_data_constants.inc
+++ /dev/null
@@ -1,5 +0,0 @@
- .set POCKET_ITEMS, 0x01
- .set POCKET_POKE_BALLS, 0x02
- .set POCKET_TM_HM, 0x03
- .set POCKET_BERRIES, 0x04
- .set POCKET_KEY_ITEMS, 0x05
diff --git a/data/battle_records.s b/data/battle_records.s
deleted file mode 100644
index 86dc9d8b9..000000000
--- a/data/battle_records.s
+++ /dev/null
@@ -1,37 +0,0 @@
-
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
- .align 2
-gUnknown_085B3484:: @ 85B3484
- .incbin "graphics/unknown/unknown_5B3484.4bpp"
-
- .align 2
-gUnknown_085B3544:: @ 85B3544
- .incbin "graphics/unknown/unknown_5B3484.gbapal"
-
- .align 2
-gUnknown_085B3564:: @ 85B3564
- .incbin "graphics/unknown/unknown_5B3564.bin"
-
- .align 2
-gUnknown_085B3D64:: @ 85B3D64
- .4byte 0x000001f0, 0x000031e7
-
- .align 2
-gUnknown_085B3D6C:: @ 85B3D6C
- window_template 0x00, 0x02, 0x01, 0x1a, 0x12, 0x0f, 0x0014
- null_window_template
-
- .align 2
-gUnknown_085B3D7C:: @ 85B3D7C
- window_template 0x00, 0x02, 0x01, 0x1a, 0x11, 0x0f, 0x0001
-
-gUnknown_085B3D84:: @ 85B3D84
- .string "-------$"
-
-gUnknown_085B3D8C:: @ 85B3D8C
- .string "----$"
-
diff --git a/data/event_scripts.s b/data/event_scripts.s
index 25b0c7b52..c2906e649 100644
--- a/data/event_scripts.s
+++ b/data/event_scripts.s
@@ -5887,10 +5887,10 @@ gText_SoAmusing:: @ 82942E3
gText_SoMagical:: @ 82942F0
.string " so magical!$"
-gUnknown_082942FD:: @ 82942FD
+gOtherText_Is:: @ 82942FD
.string " is$"
-gUnknown_08294301:: @ 8294301
+gOtherText_DontYouAgree:: @ 8294301
.string "\n"
.string "Don’t you agree?$"
diff --git a/data/fieldmap.s b/data/fieldmap.s
deleted file mode 100644
index 1daa3efdf..000000000
--- a/data/fieldmap.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
- .align 2, 0
-
-gUnknown_08486EF8:: @ 8486EF8
- .4byte 0x00000000
diff --git a/data/graphics/items/item_icon_table.inc b/data/graphics/items/item_icon_table.inc
deleted file mode 100644
index 033292e63..000000000
--- a/data/graphics/items/item_icon_table.inc
+++ /dev/null
@@ -1,1513 +0,0 @@
- .align 2
-gItemIconTable:: @ 8614410
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Master Ball
- .4byte gItemIcon_MasterBall
- .4byte gItemIconPalette_MasterBall
-
-@ Ultra Ball
- .4byte gItemIcon_UltraBall
- .4byte gItemIconPalette_UltraBall
-
-@ Great Ball
- .4byte gItemIcon_GreatBall
- .4byte gItemIconPalette_GreatBall
-
-@ Poké Ball
- .4byte gItemIcon_PokeBall
- .4byte gItemIconPalette_PokeBall
-
-@ Safari Ball
- .4byte gItemIcon_SafariBall
- .4byte gItemIconPalette_SafariBall
-
-@ Net Ball
- .4byte gItemIcon_NetBall
- .4byte gItemIconPalette_NetBall
-
-@ Dive Ball
- .4byte gItemIcon_DiveBall
- .4byte gItemIconPalette_DiveBall
-
-@ Nest Ball
- .4byte gItemIcon_NestBall
- .4byte gItemIconPalette_NestBall
-
-@ Repeat Ball
- .4byte gItemIcon_RepeatBall
- .4byte gItemIconPalette_RepeatBall
-
-@ Timer Ball
- .4byte gItemIcon_TimerBall
- .4byte gItemIconPalette_RepeatBall
-
-@ Luxury Ball
- .4byte gItemIcon_LuxuryBall
- .4byte gItemIconPalette_LuxuryBall
-
-@ Premier Ball
- .4byte gItemIcon_PremierBall
- .4byte gItemIconPalette_LuxuryBall
-
-@ Potion
- .4byte gItemIcon_Potion
- .4byte gItemIconPalette_Potion
-
-@ Antidote
- .4byte gItemIcon_Antidote
- .4byte gItemIconPalette_Antidote
-
-@ Burn Heal
- .4byte gItemIcon_StatusHeal
- .4byte gItemIconPalette_BurnHeal
-
-@ Ice Heal
- .4byte gItemIcon_StatusHeal
- .4byte gItemIconPalette_IceHeal
-
-@ Awakening
- .4byte gItemIcon_StatusHeal
- .4byte gItemIconPalette_Awakening
-
-@ Paralyze Heal
- .4byte gItemIcon_StatusHeal
- .4byte gItemIconPalette_ParalyzeHeal
-
-@ Full Restore
- .4byte gItemIcon_LargePotion
- .4byte gItemIconPalette_FullRestore
-
-@ Max Potion
- .4byte gItemIcon_LargePotion
- .4byte gItemIconPalette_MaxPotion
-
-@ Hyper Potion
- .4byte gItemIcon_Potion
- .4byte gItemIconPalette_HyperPotion
-
-@ Super Potion
- .4byte gItemIcon_Potion
- .4byte gItemIconPalette_SuperPotion
-
-@ Full Heal
- .4byte gItemIcon_FullHeal
- .4byte gItemIconPalette_FullHeal
-
-@ Revive
- .4byte gItemIcon_Revive
- .4byte gItemIconPalette_Revive
-
-@ Max Revive
- .4byte gItemIcon_MaxRevive
- .4byte gItemIconPalette_Revive
-
-@ Fresh Water
- .4byte gItemIcon_FreshWater
- .4byte gItemIconPalette_FreshWater
-
-@ Soda Pop
- .4byte gItemIcon_SodaPop
- .4byte gItemIconPalette_SodaPop
-
-@ Lemonade
- .4byte gItemIcon_Lemonade
- .4byte gItemIconPalette_Lemonade
-
-@ Moomoo Milk
- .4byte gItemIcon_MoomooMilk
- .4byte gItemIconPalette_MoomooMilk
-
-@ Energy Powder
- .4byte gItemIcon_Powder
- .4byte gItemIconPalette_EnergyPowder
-
-@ Energy Root
- .4byte gItemIcon_EnergyRoot
- .4byte gItemIconPalette_EnergyRoot
-
-@ Heal Powder
- .4byte gItemIcon_Powder
- .4byte gItemIconPalette_HealPowder
-
-@ Revival Herb
- .4byte gItemIcon_RevivalHerb
- .4byte gItemIconPalette_RevivalHerb
-
-@ Ether
- .4byte gItemIcon_Ether
- .4byte gItemIconPalette_Ether
-
-@ Max Ether
- .4byte gItemIcon_Ether
- .4byte gItemIconPalette_MaxEther
-
-@ Elixir
- .4byte gItemIcon_Ether
- .4byte gItemIconPalette_Elixir
-
-@ Max Elixir
- .4byte gItemIcon_Ether
- .4byte gItemIconPalette_MaxElixir
-
-@ Lava Cookie
- .4byte gItemIcon_LavaCookie
- .4byte gItemIconPalette_LavaCookieAndLetter
-
-@ Blue Flute
- .4byte gItemIcon_Flute
- .4byte gItemIconPalette_BlueFlute
-
-@ Yellow Flute
- .4byte gItemIcon_Flute
- .4byte gItemIconPalette_YellowFlute
-
-@ Red Flute
- .4byte gItemIcon_Flute
- .4byte gItemIconPalette_RedFlute
-
-@ Black Flute
- .4byte gItemIcon_Flute
- .4byte gItemIconPalette_BlackFlute
-
-@ White Flute
- .4byte gItemIcon_Flute
- .4byte gItemIconPalette_WhiteFlute
-
-@ Berry Juice
- .4byte gItemIcon_BerryJuice
- .4byte gItemIconPalette_BerryJuice
-
-@ Sacred Ash
- .4byte gItemIcon_SacredAsh
- .4byte gItemIconPalette_SacredAsh
-
-@ Shoal Salt
- .4byte gItemIcon_Powder
- .4byte gItemIconPalette_ShoalSalt
-
-@ Shoal Shell
- .4byte gItemIcon_ShoalShell
- .4byte gItemIconPalette_Shell
-
-@ Red Shard
- .4byte gItemIcon_Shard
- .4byte gItemIconPalette_RedShard
-
-@ Blue Shard
- .4byte gItemIcon_Shard
- .4byte gItemIconPalette_BlueShard
-
-@ Yellow Shard
- .4byte gItemIcon_Shard
- .4byte gItemIconPalette_YellowShard
-
-@ Green Shard
- .4byte gItemIcon_Shard
- .4byte gItemIconPalette_GreenShard
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ HP Up
- .4byte gItemIcon_HPUp
- .4byte gItemIconPalette_HPUp
-
-@ Protein
- .4byte gItemIcon_Vitamin
- .4byte gItemIconPalette_Protein
-
-@ Iron
- .4byte gItemIcon_Vitamin
- .4byte gItemIconPalette_Iron
-
-@ Carbos
- .4byte gItemIcon_Vitamin
- .4byte gItemIconPalette_Carbos
-
-@ Calcium
- .4byte gItemIcon_Vitamin
- .4byte gItemIconPalette_Calcium
-
-@ Rare Candy
- .4byte gItemIcon_RareCandy
- .4byte gItemIconPalette_RareCandy
-
-@ PP Up
- .4byte gItemIcon_PPUp
- .4byte gItemIconPalette_PPUp
-
-@ Zinc
- .4byte gItemIcon_Vitamin
- .4byte gItemIconPalette_Zinc
-
-@ Pp Max
- .4byte gItemIcon_PPMax
- .4byte gItemIconPalette_PPMax
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Guard Spec.
- .4byte gItemIcon_BattleStatItem
- .4byte gItemIconPalette_GuardSpec
-
-@ Dire Hit
- .4byte gItemIcon_BattleStatItem
- .4byte gItemIconPalette_DireHit
-
-@ X Attack
- .4byte gItemIcon_BattleStatItem
- .4byte gItemIconPalette_XAttack
-
-@ X Defend
- .4byte gItemIcon_BattleStatItem
- .4byte gItemIconPalette_XDefend
-
-@ X Speed
- .4byte gItemIcon_BattleStatItem
- .4byte gItemIconPalette_XSpeed
-
-@ X Accuracy
- .4byte gItemIcon_BattleStatItem
- .4byte gItemIconPalette_XAccuracy
-
-@ X Special
- .4byte gItemIcon_BattleStatItem
- .4byte gItemIconPalette_XSpecial
-
-@ Poké Doll
- .4byte gItemIcon_PokeDoll
- .4byte gItemIconPalette_PokeDoll
-
-@ Fluffy Tail
- .4byte gItemIcon_FluffyTail
- .4byte gItemIconPalette_FluffyTail
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Super Repel
- .4byte gItemIcon_Repel
- .4byte gItemIconPalette_SuperRepel
-
-@ Max Repel
- .4byte gItemIcon_Repel
- .4byte gItemIconPalette_MaxRepel
-
-@ Escape Rope
- .4byte gItemIcon_EscapeRope
- .4byte gItemIconPalette_EscapeRope
-
-@ Repel
- .4byte gItemIcon_Repel
- .4byte gItemIconPalette_Repel
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Sun Stone
- .4byte gItemIcon_SunStone
- .4byte gItemIconPalette_SunStone
-
-@ Moon Stone
- .4byte gItemIcon_MoonStone
- .4byte gItemIconPalette_MoonStone
-
-@ Fire Stone
- .4byte gItemIcon_FireStone
- .4byte gItemIconPalette_FireStone
-
-@ Thunder Stone
- .4byte gItemIcon_ThunderStone
- .4byte gItemIconPalette_ThunderStone
-
-@ Water Stone
- .4byte gItemIcon_WaterStone
- .4byte gItemIconPalette_WaterStone
-
-@ Leaf Stone
- .4byte gItemIcon_LeafStone
- .4byte gItemIconPalette_LeafStone
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Tiny Mushroom
- .4byte gItemIcon_TinyMushroom
- .4byte gItemIconPalette_Mushroom
-
-@ Big Mushroom
- .4byte gItemIcon_BigMushroom
- .4byte gItemIconPalette_Mushroom
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Pearl
- .4byte gItemIcon_Pearl
- .4byte gItemIconPalette_Pearl
-
-@ Big Pearl
- .4byte gItemIcon_BigPearl
- .4byte gItemIconPalette_Pearl
-
-@ Stardust
- .4byte gItemIcon_Stardust
- .4byte gItemIconPalette_Star
-
-@ Star Piece
- .4byte gItemIcon_StarPiece
- .4byte gItemIconPalette_Star
-
-@ Nugget
- .4byte gItemIcon_Nugget
- .4byte gItemIconPalette_Nugget
-
-@ Heart Scale
- .4byte gItemIcon_HeartScale
- .4byte gItemIconPalette_HeartScale
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Orange Mail
- .4byte gItemIcon_OrangeMail
- .4byte gItemIconPalette_OrangeMail
-
-@ Harbor Mail
- .4byte gItemIcon_HarborMail
- .4byte gItemIconPalette_HarborMail
-
-@ Glitter Mail
- .4byte gItemIcon_GlitterMail
- .4byte gItemIconPalette_GlitterMail
-
-@ Mech Mail
- .4byte gItemIcon_MechMail
- .4byte gItemIconPalette_MechMail
-
-@ Wood Mail
- .4byte gItemIcon_WoodMail
- .4byte gItemIconPalette_WoodMail
-
-@ Wave Mail
- .4byte gItemIcon_WaveMail
- .4byte gItemIconPalette_WaveMail
-
-@ Bead Mail
- .4byte gItemIcon_BeadMail
- .4byte gItemIconPalette_BeadMail
-
-@ Shadow Mail
- .4byte gItemIcon_ShadowMail
- .4byte gItemIconPalette_ShadowMail
-
-@ Tropic Mail
- .4byte gItemIcon_TropicMail
- .4byte gItemIconPalette_TropicMail
-
-@ Dream Mail
- .4byte gItemIcon_DreamMail
- .4byte gItemIconPalette_DreamMail
-
-@ Fab Mail
- .4byte gItemIcon_FabMail
- .4byte gItemIconPalette_FabMail
-
-@ Retro Mail
- .4byte gItemIcon_RetroMail
- .4byte gItemIconPalette_RetroMail
-
-@ Cheri Berry
- .4byte gItemIcon_CheriBerry
- .4byte gItemIconPalette_CheriBerry
-
-@ Chesto Berry
- .4byte gItemIcon_ChestoBerry
- .4byte gItemIconPalette_ChestoBerry
-
-@ Pecha Berry
- .4byte gItemIcon_PechaBerry
- .4byte gItemIconPalette_PechaBerry
-
-@ Rawst Berry
- .4byte gItemIcon_RawstBerry
- .4byte gItemIconPalette_RawstBerry
-
-@ Aspear Berry
- .4byte gItemIcon_AspearBerry
- .4byte gItemIconPalette_AspearBerry
-
-@ Leppa Berry
- .4byte gItemIcon_LeppaBerry
- .4byte gItemIconPalette_LeppaBerry
-
-@ Oran Berry
- .4byte gItemIcon_OranBerry
- .4byte gItemIconPalette_OranBerry
-
-@ Persim Berry
- .4byte gItemIcon_PersimBerry
- .4byte gItemIconPalette_PersimBerry
-
-@ Lum Berry
- .4byte gItemIcon_LumBerry
- .4byte gItemIconPalette_LumBerry
-
-@ Sitrus Berry
- .4byte gItemIcon_SitrusBerry
- .4byte gItemIconPalette_SitrusBerry
-
-@ Figy Berry
- .4byte gItemIcon_FigyBerry
- .4byte gItemIconPalette_FigyBerry
-
-@ Wiki Berry
- .4byte gItemIcon_WikiBerry
- .4byte gItemIconPalette_WikiBerry
-
-@ Mago Berry
- .4byte gItemIcon_MagoBerry
- .4byte gItemIconPalette_MagoBerry
-
-@ Aguav Berry
- .4byte gItemIcon_AguavBerry
- .4byte gItemIconPalette_AguavBerry
-
-@ Iapapa Berry
- .4byte gItemIcon_IapapaBerry
- .4byte gItemIconPalette_IapapaBerry
-
-@ Razz Berry
- .4byte gItemIcon_RazzBerry
- .4byte gItemIconPalette_RazzBerry
-
-@ Bluk Berry
- .4byte gItemIcon_BlukBerry
- .4byte gItemIconPalette_BlukBerry
-
-@ Nanab Berry
- .4byte gItemIcon_NanabBerry
- .4byte gItemIconPalette_NanabBerry
-
-@ Wepear Berry
- .4byte gItemIcon_WepearBerry
- .4byte gItemIconPalette_WepearBerry
-
-@ Pinap Berry
- .4byte gItemIcon_PinapBerry
- .4byte gItemIconPalette_PinapBerry
-
-@ Pomeg Berry
- .4byte gItemIcon_PomegBerry
- .4byte gItemIconPalette_PomegBerry
-
-@ Kelpsy Berry
- .4byte gItemIcon_KelpsyBerry
- .4byte gItemIconPalette_KelpsyBerry
-
-@ Qualot Berry
- .4byte gItemIcon_QualotBerry
- .4byte gItemIconPalette_QualotBerry
-
-@ Hondew Berry
- .4byte gItemIcon_HondewBerry
- .4byte gItemIconPalette_HondewBerry
-
-@ Grepa Berry
- .4byte gItemIcon_GrepaBerry
- .4byte gItemIconPalette_GrepaBerry
-
-@ Tamato Berry
- .4byte gItemIcon_TamatoBerry
- .4byte gItemIconPalette_TamatoBerry
-
-@ Cornn Berry
- .4byte gItemIcon_CornnBerry
- .4byte gItemIconPalette_CornnBerry
-
-@ Magost Berry
- .4byte gItemIcon_MagostBerry
- .4byte gItemIconPalette_MagostBerry
-
-@ Rabuta Berry
- .4byte gItemIcon_RabutaBerry
- .4byte gItemIconPalette_RabutaBerry
-
-@ Nomel Berry
- .4byte gItemIcon_NomelBerry
- .4byte gItemIconPalette_NomelBerry
-
-@ Spelon Berry
- .4byte gItemIcon_SpelonBerry
- .4byte gItemIconPalette_SpelonBerry
-
-@ Pamtre Berry
- .4byte gItemIcon_PamtreBerry
- .4byte gItemIconPalette_PamtreBerry
-
-@ Watmel Berry
- .4byte gItemIcon_WatmelBerry
- .4byte gItemIconPalette_WatmelBerry
-
-@ Durin Berry
- .4byte gItemIcon_DurinBerry
- .4byte gItemIconPalette_DurinBerry
-
-@ Belue Berry
- .4byte gItemIcon_BelueBerry
- .4byte gItemIconPalette_BelueBerry
-
-@ Liechi Berry
- .4byte gItemIcon_LiechiBerry
- .4byte gItemIconPalette_LiechiBerry
-
-@ Ganlon Berry
- .4byte gItemIcon_GanlonBerry
- .4byte gItemIconPalette_GanlonBerry
-
-@ Salac Berry
- .4byte gItemIcon_SalacBerry
- .4byte gItemIconPalette_SalacBerry
-
-@ Petaya Berry
- .4byte gItemIcon_PetayaBerry
- .4byte gItemIconPalette_PetayaBerry
-
-@ Apicot Berry
- .4byte gItemIcon_ApicotBerry
- .4byte gItemIconPalette_ApicotBerry
-
-@ Lansat Berry
- .4byte gItemIcon_LansatBerry
- .4byte gItemIconPalette_LansatBerry
-
-@ Starf Berry
- .4byte gItemIcon_StarfBerry
- .4byte gItemIconPalette_StarfBerry
-
-@ Enigma Berry
- .4byte gItemIcon_EnigmaBerry
- .4byte gItemIconPalette_EnigmaBerry
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Bright Powder
- .4byte gItemIcon_BrightPowder
- .4byte gItemIconPalette_BrightPowder
-
-@ White Herb
- .4byte gItemIcon_InBattleHerb
- .4byte gItemIconPalette_WhiteHerb
-
-@ Macho Brace
- .4byte gItemIcon_MachoBrace
- .4byte gItemIconPalette_MachoBrace
-
-@ Exp. Share
- .4byte gItemIcon_ExpShare
- .4byte gItemIconPalette_ExpShare
-
-@ Quick Claw
- .4byte gItemIcon_QuickClaw
- .4byte gItemIconPalette_QuickClaw
-
-@ Soothe Bell
- .4byte gItemIcon_SootheBell
- .4byte gItemIconPalette_SootheBell
-
-@ Mental Herb
- .4byte gItemIcon_InBattleHerb
- .4byte gItemIconPalette_MentalHerb
-
-@ Choice Band
- .4byte gItemIcon_ChoiceBand
- .4byte gItemIconPalette_ChoiceBand
-
-@ King's Rock
- .4byte gItemIcon_KingsRock
- .4byte gItemIconPalette_KingsRock
-
-@ Silver Powder
- .4byte gItemIcon_SilverPowder
- .4byte gItemIconPalette_SilverPowder
-
-@ Amulet Coin
- .4byte gItemIcon_AmuletCoin
- .4byte gItemIconPalette_AmuletCoin
-
-@ Cleanse Tag
- .4byte gItemIcon_CleanseTag
- .4byte gItemIconPalette_CleanseTag
-
-@ Soul Dew
- .4byte gItemIcon_SoulDew
- .4byte gItemIconPalette_SoulDew
-
-@ Deep Sea Tooth
- .4byte gItemIcon_DeepSeaTooth
- .4byte gItemIconPalette_DeepSeaTooth
-
-@ Deep Sea Scale
- .4byte gItemIcon_DeepSeaScale
- .4byte gItemIconPalette_DeepSeaScale
-
-@ Smoke Ball
- .4byte gItemIcon_SmokeBall
- .4byte gItemIconPalette_SmokeBall
-
-@ Everstone
- .4byte gItemIcon_Everstone
- .4byte gItemIconPalette_Everstone
-
-@ Focus Band
- .4byte gItemIcon_FocusBand
- .4byte gItemIconPalette_FocusBand
-
-@ Lucky Egg
- .4byte gItemIcon_LuckyEgg
- .4byte gItemIconPalette_LuckyEgg
-
-@ Scope Lens
- .4byte gItemIcon_ScopeLens
- .4byte gItemIconPalette_ScopeLens
-
-@ Metal Coat
- .4byte gItemIcon_MetalCoat
- .4byte gItemIconPalette_MetalCoat
-
-@ Leftovers
- .4byte gItemIcon_Leftovers
- .4byte gItemIconPalette_Leftovers
-
-@ Dragon Scale
- .4byte gItemIcon_DragonScale
- .4byte gItemIconPalette_DragonScale
-
-@ Light Ball
- .4byte gItemIcon_LightBall
- .4byte gItemIconPalette_LightBall
-
-@ Soft Sand
- .4byte gItemIcon_SoftSand
- .4byte gItemIconPalette_SoftSand
-
-@ Hard Stone
- .4byte gItemIcon_HardStone
- .4byte gItemIconPalette_HardStone
-
-@ Miracle Seed
- .4byte gItemIcon_MiracleSeed
- .4byte gItemIconPalette_MiracleSeed
-
-@ Black Glasses
- .4byte gItemIcon_BlackGlasses
- .4byte gItemIconPalette_BlackTypeEnhancingItem
-
-@ Black Belt
- .4byte gItemIcon_BlackBelt
- .4byte gItemIconPalette_BlackTypeEnhancingItem
-
-@ Magnet
- .4byte gItemIcon_Magnet
- .4byte gItemIconPalette_Magnet
-
-@ Mystic Water
- .4byte gItemIcon_MysticWater
- .4byte gItemIconPalette_MysticWater
-
-@ Sharp Beak
- .4byte gItemIcon_SharpBeak
- .4byte gItemIconPalette_SharpBeak
-
-@ Poison Barb
- .4byte gItemIcon_PoisonBarb
- .4byte gItemIconPalette_PoisonBarb
-
-@ Never-Melt Ice
- .4byte gItemIcon_NeverMeltIce
- .4byte gItemIconPalette_NeverMeltIce
-
-@ Spell Tag
- .4byte gItemIcon_SpellTag
- .4byte gItemIconPalette_SpellTag
-
-@ Twisted Spoon
- .4byte gItemIcon_TwistedSpoon
- .4byte gItemIconPalette_TwistedSpoon
-
-@ Charcoal
- .4byte gItemIcon_Charcoal
- .4byte gItemIconPalette_Charcoal
-
-@ Dragon Fang
- .4byte gItemIcon_DragonFang
- .4byte gItemIconPalette_DragonFang
-
-@ Silk Scarf
- .4byte gItemIcon_SilkScarf
- .4byte gItemIconPalette_SilkScarf
-
-@ Up-Grade
- .4byte gItemIcon_UpGrade
- .4byte gItemIconPalette_UpGrade
-
-@ Shell Bell
- .4byte gItemIcon_ShellBell
- .4byte gItemIconPalette_Shell
-
-@ Sea Incense
- .4byte gItemIcon_SeaIncense
- .4byte gItemIconPalette_SeaIncense
-
-@ Lax Incense
- .4byte gItemIcon_LaxIncense
- .4byte gItemIconPalette_LaxIncense
-
-@ Lucky Punch
- .4byte gItemIcon_LuckyPunch
- .4byte gItemIconPalette_LuckyPunch
-
-@ Metal Powder
- .4byte gItemIcon_MetalPowder
- .4byte gItemIconPalette_MetalPowder
-
-@ Thick Club
- .4byte gItemIcon_ThickClub
- .4byte gItemIconPalette_ThickClub
-
-@ Stick
- .4byte gItemIcon_Stick
- .4byte gItemIconPalette_Stick
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Red Scarf
- .4byte gItemIcon_Scarf
- .4byte gItemIconPalette_RedScarf
-
-@ Blue Scarf
- .4byte gItemIcon_Scarf
- .4byte gItemIconPalette_BlueScarf
-
-@ Pink Scarf
- .4byte gItemIcon_Scarf
- .4byte gItemIconPalette_PinkScarf
-
-@ Green Scarf
- .4byte gItemIcon_Scarf
- .4byte gItemIconPalette_GreenScarf
-
-@ Yellow Scarf
- .4byte gItemIcon_Scarf
- .4byte gItemIconPalette_YellowScarf
-
-@ Mach Bike
- .4byte gItemIcon_MachBike
- .4byte gItemIconPalette_MachBike
-
-@ Coin Case
- .4byte gItemIcon_CoinCase
- .4byte gItemIconPalette_CoinCase
-
-@ Itemfinder
- .4byte gItemIcon_Itemfinder
- .4byte gItemIconPalette_Itemfinder
-
-@ Old Rod
- .4byte gItemIcon_OldRod
- .4byte gItemIconPalette_OldRod
-
-@ Good Rod
- .4byte gItemIcon_GoodRod
- .4byte gItemIconPalette_GoodRod
-
-@ Super Rod
- .4byte gItemIcon_SuperRod
- .4byte gItemIconPalette_SuperRod
-
-@ S.S. Ticket
- .4byte gItemIcon_SSTicket
- .4byte gItemIconPalette_SSTicket
-
-@ Contest Pass
- .4byte gItemIcon_ContestPass
- .4byte gItemIconPalette_ContestPass
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Wailmer Pail
- .4byte gItemIcon_WailmerPail
- .4byte gItemIconPalette_WailmerPail
-
-@ Devon Goods
- .4byte gItemIcon_DevonGoods
- .4byte gItemIconPalette_DevonGoods
-
-@ Soot Sack
- .4byte gItemIcon_SootSack
- .4byte gItemIconPalette_SootSack
-
-@ Basement Key
- .4byte gItemIcon_BasementKey
- .4byte gItemIconPalette_OldKey
-
-@ Acro Bike
- .4byte gItemIcon_AcroBike
- .4byte gItemIconPalette_AcroBike
-
-@ Pokéblock Case
- .4byte gItemIcon_PokeblockCase
- .4byte gItemIconPalette_PokeblockCase
-
-@ Letter
- .4byte gItemIcon_Letter
- .4byte gItemIconPalette_LavaCookieAndLetter
-
-@ Eon Ticket
- .4byte gItemIcon_EonTicket
- .4byte gItemIconPalette_EonTicket
-
-@ Red Orb
- .4byte gItemIcon_Orb
- .4byte gItemIconPalette_RedOrb
-
-@ Blue Orb
- .4byte gItemIcon_Orb
- .4byte gItemIconPalette_BlueOrb
-
-@ Scanner
- .4byte gItemIcon_Scanner
- .4byte gItemIconPalette_Scanner
-
-@ Go-Goggles
- .4byte gItemIcon_GoGoggles
- .4byte gItemIconPalette_GoGoggles
-
-@ Meteorite
- .4byte gItemIcon_Meteorite
- .4byte gItemIconPalette_Meteorite
-
-@ Rm. 1 Key
- .4byte gItemIcon_Room1Key
- .4byte gItemIconPalette_Key
-
-@ Rm. 2 Key
- .4byte gItemIcon_Room2Key
- .4byte gItemIconPalette_Key
-
-@ Rm. 4 Key
- .4byte gItemIcon_Room4Key
- .4byte gItemIconPalette_Key
-
-@ Rm. 6 Key
- .4byte gItemIcon_Room6Key
- .4byte gItemIconPalette_Key
-
-@ Storage Key
- .4byte gItemIcon_StorageKey
- .4byte gItemIconPalette_OldKey
-
-@ Root Fossil
- .4byte gItemIcon_RootFossil
- .4byte gItemIconPalette_HoennFossil
-
-@ Claw Fossil
- .4byte gItemIcon_ClawFossil
- .4byte gItemIconPalette_HoennFossil
-
-@ Devon Scope
- .4byte gItemIcon_DevonScope
- .4byte gItemIconPalette_DevonScope
-
-@ TM01
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_FightingTMHM
-
-@ TM02
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_DragonTMHM
-
-@ TM03
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_WaterTMHM
-
-@ TM04
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_PsychicTMHM
-
-@ TM05
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM06
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_PoisonTMHM
-
-@ TM07
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_IceTMHM
-
-@ TM08
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_FightingTMHM
-
-@ TM09
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_GrassTMHM
-
-@ TM10
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM11
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_FireTMHM
-
-@ TM12
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_DarkTMHM
-
-@ TM13
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_IceTMHM
-
-@ TM14
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_IceTMHM
-
-@ TM15
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM16
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_PsychicTMHM
-
-@ TM17
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM18
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_WaterTMHM
-
-@ TM19
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_GrassTMHM
-
-@ TM20
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM21
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM22
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_GrassTMHM
-
-@ TM23
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_SteelTMHM
-
-@ TM24
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_ElectricTMHM
-
-@ TM25
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_ElectricTMHM
-
-@ TM26
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_GroundTMHM
-
-@ TM27
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM28
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_GroundTMHM
-
-@ TM29
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_PsychicTMHM
-
-@ TM30
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_GhostTMHM
-
-@ TM31
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_FightingTMHM
-
-@ TM32
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM33
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_PsychicTMHM
-
-@ TM34
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_ElectricTMHM
-
-@ TM35
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_FireTMHM
-
-@ TM36
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_PoisonTMHM
-
-@ TM37
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_RockTMHM
-
-@ TM38
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_FireTMHM
-
-@ TM39
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_RockTMHM
-
-@ TM40
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_FlyingTMHM
-
-@ TM41
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_DarkTMHM
-
-@ TM42
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM43
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM44
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_PsychicTMHM
-
-@ TM45
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_NormalTMHM
-
-@ TM46
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_DarkTMHM
-
-@ TM47
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_SteelTMHM
-
-@ TM48
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_PsychicTMHM
-
-@ TM49
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_DarkTMHM
-
-@ TM50
- .4byte gItemIcon_TM
- .4byte gItemIconPalette_FireTMHM
-
-@ HM01
- .4byte gItemIcon_HM
- .4byte gItemIconPalette_NormalTMHM
-
-@ HM02
- .4byte gItemIcon_HM
- .4byte gItemIconPalette_FlyingTMHM
-
-@ HM03
- .4byte gItemIcon_HM
- .4byte gItemIconPalette_WaterTMHM
-
-@ HM04
- .4byte gItemIcon_HM
- .4byte gItemIconPalette_NormalTMHM
-
-@ HM05
- .4byte gItemIcon_HM
- .4byte gItemIconPalette_NormalTMHM
-
-@ HM06
- .4byte gItemIcon_HM
- .4byte gItemIconPalette_FightingTMHM
-
-@ HM07
- .4byte gItemIcon_HM
- .4byte gItemIconPalette_WaterTMHM
-
-@ HM08
- .4byte gItemIcon_HM
- .4byte gItemIconPalette_WaterTMHM
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ ????????
- .4byte gItemIcon_QuestionMark
- .4byte gItemIconPalette_QuestionMark
-
-@ Oak's Parcel
- .4byte gItemIcon_OaksParcel
- .4byte gItemIconPalette_OaksParcel
-
-@ Poké Flute
- .4byte gItemIcon_PokeFlute
- .4byte gItemIconPalette_PokeFlute
-
-@ Secret Key
- .4byte gItemIcon_SecretKey
- .4byte gItemIconPalette_SecretKey
-
-@ Bike Voucher
- .4byte gItemIcon_BikeVoucher
- .4byte gItemIconPalette_BikeVoucher
-
-@ Gold Teeth
- .4byte gItemIcon_GoldTeeth
- .4byte gItemIconPalette_GoldTeeth
-
-@ Old Amber
- .4byte gItemIcon_OldAmber
- .4byte gItemIconPalette_OldAmber
-
-@ Card Key
- .4byte gItemIcon_CardKey
- .4byte gItemIconPalette_CardKey
-
-@ Lift Key
- .4byte gItemIcon_LiftKey
- .4byte gItemIconPalette_Key
-
-@ Helix Fossil
- .4byte gItemIcon_HelixFossil
- .4byte gItemIconPalette_KantoFossil
-
-@ Dome Fossil
- .4byte gItemIcon_DomeFossil
- .4byte gItemIconPalette_KantoFossil
-
-@ Silph Scope
- .4byte gItemIcon_SilphScope
- .4byte gItemIconPalette_SilphScope
-
-@ Bicycle
- .4byte gItemIcon_Bicycle
- .4byte gItemIconPalette_Bicycle
-
-@ Town Map
- .4byte gItemIcon_TownMap
- .4byte gItemIconPalette_TownMap
-
-@ Vs. Seeker
- .4byte gItemIcon_VSSeeker
- .4byte gItemIconPalette_VSSeeker
-
-@ Fame Checker
- .4byte gItemIcon_FameChecker
- .4byte gItemIconPalette_FameChecker
-
-@ TM Case
- .4byte gItemIcon_TMCase
- .4byte gItemIconPalette_TMCase
-
-@ Berry Pouch
- .4byte gItemIcon_BerryPouch
- .4byte gItemIconPalette_BerryPouch
-
-@ Teachy TV
- .4byte gItemIcon_TeachyTV
- .4byte gItemIconPalette_TeachyTV
-
-@ Tri-Pass
- .4byte gItemIcon_TriPass
- .4byte gItemIconPalette_TriPass
-
-@ Rainbow Pass
- .4byte gItemIcon_RainbowPass
- .4byte gItemIconPalette_RainbowPass
-
-@ Tea
- .4byte gItemIcon_Tea
- .4byte gItemIconPalette_Tea
-
-@ Mystic Ticket
- .4byte gItemIcon_MysticTicket
- .4byte gItemIconPalette_MysticTicket
-
-@ Aurora Ticket
- .4byte gItemIcon_AuroraTicket
- .4byte gItemIconPalette_AuroraTicket
-
-@ Powder Jar
- .4byte gItemIcon_PowderJar
- .4byte gItemIconPalette_PowderJar
-
-@ Ruby
- .4byte gItemIcon_Gem
- .4byte gItemIconPalette_Ruby
-
-@ Sapphire
- .4byte gItemIcon_Gem
- .4byte gItemIconPalette_Sapphire
-
-@ Magma Emblem
- .4byte gItemIcon_MagmaEmblem
- .4byte gItemIconPalette_MagmaEmblem
-
-@ Old Sea Map
- .4byte gItemIcon_OldSeaMap
- .4byte gItemIconPalette_OldSeaMap
-
-@ Return to field arrow
- .4byte gItemIcon_ReturnToFieldArrow
- .4byte gItemIconPalette_ReturnToFieldArrow
diff --git a/data/item_icon.s b/data/item_icon.s
deleted file mode 100644
index 6fd94d0a0..000000000
--- a/data/item_icon.s
+++ /dev/null
@@ -1,8 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
-@ 8614410
- .include "data/graphics/items/item_icon_table.inc"
-
diff --git a/data/item_menu_icons.s b/data/item_menu_icons.s
deleted file mode 100644
index 30cb7e66b..000000000
--- a/data/item_menu_icons.s
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "constants/items.h"
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
-@ 857FEA0
- .include "data/text/item_descriptions.inc"
-
-@ 85839A0
- .include "data/items.inc"
diff --git a/data/items.inc b/data/items.inc
deleted file mode 100644
index d5c43a2c9..000000000
--- a/data/items.inc
+++ /dev/null
@@ -1,5656 +0,0 @@
- .align 2
-gItems:: @ 85839A0
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MASTER BALL$", 14
- .2byte ITEM_MASTER_BALL
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gMasterBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 0
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 0
-
- .string "ULTRA BALL$", 14
- .2byte ITEM_ULTRA_BALL
- .2byte 1200 @ price
- .byte 0
- .byte 0
- .4byte gUltraBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 1
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 1
-
- .string "GREAT BALL$", 14
- .2byte ITEM_GREAT_BALL
- .2byte 600 @ price
- .byte 0
- .byte 0
- .4byte gGreatBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 2
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 2
-
- .string "POKé BALL$", 14
- .2byte ITEM_POKE_BALL
- .2byte 200 @ price
- .byte 0
- .byte 0
- .4byte gPokeBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 3
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 3
-
- .string "SAFARI BALL$", 14
- .2byte ITEM_SAFARI_BALL
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gSafariBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 4
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 4
-
- .string "NET BALL$", 14
- .2byte ITEM_NET_BALL
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gNetBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 5
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 5
-
- .string "DIVE BALL$", 14
- .2byte ITEM_DIVE_BALL
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gDiveBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 6
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 6
-
- .string "NEST BALL$", 14
- .2byte ITEM_NEST_BALL
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gNestBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 7
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 7
-
- .string "REPEAT BALL$", 14
- .2byte ITEM_REPEAT_BALL
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gRepeatBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 8
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 8
-
- .string "TIMER BALL$", 14
- .2byte ITEM_TIMER_BALL
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gTimerBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 9
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 9
-
- .string "LUXURY BALL$", 14
- .2byte ITEM_LUXURY_BALL
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gLuxuryBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 10
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 10
-
- .string "PREMIER BALL$", 14
- .2byte ITEM_PREMIER_BALL
- .2byte 200 @ price
- .byte 0
- .byte 0
- .4byte gPremierBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_POKE_BALLS
- .byte 11
- .4byte NULL
- .4byte 2
- .4byte ItemUseInBattle_PokeBall
- .4byte 11
-
- .string "POTION$", 14
- .2byte ITEM_POTION
- .2byte 300 @ price
- .byte 0
- .byte 20
- .4byte gPotionItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "ANTIDOTE$", 14
- .2byte ITEM_ANTIDOTE
- .2byte 100 @ price
- .byte 0
- .byte 0
- .4byte gAntidoteItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "BURN HEAL$", 14
- .2byte ITEM_BURN_HEAL
- .2byte 250 @ price
- .byte 0
- .byte 0
- .4byte gBurnHealItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "ICE HEAL$", 14
- .2byte ITEM_ICE_HEAL
- .2byte 250 @ price
- .byte 0
- .byte 0
- .4byte gIceHealItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "AWAKENING$", 14
- .2byte ITEM_AWAKENING
- .2byte 250 @ price
- .byte 0
- .byte 0
- .4byte gAwakeningItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "PARLYZ HEAL$", 14
- .2byte ITEM_PARALYZE_HEAL
- .2byte 200 @ price
- .byte 0
- .byte 0
- .4byte gParalyzeHealItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "FULL RESTORE$", 14
- .2byte ITEM_FULL_RESTORE
- .2byte 3000 @ price
- .byte 0
- .byte 255
- .4byte gFullRestoreItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "MAX POTION$", 14
- .2byte ITEM_MAX_POTION
- .2byte 2500 @ price
- .byte 0
- .byte 255
- .4byte gMaxPotionItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "HYPER POTION$", 14
- .2byte ITEM_HYPER_POTION
- .2byte 1200 @ price
- .byte 0
- .byte 200
- .4byte gHyperPotionItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "SUPER POTION$", 14
- .2byte ITEM_SUPER_POTION
- .2byte 700 @ price
- .byte 0
- .byte 50
- .4byte gSuperPotionItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "FULL HEAL$", 14
- .2byte ITEM_FULL_HEAL
- .2byte 600 @ price
- .byte 0
- .byte 0
- .4byte gFullHealItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "REVIVE$", 14
- .2byte ITEM_REVIVE
- .2byte 1500 @ price
- .byte 0
- .byte 0
- .4byte gReviveItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "MAX REVIVE$", 14
- .2byte ITEM_MAX_REVIVE
- .2byte 4000 @ price
- .byte 0
- .byte 0
- .4byte gMaxReviveItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "FRESH WATER$", 14
- .2byte ITEM_FRESH_WATER
- .2byte 200 @ price
- .byte 0
- .byte 50
- .4byte gFreshWaterItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "SODA POP$", 14
- .2byte ITEM_SODA_POP
- .2byte 300 @ price
- .byte 0
- .byte 60
- .4byte gSodaPopItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "LEMONADE$", 14
- .2byte ITEM_LEMONADE
- .2byte 350 @ price
- .byte 0
- .byte 80
- .4byte gLemonadeItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "MOOMOO MILK$", 14
- .2byte ITEM_MOOMOO_MILK
- .2byte 500 @ price
- .byte 0
- .byte 100
- .4byte gMoomooMilkItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "ENERGYPOWDER$", 14
- .2byte ITEM_ENERGY_POWDER
- .2byte 500 @ price
- .byte 0
- .byte 0
- .4byte gEnergyPowderItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "ENERGY ROOT$", 14
- .2byte ITEM_ENERGY_ROOT
- .2byte 800 @ price
- .byte 0
- .byte 0
- .4byte gEnergyRootItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "HEAL POWDER$", 14
- .2byte ITEM_HEAL_POWDER
- .2byte 450 @ price
- .byte 0
- .byte 0
- .4byte gHealPowderItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "REVIVAL HERB$", 14
- .2byte ITEM_REVIVAL_HERB
- .2byte 2800 @ price
- .byte 0
- .byte 0
- .4byte gRevivalHerbItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "ETHER$", 14
- .2byte ITEM_ETHER
- .2byte 1200 @ price
- .byte 0
- .byte 10
- .4byte gEtherItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_PPRecovery
- .4byte 1
- .4byte ItemUseInBattle_PPRecovery
- .4byte 0
-
- .string "MAX ETHER$", 14
- .2byte ITEM_MAX_ETHER
- .2byte 2000 @ price
- .byte 0
- .byte 255
- .4byte gMaxEtherItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_PPRecovery
- .4byte 1
- .4byte ItemUseInBattle_PPRecovery
- .4byte 0
-
- .string "ELIXIR$", 14
- .2byte ITEM_ELIXIR
- .2byte 3000 @ price
- .byte 0
- .byte 10
- .4byte gElixirItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_PPRecovery
- .4byte 1
- .4byte ItemUseInBattle_PPRecovery
- .4byte 0
-
- .string "MAX ELIXIR$", 14
- .2byte ITEM_MAX_ELIXIR
- .2byte 4500 @ price
- .byte 0
- .byte 255
- .4byte gMaxElixirItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_PPRecovery
- .4byte 1
- .4byte ItemUseInBattle_PPRecovery
- .4byte 0
-
- .string "LAVA COOKIE$", 14
- .2byte ITEM_LAVA_COOKIE
- .2byte 200 @ price
- .byte 0
- .byte 0
- .4byte gLavaCookieItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "BLUE FLUTE$", 14
- .2byte ITEM_BLUE_FLUTE
- .2byte 100 @ price
- .byte 0
- .byte 0
- .4byte gBlueFluteItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "YELLOW FLUTE$", 14
- .2byte ITEM_YELLOW_FLUTE
- .2byte 200 @ price
- .byte 0
- .byte 0
- .4byte gYellowFluteItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "RED FLUTE$", 14
- .2byte ITEM_RED_FLUTE
- .2byte 300 @ price
- .byte 0
- .byte 0
- .4byte gRedFluteItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "BLACK FLUTE$", 14
- .2byte ITEM_BLACK_FLUTE
- .2byte 400 @ price
- .byte 0
- .byte 50
- .4byte gBlackFluteItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_BlackWhiteFlute
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "WHITE FLUTE$", 14
- .2byte ITEM_WHITE_FLUTE
- .2byte 500 @ price
- .byte 0
- .byte 150
- .4byte gWhiteFluteItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_BlackWhiteFlute
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BERRY JUICE$", 14
- .2byte ITEM_BERRY_JUICE
- .2byte 100 @ price
- .byte 1
- .byte 20
- .4byte gBerryJuiceItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "SACRED ASH$", 14
- .2byte ITEM_SACRED_ASH
- .2byte 200 @ price
- .byte 0
- .byte 0
- .4byte gSacredAshItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_SacredAsh
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SHOAL SALT$", 14
- .2byte ITEM_SHOAL_SALT
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gShoalSaltItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SHOAL SHELL$", 14
- .2byte ITEM_SHOAL_SHELL
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gShoalShellItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RED SHARD$", 14
- .2byte ITEM_RED_SHARD
- .2byte 200 @ price
- .byte 0
- .byte 0
- .4byte gRedShardItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BLUE SHARD$", 14
- .2byte ITEM_BLUE_SHARD
- .2byte 200 @ price
- .byte 0
- .byte 0
- .4byte gBlueShardItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "YELLOW SHARD$", 14
- .2byte ITEM_YELLOW_SHARD
- .2byte 200 @ price
- .byte 0
- .byte 0
- .4byte gYellowShardItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "GREEN SHARD$", 14
- .2byte ITEM_GREEN_SHARD
- .2byte 200 @ price
- .byte 0
- .byte 0
- .4byte gGreenShardItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HP UP$", 14
- .2byte ITEM_HP_UP
- .2byte 9800 @ price
- .byte 0
- .byte 0
- .4byte gHPUpItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "PROTEIN$", 14
- .2byte ITEM_PROTEIN
- .2byte 9800 @ price
- .byte 0
- .byte 0
- .4byte gProteinItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "IRON$", 14
- .2byte ITEM_IRON
- .2byte 9800 @ price
- .byte 0
- .byte 0
- .4byte gIronItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "CARBOS$", 14
- .2byte ITEM_CARBOS
- .2byte 9800 @ price
- .byte 0
- .byte 0
- .4byte gCarbosItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "CALCIUM$", 14
- .2byte ITEM_CALCIUM
- .2byte 9800 @ price
- .byte 0
- .byte 0
- .4byte gCalciumItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RARE CANDY$", 14
- .2byte ITEM_RARE_CANDY
- .2byte 4800 @ price
- .byte 0
- .byte 0
- .4byte gRareCandyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_RareCandy
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "PP UP$", 14
- .2byte ITEM_PP_UP
- .2byte 9800 @ price
- .byte 0
- .byte 0
- .4byte gPPUpItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_PPUp
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "ZINC$", 14
- .2byte ITEM_ZINC
- .2byte 9800 @ price
- .byte 0
- .byte 0
- .4byte gZincItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "PP MAX$", 14
- .2byte ITEM_PP_MAX
- .2byte 9800 @ price
- .byte 0
- .byte 0
- .4byte gPPMaxItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_PPUp
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "GUARD SPEC.$", 14
- .2byte ITEM_GUARD_SPEC
- .2byte 700 @ price
- .byte 0
- .byte 0
- .4byte gGuardSpecItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 2
- .4byte ItemUseInBattle_StatIncrease
- .4byte 0
-
- .string "DIRE HIT$", 14
- .2byte ITEM_DIRE_HIT
- .2byte 650 @ price
- .byte 0
- .byte 0
- .4byte gDireHitItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 2
- .4byte ItemUseInBattle_StatIncrease
- .4byte 0
-
- .string "X ATTACK$", 14
- .2byte ITEM_X_ATTACK
- .2byte 500 @ price
- .byte 0
- .byte 0
- .4byte gXAttackItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 2
- .4byte ItemUseInBattle_StatIncrease
- .4byte 0
-
- .string "X DEFEND$", 14
- .2byte ITEM_X_DEFEND
- .2byte 550 @ price
- .byte 0
- .byte 0
- .4byte gXDefendItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 2
- .4byte ItemUseInBattle_StatIncrease
- .4byte 0
-
- .string "X SPEED$", 14
- .2byte ITEM_X_SPEED
- .2byte 350 @ price
- .byte 0
- .byte 0
- .4byte gXSpeedItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 2
- .4byte ItemUseInBattle_StatIncrease
- .4byte 0
-
- .string "X ACCURACY$", 14
- .2byte ITEM_X_ACCURACY
- .2byte 950 @ price
- .byte 0
- .byte 0
- .4byte gXAccuracyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 2
- .4byte ItemUseInBattle_StatIncrease
- .4byte 0
-
- .string "X SPECIAL$", 14
- .2byte ITEM_X_SPECIAL
- .2byte 350 @ price
- .byte 0
- .byte 0
- .4byte gXSpecialItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 2
- .4byte ItemUseInBattle_StatIncrease
- .4byte 0
-
- .string "POKé DOLL$", 14
- .2byte ITEM_POKE_DOLL
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gPokeDollItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 2
- .4byte ItemUseInBattle_Escape
- .4byte 0
-
- .string "FLUFFY TAIL$", 14
- .2byte ITEM_FLUFFY_TAIL
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gFluffyTailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 2
- .4byte ItemUseInBattle_Escape
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SUPER REPEL$", 14
- .2byte ITEM_SUPER_REPEL
- .2byte 500 @ price
- .byte 0
- .byte 200
- .4byte gSuperRepelItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_Repel
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MAX REPEL$", 14
- .2byte ITEM_MAX_REPEL
- .2byte 700 @ price
- .byte 0
- .byte 250
- .4byte gMaxRepelItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_Repel
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "ESCAPE ROPE$", 14
- .2byte ITEM_ESCAPE_ROPE
- .2byte 550 @ price
- .byte 0
- .byte 0
- .4byte gEscapeRopeItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_EscapeRope
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "REPEL$", 14
- .2byte ITEM_REPEL
- .2byte 350 @ price
- .byte 0
- .byte 100
- .4byte gRepelItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_Repel
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SUN STONE$", 14
- .2byte ITEM_SUN_STONE
- .2byte 2100 @ price
- .byte 0
- .byte 0
- .4byte gSunStoneItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_EvolutionStone
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MOON STONE$", 14
- .2byte ITEM_MOON_STONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gMoonStoneItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_EvolutionStone
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "FIRE STONE$", 14
- .2byte ITEM_FIRE_STONE
- .2byte 2100 @ price
- .byte 0
- .byte 0
- .4byte gFireStoneItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_EvolutionStone
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "THUNDERSTONE$", 14
- .2byte ITEM_THUNDER_STONE
- .2byte 2100 @ price
- .byte 0
- .byte 0
- .4byte gThunderStoneItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_EvolutionStone
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "WATER STONE$", 14
- .2byte ITEM_WATER_STONE
- .2byte 2100 @ price
- .byte 0
- .byte 0
- .4byte gWaterStoneItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_EvolutionStone
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "LEAF STONE$", 14
- .2byte ITEM_LEAF_STONE
- .2byte 2100 @ price
- .byte 0
- .byte 0
- .4byte gLeafStoneItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 1
- .4byte ItemUseOutOfBattle_EvolutionStone
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TINYMUSHROOM$", 14
- .2byte ITEM_TINY_MUSHROOM
- .2byte 500 @ price
- .byte 0
- .byte 0
- .4byte gTinyMushroomItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BIG MUSHROOM$", 14
- .2byte ITEM_BIG_MUSHROOM
- .2byte 5000 @ price
- .byte 0
- .byte 0
- .4byte gBigMushroomItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "PEARL$", 14
- .2byte ITEM_PEARL
- .2byte 1400 @ price
- .byte 0
- .byte 0
- .4byte gPearlItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BIG PEARL$", 14
- .2byte ITEM_BIG_PEARL
- .2byte 7500 @ price
- .byte 0
- .byte 0
- .4byte gBigPearlItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "STARDUST$", 14
- .2byte ITEM_STARDUST
- .2byte 2000 @ price
- .byte 0
- .byte 0
- .4byte gStardustItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "STAR PIECE$", 14
- .2byte ITEM_STAR_PIECE
- .2byte 9800 @ price
- .byte 0
- .byte 0
- .4byte gStarPieceItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "NUGGET$", 14
- .2byte ITEM_NUGGET
- .2byte 10000 @ price
- .byte 0
- .byte 0
- .4byte gNuggetItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HEART SCALE$", 14
- .2byte ITEM_HEART_SCALE
- .2byte 100 @ price
- .byte 0
- .byte 0
- .4byte gHeartScaleItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "ORANGE MAIL$", 14
- .2byte ITEM_ORANGE_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gOrangeMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HARBOR MAIL$", 14
- .2byte ITEM_HARBOR_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gHarborMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 1
-
- .string "GLITTER MAIL$", 14
- .2byte ITEM_GLITTER_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gGlitterMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 2
-
- .string "MECH MAIL$", 14
- .2byte ITEM_MECH_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gMechMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 3
-
- .string "WOOD MAIL$", 14
- .2byte ITEM_WOOD_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gWoodMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 4
-
- .string "WAVE MAIL$", 14
- .2byte ITEM_WAVE_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gWaveMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 5
-
- .string "BEAD MAIL$", 14
- .2byte ITEM_BEAD_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gBeadMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 6
-
- .string "SHADOW MAIL$", 14
- .2byte ITEM_SHADOW_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gShadowMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 7
-
- .string "TROPIC MAIL$", 14
- .2byte ITEM_TROPIC_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gTropicMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 8
-
- .string "DREAM MAIL$", 14
- .2byte ITEM_DREAM_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gDreamMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 9
-
- .string "FAB MAIL$", 14
- .2byte ITEM_FAB_MAIL
- .2byte 50 @ price
- .byte 0
- .byte 0
- .4byte gFabMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 10
-
- .string "RETRO MAIL$", 14
- .2byte ITEM_RETRO_MAIL
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gRetroMailItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 0
- .4byte ItemUseOutOfBattle_Mail
- .4byte 0
- .4byte NULL
- .4byte 11
-
- .string "CHERI BERRY$", 14
- .2byte ITEM_CHERI_BERRY
- .2byte 20 @ price
- .byte 2
- .byte 0
- .4byte gCheriBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "CHESTO BERRY$", 14
- .2byte ITEM_CHESTO_BERRY
- .2byte 20 @ price
- .byte 3
- .byte 0
- .4byte gChestoBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "PECHA BERRY$", 14
- .2byte ITEM_PECHA_BERRY
- .2byte 20 @ price
- .byte 4
- .byte 0
- .4byte gPechaBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "RAWST BERRY$", 14
- .2byte ITEM_RAWST_BERRY
- .2byte 20 @ price
- .byte 5
- .byte 0
- .4byte gRawstBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "ASPEAR BERRY$", 14
- .2byte ITEM_ASPEAR_BERRY
- .2byte 20 @ price
- .byte 6
- .byte 0
- .4byte gAspearBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "LEPPA BERRY$", 14
- .2byte ITEM_LEPPA_BERRY
- .2byte 20 @ price
- .byte 7
- .byte 10
- .4byte gLeppaBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_PPRecovery
- .4byte 1
- .4byte ItemUseInBattle_PPRecovery
- .4byte 0
-
- .string "ORAN BERRY$", 14
- .2byte ITEM_ORAN_BERRY
- .2byte 20 @ price
- .byte 1
- .byte 10
- .4byte gOranBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "PERSIM BERRY$", 14
- .2byte ITEM_PERSIM_BERRY
- .2byte 20 @ price
- .byte 8
- .byte 0
- .4byte gPersimBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "LUM BERRY$", 14
- .2byte ITEM_LUM_BERRY
- .2byte 20 @ price
- .byte 9
- .byte 0
- .4byte gLumBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "SITRUS BERRY$", 14
- .2byte ITEM_SITRUS_BERRY
- .2byte 20 @ price
- .byte 1
- .byte 30
- .4byte gSitrusBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_Medicine
- .4byte 1
- .4byte ItemUseInBattle_Medicine
- .4byte 0
-
- .string "FIGY BERRY$", 14
- .2byte ITEM_FIGY_BERRY
- .2byte 20 @ price
- .byte 10
- .byte 8
- .4byte gFigyBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "WIKI BERRY$", 14
- .2byte ITEM_WIKI_BERRY
- .2byte 20 @ price
- .byte 11
- .byte 8
- .4byte gWikiBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MAGO BERRY$", 14
- .2byte ITEM_MAGO_BERRY
- .2byte 20 @ price
- .byte 12
- .byte 8
- .4byte gMagoBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "AGUAV BERRY$", 14
- .2byte ITEM_AGUAV_BERRY
- .2byte 20 @ price
- .byte 13
- .byte 8
- .4byte gAguavBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "IAPAPA BERRY$", 14
- .2byte ITEM_IAPAPA_BERRY
- .2byte 20 @ price
- .byte 14
- .byte 8
- .4byte gIapapaBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RAZZ BERRY$", 14
- .2byte ITEM_RAZZ_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gRazzBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BLUK BERRY$", 14
- .2byte ITEM_BLUK_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gBlukBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "NANAB BERRY$", 14
- .2byte ITEM_NANAB_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gNanabBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "WEPEAR BERRY$", 14
- .2byte ITEM_WEPEAR_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gWepearBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "PINAP BERRY$", 14
- .2byte ITEM_PINAP_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gPinapBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "POMEG BERRY$", 14
- .2byte ITEM_POMEG_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gPomegBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_ReduceEV
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "KELPSY BERRY$", 14
- .2byte ITEM_KELPSY_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gKelpsyBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_ReduceEV
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "QUALOT BERRY$", 14
- .2byte ITEM_QUALOT_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gQualotBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_ReduceEV
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HONDEW BERRY$", 14
- .2byte ITEM_HONDEW_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gHondewBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_ReduceEV
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "GREPA BERRY$", 14
- .2byte ITEM_GREPA_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gGrepaBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_ReduceEV
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TAMATO BERRY$", 14
- .2byte ITEM_TAMATO_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gTamatoBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 1
- .4byte ItemUseOutOfBattle_ReduceEV
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "CORNN BERRY$", 14
- .2byte ITEM_CORNN_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gCornnBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MAGOST BERRY$", 14
- .2byte ITEM_MAGOST_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gMagostBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RABUTA BERRY$", 14
- .2byte ITEM_RABUTA_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gRabutaBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "NOMEL BERRY$", 14
- .2byte ITEM_NOMEL_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gNomelBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SPELON BERRY$", 14
- .2byte ITEM_SPELON_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gSpelonBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "PAMTRE BERRY$", 14
- .2byte ITEM_PAMTRE_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gPamtreBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "WATMEL BERRY$", 14
- .2byte ITEM_WATMEL_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gWatmelBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "DURIN BERRY$", 14
- .2byte ITEM_DURIN_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gDurinBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BELUE BERRY$", 14
- .2byte ITEM_BELUE_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gBelueBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "LIECHI BERRY$", 14
- .2byte ITEM_LIECHI_BERRY
- .2byte 20 @ price
- .byte 15
- .byte 4
- .4byte gLiechiBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "GANLON BERRY$", 14
- .2byte ITEM_GANLON_BERRY
- .2byte 20 @ price
- .byte 16
- .byte 4
- .4byte gGanlonBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SALAC BERRY$", 14
- .2byte ITEM_SALAC_BERRY
- .2byte 20 @ price
- .byte 17
- .byte 4
- .4byte gSalacBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "PETAYA BERRY$", 14
- .2byte ITEM_PETAYA_BERRY
- .2byte 20 @ price
- .byte 18
- .byte 4
- .4byte gPetayaBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "APICOT BERRY$", 14
- .2byte ITEM_APICOT_BERRY
- .2byte 20 @ price
- .byte 19
- .byte 4
- .4byte gApicotBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "LANSAT BERRY$", 14
- .2byte ITEM_LANSAT_BERRY
- .2byte 20 @ price
- .byte 20
- .byte 4
- .4byte gLansatBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "STARF BERRY$", 14
- .2byte ITEM_STARF_BERRY
- .2byte 20 @ price
- .byte 21
- .byte 4
- .4byte gStarfBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "ENIGMA BERRY$", 14
- .2byte ITEM_ENIGMA_BERRY
- .2byte 20 @ price
- .byte 0
- .byte 0
- .4byte gEnigmaBerryItemDescription
- .byte 0
- .byte 0
- .byte POCKET_BERRIES
- .byte 4
- .4byte ItemUseOutOfBattle_EnigmaBerry
- .4byte 1
- .4byte ItemUseInBattle_EnigmaBerry
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BRIGHTPOWDER$", 14
- .2byte ITEM_BRIGHT_POWDER
- .2byte 10 @ price
- .byte 22
- .byte 10
- .4byte gBrightPowderItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "WHITE HERB$", 14
- .2byte ITEM_WHITE_HERB
- .2byte 100 @ price
- .byte 23
- .byte 0
- .4byte gWhiteHerbItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MACHO BRACE$", 14
- .2byte ITEM_MACHO_BRACE
- .2byte 3000 @ price
- .byte 24
- .byte 0
- .4byte gMachoBraceItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "EXP. SHARE$", 14
- .2byte ITEM_EXP_SHARE
- .2byte 3000 @ price
- .byte 25
- .byte 0
- .4byte gExpShareItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "QUICK CLAW$", 14
- .2byte ITEM_QUICK_CLAW
- .2byte 100 @ price
- .byte 26
- .byte 20
- .4byte gQuickClawItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SOOTHE BELL$", 14
- .2byte ITEM_SOOTHE_BELL
- .2byte 100 @ price
- .byte 27
- .byte 0
- .4byte gSootheBellItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MENTAL HERB$", 14
- .2byte ITEM_MENTAL_HERB
- .2byte 100 @ price
- .byte 28
- .byte 0
- .4byte gMentalHerbItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "CHOICE BAND$", 14
- .2byte ITEM_CHOICE_BAND
- .2byte 100 @ price
- .byte 29
- .byte 0
- .4byte gChoiceBandItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "KING’S ROCK$", 14
- .2byte ITEM_KINGS_ROCK
- .2byte 100 @ price
- .byte 30
- .byte 10
- .4byte gKingsRockItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SILVERPOWDER$", 14
- .2byte ITEM_SILVER_POWDER
- .2byte 100 @ price
- .byte 31
- .byte 10
- .4byte gSilverPowderItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "AMULET COIN$", 14
- .2byte ITEM_AMULET_COIN
- .2byte 100 @ price
- .byte 32
- .byte 10
- .4byte gAmuletCoinItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "CLEANSE TAG$", 14
- .2byte ITEM_CLEANSE_TAG
- .2byte 200 @ price
- .byte 33
- .byte 0
- .4byte gCleanseTagItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SOUL DEW$", 14
- .2byte ITEM_SOUL_DEW
- .2byte 200 @ price
- .byte 34
- .byte 0
- .4byte gSoulDewItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "DEEPSEATOOTH$", 14
- .2byte ITEM_DEEP_SEA_TOOTH
- .2byte 200 @ price
- .byte 35
- .byte 0
- .4byte gDeepSeaToothItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "DEEPSEASCALE$", 14
- .2byte ITEM_DEEP_SEA_SCALE
- .2byte 200 @ price
- .byte 36
- .byte 0
- .4byte gDeepSeaScaleItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SMOKE BALL$", 14
- .2byte ITEM_SMOKE_BALL
- .2byte 200 @ price
- .byte 37
- .byte 0
- .4byte gSmokeBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "EVERSTONE$", 14
- .2byte ITEM_EVERSTONE
- .2byte 200 @ price
- .byte 38
- .byte 0
- .4byte gEverstoneItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "FOCUS BAND$", 14
- .2byte ITEM_FOCUS_BAND
- .2byte 200 @ price
- .byte 39
- .byte 10
- .4byte gFocusBandItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "LUCKY EGG$", 14
- .2byte ITEM_LUCKY_EGG
- .2byte 200 @ price
- .byte 40
- .byte 0
- .4byte gLuckyEggItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SCOPE LENS$", 14
- .2byte ITEM_SCOPE_LENS
- .2byte 200 @ price
- .byte 41
- .byte 0
- .4byte gScopeLensItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "METAL COAT$", 14
- .2byte ITEM_METAL_COAT
- .2byte 100 @ price
- .byte 42
- .byte 10
- .4byte gMetalCoatItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "LEFTOVERS$", 14
- .2byte ITEM_LEFTOVERS
- .2byte 200 @ price
- .byte 43
- .byte 10
- .4byte gLeftoversItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "DRAGON SCALE$", 14
- .2byte ITEM_DRAGON_SCALE
- .2byte 2100 @ price
- .byte 44
- .byte 10
- .4byte gDragonScaleItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "LIGHT BALL$", 14
- .2byte ITEM_LIGHT_BALL
- .2byte 100 @ price
- .byte 45
- .byte 0
- .4byte gLightBallItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SOFT SAND$", 14
- .2byte ITEM_SOFT_SAND
- .2byte 100 @ price
- .byte 46
- .byte 10
- .4byte gSoftSandItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HARD STONE$", 14
- .2byte ITEM_HARD_STONE
- .2byte 100 @ price
- .byte 47
- .byte 10
- .4byte gHardStoneItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MIRACLE SEED$", 14
- .2byte ITEM_MIRACLE_SEED
- .2byte 100 @ price
- .byte 48
- .byte 10
- .4byte gMiracleSeedItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BLACKGLASSES$", 14
- .2byte ITEM_BLACK_GLASSES
- .2byte 100 @ price
- .byte 49
- .byte 10
- .4byte gBlackGlassesItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BLACK BELT$", 14
- .2byte ITEM_BLACK_BELT
- .2byte 100 @ price
- .byte 50
- .byte 10
- .4byte gBlackBeltItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MAGNET$", 14
- .2byte ITEM_MAGNET
- .2byte 100 @ price
- .byte 51
- .byte 10
- .4byte gMagnetItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MYSTIC WATER$", 14
- .2byte ITEM_MYSTIC_WATER
- .2byte 100 @ price
- .byte 52
- .byte 10
- .4byte gMysticWaterItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SHARP BEAK$", 14
- .2byte ITEM_SHARP_BEAK
- .2byte 100 @ price
- .byte 53
- .byte 10
- .4byte gSharpBeakItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "POISON BARB$", 14
- .2byte ITEM_POISON_BARB
- .2byte 100 @ price
- .byte 54
- .byte 10
- .4byte gPoisonBarbItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "NEVERMELTICE$", 14
- .2byte ITEM_NEVER_MELT_ICE
- .2byte 100 @ price
- .byte 55
- .byte 10
- .4byte gNeverMeltIceItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SPELL TAG$", 14
- .2byte ITEM_SPELL_TAG
- .2byte 100 @ price
- .byte 56
- .byte 10
- .4byte gSpellTagItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TWISTEDSPOON$", 14
- .2byte ITEM_TWISTED_SPOON
- .2byte 100 @ price
- .byte 57
- .byte 10
- .4byte gTwistedSpoonItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "CHARCOAL$", 14
- .2byte ITEM_CHARCOAL
- .2byte 9800 @ price
- .byte 58
- .byte 10
- .4byte gCharcoalItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "DRAGON FANG$", 14
- .2byte ITEM_DRAGON_FANG
- .2byte 100 @ price
- .byte 59
- .byte 10
- .4byte gDragonFangItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SILK SCARF$", 14
- .2byte ITEM_SILK_SCARF
- .2byte 100 @ price
- .byte 60
- .byte 10
- .4byte gSilkScarfItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "UP-GRADE$", 14
- .2byte ITEM_UP_GRADE
- .2byte 2100 @ price
- .byte 61
- .byte 0
- .4byte gUpGradeItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SHELL BELL$", 14
- .2byte ITEM_SHELL_BELL
- .2byte 200 @ price
- .byte 62
- .byte 8
- .4byte gShellBellItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SEA INCENSE$", 14
- .2byte ITEM_SEA_INCENSE
- .2byte 9600 @ price
- .byte 52
- .byte 5
- .4byte gSeaIncenseItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "LAX INCENSE$", 14
- .2byte ITEM_LAX_INCENSE
- .2byte 9600 @ price
- .byte 22
- .byte 5
- .4byte gLaxIncenseItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "LUCKY PUNCH$", 14
- .2byte ITEM_LUCKY_PUNCH
- .2byte 10 @ price
- .byte 63
- .byte 0
- .4byte gLuckyPunchItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "METAL POWDER$", 14
- .2byte ITEM_METAL_POWDER
- .2byte 10 @ price
- .byte 64
- .byte 0
- .4byte gMetalPowderItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "THICK CLUB$", 14
- .2byte ITEM_THICK_CLUB
- .2byte 500 @ price
- .byte 65
- .byte 0
- .4byte gThickClubItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "STICK$", 14
- .2byte ITEM_STICK
- .2byte 200 @ price
- .byte 66
- .byte 0
- .4byte gStickItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RED SCARF$", 14
- .2byte ITEM_RED_SCARF
- .2byte 100 @ price
- .byte 0
- .byte 0
- .4byte gRedScarfItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BLUE SCARF$", 14
- .2byte ITEM_BLUE_SCARF
- .2byte 100 @ price
- .byte 0
- .byte 0
- .4byte gBlueScarfItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "PINK SCARF$", 14
- .2byte ITEM_PINK_SCARF
- .2byte 100 @ price
- .byte 0
- .byte 0
- .4byte gPinkScarfItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "GREEN SCARF$", 14
- .2byte ITEM_GREEN_SCARF
- .2byte 100 @ price
- .byte 0
- .byte 0
- .4byte gGreenScarfItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "YELLOW SCARF$", 14
- .2byte ITEM_YELLOW_SCARF
- .2byte 100 @ price
- .byte 0
- .byte 0
- .4byte gYellowScarfItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MACH BIKE$", 14
- .2byte ITEM_MACH_BIKE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gMachBikeItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_Bike
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "COIN CASE$", 14
- .2byte ITEM_COIN_CASE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gCoinCaseItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CoinCase
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "ITEMFINDER$", 14
- .2byte ITEM_ITEMFINDER
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gItemfinderItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_Itemfinder
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "OLD ROD$", 14
- .2byte ITEM_OLD_ROD
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gOldRodItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_Rod
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "GOOD ROD$", 14
- .2byte ITEM_GOOD_ROD
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gGoodRodItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_Rod
- .4byte 0
- .4byte NULL
- .4byte 1
-
- .string "SUPER ROD$", 14
- .2byte ITEM_SUPER_ROD
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gSuperRodItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_Rod
- .4byte 0
- .4byte NULL
- .4byte 2
-
- .string "S.S. TICKET$", 14
- .2byte ITEM_SS_TICKET
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gSSTicketItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "CONTEST PASS$", 14
- .2byte ITEM_CONTEST_PASS
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gContestPassItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "WAILMER PAIL$", 14
- .2byte ITEM_WAILMER_PAIL
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gWailmerPailItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_WailmerPail
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "DEVON GOODS$", 14
- .2byte ITEM_DEVON_GOODS
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDevonGoodsItemDescription
- .byte 2
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SOOT SACK$", 14
- .2byte ITEM_SOOT_SACK
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gSootSackItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BASEMENT KEY$", 14
- .2byte ITEM_BASEMENT_KEY
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gBasementKeyItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "ACRO BIKE$", 14
- .2byte ITEM_ACRO_BIKE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gAcroBikeItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_Bike
- .4byte 0
- .4byte NULL
- .4byte 1
-
- .string "{POKEBLOCK} CASE$", 14
- .2byte ITEM_POKEBLOCK_CASE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gPokeblockCaseItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 3
- .4byte ItemUseOutOfBattle_PokeblockCase
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "LETTER$", 14
- .2byte ITEM_LETTER
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gLetterItemDescription
- .byte 2
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "EON TICKET$", 14
- .2byte ITEM_EON_TICKET
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gEonTicketItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 1
-
- .string "RED ORB$", 14
- .2byte ITEM_RED_ORB
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gRedOrbItemDescription
- .byte 2
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BLUE ORB$", 14
- .2byte ITEM_BLUE_ORB
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gBlueOrbItemDescription
- .byte 2
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SCANNER$", 14
- .2byte ITEM_SCANNER
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gScannerItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "GO-GOGGLES$", 14
- .2byte ITEM_GO_GOGGLES
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gGoGogglesItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "METEORITE$", 14
- .2byte ITEM_METEORITE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gMeteoriteItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RM. 1 KEY$", 14
- .2byte ITEM_ROOM_1_KEY
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gRoom1KeyItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RM. 2 KEY$", 14
- .2byte ITEM_ROOM_2_KEY
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gRoom2KeyItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RM. 4 KEY$", 14
- .2byte ITEM_ROOM_4_KEY
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gRoom4KeyItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RM. 6 KEY$", 14
- .2byte ITEM_ROOM_6_KEY
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gRoom6KeyItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "STORAGE KEY$", 14
- .2byte ITEM_STORAGE_KEY
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gStorageKeyItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "ROOT FOSSIL$", 14
- .2byte ITEM_ROOT_FOSSIL
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gRootFossilItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "CLAW FOSSIL$", 14
- .2byte ITEM_CLAW_FOSSIL
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gClawFossilItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "DEVON SCOPE$", 14
- .2byte ITEM_DEVON_SCOPE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDevonScopeItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM01$", 14
- .2byte ITEM_TM01
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM01ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM02$", 14
- .2byte ITEM_TM02
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM02ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM03$", 14
- .2byte ITEM_TM03
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM03ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM04$", 14
- .2byte ITEM_TM04
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM04ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM05$", 14
- .2byte ITEM_TM05
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gTM05ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM06$", 14
- .2byte ITEM_TM06
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM06ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM07$", 14
- .2byte ITEM_TM07
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM07ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM08$", 14
- .2byte ITEM_TM08
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM08ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM09$", 14
- .2byte ITEM_TM09
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM09ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM10$", 14
- .2byte ITEM_TM10
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM10ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM11$", 14
- .2byte ITEM_TM11
- .2byte 2000 @ price
- .byte 0
- .byte 0
- .4byte gTM11ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM12$", 14
- .2byte ITEM_TM12
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM12ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM13$", 14
- .2byte ITEM_TM13
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM13ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM14$", 14
- .2byte ITEM_TM14
- .2byte 5500 @ price
- .byte 0
- .byte 0
- .4byte gTM14ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM15$", 14
- .2byte ITEM_TM15
- .2byte 7500 @ price
- .byte 0
- .byte 0
- .4byte gTM15ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM16$", 14
- .2byte ITEM_TM16
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM16ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM17$", 14
- .2byte ITEM_TM17
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM17ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM18$", 14
- .2byte ITEM_TM18
- .2byte 2000 @ price
- .byte 0
- .byte 0
- .4byte gTM18ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM19$", 14
- .2byte ITEM_TM19
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM19ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM20$", 14
- .2byte ITEM_TM20
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM20ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM21$", 14
- .2byte ITEM_TM21
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gTM21ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM22$", 14
- .2byte ITEM_TM22
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM22ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM23$", 14
- .2byte ITEM_TM23
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM23ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM24$", 14
- .2byte ITEM_TM24
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM24ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM25$", 14
- .2byte ITEM_TM25
- .2byte 5500 @ price
- .byte 0
- .byte 0
- .4byte gTM25ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM26$", 14
- .2byte ITEM_TM26
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM26ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM27$", 14
- .2byte ITEM_TM27
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gTM27ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM28$", 14
- .2byte ITEM_TM28
- .2byte 2000 @ price
- .byte 0
- .byte 0
- .4byte gTM28ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM29$", 14
- .2byte ITEM_TM29
- .2byte 2000 @ price
- .byte 0
- .byte 0
- .4byte gTM29ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM30$", 14
- .2byte ITEM_TM30
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM30ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM31$", 14
- .2byte ITEM_TM31
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM31ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM32$", 14
- .2byte ITEM_TM32
- .2byte 2000 @ price
- .byte 0
- .byte 0
- .4byte gTM32ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM33$", 14
- .2byte ITEM_TM33
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM33ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM34$", 14
- .2byte ITEM_TM34
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM34ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM35$", 14
- .2byte ITEM_TM35
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM35ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM36$", 14
- .2byte ITEM_TM36
- .2byte 1000 @ price
- .byte 0
- .byte 0
- .4byte gTM36ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM37$", 14
- .2byte ITEM_TM37
- .2byte 2000 @ price
- .byte 0
- .byte 0
- .4byte gTM37ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM38$", 14
- .2byte ITEM_TM38
- .2byte 5500 @ price
- .byte 0
- .byte 0
- .4byte gTM38ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM39$", 14
- .2byte ITEM_TM39
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM39ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM40$", 14
- .2byte ITEM_TM40
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM40ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM41$", 14
- .2byte ITEM_TM41
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM41ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM42$", 14
- .2byte ITEM_TM42
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM42ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM43$", 14
- .2byte ITEM_TM43
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM43ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM44$", 14
- .2byte ITEM_TM44
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM44ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM45$", 14
- .2byte ITEM_TM45
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM45ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM46$", 14
- .2byte ITEM_TM46
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM46ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM47$", 14
- .2byte ITEM_TM47
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM47ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM48$", 14
- .2byte ITEM_TM48
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM48ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM49$", 14
- .2byte ITEM_TM49
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM49ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM50$", 14
- .2byte ITEM_TM50
- .2byte 3000 @ price
- .byte 0
- .byte 0
- .4byte gTM50ItemDescription
- .byte 0
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HM01$", 14
- .2byte ITEM_HM01
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gHM01ItemDescription
- .byte 1
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HM02$", 14
- .2byte ITEM_HM02
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gHM02ItemDescription
- .byte 1
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HM03$", 14
- .2byte ITEM_HM03
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gHM03ItemDescription
- .byte 1
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HM04$", 14
- .2byte ITEM_HM04
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gHM04ItemDescription
- .byte 1
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HM05$", 14
- .2byte ITEM_HM05
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gHM05ItemDescription
- .byte 1
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HM06$", 14
- .2byte ITEM_HM06
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gHM06ItemDescription
- .byte 1
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HM07$", 14
- .2byte ITEM_HM07
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gHM07ItemDescription
- .byte 1
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HM08$", 14
- .2byte ITEM_HM08
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gHM08ItemDescription
- .byte 1
- .byte 0
- .byte POCKET_TM_HM
- .byte 1
- .4byte ItemUseOutOfBattle_TMHM
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "????????$", 14
- .2byte ITEM_NONE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDummyItemDescription
- .byte 0
- .byte 0
- .byte POCKET_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "OAK’S PARCEL$", 14
- .2byte ITEM_OAKS_PARCEL
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gOaksParcelItemDescription
- .byte 2
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "POKé FLUTE$", 14
- .2byte ITEM_POKE_FLUTE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gPokeFluteItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SECRET KEY$", 14
- .2byte ITEM_SECRET_KEY
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gSecretKeyItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BIKE VOUCHER$", 14
- .2byte ITEM_BIKE_VOUCHER
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gBikeVoucherItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "GOLD TEETH$", 14
- .2byte ITEM_GOLD_TEETH
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gGoldTeethItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "OLD AMBER$", 14
- .2byte ITEM_OLD_AMBER
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gOldAmberItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "CARD KEY$", 14
- .2byte ITEM_CARD_KEY
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gCardKeyItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "LIFT KEY$", 14
- .2byte ITEM_LIFT_KEY
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gLiftKeyItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "HELIX FOSSIL$", 14
- .2byte ITEM_HELIX_FOSSIL
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gHelixFossilItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "DOME FOSSIL$", 14
- .2byte ITEM_DOME_FOSSIL
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gDomeFossilItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SILPH SCOPE$", 14
- .2byte ITEM_SILPH_SCOPE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gSilphScopeItemDescription
- .byte 1
- .byte 0
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BICYCLE$", 14
- .2byte ITEM_BICYCLE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gBicycleItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TOWN MAP$", 14
- .2byte ITEM_TOWN_MAP
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gTownMapItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "VS SEEKER$", 14
- .2byte ITEM_VS_SEEKER
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gVSSeekerItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "FAME CHECKER$", 14
- .2byte ITEM_FAME_CHECKER
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gFameCheckerItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TM CASE$", 14
- .2byte ITEM_TM_CASE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gTMCaseItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "BERRY POUCH$", 14
- .2byte ITEM_BERRY_POUCH
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gBerryPouchItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TEACHY TV$", 14
- .2byte ITEM_TEACHY_TV
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gTeachyTVItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 2
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TRI-PASS$", 14
- .2byte ITEM_TRI_PASS
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gTriPassItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RAINBOW PASS$", 14
- .2byte ITEM_RAINBOW_PASS
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gRainbowPassItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "TEA$", 14
- .2byte ITEM_TEA
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gTeaItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MYSTICTICKET$", 14
- .2byte ITEM_MYSTIC_TICKET
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gMysticTicketItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "AURORATICKET$", 14
- .2byte ITEM_AURORA_TICKET
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gAuroraTicketItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "POWDER JAR$", 14
- .2byte ITEM_POWDER_JAR
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gPowderJarItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_PowderJar
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "RUBY$", 14
- .2byte ITEM_RUBY
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gRubyItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "SAPPHIRE$", 14
- .2byte ITEM_SAPPHIRE
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gSapphireItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "MAGMA EMBLEM$", 14
- .2byte ITEM_MAGMA_EMBLEM
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gMagmaEmblemItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
-
- .string "OLD SEA MAP$", 14
- .2byte ITEM_OLD_SEA_MAP
- .2byte 0 @ price
- .byte 0
- .byte 0
- .4byte gOldSeaMapItemDescription
- .byte 1
- .byte 1
- .byte POCKET_KEY_ITEMS
- .byte 4
- .4byte ItemUseOutOfBattle_CannotUse
- .4byte 0
- .4byte NULL
- .4byte 0
diff --git a/data/mauville_old_man.s b/data/mauville_old_man.s
deleted file mode 100644
index c1b4dd1be..000000000
--- a/data/mauville_old_man.s
+++ /dev/null
@@ -1,58 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
- .align 2, 0
-
-gUnknown_0859EFE4:: @ 859EFE4
- .2byte 0x2811, 0x1029, 0x1018, 0xE0D, 0x1A1A, 0x1A1D
-
-gUnknown_0859EFF0:: @ 859EFF0
- .4byte gText_SoPretty
- .4byte gText_SoDarling
- .4byte gText_SoRelaxed
- .4byte gText_SoSunny
- .4byte gText_SoDesirable
- .4byte gText_SoExciting
- .4byte gText_SoAmusing
- .4byte gText_SoMagical
-
-gUnknown_0859F010:: @ 859F010
- .4byte gUnknown_08294313
- .4byte gUnknown_08294359
- .4byte gUnknown_08294398
- .4byte gUnknown_082943DA
- .4byte gUnknown_0829441C
- .4byte gUnknown_08294460
- .4byte gUnknown_082944A0
- .4byte gUnknown_082944D5
-
-gUnknown_0859F030:: @ 859F030
- .4byte 0, 12, 13, 18, 19, 21
-
-gUnknown_0859F048:: @ 859F048
- .4byte 0x00000132, MauvilleCity_PokemonCenter_1F_Text_28E930, MauvilleCity_PokemonCenter_1F_Text_28E947, MauvilleCity_PokemonCenter_1F_Text_28E956, 0x00000102, MauvilleCity_PokemonCenter_1F_Text_28E9D7, MauvilleCity_PokemonCenter_1F_Text_28E9EF, MauvilleCity_PokemonCenter_1F_Text_28E9FE
- .4byte 0x00000103, MauvilleCity_PokemonCenter_1F_Text_28EA7D, MauvilleCity_PokemonCenter_1F_Text_28EA98, MauvilleCity_PokemonCenter_1F_Text_28EAA8, 0x00000104, MauvilleCity_PokemonCenter_1F_Text_28EB19, MauvilleCity_PokemonCenter_1F_Text_28EB31, MauvilleCity_PokemonCenter_1F_Text_28EB3E
- .4byte 0x00000106, MauvilleCity_PokemonCenter_1F_Text_28EBB5, MauvilleCity_PokemonCenter_1F_Text_28EBCD, MauvilleCity_PokemonCenter_1F_Text_28EBDD, 0x00000109, MauvilleCity_PokemonCenter_1F_Text_28EC60, MauvilleCity_PokemonCenter_1F_Text_28EC79, MauvilleCity_PokemonCenter_1F_Text_28EC81
- .4byte 0x0000010b, MauvilleCity_PokemonCenter_1F_Text_28ED04, MauvilleCity_PokemonCenter_1F_Text_28ED21, MauvilleCity_PokemonCenter_1F_Text_28ED30, 0x0000010c, MauvilleCity_PokemonCenter_1F_Text_28EDA1, MauvilleCity_PokemonCenter_1F_Text_28EDB5, MauvilleCity_PokemonCenter_1F_Text_28EDCF
- .4byte 0x0000010d, MauvilleCity_PokemonCenter_1F_Text_28EE45, MauvilleCity_PokemonCenter_1F_Text_28EE5D, MauvilleCity_PokemonCenter_1F_Text_28EE6A, 0x0000010e, MauvilleCity_PokemonCenter_1F_Text_28EEDD, MauvilleCity_PokemonCenter_1F_Text_28EEF1, MauvilleCity_PokemonCenter_1F_Text_28EF01
- .4byte 0x0000010f, MauvilleCity_PokemonCenter_1F_Text_28EF73, MauvilleCity_PokemonCenter_1F_Text_28EF95, MauvilleCity_PokemonCenter_1F_Text_28EFAA, 0x00000110, MauvilleCity_PokemonCenter_1F_Text_28F045, MauvilleCity_PokemonCenter_1F_Text_28F05A, MauvilleCity_PokemonCenter_1F_Text_28F071
- .4byte 0x00000111, MauvilleCity_PokemonCenter_1F_Text_28F0F3, MauvilleCity_PokemonCenter_1F_Text_28F10D, MauvilleCity_PokemonCenter_1F_Text_28F125, 0x00000112, MauvilleCity_PokemonCenter_1F_Text_28F1BE, MauvilleCity_PokemonCenter_1F_Text_28F1D5, MauvilleCity_PokemonCenter_1F_Text_28F1DE
- .4byte 0x00000113, MauvilleCity_PokemonCenter_1F_Text_28F24F, MauvilleCity_PokemonCenter_1F_Text_28F269, MauvilleCity_PokemonCenter_1F_Text_28F277, 0x00000114, MauvilleCity_PokemonCenter_1F_Text_28F2FC, MauvilleCity_PokemonCenter_1F_Text_28F314, MauvilleCity_PokemonCenter_1F_Text_28F32A
- .4byte 0x0000011a, MauvilleCity_PokemonCenter_1F_Text_28F3AD, MauvilleCity_PokemonCenter_1F_Text_28F3C6, MauvilleCity_PokemonCenter_1F_Text_28F3D2, 0x0000011b, MauvilleCity_PokemonCenter_1F_Text_28F44B, MauvilleCity_PokemonCenter_1F_Text_28F461, MauvilleCity_PokemonCenter_1F_Text_28F47C
- .4byte 0x0000011c, MauvilleCity_PokemonCenter_1F_Text_28F50C, MauvilleCity_PokemonCenter_1F_Text_28F51B, MauvilleCity_PokemonCenter_1F_Text_28F538, 0x0000021d, MauvilleCity_PokemonCenter_1F_Text_28F5BE, MauvilleCity_PokemonCenter_1F_Text_28F5D1, MauvilleCity_PokemonCenter_1F_Text_28F5F2
- .4byte 0x0000011e, MauvilleCity_PokemonCenter_1F_Text_28F678, MauvilleCity_PokemonCenter_1F_Text_28F694, MauvilleCity_PokemonCenter_1F_Text_28F6B4, 0x00000121, MauvilleCity_PokemonCenter_1F_Text_28F751, MauvilleCity_PokemonCenter_1F_Text_28F76A, MauvilleCity_PokemonCenter_1F_Text_28F776
- .4byte 0x00000124, MauvilleCity_PokemonCenter_1F_Text_28F7F6, MauvilleCity_PokemonCenter_1F_Text_28F811, MauvilleCity_PokemonCenter_1F_Text_28F822, 0x00000125, MauvilleCity_PokemonCenter_1F_Text_28F89C, MauvilleCity_PokemonCenter_1F_Text_28F8AF, MauvilleCity_PokemonCenter_1F_Text_28F8BC
- .4byte 0x00000126, MauvilleCity_PokemonCenter_1F_Text_28F92F, MauvilleCity_PokemonCenter_1F_Text_28F941, MauvilleCity_PokemonCenter_1F_Text_28F949, 0x00000127, MauvilleCity_PokemonCenter_1F_Text_28F9D1, MauvilleCity_PokemonCenter_1F_Text_28F9EA, MauvilleCity_PokemonCenter_1F_Text_28F9FD
- .4byte 0x00000128, MauvilleCity_PokemonCenter_1F_Text_28FA81, MauvilleCity_PokemonCenter_1F_Text_28FA99, MauvilleCity_PokemonCenter_1F_Text_28FAA7, 0x00000129, MauvilleCity_PokemonCenter_1F_Text_28FB1D, MauvilleCity_PokemonCenter_1F_Text_28FB35, MauvilleCity_PokemonCenter_1F_Text_28FB47
- .4byte 0x0000012a, MauvilleCity_PokemonCenter_1F_Text_28FBC4, MauvilleCity_PokemonCenter_1F_Text_28FBD9, MauvilleCity_PokemonCenter_1F_Text_28FBEA, 0x0000012b, MauvilleCity_PokemonCenter_1F_Text_28FC6B, MauvilleCity_PokemonCenter_1F_Text_28FC85, MauvilleCity_PokemonCenter_1F_Text_28FC98
- .4byte 0x0000012c, MauvilleCity_PokemonCenter_1F_Text_28FD1D, MauvilleCity_PokemonCenter_1F_Text_28FD35, MauvilleCity_PokemonCenter_1F_Text_28FD40, 0x0000012d, MauvilleCity_PokemonCenter_1F_Text_28FDA2, MauvilleCity_PokemonCenter_1F_Text_28FDBD, MauvilleCity_PokemonCenter_1F_Text_28FDCE
- .4byte 0x0000012e, MauvilleCity_PokemonCenter_1F_Text_28FE57, MauvilleCity_PokemonCenter_1F_Text_28FE72, MauvilleCity_PokemonCenter_1F_Text_28FE88, 0x0000012f, MauvilleCity_PokemonCenter_1F_Text_28FF0C, MauvilleCity_PokemonCenter_1F_Text_28FF27, MauvilleCity_PokemonCenter_1F_Text_28FF44
- .4byte 0x00000130, MauvilleCity_PokemonCenter_1F_Text_28FFDD, MauvilleCity_PokemonCenter_1F_Text_28FFFA, MauvilleCity_PokemonCenter_1F_Text_29000D
-
-
-gUnknown_0859F278:: @ 859F278
- .4byte 0x00000131, MauvilleCity_PokemonCenter_1F_Text_290097, MauvilleCity_PokemonCenter_1F_Text_2900B5, MauvilleCity_PokemonCenter_1F_Text_2900CB
-
-gUnknown_0859F288:: @ 859F288
- .4byte 0x00000024, 0x00000008
diff --git a/data/scripts/cable_club.inc b/data/scripts/cable_club.inc
index e5b330bf3..bd633a115 100644
--- a/data/scripts/cable_club.inc
+++ b/data/scripts/cable_club.inc
@@ -450,8 +450,8 @@ OldaleTown_PokemonCenter_2F_EventScript_276F60:: @ 8276F60
OldaleTown_PokemonCenter_2F_EventScript_276FBD:: @ 8276FBD
special HealPlayerParty
- special copy_player_party_to_sav1
- special copy_bags_and_unk_data_from_save_blocks
+ special SavePlayerParty
+ special LoadPlayerBag
copyvar VAR_0x4087, VAR_0x8004
messageautoscroll OldaleTown_PokemonCenter_2F_Text_278197
waitmessage
@@ -787,9 +787,9 @@ MossdeepCity_GameCorner_1F_Movement_277360: @ 8277360
gUnknown_08277365:: @ 8277365
lockall
setvar VAR_0x8004, 0
- special sub_813C4BC
+ special ShowLinkBattleRecords
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
diff --git a/data/scripts/maps/BattleFrontier_BattleArenaBattleRoom.inc b/data/scripts/maps/BattleFrontier_BattleArenaBattleRoom.inc
index 52351b549..88a0f9989 100644
--- a/data/scripts/maps/BattleFrontier_BattleArenaBattleRoom.inc
+++ b/data/scripts/maps/BattleFrontier_BattleArenaBattleRoom.inc
@@ -136,8 +136,8 @@ BattleFrontier_BattleArenaBattleRoom_EventScript_257630:: @ 8257630
applymovement 8, BattleFrontier_BattleArenaBattleRoom_Movement_257BEB
waitmovement 0
msgbox BattleFrontier_BattleArenaBattleRoom_Text_257CE9, 4
- special copy_player_party_from_sav1
- special copy_player_party_to_sav1
+ special LoadPlayerParty
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
diff --git a/data/scripts/maps/BattleFrontier_BattleArenaLobby.inc b/data/scripts/maps/BattleFrontier_BattleArenaLobby.inc
index 303a2c4c9..176b153f7 100644
--- a/data/scripts/maps/BattleFrontier_BattleArenaLobby.inc
+++ b/data/scripts/maps/BattleFrontier_BattleArenaLobby.inc
@@ -89,7 +89,7 @@ BattleFrontier_BattleArenaLobby_EventScript_255D2B:: @ 8255D2B
BattleFrontier_BattleArenaLobby_EventScript_255D59:: @ 8255D59
setvar VAR_0x8004, 8
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
special HealPlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 0
@@ -134,7 +134,7 @@ BattleFrontier_BattleArenaLobby_EventScript_255DF4:: @ 8255DF4
faceplayer
setvar VAR_FRONTIER_FACILITY, 3
setvar VAR_0x40CE, 0
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox BattleFrontier_BattleArenaLobby_Text_256166, 4
BattleFrontier_BattleArenaLobby_EventScript_255E0B:: @ 8255E0B
@@ -196,7 +196,7 @@ BattleFrontier_BattleArenaLobby_EventScript_255EE8:: @ 8255EE8
setvar VAR_0x8005, 3
setvar VAR_0x8006, 0
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
call BattleFrontier_BattleArenaLobby_EventScript_27134F
@@ -205,7 +205,7 @@ BattleFrontier_BattleArenaLobby_EventScript_255EE8:: @ 8255EE8
goto_eq BattleFrontier_BattleArenaLobby_EventScript_255FE1
BattleFrontier_BattleArenaLobby_EventScript_255F54:: @ 8255F54
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -248,7 +248,7 @@ BattleFrontier_BattleArenaLobby_EventScript_255FE1:: @ 8255FE1
goto BattleFrontier_BattleArenaLobby_EventScript_255FFB
BattleFrontier_BattleArenaLobby_EventScript_255FF8:: @ 8255FF8
- special copy_player_party_from_sav1
+ special LoadPlayerParty
BattleFrontier_BattleArenaLobby_EventScript_255FFB:: @ 8255FFB
msgbox BattleFrontier_BattleArenaLobby_Text_25621F, 4
@@ -348,7 +348,7 @@ BattleFrontier_BattleArenaLobby_EventScript_256092:: @ 8256092
setvar VAR_0x8005, 3
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
diff --git a/data/scripts/maps/BattleFrontier_BattleDomeLobby.inc b/data/scripts/maps/BattleFrontier_BattleDomeLobby.inc
index 33b5654d0..f985606de 100644
--- a/data/scripts/maps/BattleFrontier_BattleDomeLobby.inc
+++ b/data/scripts/maps/BattleFrontier_BattleDomeLobby.inc
@@ -76,7 +76,7 @@ BattleFrontier_BattleDomeLobby_EventScript_2498C9:: @ 82498C9
msgbox BattleFrontier_BattleDomeLobby_Text_241520, 9
message BattleFrontier_BattleDomeLobby_Text_24A5D6
waitmessage
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -94,7 +94,7 @@ BattleFrontier_BattleDomeLobby_EventScript_2498C9:: @ 82498C9
setvar VAR_0x8005, 1
setvar VAR_0x8006, 1
special sub_818E9AC
- special copy_player_party_from_sav1
+ special LoadPlayerParty
special HealPlayerParty
goto BattleFrontier_BattleDomeLobby_EventScript_249991
@@ -103,7 +103,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249940:: @ 8249940
msgbox BattleFrontier_BattleDomeLobby_Text_24A5BF, 4
message BattleFrontier_BattleDomeLobby_Text_24A5D6
waitmessage
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -117,7 +117,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249940:: @ 8249940
setvar VAR_0x8005, 6
setvar VAR_0x8006, 1
special sub_818E9AC
- special copy_player_party_from_sav1
+ special LoadPlayerParty
special HealPlayerParty
BattleFrontier_BattleDomeLobby_EventScript_249991:: @ 8249991
@@ -181,7 +181,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249A47:: @ 8249A47
end
BattleFrontier_BattleDomeLobby_EventScript_249A59:: @ 8249A59
- special copy_player_party_to_sav1
+ special SavePlayerParty
compare VAR_0x40CE, 0
call_if 1, BattleFrontier_BattleDomeLobby_EventScript_249CFD
compare VAR_0x40CE, 1
@@ -245,7 +245,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249B60:: @ 8249B60
setvar VAR_0x8005, 3
setvar VAR_0x8006, 0
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
call BattleFrontier_BattleDomeLobby_EventScript_27134F
@@ -256,7 +256,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249B60:: @ 8249B60
special sub_818E9AC
BattleFrontier_BattleDomeLobby_EventScript_249BC2:: @ 8249BC2
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -299,7 +299,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249C4A:: @ 8249C4A
goto BattleFrontier_BattleDomeLobby_EventScript_249C64
BattleFrontier_BattleDomeLobby_EventScript_249C61:: @ 8249C61
- special copy_player_party_from_sav1
+ special LoadPlayerParty
BattleFrontier_BattleDomeLobby_EventScript_249C64:: @ 8249C64
msgbox BattleFrontier_BattleDomeLobby_Text_249F74, 4
@@ -415,7 +415,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249D52:: @ 8249D52
setvar VAR_0x8006, 0
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
@@ -426,7 +426,7 @@ BattleFrontier_BattleDomeLobby_EventScript_249D6B:: @ 8249D6B
setvar VAR_0x8006, 1
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
diff --git a/data/scripts/maps/BattleFrontier_BattleDomePreBattleRoom.inc b/data/scripts/maps/BattleFrontier_BattleDomePreBattleRoom.inc
index 5de099292..a9b6af7f7 100644
--- a/data/scripts/maps/BattleFrontier_BattleDomePreBattleRoom.inc
+++ b/data/scripts/maps/BattleFrontier_BattleDomePreBattleRoom.inc
@@ -243,7 +243,7 @@ BattleFrontier_BattleDomePreBattleRoom_EventScript_24B5BE:: @ 824B5BE
BattleFrontier_BattleDomePreBattleRoom_EventScript_24B5C7:: @ 824B5C7
setvar VAR_0x4000, 1
msgbox BattleFrontier_BattleDomePreBattleRoom_Text_24B760, 4
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
diff --git a/data/scripts/maps/BattleFrontier_BattleFactoryLobby.inc b/data/scripts/maps/BattleFrontier_BattleFactoryLobby.inc
index 791a666d5..4a52743a5 100644
--- a/data/scripts/maps/BattleFrontier_BattleFactoryLobby.inc
+++ b/data/scripts/maps/BattleFrontier_BattleFactoryLobby.inc
@@ -74,7 +74,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_2584C6:: @ 82584C6
waitmessage
setvar VAR_0x8004, 8
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 0
special sub_81A5E74
@@ -89,7 +89,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_258506:: @ 8258506
waitmessage
setvar VAR_0x8004, 8
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x8004, 2
setvar VAR_0x8005, 2
setvar VAR_0x8006, 0
@@ -154,7 +154,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_2585DD:: @ 82585DD
end
BattleFrontier_BattleFactoryLobby_EventScript_2585ED:: @ 82585ED
- special copy_player_party_to_sav1
+ special SavePlayerParty
compare VAR_0x40CE, 0
call_if 1, BattleFrontier_BattleFactoryLobby_EventScript_2587B1
compare VAR_0x40CE, 1
@@ -215,7 +215,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_2586B9:: @ 82586B9
setvar VAR_0x8006, 0
BattleFrontier_BattleFactoryLobby_EventScript_25871A:: @ 825871A
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox BattleFrontier_BattleFactoryLobby_Text_258CB1, 4
closemessage
compare VAR_0x40CE, 0
@@ -253,7 +253,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_258783:: @ 8258783
goto BattleFrontier_BattleFactoryLobby_EventScript_25879D
BattleFrontier_BattleFactoryLobby_EventScript_25879A:: @ 825879A
- special copy_player_party_from_sav1
+ special LoadPlayerParty
BattleFrontier_BattleFactoryLobby_EventScript_25879D:: @ 825879D
msgbox BattleFrontier_BattleFactoryLobby_Text_258BC5, 4
@@ -305,7 +305,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_2587E1:: @ 82587E1
setvar VAR_0x8006, 0
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
@@ -316,7 +316,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_2587FA:: @ 82587FA
setvar VAR_0x8006, 1
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
diff --git a/data/scripts/maps/BattleFrontier_BattleFactoryPreBattleRoom.inc b/data/scripts/maps/BattleFrontier_BattleFactoryPreBattleRoom.inc
index 4c0528e34..2f5cdeef2 100644
--- a/data/scripts/maps/BattleFrontier_BattleFactoryPreBattleRoom.inc
+++ b/data/scripts/maps/BattleFrontier_BattleFactoryPreBattleRoom.inc
@@ -236,7 +236,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E47:: @ 8259E47
end
BattleFrontier_BattleFactoryPreBattleRoom_EventScript_259E69:: @ 8259E69
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 10
setvar VAR_0x8005, 0
special sub_81A5E74
diff --git a/data/scripts/maps/BattleFrontier_BattlePalaceBattleRoom.inc b/data/scripts/maps/BattleFrontier_BattlePalaceBattleRoom.inc
index ccd285a3a..8393d7501 100644
--- a/data/scripts/maps/BattleFrontier_BattlePalaceBattleRoom.inc
+++ b/data/scripts/maps/BattleFrontier_BattlePalaceBattleRoom.inc
@@ -93,8 +93,8 @@ BattleFrontier_BattlePalaceBattleRoom_EventScript_24F911:: @ 824F911
applymovement 3, BattleFrontier_BattlePalaceBattleRoom_Movement_24FEAC
waitmovement 0
msgbox BattleFrontier_BattlePalaceBattleRoom_Text_24FF00, 4
- special copy_player_party_from_sav1
- special copy_player_party_to_sav1
+ special LoadPlayerParty
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
diff --git a/data/scripts/maps/BattleFrontier_BattlePalaceLobby.inc b/data/scripts/maps/BattleFrontier_BattlePalaceLobby.inc
index 2e0f152b4..11fc42ced 100644
--- a/data/scripts/maps/BattleFrontier_BattlePalaceLobby.inc
+++ b/data/scripts/maps/BattleFrontier_BattlePalaceLobby.inc
@@ -89,7 +89,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D873:: @ 824D873
BattleFrontier_BattlePalaceLobby_EventScript_24D8A1:: @ 824D8A1
setvar VAR_0x8004, 8
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
special HealPlayerParty
setvar VAR_0x8004, 7
setvar VAR_0x8005, 0
@@ -152,7 +152,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24D968:: @ 824D968
special sub_8195960
compare VAR_RESULT, 0
goto_if 5, BattleFrontier_BattlePalaceLobby_EventScript_24D817
- special copy_player_party_to_sav1
+ special SavePlayerParty
compare VAR_0x40CE, 0
call_if 1, BattleFrontier_BattlePalaceLobby_EventScript_24DB9E
compare VAR_0x40CE, 1
@@ -220,7 +220,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DA87:: @ 824DA87
setvar VAR_0x8005, 3
setvar VAR_0x8006, 0
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
call BattleFrontier_BattlePalaceLobby_EventScript_27134F
@@ -229,7 +229,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DA87:: @ 824DA87
goto_eq BattleFrontier_BattlePalaceLobby_EventScript_24DB7A
BattleFrontier_BattlePalaceLobby_EventScript_24DAF3:: @ 824DAF3
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -272,7 +272,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DB7A:: @ 824DB7A
goto BattleFrontier_BattlePalaceLobby_EventScript_24DB94
BattleFrontier_BattlePalaceLobby_EventScript_24DB91:: @ 824DB91
- special copy_player_party_from_sav1
+ special LoadPlayerParty
BattleFrontier_BattlePalaceLobby_EventScript_24DB94:: @ 824DB94
msgbox BattleFrontier_BattlePalaceLobby_Text_24E0D8, 4
@@ -366,7 +366,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DC50:: @ 824DC50
setvar VAR_0x8006, 0
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
@@ -377,7 +377,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_24DC69:: @ 824DC69
setvar VAR_0x8006, 1
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
diff --git a/data/scripts/maps/BattleFrontier_BattlePikeLobby.inc b/data/scripts/maps/BattleFrontier_BattlePikeLobby.inc
index 40b5e437f..f78cec646 100644
--- a/data/scripts/maps/BattleFrontier_BattlePikeLobby.inc
+++ b/data/scripts/maps/BattleFrontier_BattlePikeLobby.inc
@@ -76,7 +76,7 @@ BattleFrontier_BattlePikeLobby_EventScript_25B78D:: @ 825B78D
setvar VAR_0x8005, 3
copyvar VAR_0x8006, VAR_RESULT
special sub_81A703C
- special copy_player_party_from_sav1
+ special LoadPlayerParty
special HealPlayerParty
setvar VAR_0x8004, 27
special sub_81A703C
@@ -107,7 +107,7 @@ BattleFrontier_BattlePikeLobby_EventScript_25B806:: @ 825B806
setvar VAR_0x8005, 4
setvar VAR_0x8006, 0
special sub_81A703C
- special copy_player_party_from_sav1
+ special LoadPlayerParty
special HealPlayerParty
setvar VAR_0x8004, 27
special sub_81A703C
@@ -127,7 +127,7 @@ BattleFrontier_BattlePikeLobby_EventScript_25B868:: @ 825B868
faceplayer
setvar VAR_FRONTIER_FACILITY, 5
setvar VAR_0x40CE, 0
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox BattleFrontier_BattlePikeLobby_Text_25BB52, 4
BattleFrontier_BattlePikeLobby_EventScript_25B87F:: @ 825B87F
@@ -192,7 +192,7 @@ BattleFrontier_BattlePikeLobby_EventScript_25B95C:: @ 825B95C
setvar VAR_0x8005, 3
setvar VAR_0x8006, 0
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
call BattleFrontier_BattlePikeLobby_EventScript_27134F
@@ -201,7 +201,7 @@ BattleFrontier_BattlePikeLobby_EventScript_25B95C:: @ 825B95C
special sub_81A703C
compare VAR_RESULT, 0
goto_eq BattleFrontier_BattlePikeLobby_EventScript_25BA5C
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -242,7 +242,7 @@ BattleFrontier_BattlePikeLobby_EventScript_25BA5C:: @ 825BA5C
goto BattleFrontier_BattlePikeLobby_EventScript_25BA76
BattleFrontier_BattlePikeLobby_EventScript_25BA73:: @ 825BA73
- special copy_player_party_from_sav1
+ special LoadPlayerParty
BattleFrontier_BattlePikeLobby_EventScript_25BA76:: @ 825BA76
msgbox BattleFrontier_BattlePikeLobby_Text_25BE02, 4
@@ -257,7 +257,7 @@ BattleFrontier_BattlePikeLobby_EventScript_25BA80:: @ 825BA80
setvar VAR_0x8005, 5
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
diff --git a/data/scripts/maps/BattleFrontier_BattlePikeThreePathRoom.inc b/data/scripts/maps/BattleFrontier_BattlePikeThreePathRoom.inc
index 74da4c01c..d4723acc7 100644
--- a/data/scripts/maps/BattleFrontier_BattlePikeThreePathRoom.inc
+++ b/data/scripts/maps/BattleFrontier_BattlePikeThreePathRoom.inc
@@ -45,7 +45,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25C8A4:: @ 825C8A4
setvar VAR_0x8006, 0
special sub_81A1780
setvar VAR_0x4000, 255
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -136,7 +136,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_25C9FD:: @ 825C9FD
special sub_81A1780
message BattleFrontier_BattlePikeThreePathRoom_Text_25CE08
waitmessage
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x8004, 8
setvar VAR_0x8005, 2
special sub_81A703C
diff --git a/data/scripts/maps/BattleFrontier_BattlePyramidEmptySquare.inc b/data/scripts/maps/BattleFrontier_BattlePyramidEmptySquare.inc
index b7dc59257..29485ef12 100644
--- a/data/scripts/maps/BattleFrontier_BattlePyramidEmptySquare.inc
+++ b/data/scripts/maps/BattleFrontier_BattlePyramidEmptySquare.inc
@@ -99,7 +99,7 @@ BattleFrontier_BattlePyramidEmptySquare_EventScript_252B8D:: @ 8252B8D
setvar VAR_0x8004, 3
setvar VAR_0x8005, 1
special sub_81A8E7C
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 2
setvar VAR_0x8005, 0
setvar VAR_0x8006, 0
diff --git a/data/scripts/maps/BattleFrontier_BattlePyramidLobby.inc b/data/scripts/maps/BattleFrontier_BattlePyramidLobby.inc
index 9455479a7..eab2bb18c 100644
--- a/data/scripts/maps/BattleFrontier_BattlePyramidLobby.inc
+++ b/data/scripts/maps/BattleFrontier_BattlePyramidLobby.inc
@@ -67,7 +67,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA
clearflag FLAG_SPECIAL_FLAG_0x4004
setvar VAR_0x8004, 8
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x8004, 14
special sub_81A8E7C
special HealPlayerParty
@@ -97,7 +97,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2507DA:: @ 82507DA
BattleFrontier_BattlePyramidLobby_EventScript_250852:: @ 8250852
setvar VAR_0x8004, 8
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x8004, 14
special sub_81A8E7C
special HealPlayerParty
@@ -131,7 +131,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2508B1:: @ 82508B1
faceplayer
setvar VAR_FRONTIER_FACILITY, 6
setvar VAR_0x40CE, 0
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox BattleFrontier_BattlePyramidLobby_Text_250F31, 4
BattleFrontier_BattlePyramidLobby_EventScript_2508C8:: @ 82508C8
@@ -197,7 +197,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2509A5:: @ 82509A5
special sub_81A8E7C
setvar VAR_0x8004, 9
special sub_81A8E7C
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
call BattleFrontier_BattlePyramidLobby_EventScript_27134F
@@ -206,7 +206,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_2509A5:: @ 82509A5
goto_eq BattleFrontier_BattlePyramidLobby_EventScript_250AAA
BattleFrontier_BattlePyramidLobby_EventScript_250A21:: @ 8250A21
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -249,7 +249,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_250AAA:: @ 8250AAA
goto BattleFrontier_BattlePyramidLobby_EventScript_250AC4
BattleFrontier_BattlePyramidLobby_EventScript_250AC1:: @ 8250AC1
- special copy_player_party_from_sav1
+ special LoadPlayerParty
BattleFrontier_BattlePyramidLobby_EventScript_250AC4:: @ 8250AC4
msgbox BattleFrontier_BattlePyramidLobby_Text_250FE5, 4
@@ -428,7 +428,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_250D42:: @ 8250D42
setvar VAR_0x8005, 6
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
diff --git a/data/scripts/maps/BattleFrontier_BattlePyramidTop.inc b/data/scripts/maps/BattleFrontier_BattlePyramidTop.inc
index 3ba3a5a6a..07e66efa8 100644
--- a/data/scripts/maps/BattleFrontier_BattlePyramidTop.inc
+++ b/data/scripts/maps/BattleFrontier_BattlePyramidTop.inc
@@ -72,7 +72,7 @@ BattleFrontier_BattlePyramidTop_EventScript_255193:: @ 8255193
setvar VAR_0x8004, 3
setvar VAR_0x8005, 1
special sub_81A8E7C
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 2
setvar VAR_0x8005, 0
setvar VAR_0x8006, 0
diff --git a/data/scripts/maps/BattleFrontier_BattleTowerBattleRoom2.inc b/data/scripts/maps/BattleFrontier_BattleTowerBattleRoom2.inc
index feaa18c8d..ec2994591 100644
--- a/data/scripts/maps/BattleFrontier_BattleTowerBattleRoom2.inc
+++ b/data/scripts/maps/BattleFrontier_BattleTowerBattleRoom2.inc
@@ -153,7 +153,7 @@ BattleFrontier_BattleTowerBattleRoom2_EventScript_249118:: @ 8249118
delay 48
BattleFrontier_BattleTowerBattleRoom2_EventScript_249121:: @ 8249121
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 2
special sub_81A1780
diff --git a/data/scripts/maps/BattleFrontier_BattleTowerLobby.inc b/data/scripts/maps/BattleFrontier_BattleTowerLobby.inc
index def3dd122..774507df9 100644
--- a/data/scripts/maps/BattleFrontier_BattleTowerLobby.inc
+++ b/data/scripts/maps/BattleFrontier_BattleTowerLobby.inc
@@ -152,7 +152,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E84D:: @ 823E84D
waitmessage
setvar VAR_0x8004, 8
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
special HealPlayerParty
setvar VAR_0x8004, 6
setvar VAR_0x8005, 0
@@ -240,7 +240,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23E936:: @ 823E936
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 0
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox BattleFrontier_BattleTowerLobby_Text_240537, 4
BattleFrontier_BattleTowerLobby_EventScript_23E948:: @ 823E948
@@ -299,7 +299,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EA2A:: @ 823EA2A
setvar VAR_0x8005, 3
setvar VAR_0x8006, 0
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
call BattleFrontier_BattleTowerLobby_EventScript_27134F
@@ -320,7 +320,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EA9F:: @ 823EA9F
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 0
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox BattleFrontier_BattleTowerLobby_Text_2407E2, 4
BattleFrontier_BattleTowerLobby_EventScript_23EAB1:: @ 823EAB1
@@ -379,7 +379,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EB93:: @ 823EB93
setvar VAR_0x8005, 3
setvar VAR_0x8006, 0
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
call BattleFrontier_BattleTowerLobby_EventScript_27134F
@@ -401,7 +401,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EC08:: @ 823EC08
faceplayer
setvar VAR_FRONTIER_FACILITY, 0
clearflag FLAG_0x152
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox BattleFrontier_BattleTowerLobby_Text_240A8B, 4
BattleFrontier_BattleTowerLobby_EventScript_23EC1D:: @ 823EC1D
@@ -460,7 +460,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23ECFF:: @ 823ECFF
setvar VAR_0x8005, 3
setvar VAR_0x8006, 0
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
call BattleFrontier_BattleTowerLobby_EventScript_27134F
@@ -481,7 +481,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23ED74:: @ 823ED74
lock
faceplayer
setvar VAR_FRONTIER_FACILITY, 0
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox BattleFrontier_BattleTowerLobby_Text_240E15, 4
BattleFrontier_BattleTowerLobby_EventScript_23ED86:: @ 823ED86
@@ -540,7 +540,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EE68:: @ 823EE68
setvar VAR_0x8005, 3
setvar VAR_0x8006, 0
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
setvar VAR_0x8004, 6
@@ -636,7 +636,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EFC7:: @ 823EFC7
setvar VAR_0x8006, 0
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
@@ -647,7 +647,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EFE0:: @ 823EFE0
setvar VAR_0x8006, 1
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
@@ -658,7 +658,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23EFF9:: @ 823EFF9
setvar VAR_0x8006, 2
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
@@ -669,7 +669,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F012:: @ 823F012
setvar VAR_0x8006, 3
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
@@ -722,7 +722,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F0D0:: @ 823F0D0
end
BattleFrontier_BattleTowerLobby_EventScript_23F0E3:: @ 823F0E3
- special copy_player_party_from_sav1
+ special LoadPlayerParty
BattleFrontier_BattleTowerLobby_EventScript_23F0E6:: @ 823F0E6
special CloseLink
@@ -733,7 +733,7 @@ BattleFrontier_BattleTowerLobby_EventScript_23F0F1:: @ 823F0F1
end
BattleFrontier_BattleTowerLobby_EventScript_23F0F3:: @ 823F0F3
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 3
call BattleFrontier_BattleTowerLobby_EventScript_23F272
special sub_81A1780
diff --git a/data/scripts/maps/BattleFrontier_RankingHall.inc b/data/scripts/maps/BattleFrontier_RankingHall.inc
index b13bfe343..e469024e9 100644
--- a/data/scripts/maps/BattleFrontier_RankingHall.inc
+++ b/data/scripts/maps/BattleFrontier_RankingHall.inc
@@ -66,7 +66,7 @@ BattleFrontier_RankingHall_EventScript_25E522:: @ 825E522
waitbuttonpress
special sub_81A4AE8
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
diff --git a/data/scripts/maps/FallarborTown_BattleTentBattleRoom.inc b/data/scripts/maps/FallarborTown_BattleTentBattleRoom.inc
index b4d0a5d9c..16cb9fff5 100644
--- a/data/scripts/maps/FallarborTown_BattleTentBattleRoom.inc
+++ b/data/scripts/maps/FallarborTown_BattleTentBattleRoom.inc
@@ -72,7 +72,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_20097E:: @ 820097E
setvar VAR_0x8005, 0
setvar VAR_0x8006, 4
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
warp FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
waitstate
@@ -103,8 +103,8 @@ FallarborTown_BattleTentBattleRoom_EventScript_2009B3:: @ 82009B3
applymovement 1, FallarborTown_BattleTentBattleRoom_Movement_200B94
waitmovement 0
msgbox FallarborTown_BattleTentBattleRoom_Text_257CE9, 4
- special copy_player_party_from_sav1
- special copy_player_party_to_sav1
+ special LoadPlayerParty
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -157,7 +157,7 @@ FallarborTown_BattleTentBattleRoom_EventScript_200AF3:: @ 8200AF3
setvar VAR_0x8005, 0
setvar VAR_0x8006, 3
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
warp FALLARBOR_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
waitstate
setvar VAR_0x8004, 1
diff --git a/data/scripts/maps/FallarborTown_BattleTentLobby.inc b/data/scripts/maps/FallarborTown_BattleTentLobby.inc
index 347c55659..78a067a55 100644
--- a/data/scripts/maps/FallarborTown_BattleTentLobby.inc
+++ b/data/scripts/maps/FallarborTown_BattleTentLobby.inc
@@ -134,7 +134,7 @@ FallarborTown_BattleTentLobby_EventScript_200001:: @ 8200001
special sub_81B9B80
compare VAR_RESULT, 0
goto_if 5, FallarborTown_BattleTentLobby_EventScript_1FFF84
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox FallarborTown_BattleTentLobby_Text_2C47EB, 4
FallarborTown_BattleTentLobby_EventScript_200021:: @ 8200021
@@ -188,7 +188,7 @@ FallarborTown_BattleTentLobby_EventScript_2000E2:: @ 82000E2
setvar VAR_0x8005, 3
setvar VAR_0x8006, 0
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
call FallarborTown_BattleTentLobby_EventScript_27134F
@@ -197,7 +197,7 @@ FallarborTown_BattleTentLobby_EventScript_2000E2:: @ 82000E2
goto_eq FallarborTown_BattleTentLobby_EventScript_2001AB
FallarborTown_BattleTentLobby_EventScript_20013C:: @ 820013C
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -234,7 +234,7 @@ FallarborTown_BattleTentLobby_EventScript_2001AB:: @ 82001AB
goto FallarborTown_BattleTentLobby_EventScript_2001C5
FallarborTown_BattleTentLobby_EventScript_2001C2:: @ 82001C2
- special copy_player_party_from_sav1
+ special LoadPlayerParty
FallarborTown_BattleTentLobby_EventScript_2001C5:: @ 82001C5
msgbox FallarborTown_BattleTentLobby_Text_2C487F, 4
diff --git a/data/scripts/maps/LilycoveCity_ContestLobby.inc b/data/scripts/maps/LilycoveCity_ContestLobby.inc
index beb96e171..4a7279fb2 100644
--- a/data/scripts/maps/LilycoveCity_ContestLobby.inc
+++ b/data/scripts/maps/LilycoveCity_ContestLobby.inc
@@ -554,7 +554,7 @@ LilycoveCity_ContestLobby_EventScript_21A77A:: @ 821A77A
lockall
special ShowBerryBlenderRecordWindow
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
@@ -564,7 +564,7 @@ LilycoveCity_ContestLobby_EventScript_21A784:: @ 821A784
setvar VAR_0x8005, 7
special sub_81A1780
waitbuttonpress
- special sub_813C5A0
+ special RemoveRecordsWindow
releaseall
end
diff --git a/data/scripts/maps/MauvilleCity_BikeShop.inc b/data/scripts/maps/MauvilleCity_BikeShop.inc
index d4915a478..0231e5bde 100644
--- a/data/scripts/maps/MauvilleCity_BikeShop.inc
+++ b/data/scripts/maps/MauvilleCity_BikeShop.inc
@@ -58,7 +58,7 @@ MauvilleCity_BikeShop_EventScript_20EC6D:: @ 820EC6D
MauvilleCity_BikeShop_EventScript_20EC87:: @ 820EC87
msgbox MauvilleCity_BikeShop_Text_20F1BD, 4
- special sub_80D6EDC
+ special SwapRegisteredBike
release
end
diff --git a/data/scripts/maps/MauvilleCity_PokemonCenter_1F.inc b/data/scripts/maps/MauvilleCity_PokemonCenter_1F.inc
index 9b8561873..03b7928aa 100644
--- a/data/scripts/maps/MauvilleCity_PokemonCenter_1F.inc
+++ b/data/scripts/maps/MauvilleCity_PokemonCenter_1F.inc
@@ -10,7 +10,7 @@ MauvilleCity_PokemonCenter_1F_MapScript1_210E66: @ 8210E66
end
MauvilleCity_PokemonCenter_1F_EventScript_210E74:: @ 8210E74
- special sub_8120B5C
+ special ScrSpecial_SetMauvilleOldManMapObjGfx
end
MauvilleCity_PokemonCenter_1F_EventScript_210E78:: @ 8210E78
diff --git a/data/scripts/maps/MossdeepCity_SpaceCenter_2F.inc b/data/scripts/maps/MossdeepCity_SpaceCenter_2F.inc
index b23da6481..cee99c4d5 100644
--- a/data/scripts/maps/MossdeepCity_SpaceCenter_2F.inc
+++ b/data/scripts/maps/MossdeepCity_SpaceCenter_2F.inc
@@ -250,13 +250,13 @@ MossdeepCity_SpaceCenter_2F_EventScript_223FDA:: @ 8223FDA
MossdeepCity_SpaceCenter_2F_EventScript_22400C:: @ 822400C
applymovement VAR_LAST_TALKED, MossdeepCity_SpaceCenter_2F_Movement_2725AA
waitmovement 0
- special copy_player_party_to_sav1
+ special SavePlayerParty
fadescreen 1
special sub_80F9438
waitstate
compare VAR_RESULT, 0
goto_if 5, MossdeepCity_SpaceCenter_2F_EventScript_224032
- special copy_player_party_from_sav1
+ special LoadPlayerParty
goto MossdeepCity_SpaceCenter_2F_EventScript_223FDA
MossdeepCity_SpaceCenter_2F_EventScript_224032:: @ 8224032
@@ -270,7 +270,7 @@ MossdeepCity_SpaceCenter_2F_EventScript_224032:: @ 8224032
waitstate
setvar VAR_0x8004, 6
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
switch VAR_RESULT
case 1, MossdeepCity_SpaceCenter_2F_EventScript_224071
fadescreen 1
diff --git a/data/scripts/maps/PetalburgCity.inc b/data/scripts/maps/PetalburgCity.inc
index 0da686052..c297d61a7 100644
--- a/data/scripts/maps/PetalburgCity.inc
+++ b/data/scripts/maps/PetalburgCity.inc
@@ -30,7 +30,7 @@ PetalburgCity_MapScript2_1DC31C: @ 81DC31C
PetalburgCity_EventScript_1DC32E:: @ 81DC32E
lockall
- special copy_player_party_to_sav1
+ special SavePlayerParty
special PutZigzagoonInPlayerParty
applymovement 2, PetalburgCity_Movement_1DC451
applymovement 255, PetalburgCity_Movement_1DC430
@@ -47,7 +47,7 @@ PetalburgCity_EventScript_1DC32E:: @ 81DC32E
setvar VAR_0x4057, 3
fadedefaultbgm
clearflag FLAG_SPECIAL_FLAG_0x4001
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x4085, 1
warp PETALBURG_CITY_GYM, 255, 4, 108
waitstate
diff --git a/data/scripts/maps/SlateportCity_BattleTentBattleRoom.inc b/data/scripts/maps/SlateportCity_BattleTentBattleRoom.inc
index e0c6da76c..e52828a19 100644
--- a/data/scripts/maps/SlateportCity_BattleTentBattleRoom.inc
+++ b/data/scripts/maps/SlateportCity_BattleTentBattleRoom.inc
@@ -67,7 +67,7 @@ SlateportCity_BattleTentCorridor_EventScript_209A1B:: @ 8209A1B
setvar VAR_0x8005, 0
setvar VAR_0x8006, 4
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
warp SLATEPORT_CITY_BATTLE_TENT_LOBBY, 255, 6, 6
waitstate
@@ -93,7 +93,7 @@ SlateportCity_BattleTentCorridor_EventScript_209A7B:: @ 8209A7B
setvar VAR_0x8005, 0
setvar VAR_0x8006, 3
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
warp SLATEPORT_CITY_BATTLE_TENT_LOBBY, 255, 6, 6
waitstate
@ forced stop
diff --git a/data/scripts/maps/SlateportCity_BattleTentCorridor.inc b/data/scripts/maps/SlateportCity_BattleTentCorridor.inc
index 6a0bafb45..b293dc140 100644
--- a/data/scripts/maps/SlateportCity_BattleTentCorridor.inc
+++ b/data/scripts/maps/SlateportCity_BattleTentCorridor.inc
@@ -140,7 +140,7 @@ SlateportCity_BattleTentCorridor_EventScript_209022:: @ 8209022
end
SlateportCity_BattleTentCorridor_EventScript_209044:: @ 8209044
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 10
setvar VAR_0x8005, 0
special sub_81A5E74
diff --git a/data/scripts/maps/SlateportCity_BattleTentLobby.inc b/data/scripts/maps/SlateportCity_BattleTentLobby.inc
index ca51ab57e..e5f510179 100644
--- a/data/scripts/maps/SlateportCity_BattleTentLobby.inc
+++ b/data/scripts/maps/SlateportCity_BattleTentLobby.inc
@@ -122,7 +122,7 @@ SlateportCity_BattleTentLobby_EventScript_2088AA:: @ 82088AA
special sub_81B9D08
compare VAR_RESULT, 0
goto_if 5, SlateportCity_BattleTentLobby_EventScript_2087E9
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox SlateportCity_BattleTentLobby_Text_2C5810, 4
SlateportCity_BattleTentLobby_EventScript_2088CA:: @ 82088CA
@@ -228,7 +228,7 @@ SlateportCity_BattleTentLobby_EventScript_208A14:: @ 8208A14
goto SlateportCity_BattleTentLobby_EventScript_208A2E
SlateportCity_BattleTentLobby_EventScript_208A2B:: @ 8208A2B
- special copy_player_party_from_sav1
+ special LoadPlayerParty
SlateportCity_BattleTentLobby_EventScript_208A2E:: @ 8208A2E
msgbox SlateportCity_BattleTentLobby_Text_2C5AA5, 4
diff --git a/data/scripts/maps/SootopolisCity_MysteryEventsHouse_1F.inc b/data/scripts/maps/SootopolisCity_MysteryEventsHouse_1F.inc
index 019bdce10..eaca36e59 100644
--- a/data/scripts/maps/SootopolisCity_MysteryEventsHouse_1F.inc
+++ b/data/scripts/maps/SootopolisCity_MysteryEventsHouse_1F.inc
@@ -45,7 +45,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_2279B7:: @ 82279B7
call_if 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_227A0D
compare VAR_0x40C0, 3
call_if 1, SootopolisCity_MysteryEventsHouse_1F_EventScript_227A16
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x40C0, 0
releaseall
end
@@ -90,7 +90,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_227A4E:: @ 8227A4E
end
SootopolisCity_MysteryEventsHouse_1F_EventScript_227A58:: @ 8227A58
- special copy_player_party_to_sav1
+ special SavePlayerParty
special sub_8139238
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_227BFC, 5
compare VAR_RESULT, 0
@@ -101,11 +101,11 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_227A58:: @ 8227A58
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_227CEB, 5
compare VAR_RESULT, 0
goto_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227AE2
- special copy_player_party_from_sav1
+ special LoadPlayerParty
call SootopolisCity_MysteryEventsHouse_1F_EventScript_27134F
compare VAR_RESULT, 0
goto_eq SootopolisCity_MysteryEventsHouse_1F_EventScript_227AE2
- special copy_player_party_to_sav1
+ special SavePlayerParty
special sub_80F94E8
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_227D21, 4
closemessage
@@ -121,7 +121,7 @@ SootopolisCity_MysteryEventsHouse_1F_EventScript_227A58:: @ 8227A58
end
SootopolisCity_MysteryEventsHouse_1F_EventScript_227AE2:: @ 8227AE2
- special copy_player_party_from_sav1
+ special LoadPlayerParty
msgbox SootopolisCity_MysteryEventsHouse_1F_Text_227C44, 4
release
end
diff --git a/data/scripts/maps/SootopolisCity_MysteryEventsHouse_B1F.inc b/data/scripts/maps/SootopolisCity_MysteryEventsHouse_B1F.inc
index 78c7303ae..0dec00967 100644
--- a/data/scripts/maps/SootopolisCity_MysteryEventsHouse_B1F.inc
+++ b/data/scripts/maps/SootopolisCity_MysteryEventsHouse_B1F.inc
@@ -32,7 +32,7 @@ SootopolisCity_MysteryEventsHouse_B1F_EventScript_227E68:: @ 8227E68
special HealPlayerParty
applymovement 255, SootopolisCity_MysteryEventsHouse_B1F_Movement_227EF9
waitmovement 0
- special copy_player_party_from_sav1
+ special LoadPlayerParty
setvar VAR_0x4001, 1
warp SOOTOPOLIS_CITY_MYSTERY_EVENTS_HOUSE_1F, 255, 3, 1
waitstate
diff --git a/data/scripts/maps/TrainerHill_Entrance.inc b/data/scripts/maps/TrainerHill_Entrance.inc
index 77b67fb14..eb12efb4b 100644
--- a/data/scripts/maps/TrainerHill_Entrance.inc
+++ b/data/scripts/maps/TrainerHill_Entrance.inc
@@ -236,7 +236,7 @@ TrainerHill_Entrance_Movement_268385: @ 8268385
TrainerHill_Entrance_EventScript_268388:: @ 8268388
lockall
fadescreen 1
- special sub_813C904
+ special ShowTrainerHillRecords
waitstate
releaseall
end
diff --git a/data/scripts/maps/VerdanturfTown_BattleTentBattleRoom.inc b/data/scripts/maps/VerdanturfTown_BattleTentBattleRoom.inc
index b673e959b..ad2749ba8 100644
--- a/data/scripts/maps/VerdanturfTown_BattleTentBattleRoom.inc
+++ b/data/scripts/maps/VerdanturfTown_BattleTentBattleRoom.inc
@@ -59,7 +59,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_2023AA:: @ 82023AA
setvar VAR_0x8005, 0
setvar VAR_0x8006, 4
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
warp VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
waitstate
@@ -81,8 +81,8 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_2023C8:: @ 82023C8
applymovement 1, VerdanturfTown_BattleTentBattleRoom_Movement_2725A6
waitmovement 0
msgbox VerdanturfTown_BattleTentBattleRoom_Text_24FF00, 4
- special copy_player_party_from_sav1
- special copy_player_party_to_sav1
+ special LoadPlayerParty
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -132,7 +132,7 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_202501:: @ 8202501
setvar VAR_0x8005, 0
setvar VAR_0x8006, 3
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
warp VERDANTURF_TOWN_BATTLE_TENT_LOBBY, 255, 6, 6
waitstate
diff --git a/data/scripts/maps/VerdanturfTown_BattleTentLobby.inc b/data/scripts/maps/VerdanturfTown_BattleTentLobby.inc
index a7f496820..6f1624a2d 100644
--- a/data/scripts/maps/VerdanturfTown_BattleTentLobby.inc
+++ b/data/scripts/maps/VerdanturfTown_BattleTentLobby.inc
@@ -135,7 +135,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201873:: @ 8201873
special sub_81B99B4
compare VAR_RESULT, 0
goto_if 5, VerdanturfTown_BattleTentLobby_EventScript_2017EE
- special copy_player_party_to_sav1
+ special SavePlayerParty
msgbox VerdanturfTown_BattleTentLobby_Text_2C50C3, 4
VerdanturfTown_BattleTentLobby_EventScript_201893:: @ 8201893
@@ -189,7 +189,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201954:: @ 8201954
setvar VAR_0x8005, 3
setvar VAR_0x8006, 0
special sub_81A1780
- special copy_player_party_from_sav1
+ special LoadPlayerParty
closemessage
delay 2
call VerdanturfTown_BattleTentLobby_EventScript_27134F
@@ -198,7 +198,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201954:: @ 8201954
goto_eq VerdanturfTown_BattleTentLobby_EventScript_201A1D
VerdanturfTown_BattleTentLobby_EventScript_2019AE:: @ 82019AE
- special copy_player_party_to_sav1
+ special SavePlayerParty
setvar VAR_0x8004, 3
setvar VAR_0x8005, 3
special sub_81A1780
@@ -235,7 +235,7 @@ VerdanturfTown_BattleTentLobby_EventScript_201A1D:: @ 8201A1D
goto VerdanturfTown_BattleTentLobby_EventScript_201A37
VerdanturfTown_BattleTentLobby_EventScript_201A34:: @ 8201A34
- special copy_player_party_from_sav1
+ special LoadPlayerParty
VerdanturfTown_BattleTentLobby_EventScript_201A37:: @ 8201A37
msgbox VerdanturfTown_BattleTentLobby_Text_2C539A, 4
diff --git a/data/scripts/mauville_man.inc b/data/scripts/mauville_man.inc
index 2e00ee702..46be101e1 100644
--- a/data/scripts/mauville_man.inc
+++ b/data/scripts/mauville_man.inc
@@ -1,5 +1,5 @@
MauvilleCity_PokemonCenter_1F_EventScript_28E066:: @ 828E066
- special sub_81201DC
+ special ScrSpecial_GetCurrentMauvilleMan
switch VAR_RESULT
case 0, MauvilleCity_PokemonCenter_1F_EventScript_28E0A6
case 1, MauvilleCity_PokemonCenter_1F_EventScript_28E167
@@ -20,9 +20,9 @@ MauvilleCity_PokemonCenter_1F_EventScript_28E0A6:: @ 828E0A6
MauvilleCity_PokemonCenter_1F_EventScript_28E0C7:: @ 828E0C7
setvar VAR_0x8004, 0
- special sub_8120340
+ special ScrSpecial_PlayBardSong
delay 60
- special sub_81201F4
+ special ScrSpecial_HasBardSongBeenChanged
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E0F4
msgbox MauvilleCity_PokemonCenter_1F_Text_2903E6, 4
@@ -51,12 +51,12 @@ MauvilleCity_PokemonCenter_1F_EventScript_28E113:: @ 828E113
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E15D
msgbox MauvilleCity_PokemonCenter_1F_Text_2904C1, 4
setvar VAR_0x8004, 1
- special sub_8120340
+ special ScrSpecial_PlayBardSong
delay 60
msgbox MauvilleCity_PokemonCenter_1F_Text_2904EB, 5
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E113
- special sub_8120210
+ special ScrSpecial_SaveBardSongLyrics
msgbox MauvilleCity_PokemonCenter_1F_Text_290514, 4
release
end
@@ -71,7 +71,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_28E167:: @ 828E167
faceplayer
setflag FLAG_SYS_HIPSTER_MEET
msgbox MauvilleCity_PokemonCenter_1F_Text_29054C, 4
- special sub_8120358
+ special ScrSpecial_GetHipsterSpokenFlag
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E18C
msgbox MauvilleCity_PokemonCenter_1F_Text_290598, 4
@@ -79,7 +79,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_28E167:: @ 828E167
end
MauvilleCity_PokemonCenter_1F_EventScript_28E18C:: @ 828E18C
- special sub_812038C
+ special ScrSpecial_HipsterTeachWord
compare VAR_RESULT, 1
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E1A4
msgbox MauvilleCity_PokemonCenter_1F_Text_290602, 4
@@ -88,7 +88,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_28E18C:: @ 828E18C
MauvilleCity_PokemonCenter_1F_EventScript_28E1A4:: @ 828E1A4
msgbox MauvilleCity_PokemonCenter_1F_Text_290666, 4
- special sub_8120374
+ special ScrSpecial_SetHipsterSpokenFlag
release
end
@@ -157,7 +157,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_28E4D4:: @ 828E4D4
msgbox MauvilleCity_PokemonCenter_1F_Text_28E1B1, 5
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E503
- special sub_8133CD8
+ special ScrSpecial_GetTraderTradedFlag
compare VAR_RESULT, 1
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E50D
message MauvilleCity_PokemonCenter_1F_Text_28E23F
@@ -176,7 +176,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_28E50D:: @ 828E50D
end
MauvilleCity_PokemonCenter_1F_EventScript_28E517:: @ 828E517
- special sub_8133EC0
+ special ScrSpecial_TraderMenuGetDecoration
waitstate
compare VAR_0x8004, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E558
@@ -185,7 +185,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_28E517:: @ 828E517
msgbox MauvilleCity_PokemonCenter_1F_Text_28E2A9, 5
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E56E
- special sub_8133CF4
+ special ScrSpecial_DoesPlayerHaveNoDecorations
compare VAR_RESULT, 1
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E57A
goto MauvilleCity_PokemonCenter_1F_EventScript_28E584
@@ -215,19 +215,19 @@ MauvilleCity_PokemonCenter_1F_EventScript_28E57A:: @ 828E57A
MauvilleCity_PokemonCenter_1F_EventScript_28E584:: @ 828E584
msgbox MauvilleCity_PokemonCenter_1F_Text_28E323, 4
- special sub_8133D8C
+ special ScrSpecial_TraderMenuGiveDecoration
waitstate
compare VAR_0x8006, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E5D4
compare VAR_0x8006, 65535
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E5DE
- special sub_8133D2C
+ special ScrSpecial_IsDecorationFull
compare VAR_RESULT, 1
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E5EC
msgbox MauvilleCity_PokemonCenter_1F_Text_28E3C4, 5
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_28E584
- special sub_8133E38
+ special ScrSpecial_TraderDoDecorationTrade
msgbox MauvilleCity_PokemonCenter_1F_Text_28E424, 4
release
end
@@ -813,20 +813,20 @@ MauvilleCity_PokemonCenter_1F_EventScript_29014A:: @ 829014A
msgbox MauvilleCity_PokemonCenter_1F_Text_28E5F6, 5
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_290219
- specialvar VAR_RESULT, sub_81213B0
+ specialvar VAR_RESULT, ScrSpecial_StorytellerGetFreeStorySlot
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_2901DA
message MauvilleCity_PokemonCenter_1F_Text_28E673
waitmessage
- special sub_8121388
+ special ScrSpecial_StorytellerStoryListMenu
waitstate
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_2901B7
setvar VAR_0x8008, 1
- special sub_812139C
+ special ScrSpecial_StorytellerDisplayStory
waitmessage
waitbuttonpress
- specialvar VAR_RESULT, sub_81213D8
+ specialvar VAR_RESULT, ScrSpecial_StorytellerUpdateStat
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_2901BD
goto MauvilleCity_PokemonCenter_1F_EventScript_29020F
@@ -837,7 +837,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_2901B7:: @ 82901B7
MauvilleCity_PokemonCenter_1F_EventScript_2901BD:: @ 82901BD
msgbox MauvilleCity_PokemonCenter_1F_Text_28E78A, 4
- specialvar VAR_RESULT, sub_8121424
+ specialvar VAR_RESULT, ScrSpecial_HasStorytellerAlreadyRecorded
compare VAR_RESULT, 1
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_29022D
goto MauvilleCity_PokemonCenter_1F_EventScript_2901E2
@@ -849,7 +849,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_2901E2:: @ 82901E2
msgbox MauvilleCity_PokemonCenter_1F_Text_28E7EE, 5
compare VAR_RESULT, 0
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_290219
- specialvar VAR_RESULT, sub_8121450
+ specialvar VAR_RESULT, ScrSpecial_StorytellerInitializeRandomStat
compare VAR_RESULT, 1
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_29020F
msgbox MauvilleCity_PokemonCenter_1F_Text_28E881, 4
@@ -903,7 +903,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_2902F6:: @ 82902F6
end
MauvilleCity_PokemonCenter_1F_EventScript_290317:: @ 8290317
- special sub_81203C4
+ special ScrSpecial_GiddyShouldTellAnotherTale
compare VAR_RESULT, 1
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_290359
compare VAR_RESULT, 0
@@ -911,7 +911,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_290317:: @ 8290317
end
MauvilleCity_PokemonCenter_1F_EventScript_290331:: @ 8290331
- special sub_81203C4
+ special ScrSpecial_GiddyShouldTellAnotherTale
compare VAR_RESULT, 1
goto_eq MauvilleCity_PokemonCenter_1F_EventScript_29034B
compare VAR_RESULT, 0
@@ -924,7 +924,7 @@ MauvilleCity_PokemonCenter_1F_EventScript_29034B:: @ 829034B
end
MauvilleCity_PokemonCenter_1F_EventScript_290359:: @ 8290359
- special sub_81203FC
+ special ScrSpecial_GenerateGiddyLine
special ShowFieldMessageStringVar4
waitmessage
yesnobox 20, 8
diff --git a/data/specials.inc b/data/specials.inc
index 2290c9d21..a056de629 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -48,8 +48,8 @@ gSpecials:: @ 81DBA64
def_special sub_80B2FD8
def_special GetLinkPartnerNames
def_special SpawnLinkPartnerFieldObject
- def_special copy_player_party_to_sav1
- def_special copy_player_party_from_sav1
+ def_special SavePlayerParty
+ def_special LoadPlayerParty
def_special sub_80F9438
def_special sp02A_crash_sound
def_special FieldObjectInteractionGetBerryTreeData
@@ -108,28 +108,28 @@ gSpecials:: @ 81DBA64
def_special sub_80FAFF8
def_special easy_chat_input_maybe
def_special sub_811EECC
- def_special sub_81201DC
- def_special sub_81201F4
- def_special sub_8120210
- def_special sub_8120358
- def_special sub_8120374
- def_special sub_812038C
- def_special sub_8120340
- def_special sub_8120B5C
- def_special sub_81203FC
- def_special sub_81203C4
- def_special sub_81213B0
- def_special sub_812139C
- def_special sub_8121388
- def_special sub_81213D8
- def_special sub_8121450
- def_special sub_8121424
- def_special sub_8133EC0
- def_special sub_8133CD8
- def_special sub_8133CF4
- def_special sub_8133D2C
- def_special sub_8133D8C
- def_special sub_8133E38
+ def_special ScrSpecial_GetCurrentMauvilleMan
+ def_special ScrSpecial_HasBardSongBeenChanged
+ def_special ScrSpecial_SaveBardSongLyrics
+ def_special ScrSpecial_GetHipsterSpokenFlag
+ def_special ScrSpecial_SetHipsterSpokenFlag
+ def_special ScrSpecial_HipsterTeachWord
+ def_special ScrSpecial_PlayBardSong
+ def_special ScrSpecial_SetMauvilleOldManMapObjGfx
+ def_special ScrSpecial_GenerateGiddyLine
+ def_special ScrSpecial_GiddyShouldTellAnotherTale
+ def_special ScrSpecial_StorytellerGetFreeStorySlot
+ def_special ScrSpecial_StorytellerDisplayStory
+ def_special ScrSpecial_StorytellerStoryListMenu
+ def_special ScrSpecial_StorytellerUpdateStat
+ def_special ScrSpecial_StorytellerInitializeRandomStat
+ def_special ScrSpecial_HasStorytellerAlreadyRecorded
+ def_special ScrSpecial_TraderMenuGetDecoration
+ def_special ScrSpecial_GetTraderTradedFlag
+ def_special ScrSpecial_DoesPlayerHaveNoDecorations
+ def_special ScrSpecial_IsDecorationFull
+ def_special ScrSpecial_TraderMenuGiveDecoration
+ def_special ScrSpecial_TraderDoDecorationTrade
def_special GetSeedotSizeRecordInfo
def_special CompareSeedotSize
def_special GetLotadSizeRecordInfo
@@ -141,7 +141,7 @@ gSpecials:: @ 81DBA64
def_special TrendyPhraseIsOld
def_special sub_811EF6C
def_special GetDewfordHallPaintingNameIndex
- def_special sub_80D6EDC
+ def_special SwapRegisteredBike
def_special CalculatePlayerPartyCount
def_special CountPartyNonEggMons
def_special CountPartyAliveNonEggMons_IgnoreVar0x8004Slot
@@ -207,7 +207,7 @@ gSpecials:: @ 81DBA64
def_special ScriptHatchMon
def_special EggHatch
def_special sub_8071614
- def_special sub_813C4BC
+ def_special ShowLinkBattleRecords
def_special IsEnoughForCostInVar0x8005
def_special SubtractMoneyFromVar0x8005
def_special sub_80F972C
@@ -341,7 +341,7 @@ gSpecials:: @ 81DBA64
def_special sub_81B98DC
def_special nullsub_54
def_special sub_80E9B70
- def_special copy_bags_and_unk_data_from_save_blocks
+ def_special LoadPlayerBag
def_special sub_80B05B4
def_special sub_8139754
def_special sub_813970C
@@ -526,12 +526,12 @@ gSpecials:: @ 81DBA64
def_special sub_8139ED0
def_special sub_813B968
def_special sub_80F8B94
- def_special sub_813C904
+ def_special ShowTrainerHillRecords
def_special sub_80B4808
def_special sub_813B9A0
def_special sub_81B9918
def_special sub_80722E0
def_special sub_80B45D0
- def_special sub_813C5A0
+ def_special RemoveRecordsWindow
def_special sub_8139C10
def_special sub_80B3BC4
diff --git a/data/text/item_descriptions.inc b/data/text/item_descriptions.inc
deleted file mode 100644
index 0ca85cc3b..000000000
--- a/data/text/item_descriptions.inc
+++ /dev/null
@@ -1,929 +0,0 @@
-gDummyItemDescription:: @ 857FEA0
- .string "?????$"
-
-gMasterBallItemDescription:: @ 857FEA6
- .string "The best BALL that\ncatches a POKéMON\nwithout fail.$"
-
-gUltraBallItemDescription:: @ 857FED9
- .string "A better BALL with\na higher catch rate\nthan a GREAT BALL.$"
-
-gGreatBallItemDescription:: @ 857FF13
- .string "A good BALL with a\nhigher catch rate\nthan a POKé BALL.$"
-
-gPokeBallItemDescription:: @ 857FF4A
- .string "A tool used for\ncatching wild\nPOKéMON.$"
-
-gSafariBallItemDescription:: @ 857FF71
- .string "A special BALL that\nis used only in the\nSAFARI ZONE.$"
-
-gNetBallItemDescription:: @ 857FFA6
- .string "A BALL that works\nwell on WATER- and\nBUG-type POKéMON.$"
-
-gDiveBallItemDescription:: @ 857FFDD
- .string "A BALL that works\nbetter on POKéMON\non the ocean floor.$"
-
-gNestBallItemDescription:: @ 8580015
- .string "A BALL that works\nbetter on weaker\nPOKéMON.$"
-
-gRepeatBallItemDescription:: @ 8580041
- .string "A BALL that works\nbetter on POKéMON\ncaught before.$"
-
-gTimerBallItemDescription:: @ 8580074
- .string "A BALL that gains\npower in battles\ntaking many turns.$"
-
-gLuxuryBallItemDescription:: @ 85800AA
- .string "A cozy BALL that\nmakes POKéMON\nmore friendly.$"
-
-gPremierBallItemDescription:: @ 85800D8
- .string "A rare BALL made\nin commemoration\nof some event.$"
-
-gPotionItemDescription:: @ 8580109
- .string "Restores the HP of\na POKéMON by\n20 points.$"
-
-gAntidoteItemDescription:: @ 8580134
- .string "Heals a poisoned\nPOKéMON.$"
-
-gBurnHealItemDescription:: @ 858014E
- .string "Heals POKéMON\nof a burn.$"
-
-gIceHealItemDescription:: @ 8580167
- .string "Defrosts a frozen\nPOKéMON.$"
-
-gAwakeningItemDescription:: @ 8580182
- .string "Awakens a sleeping\nPOKéMON.$"
-
-gParalyzeHealItemDescription:: @ 858019E
- .string "Heals a paralyzed\nPOKéMON.$"
-
-gFullRestoreItemDescription:: @ 85801B9
- .string "Fully restores the\nHP and status of a\nPOKéMON.$"
-
-gMaxPotionItemDescription:: @ 85801E8
- .string "Fully restores the\nHP of a POKéMON.$"
-
-gHyperPotionItemDescription:: @ 858020C
- .string "Restores the HP of\na POKéMON by\n200 points.$"
-
-gSuperPotionItemDescription:: @ 8580238
- .string "Restores the HP of\na POKéMON by\n50 points.$"
-
-gFullHealItemDescription:: @ 8580263
- .string "Heals all the\nstatus problems of\none POKéMON.$"
-
-gReviveItemDescription:: @ 8580291
- .string "Revives a fainted\nPOKéMON with half\nits HP.$"
-
-gMaxReviveItemDescription:: @ 85802BD
- .string "Revives a fainted\nPOKéMON with all\nits HP.$"
-
-gFreshWaterItemDescription:: @ 85802E8
- .string "A mineral water\nthat restores HP\nby 50 points.$"
-
-gSodaPopItemDescription:: @ 8580317
- .string "A fizzy soda drink\nthat restores HP\nby 60 points.$"
-
-gLemonadeItemDescription:: @ 8580349
- .string "A very sweet drink\nthat restores HP\nby 80 points.$"
-
-gMoomooMilkItemDescription:: @ 858037B
- .string "A nutritious milk\nthat restores HP\nby 100 points.$"
-
-gEnergyPowderItemDescription:: @ 85803AD
- .string "A bitter powder\nthat restores HP\nby 50 points.$"
-
-gEnergyRootItemDescription:: @ 85803DC
- .string "A bitter root\nthat restores HP\nby 200 points.$"
-
-gHealPowderItemDescription:: @ 858040A
- .string "A bitter powder\nthat heals all\nstatus problems.$"
-
-gRevivalHerbItemDescription:: @ 858043A
- .string "A very bitter herb\nthat revives a\nfainted POKéMON.$"
-
-gEtherItemDescription:: @ 858046D
- .string "Restores the PP\nof a selected move\nby 10.$"
-
-gMaxEtherItemDescription:: @ 8580497
- .string "Fully restores the\nPP of a selected\nmove.$"
-
-gElixirItemDescription:: @ 85804C1
- .string "Restores the PP\nof all moves by 10.$"
-
-gMaxElixirItemDescription:: @ 85804E5
- .string "Fully restores the\nPP of a POKéMON’s\nmoves.$"
-
-gLavaCookieItemDescription:: @ 8580511
- .string "A local specialty\nthat heals all\nstatus problems.$"
-
-gBlueFluteItemDescription:: @ 8580543
- .string "A glass flute that\nawakens sleeping\nPOKéMON.$"
-
-gYellowFluteItemDescription:: @ 8580570
- .string "A glass flute that\nsnaps POKéMON\nout of confusion.$"
-
-gRedFluteItemDescription:: @ 85805A3
- .string "A glass flute that\nsnaps POKéMON\nout of attraction.$"
-
-gBlackFluteItemDescription:: @ 85805D7
- .string "A glass flute that\nkeeps away wild\nPOKéMON.$"
-
-gWhiteFluteItemDescription:: @ 8580603
- .string "A glass flute that\nlures wild POKéMON.$"
-
-gBerryJuiceItemDescription:: @ 858062A
- .string "A 100% pure juice\nthat restores HP\nby 20 points.$"
-
-gSacredAshItemDescription:: @ 858065B
- .string "Fully revives and\nrestores all\nfainted POKéMON.$"
-
-gShoalSaltItemDescription:: @ 858068B
- .string "Salt obtained from\ndeep inside the\nSHOAL CAVE.$"
-
-gShoalShellItemDescription:: @ 85806BA
- .string "A seashell found\ndeep inside the\nSHOAL CAVE.$"
-
-gRedShardItemDescription:: @ 85806E7
- .string "A shard from an\nancient item. Can\nbe sold cheaply.$"
-
-gBlueShardItemDescription:: @ 858071A
- .string "A shard from an\nancient item. Can\nbe sold cheaply.$"
-
-gYellowShardItemDescription:: @ 858074D
- .string "A shard from an\nancient item. Can\nbe sold cheaply.$"
-
-gGreenShardItemDescription:: @ 8580780
- .string "A shard from an\nancient item. Can\nbe sold cheaply.$"
-
-gHPUpItemDescription:: @ 85807B3
- .string "Raises the base HP\nof one POKéMON.$"
-
-gProteinItemDescription:: @ 85807D6
- .string "Raises the base\nATTACK stat of one\nPOKéMON.$"
-
-gIronItemDescription:: @ 8580802
- .string "Raises the base\nDEFENSE stat of\none POKéMON.$"
-
-gCarbosItemDescription:: @ 858082F
- .string "Raises the base\nSPEED stat of one\nPOKéMON.$"
-
-gCalciumItemDescription:: @ 858085A
- .string "Raises the base\nSP. ATK stat of one\nPOKéMON.$"
-
-gRareCandyItemDescription:: @ 8580887
- .string "Raises the level\nof a POKéMON by\none.$"
-
-gPPUpItemDescription:: @ 85808AD
- .string "Raises the maximum\nPP of a selected\nmove.$"
-
-gZincItemDescription:: @ 85808D7
- .string "Raises the base\nSP. DEF stat of one\nPOKéMON.$"
-
-gPPMaxItemDescription:: @ 8580904
- .string "Raises the PP of a\nmove to its maximum\npoints.$"
-
-gGuardSpecItemDescription:: @ 8580933
- .string "Prevents stat\nreduction when\nused in battle.$"
-
-gDireHitItemDescription:: @ 8580960
- .string "Raises the\ncritical-hit ratio\nduring one battle.$"
-
-gXAttackItemDescription:: @ 8580991
- .string "Raises the stat\nATTACK during one\nbattle.$"
-
-gXDefendItemDescription:: @ 85809BB
- .string "Raises the stat\nDEFENSE during one\nbattle.$"
-
-gXSpeedItemDescription:: @ 85809E6
- .string "Raises the stat\nSPEED during one\nbattle.$"
-
-gXAccuracyItemDescription:: @ 8580A0F
- .string "Raises accuracy\nof attack moves\nduring one battle.$"
-
-gXSpecialItemDescription:: @ 8580A42
- .string "Raises the stat\nSP. ATK during one\nbattle.$"
-
-gPokeDollItemDescription:: @ 8580A6D
- .string "Use to flee from\nany battle with\na wild POKéMON.$"
-
-gFluffyTailItemDescription:: @ 8580A9E
- .string "Use to flee from\nany battle with\na wild POKéMON.$"
-
-gSuperRepelItemDescription:: @ 8580ACF
- .string "Repels weak wild\nPOKéMON for 200\nsteps.$"
-
-gMaxRepelItemDescription:: @ 8580AF7
- .string "Repels weak wild\nPOKéMON for 250\nsteps.$"
-
-gEscapeRopeItemDescription:: @ 8580B1F
- .string "Use to escape\ninstantly from a\ncave or a dungeon.$"
-
-gRepelItemDescription:: @ 8580B51
- .string "Repels weak wild\nPOKéMON for 100\nsteps.$"
-
-gSunStoneItemDescription:: @ 8580B79
- .string "Makes certain\nspecies of POKéMON\nevolve.$"
-
-gMoonStoneItemDescription:: @ 8580BA2
- .string "Makes certain\nspecies of POKéMON\nevolve.$"
-
-gFireStoneItemDescription:: @ 8580BCB
- .string "Makes certain\nspecies of POKéMON\nevolve.$"
-
-gThunderStoneItemDescription:: @ 8580BF4
- .string "Makes certain\nspecies of POKéMON\nevolve.$"
-
-gWaterStoneItemDescription:: @ 8580C1D
- .string "Makes certain\nspecies of POKéMON\nevolve.$"
-
-gLeafStoneItemDescription:: @ 8580C46
- .string "Makes certain\nspecies of POKéMON\nevolve.$"
-
-gTinyMushroomItemDescription:: @ 8580C6F
- .string "A plain mushroom\nthat would sell\nat a cheap price.$"
-
-gBigMushroomItemDescription:: @ 8580CA2
- .string "A rare mushroom\nthat would sell at a\nhigh price.$"
-
-gPearlItemDescription:: @ 8580CD3
- .string "A pretty pearl\nthat would sell at a\ncheap price.$"
-
-gBigPearlItemDescription:: @ 8580D04
- .string "A lovely large pearl\nthat would sell at a\nhigh price.$"
-
-gStardustItemDescription:: @ 8580D3A
- .string "Beautiful red sand.\nCan be sold at a\nhigh price.$"
-
-gStarPieceItemDescription:: @ 8580D6B
- .string "A red gem shard.\nIt would sell for a\nvery high price.$"
-
-gNuggetItemDescription:: @ 8580DA1
- .string "A nugget of pure\ngold. Can be sold at\na high price.$"
-
-gHeartScaleItemDescription:: @ 8580DD5
- .string "A lovely scale.\nIt is coveted by\ncollectors.$"
-
-gOrangeMailItemDescription:: @ 8580E02
- .string "A ZIGZAGOON-print\nMAIL to be held by\na POKéMON.$"
-
-gHarborMailItemDescription:: @ 8580E32
- .string "A WINGULL-print\nMAIL to be held by\na POKéMON.$"
-
-gGlitterMailItemDescription:: @ 8580E60
- .string "A PIKACHU-print\nMAIL to be held by\na POKéMON.$"
-
-gMechMailItemDescription:: @ 8580E8E
- .string "A MAGNEMITE-print\nMAIL to be held by\na POKéMON.$"
-
-gWoodMailItemDescription:: @ 8580EBE
- .string "A SLAKOTH-print\nMAIL to be held by\na POKéMON.$"
-
-gWaveMailItemDescription:: @ 8580EEC
- .string "A WAILMER-print\nMAIL to be held by\na POKéMON.$"
-
-gBeadMailItemDescription:: @ 8580F1A
- .string "MAIL featuring a\nsketch of the\nholding POKéMON.$"
-
-gShadowMailItemDescription:: @ 8580F4A
- .string "A DUSKULL-print\nMAIL to be held by\na POKéMON.$"
-
-gTropicMailItemDescription:: @ 8580F78
- .string "A BELLOSSOM-print\nMAIL to be held by\na POKéMON.$"
-
-gDreamMailItemDescription:: @ 8580FA8
- .string "MAIL featuring a\nsketch of the\nholding POKéMON.$"
-
-gFabMailItemDescription:: @ 8580FD8
- .string "A gorgeous-print\nMAIL to be held\nby a POKéMON.$"
-
-gRetroMailItemDescription:: @ 8581007
- .string "MAIL featuring the\ndrawings of three\nPOKéMON.$"
-
-gCheriBerryItemDescription:: @ 8581035
- .string "A hold item that\nheals paralysis\nin battle.$"
-
-gChestoBerryItemDescription:: @ 8581061
- .string "A hold item that\nawakens POKéMON\nin battle.$"
-
-gPechaBerryItemDescription:: @ 858108D
- .string "A hold item that\nheals poisoning\nin battle.$"
-
-gRawstBerryItemDescription:: @ 85810B9
- .string "A hold item that\nheals a burn in\nbattle.$"
-
-gAspearBerryItemDescription:: @ 85810E2
- .string "A hold item that\ndefrosts POKéMON\nin battle.$"
-
-gLeppaBerryItemDescription:: @ 858110F
- .string "A hold item that\nrestores 10 PP in\nbattle.$"
-
-gOranBerryItemDescription:: @ 858113A
- .string "A hold item that\nrestores 10 HP in\nbattle.$"
-
-gPersimBerryItemDescription:: @ 8581165
- .string "A hold item that\nheals confusion\nin battle.$"
-
-gLumBerryItemDescription:: @ 8581191
- .string "A hold item that\nheals any status\nproblem in battle.$"
-
-gSitrusBerryItemDescription:: @ 85811C6
- .string "A hold item that\nrestores 30 HP in\nbattle.$"
-
-gFigyBerryItemDescription:: @ 85811F1
- .string "A hold item that\nrestores HP but\nmay confuse.$"
-
-gWikiBerryItemDescription:: @ 858121F
- .string "A hold item that\nrestores HP but\nmay confuse.$"
-
-gMagoBerryItemDescription:: @ 858124D
- .string "A hold item that\nrestores HP but\nmay confuse.$"
-
-gAguavBerryItemDescription:: @ 858127B
- .string "A hold item that\nrestores HP but\nmay confuse.$"
-
-gIapapaBerryItemDescription:: @ 85812A9
- .string "A hold item that\nrestores HP but\nmay confuse.$"
-
-gRazzBerryItemDescription:: @ 85812D7
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow RAZZ.$"
-
-gBlukBerryItemDescription:: @ 858130B
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow BLUK.$"
-
-gNanabBerryItemDescription:: @ 858133F
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow NANAB.$"
-
-gWepearBerryItemDescription:: @ 8581374
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow WEPEAR.$"
-
-gPinapBerryItemDescription:: @ 85813AA
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow PINAP.$"
-
-gPomegBerryItemDescription:: @ 85813DF
- .string "Makes a POKéMON\nfriendly but lowers\nbase HP.$"
-
-gKelpsyBerryItemDescription:: @ 858140C
- .string "Makes a POKéMON\nfriendly but lowers\nbase ATTACK.$"
-
-gQualotBerryItemDescription:: @ 858143D
- .string "Makes a POKéMON\nfriendly but lowers\nbase DEFENSE.$"
-
-gHondewBerryItemDescription:: @ 858146F
- .string "Makes a POKéMON\nfriendly but lowers\nbase SP. ATK.$"
-
-gGrepaBerryItemDescription:: @ 85814A1
- .string "Makes a POKéMON\nfriendly but lowers\nbase SP. DEF.$"
-
-gTamatoBerryItemDescription:: @ 85814D3
- .string "Makes a POKéMON\nfriendly but lowers\nbase SPEED.$"
-
-gCornnBerryItemDescription:: @ 8581503
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow CORNN.$"
-
-gMagostBerryItemDescription:: @ 8581538
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow MAGOST.$"
-
-gRabutaBerryItemDescription:: @ 858156E
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow RABUTA.$"
-
-gNomelBerryItemDescription:: @ 85815A4
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow NOMEL.$"
-
-gSpelonBerryItemDescription:: @ 85815D9
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow SPELON.$"
-
-gPamtreBerryItemDescription:: @ 858160F
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow PAMTRE.$"
-
-gWatmelBerryItemDescription:: @ 8581645
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow WATMEL.$"
-
-gDurinBerryItemDescription:: @ 858167B
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow DURIN.$"
-
-gBelueBerryItemDescription:: @ 85816B0
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow BELUE.$"
-
-gLiechiBerryItemDescription:: @ 85816E5
- .string "A hold item that\nraises ATTACK in\na pinch.$"
-
-gGanlonBerryItemDescription:: @ 8581710
- .string "A hold item that\nraises DEFENSE in\na pinch.$"
-
-gSalacBerryItemDescription:: @ 858173C
- .string "A hold item that\nraises SPEED in\na pinch.$"
-
-gPetayaBerryItemDescription:: @ 8581766
- .string "A hold item that\nraises SP. ATK in\na pinch.$"
-
-gApicotBerryItemDescription:: @ 8581792
- .string "A hold item that\nraises SP. DEF in\na pinch.$"
-
-gLansatBerryItemDescription:: @ 85817BE
- .string "A hold item that\nups the critical-\nhit rate in a pinch.$"
-
-gStarfBerryItemDescription:: @ 85817F6
- .string "A hold item that\nsharply boosts a\nstat in a pinch.$"
-
-gEnigmaBerryItemDescription:: @ 8581829
- .string "{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow a mystery.$"
-
-gBrightPowderItemDescription:: @ 8581862
- .string "A hold item that\ncasts a glare to\nreduce accuracy.$"
-
-gWhiteHerbItemDescription:: @ 8581895
- .string "A hold item that\nrestores any\nlowered stat.$"
-
-gMachoBraceItemDescription:: @ 85818C1
- .string "A hold item that\npromotes growth,\nbut reduces SPEED.$"
-
-gExpShareItemDescription:: @ 85818F6
- .string "A hold item that\ngets EXP. points\nfrom battles.$"
-
-gQuickClawItemDescription:: @ 8581926
- .string "A hold item that\noccasionally allows\nthe first strike.$"
-
-gSootheBellItemDescription:: @ 858195D
- .string "A hold item that\ncalms spirits and\nfosters friendship.$"
-
-gMentalHerbItemDescription:: @ 8581994
- .string "A hold item that\nsnaps POKéMON out\nof infatuation.$"
-
-gChoiceBandItemDescription:: @ 85819C7
- .string "Raises a move’s\npower, but permits\nonly that move.$"
-
-gKingsRockItemDescription:: @ 85819FA
- .string "A hold item that\nmay cause flinching\nwhen the foe is hit.$"
-
-gSilverPowderItemDescription:: @ 8581A34
- .string "A hold item that\nraises the power of\nBUG-type moves.$"
-
-gAmuletCoinItemDescription:: @ 8581A69
- .string "Doubles money in\nbattle if the\nholder takes part.$"
-
-gCleanseTagItemDescription:: @ 8581A9B
- .string "A hold item that\nhelps repel wild\nPOKéMON.$"
-
-gSoulDewItemDescription:: @ 8581AC6
- .string "Hold item: raises\nSP. ATK & SP. DEF of\nLATIOS & LATIAS.$"
-
-gDeepSeaToothItemDescription:: @ 8581AFE
- .string "A hold item that\nraises the SP. ATK\nof CLAMPERL.$"
-
-gDeepSeaScaleItemDescription:: @ 8581B2F
- .string "A hold item that\nraises the SP. DEF\nof CLAMPERL.$"
-
-gSmokeBallItemDescription:: @ 8581B60
- .string "A hold item that\nassures fleeing\nfrom wild POKéMON.$"
-
-gEverstoneItemDescription:: @ 8581B94
- .string "A wondrous hold\nitem that prevents\nevolution.$"
-
-gFocusBandItemDescription:: @ 8581BC2
- .string "A hold item that\noccasionally\nprevents fainting.$"
-
-gLuckyEggItemDescription:: @ 8581BF3
- .string "A hold item that\nboosts EXP. points\nearned in battle.$"
-
-gScopeLensItemDescription:: @ 8581C29
- .string "A hold item that\nimproves the\ncritical-hit rate.$"
-
-gMetalCoatItemDescription:: @ 8581C5A
- .string "A hold item that\nraises the power of\nSTEEL-type moves.$"
-
-gLeftoversItemDescription:: @ 8581C91
- .string "A hold item that\ngradually restores\nHP in battle.$"
-
-gDragonScaleItemDescription:: @ 8581CC3
- .string "A strange scale\nheld by DRAGON-\ntype POKéMON.$"
-
-gLightBallItemDescription:: @ 8581CF1
- .string "A hold item that\nraises the SP. ATK\nof PIKACHU.$"
-
-gSoftSandItemDescription:: @ 8581D21
- .string "A hold item that\nraises the power of\nGROUND-type moves.$"
-
-gHardStoneItemDescription:: @ 8581D59
- .string "A hold item that\nraises the power of\nROCK-type moves.$"
-
-gMiracleSeedItemDescription:: @ 8581D8F
- .string "A hold item that\nraises the power of\nGRASS-type moves.$"
-
-gBlackGlassesItemDescription:: @ 8581DC6
- .string "A hold item that\nraises the power of\nDARK-type moves.$"
-
-gBlackBeltItemDescription:: @ 8581DFC
- .string "A hold item that\nboosts FIGHTING-\ntype moves.$"
-
-gMagnetItemDescription:: @ 8581E2A
- .string "A hold item that\nboosts ELECTRIC-\ntype moves.$"
-
-gMysticWaterItemDescription:: @ 8581E58
- .string "A hold item that\nraises the power of\nWATER-type moves.$"
-
-gSharpBeakItemDescription:: @ 8581E8F
- .string "A hold item that\nraises the power of\nFLYING-type moves.$"
-
-gPoisonBarbItemDescription:: @ 8581EC7
- .string "A hold item that\nraises the power of\nPOISON-type moves.$"
-
-gNeverMeltIceItemDescription:: @ 8581EFF
- .string "A hold item that\nraises the power of\nICE-type moves.$"
-
-gSpellTagItemDescription:: @ 8581F34
- .string "A hold item that\nraises the power of\nGHOST-type moves.$"
-
-gTwistedSpoonItemDescription:: @ 8581F6B
- .string "A hold item that\nboosts PSYCHIC-\ntype moves.$"
-
-gCharcoalItemDescription:: @ 8581F98
- .string "A hold item that\nraises the power of\nFIRE-type moves.$"
-
-gDragonFangItemDescription:: @ 8581FCE
- .string "A hold item that\nraises the power of\nDRAGON-type moves.$"
-
-gSilkScarfItemDescription:: @ 8582006
- .string "A hold item that\nraises the power of\nNORMAL-type moves.$"
-
-gUpGradeItemDescription:: @ 858203E
- .string "A peculiar box made\nby SILPH CO.$"
-
-gShellBellItemDescription:: @ 858205F
- .string "A hold item that\nrestores HP upon\nstriking the foe.$"
-
-gSeaIncenseItemDescription:: @ 8582093
- .string "A hold item that\nslightly boosts\nWATER-type moves.$"
-
-gLaxIncenseItemDescription:: @ 85820C6
- .string "A hold item that\nslightly lowers the\nfoe’s accuracy.$"
-
-gLuckyPunchItemDescription:: @ 85820FB
- .string "A hold item that\nraises CHANSEY’s\ncritical-hit rate.$"
-
-gMetalPowderItemDescription:: @ 8582130
- .string "A hold item that\nraises DITTO’s\nDEFENSE.$"
-
-gThickClubItemDescription:: @ 8582159
- .string "A hold item that \nraises CUBONE or\nMAROWAK’s ATTACK.$"
-
-gStickItemDescription:: @ 858218E
- .string "A hold item that\nraises FARFETCH’D’s\ncritical-hit ratio.$"
-
-gRedScarfItemDescription:: @ 85821C7
- .string "A hold item that\nraises COOL in\nCONTESTS.$"
-
-gBlueScarfItemDescription:: @ 85821F1
- .string "A hold item that\nraises BEAUTY in\nCONTESTS.$"
-
-gPinkScarfItemDescription:: @ 858221D
- .string "A hold item that\nraises CUTE in\nCONTESTS.$"
-
-gGreenScarfItemDescription:: @ 8582247
- .string "A hold item that\nraises SMART in\nCONTESTS.$"
-
-gYellowScarfItemDescription:: @ 8582272
- .string "A hold item that\nraises TOUGH in\nCONTESTS.$"
-
-gMachBikeItemDescription:: @ 858229D
- .string "A folding bicycle\nthat doubles your\nspeed or better.$"
-
-gCoinCaseItemDescription:: @ 85822D2
- .string "A case that holds\nup to 9,999 COINS.$"
-
-gItemfinderItemDescription:: @ 85822F7
- .string "A device that\nsignals an invisible\nitem by sound.$"
-
-gOldRodItemDescription:: @ 8582329
- .string "Use by any body of\nwater to fish for\nwild POKéMON.$"
-
-gGoodRodItemDescription:: @ 858235C
- .string "A decent fishing\nrod for catching\nwild POKéMON.$"
-
-gSuperRodItemDescription:: @ 858238C
- .string "The best fishing\nrod for catching\nwild POKéMON.$"
-
-gSSTicketItemDescription:: @ 85823BC
- .string "The ticket required\nfor sailing on a\nferry.$"
-
-gContestPassItemDescription:: @ 85823E8
- .string "The pass required\nfor entering\nPOKéMON CONTESTS.$"
-
-gWailmerPailItemDescription:: @ 8582419
- .string "A tool used for\nwatering BERRIES\nand plants.$"
-
-gDevonGoodsItemDescription:: @ 8582446
- .string "A package that\ncontains DEVON’s\nmachine parts.$"
-
-gSootSackItemDescription:: @ 8582475
- .string "A sack used to\ngather and hold\nvolcanic ash.$"
-
-gBasementKeyItemDescription:: @ 85824A2
- .string "The key for NEW\nMAUVILLE beneath\nMAUVILLE CITY.$"
-
-gAcroBikeItemDescription:: @ 85824D2
- .string "A folding bicycle\ncapable of jumps\nand wheelies.$"
-
-gPokeblockCaseItemDescription:: @ 8582503
- .string "A case for holding\n{POKEBLOCK}S made with\na BERRY BLENDER.$"
-
-gLetterItemDescription:: @ 8582538
- .string "A letter to STEVEN\nfrom the PRESIDENT\nof the DEVON CORP.$"
-
-gEonTicketItemDescription:: @ 8582571
- .string "The ticket for a\nferry to a distant\nsouthern island.$"
-
-gRedOrbItemDescription:: @ 85825A6
- .string "A red, glowing orb\nsaid to contain an\nancient power.$"
-
-gBlueOrbItemDescription:: @ 85825DB
- .string "A blue, glowing orb\nsaid to contain an\nancient power.$"
-
-gScannerItemDescription:: @ 8582611
- .string "A device found\ninside the\nABANDONED SHIP.$"
-
-gGoGogglesItemDescription:: @ 858263B
- .string "Nifty goggles that\nprotect eyes from\ndesert sandstorms.$"
-
-gMeteoriteItemDescription:: @ 8582673
- .string "A meteorite found\nat METEOR FALLS.$"
-
-gRoom1KeyItemDescription:: @ 8582696
- .string "A key that opens a\ndoor inside the\nABANDONED SHIP.$"
-
-gRoom2KeyItemDescription:: @ 85826C9
- .string "A key that opens a\ndoor inside the\nABANDONED SHIP.$"
-
-gRoom4KeyItemDescription:: @ 85826FC
- .string "A key that opens a\ndoor inside the\nABANDONED SHIP.$"
-
-gRoom6KeyItemDescription:: @ 858272F
- .string "A key that opens a\ndoor inside the\nABANDONED SHIP.$"
-
-gStorageKeyItemDescription:: @ 8582762
- .string "The key to the\nstorage inside the\nABANDONED SHIP.$"
-
-gRootFossilItemDescription:: @ 8582794
- .string "A fossil of an\nancient, seafloor-\ndwelling POKéMON.$"
-
-gClawFossilItemDescription:: @ 85827C8
- .string "A fossil of an\nancient, seafloor-\ndwelling POKéMON.$"
-
-gDevonScopeItemDescription:: @ 85827FC
- .string "A device by DEVON\nthat signals any\nunseeable POKéMON.$"
-
-gTM01ItemDescription:: @ 8582832
- .string "Powerful, but makes\nthe user flinch if\nhit by the foe.$"
-
-gTM02ItemDescription:: @ 8582869
- .string "Hooks and slashes\nthe foe with long,\nsharp claws.$"
-
-gTM03ItemDescription:: @ 858289B
- .string "Generates an\nultrasonic wave\nthat may confuse.$"
-
-gTM04ItemDescription:: @ 85828CA
- .string "Raises SP. ATK and\nSP. DEF by focusing\nthe mind.$"
-
-gTM05ItemDescription:: @ 85828FB
- .string "A savage roar that\nmakes the foe flee \nto end the battle.$"
-
-gTM06ItemDescription:: @ 8582935
- .string "Poisons the foe\nwith a toxin that\ngradually worsens.$"
-
-gTM07ItemDescription:: @ 858296A
- .string "Creates a hailstorm\nthat damages all\ntypes except ICE.$"
-
-gTM08ItemDescription:: @ 85829A1
- .string "Bulks up the body\nto boost both\nATTACK & DEFENSE.$"
-
-gTM09ItemDescription:: @ 85829D3
- .string "Shoots 2 to 5 seeds\nin a row to strike\nthe foe.$"
-
-gTM10ItemDescription:: @ 8582A03
- .string "The attack power\nvaries among\ndifferent POKéMON.$"
-
-gTM11ItemDescription:: @ 8582A34
- .string "Raises the power of\nFIRE-type moves\nfor 5 turns.$"
-
-gTM12ItemDescription:: @ 8582A65
- .string "Enrages the foe so\nit can only use\nattack moves.$"
-
-gTM13ItemDescription:: @ 8582A96
- .string "Fires an icy cold\nbeam that may\nfreeze the foe.$"
-
-gTM14ItemDescription:: @ 8582AC6
- .string "A brutal snow-and-\nwind attack that\nmay freeze the foe.$"
-
-gTM15ItemDescription:: @ 8582AFE
- .string "Powerful, but needs\nrecharging the\nnext turn.$"
-
-gTM16ItemDescription:: @ 8582B2C
- .string "Creates a wall of\nlight that lowers\nSP. ATK damage.$"
-
-gTM17ItemDescription:: @ 8582B60
- .string "Negates all damage,\nbut may fail if used\nin succession.$"
-
-gTM18ItemDescription:: @ 8582B98
- .string "Raises the power of\nWATER-type moves\nfor 5 turns.$"
-
-gTM19ItemDescription:: @ 8582BCA
- .string "Recovers half the\nHP of the damage \nthis move inflicts.$"
-
-gTM20ItemDescription:: @ 8582C02
- .string "Prevents status\nabnormality with a\nmystical power.$"
-
-gTM21ItemDescription:: @ 8582C35
- .string "The less the user\nlikes you, the more\npowerful this move.$"
-
-gTM22ItemDescription:: @ 8582C6F
- .string "Absorbs sunlight in\nthe 1st turn, then\nattacks next turn.$"
-
-gTM23ItemDescription:: @ 8582CA9
- .string "Slams the foe with\na hard tail. It may\nlower DEFENSE.$"
-
-gTM24ItemDescription:: @ 8582CDF
- .string "A powerful electric\nattack that may\ncause paralysis.$"
-
-gTM25ItemDescription:: @ 8582D14
- .string "Strikes the foe\nwith a thunderbolt.\nIt may paralyze.$"
-
-gTM26ItemDescription:: @ 8582D49
- .string "Causes a quake\nthat has no effect\non flying foes.$"
-
-gTM27ItemDescription:: @ 8582D7B
- .string "The more the user\nlikes you, the more\npowerful this move.$"
-
-gTM28ItemDescription:: @ 8582DB5
- .string "Digs underground\nthe 1st turn, then\nstrikes next turn.$"
-
-gTM29ItemDescription:: @ 8582DEC
- .string "A powerful psychic\nattack that may\nlower SP. DEF.$"
-
-gTM30ItemDescription:: @ 8582E1E
- .string "Hurls a dark lump\nat the foe. It may\nlower SP. DEF.$"
-
-gTM31ItemDescription:: @ 8582E52
- .string "Destroys barriers\nlike LIGHT SCREEN\nand causes damage.$"
-
-gTM32ItemDescription:: @ 8582E89
- .string "Creates illusory\ncopies to enhance\nelusiveness.$"
-
-gTM33ItemDescription:: @ 8582EB9
- .string "Creates a wall of\nlight that weakens\nphysical attacks.$"
-
-gTM34ItemDescription:: @ 8582EF0
- .string "Zaps the foe with a\njolt of electricity\nthat never misses.$"
-
-gTM35ItemDescription:: @ 8582F2B
- .string "Looses a stream of\nfire that may burn\nthe foe.$"
-
-gTM36ItemDescription:: @ 8582F5A
- .string "Hurls sludge at the\nfoe. It may poison\nthe foe.$"
-
-gTM37ItemDescription:: @ 8582F8A
- .string "Causes a sandstorm\nthat hits the foe\nover several turns.$"
-
-gTM38ItemDescription:: @ 8582FC3
- .string "A powerful fire\nattack that may\nburn the foe.$"
-
-gTM39ItemDescription:: @ 8582FF1
- .string "Stops the foe from\nmoving with rocks.\nMay lower SPEED.$"
-
-gTM40ItemDescription:: @ 8583028
- .string "An extremely fast\nattack that can’t\nbe avoided.$"
-
-gTM41ItemDescription:: @ 8583058
- .string "Prevents the foe\nfrom using the same\nmove in a row.$"
-
-gTM42ItemDescription:: @ 858308C
- .string "Raises ATTACK when\npoisoned, burned,\nor paralyzed.$"
-
-gTM43ItemDescription:: @ 85830BF
- .string "Adds an effect to\nattack depending\non the location.$"
-
-gTM44ItemDescription:: @ 85830F3
- .string "The user sleeps for\n2 turns to restore\nhealth and status.$"
-
-gTM45ItemDescription:: @ 858312D
- .string "Makes it tough to\nattack a foe of the\nopposite gender.$"
-
-gTM46ItemDescription:: @ 8583164
- .string "While attacking,\nit may steal the\nfoe’s held item.$"
-
-gTM47ItemDescription:: @ 8583197
- .string "Spreads hard-\nedged wings and\nslams into the foe.$"
-
-gTM48ItemDescription:: @ 85831C9
- .string "Switches abilities\nwith the foe on the\nturn this is used.$"
-
-gTM49ItemDescription:: @ 8583203
- .string "Steals the effects\nof the move the foe\nis trying to use.$"
-
-gTM50ItemDescription:: @ 858323C
- .string "Enables full-power\nattack, but sharply\nlowers SP. ATK.$"
-
-gHM01ItemDescription:: @ 8583273
- .string "Attacks the foe\nwith sharp blades\nor claws.$"
-
-gHM02ItemDescription:: @ 858329F
- .string "Flies up on the\nfirst turn, then\nattacks next turn.$"
-
-gHM03ItemDescription:: @ 85832D3
- .string "Creates a huge\nwave, then crashes\nit down on the foe.$"
-
-gHM04ItemDescription:: @ 8583309
- .string "Builds enormous\npower, then slams\nthe foe.$"
-
-gHM05ItemDescription:: @ 8583334
- .string "Looses a powerful\nblast of light that\nreduces accuracy.$"
-
-gHM06ItemDescription:: @ 858336C
- .string "A rock-crushingly\ntough attack that\nmay lower DEFENSE.$"
-
-gHM07ItemDescription:: @ 85833A3
- .string "Attacks the foe\nwith enough power\nto climb waterfalls.$"
-
-gHM08ItemDescription:: @ 85833DA
- .string "Dives underwater\nthe 1st turn, then\nattacks next turn.$"
-
-gOaksParcelItemDescription:: @ 8583411
- .string "A parcel for PROF.\nOAK from a POKéMON\nMART’s clerk.$"
-
-gPokeFluteItemDescription:: @ 8583445
- .string "A sweet-sounding\nflute that awakens\nPOKéMON.$"
-
-gSecretKeyItemDescription:: @ 8583472
- .string "The key to the\nCINNABAR ISLAND\nGYM’s entrance.$"
-
-gBikeVoucherItemDescription:: @ 85834A1
- .string "A voucher for\nobtaining a bicycle\nfrom the BIKE SHOP.$"
-
-gGoldTeethItemDescription:: @ 85834D7
- .string "Gold dentures lost\nby the SAFARI\nZONE’s WARDEN.$"
-
-gOldAmberItemDescription:: @ 8583507
- .string "A stone containing\nthe genes of an\nancient POKéMON.$"
-
-gCardKeyItemDescription:: @ 858353B
- .string "A card-type door\nkey used in SILPH\nCO’s office.$"
-
-gLiftKeyItemDescription:: @ 858356B
- .string "An elevator key\nused in TEAM\nROCKET’s HIDEOUT.$"
-
-gHelixFossilItemDescription:: @ 858359A
- .string "A piece of an\nancient marine\nPOKéMON’s seashell.$"
-
-gDomeFossilItemDescription:: @ 85835CB
- .string "A piece of an\nancient marine\nPOKéMON’s shell.$"
-
-gSilphScopeItemDescription:: @ 85835F9
- .string "SILPH CO’s scope\nmakes unseeable\nPOKéMON visible.$"
-
-gBicycleItemDescription:: @ 858362B
- .string "A folding bicycle\nthat is faster than\nthe RUNNING SHOES.$"
-
-gTownMapItemDescription:: @ 8583664
- .string "Can be viewed\nanytime. Shows your\npresent location.$"
-
-gVSSeekerItemDescription:: @ 8583698
- .string "A rechargeable unit\nthat flags battle-\nready TRAINERS.$"
-
-gFameCheckerItemDescription:: @ 85836CF
- .string "Stores information\non famous people\nfor instant recall.$"
-
-gTMCaseItemDescription:: @ 8583707
- .string "A convenient case \nthat holds TMs and\nHMs.$"
-
-gBerryPouchItemDescription:: @ 8583732
- .string "A convenient\ncontainer that\nholds BERRIES.$"
-
-gTeachyTVItemDescription:: @ 858375D
- .string "A TV set tuned to\nan advice program\nfor TRAINERS.$"
-
-gTriPassItemDescription:: @ 858378F
- .string "A pass for ferries\nbetween ONE, TWO,\nand THREE ISLAND.$"
-
-gRainbowPassItemDescription:: @ 85837C6
- .string "For ferries serving\nVERMILION and the\nSEVII ISLANDS.$"
-
-gTeaItemDescription:: @ 85837FB
- .string "A thirst-quenching\ntea prepared by an\nold lady.$"
-
-gMysticTicketItemDescription:: @ 858382B
- .string "A ticket required\nto board the ship\nto NAVEL ROCK.$"
-
-gAuroraTicketItemDescription:: @ 858385E
- .string "A ticket required\nto board the ship\nto BIRTH ISLAND.$"
-
-gPowderJarItemDescription:: @ 8583893
- .string "Stores BERRY\nPOWDER made using\na BERRY CRUSHER.$"
-
-gRubyItemDescription:: @ 85838C3
- .string "An exquisite, red-\nglowing gem that\nsymbolizes passion.$"
-
-gSapphireItemDescription:: @ 85838FB
- .string "A brilliant blue gem\nthat symbolizes\nhonesty.$"
-
-gMagmaEmblemItemDescription:: @ 8583929
- .string "A medal-like item in\nthe same shape as\nTEAM MAGMA’s mark.$"
-
-gOldSeaMapItemDescription:: @ 8583963
- .string "A faded sea chart\nthat shows the way\nto a certain island.$"
diff --git a/data/trader.s b/data/trader.s
deleted file mode 100644
index 1fe929ae7..000000000
--- a/data/trader.s
+++ /dev/null
@@ -1,22 +0,0 @@
-
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .section .rodata
-
- .align 2
-gUnknown_085B09E4:: @ 85B09E4
- .4byte gText_Tristan
- .4byte gText_Philip
- .4byte gText_Dennis
- .4byte gText_Roberto
-
- .align 2
-gUnknown_085B09F4:: @ 85B09F4
- .byte 0x5b, 0x6b, 0x25, 0x15
-
- .align 2
-gUnknown_085B09F8:: @ 85B09F8
- .4byte 0x0a010100, 0x00010f0a
-
-
diff --git a/include/bard_music.h b/include/bard_music.h
index 7d9ca633e..9d3d0ad22 100644
--- a/include/bard_music.h
+++ b/include/bard_music.h
@@ -9,7 +9,7 @@ struct BardSound
/*0x00*/ u8 var00;
/*0x01*/ s8 var01;
/*0x02*/ u16 var02;
- /*0x04*/ u16 volume;
+ /*0x04*/ s16 volume;
/*0x06*/ u16 var06;
};
@@ -39,5 +39,7 @@ struct BardSong
// Exported ROM declarations
extern const u16 gUnknown_085F5490;
+const struct BardSound *GetWordSounds(u16 word);
+void GetWordPhonemes(struct BardSong *song, u16 word);
#endif //GUARD_BARD_MUSIC_H
diff --git a/include/battle_frontier_2.h b/include/battle_frontier_2.h
index 638ff692e..3f8f8049d 100644
--- a/include/battle_frontier_2.h
+++ b/include/battle_frontier_2.h
@@ -7,5 +7,6 @@ u16 sub_81A89A0(u8);
void sub_81A8AF8(void);
bool8 InBattlePike(void);
void sub_819FA50(void);
+void sub_81AA078(u16*, u8);
#endif // GUARD_BATTLE_FRONTIER_2_H
diff --git a/include/battle_records.h b/include/battle_records.h
new file mode 100644
index 000000000..88ff6adc9
--- /dev/null
+++ b/include/battle_records.h
@@ -0,0 +1,12 @@
+#ifndef GUARD_BATTLE_RECORDS_H
+#define GUARD_BATTLE_RECORDS_H
+
+extern u8 gRecordsWindowId;
+
+void ClearPlayerLinkBattleRecords(void);
+void UpdatePlayerLinkBattleRecords(s32 battlerId);
+void ShowLinkBattleRecords(void);
+void RemoveRecordsWindow(void);
+void ShowTrainerHillRecords(void);
+
+#endif // GUARD_BATTLE_RECORDS_H
diff --git a/include/bg.h b/include/bg.h
index de3897fa4..ea84c1573 100644
--- a/include/bg.h
+++ b/include/bg.h
@@ -68,7 +68,7 @@ void UnsetBgTilemapBuffer(u8 bg);
void* GetBgTilemapBuffer(u8 bg);
void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset);
void CopyBgTilemapBufferToVram(u8 bg);
-void CopyToBgTilemapBufferRect(u8 bg, void* src, u8 destX, u8 destY, u8 width, u8 height);
+void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height);
void CopyToBgTilemapBufferRect_ChangePalette(u8 bg, void *src, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette);
void CopyRectToBgTilemapBufferRect(u8 bg, const void *src, u8 srcX, u8 srcY, u8 srcWidth, u8 srcHeight, u8 destX, u8 destY, u8 rectWidth, u8 rectHeight, u8 palette1, u16 tileOffset, u16 palette2);
void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height);
diff --git a/include/constants/decorations.h b/include/constants/decorations.h
index 2e3558721..b9f626d24 100644
--- a/include/constants/decorations.h
+++ b/include/constants/decorations.h
@@ -122,5 +122,6 @@
#define DECOR_REGIROCK_DOLL 118
#define DECOR_REGICE_DOLL 119
#define DECOR_REGISTEEL_DOLL 120
+#define NUM_DECORATIONS DECOR_REGISTEEL_DOLL
#endif // GUARD_CONSTANTS_DECORATIONS_H
diff --git a/include/constants/items.h b/include/constants/items.h
index 8717ecbd5..4ca5cb7df 100644
--- a/include/constants/items.h
+++ b/include/constants/items.h
@@ -108,6 +108,8 @@
#define ITEM_064 100
#define ITEM_065 101
#define ITEM_066 102
+
+// Unusable
#define ITEM_TINY_MUSHROOM 103
#define ITEM_BIG_MUSHROOM 104
#define ITEM_069 105
@@ -126,6 +128,8 @@
#define ITEM_076 118
#define ITEM_077 119
#define ITEM_078 120
+
+// Mails
#define ITEM_ORANGE_MAIL 121
#define ITEM_HARBOR_MAIL 122
#define ITEM_GLITTER_MAIL 123
@@ -138,6 +142,8 @@
#define ITEM_DREAM_MAIL 130
#define ITEM_FAB_MAIL 131
#define ITEM_RETRO_MAIL 132
+
+// Berries
#define ITEM_CHERI_BERRY 133
#define ITEM_CHESTO_BERRY 134
#define ITEM_PECHA_BERRY 135
@@ -185,7 +191,7 @@
#define ITEM_0B1 177
#define ITEM_0B2 178
-// hold items
+// Battle Held items
#define ITEM_BRIGHT_POWDER 179
#define ITEM_WHITE_HERB 180
#define ITEM_MACHO_BRACE 181
@@ -261,6 +267,8 @@
#define ITEM_0FB 251
#define ITEM_0FC 252
#define ITEM_0FD 253
+
+// Contest held items
#define ITEM_RED_SCARF 254
#define ITEM_BLUE_SCARF 255
#define ITEM_PINK_SCARF 256
diff --git a/include/data/item_icon_table.h b/include/data/item_icon_table.h
new file mode 100644
index 000000000..0a24c0572
--- /dev/null
+++ b/include/data/item_icon_table.h
@@ -0,0 +1,414 @@
+#ifndef GUARD_DATA_ITEM_ICON_TABLE_H
+#define GUARD_DATA_ITEM_ICON_TABLE_H
+
+#include "global.h"
+#include "graphics.h"
+
+const u8 * const gItemIconTable[][2] =
+{
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+// Pokeballs
+ gItemIcon_MasterBall, gItemIconPalette_MasterBall,
+ gItemIcon_UltraBall, gItemIconPalette_UltraBall,
+ gItemIcon_GreatBall, gItemIconPalette_GreatBall,
+ gItemIcon_PokeBall, gItemIconPalette_PokeBall,
+ gItemIcon_SafariBall, gItemIconPalette_SafariBall,
+ gItemIcon_NetBall, gItemIconPalette_NetBall,
+ gItemIcon_DiveBall, gItemIconPalette_DiveBall,
+ gItemIcon_NestBall, gItemIconPalette_NestBall,
+ gItemIcon_RepeatBall, gItemIconPalette_RepeatBall,
+ gItemIcon_TimerBall, gItemIconPalette_RepeatBall,
+ gItemIcon_LuxuryBall, gItemIconPalette_LuxuryBall,
+ gItemIcon_PremierBall, gItemIconPalette_LuxuryBall,
+// Medicine
+ gItemIcon_Potion, gItemIconPalette_Potion,
+ gItemIcon_Antidote, gItemIconPalette_Antidote,
+ gItemIcon_StatusHeal, gItemIconPalette_BurnHeal,
+ gItemIcon_StatusHeal, gItemIconPalette_IceHeal,
+ gItemIcon_StatusHeal, gItemIconPalette_Awakening,
+ gItemIcon_StatusHeal, gItemIconPalette_ParalyzeHeal,
+ gItemIcon_LargePotion, gItemIconPalette_FullRestore,
+ gItemIcon_LargePotion, gItemIconPalette_MaxPotion,
+ gItemIcon_Potion, gItemIconPalette_HyperPotion,
+ gItemIcon_Potion, gItemIconPalette_SuperPotion,
+ gItemIcon_FullHeal, gItemIconPalette_FullHeal,
+ gItemIcon_Revive, gItemIconPalette_Revive,
+ gItemIcon_MaxRevive, gItemIconPalette_Revive,
+ gItemIcon_FreshWater, gItemIconPalette_FreshWater,
+ gItemIcon_SodaPop, gItemIconPalette_SodaPop,
+ gItemIcon_Lemonade, gItemIconPalette_Lemonade,
+ gItemIcon_MoomooMilk, gItemIconPalette_MoomooMilk,
+ gItemIcon_Powder, gItemIconPalette_EnergyPowder,
+ gItemIcon_EnergyRoot, gItemIconPalette_EnergyRoot,
+ gItemIcon_Powder, gItemIconPalette_HealPowder,
+ gItemIcon_RevivalHerb, gItemIconPalette_RevivalHerb,
+ gItemIcon_Ether, gItemIconPalette_Ether,
+ gItemIcon_Ether, gItemIconPalette_MaxEther,
+ gItemIcon_Ether, gItemIconPalette_Elixir,
+ gItemIcon_Ether, gItemIconPalette_MaxElixir,
+ gItemIcon_LavaCookie, gItemIconPalette_LavaCookieAndLetter,
+ gItemIcon_Flute, gItemIconPalette_BlueFlute,
+ gItemIcon_Flute, gItemIconPalette_YellowFlute,
+ gItemIcon_Flute, gItemIconPalette_RedFlute,
+ gItemIcon_Flute, gItemIconPalette_BlackFlute,
+ gItemIcon_Flute, gItemIconPalette_WhiteFlute,
+ gItemIcon_BerryJuice, gItemIconPalette_BerryJuice,
+ gItemIcon_SacredAsh, gItemIconPalette_SacredAsh,
+// Collectibles
+ gItemIcon_Powder, gItemIconPalette_ShoalSalt,
+ gItemIcon_ShoalShell, gItemIconPalette_Shell,
+ gItemIcon_Shard, gItemIconPalette_RedShard,
+ gItemIcon_Shard, gItemIconPalette_BlueShard,
+ gItemIcon_Shard, gItemIconPalette_YellowShard,
+ gItemIcon_Shard, gItemIconPalette_GreenShard,
+// ????????
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+// Vitamins
+ gItemIcon_HPUp, gItemIconPalette_HPUp,
+ gItemIcon_Vitamin, gItemIconPalette_Protein,
+ gItemIcon_Vitamin, gItemIconPalette_Iron,
+ gItemIcon_Vitamin, gItemIconPalette_Carbos,
+ gItemIcon_Vitamin, gItemIconPalette_Calcium,
+ gItemIcon_RareCandy, gItemIconPalette_RareCandy,
+ gItemIcon_PPUp, gItemIconPalette_PPUp,
+ gItemIcon_Vitamin, gItemIconPalette_Zinc,
+ gItemIcon_PPMax, gItemIconPalette_PPMax,
+// ????????
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+// Battle items
+ gItemIcon_BattleStatItem, gItemIconPalette_GuardSpec,
+ gItemIcon_BattleStatItem, gItemIconPalette_DireHit,
+ gItemIcon_BattleStatItem, gItemIconPalette_XAttack,
+ gItemIcon_BattleStatItem, gItemIconPalette_XDefend,
+ gItemIcon_BattleStatItem, gItemIconPalette_XSpeed,
+ gItemIcon_BattleStatItem, gItemIconPalette_XAccuracy,
+ gItemIcon_BattleStatItem, gItemIconPalette_XSpecial,
+ gItemIcon_PokeDoll, gItemIconPalette_PokeDoll,
+ gItemIcon_FluffyTail, gItemIconPalette_FluffyTail,
+// ????????
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+// Field items
+ gItemIcon_Repel, gItemIconPalette_SuperRepel,
+ gItemIcon_Repel, gItemIconPalette_MaxRepel,
+ gItemIcon_EscapeRope, gItemIconPalette_EscapeRope,
+ gItemIcon_Repel, gItemIconPalette_Repel,
+// ????????
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+// Evolution stones
+ gItemIcon_SunStone, gItemIconPalette_SunStone,
+ gItemIcon_MoonStone, gItemIconPalette_MoonStone,
+ gItemIcon_FireStone, gItemIconPalette_FireStone,
+ gItemIcon_ThunderStone, gItemIconPalette_ThunderStone,
+ gItemIcon_WaterStone, gItemIconPalette_WaterStone,
+ gItemIcon_LeafStone, gItemIconPalette_LeafStone,
+// ????????
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+// Valuables
+ gItemIcon_TinyMushroom, gItemIconPalette_Mushroom,
+ gItemIcon_BigMushroom, gItemIconPalette_Mushroom,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_Pearl, gItemIconPalette_Pearl,
+ gItemIcon_BigPearl, gItemIconPalette_Pearl,
+ gItemIcon_Stardust, gItemIconPalette_Star,
+ gItemIcon_StarPiece, gItemIconPalette_Star,
+ gItemIcon_Nugget, gItemIconPalette_Nugget,
+ gItemIcon_HeartScale, gItemIconPalette_HeartScale,
+// ????????
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+// Mail
+ gItemIcon_OrangeMail, gItemIconPalette_OrangeMail,
+ gItemIcon_HarborMail, gItemIconPalette_HarborMail,
+ gItemIcon_GlitterMail, gItemIconPalette_GlitterMail,
+ gItemIcon_MechMail, gItemIconPalette_MechMail,
+ gItemIcon_WoodMail, gItemIconPalette_WoodMail,
+ gItemIcon_WaveMail, gItemIconPalette_WaveMail,
+ gItemIcon_BeadMail, gItemIconPalette_BeadMail,
+ gItemIcon_ShadowMail, gItemIconPalette_ShadowMail,
+ gItemIcon_TropicMail, gItemIconPalette_TropicMail,
+ gItemIcon_DreamMail, gItemIconPalette_DreamMail,
+ gItemIcon_FabMail, gItemIconPalette_FabMail,
+ gItemIcon_RetroMail, gItemIconPalette_RetroMail,
+// Berries
+ gItemIcon_CheriBerry, gItemIconPalette_CheriBerry,
+ gItemIcon_ChestoBerry, gItemIconPalette_ChestoBerry,
+ gItemIcon_PechaBerry, gItemIconPalette_PechaBerry,
+ gItemIcon_RawstBerry, gItemIconPalette_RawstBerry,
+ gItemIcon_AspearBerry, gItemIconPalette_AspearBerry,
+ gItemIcon_LeppaBerry, gItemIconPalette_LeppaBerry,
+ gItemIcon_OranBerry, gItemIconPalette_OranBerry,
+ gItemIcon_PersimBerry, gItemIconPalette_PersimBerry,
+ gItemIcon_LumBerry, gItemIconPalette_LumBerry,
+ gItemIcon_SitrusBerry, gItemIconPalette_SitrusBerry,
+ gItemIcon_FigyBerry, gItemIconPalette_FigyBerry,
+ gItemIcon_WikiBerry, gItemIconPalette_WikiBerry,
+ gItemIcon_MagoBerry, gItemIconPalette_MagoBerry,
+ gItemIcon_AguavBerry, gItemIconPalette_AguavBerry,
+ gItemIcon_IapapaBerry, gItemIconPalette_IapapaBerry,
+ gItemIcon_RazzBerry, gItemIconPalette_RazzBerry,
+ gItemIcon_BlukBerry, gItemIconPalette_BlukBerry,
+ gItemIcon_NanabBerry, gItemIconPalette_NanabBerry,
+ gItemIcon_WepearBerry, gItemIconPalette_WepearBerry,
+ gItemIcon_PinapBerry, gItemIconPalette_PinapBerry,
+ gItemIcon_PomegBerry, gItemIconPalette_PomegBerry,
+ gItemIcon_KelpsyBerry, gItemIconPalette_KelpsyBerry,
+ gItemIcon_QualotBerry, gItemIconPalette_QualotBerry,
+ gItemIcon_HondewBerry, gItemIconPalette_HondewBerry,
+ gItemIcon_GrepaBerry, gItemIconPalette_GrepaBerry,
+ gItemIcon_TamatoBerry, gItemIconPalette_TamatoBerry,
+ gItemIcon_CornnBerry, gItemIconPalette_CornnBerry,
+ gItemIcon_MagostBerry, gItemIconPalette_MagostBerry,
+ gItemIcon_RabutaBerry, gItemIconPalette_RabutaBerry,
+ gItemIcon_NomelBerry, gItemIconPalette_NomelBerry,
+ gItemIcon_SpelonBerry, gItemIconPalette_SpelonBerry,
+ gItemIcon_PamtreBerry, gItemIconPalette_PamtreBerry,
+ gItemIcon_WatmelBerry, gItemIconPalette_WatmelBerry,
+ gItemIcon_DurinBerry, gItemIconPalette_DurinBerry,
+ gItemIcon_BelueBerry, gItemIconPalette_BelueBerry,
+ gItemIcon_LiechiBerry, gItemIconPalette_LiechiBerry,
+ gItemIcon_GanlonBerry, gItemIconPalette_GanlonBerry,
+ gItemIcon_SalacBerry, gItemIconPalette_SalacBerry,
+ gItemIcon_PetayaBerry, gItemIconPalette_PetayaBerry,
+ gItemIcon_ApicotBerry, gItemIconPalette_ApicotBerry,
+ gItemIcon_LansatBerry, gItemIconPalette_LansatBerry,
+ gItemIcon_StarfBerry, gItemIconPalette_StarfBerry,
+ gItemIcon_EnigmaBerry, gItemIconPalette_EnigmaBerry,
+// ????????
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+// Hold items
+ gItemIcon_BrightPowder, gItemIconPalette_BrightPowder,
+ gItemIcon_InBattleHerb, gItemIconPalette_WhiteHerb,
+ gItemIcon_MachoBrace, gItemIconPalette_MachoBrace,
+ gItemIcon_ExpShare, gItemIconPalette_ExpShare,
+ gItemIcon_QuickClaw, gItemIconPalette_QuickClaw,
+ gItemIcon_SootheBell, gItemIconPalette_SootheBell,
+ gItemIcon_InBattleHerb, gItemIconPalette_MentalHerb,
+ gItemIcon_ChoiceBand, gItemIconPalette_ChoiceBand,
+ gItemIcon_KingsRock, gItemIconPalette_KingsRock,
+ gItemIcon_SilverPowder, gItemIconPalette_SilverPowder,
+ gItemIcon_AmuletCoin, gItemIconPalette_AmuletCoin,
+ gItemIcon_CleanseTag, gItemIconPalette_CleanseTag,
+ gItemIcon_SoulDew, gItemIconPalette_SoulDew,
+ gItemIcon_DeepSeaTooth, gItemIconPalette_DeepSeaTooth,
+ gItemIcon_DeepSeaScale, gItemIconPalette_DeepSeaScale,
+ gItemIcon_SmokeBall, gItemIconPalette_SmokeBall,
+ gItemIcon_Everstone, gItemIconPalette_Everstone,
+ gItemIcon_FocusBand, gItemIconPalette_FocusBand,
+ gItemIcon_LuckyEgg, gItemIconPalette_LuckyEgg,
+ gItemIcon_ScopeLens, gItemIconPalette_ScopeLens,
+ gItemIcon_MetalCoat, gItemIconPalette_MetalCoat,
+ gItemIcon_Leftovers, gItemIconPalette_Leftovers,
+ gItemIcon_DragonScale, gItemIconPalette_DragonScale,
+ gItemIcon_LightBall, gItemIconPalette_LightBall,
+ gItemIcon_SoftSand, gItemIconPalette_SoftSand,
+ gItemIcon_HardStone, gItemIconPalette_HardStone,
+ gItemIcon_MiracleSeed, gItemIconPalette_MiracleSeed,
+ gItemIcon_BlackGlasses, gItemIconPalette_BlackTypeEnhancingItem,
+ gItemIcon_BlackBelt, gItemIconPalette_BlackTypeEnhancingItem,
+ gItemIcon_Magnet, gItemIconPalette_Magnet,
+ gItemIcon_MysticWater, gItemIconPalette_MysticWater,
+ gItemIcon_SharpBeak, gItemIconPalette_SharpBeak,
+ gItemIcon_PoisonBarb, gItemIconPalette_PoisonBarb,
+ gItemIcon_NeverMeltIce, gItemIconPalette_NeverMeltIce,
+ gItemIcon_SpellTag, gItemIconPalette_SpellTag,
+ gItemIcon_TwistedSpoon, gItemIconPalette_TwistedSpoon,
+ gItemIcon_Charcoal, gItemIconPalette_Charcoal,
+ gItemIcon_DragonFang, gItemIconPalette_DragonFang,
+ gItemIcon_SilkScarf, gItemIconPalette_SilkScarf,
+ gItemIcon_UpGrade, gItemIconPalette_UpGrade,
+ gItemIcon_ShellBell, gItemIconPalette_Shell,
+ gItemIcon_SeaIncense, gItemIconPalette_SeaIncense,
+ gItemIcon_LaxIncense, gItemIconPalette_LaxIncense,
+ gItemIcon_LuckyPunch, gItemIconPalette_LuckyPunch,
+ gItemIcon_MetalPowder, gItemIconPalette_MetalPowder,
+ gItemIcon_ThickClub, gItemIconPalette_ThickClub,
+ gItemIcon_Stick, gItemIconPalette_Stick,
+// ????????
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+// Contest hold items
+ gItemIcon_Scarf, gItemIconPalette_RedScarf,
+ gItemIcon_Scarf, gItemIconPalette_BlueScarf,
+ gItemIcon_Scarf, gItemIconPalette_PinkScarf,
+ gItemIcon_Scarf, gItemIconPalette_GreenScarf,
+ gItemIcon_Scarf, gItemIconPalette_YellowScarf,
+// Key items
+ gItemIcon_MachBike, gItemIconPalette_MachBike,
+ gItemIcon_CoinCase, gItemIconPalette_CoinCase,
+ gItemIcon_Itemfinder, gItemIconPalette_Itemfinder,
+ gItemIcon_OldRod, gItemIconPalette_OldRod,
+ gItemIcon_GoodRod, gItemIconPalette_GoodRod,
+ gItemIcon_SuperRod, gItemIconPalette_SuperRod,
+ gItemIcon_SSTicket, gItemIconPalette_SSTicket,
+ gItemIcon_ContestPass, gItemIconPalette_ContestPass,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_WailmerPail, gItemIconPalette_WailmerPail,
+ gItemIcon_DevonGoods, gItemIconPalette_DevonGoods,
+ gItemIcon_SootSack, gItemIconPalette_SootSack,
+ gItemIcon_BasementKey, gItemIconPalette_OldKey,
+ gItemIcon_AcroBike, gItemIconPalette_AcroBike,
+ gItemIcon_PokeblockCase, gItemIconPalette_PokeblockCase,
+ gItemIcon_Letter, gItemIconPalette_LavaCookieAndLetter,
+ gItemIcon_EonTicket, gItemIconPalette_EonTicket,
+ gItemIcon_Orb, gItemIconPalette_RedOrb,
+ gItemIcon_Orb, gItemIconPalette_BlueOrb,
+ gItemIcon_Scanner, gItemIconPalette_Scanner,
+ gItemIcon_GoGoggles, gItemIconPalette_GoGoggles,
+ gItemIcon_Meteorite, gItemIconPalette_Meteorite,
+ gItemIcon_Room1Key, gItemIconPalette_Key,
+ gItemIcon_Room2Key, gItemIconPalette_Key,
+ gItemIcon_Room4Key, gItemIconPalette_Key,
+ gItemIcon_Room6Key, gItemIconPalette_Key,
+ gItemIcon_StorageKey, gItemIconPalette_OldKey,
+ gItemIcon_RootFossil, gItemIconPalette_HoennFossil,
+ gItemIcon_ClawFossil, gItemIconPalette_HoennFossil,
+ gItemIcon_DevonScope, gItemIconPalette_DevonScope,
+// TMs/HMs
+ gItemIcon_TM, gItemIconPalette_FightingTMHM, // TM01
+ gItemIcon_TM, gItemIconPalette_DragonTMHM, // TM02
+ gItemIcon_TM, gItemIconPalette_WaterTMHM, // TM03
+ gItemIcon_TM, gItemIconPalette_PsychicTMHM, // TM04
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM05
+ gItemIcon_TM, gItemIconPalette_PoisonTMHM, // TM06
+ gItemIcon_TM, gItemIconPalette_IceTMHM, // TM07
+ gItemIcon_TM, gItemIconPalette_FightingTMHM, // TM08
+ gItemIcon_TM, gItemIconPalette_GrassTMHM, // TM09
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM10
+ gItemIcon_TM, gItemIconPalette_FireTMHM, // TM11
+ gItemIcon_TM, gItemIconPalette_DarkTMHM, // TM12
+ gItemIcon_TM, gItemIconPalette_IceTMHM, // TM13
+ gItemIcon_TM, gItemIconPalette_IceTMHM, // TM14
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM15
+ gItemIcon_TM, gItemIconPalette_PsychicTMHM, // TM16
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM17
+ gItemIcon_TM, gItemIconPalette_WaterTMHM, // TM18
+ gItemIcon_TM, gItemIconPalette_GrassTMHM, // TM19
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM20
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM21
+ gItemIcon_TM, gItemIconPalette_GrassTMHM, // TM22
+ gItemIcon_TM, gItemIconPalette_SteelTMHM, // TM23
+ gItemIcon_TM, gItemIconPalette_ElectricTMHM, // TM24
+ gItemIcon_TM, gItemIconPalette_ElectricTMHM, // TM25
+ gItemIcon_TM, gItemIconPalette_GroundTMHM, // TM26
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM27
+ gItemIcon_TM, gItemIconPalette_GroundTMHM, // TM28
+ gItemIcon_TM, gItemIconPalette_PsychicTMHM, // TM29
+ gItemIcon_TM, gItemIconPalette_GhostTMHM, // TM30
+ gItemIcon_TM, gItemIconPalette_FightingTMHM, // TM31
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM32
+ gItemIcon_TM, gItemIconPalette_PsychicTMHM, // TM33
+ gItemIcon_TM, gItemIconPalette_ElectricTMHM, // TM34
+ gItemIcon_TM, gItemIconPalette_FireTMHM, // TM35
+ gItemIcon_TM, gItemIconPalette_PoisonTMHM, // TM36
+ gItemIcon_TM, gItemIconPalette_RockTMHM, // TM37
+ gItemIcon_TM, gItemIconPalette_FireTMHM, // TM38
+ gItemIcon_TM, gItemIconPalette_RockTMHM, // TM39
+ gItemIcon_TM, gItemIconPalette_FlyingTMHM, // TM40
+ gItemIcon_TM, gItemIconPalette_DarkTMHM, // TM41
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM42
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM43
+ gItemIcon_TM, gItemIconPalette_PsychicTMHM, // TM44
+ gItemIcon_TM, gItemIconPalette_NormalTMHM, // TM45
+ gItemIcon_TM, gItemIconPalette_DarkTMHM, // TM46
+ gItemIcon_TM, gItemIconPalette_SteelTMHM, // TM47
+ gItemIcon_TM, gItemIconPalette_PsychicTMHM, // TM48
+ gItemIcon_TM, gItemIconPalette_DarkTMHM, // TM49
+ gItemIcon_TM, gItemIconPalette_FireTMHM, // TM50
+ gItemIcon_HM, gItemIconPalette_NormalTMHM, // HM01
+ gItemIcon_HM, gItemIconPalette_FlyingTMHM, // HM02
+ gItemIcon_HM, gItemIconPalette_WaterTMHM, // HM03
+ gItemIcon_HM, gItemIconPalette_NormalTMHM, // HM04
+ gItemIcon_HM, gItemIconPalette_NormalTMHM, // HM05
+ gItemIcon_HM, gItemIconPalette_FightingTMHM, // HM06
+ gItemIcon_HM, gItemIconPalette_WaterTMHM, // HM07
+ gItemIcon_HM, gItemIconPalette_WaterTMHM, // HM08
+// ????????
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+ gItemIcon_QuestionMark, gItemIconPalette_QuestionMark,
+// FireRed/LeafGreen key items
+ gItemIcon_OaksParcel, gItemIconPalette_OaksParcel,
+ gItemIcon_PokeFlute, gItemIconPalette_PokeFlute,
+ gItemIcon_SecretKey, gItemIconPalette_SecretKey,
+ gItemIcon_BikeVoucher, gItemIconPalette_BikeVoucher,
+ gItemIcon_GoldTeeth, gItemIconPalette_GoldTeeth,
+ gItemIcon_OldAmber, gItemIconPalette_OldAmber,
+ gItemIcon_CardKey, gItemIconPalette_CardKey,
+ gItemIcon_LiftKey, gItemIconPalette_Key,
+ gItemIcon_HelixFossil, gItemIconPalette_KantoFossil,
+ gItemIcon_DomeFossil, gItemIconPalette_KantoFossil,
+ gItemIcon_SilphScope, gItemIconPalette_SilphScope,
+ gItemIcon_Bicycle, gItemIconPalette_Bicycle,
+ gItemIcon_TownMap, gItemIconPalette_TownMap,
+ gItemIcon_VSSeeker, gItemIconPalette_VSSeeker,
+ gItemIcon_FameChecker, gItemIconPalette_FameChecker,
+ gItemIcon_TMCase, gItemIconPalette_TMCase,
+ gItemIcon_BerryPouch, gItemIconPalette_BerryPouch,
+ gItemIcon_TeachyTV, gItemIconPalette_TeachyTV,
+ gItemIcon_TriPass, gItemIconPalette_TriPass,
+ gItemIcon_RainbowPass, gItemIconPalette_RainbowPass,
+ gItemIcon_Tea, gItemIconPalette_Tea,
+ gItemIcon_MysticTicket, gItemIconPalette_MysticTicket,
+ gItemIcon_AuroraTicket, gItemIconPalette_AuroraTicket,
+ gItemIcon_PowderJar, gItemIconPalette_PowderJar,
+ gItemIcon_Gem, gItemIconPalette_Ruby,
+ gItemIcon_Gem, gItemIconPalette_Sapphire,
+// Emerald-only key items
+ gItemIcon_MagmaEmblem, gItemIconPalette_MagmaEmblem,
+ gItemIcon_OldSeaMap, gItemIconPalette_OldSeaMap,
+// Return to field arrow
+ gItemIcon_ReturnToFieldArrow, gItemIconPalette_ReturnToFieldArrow,
+};
+#endif // GUARD_DATA_ITEM_ICON_TABLE_H
diff --git a/include/data/items.h b/include/data/items.h
new file mode 100644
index 000000000..49f981faf
--- /dev/null
+++ b/include/data/items.h
@@ -0,0 +1,6079 @@
+const struct Item gItems[] =
+{
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Pokeballs
+
+ {
+ .name = _("MASTER BALL"),
+ .itemId = ITEM_MASTER_BALL,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gMasterBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 0,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ULTRA BALL"),
+ .itemId = ITEM_ULTRA_BALL,
+ .price = 1200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gUltraBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 1,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 1,
+ },
+ {
+ .name = _("GREAT BALL"),
+ .itemId = ITEM_GREAT_BALL,
+ .price = 600,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gGreatBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 2,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 2,
+ },
+ {
+ .name = _("POKé BALL"),
+ .itemId = ITEM_POKE_BALL,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPokeBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 3,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 3,
+ },
+ {
+ .name = _("SAFARI BALL"),
+ .itemId = ITEM_SAFARI_BALL,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gSafariBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 4,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 4,
+ },
+ {
+ .name = _("NET BALL"),
+ .itemId = ITEM_NET_BALL,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gNetBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 5,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 5,
+ },
+ {
+ .name = _("DIVE BALL"),
+ .itemId = ITEM_DIVE_BALL,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDiveBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 6,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 6,
+ },
+ {
+ .name = _("NEST BALL"),
+ .itemId = ITEM_NEST_BALL,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gNestBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 7,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 7,
+ },
+ {
+ .name = _("REPEAT BALL"),
+ .itemId = ITEM_REPEAT_BALL,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRepeatBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 8,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 8,
+ },
+ {
+ .name = _("TIMER BALL"),
+ .itemId = ITEM_TIMER_BALL,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTimerBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 9,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 9,
+ },
+ {
+ .name = _("LUXURY BALL"),
+ .itemId = ITEM_LUXURY_BALL,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gLuxuryBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 10,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 10,
+ },
+ {
+ .name = _("PREMIER BALL"),
+ .itemId = ITEM_PREMIER_BALL,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPremierBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_POKE_BALLS,
+ .type = 11,
+ .fieldUseFunc = NULL,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_PokeBall,
+ .secondaryId = 11,
+ },
+
+//Medicine
+
+ {
+ .name = _("POTION"),
+ .itemId = ITEM_POTION,
+ .price = 300,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 20,
+ .description = gPotionItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ANTIDOTE"),
+ .itemId = ITEM_ANTIDOTE,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gAntidoteItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BURN HEAL"),
+ .itemId = ITEM_BURN_HEAL,
+ .price = 250,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBurnHealItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ICE HEAL"),
+ .itemId = ITEM_ICE_HEAL,
+ .price = 250,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gIceHealItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("AWAKENING"),
+ .itemId = ITEM_AWAKENING,
+ .price = 250,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gAwakeningItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PARLYZ HEAL"),
+ .itemId = ITEM_PARALYZE_HEAL,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gParalyzeHealItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("FULL RESTORE"),
+ .itemId = ITEM_FULL_RESTORE,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 255,
+ .description = gFullRestoreItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MAX POTION"),
+ .itemId = ITEM_MAX_POTION,
+ .price = 2500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 255,
+ .description = gMaxPotionItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HYPER POTION"),
+ .itemId = ITEM_HYPER_POTION,
+ .price = 1200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 200,
+ .description = gHyperPotionItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SUPER POTION"),
+ .itemId = ITEM_SUPER_POTION,
+ .price = 700,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 50,
+ .description = gSuperPotionItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("FULL HEAL"),
+ .itemId = ITEM_FULL_HEAL,
+ .price = 600,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gFullHealItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("REVIVE"),
+ .itemId = ITEM_REVIVE,
+ .price = 1500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gReviveItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MAX REVIVE"),
+ .itemId = ITEM_MAX_REVIVE,
+ .price = 4000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gMaxReviveItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("FRESH WATER"),
+ .itemId = ITEM_FRESH_WATER,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 50,
+ .description = gFreshWaterItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SODA POP"),
+ .itemId = ITEM_SODA_POP,
+ .price = 300,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 60,
+ .description = gSodaPopItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LEMONADE"),
+ .itemId = ITEM_LEMONADE,
+ .price = 350,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 80,
+ .description = gLemonadeItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MOOMOO MILK"),
+ .itemId = ITEM_MOOMOO_MILK,
+ .price = 500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 100,
+ .description = gMoomooMilkItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ENERGYPOWDER"),
+ .itemId = ITEM_ENERGY_POWDER,
+ .price = 500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gEnergyPowderItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ENERGY ROOT"),
+ .itemId = ITEM_ENERGY_ROOT,
+ .price = 800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gEnergyRootItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HEAL POWDER"),
+ .itemId = ITEM_HEAL_POWDER,
+ .price = 450,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHealPowderItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("REVIVAL HERB"),
+ .itemId = ITEM_REVIVAL_HERB,
+ .price = 2800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRevivalHerbItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ETHER"),
+ .itemId = ITEM_ETHER,
+ .price = 1200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 10,
+ .description = gEtherItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_PPRecovery,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_PPRecovery,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MAX ETHER"),
+ .itemId = ITEM_MAX_ETHER,
+ .price = 2000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 255,
+ .description = gMaxEtherItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_PPRecovery,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_PPRecovery,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ELIXIR"),
+ .itemId = ITEM_ELIXIR,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 10,
+ .description = gElixirItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_PPRecovery,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_PPRecovery,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MAX ELIXIR"),
+ .itemId = ITEM_MAX_ELIXIR,
+ .price = 4500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 255,
+ .description = gMaxElixirItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_PPRecovery,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_PPRecovery,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LAVA COOKIE"),
+ .itemId = ITEM_LAVA_COOKIE,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gLavaCookieItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BLUE FLUTE"),
+ .itemId = ITEM_BLUE_FLUTE,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBlueFluteItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("YELLOW FLUTE"),
+ .itemId = ITEM_YELLOW_FLUTE,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gYellowFluteItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RED FLUTE"),
+ .itemId = ITEM_RED_FLUTE,
+ .price = 300,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRedFluteItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BLACK FLUTE"),
+ .itemId = ITEM_BLACK_FLUTE,
+ .price = 400,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 50,
+ .description = gBlackFluteItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_BlackWhiteFlute,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("WHITE FLUTE"),
+ .itemId = ITEM_WHITE_FLUTE,
+ .price = 500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 150,
+ .description = gWhiteFluteItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_BlackWhiteFlute,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BERRY JUICE"),
+ .itemId = ITEM_BERRY_JUICE,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_RESTORE_HP,
+ .holdEffectParam = 20,
+ .description = gBerryJuiceItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SACRED ASH"),
+ .itemId = ITEM_SACRED_ASH,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gSacredAshItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_SacredAsh,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Collectibles
+
+ {
+ .name = _("SHOAL SALT"),
+ .itemId = ITEM_SHOAL_SALT,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gShoalSaltItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SHOAL SHELL"),
+ .itemId = ITEM_SHOAL_SHELL,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gShoalShellItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RED SHARD"),
+ .itemId = ITEM_RED_SHARD,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRedShardItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BLUE SHARD"),
+ .itemId = ITEM_BLUE_SHARD,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBlueShardItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("YELLOW SHARD"),
+ .itemId = ITEM_YELLOW_SHARD,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gYellowShardItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("GREEN SHARD"),
+ .itemId = ITEM_GREEN_SHARD,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gGreenShardItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Vitamins
+
+ {
+ .name = _("HP UP"),
+ .itemId = ITEM_HP_UP,
+ .price = 9800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHPUpItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PROTEIN"),
+ .itemId = ITEM_PROTEIN,
+ .price = 9800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gProteinItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("IRON"),
+ .itemId = ITEM_IRON,
+ .price = 9800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gIronItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("CARBOS"),
+ .itemId = ITEM_CARBOS,
+ .price = 9800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gCarbosItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("CALCIUM"),
+ .itemId = ITEM_CALCIUM,
+ .price = 9800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gCalciumItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RARE CANDY"),
+ .itemId = ITEM_RARE_CANDY,
+ .price = 4800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRareCandyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_RareCandy,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PP UP"),
+ .itemId = ITEM_PP_UP,
+ .price = 9800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPPUpItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_PPUp,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ZINC"),
+ .itemId = ITEM_ZINC,
+ .price = 9800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gZincItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PP MAX"),
+ .itemId = ITEM_PP_MAX,
+ .price = 9800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPPMaxItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_PPUp,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Battle items
+
+ {
+ .name = _("GUARD SPEC."),
+ .itemId = ITEM_GUARD_SPEC,
+ .price = 700,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gGuardSpecItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_StatIncrease,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("DIRE HIT"),
+ .itemId = ITEM_DIRE_HIT,
+ .price = 650,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDireHitItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_StatIncrease,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("X ATTACK"),
+ .itemId = ITEM_X_ATTACK,
+ .price = 500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gXAttackItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_StatIncrease,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("X DEFEND"),
+ .itemId = ITEM_X_DEFEND,
+ .price = 550,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gXDefendItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_StatIncrease,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("X SPEED"),
+ .itemId = ITEM_X_SPEED,
+ .price = 350,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gXSpeedItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_StatIncrease,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("X ACCURACY"),
+ .itemId = ITEM_X_ACCURACY,
+ .price = 950,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gXAccuracyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_StatIncrease,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("X SPECIAL"),
+ .itemId = ITEM_X_SPECIAL,
+ .price = 350,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gXSpecialItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_StatIncrease,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("POKé DOLL"),
+ .itemId = ITEM_POKE_DOLL,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPokeDollItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_Escape,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("FLUFFY TAIL"),
+ .itemId = ITEM_FLUFFY_TAIL,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gFluffyTailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 2,
+ .battleUseFunc = ItemUseInBattle_Escape,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Field items
+
+ {
+ .name = _("SUPER REPEL"),
+ .itemId = ITEM_SUPER_REPEL,
+ .price = 500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 200,
+ .description = gSuperRepelItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_Repel,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MAX REPEL"),
+ .itemId = ITEM_MAX_REPEL,
+ .price = 700,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 250,
+ .description = gMaxRepelItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_Repel,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ESCAPE ROPE"),
+ .itemId = ITEM_ESCAPE_ROPE,
+ .price = 550,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gEscapeRopeItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_EscapeRope,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("REPEL"),
+ .itemId = ITEM_REPEL,
+ .price = 350,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 100,
+ .description = gRepelItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_Repel,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Evolution stones
+
+ {
+ .name = _("SUN STONE"),
+ .itemId = ITEM_SUN_STONE,
+ .price = 2100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gSunStoneItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MOON STONE"),
+ .itemId = ITEM_MOON_STONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gMoonStoneItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("FIRE STONE"),
+ .itemId = ITEM_FIRE_STONE,
+ .price = 2100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gFireStoneItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("THUNDERSTONE"),
+ .itemId = ITEM_THUNDER_STONE,
+ .price = 2100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gThunderStoneItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("WATER STONE"),
+ .itemId = ITEM_WATER_STONE,
+ .price = 2100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gWaterStoneItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LEAF STONE"),
+ .itemId = ITEM_LEAF_STONE,
+ .price = 2100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gLeafStoneItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_EvolutionStone,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Valuable items
+
+ {
+ .name = _("TINYMUSHROOM"),
+ .itemId = ITEM_TINY_MUSHROOM,
+ .price = 500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTinyMushroomItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BIG MUSHROOM"),
+ .itemId = ITEM_BIG_MUSHROOM,
+ .price = 5000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBigMushroomItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PEARL"),
+ .itemId = ITEM_PEARL,
+ .price = 1400,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPearlItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BIG PEARL"),
+ .itemId = ITEM_BIG_PEARL,
+ .price = 7500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBigPearlItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("STARDUST"),
+ .itemId = ITEM_STARDUST,
+ .price = 2000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gStardustItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("STAR PIECE"),
+ .itemId = ITEM_STAR_PIECE,
+ .price = 9800,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gStarPieceItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("NUGGET"),
+ .itemId = ITEM_NUGGET,
+ .price = 10000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gNuggetItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HEART SCALE"),
+ .itemId = ITEM_HEART_SCALE,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHeartScaleItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Mail
+ {
+ .name = _("ORANGE MAIL"),
+ .itemId = ITEM_ORANGE_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gOrangeMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HARBOR MAIL"),
+ .itemId = ITEM_HARBOR_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHarborMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 1,
+ },
+ {
+ .name = _("GLITTER MAIL"),
+ .itemId = ITEM_GLITTER_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gGlitterMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 2,
+ },
+ {
+ .name = _("MECH MAIL"),
+ .itemId = ITEM_MECH_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gMechMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 3,
+ },
+ {
+ .name = _("WOOD MAIL"),
+ .itemId = ITEM_WOOD_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gWoodMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 4,
+ },
+ {
+ .name = _("WAVE MAIL"),
+ .itemId = ITEM_WAVE_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gWaveMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 5,
+ },
+ {
+ .name = _("BEAD MAIL"),
+ .itemId = ITEM_BEAD_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBeadMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 6,
+ },
+ {
+ .name = _("SHADOW MAIL"),
+ .itemId = ITEM_SHADOW_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gShadowMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 7,
+ },
+ {
+ .name = _("TROPIC MAIL"),
+ .itemId = ITEM_TROPIC_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTropicMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 8,
+ },
+ {
+ .name = _("DREAM MAIL"),
+ .itemId = ITEM_DREAM_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDreamMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 9,
+ },
+ {
+ .name = _("FAB MAIL"),
+ .itemId = ITEM_FAB_MAIL,
+ .price = 50,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gFabMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 10,
+ },
+ {
+ .name = _("RETRO MAIL"),
+ .itemId = ITEM_RETRO_MAIL,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRetroMailItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 0,
+ .fieldUseFunc = ItemUseOutOfBattle_Mail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 11,
+ },
+
+//Berries
+
+ {
+ .name = _("CHERI BERRY"),
+ .itemId = ITEM_CHERI_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CURE_PAR,
+ .holdEffectParam = 0,
+ .description = gCheriBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("CHESTO BERRY"),
+ .itemId = ITEM_CHESTO_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CURE_SLP,
+ .holdEffectParam = 0,
+ .description = gChestoBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PECHA BERRY"),
+ .itemId = ITEM_PECHA_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CURE_PSN,
+ .holdEffectParam = 0,
+ .description = gPechaBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RAWST BERRY"),
+ .itemId = ITEM_RAWST_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CURE_BRN,
+ .holdEffectParam = 0,
+ .description = gRawstBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ASPEAR BERRY"),
+ .itemId = ITEM_ASPEAR_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CURE_FRZ,
+ .holdEffectParam = 0,
+ .description = gAspearBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LEPPA BERRY"),
+ .itemId = ITEM_LEPPA_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_RESTORE_PP,
+ .holdEffectParam = 10,
+ .description = gLeppaBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_PPRecovery,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_PPRecovery,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ORAN BERRY"),
+ .itemId = ITEM_ORAN_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_RESTORE_HP,
+ .holdEffectParam = 10,
+ .description = gOranBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PERSIM BERRY"),
+ .itemId = ITEM_PERSIM_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CURE_CONFUSION,
+ .holdEffectParam = 0,
+ .description = gPersimBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LUM BERRY"),
+ .itemId = ITEM_LUM_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CURE_STATUS,
+ .holdEffectParam = 0,
+ .description = gLumBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SITRUS BERRY"),
+ .itemId = ITEM_SITRUS_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_RESTORE_HP,
+ .holdEffectParam = 30,
+ .description = gSitrusBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_Medicine,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_Medicine,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("FIGY BERRY"),
+ .itemId = ITEM_FIGY_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CONFUSE_SPICY,
+ .holdEffectParam = 8,
+ .description = gFigyBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("WIKI BERRY"),
+ .itemId = ITEM_WIKI_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CONFUSE_DRY,
+ .holdEffectParam = 8,
+ .description = gWikiBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MAGO BERRY"),
+ .itemId = ITEM_MAGO_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CONFUSE_SWEET,
+ .holdEffectParam = 8,
+ .description = gMagoBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("AGUAV BERRY"),
+ .itemId = ITEM_AGUAV_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CONFUSE_BITTER,
+ .holdEffectParam = 8,
+ .description = gAguavBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("IAPAPA BERRY"),
+ .itemId = ITEM_IAPAPA_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CONFUSE_SOUR,
+ .holdEffectParam = 8,
+ .description = gIapapaBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RAZZ BERRY"),
+ .itemId = ITEM_RAZZ_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRazzBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BLUK BERRY"),
+ .itemId = ITEM_BLUK_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBlukBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("NANAB BERRY"),
+ .itemId = ITEM_NANAB_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gNanabBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("WEPEAR BERRY"),
+ .itemId = ITEM_WEPEAR_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gWepearBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PINAP BERRY"),
+ .itemId = ITEM_PINAP_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPinapBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("POMEG BERRY"),
+ .itemId = ITEM_POMEG_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPomegBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("KELPSY BERRY"),
+ .itemId = ITEM_KELPSY_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gKelpsyBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("QUALOT BERRY"),
+ .itemId = ITEM_QUALOT_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gQualotBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HONDEW BERRY"),
+ .itemId = ITEM_HONDEW_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHondewBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("GREPA BERRY"),
+ .itemId = ITEM_GREPA_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gGrepaBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TAMATO BERRY"),
+ .itemId = ITEM_TAMATO_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTamatoBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_ReduceEV,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("CORNN BERRY"),
+ .itemId = ITEM_CORNN_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gCornnBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MAGOST BERRY"),
+ .itemId = ITEM_MAGOST_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gMagostBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RABUTA BERRY"),
+ .itemId = ITEM_RABUTA_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRabutaBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("NOMEL BERRY"),
+ .itemId = ITEM_NOMEL_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gNomelBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SPELON BERRY"),
+ .itemId = ITEM_SPELON_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gSpelonBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PAMTRE BERRY"),
+ .itemId = ITEM_PAMTRE_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPamtreBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("WATMEL BERRY"),
+ .itemId = ITEM_WATMEL_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gWatmelBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("DURIN BERRY"),
+ .itemId = ITEM_DURIN_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDurinBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BELUE BERRY"),
+ .itemId = ITEM_BELUE_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBelueBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LIECHI BERRY"),
+ .itemId = ITEM_LIECHI_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_ATTACK_UP,
+ .holdEffectParam = 4,
+ .description = gLiechiBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("GANLON BERRY"),
+ .itemId = ITEM_GANLON_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_DEFENSE_UP,
+ .holdEffectParam = 4,
+ .description = gGanlonBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SALAC BERRY"),
+ .itemId = ITEM_SALAC_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_SPEED_UP,
+ .holdEffectParam = 4,
+ .description = gSalacBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PETAYA BERRY"),
+ .itemId = ITEM_PETAYA_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_SP_ATTACK_UP,
+ .holdEffectParam = 4,
+ .description = gPetayaBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("APICOT BERRY"),
+ .itemId = ITEM_APICOT_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_SP_DEFENSE_UP,
+ .holdEffectParam = 4,
+ .description = gApicotBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LANSAT BERRY"),
+ .itemId = ITEM_LANSAT_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_CRITICAL_UP,
+ .holdEffectParam = 4,
+ .description = gLansatBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("STARF BERRY"),
+ .itemId = ITEM_STARF_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_RANDOM_STAT_UP,
+ .holdEffectParam = 4,
+ .description = gStarfBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ENIGMA BERRY"),
+ .itemId = ITEM_ENIGMA_BERRY,
+ .price = 20,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gEnigmaBerryItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_BERRIES,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_EnigmaBerry,
+ .battleUsage = 1,
+ .battleUseFunc = ItemUseInBattle_EnigmaBerry,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Hold items
+
+ {
+ .name = _("BRIGHTPOWDER"),
+ .itemId = ITEM_BRIGHT_POWDER,
+ .price = 10,
+ .holdEffect = HOLD_EFFECT_EVASION_UP,
+ .holdEffectParam = 10,
+ .description = gBrightPowderItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("WHITE HERB"),
+ .itemId = ITEM_WHITE_HERB,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_RESTORE_STATS,
+ .holdEffectParam = 0,
+ .description = gWhiteHerbItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MACHO BRACE"),
+ .itemId = ITEM_MACHO_BRACE,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_MACHO_BRACE,
+ .holdEffectParam = 0,
+ .description = gMachoBraceItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("EXP. SHARE"),
+ .itemId = ITEM_EXP_SHARE,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_EXP_SHARE,
+ .holdEffectParam = 0,
+ .description = gExpShareItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("QUICK CLAW"),
+ .itemId = ITEM_QUICK_CLAW,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_QUICK_CLAW,
+ .holdEffectParam = 20,
+ .description = gQuickClawItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SOOTHE BELL"),
+ .itemId = ITEM_SOOTHE_BELL,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_HAPPINESS_UP,
+ .holdEffectParam = 0,
+ .description = gSootheBellItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MENTAL HERB"),
+ .itemId = ITEM_MENTAL_HERB,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_CURE_ATTRACT,
+ .holdEffectParam = 0,
+ .description = gMentalHerbItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("CHOICE BAND"),
+ .itemId = ITEM_CHOICE_BAND,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_CHOICE_BAND,
+ .holdEffectParam = 0,
+ .description = gChoiceBandItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("KING’S ROCK"),
+ .itemId = ITEM_KINGS_ROCK,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_FLINCH,
+ .holdEffectParam = 10,
+ .description = gKingsRockItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SILVERPOWDER"),
+ .itemId = ITEM_SILVER_POWDER,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_BUG_POWER,
+ .holdEffectParam = 10,
+ .description = gSilverPowderItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("AMULET COIN"),
+ .itemId = ITEM_AMULET_COIN,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_DOUBLE_PRIZE,
+ .holdEffectParam = 10,
+ .description = gAmuletCoinItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("CLEANSE TAG"),
+ .itemId = ITEM_CLEANSE_TAG,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_REPEL,
+ .holdEffectParam = 0,
+ .description = gCleanseTagItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SOUL DEW"),
+ .itemId = ITEM_SOUL_DEW,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_SOUL_DEW,
+ .holdEffectParam = 0,
+ .description = gSoulDewItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("DEEPSEATOOTH"),
+ .itemId = ITEM_DEEP_SEA_TOOTH,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_DEEP_SEA_TOOTH,
+ .holdEffectParam = 0,
+ .description = gDeepSeaToothItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("DEEPSEASCALE"),
+ .itemId = ITEM_DEEP_SEA_SCALE,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_DEEP_SEA_SCALE,
+ .holdEffectParam = 0,
+ .description = gDeepSeaScaleItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SMOKE BALL"),
+ .itemId = ITEM_SMOKE_BALL,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_CAN_ALWAYS_RUN,
+ .holdEffectParam = 0,
+ .description = gSmokeBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("EVERSTONE"),
+ .itemId = ITEM_EVERSTONE,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_PREVENT_EVOLVE,
+ .holdEffectParam = 0,
+ .description = gEverstoneItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("FOCUS BAND"),
+ .itemId = ITEM_FOCUS_BAND,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_FOCUS_BAND,
+ .holdEffectParam = 10,
+ .description = gFocusBandItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LUCKY EGG"),
+ .itemId = ITEM_LUCKY_EGG,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_LUCKY_EGG,
+ .holdEffectParam = 0,
+ .description = gLuckyEggItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SCOPE LENS"),
+ .itemId = ITEM_SCOPE_LENS,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_SCOPE_LENS,
+ .holdEffectParam = 0,
+ .description = gScopeLensItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("METAL COAT"),
+ .itemId = ITEM_METAL_COAT,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_STEEL_POWER,
+ .holdEffectParam = 10,
+ .description = gMetalCoatItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LEFTOVERS"),
+ .itemId = ITEM_LEFTOVERS,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_LEFTOVERS,
+ .holdEffectParam = 10,
+ .description = gLeftoversItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("DRAGON SCALE"),
+ .itemId = ITEM_DRAGON_SCALE,
+ .price = 2100,
+ .holdEffect = HOLD_EFFECT_DRAGON_SCALE,
+ .holdEffectParam = 10,
+ .description = gDragonScaleItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LIGHT BALL"),
+ .itemId = ITEM_LIGHT_BALL,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_LIGHT_BALL,
+ .holdEffectParam = 0,
+ .description = gLightBallItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SOFT SAND"),
+ .itemId = ITEM_SOFT_SAND,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_GROUND_POWER,
+ .holdEffectParam = 10,
+ .description = gSoftSandItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HARD STONE"),
+ .itemId = ITEM_HARD_STONE,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_ROCK_POWER,
+ .holdEffectParam = 10,
+ .description = gHardStoneItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MIRACLE SEED"),
+ .itemId = ITEM_MIRACLE_SEED,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_GRASS_POWER,
+ .holdEffectParam = 10,
+ .description = gMiracleSeedItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BLACKGLASSES"),
+ .itemId = ITEM_BLACK_GLASSES,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_DARK_POWER,
+ .holdEffectParam = 10,
+ .description = gBlackGlassesItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BLACK BELT"),
+ .itemId = ITEM_BLACK_BELT,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_FIGHTING_POWER,
+ .holdEffectParam = 10,
+ .description = gBlackBeltItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MAGNET"),
+ .itemId = ITEM_MAGNET,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_ELECTRIC_POWER,
+ .holdEffectParam = 10,
+ .description = gMagnetItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MYSTIC WATER"),
+ .itemId = ITEM_MYSTIC_WATER,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_WATER_POWER,
+ .holdEffectParam = 10,
+ .description = gMysticWaterItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SHARP BEAK"),
+ .itemId = ITEM_SHARP_BEAK,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_FLYING_POWER,
+ .holdEffectParam = 10,
+ .description = gSharpBeakItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("POISON BARB"),
+ .itemId = ITEM_POISON_BARB,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_POISON_POWER,
+ .holdEffectParam = 10,
+ .description = gPoisonBarbItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("NEVERMELTICE"),
+ .itemId = ITEM_NEVER_MELT_ICE,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_ICE_POWER,
+ .holdEffectParam = 10,
+ .description = gNeverMeltIceItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SPELL TAG"),
+ .itemId = ITEM_SPELL_TAG,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_GHOST_POWER,
+ .holdEffectParam = 10,
+ .description = gSpellTagItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TWISTEDSPOON"),
+ .itemId = ITEM_TWISTED_SPOON,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_PSYCHIC_POWER,
+ .holdEffectParam = 10,
+ .description = gTwistedSpoonItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("CHARCOAL"),
+ .itemId = ITEM_CHARCOAL,
+ .price = 9800,
+ .holdEffect = HOLD_EFFECT_FIRE_POWER,
+ .holdEffectParam = 10,
+ .description = gCharcoalItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("DRAGON FANG"),
+ .itemId = ITEM_DRAGON_FANG,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_DRAGON_POWER,
+ .holdEffectParam = 10,
+ .description = gDragonFangItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SILK SCARF"),
+ .itemId = ITEM_SILK_SCARF,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_NORMAL_POWER,
+ .holdEffectParam = 10,
+ .description = gSilkScarfItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("UP-GRADE"),
+ .itemId = ITEM_UP_GRADE,
+ .price = 2100,
+ .holdEffect = HOLD_EFFECT_UP_GRADE,
+ .holdEffectParam = 0,
+ .description = gUpGradeItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SHELL BELL"),
+ .itemId = ITEM_SHELL_BELL,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_SHELL_BELL,
+ .holdEffectParam = 8,
+ .description = gShellBellItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SEA INCENSE"),
+ .itemId = ITEM_SEA_INCENSE,
+ .price = 9600,
+ .holdEffect = HOLD_EFFECT_WATER_POWER,
+ .holdEffectParam = 5,
+ .description = gSeaIncenseItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LAX INCENSE"),
+ .itemId = ITEM_LAX_INCENSE,
+ .price = 9600,
+ .holdEffect = HOLD_EFFECT_EVASION_UP,
+ .holdEffectParam = 5,
+ .description = gLaxIncenseItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LUCKY PUNCH"),
+ .itemId = ITEM_LUCKY_PUNCH,
+ .price = 10,
+ .holdEffect = HOLD_EFFECT_LUCKY_PUNCH,
+ .holdEffectParam = 0,
+ .description = gLuckyPunchItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("METAL POWDER"),
+ .itemId = ITEM_METAL_POWDER,
+ .price = 10,
+ .holdEffect = HOLD_EFFECT_METAL_POWDER,
+ .holdEffectParam = 0,
+ .description = gMetalPowderItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("THICK CLUB"),
+ .itemId = ITEM_THICK_CLUB,
+ .price = 500,
+ .holdEffect = HOLD_EFFECT_THICK_CLUB,
+ .holdEffectParam = 0,
+ .description = gThickClubItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("STICK"),
+ .itemId = ITEM_STICK,
+ .price = 200,
+ .holdEffect = HOLD_EFFECT_STICK,
+ .holdEffectParam = 0,
+ .description = gStickItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RED SCARF"),
+ .itemId = ITEM_RED_SCARF,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRedScarfItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BLUE SCARF"),
+ .itemId = ITEM_BLUE_SCARF,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBlueScarfItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("PINK SCARF"),
+ .itemId = ITEM_PINK_SCARF,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPinkScarfItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("GREEN SCARF"),
+ .itemId = ITEM_GREEN_SCARF,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gGreenScarfItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("YELLOW SCARF"),
+ .itemId = ITEM_YELLOW_SCARF,
+ .price = 100,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gYellowScarfItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Key items
+
+ {
+ .name = _("MACH BIKE"),
+ .itemId = ITEM_MACH_BIKE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gMachBikeItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_Bike,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("COIN CASE"),
+ .itemId = ITEM_COIN_CASE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gCoinCaseItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CoinCase,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ITEMFINDER"),
+ .itemId = ITEM_ITEMFINDER,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gItemfinderItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_Itemfinder,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("OLD ROD"),
+ .itemId = ITEM_OLD_ROD,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gOldRodItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_Rod,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("GOOD ROD"),
+ .itemId = ITEM_GOOD_ROD,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gGoodRodItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_Rod,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 1,
+ },
+ {
+ .name = _("SUPER ROD"),
+ .itemId = ITEM_SUPER_ROD,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gSuperRodItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_Rod,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 2,
+ },
+ {
+ .name = _("S.S. TICKET"),
+ .itemId = ITEM_SS_TICKET,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gSSTicketItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("CONTEST PASS"),
+ .itemId = ITEM_CONTEST_PASS,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gContestPassItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("WAILMER PAIL"),
+ .itemId = ITEM_WAILMER_PAIL,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gWailmerPailItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_WailmerPail,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("DEVON GOODS"),
+ .itemId = ITEM_DEVON_GOODS,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDevonGoodsItemDescription,
+ .importance = 2,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SOOT SACK"),
+ .itemId = ITEM_SOOT_SACK,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gSootSackItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BASEMENT KEY"),
+ .itemId = ITEM_BASEMENT_KEY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBasementKeyItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ACRO BIKE"),
+ .itemId = ITEM_ACRO_BIKE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gAcroBikeItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_Bike,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 1,
+ },
+ {
+ .name = _("{POKEBLOCK} CASE"),
+ .itemId = ITEM_POKEBLOCK_CASE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPokeblockCaseItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 3,
+ .fieldUseFunc = ItemUseOutOfBattle_PokeblockCase,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LETTER"),
+ .itemId = ITEM_LETTER,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gLetterItemDescription,
+ .importance = 2,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("EON TICKET"),
+ .itemId = ITEM_EON_TICKET,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gEonTicketItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 1,
+ },
+ {
+ .name = _("RED ORB"),
+ .itemId = ITEM_RED_ORB,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRedOrbItemDescription,
+ .importance = 2,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BLUE ORB"),
+ .itemId = ITEM_BLUE_ORB,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBlueOrbItemDescription,
+ .importance = 2,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SCANNER"),
+ .itemId = ITEM_SCANNER,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gScannerItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("GO-GOGGLES"),
+ .itemId = ITEM_GO_GOGGLES,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gGoGogglesItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("METEORITE"),
+ .itemId = ITEM_METEORITE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gMeteoriteItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RM. 1 KEY"),
+ .itemId = ITEM_ROOM_1_KEY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRoom1KeyItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RM. 2 KEY"),
+ .itemId = ITEM_ROOM_2_KEY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRoom2KeyItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RM. 4 KEY"),
+ .itemId = ITEM_ROOM_4_KEY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRoom4KeyItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RM. 6 KEY"),
+ .itemId = ITEM_ROOM_6_KEY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRoom6KeyItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("STORAGE KEY"),
+ .itemId = ITEM_STORAGE_KEY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gStorageKeyItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("ROOT FOSSIL"),
+ .itemId = ITEM_ROOT_FOSSIL,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRootFossilItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("CLAW FOSSIL"),
+ .itemId = ITEM_CLAW_FOSSIL,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gClawFossilItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("DEVON SCOPE"),
+ .itemId = ITEM_DEVON_SCOPE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDevonScopeItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//TMs/HMs
+
+ {
+ .name = _("TM01"),
+ .itemId = ITEM_TM01_FOCUS_PUNCH,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM01ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM02"),
+ .itemId = ITEM_TM02_DRAGON_CLAW,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM02ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM03"),
+ .itemId = ITEM_TM03_WATER_PULSE,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM03ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM04"),
+ .itemId = ITEM_TM04_CALM_MIND,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM04ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM05"),
+ .itemId = ITEM_TM05_ROAR,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM05ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM06"),
+ .itemId = ITEM_TM06_TOXIC,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM06ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM07"),
+ .itemId = ITEM_TM07_HAIL,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM07ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM08"),
+ .itemId = ITEM_TM08_BULK_UP,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM08ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM09"),
+ .itemId = ITEM_TM09_BULLET_SEED,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM09ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM10"),
+ .itemId = ITEM_TM10_HIDDEN_POWER,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM10ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM11"),
+ .itemId = ITEM_TM11_SUNNY_DAY,
+ .price = 2000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM11ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM12"),
+ .itemId = ITEM_TM12_TAUNT,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM12ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM13"),
+ .itemId = ITEM_TM13_ICE_BEAM,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM13ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM14"),
+ .itemId = ITEM_TM14_BLIZZARD,
+ .price = 5500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM14ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM15"),
+ .itemId = ITEM_TM15_HYPER_BEAM,
+ .price = 7500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM15ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM16"),
+ .itemId = ITEM_TM16_LIGHT_SCREEN,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM16ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM17"),
+ .itemId = ITEM_TM17_PROTECT,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM17ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM18"),
+ .itemId = ITEM_TM18_RAIN_DANCE,
+ .price = 2000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM18ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM19"),
+ .itemId = ITEM_TM19_GIGA_DRAIN,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM19ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM20"),
+ .itemId = ITEM_TM20_SAFEGUARD,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM20ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM21"),
+ .itemId = ITEM_TM21_FRUSTRATION,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM21ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM22"),
+ .itemId = ITEM_TM22_SOLARBEAM,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM22ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM23"),
+ .itemId = ITEM_TM23_IRON_TAIL,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM23ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM24"),
+ .itemId = ITEM_TM24_THUNDERBOLT,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM24ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM25"),
+ .itemId = ITEM_TM25_THUNDER,
+ .price = 5500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM25ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM26"),
+ .itemId = ITEM_TM26_EARTHQUAKE,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM26ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM27"),
+ .itemId = ITEM_TM27_RETURN,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM27ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM28"),
+ .itemId = ITEM_TM28_DIG,
+ .price = 2000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM28ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM29"),
+ .itemId = ITEM_TM29_PSYCHIC,
+ .price = 2000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM29ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM30"),
+ .itemId = ITEM_TM30_SHADOW_BALL,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM30ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM31"),
+ .itemId = ITEM_TM31_BRICK_BREAK,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM31ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM32"),
+ .itemId = ITEM_TM32_DOUBLE_TEAM,
+ .price = 2000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM32ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM33"),
+ .itemId = ITEM_TM33_REFLECT,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM33ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM34"),
+ .itemId = ITEM_TM34_SHOCK_WAVE,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM34ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM35"),
+ .itemId = ITEM_TM35_FLAMETHROWER,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM35ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM36"),
+ .itemId = ITEM_TM36_SLUDGE_BOMB,
+ .price = 1000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM36ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM37"),
+ .itemId = ITEM_TM37_SANDSTORM,
+ .price = 2000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM37ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM38"),
+ .itemId = ITEM_TM38_FIRE_BLAST,
+ .price = 5500,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM38ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM39"),
+ .itemId = ITEM_TM39_ROCK_TOMB,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM39ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM40"),
+ .itemId = ITEM_TM40_AERIAL_ACE,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM40ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM41"),
+ .itemId = ITEM_TM41_TORMENT,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM41ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM42"),
+ .itemId = ITEM_TM42_FACADE,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM42ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM43"),
+ .itemId = ITEM_TM43_SECRET_POWER,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM43ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM44"),
+ .itemId = ITEM_TM44_REST,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM44ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM45"),
+ .itemId = ITEM_TM45_ATTRACT,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM45ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM46"),
+ .itemId = ITEM_TM46_THIEF,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM46ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM47"),
+ .itemId = ITEM_TM47_STEEL_WING,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM47ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM48"),
+ .itemId = ITEM_TM48_SKILL_SWAP,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM48ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM49"),
+ .itemId = ITEM_TM49_SNATCH,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM49ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM50"),
+ .itemId = ITEM_TM50_OVERHEAT,
+ .price = 3000,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTM50ItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HM01"),
+ .itemId = ITEM_HM01_CUT,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHM01ItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HM02"),
+ .itemId = ITEM_HM02_FLY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHM02ItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HM03"),
+ .itemId = ITEM_HM03_SURF,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHM03ItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HM04"),
+ .itemId = ITEM_HM04_STRENGTH,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHM04ItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HM05"),
+ .itemId = ITEM_HM05_FLASH,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHM05ItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HM06"),
+ .itemId = ITEM_HM06_ROCK_SMASH,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHM06ItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HM07"),
+ .itemId = ITEM_HM07_WATERFALL,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHM07ItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HM08"),
+ .itemId = ITEM_HM08_DIVE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHM08ItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_TM_HM,
+ .type = 1,
+ .fieldUseFunc = ItemUseOutOfBattle_TMHM,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("????????"),
+ .itemId = ITEM_NONE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDummyItemDescription,
+ .importance = 0,
+ .unk19 = 0,
+ .pocket = POCKET_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//FireRed/LeafGreen key items
+
+ {
+ .name = _("OAK’S PARCEL"),
+ .itemId = ITEM_OAKS_PARCEL,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gOaksParcelItemDescription,
+ .importance = 2,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("POKé FLUTE"),
+ .itemId = ITEM_POKE_FLUTE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPokeFluteItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SECRET KEY"),
+ .itemId = ITEM_SECRET_KEY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gSecretKeyItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BIKE VOUCHER"),
+ .itemId = ITEM_BIKE_VOUCHER,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBikeVoucherItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("GOLD TEETH"),
+ .itemId = ITEM_GOLD_TEETH,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gGoldTeethItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("OLD AMBER"),
+ .itemId = ITEM_OLD_AMBER,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gOldAmberItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("CARD KEY"),
+ .itemId = ITEM_CARD_KEY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gCardKeyItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("LIFT KEY"),
+ .itemId = ITEM_LIFT_KEY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gLiftKeyItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("HELIX FOSSIL"),
+ .itemId = ITEM_HELIX_FOSSIL,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gHelixFossilItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("DOME FOSSIL"),
+ .itemId = ITEM_DOME_FOSSIL,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gDomeFossilItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SILPH SCOPE"),
+ .itemId = ITEM_SILPH_SCOPE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gSilphScopeItemDescription,
+ .importance = 1,
+ .unk19 = 0,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BICYCLE"),
+ .itemId = ITEM_BICYCLE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBicycleItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TOWN MAP"),
+ .itemId = ITEM_TOWN_MAP,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTownMapItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("VS SEEKER"),
+ .itemId = ITEM_VS_SEEKER,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gVSSeekerItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("FAME CHECKER"),
+ .itemId = ITEM_FAME_CHECKER,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gFameCheckerItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TM CASE"),
+ .itemId = ITEM_TM_CASE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTMCaseItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("BERRY POUCH"),
+ .itemId = ITEM_BERRY_POUCH,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gBerryPouchItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TEACHY TV"),
+ .itemId = ITEM_TEACHY_TV,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTeachyTVItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 2,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TRI-PASS"),
+ .itemId = ITEM_TRI_PASS,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTriPassItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RAINBOW PASS"),
+ .itemId = ITEM_RAINBOW_PASS,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRainbowPassItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("TEA"),
+ .itemId = ITEM_TEA,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gTeaItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("MYSTICTICKET"),
+ .itemId = ITEM_MYSTIC_TICKET,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gMysticTicketItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("AURORATICKET"),
+ .itemId = ITEM_AURORA_TICKET,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gAuroraTicketItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("POWDER JAR"),
+ .itemId = ITEM_POWDER_JAR,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gPowderJarItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_PowderJar,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("RUBY"),
+ .itemId = ITEM_RUBY,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gRubyItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("SAPPHIRE"),
+ .itemId = ITEM_SAPPHIRE,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gSapphireItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+
+//Emerald-specific key items
+
+ {
+ .name = _("MAGMA EMBLEM"),
+ .itemId = ITEM_MAGMA_EMBLEM,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gMagmaEmblemItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+ {
+ .name = _("OLD SEA MAP"),
+ .itemId = ITEM_OLD_SEA_MAP,
+ .price = 0,
+ .holdEffect = HOLD_EFFECT_NONE,
+ .holdEffectParam = 0,
+ .description = gOldSeaMapItemDescription,
+ .importance = 1,
+ .unk19 = 1,
+ .pocket = POCKET_KEY_ITEMS,
+ .type = 4,
+ .fieldUseFunc = ItemUseOutOfBattle_CannotUse,
+ .battleUsage = 0,
+ .battleUseFunc = NULL,
+ .secondaryId = 0,
+ },
+};
diff --git a/include/data/text/item_descriptions.h b/include/data/text/item_descriptions.h
new file mode 100644
index 000000000..8683978d7
--- /dev/null
+++ b/include/data/text/item_descriptions.h
@@ -0,0 +1,329 @@
+#ifndef POKEEMERALD_DATA_TEXT_ITEM_DESCRIPTIONS_H
+#define POKEEMERALD_DATA_TEXT_ITEM_DESCRIPTIONS_H
+const u8 gDummyItemDescription[] = _("?????");
+//Pokeballs
+const u8 gMasterBallItemDescription[] = _("The best BALL that\ncatches a POKéMON\nwithout fail.");
+const u8 gUltraBallItemDescription[] = _("A better BALL with\na higher catch rate\nthan a GREAT BALL.");
+const u8 gGreatBallItemDescription[] = _("A good BALL with a\nhigher catch rate\nthan a POKé BALL.");
+const u8 gPokeBallItemDescription[] = _("A tool used for\ncatching wild\nPOKéMON.");
+const u8 gSafariBallItemDescription[] = _("A special BALL that\nis used only in the\nSAFARI ZONE.");
+const u8 gNetBallItemDescription[] = _("A BALL that works\nwell on WATER- and\nBUG-type POKéMON.");
+const u8 gDiveBallItemDescription[] = _("A BALL that works\nbetter on POKéMON\non the ocean floor.");
+const u8 gNestBallItemDescription[] = _("A BALL that works\nbetter on weaker\nPOKéMON.");
+const u8 gRepeatBallItemDescription[] = _("A BALL that works\nbetter on POKéMON\ncaught before.");
+const u8 gTimerBallItemDescription[] = _("A BALL that gains\npower in battles\ntaking many turns.");
+const u8 gLuxuryBallItemDescription[] = _("A cozy BALL that\nmakes POKéMON\nmore friendly.");
+const u8 gPremierBallItemDescription[] = _("A rare BALL made\nin commemoration\nof some event.");
+//Medicine
+const u8 gPotionItemDescription[] = _("Restores the HP of\na POKéMON by\n20 points.");
+const u8 gAntidoteItemDescription[] = _("Heals a poisoned\nPOKéMON.");
+const u8 gBurnHealItemDescription[] = _("Heals POKéMON\nof a burn.");
+const u8 gIceHealItemDescription[] = _("Defrosts a frozen\nPOKéMON.");
+const u8 gAwakeningItemDescription[] = _("Awakens a sleeping\nPOKéMON.");
+const u8 gParalyzeHealItemDescription[] = _("Heals a paralyzed\nPOKéMON.");
+const u8 gFullRestoreItemDescription[] = _("Fully restores the\nHP and status of a\nPOKéMON.");
+const u8 gMaxPotionItemDescription[] = _("Fully restores the\nHP of a POKéMON.");
+const u8 gHyperPotionItemDescription[] = _("Restores the HP of\na POKéMON by\n200 points.");
+const u8 gSuperPotionItemDescription[] = _("Restores the HP of\na POKéMON by\n50 points.");
+const u8 gFullHealItemDescription[] = _("Heals all the\nstatus problems of\none POKéMON.");
+const u8 gReviveItemDescription[] = _("Revives a fainted\nPOKéMON with half\nits HP.");
+const u8 gMaxReviveItemDescription[] = _("Revives a fainted\nPOKéMON with all\nits HP.");
+const u8 gFreshWaterItemDescription[] = _("A mineral water\nthat restores HP\nby 50 points.");
+const u8 gSodaPopItemDescription[] = _("A fizzy soda drink\nthat restores HP\nby 60 points.");
+const u8 gLemonadeItemDescription[] = _("A very sweet drink\nthat restores HP\nby 80 points.");
+const u8 gMoomooMilkItemDescription[] = _("A nutritious milk\nthat restores HP\nby 100 points.");
+const u8 gEnergyPowderItemDescription[] = _("A bitter powder\nthat restores HP\nby 50 points.");
+const u8 gEnergyRootItemDescription[] = _("A bitter root\nthat restores HP\nby 200 points.");
+const u8 gHealPowderItemDescription[] = _("A bitter powder\nthat heals all\nstatus problems.");
+const u8 gRevivalHerbItemDescription[] = _("A very bitter herb\nthat revives a\nfainted POKéMON.");
+const u8 gEtherItemDescription[] = _("Restores the PP\nof a selected move\nby 10.");
+const u8 gMaxEtherItemDescription[] = _("Fully restores the\nPP of a selected\nmove.");
+const u8 gElixirItemDescription[] = _("Restores the PP\nof all moves by 10.");
+const u8 gMaxElixirItemDescription[] = _("Fully restores the\nPP of a POKéMON’s\nmoves.");
+const u8 gLavaCookieItemDescription[] = _("A local specialty\nthat heals all\nstatus problems.");
+const u8 gBlueFluteItemDescription[] = _("A glass flute that\nawakens sleeping\nPOKéMON.");
+const u8 gYellowFluteItemDescription[] = _("A glass flute that\nsnaps POKéMON\nout of confusion.");
+const u8 gRedFluteItemDescription[] = _("A glass flute that\nsnaps POKéMON\nout of attraction.");
+const u8 gBlackFluteItemDescription[] = _("A glass flute that\nkeeps away wild\nPOKéMON.");
+const u8 gWhiteFluteItemDescription[] = _("A glass flute that\nlures wild POKéMON.");
+const u8 gBerryJuiceItemDescription[] = _("A 100% pure juice\nthat restores HP\nby 20 points.");
+const u8 gSacredAshItemDescription[] = _("Fully revives and\nrestores all\nfainted POKéMON.");
+//Collectibles
+const u8 gShoalSaltItemDescription[] = _("Salt obtained from\ndeep inside the\nSHOAL CAVE.");
+const u8 gShoalShellItemDescription[] = _("A seashell found\ndeep inside the\nSHOAL CAVE.");
+const u8 gRedShardItemDescription[] = _("A shard from an\nancient item. Can\nbe sold cheaply.");
+const u8 gBlueShardItemDescription[] = _("A shard from an\nancient item. Can\nbe sold cheaply.");
+const u8 gYellowShardItemDescription[] = _("A shard from an\nancient item. Can\nbe sold cheaply.");
+const u8 gGreenShardItemDescription[] = _("A shard from an\nancient item. Can\nbe sold cheaply.");
+//Vitamins
+const u8 gHPUpItemDescription[] = _("Raises the base HP\nof one POKéMON.");
+const u8 gProteinItemDescription[] = _("Raises the base\nATTACK stat of one\nPOKéMON.");
+const u8 gIronItemDescription[] = _("Raises the base\nDEFENSE stat of\none POKéMON.");
+const u8 gCarbosItemDescription[] = _("Raises the base\nSPEED stat of one\nPOKéMON.");
+const u8 gCalciumItemDescription[] = _("Raises the base\nSP. ATK stat of one\nPOKéMON.");
+const u8 gRareCandyItemDescription[] = _("Raises the level\nof a POKéMON by\none.");
+const u8 gPPUpItemDescription[] = _("Raises the maximum\nPP of a selected\nmove.");
+const u8 gZincItemDescription[] = _("Raises the base\nSP. DEF stat of one\nPOKéMON.");
+const u8 gPPMaxItemDescription[] = _("Raises the PP of a\nmove to its maximum\npoints.");
+//Battle items
+const u8 gGuardSpecItemDescription[] = _("Prevents stat\nreduction when\nused in battle.");
+const u8 gDireHitItemDescription[] = _("Raises the\ncritical-hit ratio\nduring one battle.");
+const u8 gXAttackItemDescription[] = _("Raises the stat\nATTACK during one\nbattle.");
+const u8 gXDefendItemDescription[] = _("Raises the stat\nDEFENSE during one\nbattle.");
+const u8 gXSpeedItemDescription[] = _("Raises the stat\nSPEED during one\nbattle.");
+const u8 gXAccuracyItemDescription[] = _("Raises accuracy\nof attack moves\nduring one battle.");
+const u8 gXSpecialItemDescription[] = _("Raises the stat\nSP. ATK during one\nbattle.");
+const u8 gPokeDollItemDescription[] = _("Use to flee from\nany battle with\na wild POKéMON.");
+const u8 gFluffyTailItemDescription[] = _("Use to flee from\nany battle with\na wild POKéMON.");
+//Field items
+const u8 gSuperRepelItemDescription[] = _("Repels weak wild\nPOKéMON for 200\nsteps.");
+const u8 gMaxRepelItemDescription[] = _("Repels weak wild\nPOKéMON for 250\nsteps.");
+const u8 gEscapeRopeItemDescription[] = _("Use to escape\ninstantly from a\ncave or a dungeon.");
+const u8 gRepelItemDescription[] = _("Repels weak wild\nPOKéMON for 100\nsteps.");
+//Evolution stones
+const u8 gSunStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve.");
+const u8 gMoonStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve.");
+const u8 gFireStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve.");
+const u8 gThunderStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve.");
+const u8 gWaterStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve.");
+const u8 gLeafStoneItemDescription[] = _("Makes certain\nspecies of POKéMON\nevolve.");
+//Valuable items
+const u8 gTinyMushroomItemDescription[] = _("A plain mushroom\nthat would sell\nat a cheap price.");
+const u8 gBigMushroomItemDescription[] = _("A rare mushroom\nthat would sell at a\nhigh price.");
+const u8 gPearlItemDescription[] = _("A pretty pearl\nthat would sell at a\ncheap price.");
+const u8 gBigPearlItemDescription[] = _("A lovely large pearl\nthat would sell at a\nhigh price.");
+const u8 gStardustItemDescription[] = _("Beautiful red sand.\nCan be sold at a\nhigh price.");
+const u8 gStarPieceItemDescription[] = _("A red gem shard.\nIt would sell for a\nvery high price.");
+const u8 gNuggetItemDescription[] = _("A nugget of pure\ngold. Can be sold at\na high price.");
+const u8 gHeartScaleItemDescription[] = _("A lovely scale.\nIt is coveted by\ncollectors.");
+//Mail
+const u8 gOrangeMailItemDescription[] = _("A ZIGZAGOON-print\nMAIL to be held by\na POKéMON.");
+const u8 gHarborMailItemDescription[] = _("A WINGULL-print\nMAIL to be held by\na POKéMON.");
+const u8 gGlitterMailItemDescription[] = _("A PIKACHU-print\nMAIL to be held by\na POKéMON.");
+const u8 gMechMailItemDescription[] = _("A MAGNEMITE-print\nMAIL to be held by\na POKéMON.");
+const u8 gWoodMailItemDescription[] = _("A SLAKOTH-print\nMAIL to be held by\na POKéMON.");
+const u8 gWaveMailItemDescription[] = _("A WAILMER-print\nMAIL to be held by\na POKéMON.");
+const u8 gBeadMailItemDescription[] = _("MAIL featuring a\nsketch of the\nholding POKéMON.");
+const u8 gShadowMailItemDescription[] = _("A DUSKULL-print\nMAIL to be held by\na POKéMON.");
+const u8 gTropicMailItemDescription[] = _("A BELLOSSOM-print\nMAIL to be held by\na POKéMON.");
+const u8 gDreamMailItemDescription[] = _("MAIL featuring a\nsketch of the\nholding POKéMON.");
+const u8 gFabMailItemDescription[] = _("A gorgeous-print\nMAIL to be held\nby a POKéMON.");
+const u8 gRetroMailItemDescription[] = _("MAIL featuring the\ndrawings of three\nPOKéMON.");
+//Berries
+const u8 gCheriBerryItemDescription[] = _("A hold item that\nheals paralysis\nin battle.");
+const u8 gChestoBerryItemDescription[] = _("A hold item that\nawakens POKéMON\nin battle.");
+const u8 gPechaBerryItemDescription[] = _("A hold item that\nheals poisoning\nin battle.");
+const u8 gRawstBerryItemDescription[] = _("A hold item that\nheals a burn in\nbattle.");
+const u8 gAspearBerryItemDescription[] = _("A hold item that\ndefrosts POKéMON\nin battle.");
+const u8 gLeppaBerryItemDescription[] = _("A hold item that\nrestores 10 PP in\nbattle.");
+const u8 gOranBerryItemDescription[] = _("A hold item that\nrestores 10 HP in\nbattle.");
+const u8 gPersimBerryItemDescription[] = _("A hold item that\nheals confusion\nin battle.");
+const u8 gLumBerryItemDescription[] = _("A hold item that\nheals any status\nproblem in battle.");
+const u8 gSitrusBerryItemDescription[] = _("A hold item that\nrestores 30 HP in\nbattle.");
+const u8 gFigyBerryItemDescription[] = _("A hold item that\nrestores HP but\nmay confuse.");
+const u8 gWikiBerryItemDescription[] = _("A hold item that\nrestores HP but\nmay confuse.");
+const u8 gMagoBerryItemDescription[] = _("A hold item that\nrestores HP but\nmay confuse.");
+const u8 gAguavBerryItemDescription[] = _("A hold item that\nrestores HP but\nmay confuse.");
+const u8 gIapapaBerryItemDescription[] = _("A hold item that\nrestores HP but\nmay confuse.");
+const u8 gRazzBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow RAZZ.");
+const u8 gBlukBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow BLUK.");
+const u8 gNanabBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow NANAB.");
+const u8 gWepearBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow WEPEAR.");
+const u8 gPinapBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow PINAP.");
+const u8 gPomegBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase HP.");
+const u8 gKelpsyBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase ATTACK.");
+const u8 gQualotBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase DEFENSE.");
+const u8 gHondewBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase SP. ATK.");
+const u8 gGrepaBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase SP. DEF.");
+const u8 gTamatoBerryItemDescription[] = _("Makes a POKéMON\nfriendly but lowers\nbase SPEED.");
+const u8 gCornnBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow CORNN.");
+const u8 gMagostBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow MAGOST.");
+const u8 gRabutaBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow RABUTA.");
+const u8 gNomelBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow NOMEL.");
+const u8 gSpelonBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow SPELON.");
+const u8 gPamtreBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow PAMTRE.");
+const u8 gWatmelBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow WATMEL.");
+const u8 gDurinBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow DURIN.");
+const u8 gBelueBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow BELUE.");
+const u8 gLiechiBerryItemDescription[] = _("A hold item that\nraises ATTACK in\na pinch.");
+const u8 gGanlonBerryItemDescription[] = _("A hold item that\nraises DEFENSE in\na pinch.");
+const u8 gSalacBerryItemDescription[] = _("A hold item that\nraises SPEED in\na pinch.");
+const u8 gPetayaBerryItemDescription[] = _("A hold item that\nraises SP. ATK in\na pinch.");
+const u8 gApicotBerryItemDescription[] = _("A hold item that\nraises SP. DEF in\na pinch.");
+const u8 gLansatBerryItemDescription[] = _("A hold item that\nups the critical-\nhit rate in a pinch.");
+const u8 gStarfBerryItemDescription[] = _("A hold item that\nsharply boosts a\nstat in a pinch.");
+const u8 gEnigmaBerryItemDescription[] = _("{POKEBLOCK} ingredient.\nPlant in loamy soil\nto grow a mystery.");
+//Hold items
+const u8 gBrightPowderItemDescription[] = _("A hold item that\ncasts a glare to\nreduce accuracy.");
+const u8 gWhiteHerbItemDescription[] = _("A hold item that\nrestores any\nlowered stat.");
+const u8 gMachoBraceItemDescription[] = _("A hold item that\npromotes growth,\nbut reduces SPEED.");
+const u8 gExpShareItemDescription[] = _("A hold item that\ngets EXP. points\nfrom battles.");
+const u8 gQuickClawItemDescription[] = _("A hold item that\noccasionally allows\nthe first strike.");
+const u8 gSootheBellItemDescription[] = _("A hold item that\ncalms spirits and\nfosters friendship.");
+const u8 gMentalHerbItemDescription[] = _("A hold item that\nsnaps POKéMON out\nof infatuation.");
+const u8 gChoiceBandItemDescription[] = _("Raises a move’s\npower, but permits\nonly that move.");
+const u8 gKingsRockItemDescription[] = _("A hold item that\nmay cause flinching\nwhen the foe is hit.");
+const u8 gSilverPowderItemDescription[] = _("A hold item that\nraises the power of\nBUG-type moves.");
+const u8 gAmuletCoinItemDescription[] = _("Doubles money in\nbattle if the\nholder takes part.");
+const u8 gCleanseTagItemDescription[] = _("A hold item that\nhelps repel wild\nPOKéMON.");
+const u8 gSoulDewItemDescription[] = _("Hold item: raises\nSP. ATK & SP. DEF of\nLATIOS & LATIAS.");
+const u8 gDeepSeaToothItemDescription[] = _("A hold item that\nraises the SP. ATK\nof CLAMPERL.");
+const u8 gDeepSeaScaleItemDescription[] = _("A hold item that\nraises the SP. DEF\nof CLAMPERL.");
+const u8 gSmokeBallItemDescription[] = _("A hold item that\nassures fleeing\nfrom wild POKéMON.");
+const u8 gEverstoneItemDescription[] = _("A wondrous hold\nitem that prevents\nevolution.");
+const u8 gFocusBandItemDescription[] = _("A hold item that\noccasionally\nprevents fainting.");
+const u8 gLuckyEggItemDescription[] = _("A hold item that\nboosts EXP. points\nearned in battle.");
+const u8 gScopeLensItemDescription[] = _("A hold item that\nimproves the\ncritical-hit rate.");
+const u8 gMetalCoatItemDescription[] = _("A hold item that\nraises the power of\nSTEEL-type moves.");
+const u8 gLeftoversItemDescription[] = _("A hold item that\ngradually restores\nHP in battle.");
+const u8 gDragonScaleItemDescription[] = _("A strange scale\nheld by DRAGON-\ntype POKéMON.");
+const u8 gLightBallItemDescription[] = _("A hold item that\nraises the SP. ATK\nof PIKACHU.");
+const u8 gSoftSandItemDescription[] = _("A hold item that\nraises the power of\nGROUND-type moves.");
+const u8 gHardStoneItemDescription[] = _("A hold item that\nraises the power of\nROCK-type moves.");
+const u8 gMiracleSeedItemDescription[] = _("A hold item that\nraises the power of\nGRASS-type moves.");
+const u8 gBlackGlassesItemDescription[] = _("A hold item that\nraises the power of\nDARK-type moves.");
+const u8 gBlackBeltItemDescription[] = _("A hold item that\nboosts FIGHTING-\ntype moves.");
+const u8 gMagnetItemDescription[] = _("A hold item that\nboosts ELECTRIC-\ntype moves.");
+const u8 gMysticWaterItemDescription[] = _("A hold item that\nraises the power of\nWATER-type moves.");
+const u8 gSharpBeakItemDescription[] = _("A hold item that\nraises the power of\nFLYING-type moves.");
+const u8 gPoisonBarbItemDescription[] = _("A hold item that\nraises the power of\nPOISON-type moves.");
+const u8 gNeverMeltIceItemDescription[] = _("A hold item that\nraises the power of\nICE-type moves.");
+const u8 gSpellTagItemDescription[] = _("A hold item that\nraises the power of\nGHOST-type moves.");
+const u8 gTwistedSpoonItemDescription[] = _("A hold item that\nboosts PSYCHIC-\ntype moves.");
+const u8 gCharcoalItemDescription[] = _("A hold item that\nraises the power of\nFIRE-type moves.");
+const u8 gDragonFangItemDescription[] = _("A hold item that\nraises the power of\nDRAGON-type moves.");
+const u8 gSilkScarfItemDescription[] = _("A hold item that\nraises the power of\nNORMAL-type moves.");
+const u8 gUpGradeItemDescription[] = _("A peculiar box made\nby SILPH CO.");
+const u8 gShellBellItemDescription[] = _("A hold item that\nrestores HP upon\nstriking the foe.");
+const u8 gSeaIncenseItemDescription[] = _("A hold item that\nslightly boosts\nWATER-type moves.");
+const u8 gLaxIncenseItemDescription[] = _("A hold item that\nslightly lowers the\nfoe’s accuracy.");
+const u8 gLuckyPunchItemDescription[] = _("A hold item that\nraises CHANSEY’s\ncritical-hit rate.");
+const u8 gMetalPowderItemDescription[] = _("A hold item that\nraises DITTO’s\nDEFENSE.");
+const u8 gThickClubItemDescription[] = _("A hold item that \nraises CUBONE or\nMAROWAK’s ATTACK.");
+const u8 gStickItemDescription[] = _("A hold item that\nraises FARFETCH’D’s\ncritical-hit ratio.");
+const u8 gRedScarfItemDescription[] = _("A hold item that\nraises COOL in\nCONTESTS.");
+const u8 gBlueScarfItemDescription[] = _("A hold item that\nraises BEAUTY in\nCONTESTS.");
+const u8 gPinkScarfItemDescription[] = _("A hold item that\nraises CUTE in\nCONTESTS.");
+const u8 gGreenScarfItemDescription[] = _("A hold item that\nraises SMART in\nCONTESTS.");
+const u8 gYellowScarfItemDescription[] = _("A hold item that\nraises TOUGH in\nCONTESTS.");
+//Key items
+const u8 gMachBikeItemDescription[] = _("A folding bicycle\nthat doubles your\nspeed or better.");
+const u8 gCoinCaseItemDescription[] = _("A case that holds\nup to 9,999 COINS.");
+const u8 gItemfinderItemDescription[] = _("A device that\nsignals an invisible\nitem by sound.");
+const u8 gOldRodItemDescription[] = _("Use by any body of\nwater to fish for\nwild POKéMON.");
+const u8 gGoodRodItemDescription[] = _("A decent fishing\nrod for catching\nwild POKéMON.");
+const u8 gSuperRodItemDescription[] = _("The best fishing\nrod for catching\nwild POKéMON.");
+const u8 gSSTicketItemDescription[] = _("The ticket required\nfor sailing on a\nferry.");
+const u8 gContestPassItemDescription[] = _("The pass required\nfor entering\nPOKéMON CONTESTS.");
+const u8 gWailmerPailItemDescription[] = _("A tool used for\nwatering BERRIES\nand plants.");
+const u8 gDevonGoodsItemDescription[] = _("A package that\ncontains DEVON’s\nmachine parts.");
+const u8 gSootSackItemDescription[] = _("A sack used to\ngather and hold\nvolcanic ash.");
+const u8 gBasementKeyItemDescription[] = _("The key for NEW\nMAUVILLE beneath\nMAUVILLE CITY.");
+const u8 gAcroBikeItemDescription[] = _("A folding bicycle\ncapable of jumps\nand wheelies.");
+const u8 gPokeblockCaseItemDescription[] = _("A case for holding\n{POKEBLOCK}S made with\na BERRY BLENDER.");
+const u8 gLetterItemDescription[] = _("A letter to STEVEN\nfrom the PRESIDENT\nof the DEVON CORP.");
+const u8 gEonTicketItemDescription[] = _("The ticket for a\nferry to a distant\nsouthern island.");
+const u8 gRedOrbItemDescription[] = _("A red, glowing orb\nsaid to contain an\nancient power.");
+const u8 gBlueOrbItemDescription[] = _("A blue, glowing orb\nsaid to contain an\nancient power.");
+const u8 gScannerItemDescription[] = _("A device found\ninside the\nABANDONED SHIP.");
+const u8 gGoGogglesItemDescription[] = _("Nifty goggles that\nprotect eyes from\ndesert sandstorms.");
+const u8 gMeteoriteItemDescription[] = _("A meteorite found\nat METEOR FALLS.");
+const u8 gRoom1KeyItemDescription[] = _("A key that opens a\ndoor inside the\nABANDONED SHIP.");
+const u8 gRoom2KeyItemDescription[] = _("A key that opens a\ndoor inside the\nABANDONED SHIP.");
+const u8 gRoom4KeyItemDescription[] = _("A key that opens a\ndoor inside the\nABANDONED SHIP.");
+const u8 gRoom6KeyItemDescription[] = _("A key that opens a\ndoor inside the\nABANDONED SHIP.");
+const u8 gStorageKeyItemDescription[] = _("The key to the\nstorage inside the\nABANDONED SHIP.");
+const u8 gRootFossilItemDescription[] = _("A fossil of an\nancient, seafloor-\ndwelling POKéMON.");
+const u8 gClawFossilItemDescription[] = _("A fossil of an\nancient, seafloor-\ndwelling POKéMON.");
+const u8 gDevonScopeItemDescription[] = _("A device by DEVON\nthat signals any\nunseeable POKéMON.");
+//TMs/HMs
+const u8 gTM01ItemDescription[] = _("Powerful, but makes\nthe user flinch if\nhit by the foe.");
+const u8 gTM02ItemDescription[] = _("Hooks and slashes\nthe foe with long,\nsharp claws.");
+const u8 gTM03ItemDescription[] = _("Generates an\nultrasonic wave\nthat may confuse.");
+const u8 gTM04ItemDescription[] = _("Raises SP. ATK and\nSP. DEF by focusing\nthe mind.");
+const u8 gTM05ItemDescription[] = _("A savage roar that\nmakes the foe flee \nto end the battle.");
+const u8 gTM06ItemDescription[] = _("Poisons the foe\nwith a toxin that\ngradually worsens.");
+const u8 gTM07ItemDescription[] = _("Creates a hailstorm\nthat damages all\ntypes except ICE.");
+const u8 gTM08ItemDescription[] = _("Bulks up the body\nto boost both\nATTACK & DEFENSE.");
+const u8 gTM09ItemDescription[] = _("Shoots 2 to 5 seeds\nin a row to strike\nthe foe.");
+const u8 gTM10ItemDescription[] = _("The attack power\nvaries among\ndifferent POKéMON.");
+const u8 gTM11ItemDescription[] = _("Raises the power of\nFIRE-type moves\nfor 5 turns.");
+const u8 gTM12ItemDescription[] = _("Enrages the foe so\nit can only use\nattack moves.");
+const u8 gTM13ItemDescription[] = _("Fires an icy cold\nbeam that may\nfreeze the foe.");
+const u8 gTM14ItemDescription[] = _("A brutal snow-and-\nwind attack that\nmay freeze the foe.");
+const u8 gTM15ItemDescription[] = _("Powerful, but needs\nrecharging the\nnext turn.");
+const u8 gTM16ItemDescription[] = _("Creates a wall of\nlight that lowers\nSP. ATK damage.");
+const u8 gTM17ItemDescription[] = _("Negates all damage,\nbut may fail if used\nin succession.");
+const u8 gTM18ItemDescription[] = _("Raises the power of\nWATER-type moves\nfor 5 turns.");
+const u8 gTM19ItemDescription[] = _("Recovers half the\nHP of the damage \nthis move inflicts.");
+const u8 gTM20ItemDescription[] = _("Prevents status\nabnormality with a\nmystical power.");
+const u8 gTM21ItemDescription[] = _("The less the user\nlikes you, the more\npowerful this move.");
+const u8 gTM22ItemDescription[] = _("Absorbs sunlight in\nthe 1st turn, then\nattacks next turn.");
+const u8 gTM23ItemDescription[] = _("Slams the foe with\na hard tail. It may\nlower DEFENSE.");
+const u8 gTM24ItemDescription[] = _("A powerful electric\nattack that may\ncause paralysis.");
+const u8 gTM25ItemDescription[] = _("Strikes the foe\nwith a thunderbolt.\nIt may paralyze.");
+const u8 gTM26ItemDescription[] = _("Causes a quake\nthat has no effect\non flying foes.");
+const u8 gTM27ItemDescription[] = _("The more the user\nlikes you, the more\npowerful this move.");
+const u8 gTM28ItemDescription[] = _("Digs underground\nthe 1st turn, then\nstrikes next turn.");
+const u8 gTM29ItemDescription[] = _("A powerful psychic\nattack that may\nlower SP. DEF.");
+const u8 gTM30ItemDescription[] = _("Hurls a dark lump\nat the foe. It may\nlower SP. DEF.");
+const u8 gTM31ItemDescription[] = _("Destroys barriers\nlike LIGHT SCREEN\nand causes damage.");
+const u8 gTM32ItemDescription[] = _("Creates illusory\ncopies to enhance\nelusiveness.");
+const u8 gTM33ItemDescription[] = _("Creates a wall of\nlight that weakens\nphysical attacks.");
+const u8 gTM34ItemDescription[] = _("Zaps the foe with a\njolt of electricity\nthat never misses.");
+const u8 gTM35ItemDescription[] = _("Looses a stream of\nfire that may burn\nthe foe.");
+const u8 gTM36ItemDescription[] = _("Hurls sludge at the\nfoe. It may poison\nthe foe.");
+const u8 gTM37ItemDescription[] = _("Causes a sandstorm\nthat hits the foe\nover several turns.");
+const u8 gTM38ItemDescription[] = _("A powerful fire\nattack that may\nburn the foe.");
+const u8 gTM39ItemDescription[] = _("Stops the foe from\nmoving with rocks.\nMay lower SPEED.");
+const u8 gTM40ItemDescription[] = _("An extremely fast\nattack that can’t\nbe avoided.");
+const u8 gTM41ItemDescription[] = _("Prevents the foe\nfrom using the same\nmove in a row.");
+const u8 gTM42ItemDescription[] = _("Raises ATTACK when\npoisoned, burned,\nor paralyzed.");
+const u8 gTM43ItemDescription[] = _("Adds an effect to\nattack depending\non the location.");
+const u8 gTM44ItemDescription[] = _("The user sleeps for\n2 turns to restore\nhealth and status.");
+const u8 gTM45ItemDescription[] = _("Makes it tough to\nattack a foe of the\nopposite gender.");
+const u8 gTM46ItemDescription[] = _("While attacking,\nit may steal the\nfoe’s held item.");
+const u8 gTM47ItemDescription[] = _("Spreads hard-\nedged wings and\nslams into the foe.");
+const u8 gTM48ItemDescription[] = _("Switches abilities\nwith the foe on the\nturn this is used.");
+const u8 gTM49ItemDescription[] = _("Steals the effects\nof the move the foe\nis trying to use.");
+const u8 gTM50ItemDescription[] = _("Enables full-power\nattack, but sharply\nlowers SP. ATK.");
+
+const u8 gHM01ItemDescription[] = _("Attacks the foe\nwith sharp blades\nor claws.");
+const u8 gHM02ItemDescription[] = _("Flies up on the\nfirst turn, then\nattacks next turn.");
+const u8 gHM03ItemDescription[] = _("Creates a huge\nwave, then crashes\nit down on the foe.");
+const u8 gHM04ItemDescription[] = _("Builds enormous\npower, then slams\nthe foe.");
+const u8 gHM05ItemDescription[] = _("Looses a powerful\nblast of light that\nreduces accuracy.");
+const u8 gHM06ItemDescription[] = _("A rock-crushingly\ntough attack that\nmay lower DEFENSE.");
+const u8 gHM07ItemDescription[] = _("Attacks the foe\nwith enough power\nto climb waterfalls.");
+const u8 gHM08ItemDescription[] = _("Dives underwater\nthe 1st turn, then\nattacks next turn.");
+//FireRed/LeafGreen key items
+const u8 gOaksParcelItemDescription[] = _("A parcel for PROF.\nOAK from a POKéMON\nMART’s clerk.");
+const u8 gPokeFluteItemDescription[] = _("A sweet-sounding\nflute that awakens\nPOKéMON.");
+const u8 gSecretKeyItemDescription[] = _("The key to the\nCINNABAR ISLAND\nGYM’s entrance.");
+const u8 gBikeVoucherItemDescription[] = _("A voucher for\nobtaining a bicycle\nfrom the BIKE SHOP.");
+const u8 gGoldTeethItemDescription[] = _("Gold dentures lost\nby the SAFARI\nZONE’s WARDEN.");
+const u8 gOldAmberItemDescription[] = _("A stone containing\nthe genes of an\nancient POKéMON.");
+const u8 gCardKeyItemDescription[] = _("A card-type door\nkey used in SILPH\nCO’s office.");
+const u8 gLiftKeyItemDescription[] = _("An elevator key\nused in TEAM\nROCKET’s HIDEOUT.");
+const u8 gHelixFossilItemDescription[] = _("A piece of an\nancient marine\nPOKéMON’s seashell.");
+const u8 gDomeFossilItemDescription[] = _("A piece of an\nancient marine\nPOKéMON’s shell.");
+const u8 gSilphScopeItemDescription[] = _("SILPH CO’s scope\nmakes unseeable\nPOKéMON visible.");
+const u8 gBicycleItemDescription[] = _("A folding bicycle\nthat is faster than\nthe RUNNING SHOES.");
+const u8 gTownMapItemDescription[] = _("Can be viewed\nanytime. Shows your\npresent location.");
+const u8 gVSSeekerItemDescription[] = _("A rechargeable unit\nthat flags battle-\nready TRAINERS.");
+const u8 gFameCheckerItemDescription[] = _("Stores information\non famous people\nfor instant recall.");
+const u8 gTMCaseItemDescription[] = _("A convenient case \nthat holds TMs and\nHMs.");
+const u8 gBerryPouchItemDescription[] = _("A convenient\ncontainer that\nholds BERRIES.");
+const u8 gTeachyTVItemDescription[] = _("A TV set tuned to\nan advice program\nfor TRAINERS.");
+const u8 gTriPassItemDescription[] = _("A pass for ferries\nbetween ONE, TWO,\nand THREE ISLAND.");
+const u8 gRainbowPassItemDescription[] = _("For ferries serving\nVERMILION and the\nSEVII ISLANDS.");
+const u8 gTeaItemDescription[] = _("A thirst-quenching\ntea prepared by an\nold lady.");
+const u8 gMysticTicketItemDescription[] = _("A ticket required\nto board the ship\nto NAVEL ROCK.");
+const u8 gAuroraTicketItemDescription[] = _("A ticket required\nto board the ship\nto BIRTH ISLAND.");
+const u8 gPowderJarItemDescription[] = _("Stores BERRY\nPOWDER made using\na BERRY CRUSHER.");
+const u8 gRubyItemDescription[] = _("An exquisite, red-\nglowing gem that\nsymbolizes passion.");
+const u8 gSapphireItemDescription[] = _("A brilliant blue gem\nthat symbolizes\nhonesty.");
+//Emerald-specific key items
+const u8 gMagmaEmblemItemDescription[] = _("A medal-like item in\nthe same shape as\nTEAM MAGMA’s mark.");
+const u8 gOldSeaMapItemDescription[] = _("A faded sea chart\nthat shows the way\nto a certain island.");
+#endif // POKEEMERALD_DATA_TEXT_ITEM_DESCRIPTIONS_H
diff --git a/include/decoration.h b/include/decoration.h
index a51d9ccce..76b2f2ec4 100644
--- a/include/decoration.h
+++ b/include/decoration.h
@@ -70,5 +70,8 @@ void sub_8126968(void);
void sub_8126AD8(u8 taskId);
void sub_8127D38(u16 mapX, u16 mapY, u16 decor);
void sub_8126B2C(u8 taskId);
+void sub_8127208(u8 taskId);
+void sub_8127250(u8 *dest, u8 decorCat);
+bool8 IsSelectedDecorInThePC(void);
#endif //GUARD_DECORATION_H
diff --git a/include/easy_chat.h b/include/easy_chat.h
index e5fdc8bea..541fa6c1b 100644
--- a/include/easy_chat.h
+++ b/include/easy_chat.h
@@ -1,40 +1,16 @@
#ifndef GUARD_EASYCHAT_H
#define GUARD_EASYCHAT_H
-// Taken from Pokeruby, check if it's correct
-enum
-{
- EC_GROUP_POKEMON,
- EC_GROUP_TRAINER,
- EC_GROUP_STATUS,
- EC_GROUP_BATTLE,
- EC_GROUP_GREETINGS,
- EC_GROUP_PEOPLE,
- EC_GROUP_VOICES,
- EC_GROUP_SPEECH,
- EC_GROUP_ENDINGS,
- EC_GROUP_FEELINGS,
- EC_GROUP_CONDITIONS,
- EC_GROUP_ACTIONS,
- EC_GROUP_LIFESTYLE,
- EC_GROUP_HOBBIES,
- EC_GROUP_TIME,
- EC_GROUP_MISC,
- EC_GROUP_ADJECTIVES,
- EC_GROUP_EVENTS,
- EC_GROUP_MOVE_1,
- EC_GROUP_MOVE_2,
- EC_GROUP_TRENDY_SAYING,
- EC_GROUP_POKEMON_2,
-};
-
void InitEasyChatPhrases(void);
void easy_chat_input_maybe(void);
-void CopyEasyChatWord(u8 *dest, u16 word);
+u8 * CopyEasyChatWord(u8 *dest, u16 word);
bool32 sub_811F8D8(u16 word);
void InitializeEasyChatWordArray(u16 *words, u16 length);
void ConvertEasyChatWordsToString(u8 *dest, const u16 *src, u16 length1, u16 length2);
bool8 ECWord_CheckIfOutsideOfValidRange(u16 word);
u16 sub_811EE38(u16 group);
+u16 sub_811F01C(void);
+bool16 EasyChat_GetNumWordsInGroup(u8);
+u16 sub_811EE90(u16);
#endif // GUARD_EASYCHAT_H
diff --git a/include/event_scripts.h b/include/event_scripts.h
index b26d1c164..4f85156aa 100644
--- a/include/event_scripts.h
+++ b/include/event_scripts.h
@@ -398,4 +398,134 @@ extern const u8 LittlerootTown_MaysHouse_2F_EventScript_1F958F[];
extern const u8 gText_0827D507[];
extern const u8 gText_0827D531[];
+//mauville_old_man
+extern const u8 gOtherText_Is[];
+extern const u8 gOtherText_DontYouAgree[];
+extern const u8 gText_SoPretty[];
+extern const u8 gText_SoDarling[];
+extern const u8 gText_SoRelaxed[];
+extern const u8 gText_SoSunny[];
+extern const u8 gText_SoDesirable[];
+extern const u8 gText_SoExciting[];
+extern const u8 gText_SoAmusing[];
+extern const u8 gText_SoMagical[];
+extern const u8 gUnknown_08294313[];
+extern const u8 gUnknown_08294359[];
+extern const u8 gUnknown_08294398[];
+extern const u8 gUnknown_082943DA[];
+extern const u8 gUnknown_0829441C[];
+extern const u8 gUnknown_08294460[];
+extern const u8 gUnknown_082944A0[];
+extern const u8 gUnknown_082944D5[];
+
+
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E930[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E947[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E956[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E9D7[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E9EF[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28E9FE[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EA7D[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EA98[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EAA8[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EB19[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EB31[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EB3E[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EBB5[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EBCD[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EBDD[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EC60[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EC79[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EC81[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28ED04[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28ED21[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28ED30[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EDA1[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EDB5[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EDCF[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EE45[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EE5D[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EE6A[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EEDD[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EEF1[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EF01[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EF73[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EF95[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28EFAA[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F045[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F05A[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F071[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F0F3[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F10D[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F125[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F1BE[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F1D5[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F1DE[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F24F[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F269[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F277[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F2FC[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F314[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F32A[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F3AD[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F3C6[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F3D2[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F44B[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F461[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F47C[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F50C[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F51B[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F538[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F5BE[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F5D1[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F5F2[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F678[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F694[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F6B4[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F751[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F76A[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F776[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F7F6[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F811[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F822[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F89C[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F8AF[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F8BC[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F92F[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F941[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F949[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F9D1[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F9EA[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28F9FD[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FA81[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FA99[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FAA7[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FB1D[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FB35[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FB47[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FBC4[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FBD9[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FBEA[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FC6B[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FC85[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FC98[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FD1D[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FD35[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FD40[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FDA2[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FDBD[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FDCE[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FE57[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FE72[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FE88[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FF0C[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FF27[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FF44[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FFDD[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_28FFFA[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_29000D[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_290097[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_2900B5[];
+extern const u8 MauvilleCity_PokemonCenter_1F_Text_2900CB[];
+
#endif //GUARD_EVENT_SCRIPTS_H
diff --git a/include/fieldmap.h b/include/fieldmap.h
index 3128e95ce..6e127ce5d 100644
--- a/include/fieldmap.h
+++ b/include/fieldmap.h
@@ -1,22 +1,31 @@
#ifndef GUARD_FIELDMAP_H
#define GUARD_FIELDMAP_H
-extern struct MapCoords {
- int width;
- int height;
-} gUnknown_03005DC0;
+extern struct BackupMapData gUnknown_03005DC0;
u32 MapGridGetMetatileIdAt(int, int);
u32 MapGridGetMetatileBehaviorAt(int, int);
void MapGridSetMetatileIdAt(int, int, u16);
void MapGridSetMetatileEntryAt(int, int, u16);
void GetCameraCoords(u16*, u16*);
-bool8 MapGridIsImpassableAt(s16, s16);
-s32 GetMapBorderIdAt(s16, s16);
-bool32 CanCameraMoveInDirection(u8);
+bool8 MapGridIsImpassableAt(int, int);
+int GetMapBorderIdAt(int x, int y);
+int CanCameraMoveInDirection(int direction);
u16 GetBehaviorByMetatileId(u16 metatileId);
void sav1_camera_get_focus_coords(u16 *x, u16 *y);
u8 MapGridGetMetatileLayerTypeAt(s32 x, s32 y);
u8 CameraMove(s32 deltaX, s32 deltaY);
+void mapheader_copy_mapdata_with_padding(struct MapHeader *mapHeader);
+void map_copy_with_padding(u16 *map, u16 width, u16 height);
+void mapheader_copy_mapdata_of_adjacent_maps(struct MapHeader *);
+void fillSouthConnection(struct MapHeader const *, struct MapHeader const *, s32);
+void fillNorthConnection(struct MapHeader const *, struct MapHeader const *, s32);
+void fillWestConnection(struct MapHeader const *, struct MapHeader const *, s32);
+void fillEastConnection(struct MapHeader const *, struct MapHeader const *, s32);
+void mapdata_from_sav2(void);
+bool8 sub_8088BF0(u16*, u16, u8);
+struct MapConnection *sub_8088950(u8 direction, int x, int y);
+bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection);
+bool8 sub_8088A0C(int x, int src_width, int dest_width, int offset);
#endif //GUARD_FIELDMAP_H
diff --git a/include/fldeff_80F9BCC.h b/include/fldeff_80F9BCC.h
index d57665c68..84015065e 100644
--- a/include/fldeff_80F9BCC.h
+++ b/include/fldeff_80F9BCC.h
@@ -10,5 +10,6 @@
void sub_80FA5E4(s16 id, s16 x, s16 y);
void sub_80FA794(s16 x, s16 y);
void overworld_poison_effect(void);
+bool8 sub_80FADE4(u16, u8);
#endif //GUARD_FLDEFF_80F9BCC_H
diff --git a/include/fldeff_cut.h b/include/fldeff_cut.h
new file mode 100644
index 000000000..f985fd82d
--- /dev/null
+++ b/include/fldeff_cut.h
@@ -0,0 +1,7 @@
+#ifndef GUARD_FLDEFF_CUT_H
+#define GUARD_FLDEFF_CUT_H
+
+void sub_80D423C(s16, s16);
+void sub_80D42B8(s16, s16);
+
+#endif // GUARD_FLDEFF_CUT_H
diff --git a/include/fldeff_groundshake.h b/include/fldeff_groundshake.h
new file mode 100644
index 000000000..c1629f9bd
--- /dev/null
+++ b/include/fldeff_groundshake.h
@@ -0,0 +1,6 @@
+#ifndef GUARD_FLDEFF_GROUNDSHAKE_H
+#define GUARD_FLDEFF_GROUNDSHAKE_H
+
+void sub_81BE72C(void);
+
+#endif // GUARD_FLDEFF_GROUNDSHAKE_H
diff --git a/include/global.h b/include/global.h
index f88203c90..ec636bb07 100644
--- a/include/global.h
+++ b/include/global.h
@@ -43,9 +43,6 @@
#define PARTY_SIZE 6
-#define POKEMON_NAME_LENGTH 10
-#define OT_NAME_LENGTH 7
-
#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) >= (b) ? (a) : (b))
@@ -97,6 +94,31 @@ enum LanguageId
#define GAME_VERSION (VERSION_EMERALD)
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
+// capacities of various saveblock objects
+#define DAYCARE_MON_COUNT 2
+#define POKEBLOCKS_COUNT 40
+#define MAP_OBJECTS_COUNT 16
+#define BERRY_TREES_COUNT 128
+#define FLAGS_COUNT 300
+#define VARS_COUNT 256
+#define MAIL_COUNT 16
+#define SECRET_BASES_COUNT 20
+#define PC_ITEMS_COUNT 50
+#define BAG_ITEMS_COUNT 30
+#define BAG_KEYITEMS_COUNT 30
+#define BAG_POKEBALLS_COUNT 16
+#define BAG_TMHM_COUNT 64
+#define BAG_BERRIES_COUNT 46
+
+#define PYRAMID_BAG_ITEMS_COUNT 10
+
+// string lengths
+#define ITEM_NAME_LENGTH 14
+#define POKEMON_NAME_LENGTH 10
+#define OT_NAME_LENGTH 7
+#define PLAYER_NAME_LENGTH 8
+#define MAIL_WORDS_COUNT 9
+
enum
{
MALE,
@@ -129,15 +151,6 @@ enum
OPTIONS_BATTLE_STYLE_SET
};
-enum
-{
- BAG_ITEMS = 1,
- BAG_POKEBALLS,
- BAG_TMsHMs,
- BAG_BERRIES,
- BAG_KEYITEMS
-};
-
struct Coords16
{
s16 x;
@@ -209,11 +222,11 @@ struct BerryPickingResults // possibly used in the game itself? Size may be wron
u8 field_F;
};
+// two arrays for lvl50 and open level
struct PyramidBag
{
- u16 items_Lvl50[10];
- u16 items_OpenLvl[10];
- u8 quantity[10];
+ u16 itemId[2][PYRAMID_BAG_ITEMS_COUNT];
+ u8 quantity[2][PYRAMID_BAG_ITEMS_COUNT];
};
struct BerryCrush
@@ -223,8 +236,6 @@ struct BerryCrush
u32 unk;
};
-#define PLAYER_NAME_LENGTH 8
-
struct UnknownSaveBlock2Struct
{
u8 field_0;
@@ -303,7 +314,7 @@ struct SaveBlock2
/*0xE1A*/ u16 battlePyramidFloor; // possibly?
/*0xE1C*/ u8 field_E1C[16];
/*0xE2C*/ struct PyramidBag pyramidBag;
- /*0x???*/ u8 field_notSure[13];
+ /*0x???*/ u8 field_unkown[6];
/*0xE6E*/ u16 battleTentWinStreak;
/*0xE70*/ u8 field_E70[72];
/*0xEB8*/ u16 frontierBattlePoints;
@@ -417,8 +428,6 @@ struct EasyChatPair
u16 words[2];
}; /*size = 0x8*/
-#define MAIL_WORDS_COUNT 9
-
struct MailStruct
{
/*0x00*/ u16 words[MAIL_WORDS_COUNT];
@@ -428,41 +437,68 @@ struct MailStruct
/*0x20*/ u16 itemId;
};
-struct UnkMauvilleOldManStruct
+struct MauvilleManCommon
{
- u8 unk_2D94;
- u8 unk_2D95;
- /*0x2D96*/ u16 mauvilleOldMan_ecArray[6];
- /*0x2DA2*/ u16 mauvilleOldMan_ecArray2[6];
- /*0x2DAE*/ u8 playerName[8];
- /*0x2DB6*/ u8 filler_2DB6[0x3];
- /*0x2DB9*/ u8 playerTrainerId[4];
- u8 unk_2DBD;
+ u8 id;
+};
+
+struct MauvilleManBard
+{
+ /*0x00*/ u8 id;
+ /*0x02*/ u16 songLyrics[6];
+ /*0x0E*/ u16 temporaryLyrics[6];
+ /*0x1A*/ u8 playerName[8];
+ /*0x22*/ u8 filler_2DB6[0x3];
+ /*0x25*/ u8 playerTrainerId[4];
+ /*0x29*/ bool8 hasChangedSong;
+ /*0x2A*/ u8 language;
}; /*size = 0x2C*/
-struct UnkMauvilleOldManStruct2
+struct MauvilleManStoryteller
{
- u8 filler0;
- u8 unk1;
- u8 unk2;
- u16 mauvilleOldMan_ecArray[10];
- u8 mauvilleOldMan_ecArray2[12];
- u8 fillerF[0x2];
+ u8 id;
+ bool8 alreadyRecorded;
+ u8 filler2[2];
+ u8 gameStatIDs[4];
+ u8 trainerNames[4][7];
+ u8 statValues[4][4];
+ u8 language[4];
+};
+
+struct MauvilleManGiddy
+{
+ /*0x00*/ u8 id;
+ /*0x01*/ u8 taleCounter;
+ /*0x02*/ u8 questionNum;
+ /*0x04*/ u16 randomWords[10];
+ /*0x18*/ u8 questionList[8];
+ /*0x20*/ u8 language;
}; /*size = 0x2C*/
+struct MauvilleManHipster
+{
+ u8 id;
+ bool8 alreadySpoken;
+ u8 language;
+};
+
struct MauvilleOldManTrader
{
- u8 unk0;
- u8 unk1[4];
- u8 unk5[4][11];
- u8 unk31;
+ u8 id;
+ u8 decorIds[4];
+ u8 playerNames[4][11];
+ u8 alreadyTraded;
+ u8 language[4];
};
typedef union OldMan
{
- struct UnkMauvilleOldManStruct oldMan1;
- struct UnkMauvilleOldManStruct2 oldMan2;
+ struct MauvilleManCommon common;
+ struct MauvilleManBard bard;
+ struct MauvilleManGiddy giddy;
+ struct MauvilleManHipster hipster;
struct MauvilleOldManTrader trader;
+ struct MauvilleManStoryteller storyteller;
u8 filler[0x40];
} OldMan;
@@ -480,6 +516,8 @@ struct RecordMixing_UnknownStruct
u16 unk74[0x2];
};
+#define LINK_B_RECORDS_COUNT 5
+
struct LinkBattleRecord
{
u8 name[8];
@@ -489,6 +527,12 @@ struct LinkBattleRecord
u16 draws;
};
+struct LinkBattleRecords
+{
+ struct LinkBattleRecord entries[LINK_B_RECORDS_COUNT];
+ u8 languages[LINK_B_RECORDS_COUNT];
+};
+
struct RecordMixingGiftData
{
u8 unk0;
@@ -530,8 +574,6 @@ struct DaycareMon
u32 steps;
};
-#define DAYCARE_MON_COUNT 2
-
struct DayCare
{
struct DaycareMon mons[DAYCARE_MON_COUNT];
@@ -552,13 +594,6 @@ struct RecordMixingDayCareMail
bool16 holdsItem[DAYCARE_MON_COUNT];
};
-#define POKEBLOCKS_COUNT 40
-#define MAP_OBJECTS_COUNT 16
-#define BERRY_TREES_COUNT 128
-#define FLAGS_COUNT 300
-#define VARS_COUNT 256
-#define MAIL_COUNT 16
-
enum
{
LILYCOVE_LADY_QUIZ,
@@ -645,16 +680,16 @@ struct SaveBlock1
/*0x32*/ u16 mapDataId;
/*0x34*/ u16 mapView[0x100];
/*0x234*/ u8 playerPartyCount;
- /*0x238*/ struct Pokemon playerParty[6];
+ /*0x238*/ struct Pokemon playerParty[PARTY_SIZE];
/*0x490*/ u32 money;
/*0x494*/ u16 coins;
/*0x496*/ u16 registeredItem; // registered for use with SELECT button
- /*0x498*/ struct ItemSlot pcItems[50];
- /*0x560*/ struct ItemSlot bagPocket_Items[30];
- /*0x5D8*/ struct ItemSlot bagPocket_KeyItems[30];
- /*0x650*/ struct ItemSlot bagPocket_PokeBalls[16];
- /*0x690*/ struct ItemSlot bagPocket_TMHM[64];
- /*0x790*/ struct ItemSlot bagPocket_Berries[46];
+ /*0x498*/ struct ItemSlot pcItems[PC_ITEMS_COUNT];
+ /*0x560*/ struct ItemSlot bagPocket_Items[BAG_ITEMS_COUNT];
+ /*0x5D8*/ struct ItemSlot bagPocket_KeyItems[BAG_KEYITEMS_COUNT];
+ /*0x650*/ struct ItemSlot bagPocket_PokeBalls[BAG_POKEBALLS_COUNT];
+ /*0x690*/ struct ItemSlot bagPocket_TMHM[BAG_TMHM_COUNT];
+ /*0x790*/ struct ItemSlot bagPocket_Berries[BAG_BERRIES_COUNT];
/*0x848*/ struct Pokeblock pokeblocks[POKEBLOCKS_COUNT];
/*0x988*/ u8 seen1[52];
/*0x9BC*/ u16 berryBlenderRecords[3];
@@ -667,7 +702,7 @@ struct SaveBlock1
/*0x139C*/ u16 vars[VARS_COUNT];
/*0x159C*/ u32 gameStats[NUM_GAME_STATS];
/*0x169C*/ struct BerryTree berryTrees[BERRY_TREES_COUNT];
- /*0x1A9C*/ struct SecretBaseRecord secretBases[20];
+ /*0x1A9C*/ struct SecretBaseRecord secretBases[SECRET_BASES_COUNT];
/*0x271C*/ u8 playerRoomDecor[12];
/*0x2728*/ u8 playerRoomDecorPos[12];
/*0x2734*/ u8 decorDesk[10];
@@ -703,9 +738,7 @@ struct SaveBlock1
/*0x2e64*/ struct EasyChatPair easyChatPairs[5]; //Dewford trend [0] and some other stuff
/*0x2e90*/ struct ContestWinner contestWinners[13]; // 0 - 5 used in contest hall, 6 - 7 unused?, 8 - 12 museum
/*0x3030*/ struct DayCare daycare;
- /*0x3150*/ struct LinkBattleRecord linkBattleRecords[5];
- /*0x31A0*/ u8 unk_31A0;
- /*0x31A1*/ u8 filler_31A1[7];
+ /*0x3150*/ struct LinkBattleRecords linkBattleRecords;
/*0x31A8*/ u8 giftRibbons[52];
/*0x31DC*/ struct Roamer roamer;
/*0x31F8*/ struct EnigmaBerry enigmaBerry;
diff --git a/include/graphics.h b/include/graphics.h
index 1313ddc3a..3feed6d08 100644
--- a/include/graphics.h
+++ b/include/graphics.h
@@ -2713,6 +2713,501 @@ extern const u8 gRaySceneHushBg_Pal[];
extern const u8 gRaySceneHushBg_Gfx[];
extern const u8 gRaySceneHushRing_Gfx[];
+// Item icons
+extern const u8 gItemIcon_QuestionMark[];
+extern const u8 gItemIconPalette_QuestionMark[];
+// Pokeballs
+extern const u8 gItemIcon_MasterBall[];
+extern const u8 gItemIconPalette_MasterBall[];
+extern const u8 gItemIcon_UltraBall[];
+extern const u8 gItemIconPalette_UltraBall[];
+extern const u8 gItemIcon_GreatBall[];
+extern const u8 gItemIconPalette_GreatBall[];
+extern const u8 gItemIcon_PokeBall[];
+extern const u8 gItemIconPalette_PokeBall[];
+extern const u8 gItemIcon_SafariBall[];
+extern const u8 gItemIconPalette_SafariBall[];
+extern const u8 gItemIcon_NetBall[];
+extern const u8 gItemIconPalette_NetBall[];
+extern const u8 gItemIcon_DiveBall[];
+extern const u8 gItemIconPalette_DiveBall[];
+extern const u8 gItemIcon_NestBall[];
+extern const u8 gItemIconPalette_NestBall[];
+extern const u8 gItemIcon_RepeatBall[];
+extern const u8 gItemIconPalette_RepeatBall[];
+extern const u8 gItemIcon_TimerBall[];
+extern const u8 gItemIcon_LuxuryBall[];
+extern const u8 gItemIconPalette_LuxuryBall[];
+extern const u8 gItemIcon_PremierBall[];
+// Medicine
+extern const u8 gItemIcon_Potion[];
+extern const u8 gItemIconPalette_Potion[];
+extern const u8 gItemIcon_Antidote[];
+extern const u8 gItemIconPalette_Antidote[];
+extern const u8 gItemIcon_StatusHeal[];
+extern const u8 gItemIconPalette_BurnHeal[];
+extern const u8 gItemIconPalette_IceHeal[];
+extern const u8 gItemIconPalette_Awakening[];
+extern const u8 gItemIconPalette_ParalyzeHeal[];
+extern const u8 gItemIcon_LargePotion[];
+extern const u8 gItemIconPalette_FullRestore[];
+extern const u8 gItemIconPalette_MaxPotion[];
+extern const u8 gItemIconPalette_HyperPotion[];
+extern const u8 gItemIconPalette_SuperPotion[];
+extern const u8 gItemIcon_FullHeal[];
+extern const u8 gItemIconPalette_FullHeal[];
+extern const u8 gItemIcon_Revive[];
+extern const u8 gItemIconPalette_Revive[];
+extern const u8 gItemIcon_MaxRevive[];
+extern const u8 gItemIcon_FreshWater[];
+extern const u8 gItemIconPalette_FreshWater[];
+extern const u8 gItemIcon_SodaPop[];
+extern const u8 gItemIconPalette_SodaPop[];
+extern const u8 gItemIcon_Lemonade[];
+extern const u8 gItemIconPalette_Lemonade[];
+extern const u8 gItemIcon_MoomooMilk[];
+extern const u8 gItemIconPalette_MoomooMilk[];
+extern const u8 gItemIcon_Powder[];
+extern const u8 gItemIconPalette_EnergyPowder[];
+extern const u8 gItemIcon_EnergyRoot[];
+extern const u8 gItemIconPalette_EnergyRoot[];
+extern const u8 gItemIconPalette_HealPowder[];
+extern const u8 gItemIcon_RevivalHerb[];
+extern const u8 gItemIconPalette_RevivalHerb[];
+extern const u8 gItemIcon_Ether[];
+extern const u8 gItemIconPalette_Ether[];
+extern const u8 gItemIconPalette_MaxEther[];
+extern const u8 gItemIconPalette_Elixir[];
+extern const u8 gItemIconPalette_MaxElixir[];
+extern const u8 gItemIcon_LavaCookie[];
+extern const u8 gItemIconPalette_LavaCookieAndLetter[];
+extern const u8 gItemIcon_Flute[];
+extern const u8 gItemIconPalette_BlueFlute[];
+extern const u8 gItemIconPalette_YellowFlute[];
+extern const u8 gItemIconPalette_RedFlute[];
+extern const u8 gItemIconPalette_BlackFlute[];
+extern const u8 gItemIconPalette_WhiteFlute[];
+extern const u8 gItemIcon_BerryJuice[];
+extern const u8 gItemIconPalette_BerryJuice[];
+extern const u8 gItemIcon_SacredAsh[];
+extern const u8 gItemIconPalette_SacredAsh[];
+// Collectibles
+extern const u8 gItemIconPalette_ShoalSalt[];
+extern const u8 gItemIcon_ShoalShell[];
+extern const u8 gItemIconPalette_Shell[];
+extern const u8 gItemIcon_Shard[];
+extern const u8 gItemIconPalette_RedShard[];
+extern const u8 gItemIconPalette_BlueShard[];
+extern const u8 gItemIconPalette_YellowShard[];
+extern const u8 gItemIconPalette_GreenShard[];
+// Vitamins
+extern const u8 gItemIcon_HPUp[];
+extern const u8 gItemIconPalette_HPUp[];
+extern const u8 gItemIcon_Vitamin[];
+extern const u8 gItemIconPalette_Protein[];
+extern const u8 gItemIconPalette_Iron[];
+extern const u8 gItemIconPalette_Carbos[];
+extern const u8 gItemIconPalette_Calcium[];
+extern const u8 gItemIcon_RareCandy[];
+extern const u8 gItemIconPalette_RareCandy[];
+extern const u8 gItemIcon_PPUp[];
+extern const u8 gItemIconPalette_PPUp[];
+extern const u8 gItemIconPalette_Zinc[];
+extern const u8 gItemIcon_PPMax[];
+extern const u8 gItemIconPalette_PPMax[];
+// Battle items
+extern const u8 gItemIcon_BattleStatItem[];
+extern const u8 gItemIconPalette_GuardSpec[];
+extern const u8 gItemIconPalette_DireHit[];
+extern const u8 gItemIconPalette_XAttack[];
+extern const u8 gItemIconPalette_XDefend[];
+extern const u8 gItemIconPalette_XSpeed[];
+extern const u8 gItemIconPalette_XAccuracy[];
+extern const u8 gItemIconPalette_XSpecial[];
+extern const u8 gItemIcon_PokeDoll[];
+extern const u8 gItemIconPalette_PokeDoll[];
+extern const u8 gItemIcon_FluffyTail[];
+extern const u8 gItemIconPalette_FluffyTail[];
+// Field items
+extern const u8 gItemIcon_Repel[];
+extern const u8 gItemIconPalette_SuperRepel[];
+extern const u8 gItemIconPalette_MaxRepel[];
+extern const u8 gItemIcon_EscapeRope[];
+extern const u8 gItemIconPalette_EscapeRope[];
+extern const u8 gItemIcon_Repel[];
+extern const u8 gItemIconPalette_Repel[];
+// Evolution stones
+extern const u8 gItemIcon_SunStone[];
+extern const u8 gItemIconPalette_SunStone[];
+extern const u8 gItemIcon_MoonStone[];
+extern const u8 gItemIconPalette_MoonStone[];
+extern const u8 gItemIcon_FireStone[];
+extern const u8 gItemIconPalette_FireStone[];
+extern const u8 gItemIcon_ThunderStone[];
+extern const u8 gItemIconPalette_ThunderStone[];
+extern const u8 gItemIcon_WaterStone[];
+extern const u8 gItemIconPalette_WaterStone[];
+extern const u8 gItemIcon_LeafStone[];
+extern const u8 gItemIconPalette_LeafStone[];
+// Valuables
+extern const u8 gItemIcon_TinyMushroom[];
+extern const u8 gItemIconPalette_Mushroom[];
+extern const u8 gItemIcon_BigMushroom[];
+extern const u8 gItemIcon_Pearl[];
+extern const u8 gItemIconPalette_Pearl[];
+extern const u8 gItemIcon_BigPearl[];
+extern const u8 gItemIcon_Stardust[];
+extern const u8 gItemIconPalette_Star[];
+extern const u8 gItemIcon_StarPiece[];
+extern const u8 gItemIcon_Nugget[];
+extern const u8 gItemIconPalette_Nugget[];
+extern const u8 gItemIcon_HeartScale[];
+extern const u8 gItemIconPalette_HeartScale[];
+// Mail
+extern const u8 gItemIcon_OrangeMail[];
+extern const u8 gItemIconPalette_OrangeMail[];
+extern const u8 gItemIcon_HarborMail[];
+extern const u8 gItemIconPalette_HarborMail[];
+extern const u8 gItemIcon_GlitterMail[];
+extern const u8 gItemIconPalette_GlitterMail[];
+extern const u8 gItemIcon_MechMail[];
+extern const u8 gItemIconPalette_MechMail[];
+extern const u8 gItemIcon_WoodMail[];
+extern const u8 gItemIconPalette_WoodMail[];
+extern const u8 gItemIcon_WaveMail[];
+extern const u8 gItemIconPalette_WaveMail[];
+extern const u8 gItemIcon_BeadMail[];
+extern const u8 gItemIconPalette_BeadMail[];
+extern const u8 gItemIcon_ShadowMail[];
+extern const u8 gItemIconPalette_ShadowMail[];
+extern const u8 gItemIcon_TropicMail[];
+extern const u8 gItemIconPalette_TropicMail[];
+extern const u8 gItemIcon_DreamMail[];
+extern const u8 gItemIconPalette_DreamMail[];
+extern const u8 gItemIcon_FabMail[];
+extern const u8 gItemIconPalette_FabMail[];
+extern const u8 gItemIcon_RetroMail[];
+extern const u8 gItemIconPalette_RetroMail[];
+// Berries
+extern const u8 gItemIcon_CheriBerry[];
+extern const u8 gItemIconPalette_CheriBerry[];
+extern const u8 gItemIcon_ChestoBerry[];
+extern const u8 gItemIconPalette_ChestoBerry[];
+extern const u8 gItemIcon_PechaBerry[];
+extern const u8 gItemIconPalette_PechaBerry[];
+extern const u8 gItemIcon_RawstBerry[];
+extern const u8 gItemIconPalette_RawstBerry[];
+extern const u8 gItemIcon_AspearBerry[];
+extern const u8 gItemIconPalette_AspearBerry[];
+extern const u8 gItemIcon_LeppaBerry[];
+extern const u8 gItemIconPalette_LeppaBerry[];
+extern const u8 gItemIcon_OranBerry[];
+extern const u8 gItemIconPalette_OranBerry[];
+extern const u8 gItemIcon_PersimBerry[];
+extern const u8 gItemIconPalette_PersimBerry[];
+extern const u8 gItemIcon_LumBerry[];
+extern const u8 gItemIconPalette_LumBerry[];
+extern const u8 gItemIcon_SitrusBerry[];
+extern const u8 gItemIconPalette_SitrusBerry[];
+extern const u8 gItemIcon_FigyBerry[];
+extern const u8 gItemIconPalette_FigyBerry[];
+extern const u8 gItemIcon_WikiBerry[];
+extern const u8 gItemIconPalette_WikiBerry[];
+extern const u8 gItemIcon_MagoBerry[];
+extern const u8 gItemIconPalette_MagoBerry[];
+extern const u8 gItemIcon_AguavBerry[];
+extern const u8 gItemIconPalette_AguavBerry[];
+extern const u8 gItemIcon_IapapaBerry[];
+extern const u8 gItemIconPalette_IapapaBerry[];
+extern const u8 gItemIcon_RazzBerry[];
+extern const u8 gItemIconPalette_RazzBerry[];
+extern const u8 gItemIcon_BlukBerry[];
+extern const u8 gItemIconPalette_BlukBerry[];
+extern const u8 gItemIcon_NanabBerry[];
+extern const u8 gItemIconPalette_NanabBerry[];
+extern const u8 gItemIcon_WepearBerry[];
+extern const u8 gItemIconPalette_WepearBerry[];
+extern const u8 gItemIcon_PinapBerry[];
+extern const u8 gItemIconPalette_PinapBerry[];
+extern const u8 gItemIcon_PomegBerry[];
+extern const u8 gItemIconPalette_PomegBerry[];
+extern const u8 gItemIcon_KelpsyBerry[];
+extern const u8 gItemIconPalette_KelpsyBerry[];
+extern const u8 gItemIcon_QualotBerry[];
+extern const u8 gItemIconPalette_QualotBerry[];
+extern const u8 gItemIcon_HondewBerry[];
+extern const u8 gItemIconPalette_HondewBerry[];
+extern const u8 gItemIcon_GrepaBerry[];
+extern const u8 gItemIconPalette_GrepaBerry[];
+extern const u8 gItemIcon_TamatoBerry[];
+extern const u8 gItemIconPalette_TamatoBerry[];
+extern const u8 gItemIcon_CornnBerry[];
+extern const u8 gItemIconPalette_CornnBerry[];
+extern const u8 gItemIcon_MagostBerry[];
+extern const u8 gItemIconPalette_MagostBerry[];
+extern const u8 gItemIcon_RabutaBerry[];
+extern const u8 gItemIconPalette_RabutaBerry[];
+extern const u8 gItemIcon_NomelBerry[];
+extern const u8 gItemIconPalette_NomelBerry[];
+extern const u8 gItemIcon_SpelonBerry[];
+extern const u8 gItemIconPalette_SpelonBerry[];
+extern const u8 gItemIcon_PamtreBerry[];
+extern const u8 gItemIconPalette_PamtreBerry[];
+extern const u8 gItemIcon_WatmelBerry[];
+extern const u8 gItemIconPalette_WatmelBerry[];
+extern const u8 gItemIcon_DurinBerry[];
+extern const u8 gItemIconPalette_DurinBerry[];
+extern const u8 gItemIcon_BelueBerry[];
+extern const u8 gItemIconPalette_BelueBerry[];
+extern const u8 gItemIcon_LiechiBerry[];
+extern const u8 gItemIconPalette_LiechiBerry[];
+extern const u8 gItemIcon_GanlonBerry[];
+extern const u8 gItemIconPalette_GanlonBerry[];
+extern const u8 gItemIcon_SalacBerry[];
+extern const u8 gItemIconPalette_SalacBerry[];
+extern const u8 gItemIcon_PetayaBerry[];
+extern const u8 gItemIconPalette_PetayaBerry[];
+extern const u8 gItemIcon_ApicotBerry[];
+extern const u8 gItemIconPalette_ApicotBerry[];
+extern const u8 gItemIcon_LansatBerry[];
+extern const u8 gItemIconPalette_LansatBerry[];
+extern const u8 gItemIcon_StarfBerry[];
+extern const u8 gItemIconPalette_StarfBerry[];
+extern const u8 gItemIcon_EnigmaBerry[];
+extern const u8 gItemIconPalette_EnigmaBerry[];
+// Hold items
+extern const u8 gItemIcon_BrightPowder[];
+extern const u8 gItemIconPalette_BrightPowder[];
+extern const u8 gItemIcon_InBattleHerb[];
+extern const u8 gItemIconPalette_WhiteHerb[];
+extern const u8 gItemIcon_MachoBrace[];
+extern const u8 gItemIconPalette_MachoBrace[];
+extern const u8 gItemIcon_ExpShare[];
+extern const u8 gItemIconPalette_ExpShare[];
+extern const u8 gItemIcon_QuickClaw[];
+extern const u8 gItemIconPalette_QuickClaw[];
+extern const u8 gItemIcon_SootheBell[];
+extern const u8 gItemIconPalette_SootheBell[];
+extern const u8 gItemIcon_InBattleHerb[];
+extern const u8 gItemIconPalette_MentalHerb[];
+extern const u8 gItemIcon_ChoiceBand[];
+extern const u8 gItemIconPalette_ChoiceBand[];
+extern const u8 gItemIcon_KingsRock[];
+extern const u8 gItemIconPalette_KingsRock[];
+extern const u8 gItemIcon_SilverPowder[];
+extern const u8 gItemIconPalette_SilverPowder[];
+extern const u8 gItemIcon_AmuletCoin[];
+extern const u8 gItemIconPalette_AmuletCoin[];
+extern const u8 gItemIcon_CleanseTag[];
+extern const u8 gItemIconPalette_CleanseTag[];
+extern const u8 gItemIcon_SoulDew[];
+extern const u8 gItemIconPalette_SoulDew[];
+extern const u8 gItemIcon_DeepSeaTooth[];
+extern const u8 gItemIconPalette_DeepSeaTooth[];
+extern const u8 gItemIcon_DeepSeaScale[];
+extern const u8 gItemIconPalette_DeepSeaScale[];
+extern const u8 gItemIcon_SmokeBall[];
+extern const u8 gItemIconPalette_SmokeBall[];
+extern const u8 gItemIcon_Everstone[];
+extern const u8 gItemIconPalette_Everstone[];
+extern const u8 gItemIcon_FocusBand[];
+extern const u8 gItemIconPalette_FocusBand[];
+extern const u8 gItemIcon_LuckyEgg[];
+extern const u8 gItemIconPalette_LuckyEgg[];
+extern const u8 gItemIcon_ScopeLens[];
+extern const u8 gItemIconPalette_ScopeLens[];
+extern const u8 gItemIcon_MetalCoat[];
+extern const u8 gItemIconPalette_MetalCoat[];
+extern const u8 gItemIcon_Leftovers[];
+extern const u8 gItemIconPalette_Leftovers[];
+extern const u8 gItemIcon_DragonScale[];
+extern const u8 gItemIconPalette_DragonScale[];
+extern const u8 gItemIcon_LightBall[];
+extern const u8 gItemIconPalette_LightBall[];
+extern const u8 gItemIcon_SoftSand[];
+extern const u8 gItemIconPalette_SoftSand[];
+extern const u8 gItemIcon_HardStone[];
+extern const u8 gItemIconPalette_HardStone[];
+extern const u8 gItemIcon_MiracleSeed[];
+extern const u8 gItemIconPalette_MiracleSeed[];
+extern const u8 gItemIcon_BlackGlasses[];
+extern const u8 gItemIconPalette_BlackTypeEnhancingItem[];
+extern const u8 gItemIcon_BlackBelt[];
+extern const u8 gItemIconPalette_BlackTypeEnhancingItem[];
+extern const u8 gItemIcon_Magnet[];
+extern const u8 gItemIconPalette_Magnet[];
+extern const u8 gItemIcon_MysticWater[];
+extern const u8 gItemIconPalette_MysticWater[];
+extern const u8 gItemIcon_SharpBeak[];
+extern const u8 gItemIconPalette_SharpBeak[];
+extern const u8 gItemIcon_PoisonBarb[];
+extern const u8 gItemIconPalette_PoisonBarb[];
+extern const u8 gItemIcon_NeverMeltIce[];
+extern const u8 gItemIconPalette_NeverMeltIce[];
+extern const u8 gItemIcon_SpellTag[];
+extern const u8 gItemIconPalette_SpellTag[];
+extern const u8 gItemIcon_TwistedSpoon[];
+extern const u8 gItemIconPalette_TwistedSpoon[];
+extern const u8 gItemIcon_Charcoal[];
+extern const u8 gItemIconPalette_Charcoal[];
+extern const u8 gItemIcon_DragonFang[];
+extern const u8 gItemIconPalette_DragonFang[];
+extern const u8 gItemIcon_SilkScarf[];
+extern const u8 gItemIconPalette_SilkScarf[];
+extern const u8 gItemIcon_UpGrade[];
+extern const u8 gItemIconPalette_UpGrade[];
+extern const u8 gItemIcon_ShellBell[];
+extern const u8 gItemIconPalette_Shell[];
+extern const u8 gItemIcon_SeaIncense[];
+extern const u8 gItemIconPalette_SeaIncense[];
+extern const u8 gItemIcon_LaxIncense[];
+extern const u8 gItemIconPalette_LaxIncense[];
+extern const u8 gItemIcon_LuckyPunch[];
+extern const u8 gItemIconPalette_LuckyPunch[];
+extern const u8 gItemIcon_MetalPowder[];
+extern const u8 gItemIconPalette_MetalPowder[];
+extern const u8 gItemIcon_ThickClub[];
+extern const u8 gItemIconPalette_ThickClub[];
+extern const u8 gItemIcon_Stick[];
+extern const u8 gItemIconPalette_Stick[];
+// Contest hold items
+extern const u8 gItemIcon_Scarf[];
+extern const u8 gItemIconPalette_RedScarf[];
+extern const u8 gItemIconPalette_BlueScarf[];
+extern const u8 gItemIconPalette_PinkScarf[];
+extern const u8 gItemIconPalette_GreenScarf[];
+extern const u8 gItemIconPalette_YellowScarf[];
+// Key items
+extern const u8 gItemIcon_MachBike[];
+extern const u8 gItemIconPalette_MachBike[];
+extern const u8 gItemIcon_CoinCase[];
+extern const u8 gItemIconPalette_CoinCase[];
+extern const u8 gItemIcon_Itemfinder[];
+extern const u8 gItemIconPalette_Itemfinder[];
+extern const u8 gItemIcon_OldRod[];
+extern const u8 gItemIconPalette_OldRod[];
+extern const u8 gItemIcon_GoodRod[];
+extern const u8 gItemIconPalette_GoodRod[];
+extern const u8 gItemIcon_SuperRod[];
+extern const u8 gItemIconPalette_SuperRod[];
+extern const u8 gItemIcon_SSTicket[];
+extern const u8 gItemIconPalette_SSTicket[];
+extern const u8 gItemIcon_ContestPass[];
+extern const u8 gItemIconPalette_ContestPass[];
+extern const u8 gItemIcon_WailmerPail[];
+extern const u8 gItemIconPalette_WailmerPail[];
+extern const u8 gItemIcon_DevonGoods[];
+extern const u8 gItemIconPalette_DevonGoods[];
+extern const u8 gItemIcon_SootSack[];
+extern const u8 gItemIconPalette_SootSack[];
+extern const u8 gItemIcon_BasementKey[];
+extern const u8 gItemIconPalette_OldKey[];
+extern const u8 gItemIcon_AcroBike[];
+extern const u8 gItemIconPalette_AcroBike[];
+extern const u8 gItemIcon_PokeblockCase[];
+extern const u8 gItemIconPalette_PokeblockCase[];
+extern const u8 gItemIcon_Letter[];
+extern const u8 gItemIcon_EonTicket[];
+extern const u8 gItemIconPalette_EonTicket[];
+extern const u8 gItemIcon_Orb[];
+extern const u8 gItemIconPalette_RedOrb[];
+extern const u8 gItemIconPalette_BlueOrb[];
+extern const u8 gItemIcon_Scanner[];
+extern const u8 gItemIconPalette_Scanner[];
+extern const u8 gItemIcon_GoGoggles[];
+extern const u8 gItemIconPalette_GoGoggles[];
+extern const u8 gItemIcon_Meteorite[];
+extern const u8 gItemIconPalette_Meteorite[];
+extern const u8 gItemIcon_Room1Key[];
+extern const u8 gItemIconPalette_Key[];
+extern const u8 gItemIcon_Room2Key[];
+extern const u8 gItemIcon_Room4Key[];
+extern const u8 gItemIcon_Room6Key[];
+extern const u8 gItemIcon_StorageKey[];
+extern const u8 gItemIcon_RootFossil[];
+extern const u8 gItemIconPalette_HoennFossil[];
+extern const u8 gItemIcon_ClawFossil[];
+extern const u8 gItemIcon_DevonScope[];
+extern const u8 gItemIconPalette_DevonScope[];
+// TMs/HMs
+extern const u8 gItemIcon_TM[];
+extern const u8 gItemIconPalette_FightingTMHM[];
+extern const u8 gItemIconPalette_DragonTMHM[];
+extern const u8 gItemIconPalette_WaterTMHM[];
+extern const u8 gItemIconPalette_PsychicTMHM[];
+extern const u8 gItemIconPalette_NormalTMHM[];
+extern const u8 gItemIconPalette_PoisonTMHM[];
+extern const u8 gItemIconPalette_IceTMHM[];
+extern const u8 gItemIconPalette_GrassTMHM[];
+extern const u8 gItemIconPalette_FireTMHM[];
+extern const u8 gItemIconPalette_DarkTMHM[];
+extern const u8 gItemIconPalette_SteelTMHM[];
+extern const u8 gItemIconPalette_ElectricTMHM[];
+extern const u8 gItemIconPalette_GroundTMHM[];
+extern const u8 gItemIconPalette_GhostTMHM[];
+extern const u8 gItemIconPalette_RockTMHM[];
+extern const u8 gItemIconPalette_FlyingTMHM[];
+extern const u8 gItemIcon_HM[];
+// FireRed/LeafGreen key items
+extern const u8 gItemIcon_OaksParcel[];
+extern const u8 gItemIconPalette_OaksParcel[];
+extern const u8 gItemIcon_PokeFlute[];
+extern const u8 gItemIconPalette_PokeFlute[];
+extern const u8 gItemIcon_SecretKey[];
+extern const u8 gItemIconPalette_SecretKey[];
+extern const u8 gItemIcon_BikeVoucher[];
+extern const u8 gItemIconPalette_BikeVoucher[];
+extern const u8 gItemIcon_GoldTeeth[];
+extern const u8 gItemIconPalette_GoldTeeth[];
+extern const u8 gItemIcon_OldAmber[];
+extern const u8 gItemIconPalette_OldAmber[];
+extern const u8 gItemIcon_CardKey[];
+extern const u8 gItemIconPalette_CardKey[];
+extern const u8 gItemIcon_LiftKey[];
+extern const u8 gItemIconPalette_Key[];
+extern const u8 gItemIcon_HelixFossil[];
+extern const u8 gItemIconPalette_KantoFossil[];
+extern const u8 gItemIcon_DomeFossil[];
+extern const u8 gItemIcon_SilphScope[];
+extern const u8 gItemIconPalette_SilphScope[];
+extern const u8 gItemIcon_Bicycle[];
+extern const u8 gItemIconPalette_Bicycle[];
+extern const u8 gItemIcon_TownMap[];
+extern const u8 gItemIconPalette_TownMap[];
+extern const u8 gItemIcon_VSSeeker[];
+extern const u8 gItemIconPalette_VSSeeker[];
+extern const u8 gItemIcon_FameChecker[];
+extern const u8 gItemIconPalette_FameChecker[];
+extern const u8 gItemIcon_TMCase[];
+extern const u8 gItemIconPalette_TMCase[];
+extern const u8 gItemIcon_BerryPouch[];
+extern const u8 gItemIconPalette_BerryPouch[];
+extern const u8 gItemIcon_TeachyTV[];
+extern const u8 gItemIconPalette_TeachyTV[];
+extern const u8 gItemIcon_TriPass[];
+extern const u8 gItemIconPalette_TriPass[];
+extern const u8 gItemIcon_RainbowPass[];
+extern const u8 gItemIconPalette_RainbowPass[];
+extern const u8 gItemIcon_Tea[];
+extern const u8 gItemIconPalette_Tea[];
+extern const u8 gItemIcon_MysticTicket[];
+extern const u8 gItemIconPalette_MysticTicket[];
+extern const u8 gItemIcon_AuroraTicket[];
+extern const u8 gItemIconPalette_AuroraTicket[];
+extern const u8 gItemIcon_PowderJar[];
+extern const u8 gItemIconPalette_PowderJar[];
+extern const u8 gItemIcon_Gem[];
+extern const u8 gItemIconPalette_Ruby[];
+extern const u8 gItemIconPalette_Sapphire[];
+// Emerald-only key items
+extern const u8 gItemIcon_MagmaEmblem[];
+extern const u8 gItemIconPalette_MagmaEmblem[];
+extern const u8 gItemIcon_OldSeaMap[];
+extern const u8 gItemIconPalette_OldSeaMap[];
+
+extern const u8 gItemIcon_ReturnToFieldArrow[];
+extern const u8 gItemIconPalette_ReturnToFieldArrow[];
+
//menu graphics
extern const u16 gFireRedMenuElements1_Pal[16];
extern const u16 gFireRedMenuElements2_Pal[16];
diff --git a/include/item.h b/include/item.h
index 33d434f78..881d3a3d4 100644
--- a/include/item.h
+++ b/include/item.h
@@ -1,11 +1,32 @@
-#ifndef ITEM_H
-#define ITEM_H
+#ifndef GUARD_ITEM_H
+#define GUARD_ITEM_H
+
+// These constants are used in gItems
+enum
+{
+ POCKET_NONE,
+ POCKET_ITEMS,
+ POCKET_POKE_BALLS,
+ POCKET_TM_HM,
+ POCKET_BERRIES,
+ POCKET_KEY_ITEMS,
+};
+
+enum
+{
+ ITEMS_POCKET,
+ BALLS_POCKET,
+ TMHM_POCKET,
+ BERRIES_POCKET,
+ KEYITEMS_POCKET,
+ POCKETS_COUNT
+};
typedef void (*ItemUseFunc)(u8);
struct Item
{
- u8 name[14];
+ u8 name[ITEM_NAME_LENGTH];
u16 itemId;
u16 price;
u8 holdEffect;
@@ -29,28 +50,41 @@ struct BagPocket
extern struct BagPocket gBagPockets[];
-void GetBerryCountString(u8* dst, const u8* berryName, u32 quantity);
-void CopyItemName(u16 itemId, u8 *string);
-void CopyItemNameHandlePlural(u16 itemId, u8 *string, u32 quantity);
+void ApplyNewEncryptionKeyToBagItems(u32 newKey);
+void ApplyNewEncryptionKeyToBagItems_(u32 newKey);
+void SetBagItemsPointers(void);
+void CopyItemName(u16 itemId, u8 *dst);
+void CopyItemNameHandlePlural(u16 itemId, u8 *dst, u32 quantity);
+void GetBerryCountString(u8 *dst, const u8 *berryName, u32 quantity);
bool8 IsBagPocketNonEmpty(u8 pocket);
bool8 CheckBagHasItem(u16 itemId, u16 count);
+bool8 HasAtLeastOneBerry(void);
bool8 CheckBagHasSpace(u16 itemId, u16 count);
bool8 AddBagItem(u16 itemId, u16 count);
bool8 RemoveBagItem(u16 itemId, u16 count);
u8 GetPocketByItemId(u16 itemId);
-void ClearItemSlots(struct ItemSlot *itemSlots, u8 b);
+void ClearItemSlots(struct ItemSlot *itemSlots, u8 itemCount);
u8 CountUsedPCItemSlots(void);
bool8 CheckPCHasItem(u16 itemId, u16 count);
bool8 AddPCItem(u16 itemId, u16 count);
void RemovePCItem(u8 index, u16 count);
+void CompactPCItems(void);
void SwapRegisteredBike(void);
-const struct Item *ItemId_GetItem(u16 itemId);
+u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 pocketPos);
+u16 BagGetQuantityByPocketPosition(u8 pocketId, u16 pocketPos);
+void CompactItemsInBagPocket(struct BagPocket *bagPocket);
+void SortBerriesOrTMHMs(struct BagPocket *bagPocket);
+void MoveItemSlotInList(struct ItemSlot* itemSlots_, u32 from, u32 to_);
+void ClearBag(void);
+u16 CountTotalItemQuantityInBag(u16 itemId);
+bool8 AddPyramidBagItem(u16 itemId, u16 count);
+bool8 RemovePyramidBagItem(u16 itemId, u16 count);
+const u8 *ItemId_GetName(u16 itemId);
u16 ItemId_GetId(u16 itemId);
u16 ItemId_GetPrice(u16 itemId);
u8 ItemId_GetHoldEffect(u16 itemId);
u8 ItemId_GetHoldEffectParam(u16 itemId);
const u8 *ItemId_GetDescription(u16 itemId);
-bool32 ItemId_CopyDescription(u8 *a, u32 itemId, u32 c);
u8 ItemId_GetImportance(u16 itemId);
u8 ItemId_GetUnknownValue(u16 itemId);
u8 ItemId_GetPocket(u16 itemId);
@@ -59,14 +93,5 @@ ItemUseFunc ItemId_GetFieldFunc(u16 itemId);
u8 ItemId_GetBattleUsage(u16 itemId);
ItemUseFunc ItemId_GetBattleFunc(u16 itemId);
u8 ItemId_GetSecondaryId(u16 itemId);
-u16 itemid_get_market_price(u16 itemId);
-u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 pocketPos);
-void sub_80D6FB4(struct BagPocket*);
-void sub_80D6F64(struct BagPocket*);
-void sub_80D702C(struct ItemSlot*, s16, u16);
-u8 sub_80D6CE4();
-bool8 itemid_is_unique(u16 itemId);
-void sub_80D6E48(u8, u16);
-void sub_80D6E84(void);
-#endif // ITEM_H
+#endif // GUARD_ITEM_H
diff --git a/include/item_menu.h b/include/item_menu.h
index 68393c9ee..40c015a8e 100644
--- a/include/item_menu.h
+++ b/include/item_menu.h
@@ -55,7 +55,7 @@ void sub_81AAC14(void);
void sub_81AAC50(void);
void sub_81AAC70(void);
void bag_menu_mail_related(void);
-
void CB2_BagMenuFromStartMenu(void);
+u8 sub_81ABB2C(u8 pocketId);
#endif //GUARD_item_menu_H
diff --git a/include/item_use.h b/include/item_use.h
index beee6b8d0..7874f7ee9 100644
--- a/include/item_use.h
+++ b/include/item_use.h
@@ -21,11 +21,13 @@ void DisplayItemRespondingMessageAndExitItemfinder(u8);
void RotatePlayerAndExitItemfinder(u8);
void ItemUseOutOfBattle_PokeblockCase(u8);
void ItemUseOutOfBattle_CoinCase(u8);
+void ItemUseOutOfBattle_PowderJar(u8);
void ItemUseOutOfBattle_SSTicket(u8);
void sub_80C9D00(u8);
void ItemUseOutOfBattle_WailmerPail(u8);
void sub_80C9D74(u8);
void ItemUseOutOfBattle_Medicine(u8);
+void ItemUseOutOfBattle_ReduceEV(u8);
void ItemUseOutOfBattle_SacredAsh(u8);
void ItemUseOutOfBattle_PPRecovery(u8);
void ItemUseOutOfBattle_PPUp(u8);
diff --git a/include/load_save.h b/include/load_save.h
index 460cdf6f3..0868316c8 100644
--- a/include/load_save.h
+++ b/include/load_save.h
@@ -1,27 +1,35 @@
#ifndef GUARD_LOAD_SAVE_H
#define GUARD_LOAD_SAVE_H
-extern bool32 gFlashMemoryPresent;
+extern struct SaveBlock1 gSaveblock1;
extern struct SaveBlock2 gSaveblock2;
extern struct PokemonStorage gPokemonStorage;
+extern bool32 gFlashMemoryPresent;
+extern struct SaveBlock1 *gSaveBlock1Ptr;
+extern struct SaveBlock2 *gSaveBlock2Ptr;
+extern struct PokemonStorage *gPokemonStoragePtr;
+
+void CheckForFlashMemory(void);
void ClearSav2(void);
void ClearSav1(void);
-void CheckForFlashMemory(void);
+void SetSaveBlocksPointers(u16 offset);
void MoveSaveBlocks_ResetHeap(void);
-bool32 GetSecretBase2Field_9(void);
+u32 GetSecretBase2Field_9(void);
void ClearSecretBase2Field_9(void);
-void SetSecretBase2Field_9(void);
-void SetSecretBase2Field_9_AndHideBG(void);
-void ClearSecretBase2Field_9_2(void);
+void sub_8076D48(void);
+void sub_8076D5C(void);
+void sav2_gender2_inplace_and_xFE(void);
void SavePlayerParty(void);
void LoadPlayerParty(void);
+void SaveMapObjects(void);
+void LoadMapObjects(void);
void SaveSerializedGame(void);
void LoadSerializedGame(void);
void LoadPlayerBag(void);
void SavePlayerBag(void);
-void SetSaveBlocksPointers(u16);
-void sub_8076D5C(void);
-void sav2_gender2_inplace_and_xFE(void);
+void ApplyNewEncryptionKeyToHword(u16 *hWord, u32 newKey);
+void ApplyNewEncryptionKeyToWord(u32 *word, u32 newKey);
+void ApplyNewEncryptionKeyToAllEncryptedData(u32 encryptionKey);
#endif // GUARD_LOAD_SAVE_H
diff --git a/include/mauville_old_man.h b/include/mauville_old_man.h
index aefc76083..696f12cc7 100644
--- a/include/mauville_old_man.h
+++ b/include/mauville_old_man.h
@@ -2,7 +2,18 @@
#ifndef GUARD_MAUVILLE_OLD_MAN_H
#define GUARD_MAUVILLE_OLD_MAN_H
+enum MauvilleOldManType
+{
+ MAUVILLE_MAN_BARD,
+ MAUVILLE_MAN_HIPSTER,
+ MAUVILLE_MAN_TRADER,
+ MAUVILLE_MAN_STORYTELLER,
+ MAUVILLE_MAN_GIDDY
+};
+
void SetMauvilleOldMan(void);
-u8 sub_81201C8(void);
+u8 GetCurrentMauvilleOldMan(void);
+extern struct BardSong gBardSong;
+void ScrSpecial_SetMauvilleOldManMapObjGfx(void);
#endif // GUARD_MAUVILLE_OLD_MAN_H
diff --git a/include/overworld.h b/include/overworld.h
index cd0f4e60f..59d4d6a30 100644
--- a/include/overworld.h
+++ b/include/overworld.h
@@ -44,8 +44,8 @@ void ApplyCurrentWarp(void);
void set_warp2_warp3_to_neg_1(void);
void SetWarpData(struct WarpData *warp, s8 mapGroup, s8 mapNum, s8 warpId, s8 x, s8 y);
bool32 warp_data_is_not_neg_1(struct WarpData *warp);
-const struct MapHeader *Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
-const struct MapHeader *warp1_get_mapheader(void);
+struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum);
+struct MapHeader const *const warp1_get_mapheader(void);
void set_current_map_header_from_sav1_save_old_name(void);
void LoadSaveblockMapHeader(void);
void update_camera_pos_from_warpid(void);
diff --git a/include/palette.h b/include/palette.h
index 41cef4048..a1259d327 100644
--- a/include/palette.h
+++ b/include/palette.h
@@ -1,8 +1,6 @@
#ifndef GUARD_PALETTE_H
#define GUARD_PALETTE_H
-#include "global.h"
-
#define gPaletteFade_selectedPalettes (gPaletteFade.multipurpose1) // normal and fast fade
#define gPaletteFade_blendCnt (gPaletteFade.multipurpose1) // hardware fade
#define gPaletteFade_delay (gPaletteFade.multipurpose2) // normal and hardware fade
diff --git a/include/pokenav.h b/include/pokenav.h
index fabe211ea..42affc938 100644
--- a/include/pokenav.h
+++ b/include/pokenav.h
@@ -20,6 +20,7 @@ void sub_81D1E90(struct PlayerPCItemPageStruct *);
void sub_81D1EC0(void);
void sub_81D1D04(u8);
bool8 sub_81D1C44(u8);
+void sub_81D5FB4(u16*);
#endif //GUARD_POKENAV_H
diff --git a/include/script_menu.h b/include/script_menu.h
index 717eda041..0555d0f78 100644
--- a/include/script_menu.h
+++ b/include/script_menu.h
@@ -9,5 +9,8 @@ bool8 ScriptMenu_YesNo(u8 var1, u8 var2);
bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, u8 a4, u8 columnCount);
bool8 ScriptMenu_ShowPokemonPic(u16 var1, u8 var2, u8 var3);
bool8 (*ScriptMenu_GetPicboxWaitFunc(void))(void);
+u8 convert_pixel_width_to_tile_width(s32);
+u8 CreateWindowFromRect(u8, u8, u8, u8);
+void sub_80E2A78(u8);
#endif //GUARD_SCRIPT_MENU_H
diff --git a/include/secret_base.h b/include/secret_base.h
index b2502889c..eef48db31 100644
--- a/include/secret_base.h
+++ b/include/secret_base.h
@@ -10,5 +10,8 @@ void sub_80E9578(void);
void sub_80E980C(void);
u8 *GetSecretBaseMapName(u8 *dest);
const u8 *GetSecretBaseTrainerLoseText(void);
+void sub_80E8EE0(struct MapEvents const *events);
+void sub_80E9238(u8 flagIn);
+bool8 CurrentMapIsSecretBase(void);
#endif //GUARD_SECRET_BASE_H
diff --git a/include/strings.h b/include/strings.h
index 7a96dc036..e5459c320 100644
--- a/include/strings.h
+++ b/include/strings.h
@@ -74,6 +74,10 @@ extern const u8 gText_DecorationWillBeDiscarded[];
extern const u8 gText_CantThrowAwayInUse[];
extern const u8 gText_DecorationThrownAway[];
+extern const u8 gText_PokeBalls[];
+extern const u8 gText_Berries[];
+extern const u8 gText_Berry[];
+
extern const u8 gText_Desk[];
extern const u8 gText_Chair[];
extern const u8 gText_Plant[];
@@ -336,7 +340,7 @@ extern const u8 gText_Var1DotVar2[];
extern const u8 gText_ThreeMarks[];
extern const u8 gText_FirmSlash[];
-//item menu screen text
+// item menu screen text
extern const u8 gText_CloseBag[];
extern const u8 gText_ClearTo11Var1Clear5Var2[];
extern const u8 gText_UnkF908Var1Clear7Var2[];
@@ -362,11 +366,11 @@ extern const u8 gText_DepositedVar2Var1s[];
extern const u8 gText_NoRoomForItems[];
extern const u8 gText_ThreeDashes[];
-//party menu text
+// party menu text
extern const u8 gText_PkmnHPRestoredByVar2[];
extern const u8 gText_CantBeUsedOnPkmn[];
-//birch dex rating text
+// birch dex rating text
extern const u8 gBirchDexRatingText_LessThan10[];
extern const u8 gBirchDexRatingText_LessThan20[];
extern const u8 gBirchDexRatingText_LessThan30[];
@@ -389,7 +393,7 @@ extern const u8 gBirchDexRatingText_LessThan190[];
extern const u8 gBirchDexRatingText_LessThan200[];
extern const u8 gBirchDexRatingText_DexCompleted[];
-//player pc text
+// player pc text
extern const u8 gText_WhatWouldYouLike[];
extern const u8 gText_NoMailHere[];
@@ -431,5 +435,15 @@ extern const u8 gText_MoveVar1Where[];
extern const u8 gText_ColorLightShadowDarkGrey[];
extern const u8 gText_ColorBlue[];
+extern const u8 gText_Friend[];
+extern const u8 gText_Tristan[];
+extern const u8 gText_Philip[];
+extern const u8 gText_Dennis[];
+extern const u8 gText_Roberto[];
+extern const u8 gText_FiveMarks[];
+
+extern const u8 gText_TotalRecordWLD[];
+extern const u8 gText_PlayersBattleResults[];
+extern const u8 gText_WinLoseDraw[];
#endif //GUARD_STRINGS_H
diff --git a/include/trader.h b/include/trader.h
index 71fd1f7c2..c07ea81bd 100644
--- a/include/trader.h
+++ b/include/trader.h
@@ -7,5 +7,7 @@
void sub_8133DA0(u8 taskId);
void sub_8133E1C(u8 taskId);
+void TraderSetup(void);
+void Trader_ResetFlag(void);
#endif //GUARD_TRADER_H
diff --git a/include/trainer_card.h b/include/trainer_card.h
new file mode 100644
index 000000000..5cb93dba0
--- /dev/null
+++ b/include/trainer_card.h
@@ -0,0 +1,35 @@
+#ifndef GUARD_TRAINER_CARD_H
+#define GUARD_TRAINER_CARD_H
+
+struct TrainerCard
+{
+ /*0x00*/ u8 gender;
+ /*0x01*/ u8 stars;
+ /*0x02*/ bool8 hasPokedex;
+ /*0x03*/ bool8 var_3;
+ /*0x04*/ bool8 var_4;
+ /*0x05*/ u8 var_5;
+ /*0x06*/ u16 firstHallOfFameA;
+ /*0x08*/ u16 firstHallOfFameB;
+ /*0x0A*/ u16 firstHallOfFameC;
+ /*0x0C*/ u16 pokedexSeen;
+ /*0x0E*/ u16 trainerId;
+ /*0x10*/ u16 playTimeHours;
+ /*0x12*/ u16 playTimeMinutes;
+ /*0x14*/ u16 linkBattleWins;
+ /*0x16*/ u16 linkBattleLosses;
+ /*0x18*/ u16 battleTowerWins;
+ /*0x1A*/ u16 battleTowerLosses;
+ /*0x1C*/ u16 contestsWithFriends;
+ /*0x1E*/ u16 pokeblocksWithFriends;
+ /*0x20*/ u16 pokemonTrades;
+ /*0x22*/ u16 var_22;
+ /*0x24*/ u32 money;
+ /*0x28*/ u16 var_28[4];
+ /*0x30*/ u8 playerName[8];
+ /*0x38*/ u8 emeraldAddedUnknownFields[0x64-0x38];
+};
+
+extern struct TrainerCard gTrainerCards[4];
+
+#endif // GUARD_TRAINER_CARD_H
diff --git a/include/tv.h b/include/tv.h
index ea296a327..677bc0986 100644
--- a/include/tv.h
+++ b/include/tv.h
@@ -46,5 +46,6 @@ void TV_PutSecretBaseVisitOnTheAir(void);
bool8 Put3CheersForPokeblocksOnTheAir(const u8 *partnersName, u8 flavor, u8 unused, u8 sheen, u8 language);
void PutBattleUpdateOnTheAir(u8 opponentLinkPlayerId, u16 move, u16 speciesPlayer, u16 speciesOpponent);
void BravoTrainerPokemonProfile_BeforeInterview1(u16 move);
+void UpdateTVScreensOnMap(int, int);
#endif //GUARD_TV_H
diff --git a/ld_script.txt b/ld_script.txt
index b241de263..5cbf62f2d 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -87,7 +87,7 @@ SECTIONS {
src/play_time.o(.text);
src/new_game.o(.text);
src/overworld.o(.text);
- asm/fieldmap.o(.text);
+ src/fieldmap.o(.text);
src/metatile_behavior.o(.text);
src/field_camera.o(.text);
src/field_door.o(.text);
@@ -137,7 +137,6 @@ SECTIONS {
src/item_menu_icons.o(.text);
asm/battle_anim_80D51AC.o(.text);
src/item.o(.text);
- asm/item.o(.text);
src/contest.o(.text);
asm/contest.o(.text);
asm/shop.o(.text);
@@ -163,7 +162,7 @@ SECTIONS {
src/bike.o(.text);
asm/easy_chat.o(.text);
src/mon_markings.o(.text);
- asm/mauville_old_man.o(.text);
+ src/mauville_old_man.o(.text);
src/mail.o(.text);
asm/menu_helpers.o(.text);
src/dewford_trend.o(.text);
@@ -174,7 +173,7 @@ SECTIONS {
asm/slot_machine.o(.text);
asm/contest_painting.o(.text);
src/battle_ai_script_commands.o(.text);
- asm/trader.o(.text);
+ src/trader.o(.text);
src/starter_choose.o(.text);
src/wallclock.o(.text);
src/rom6.o(.text);
@@ -185,7 +184,7 @@ SECTIONS {
src/birch_pc.o(.text);
src/hof_pc.o(.text);
asm/field_specials.o(.text);
- asm/battle_records.o(.text);
+ src/battle_records.o(.text);
asm/pokedex_area_screen.o(.text);
src/evolution_scene.o(.text);
asm/roulette.o(.text);
@@ -397,7 +396,7 @@ SECTIONS {
src/overworld.o(.rodata);
data/tilesets.o(.rodata);
data/maps.o(.rodata);
- data/fieldmap.o(.rodata);
+ src/fieldmap.o(.rodata);
src/metatile_behavior.o(.rodata);
src/field_door.o(.rodata);
data/field_player_avatar.o(.rodata);
@@ -435,7 +434,6 @@ SECTIONS {
data/fldeff_cut.o(.rodata);
src/map_name_popup.o(.rodata);
src/item_menu_icons.o(.rodata);
- data/item_menu_icons.o(.rodata);
data/contest.o(.rodata);
data/shop.o(.rodata);
src/berry.o(.rodata);
@@ -457,7 +455,7 @@ SECTIONS {
src/bike.o(.rodata);
data/easy_chat.o(.rodata);
src/mon_markings.o(.rodata);
- data/mauville_old_man.o(.rodata);
+ src/mauville_old_man.o(.rodata);
src/mail.o(.rodata);
data/menu_helpers.o(.rodata);
src/heal_location.o(.rodata);
@@ -467,14 +465,14 @@ SECTIONS {
data/slot_machine.o(.rodata);
data/contest_painting.o(.rodata);
src/battle_ai_script_commands.o(.rodata);
- data/trader.o(.rodata);
+ src/trader.o(.rodata);
data/starter_choose.o(.rodata);
src/wallclock.o(.rodata);
src/pokeblock.o(.rodata);
src/fldeff_flash.o(.rodata);
src/time_events.o(.rodata);
data/field_specials.o(.rodata);
- data/battle_records.o(.rodata);
+ src/battle_records.o(.rodata);
data/pokedex_area_screen.o(.rodata);
src/evolution_scene.o(.rodata);
data/roulette.o(.rodata);
@@ -525,7 +523,6 @@ SECTIONS {
src/item_menu.o(.rodata);
data/menu_indicators.o(.rodata);
src/save_location.o(.rodata);
- data/item_icon.o(.rodata);
src/item_icon.o(.rodata);
data/party_menu.o(.rodata);
data/battle_tent.o(.rodata);
diff --git a/src/bard_music.c b/src/bard_music.c
index 6fb1496e5..6c2578071 100644
--- a/src/bard_music.c
+++ b/src/bard_music.c
@@ -2,6 +2,7 @@
// Includes
#include "global.h"
#include "bard_music.h"
+#include "constants/easy_chat.h"
#include "easy_chat.h"
#include "data/bard_music/bard_sounds.h"
diff --git a/src/battle_records.c b/src/battle_records.c
new file mode 100644
index 000000000..a148f998f
--- /dev/null
+++ b/src/battle_records.c
@@ -0,0 +1,510 @@
+#include "global.h"
+#include "battle_records.h"
+#include "bg.h"
+#include "window.h"
+#include "link.h"
+#include "battle.h"
+#include "overworld.h"
+#include "text.h"
+#include "text_window.h"
+#include "strings.h"
+#include "string_util.h"
+#include "trainer_card.h"
+#include "menu.h"
+#include "menu_helpers.h"
+#include "palette.h"
+#include "main.h"
+#include "scanline_effect.h"
+#include "international_string_util.h"
+#include "sound.h"
+#include "constants/songs.h"
+#include "malloc.h"
+#include "gpu_regs.h"
+#include "constants/game_stat.h"
+
+extern void PrintOnTrainerHillRecordsWindow(void); // pokenav.s
+
+// this file's functions
+static void Task_CloseTrainerHillRecordsOnButton(u8 taskId);
+static void Task_BeginPaletteFade(u8 taskId);
+static void Task_ExitTrainerHillRecords(u8 taskId);
+static void RemoveTrainerHillRecordsWindow(u8 windowId);
+static void CB2_ShowTrainerHillRecords(void);
+
+// EWRAM variables
+EWRAM_DATA u8 gRecordsWindowId = 0;
+EWRAM_DATA static u8 *sTilemapBuffer = NULL;
+
+// const rom data
+static const u32 sTrainerHillWindowTileset[] = INCBIN_U32("graphics/unknown/unknown_5B3484.4bpp");
+static const u16 sTrainerHillWindowPalette[] = INCBIN_U16("graphics/unknown/unknown_5B3484.gbapal");
+static const u32 sTrainerHillWindowTilemap[] = INCBIN_U32("graphics/unknown/unknown_5B3564.bin");
+
+static const struct BgTemplate sTrainerHillRecordsBgTemplates[] =
+{
+ {
+ .bg = 0,
+ .charBaseIndex = 0,
+ .mapBaseIndex = 31,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 0,
+ .baseTile = 0
+ },
+ {
+ .bg = 3,
+ .charBaseIndex = 1,
+ .mapBaseIndex = 30,
+ .screenSize = 0,
+ .paletteMode = 0,
+ .priority = 3,
+ .baseTile = 0
+ }
+};
+
+static const struct WindowTemplate sTrainerHillRecordsWindowTemplates[] =
+{
+ {0x0, 0x2, 0x1, 0x1A, 0x12, 0xF, 0x14},
+ DUMMY_WIN_TEMPLATE
+};
+
+static const struct WindowTemplate sLinkBattleRecordsWindow = {0x0, 0x2, 0x1, 0x1A, 0x11, 0xF, 0x1};
+
+static const u8 sText_DashesNoPlayer[] = _("-------");
+static const u8 sText_DashesNoScore[] = _("----");
+
+// code
+static void ClearLinkBattleRecord(struct LinkBattleRecord *record)
+{
+ CpuFill16(0, record, sizeof(struct LinkBattleRecord));
+ record->name[0] = EOS;
+ record->trainerId = 0;
+ record->wins = 0;
+ record->losses = 0;
+ record->draws = 0;
+}
+
+static void ClearLinkBattleRecords(struct LinkBattleRecord *records)
+{
+ s32 i;
+ for (i = 0; i < LINK_B_RECORDS_COUNT; i++)
+ {
+ ClearLinkBattleRecord(records + i);
+ }
+ SetGameStat(GAME_STAT_LINK_BATTLE_WINS, 0);
+ SetGameStat(GAME_STAT_LINK_BATTLE_LOSSES, 0);
+ SetGameStat(GAME_STAT_LINK_BATTLE_DRAWS, 0);
+}
+
+static s32 GetLinkBattleRecordTotalBattles(struct LinkBattleRecord *record)
+{
+ return record->wins + record->losses + record->draws;
+}
+
+static s32 FindLinkBattleRecord(struct LinkBattleRecord *records, const u8 *name, u16 trainerId)
+{
+ s32 i;
+
+ for (i = 0; i < LINK_B_RECORDS_COUNT; i++)
+ {
+ if (!StringCompareN(records[i].name, name, OT_NAME_LENGTH) && records[i].trainerId == trainerId)
+ return i;
+ }
+
+ return LINK_B_RECORDS_COUNT;
+}
+
+static void SortLinkBattleRecords(struct LinkBattleRecords *records)
+{
+ s32 i, j;
+
+ for (i = LINK_B_RECORDS_COUNT - 1; i > 0; i--)
+ {
+ for (j = i - 1; j >= 0; j--)
+ {
+ s32 totalBattlesI = GetLinkBattleRecordTotalBattles(&records->entries[i]);
+ s32 totalBattlesJ = GetLinkBattleRecordTotalBattles(&records->entries[j]);
+
+ if (totalBattlesI > totalBattlesJ)
+ {
+ struct LinkBattleRecord temp1;
+ u8 temp2;
+
+ temp1 = records->entries[i];
+ records->entries[i] = records->entries[j];
+ records->entries[j] = temp1;
+
+ temp2 = records->languages[i];
+ records->languages[i] = records->languages[j];
+ records->languages[j] = temp2;
+ }
+ }
+ }
+}
+
+static void UpdateLinkBattleRecord(struct LinkBattleRecord *record, s32 battleOutcome)
+{
+ switch (battleOutcome)
+ {
+ case B_OUTCOME_WON:
+ record->wins++;
+ if (record->wins > 9999)
+ record->wins = 9999;
+ break;
+ case B_OUTCOME_LOST:
+ record->losses++;
+ if (record->losses > 9999)
+ record->losses = 9999;
+ break;
+ case B_OUTCOME_DREW:
+ record->draws++;
+ if (record->draws > 9999)
+ record->draws = 9999;
+ break;
+ }
+}
+
+static void UpdateLinkBattleGameStats(s32 battleOutcome)
+{
+ u8 stat;
+
+ switch (battleOutcome)
+ {
+ case B_OUTCOME_WON:
+ stat = GAME_STAT_LINK_BATTLE_WINS;
+ break;
+ case B_OUTCOME_LOST:
+ stat = GAME_STAT_LINK_BATTLE_LOSSES;
+ break;
+ case B_OUTCOME_DREW:
+ stat = GAME_STAT_LINK_BATTLE_DRAWS;
+ break;
+ default:
+ return;
+ }
+
+ if (GetGameStat(stat) < 9999)
+ IncrementGameStat(stat);
+}
+
+static void UpdateLinkBattleRecords(struct LinkBattleRecords *records, const u8 *name, u16 trainerId, s32 battleOutcome, u8 battlerId)
+{
+ s32 index;
+
+ UpdateLinkBattleGameStats(battleOutcome);
+ SortLinkBattleRecords(records);
+ index = FindLinkBattleRecord(records->entries, name, trainerId);
+ if (index == LINK_B_RECORDS_COUNT)
+ {
+ index = LINK_B_RECORDS_COUNT - 1;
+ ClearLinkBattleRecord(&records->entries[index]);
+ StringCopyN(records->entries[index].name, name, OT_NAME_LENGTH);
+ records->entries[index].trainerId = trainerId;
+ records->languages[index] = gLinkPlayers[battlerId].language;
+ }
+ UpdateLinkBattleRecord(&records->entries[index], battleOutcome);
+ SortLinkBattleRecords(records);
+}
+
+void ClearPlayerLinkBattleRecords(void)
+{
+ ClearLinkBattleRecords(gSaveBlock1Ptr->linkBattleRecords.entries);
+}
+
+static void IncTrainerCardWins(s32 battlerId)
+{
+ u16 *wins = &gTrainerCards[battlerId].linkBattleWins;
+ (*wins)++;
+ if (*wins > 9999)
+ *wins = 9999;
+}
+
+static void IncTrainerCardLosses(s32 battlerId)
+{
+ u16 *losses = &gTrainerCards[battlerId].linkBattleLosses;
+ (*losses)++;
+ if (*losses > 9999)
+ *losses = 9999;
+}
+
+static void UpdateTrainerCardWinsLosses(s32 battlerId)
+{
+ switch (gBattleOutcome)
+ {
+ case B_OUTCOME_WON:
+ IncTrainerCardWins(BATTLE_OPPOSITE(battlerId));
+ IncTrainerCardLosses(battlerId);
+ break;
+ case B_OUTCOME_LOST:
+ IncTrainerCardLosses(BATTLE_OPPOSITE(battlerId));
+ IncTrainerCardWins(battlerId);
+ break;
+ }
+}
+
+void UpdatePlayerLinkBattleRecords(s32 battlerId)
+{
+ if (InUnionRoom() != TRUE)
+ {
+ UpdateTrainerCardWinsLosses(battlerId);
+ UpdateLinkBattleRecords(
+ &gSaveBlock1Ptr->linkBattleRecords,
+ gTrainerCards[battlerId].playerName,
+ gTrainerCards[battlerId].trainerId,
+ gBattleOutcome,
+ battlerId);
+ }
+}
+
+static void PrintLinkBattleWinsLossesDraws(struct LinkBattleRecord *records)
+{
+ s32 x;
+
+ ConvertIntToDecimalStringN(gStringVar1, GetGameStat(GAME_STAT_LINK_BATTLE_WINS), STR_CONV_MODE_LEFT_ALIGN, 4);
+ ConvertIntToDecimalStringN(gStringVar2, GetGameStat(GAME_STAT_LINK_BATTLE_LOSSES), STR_CONV_MODE_LEFT_ALIGN, 4);
+ ConvertIntToDecimalStringN(gStringVar3, GetGameStat(GAME_STAT_LINK_BATTLE_DRAWS), STR_CONV_MODE_LEFT_ALIGN, 4);
+ StringExpandPlaceholders(gStringVar4, gText_TotalRecordWLD);
+
+ x = GetStringCenterAlignXOffset(1, gStringVar4, 0xD0);
+ PrintTextOnWindow(gRecordsWindowId, 1, gStringVar4, x, 0x11, 0, NULL);
+}
+
+static void PrintLinkBattleRecord(struct LinkBattleRecord *record, u8 y, s32 language)
+{
+ if (record->wins == 0 && record->losses == 0 && record->draws == 0)
+ {
+ // empty slot
+ PrintTextOnWindow(gRecordsWindowId, 1, sText_DashesNoPlayer, 8, (y * 8) + 1, 0, NULL);
+ PrintTextOnWindow(gRecordsWindowId, 1, sText_DashesNoScore, 80, (y * 8) + 1, 0, NULL);
+ PrintTextOnWindow(gRecordsWindowId, 1, sText_DashesNoScore, 128, (y * 8) + 1, 0, NULL);
+ PrintTextOnWindow(gRecordsWindowId, 1, sText_DashesNoScore, 176, (y * 8) + 1, 0, NULL);
+ }
+ else
+ {
+ StringFillWithTerminator(gStringVar1, 8);
+ StringCopyN(gStringVar1, record->name, 7);
+ ConvertInternationalString(gStringVar1, language);
+
+ PrintTextOnWindow(gRecordsWindowId, 1, gStringVar1, 8, (y * 8) + 1, 0, NULL);
+
+ ConvertIntToDecimalStringN(gStringVar1, record->wins, STR_CONV_MODE_RIGHT_ALIGN, 4);
+ PrintTextOnWindow(gRecordsWindowId, 1, gStringVar1, 80, (y * 8) + 1, 0, NULL);
+
+ ConvertIntToDecimalStringN(gStringVar1, record->losses, STR_CONV_MODE_RIGHT_ALIGN, 4);
+ PrintTextOnWindow(gRecordsWindowId, 1, gStringVar1, 128, (y * 8) + 1, 0, NULL);
+
+ ConvertIntToDecimalStringN(gStringVar1, record->draws, STR_CONV_MODE_RIGHT_ALIGN, 4);
+ PrintTextOnWindow(gRecordsWindowId, 1, gStringVar1, 176, (y * 8) + 1, 0, NULL);
+ }
+}
+
+void ShowLinkBattleRecords(void)
+{
+ s32 i, x;
+
+ gRecordsWindowId = AddWindow(&sLinkBattleRecordsWindow);
+ NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, FALSE);
+ FillWindowPixelBuffer(gRecordsWindowId, 0x11);
+ StringExpandPlaceholders(gStringVar4, gText_PlayersBattleResults);
+
+ x = GetStringCenterAlignXOffset(1, gStringVar4, 208);
+ PrintTextOnWindow(gRecordsWindowId, 1, gStringVar4, x, 1, 0, NULL);
+ PrintLinkBattleWinsLossesDraws(gSaveBlock1Ptr->linkBattleRecords.entries);
+
+ StringExpandPlaceholders(gStringVar4, gText_WinLoseDraw);
+ PrintTextOnWindow(gRecordsWindowId, 1, gStringVar4, 0, 41, 0, NULL);
+
+ for (i = 0; i < LINK_B_RECORDS_COUNT; i++)
+ {
+ PrintLinkBattleRecord(&gSaveBlock1Ptr->linkBattleRecords.entries[i], 7 + (i * 2), gSaveBlock1Ptr->linkBattleRecords.languages[i]);
+ }
+
+ PutWindowTilemap(gRecordsWindowId);
+ CopyWindowToVram(gRecordsWindowId, 3);
+}
+
+void RemoveRecordsWindow(void)
+{
+ sub_819746C(gRecordsWindowId, FALSE);
+ RemoveWindow(gRecordsWindowId);
+}
+
+static void Task_TrainerHillWaitForPaletteFade(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ gTasks[taskId].func = Task_CloseTrainerHillRecordsOnButton;
+}
+
+static void Task_CloseTrainerHillRecordsOnButton(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId];
+
+ if (gMain.newKeys & A_BUTTON || gMain.newKeys & B_BUTTON)
+ {
+ PlaySE(SE_SELECT);
+ task->func = Task_BeginPaletteFade;
+ }
+}
+
+static void Task_BeginPaletteFade(u8 taskId)
+{
+ BeginNormalPaletteFade(-1, 0, 0, 0x10, 0);
+ gTasks[taskId].func = Task_ExitTrainerHillRecords;
+}
+
+static void Task_ExitTrainerHillRecords(u8 taskId)
+{
+ if (!gPaletteFade.active)
+ {
+ SetMainCallback2(CB2_ReturnToFieldContinueScript);
+ Free(sTilemapBuffer);
+ RemoveTrainerHillRecordsWindow(0);
+ FreeAllWindowBuffers();
+ DestroyTask(taskId);
+ }
+}
+
+static void RemoveTrainerHillRecordsWindow(u8 windowId)
+{
+ FillWindowPixelBuffer(windowId, 0);
+ ClearWindowTilemap(windowId);
+ CopyWindowToVram(windowId, 2);
+ RemoveWindow(windowId);
+}
+
+static void ClearVramOamPlttRegs(void)
+{
+ DmaClearLarge16(3, (void*)(VRAM), VRAM_SIZE, 0x1000);
+ DmaClear32(3, OAM, OAM_SIZE);
+ DmaClear16(3, PLTT, PLTT_SIZE);
+
+ SetGpuReg(REG_OFFSET_DISPCNT, 0);
+ SetGpuReg(REG_OFFSET_BG0CNT, 0);
+ SetGpuReg(REG_OFFSET_BG0HOFS, 0);
+ SetGpuReg(REG_OFFSET_BG0VOFS, 0);
+ SetGpuReg(REG_OFFSET_BG1CNT, 0);
+ SetGpuReg(REG_OFFSET_BG1HOFS, 0);
+ SetGpuReg(REG_OFFSET_BG1VOFS, 0);
+ SetGpuReg(REG_OFFSET_BG2CNT, 0);
+ SetGpuReg(REG_OFFSET_BG2HOFS, 0);
+ SetGpuReg(REG_OFFSET_BG2VOFS, 0);
+ SetGpuReg(REG_OFFSET_BG3CNT, 0);
+ SetGpuReg(REG_OFFSET_BG3HOFS, 0);
+ SetGpuReg(REG_OFFSET_BG3VOFS, 0);
+ SetGpuReg(REG_OFFSET_WIN0H, 0);
+ SetGpuReg(REG_OFFSET_WIN0V, 0);
+ SetGpuReg(REG_OFFSET_WININ, 0);
+ SetGpuReg(REG_OFFSET_WINOUT, 0);
+ SetGpuReg(REG_OFFSET_BLDCNT, 0);
+ SetGpuReg(REG_OFFSET_BLDALPHA, 0);
+ SetGpuReg(REG_OFFSET_BLDY, 0);
+}
+
+static void ClearTasksAndGraphicalStructs(void)
+{
+ ScanlineEffect_Stop();
+ ResetTasks();
+ ResetSpriteData();
+ ResetPaletteFade();
+ FreeAllSpritePalettes();
+}
+
+static void ResetBgCoordinates(void)
+{
+ ChangeBgX(0, 0, 0);
+ ChangeBgY(0, 0, 0);
+ ChangeBgX(1, 0, 0);
+ ChangeBgY(1, 0, 0);
+ ChangeBgX(2, 0, 0);
+ ChangeBgY(2, 0, 0);
+ ChangeBgX(3, 0, 0);
+ ChangeBgY(3, 0, 0);
+}
+
+static void SetDispcntReg(void)
+{
+ SetGpuReg(REG_OFFSET_DISPCNT, DISPCNT_BG0_ON | DISPCNT_BG3_ON | DISPCNT_OBJ_1D_MAP);
+}
+
+static void LoadTrainerHillRecordsWindowGfx(u8 bgId)
+{
+ LoadBgTiles(bgId, sTrainerHillWindowTileset, sizeof(sTrainerHillWindowTileset), 0);
+ CopyToBgTilemapBufferRect(bgId, sTrainerHillWindowTilemap, 0, 0, 0x20, 0x20);
+ LoadPalette(sTrainerHillWindowPalette, 0, 0x20);
+}
+
+static void VblankCB_TrainerHillRecords(void)
+{
+ LoadOam();
+ ProcessSpriteCopyRequests();
+ TransferPlttBuffer();
+}
+
+static void MainCB2_TrainerHillRecords(void)
+{
+ RunTasks();
+ AnimateSprites();
+ BuildOamBuffer();
+ UpdatePaletteFade();
+}
+
+void ShowTrainerHillRecords(void)
+{
+ SetVBlankCallback(NULL);
+ SetMainCallback2(CB2_ShowTrainerHillRecords);
+}
+
+static void CB2_ShowTrainerHillRecords(void)
+{
+ switch (gMain.state)
+ {
+ case 0:
+ SetVBlankCallback(NULL);
+ ClearVramOamPlttRegs();
+ gMain.state++;
+ break;
+ case 1:
+ ClearTasksAndGraphicalStructs();
+ gMain.state++;
+ break;
+ case 2:
+ sTilemapBuffer = AllocZeroed(0x800);
+ ResetBgsAndClearDma3BusyFlags(0);
+ InitBgsFromTemplates(0, sTrainerHillRecordsBgTemplates, ARRAY_COUNT(sTrainerHillRecordsBgTemplates));
+ SetBgTilemapBuffer(3, sTilemapBuffer);
+ ResetBgCoordinates();
+ gMain.state++;
+ break;
+ case 3:
+ LoadTrainerHillRecordsWindowGfx(3);
+ LoadPalette(stdpal_get(0), 0xF0, 0x20);
+ gMain.state++;
+ break;
+ case 4:
+ if (IsDma3ManagerBusyWithBgCopy() != TRUE)
+ {
+ ShowBg(0);
+ ShowBg(3);
+ CopyBgTilemapBufferToVram(3);
+ gMain.state++;
+ }
+ break;
+ case 5:
+ InitWindows(sTrainerHillRecordsWindowTemplates);
+ DeactivateAllTextPrinters();
+ gMain.state++;
+ break;
+ case 6:
+ BeginNormalPaletteFade(-1, 0, 0x10, 0, 0);
+ gMain.state++;
+ break;
+ case 7:
+ SetDispcntReg();
+ SetVBlankCallback(VblankCB_TrainerHillRecords);
+ PrintOnTrainerHillRecordsWindow();
+ CreateTask(Task_TrainerHillWaitForPaletteFade, 8);
+ SetMainCallback2(MainCB2_TrainerHillRecords);
+ gMain.state = 0;
+ break;
+ }
+}
diff --git a/src/berry.c b/src/berry.c
index 74b7090c0..e128eb0ec 100644
--- a/src/berry.c
+++ b/src/berry.c
@@ -1218,7 +1218,7 @@ void FieldObjectInteractionRemoveBerryTree(void)
u8 PlayerHasBerries(void)
{
- return IsBagPocketNonEmpty(BAG_BERRIES);
+ return IsBagPocketNonEmpty(POCKET_BERRIES);
}
void ResetBerryTreeSparkleFlags(void)
diff --git a/src/berry_blender.c b/src/berry_blender.c
index 9e6a0fef7..c3b0cc80d 100644
--- a/src/berry_blender.c
+++ b/src/berry_blender.c
@@ -30,6 +30,7 @@
#include "trig.h"
#include "tv.h"
#include "item_menu.h"
+#include "battle_records.h"
#define BLENDER_SCORE_BEST 0
#define BLENDER_SCORE_GOOD 1
@@ -131,7 +132,6 @@ extern struct MusicPlayerInfo gMPlayInfo_SE2;
extern struct MusicPlayerInfo gMPlayInfo_BGM;
extern u8 gInGameOpponentsNo;
extern u8 gUnknown_020322D5;
-extern u8 gResultsWindowId;
// graphics
extern const u8 gBerryBlenderArrowTiles[];
@@ -2472,7 +2472,7 @@ static void CB2_HandleBlenderEndGame(void)
sub_8081F94(&gSendCmd[0]);
if (sBerryBlenderData->yesNoAnswer == 0)
{
- if (IsBagPocketNonEmpty(BAG_BERRIES) == FALSE) // no berries
+ if (IsBagPocketNonEmpty(POCKET_BERRIES) == FALSE) // no berries
{
sBerryBlenderData->playAgainState = CANT_PLAY_NO_BERRIES;
gSendCmd[1] = 0x9999;
@@ -3485,13 +3485,13 @@ void ShowBerryBlenderRecordWindow(void)
u8 text[32];
winTemplate = sBlenderRecordWindowTemplate;
- gResultsWindowId = AddWindow(&winTemplate);
- NewMenuHelpers_DrawStdWindowFrame(gResultsWindowId, 0);
- FillWindowPixelBuffer(gResultsWindowId, 0x11);
+ gRecordsWindowId = AddWindow(&winTemplate);
+ NewMenuHelpers_DrawStdWindowFrame(gRecordsWindowId, 0);
+ FillWindowPixelBuffer(gRecordsWindowId, 0x11);
xPos = GetStringCenterAlignXOffset(1, gText_BlenderMaxSpeedRecord, 0x90);
- PrintTextOnWindow(gResultsWindowId, 1, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL);
- PrintTextOnWindow(gResultsWindowId, 1, gText_234Players, 4, 0x29, 0, NULL);
+ PrintTextOnWindow(gRecordsWindowId, 1, gText_BlenderMaxSpeedRecord, xPos, 1, 0, NULL);
+ PrintTextOnWindow(gRecordsWindowId, 1, gText_234Players, 4, 0x29, 0, NULL);
for (i = 0, yPos = 0x29; i < BLENDER_SCORES_NO; i++)
{
@@ -3506,11 +3506,11 @@ void ShowBerryBlenderRecordWindow(void)
txtPtr = StringAppend(txtPtr, sText_RPM);
xPos = GetStringRightAlignXOffset(1, text, 0x8C);
- PrintTextOnWindow(gResultsWindowId, 1, text, xPos, yPos + (i * 16), 0, NULL);
+ PrintTextOnWindow(gRecordsWindowId, 1, text, xPos, yPos + (i * 16), 0, NULL);
}
- PutWindowTilemap(gResultsWindowId);
- CopyWindowToVram(gResultsWindowId, 3);
+ PutWindowTilemap(gRecordsWindowId);
+ CopyWindowToVram(gRecordsWindowId, 3);
}
static void sub_8083F3C(u8 taskId)
diff --git a/src/berry_tag_screen.c b/src/berry_tag_screen.c
index 1a0d1bce0..9a6e78c81 100644
--- a/src/berry_tag_screen.c
+++ b/src/berry_tag_screen.c
@@ -517,7 +517,7 @@ static void TryChangeDisplayedBerry(u8 taskId, s8 toMove)
s16 *data = gTasks[taskId].data;
s16 currPocketPosition = gUnknown_0203CE58.scrollPosition[3] + gUnknown_0203CE58.cursorPosition[3];
u32 newPocketPosition = currPocketPosition + toMove;
- if (newPocketPosition < 46 && BagGetItemIdByPocketPosition(BAG_BERRIES, newPocketPosition) != 0)
+ if (newPocketPosition < 46 && BagGetItemIdByPocketPosition(POCKET_BERRIES, newPocketPosition) != 0)
{
if (toMove < 0)
data[1] = 2;
@@ -537,7 +537,7 @@ static void HandleBagCursorPositionChange(s8 toMove)
u16 *cursorPos = &gUnknown_0203CE58.cursorPosition[3];
if (toMove > 0)
{
- if (*cursorPos < 4 || BagGetItemIdByPocketPosition(BAG_BERRIES, *scrollPos + 8) == 0)
+ if (*cursorPos < 4 || BagGetItemIdByPocketPosition(POCKET_BERRIES, *scrollPos + 8) == 0)
*cursorPos += toMove;
else
*scrollPos += toMove;
@@ -550,7 +550,7 @@ static void HandleBagCursorPositionChange(s8 toMove)
*scrollPos += toMove;
}
- sBerryTag->berryId = ItemIdToBerryType(BagGetItemIdByPocketPosition(BAG_BERRIES, *scrollPos + *cursorPos));
+ sBerryTag->berryId = ItemIdToBerryType(BagGetItemIdByPocketPosition(POCKET_BERRIES, *scrollPos + *cursorPos));
}
static void Task_DisplayAnotherBerry(u8 taskId)
diff --git a/src/bg.c b/src/bg.c
index 22861b64d..975c72a94 100644
--- a/src/bg.c
+++ b/src/bg.c
@@ -965,9 +965,9 @@ void CopyBgTilemapBufferToVram(u8 bg)
}
}
-void CopyToBgTilemapBufferRect(u8 bg, void* src, u8 destX, u8 destY, u8 width, u8 height)
+void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height)
{
- void* srcCopy;
+ const void* srcCopy;
u16 destX16;
u16 destY16;
u16 mode;
diff --git a/src/field_camera.c b/src/field_camera.c
index f653e0bf1..95167ee10 100644
--- a/src/field_camera.c
+++ b/src/field_camera.c
@@ -12,6 +12,8 @@
#include "sprite.h"
#include "text.h"
+EWRAM_DATA bool8 gUnusedBikeCameraAheadPanback = FALSE;
+
// Static type declarations
struct FieldCameraUnknownStruct
{
@@ -40,6 +42,10 @@ static IWRAM_DATA s16 gUnknown_03000E2A;
static IWRAM_DATA u8 gUnknown_03000E2C;
static IWRAM_DATA void (*gUnknown_03000E30)(void);
+struct CameraObject gUnknown_03005DD0;
+u16 gUnknown_03005DE8;
+u16 gUnknown_03005DEC;
+
// text
static void move_tilemap_camera_to_upper_left_corner_(struct FieldCameraUnknownStruct *a)
{
diff --git a/src/field_map_obj.c b/src/field_map_obj.c
index a5be62442..81cbe5210 100644
--- a/src/field_map_obj.c
+++ b/src/field_map_obj.c
@@ -1146,7 +1146,7 @@ const struct MapObjectGraphicsInfo *GetFieldObjectGraphicsInfo(u8 graphicsId)
}
if (graphicsId == 0x45)
{
- bard = sub_81201C8();
+ bard = GetCurrentMauvilleOldMan();
return gMauvilleOldManGraphicsInfoPointers[bard];
}
if (graphicsId >= NUM_OBJECT_GRAPHICS_INFO)
diff --git a/src/fieldmap.c b/src/fieldmap.c
new file mode 100644
index 000000000..245c88327
--- /dev/null
+++ b/src/fieldmap.c
@@ -0,0 +1,1034 @@
+#include "global.h"
+#include "overworld.h"
+#include "bg.h"
+#include "battle_frontier_2.h"
+#include "constants/rgb.h"
+#include "fieldmap.h"
+#include "fldeff_80F9BCC.h"
+#include "fldeff_cut.h"
+#include "fldeff_groundshake.h"
+#include "menu.h"
+#include "palette.h"
+#include "pokenav.h"
+#include "script.h"
+#include "secret_base.h"
+#include "tv.h"
+
+struct ConnectionFlags
+{
+ u8 south:1;
+ u8 north:1;
+ u8 west:1;
+ u8 east:1;
+};
+
+EWRAM_DATA static u16 gUnknown_02032318[0x2800] = {0};
+EWRAM_DATA struct MapHeader gMapHeader = {0};
+EWRAM_DATA struct Camera gCamera = {0};
+EWRAM_DATA static struct ConnectionFlags gUnknown_02037340 = {0};
+EWRAM_DATA static u32 sFiller_02037344 = 0; // without this, the next file won't align properly
+
+struct BackupMapData gUnknown_03005DC0;
+
+static const struct ConnectionFlags sDummyConnectionFlags = {0};
+
+struct MapHeader const *const mapconnection_get_mapheader(struct MapConnection *connection)
+{
+ return Overworld_GetMapHeaderByGroupAndId(connection->mapGroup, connection->mapNum);
+}
+
+void not_trainer_hill_battle_pyramid(void)
+{
+ mapheader_copy_mapdata_with_padding(&gMapHeader);
+ sub_80E8EE0(gMapHeader.events);
+ mapheader_run_script_with_tag_x1();
+}
+
+void sub_8087D74(void)
+{
+ mapheader_copy_mapdata_with_padding(&gMapHeader);
+ sub_80E9238(0);
+ sub_80E8EE0(gMapHeader.events);
+ mapdata_from_sav2();
+ mapheader_run_script_with_tag_x1();
+ UpdateTVScreensOnMap(gUnknown_03005DC0.width, gUnknown_03005DC0.height);
+}
+
+void battle_pyramid_map_load_related(u8 a0)
+{
+ CpuFastFill(0x03ff03ff, gUnknown_02032318, sizeof(gUnknown_02032318));
+ sub_81AA078(gUnknown_02032318, a0);
+}
+
+void trainer_hill_map_load_related(void)
+{
+ CpuFastFill(0x03ff03ff, gUnknown_02032318, sizeof(gUnknown_02032318));
+ sub_81D5FB4(gUnknown_02032318);
+}
+
+void mapheader_copy_mapdata_with_padding(struct MapHeader *mapHeader)
+{
+ struct MapData const *mapData;
+ int width;
+ int height;
+ mapData = mapHeader->mapData;
+ CpuFastFill16(0x03ff, gUnknown_02032318, sizeof(gUnknown_02032318));
+ gUnknown_03005DC0.map = gUnknown_02032318;
+ width = mapData->width + 15;
+ gUnknown_03005DC0.width = width;
+ height = mapData->height + 14;
+ gUnknown_03005DC0.height = height;
+ if (width * height <= 0x2800)
+ {
+ map_copy_with_padding(mapData->map, mapData->width, mapData->height);
+ mapheader_copy_mapdata_of_adjacent_maps(mapHeader);
+ }
+}
+
+void map_copy_with_padding(u16 *map, u16 width, u16 height)
+{
+ u16 *dest;
+ int y;
+ dest = gUnknown_03005DC0.map;
+ dest += gUnknown_03005DC0.width * 7 + 7;
+ for (y = 0; y < height; y++)
+ {
+ CpuCopy16(map, dest, width * 2);
+ dest += width + 0xf;
+ map += width;
+ }
+}
+
+void mapheader_copy_mapdata_of_adjacent_maps(struct MapHeader *mapHeader)
+{
+ int count;
+ struct MapConnection *connection;
+ int i;
+
+ if (mapHeader->connections)
+ {
+ count = mapHeader->connections->count;
+ connection = mapHeader->connections->connections;
+
+ gUnknown_02037340 = sDummyConnectionFlags;
+ for (i = 0; i < count; i++, connection++)
+ {
+ struct MapHeader const *cMap = mapconnection_get_mapheader(connection);
+ u32 offset = connection->offset;
+
+ switch (connection->direction)
+ {
+ case CONNECTION_SOUTH:
+ fillSouthConnection(mapHeader, cMap, offset);
+ gUnknown_02037340.south = 1;
+ break;
+ case CONNECTION_NORTH:
+ fillNorthConnection(mapHeader, cMap, offset);
+ gUnknown_02037340.north = 1;
+ break;
+ case CONNECTION_WEST:
+ fillWestConnection(mapHeader, cMap, offset);
+ gUnknown_02037340.west = 1;
+ break;
+ case CONNECTION_EAST:
+ fillEastConnection(mapHeader, cMap, offset);
+ gUnknown_02037340.east = 1;
+ break;
+ }
+ }
+ }
+}
+
+void sub_8087F54(int x, int y, struct MapHeader const *mapHeader, int x2, int y2, int width, int height)
+{
+ int i;
+ u16 *src;
+ u16 *dest;
+ int mapWidth;
+
+ mapWidth = mapHeader->mapData->width;
+ src = &mapHeader->mapData->map[mapWidth * y2 + x2];
+ dest = &gUnknown_03005DC0.map[gUnknown_03005DC0.width * y + x];
+
+ for (i = 0; i < height; i++)
+ {
+ CpuCopy16(src, dest, width * 2);
+ dest += gUnknown_03005DC0.width;
+ src += mapWidth;
+ }
+}
+
+void fillSouthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset)
+{
+ int x, y;
+ int x2;
+ int width;
+ int cWidth;
+
+ if (connectedMapHeader)
+ {
+ cWidth = connectedMapHeader->mapData->width;
+ x = offset + 7;
+ y = mapHeader->mapData->height + 7;
+ if (x < 0)
+ {
+ x2 = -x;
+ x += cWidth;
+ if (x < gUnknown_03005DC0.width)
+ {
+ width = x;
+ }
+ else
+ {
+ width = gUnknown_03005DC0.width;
+ }
+ x = 0;
+ }
+ else
+ {
+ x2 = 0;
+ if (x + cWidth < gUnknown_03005DC0.width)
+ {
+ width = cWidth;
+ }
+ else
+ {
+ width = gUnknown_03005DC0.width - x;
+ }
+ }
+
+ sub_8087F54(
+ x, y,
+ connectedMapHeader,
+ x2, /*y2*/ 0,
+ width, /*height*/ 7);
+ }
+}
+
+void fillNorthConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset)
+{
+ int x;
+ int x2, y2;
+ int width;
+ int cWidth, cHeight;
+
+ if (connectedMapHeader)
+ {
+ cWidth = connectedMapHeader->mapData->width;
+ cHeight = connectedMapHeader->mapData->height;
+ x = offset + 7;
+ y2 = cHeight - 7;
+ if (x < 0)
+ {
+ x2 = -x;
+ x += cWidth;
+ if (x < gUnknown_03005DC0.width)
+ {
+ width = x;
+ }
+ else
+ {
+ width = gUnknown_03005DC0.width;
+ }
+ x = 0;
+ }
+ else
+ {
+ x2 = 0;
+ if (x + cWidth < gUnknown_03005DC0.width)
+ {
+ width = cWidth;
+ }
+ else
+ {
+ width = gUnknown_03005DC0.width - x;
+ }
+ }
+
+ sub_8087F54(
+ x, /*y*/ 0,
+ connectedMapHeader,
+ x2, y2,
+ width, /*height*/ 7);
+
+ }
+}
+
+void fillWestConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset)
+{
+ int y;
+ int x2, y2;
+ int height;
+ int cWidth, cHeight;
+ if (connectedMapHeader)
+ {
+ cWidth = connectedMapHeader->mapData->width;
+ cHeight = connectedMapHeader->mapData->height;
+ y = offset + 7;
+ x2 = cWidth - 7;
+ if (y < 0)
+ {
+ y2 = -y;
+ if (y + cHeight < gUnknown_03005DC0.height)
+ {
+ height = y + cHeight;
+ }
+ else
+ {
+ height = gUnknown_03005DC0.height;
+ }
+ y = 0;
+ }
+ else
+ {
+ y2 = 0;
+ if (y + cHeight < gUnknown_03005DC0.height)
+ {
+ height = cHeight;
+ }
+ else
+ {
+ height = gUnknown_03005DC0.height - y;
+ }
+ }
+
+ sub_8087F54(
+ /*x*/ 0, y,
+ connectedMapHeader,
+ x2, y2,
+ /*width*/ 7, height);
+ }
+}
+
+void fillEastConnection(struct MapHeader const *mapHeader, struct MapHeader const *connectedMapHeader, s32 offset)
+{
+ int x, y;
+ int y2;
+ int height;
+ int cHeight;
+ if (connectedMapHeader)
+ {
+ cHeight = connectedMapHeader->mapData->height;
+ x = mapHeader->mapData->width + 7;
+ y = offset + 7;
+ if (y < 0)
+ {
+ y2 = -y;
+ if (y + cHeight < gUnknown_03005DC0.height)
+ {
+ height = y + cHeight;
+ }
+ else
+ {
+ height = gUnknown_03005DC0.height;
+ }
+ y = 0;
+ }
+ else
+ {
+ y2 = 0;
+ if (y + cHeight < gUnknown_03005DC0.height)
+ {
+ height = cHeight;
+ }
+ else
+ {
+ height = gUnknown_03005DC0.height - y;
+ }
+ }
+
+ sub_8087F54(
+ x, y,
+ connectedMapHeader,
+ /*x2*/ 0, y2,
+ /*width*/ 8, height);
+ }
+}
+
+union Block
+{
+ struct
+ {
+ u16 block:10;
+ u16 collision:2;
+ u16 elevation:4;
+ } block;
+ u16 value;
+};
+
+u8 MapGridGetZCoordAt(int x, int y)
+{
+ u16 block;
+ int i;
+ u16 *border;
+
+ if (x >= 0 && x < gUnknown_03005DC0.width
+ && y >= 0 && y < gUnknown_03005DC0.height)
+ {
+ block = gUnknown_03005DC0.map[x + gUnknown_03005DC0.width * y];
+ }
+ else
+ {
+ border = gMapHeader.mapData->border;
+ i = (x + 1) & 1;
+ i += ((y + 1) & 1) * 2;
+ block = gMapHeader.mapData->border[i];
+ block |= 0xc00;
+ }
+
+ if (block == 0x3ff)
+ {
+ return 0;
+ }
+
+ return block >> 12;
+}
+
+u8 MapGridIsImpassableAt(int x, int y)
+{
+ u16 block;
+ int i;
+ u16 *border;
+
+ if (x >= 0 && x < gUnknown_03005DC0.width
+ && y >= 0 && y < gUnknown_03005DC0.height)
+ {
+ block = gUnknown_03005DC0.map[x + gUnknown_03005DC0.width * y];
+ }
+ else
+ {
+ border = gMapHeader.mapData->border;
+ i = (x + 1) & 1;
+ i += ((y + 1) & 1) * 2;
+ block = gMapHeader.mapData->border[i];
+ block |= 0xc00;
+ }
+ if (block == 0x3ff)
+ {
+ return 1;
+ }
+ return (block & 0xc00) >> 10;
+}
+
+u32 MapGridGetMetatileIdAt(int x, int y)
+{
+ u16 block;
+ int i;
+ int j;
+ struct MapData const *mapData;
+ u16 *border;
+ u16 block2;
+
+ if (x >= 0 && x < gUnknown_03005DC0.width
+ && y >= 0 && y < gUnknown_03005DC0.height)
+ {
+ block = gUnknown_03005DC0.map[x + gUnknown_03005DC0.width * y];
+ }
+ else
+ {
+ mapData = gMapHeader.mapData;
+ i = (x + 1) & 1;
+ i += ((y + 1) & 1) * 2;
+ block = mapData->border[i] | 0xc00;
+ }
+ if (block == 0x3ff)
+ {
+ border = gMapHeader.mapData->border;
+ j = (x + 1) & 1;
+ j += ((y + 1) & 1) * 2;
+ block2 = gMapHeader.mapData->border[j];
+ block2 |= 0xc00;
+ return block2 & block;
+ }
+ return block & 0x3ff;
+}
+
+u32 MapGridGetMetatileBehaviorAt(int x, int y)
+{
+ u16 metatile;
+ metatile = MapGridGetMetatileIdAt(x, y);
+ return GetBehaviorByMetatileId(metatile) & 0xff;
+}
+
+u8 MapGridGetMetatileLayerTypeAt(int x, int y)
+{
+ u16 metatile;
+ metatile = MapGridGetMetatileIdAt(x, y);
+ return (GetBehaviorByMetatileId(metatile) & 0xf000) >> 12;
+}
+
+void MapGridSetMetatileIdAt(int x, int y, u16 metatile)
+{
+ int i;
+ if (x >= 0 && x < gUnknown_03005DC0.width
+ && y >= 0 && y < gUnknown_03005DC0.height)
+ {
+ i = x + y * gUnknown_03005DC0.width;
+ gUnknown_03005DC0.map[i] = (gUnknown_03005DC0.map[i] & 0xf000) | (metatile & 0xfff);
+ }
+}
+
+void MapGridSetMetatileEntryAt(int x, int y, u16 metatile)
+{
+ int i;
+ if (x >= 0 && x < gUnknown_03005DC0.width
+ && y >= 0 && y < gUnknown_03005DC0.height)
+ {
+ i = x + gUnknown_03005DC0.width * y;
+ gUnknown_03005DC0.map[i] = metatile;
+ }
+}
+
+u16 GetBehaviorByMetatileId(u16 metatile)
+{
+ u16 *attributes;
+ if (metatile <= 0x1ff)
+ {
+ attributes = gMapHeader.mapData->primaryTileset->metatileAttributes;
+ return attributes[metatile];
+ }
+ else if (metatile <= 0x3ff)
+ {
+ attributes = gMapHeader.mapData->secondaryTileset->metatileAttributes;
+ return attributes[metatile - 0x200];
+ }
+ else
+ {
+ return 0xff;
+ }
+}
+
+void save_serialize_map(void)
+{
+ int i, j;
+ int x, y;
+ u16 *mapView;
+ int width;
+ mapView = gSaveBlock1Ptr->mapView;
+ width = gUnknown_03005DC0.width;
+ x = gSaveBlock1Ptr->pos.x;
+ y = gSaveBlock1Ptr->pos.y;
+ for (i = y; i < y + 14; i++)
+ {
+ for (j = x; j < x + 15; j++)
+ {
+ *mapView++ = gUnknown_02032318[width * i + j];
+ }
+ }
+}
+
+int sub_8088438(void)
+{
+ u16 i;
+ u32 r2;
+ r2 = 0;
+ for (i = 0; i < 0x200; i++)
+ {
+ r2 |= gSaveBlock1Ptr->mapView[i];
+ }
+ if (r2 == 0)
+ {
+ return 1;
+ }
+ return 0;
+}
+
+void sav2_mapdata_clear(void)
+{
+ CpuFill16(0, gSaveBlock1Ptr->mapView, sizeof(gSaveBlock1Ptr->mapView));
+}
+
+void mapdata_from_sav2(void)
+{
+ u8 a0;
+ int i, j;
+ int x, y;
+ u16 *mapView;
+ int width;
+ mapView = gSaveBlock1Ptr->mapView;
+ if (!sub_8088438())
+ {
+ width = gUnknown_03005DC0.width;
+ x = gSaveBlock1Ptr->pos.x;
+ y = gSaveBlock1Ptr->pos.y;
+ for (i = y; i < y + 14; i++)
+ {
+ if (i == y && i != 0)
+ a0 = 0;
+ else if (i == y + 13 && i != gMapHeader.mapData->height - 1)
+ a0 = 1;
+ else
+ a0 = -1;
+
+ for (j = x; j < x + 15; j++)
+ {
+ if (!sub_8088BF0(&gUnknown_02032318[j + width * i], width, a0))
+ gUnknown_02032318[j + width * i] = *mapView;
+ mapView++;
+ }
+ }
+ for (j = x; j < x + 15; j++)
+ {
+ if (y != 0)
+ sub_80D423C(j, y - 1);
+ if (i < gMapHeader.mapData->height - 1)
+ sub_80D42B8(j, y + 13);
+ }
+ sav2_mapdata_clear();
+ }
+}
+
+void sub_80885C4(u8 a1)
+{
+ int width;
+ u16 *mapView;
+ int x0, y0;
+ int x2, y2;
+ u16 *src, *dest;
+ int srci, desti;
+ int r9, r8;
+ int x, y;
+ int i, j;
+ mapView = gSaveBlock1Ptr->mapView;
+ width = gUnknown_03005DC0.width;
+ r9 = 0;
+ r8 = 0;
+ x0 = gSaveBlock1Ptr->pos.x;
+ y0 = gSaveBlock1Ptr->pos.y;
+ x2 = 15;
+ y2 = 14;
+ switch (a1)
+ {
+ case CONNECTION_NORTH:
+ y0 += 1;
+ y2 = 13;
+ break;
+ case CONNECTION_SOUTH:
+ r8 = 1;
+ y2 = 13;
+ break;
+ case CONNECTION_WEST:
+ x0 += 1;
+ x2 = 14;
+ break;
+ case CONNECTION_EAST:
+ r9 = 1;
+ x2 = 14;
+ break;
+ }
+ for (y = 0; y < y2; y++)
+ {
+ i = 0;
+ j = 0;
+ for (x = 0; x < x2; x++)
+ {
+ desti = width * (y + y0);
+ srci = (y + r8) * 15 + r9;
+ src = &mapView[srci + i];
+ dest = &gUnknown_02032318[x0 + desti + j];
+ *dest = *src;
+ i++;
+ j++;
+ }
+ }
+ sav2_mapdata_clear();
+}
+
+int GetMapBorderIdAt(int x, int y)
+{
+ struct MapData const *mapData;
+ u16 block, block2;
+ int i, j;
+ if (x >= 0 && x < gUnknown_03005DC0.width
+ && y >= 0 && y < gUnknown_03005DC0.height)
+ {
+ i = gUnknown_03005DC0.width;
+ i *= y;
+ block = gUnknown_03005DC0.map[x + i];
+ if (block == 0x3ff)
+ {
+ goto fail;
+ }
+ }
+ else
+ {
+ mapData = gMapHeader.mapData;
+ j = (x + 1) & 1;
+ j += ((y + 1) & 1) * 2;
+ block2 = 0xc00 | mapData->border[j];
+ if (block2 == 0x3ff)
+ {
+ goto fail;
+ }
+ }
+ goto success;
+fail:
+ return -1;
+success:
+
+ if (x >= (gUnknown_03005DC0.width - 8))
+ {
+ if (!gUnknown_02037340.east)
+ {
+ return -1;
+ }
+ return CONNECTION_EAST;
+ }
+ else if (x < 7)
+ {
+ if (!gUnknown_02037340.west)
+ {
+ return -1;
+ }
+ return CONNECTION_WEST;
+ }
+ else if (y >= (gUnknown_03005DC0.height - 7))
+ {
+ if (!gUnknown_02037340.south)
+ {
+ return -1;
+ }
+ return CONNECTION_SOUTH;
+ }
+ else if (y < 7)
+ {
+ if (!gUnknown_02037340.north)
+ {
+ return -1;
+ }
+ return CONNECTION_NORTH;
+ }
+ else
+ {
+ return 0;
+ }
+}
+
+int GetPostCameraMoveMapBorderId(int x, int y)
+{
+ return GetMapBorderIdAt(gSaveBlock1Ptr->pos.x + 7 + x, gSaveBlock1Ptr->pos.y + 7 + y);
+}
+
+int CanCameraMoveInDirection(int direction)
+{
+ int x, y;
+ x = gSaveBlock1Ptr->pos.x + 7 + gUnknown_08339D64[direction].x;
+ y = gSaveBlock1Ptr->pos.y + 7 + gUnknown_08339D64[direction].y;
+ if (GetMapBorderIdAt(x, y) == -1)
+ {
+ return 0;
+ }
+ return 1;
+}
+
+void sub_80887F8(struct MapConnection *connection, int direction, int x, int y)
+{
+ struct MapHeader const *mapHeader;
+ mapHeader = mapconnection_get_mapheader(connection);
+ switch (direction)
+ {
+ case CONNECTION_EAST:
+ gSaveBlock1Ptr->pos.x = -x;
+ gSaveBlock1Ptr->pos.y -= connection->offset;
+ break;
+ case CONNECTION_WEST:
+ gSaveBlock1Ptr->pos.x = mapHeader->mapData->width;
+ gSaveBlock1Ptr->pos.y -= connection->offset;
+ break;
+ case CONNECTION_SOUTH:
+ gSaveBlock1Ptr->pos.x -= connection->offset;
+ gSaveBlock1Ptr->pos.y = -y;
+ break;
+ case CONNECTION_NORTH:
+ gSaveBlock1Ptr->pos.x -= connection->offset;
+ gSaveBlock1Ptr->pos.y = mapHeader->mapData->height;
+ break;
+ }
+}
+
+bool8 CameraMove(int x, int y)
+{
+ unsigned int direction;
+ struct MapConnection *connection;
+ int old_x, old_y;
+ gCamera.active = FALSE;
+ direction = GetPostCameraMoveMapBorderId(x, y);
+ if (direction + 1 <= 1)
+ {
+ gSaveBlock1Ptr->pos.x += x;
+ gSaveBlock1Ptr->pos.y += y;
+ }
+ else
+ {
+ save_serialize_map();
+ sub_81BE72C();
+ old_x = gSaveBlock1Ptr->pos.x;
+ old_y = gSaveBlock1Ptr->pos.y;
+ connection = sub_8088950(direction, gSaveBlock1Ptr->pos.x, gSaveBlock1Ptr->pos.y);
+ sub_80887F8(connection, direction, x, y);
+ mliX_load_map(connection->mapGroup, connection->mapNum);
+ gCamera.active = TRUE;
+ gCamera.x = old_x - gSaveBlock1Ptr->pos.x;
+ gCamera.y = old_y - gSaveBlock1Ptr->pos.y;
+ gSaveBlock1Ptr->pos.x += x;
+ gSaveBlock1Ptr->pos.y += y;
+ sub_80885C4(direction);
+ }
+ return gCamera.active;
+}
+
+struct MapConnection *sub_8088950(u8 direction, int x, int y)
+{
+ int count;
+ struct MapConnection *connection;
+ int i;
+ count = gMapHeader.connections->count;
+ connection = gMapHeader.connections->connections;
+ for (i = 0; i < count; i++, connection++)
+ {
+ if (connection->direction == direction && sub_80889A8(direction, x, y, connection) == TRUE)
+ return connection;
+ }
+ return NULL;
+}
+
+bool8 sub_80889A8(u8 direction, int x, int y, struct MapConnection *connection)
+{
+ struct MapHeader const *mapHeader;
+ mapHeader = mapconnection_get_mapheader(connection);
+ switch (direction)
+ {
+ case CONNECTION_SOUTH:
+ case CONNECTION_NORTH:
+ return sub_8088A0C(x, gMapHeader.mapData->width, mapHeader->mapData->width, connection->offset);
+ case CONNECTION_WEST:
+ case CONNECTION_EAST:
+ return sub_8088A0C(y, gMapHeader.mapData->height, mapHeader->mapData->height, connection->offset);
+ }
+ return FALSE;
+}
+
+bool8 sub_8088A0C(int x, int src_width, int dest_width, int offset)
+{
+ int offset2;
+ offset2 = offset;
+
+ if (offset2 < 0)
+ offset2 = 0;
+
+ if (dest_width + offset < src_width)
+ src_width = dest_width + offset;
+
+ if (offset2 <= x && x <= src_width)
+ return TRUE;
+
+ return FALSE;
+}
+
+int sub_8088A38(int x, int width)
+{
+ if (x >= 0 && x < width)
+ return TRUE;
+
+ return FALSE;
+}
+
+int sub_8088A4C(struct MapConnection *connection, int x, int y)
+{
+ struct MapHeader const *mapHeader;
+ mapHeader = mapconnection_get_mapheader(connection);
+ switch (connection->direction)
+ {
+ case CONNECTION_SOUTH:
+ case CONNECTION_NORTH:
+ return sub_8088A38(x - connection->offset, mapHeader->mapData->width);
+ case CONNECTION_WEST:
+ case CONNECTION_EAST:
+ return sub_8088A38(y - connection->offset, mapHeader->mapData->height);
+ }
+ return FALSE;
+}
+
+struct MapConnection *sub_8088A8C(s16 x, s16 y)
+{
+ int count;
+ struct MapConnection *connection;
+ int i;
+ u8 direction;
+ if (!gMapHeader.connections)
+ {
+ return NULL;
+ }
+ else
+ {
+ count = gMapHeader.connections->count;
+ connection = gMapHeader.connections->connections;
+ for (i = 0; i < count; i++, connection++)
+ {
+ direction = connection->direction;
+ if ((direction == CONNECTION_DIVE || direction == CONNECTION_EMERGE)
+ || (direction == CONNECTION_NORTH && y > 6)
+ || (direction == CONNECTION_SOUTH && y < gMapHeader.mapData->height + 7)
+ || (direction == CONNECTION_WEST && x > 6)
+ || (direction == CONNECTION_EAST && x < gMapHeader.mapData->width + 7))
+ {
+ continue;
+ }
+ if (sub_8088A4C(connection, x - 7, y - 7) == TRUE)
+ {
+ return connection;
+ }
+ }
+ }
+ return NULL;
+}
+
+void sub_8088B3C(u16 x, u16 y)
+{
+ gSaveBlock1Ptr->pos.x = x - 7;
+ gSaveBlock1Ptr->pos.y = y - 7;
+}
+
+void sav1_camera_get_focus_coords(u16 *x, u16 *y)
+{
+ *x = gSaveBlock1Ptr->pos.x + 7;
+ *y = gSaveBlock1Ptr->pos.y + 7;
+}
+
+void SetCameraCoords(u16 x, u16 y)
+{
+ gSaveBlock1Ptr->pos.x = x;
+ gSaveBlock1Ptr->pos.y = y;
+}
+
+void GetCameraCoords(u16 *x, u16 *y)
+{
+ *x = gSaveBlock1Ptr->pos.x;
+ *y = gSaveBlock1Ptr->pos.y;
+}
+
+void sub_8088B94(int x, int y, int a2)
+{
+ if (x >= 0 && x < gUnknown_03005DC0.width && y >= 0 && y < gUnknown_03005DC0.height)
+ {
+ if (a2 != 0)
+ gUnknown_03005DC0.map[x + gUnknown_03005DC0.width * y] |= 0xC00;
+ else
+ gUnknown_03005DC0.map[x + gUnknown_03005DC0.width * y] &= 0xF3FF;
+ }
+}
+
+bool8 sub_8088BF0(u16* a0, u16 a1, u8 a2)
+{
+ if (a2 == 0xFF)
+ return FALSE;
+
+ if (a2 == 0)
+ a0 -= a1;
+ else
+ a0 += a1;
+
+ if (sub_80FADE4(*a0 & 0x3FF, a2) == 1)
+ return TRUE;
+ return FALSE;
+}
+
+void copy_tileset_patterns_to_vram(struct Tileset const *tileset, u16 numTiles, u16 offset)
+{
+ if (tileset)
+ {
+ if (!tileset->isCompressed)
+ LoadBgTiles(2, tileset->tiles, numTiles * 32, offset);
+ else
+ decompress_and_copy_tile_data_to_vram(2, tileset->tiles, numTiles * 32, offset, 0);
+ }
+}
+
+void copy_tileset_patterns_to_vram2(struct Tileset const *tileset, u16 numTiles, u16 offset)
+{
+ if (tileset)
+ {
+ if (!tileset->isCompressed)
+ LoadBgTiles(2, tileset->tiles, numTiles * 32, offset);
+ else
+ copy_decompressed_tile_data_to_vram_autofree(2, tileset->tiles, numTiles * 32, offset, 0);
+ }
+}
+
+void nullsub_3(u16 a0, u16 a1)
+{
+
+}
+
+void nullsub_90(void)
+{
+
+}
+
+void apply_map_tileset_palette(struct Tileset const *tileset, u16 destOffset, u16 size)
+{
+ u16 black = RGB_BLACK;
+
+ if (tileset)
+ {
+ if (tileset->isSecondary == FALSE)
+ {
+ LoadPalette(&black, destOffset, 2);
+ LoadPalette(((u16*)tileset->palettes) + 1, destOffset + 1, size - 2);
+ nullsub_3(destOffset + 1, (size - 2) >> 1);
+ }
+ else if (tileset->isSecondary == TRUE)
+ {
+ LoadPalette(((u16*)tileset->palettes) + 0x60, destOffset, size);
+ nullsub_3(destOffset, size >> 1);
+ }
+ else
+ {
+ LoadCompressedPalette((u16*)tileset->palettes, destOffset, size);
+ nullsub_3(destOffset, size >> 1);
+ }
+ }
+}
+
+void copy_map_tileset1_to_vram(struct MapData const *mapData)
+{
+ copy_tileset_patterns_to_vram(mapData->primaryTileset, 0x200, 0);
+}
+
+void copy_map_tileset2_to_vram(struct MapData const *mapData)
+{
+ copy_tileset_patterns_to_vram(mapData->secondaryTileset, 0x200, 0x200);
+}
+
+void copy_map_tileset2_to_vram_2(struct MapData const *mapData)
+{
+ copy_tileset_patterns_to_vram2(mapData->secondaryTileset, 0x200, 0x200);
+}
+
+void apply_map_tileset1_palette(struct MapData const *mapData)
+{
+ apply_map_tileset_palette(mapData->primaryTileset, 0, 0xC0);
+}
+
+void apply_map_tileset2_palette(struct MapData const *mapData)
+{
+ apply_map_tileset_palette(mapData->secondaryTileset, 0x60, 0xE0);
+}
+
+void copy_map_tileset1_tileset2_to_vram(struct MapData const *mapData)
+{
+ if (mapData)
+ {
+ copy_tileset_patterns_to_vram2(mapData->primaryTileset, 0x200, 0);
+ copy_tileset_patterns_to_vram2(mapData->secondaryTileset, 0x200, 0x200);
+ }
+}
+
+void apply_map_tileset1_tileset2_palette(struct MapData const *mapData)
+{
+ if (mapData)
+ {
+ apply_map_tileset1_palette(mapData);
+ apply_map_tileset2_palette(mapData);
+ }
+}
diff --git a/src/item.c b/src/item.c
index 0c60c417d..975fef3ae 100644
--- a/src/item.c
+++ b/src/item.c
@@ -5,52 +5,48 @@
#include "string_util.h"
#include "text.h"
#include "event_data.h"
+#include "malloc.h"
+#include "secret_base.h"
+#include "item_menu.h"
+#include "strings.h"
+#include "load_save.h"
-extern void ApplyNewEncryptionKeyToHword(u16* hword, u32 newKey);
extern bool8 InBattlePyramid(void);
+extern u16 gUnknown_0203CF30[];
+extern const struct Item gItems[];
-extern const u8 gText_PokeBalls[];
-extern const u8 gText_Berries[];
-extern const u8 gText_Berry[];
+// this file's functions
+static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count);
+static bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count);
-bool8 CheckPyramidBagHasItem(u16 itemId, u16 count);
-bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count);
+// EWRAM variables
+EWRAM_DATA struct BagPocket gBagPockets[POCKETS_COUNT] = {0};
-enum
-{
- ITEMS_POCKET,
- BALLS_POCKET,
- TMHM_POCKET,
- BERRIES_POCKET,
- KEYITEMS_POCKET
-};
-
-EWRAM_DATA struct BagPocket gBagPockets[5] = {};
-
-u16 GetBagItemQuantity(u16* quantity)
+// code
+static u16 GetBagItemQuantity(u16 *quantity)
{
return gSaveBlock2Ptr->encryptionKey ^ *quantity;
}
-void SetBagItemQuantity(u16* quantity, u16 newValue)
+static void SetBagItemQuantity(u16 *quantity, u16 newValue)
{
*quantity = newValue ^ gSaveBlock2Ptr->encryptionKey;
}
-u16 GetBagItemId(u16* slot)
+static u16 GetPCItemQuantity(u16 *quantity)
{
- return *slot;
+ return *quantity;
}
-void SetBagItemId(u16* slot, u16 newItemId)
+static void SetPCItemQuantity(u16 *quantity, u16 newValue)
{
- *slot = newItemId;
+ *quantity = newValue;
}
void ApplyNewEncryptionKeyToBagItems(u32 newKey)
{
u32 pocket, item;
- for (pocket = 0; pocket < 5; pocket++)
+ for (pocket = 0; pocket < POCKETS_COUNT; pocket++)
{
for (item = 0; item < gBagPockets[pocket].capacity; item++)
ApplyNewEncryptionKeyToHword(&(gBagPockets[pocket].itemSlots[item].quantity), newKey);
@@ -62,58 +58,57 @@ void ApplyNewEncryptionKeyToBagItems_(u32 newKey) // really GF?
ApplyNewEncryptionKeyToBagItems(newKey);
}
-// TODO: move those max values to defines
-
void SetBagItemsPointers(void)
{
gBagPockets[ITEMS_POCKET].itemSlots = gSaveBlock1Ptr->bagPocket_Items;
- gBagPockets[ITEMS_POCKET].capacity = 30;
+ gBagPockets[ITEMS_POCKET].capacity = BAG_ITEMS_COUNT;
gBagPockets[KEYITEMS_POCKET].itemSlots = gSaveBlock1Ptr->bagPocket_KeyItems;
- gBagPockets[KEYITEMS_POCKET].capacity = 30;
+ gBagPockets[KEYITEMS_POCKET].capacity = BAG_KEYITEMS_COUNT;
gBagPockets[BALLS_POCKET].itemSlots = gSaveBlock1Ptr->bagPocket_PokeBalls;
- gBagPockets[BALLS_POCKET].capacity = 16;
+ gBagPockets[BALLS_POCKET].capacity = BAG_POKEBALLS_COUNT;
gBagPockets[TMHM_POCKET].itemSlots = gSaveBlock1Ptr->bagPocket_TMHM;
- gBagPockets[TMHM_POCKET].capacity = 64;
+ gBagPockets[TMHM_POCKET].capacity = BAG_TMHM_COUNT;
gBagPockets[BERRIES_POCKET].itemSlots = gSaveBlock1Ptr->bagPocket_Berries;
- gBagPockets[BERRIES_POCKET].capacity = 46;
+ gBagPockets[BERRIES_POCKET].capacity = BAG_BERRIES_COUNT;
}
-void CopyItemName(u16 itemId, u8 *string)
+void CopyItemName(u16 itemId, u8 *dst)
{
- StringCopy(string, ItemId_GetItem(itemId)->name);
+ StringCopy(dst, ItemId_GetName(itemId));
}
-void CopyItemNameHandlePlural(u16 itemId, u8 *string, u32 quantity)
+void CopyItemNameHandlePlural(u16 itemId, u8 *dst, u32 quantity)
{
if (itemId == ITEM_POKE_BALL)
{
if (quantity < 2)
- StringCopy(string, ItemId_GetItem(ITEM_POKE_BALL)->name);
+ StringCopy(dst, ItemId_GetName(ITEM_POKE_BALL));
else
- StringCopy(string, gText_PokeBalls);
+ StringCopy(dst, gText_PokeBalls);
}
else
{
if (itemId >= ITEM_CHERI_BERRY && itemId <= ITEM_ENIGMA_BERRY)
- GetBerryCountString(string, gBerries[itemId - ITEM_CHERI_BERRY].name, quantity);
+ GetBerryCountString(dst, gBerries[itemId - ITEM_CHERI_BERRY].name, quantity);
else
- StringCopy(string, ItemId_GetItem(itemId)->name);
+ StringCopy(dst, ItemId_GetName(itemId));
}
}
-void GetBerryCountString(u8* dst, const u8* berryName, u32 quantity)
+void GetBerryCountString(u8 *dst, const u8 *berryName, u32 quantity)
{
- const u8* berryString;
- u8* txtPtr;
+ const u8 *berryString;
+ u8 *txtPtr;
if (quantity < 2)
berryString = gText_Berry;
else
berryString = gText_Berries;
+
txtPtr = StringCopy(dst, berryName);
*txtPtr = CHAR_SPACE;
StringCopy(txtPtr + 1, berryString);
@@ -138,21 +133,21 @@ bool8 CheckBagHasItem(u16 itemId, u16 count)
if (ItemId_GetPocket(itemId) == 0)
return FALSE;
- if (InBattlePyramid() || FlagGet(0x4004) == TRUE)
+ if (InBattlePyramid() || FlagGet(FLAG_SPECIAL_FLAG_0x4004) == TRUE)
return CheckPyramidBagHasItem(itemId, count);
pocket = ItemId_GetPocket(itemId) - 1;
- //Check for item slots that contain the item
+ // Check for item slots that contain the item
for (i = 0; i < gBagPockets[pocket].capacity; i++)
{
if (gBagPockets[pocket].itemSlots[i].itemId == itemId)
{
u16 quantity;
- //Does this item slot contain enough of the item?
+ // Does this item slot contain enough of the item?
quantity = GetBagItemQuantity(&gBagPockets[pocket].itemSlots[i].quantity);
if (quantity >= count)
return TRUE;
count -= quantity;
- //Does this item slot and all previous slots contain enough of the item?
+ // Does this item slot and all previous slots contain enough of the item?
if (count == 0)
return TRUE;
}
@@ -163,69 +158,945 @@ bool8 CheckBagHasItem(u16 itemId, u16 count)
bool8 HasAtLeastOneBerry(void)
{
u16 i;
- for (i = 0x85; i < 0xB3; i++)
+
+ for (i = FIRST_BERRY_INDEX; i < ITEM_BRIGHT_POWDER; i++)
{
if (CheckBagHasItem(i, 1) == TRUE)
{
- gSpecialVar_Result = 1;
+ gSpecialVar_Result = TRUE;
return TRUE;
}
}
- gSpecialVar_Result = 0;
+ gSpecialVar_Result = FALSE;
return FALSE;
}
-/* Refuses to match.
+#ifdef NONMATCHING
+// Refuses to match.
bool8 CheckBagHasSpace(u16 itemId, u16 count)
{
u8 i;
- u8 pocket;
- u16 slotCapacity;
- u16 quantity;
- if (ItemId_GetPocket(itemId) == 0)
+ if (ItemId_GetPocket(itemId) == POCKET_NONE)
return FALSE;
- if (InBattlePyramid() || FlagGet(0x4004) == TRUE)
+
+ if (InBattlePyramid() || FlagGet(FLAG_SPECIAL_FLAG_0x4004) == TRUE)
+ {
return CheckPyramidBagHasSpace(itemId, count);
- pocket = ItemId_GetPocket(itemId) - 1;
- if (pocket != BERRIES_POCKET)
- slotCapacity = 99;
+ }
else
- slotCapacity = 999;
+ {
+ u8 pocket;
+ u16 slotCapacity;
+ u16 ownedCount;
- //Check space in any existing item slots that already contain this item
- for (i = 0; i < gBagPockets[pocket].capacity; i++)
+ pocket = ItemId_GetPocket(itemId) - 1;
+ if (pocket != BERRIES_POCKET)
+ slotCapacity = 99;
+ else
+ slotCapacity = 999;
+
+ // Check space in any existing item slots that already contain this item
+ for (i = 0; i < gBagPockets[pocket].capacity; i++)
+ {
+ if (gBagPockets[pocket].itemSlots[i].itemId == itemId)
+ {
+ ownedCount = GetBagItemQuantity(&gBagPockets[pocket].itemSlots[i].quantity);
+ if (ownedCount + count <= slotCapacity)
+ return TRUE;
+ if (pocket == TMHM_POCKET || pocket == BERRIES_POCKET)
+ return FALSE;
+ count -= slotCapacity - ownedCount;
+ if (count == 0)
+ return TRUE;
+ }
+ }
+
+ // Check space in empty item slots
+ if (count > 0)
+ {
+ for (i = 0; i < gBagPockets[pocket].capacity; i++)
+ {
+ if (gBagPockets[pocket].itemSlots[i].itemId == 0)
+ {
+ if (count <= slotCapacity)
+ return TRUE;
+ if (pocket == TMHM_POCKET || pocket == BERRIES_POCKET)
+ return FALSE;
+ count -= slotCapacity;
+ }
+ }
+ if (count > 0)
+ return FALSE; // No more item slots. The bag is full
+ }
+
+ return TRUE;
+ }
+}
+#else
+ASM_DIRECT
+bool8 CheckBagHasSpace(u16 itemId, u16 count)
+{
+ asm_unified("push {r4-r7,lr}\n\
+ mov r7, r10\n\
+ mov r6, r9\n\
+ mov r5, r8\n\
+ push {r5-r7}\n\
+ sub sp, 0x4\n\
+ lsls r0, 16\n\
+ lsrs r0, 16\n\
+ mov r8, r0\n\
+ lsls r1, 16\n\
+ lsrs r5, r1, 16\n\
+ bl ItemId_GetPocket\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ beq _080D6906\n\
+ bl InBattlePyramid\n\
+ lsls r0, 24\n\
+ cmp r0, 0\n\
+ bne _080D6838\n\
+ ldr r0, =0x00004004\n\
+ bl FlagGet\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ cmp r0, 0x1\n\
+ bne _080D684C\n\
+_080D6838:\n\
+ mov r0, r8\n\
+ adds r1, r5, 0\n\
+ bl CheckPyramidBagHasSpace\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ b _080D6916\n\
+ .pool\n\
+_080D684C:\n\
+ mov r0, r8\n\
+ bl ItemId_GetPocket\n\
+ subs r0, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r2, r0, 24\n\
+ ldr r7, =0x000003e7\n\
+ cmp r2, 0x3\n\
+ beq _080D6860\n\
+ movs r7, 0x63\n\
+_080D6860:\n\
+ movs r6, 0\n\
+ ldr r1, =gBagPockets\n\
+ lsls r4, r2, 3\n\
+ adds r0, r4, r1\n\
+ mov r9, r4\n\
+ ldrb r0, [r0, 0x4]\n\
+ cmp r6, r0\n\
+ bcs _080D68BC\n\
+ subs r0, r2, 0x2\n\
+ lsls r0, 24\n\
+ lsrs r0, 24\n\
+ mov r10, r0\n\
+_080D6878:\n\
+ adds r0, r4, r1\n\
+ ldr r1, [r0]\n\
+ lsls r0, r6, 2\n\
+ adds r1, r0, r1\n\
+ ldrh r0, [r1]\n\
+ cmp r0, r8\n\
+ bne _080D68AC\n\
+ adds r0, r1, 0x2\n\
+ str r2, [sp]\n\
+ bl GetBagItemQuantity\n\
+ lsls r0, 16\n\
+ lsrs r1, r0, 16\n\
+ adds r0, r1, r5\n\
+ ldr r2, [sp]\n\
+ cmp r0, r7\n\
+ ble _080D6914\n\
+ mov r0, r10\n\
+ cmp r0, 0x1\n\
+ bls _080D6906\n\
+ subs r0, r7, r1\n\
+ subs r0, r5, r0\n\
+ lsls r0, 16\n\
+ lsrs r5, r0, 16\n\
+ cmp r5, 0\n\
+ beq _080D6914\n\
+_080D68AC:\n\
+ adds r0, r6, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r6, r0, 24\n\
+ ldr r1, =gBagPockets\n\
+ adds r0, r4, r1\n\
+ ldrb r0, [r0, 0x4]\n\
+ cmp r6, r0\n\
+ bcc _080D6878\n\
+_080D68BC:\n\
+ cmp r5, 0\n\
+ beq _080D6914\n\
+ movs r6, 0\n\
+ ldr r3, =gBagPockets\n\
+ mov r1, r9\n\
+ adds r0, r1, r3\n\
+ ldrb r0, [r0, 0x4]\n\
+ cmp r6, r0\n\
+ bcs _080D6902\n\
+ adds r4, r3, 0\n\
+ subs r0, r2, 0x2\n\
+ lsls r0, 24\n\
+ lsrs r2, r0, 24\n\
+_080D68D6:\n\
+ adds r0, r1, r4\n\
+ ldr r1, [r0]\n\
+ lsls r0, r6, 2\n\
+ adds r0, r1\n\
+ ldrh r0, [r0]\n\
+ cmp r0, 0\n\
+ bne _080D68F2\n\
+ cmp r5, r7\n\
+ bls _080D6914\n\
+ cmp r2, 0x1\n\
+ bls _080D6906\n\
+ subs r0, r5, r7\n\
+ lsls r0, 16\n\
+ lsrs r5, r0, 16\n\
+_080D68F2:\n\
+ adds r0, r6, 0x1\n\
+ lsls r0, 24\n\
+ lsrs r6, r0, 24\n\
+ mov r1, r9\n\
+ adds r0, r1, r3\n\
+ ldrb r0, [r0, 0x4]\n\
+ cmp r6, r0\n\
+ bcc _080D68D6\n\
+_080D6902:\n\
+ cmp r5, 0\n\
+ beq _080D6914\n\
+_080D6906:\n\
+ movs r0, 0\n\
+ b _080D6916\n\
+ .pool\n\
+_080D6914:\n\
+ movs r0, 0x1\n\
+_080D6916:\n\
+ add sp, 0x4\n\
+ pop {r3-r5}\n\
+ mov r8, r3\n\
+ mov r9, r4\n\
+ mov r10, r5\n\
+ pop {r4-r7}\n\
+ pop {r1}\n\
+ bx r1");
+}
+#endif // NONMATCHING
+
+bool8 AddBagItem(u16 itemId, u16 count)
+{
+ u8 i;
+
+ if (ItemId_GetPocket(itemId) == POCKET_NONE)
+ return FALSE;
+
+ // check Battle Pyramid Bag
+ if (InBattlePyramid() || FlagGet(FLAG_SPECIAL_FLAG_0x4004) == TRUE)
{
- if (gBagPockets[pocket].itemSlots[i].itemId == itemId)
+ return AddPyramidBagItem(itemId, count);
+ }
+ else
+ {
+ struct BagPocket *itemPocket;
+ struct ItemSlot *newItems;
+ u16 slotCapacity;
+ u16 ownedCount;
+ u8 pocket = ItemId_GetPocket(itemId) - 1;
+
+ itemPocket = &gBagPockets[pocket];
+ newItems = AllocZeroed(itemPocket->capacity * sizeof(struct ItemSlot));
+ memcpy(newItems, itemPocket->itemSlots, itemPocket->capacity * sizeof(struct ItemSlot));
+
+ if (pocket != BERRIES_POCKET)
+ slotCapacity = 99;
+ else
+ slotCapacity = 999;
+
+ for (i = 0; i < itemPocket->capacity; i++)
{
- quantity = GetBagItemQuantity(&gBagPockets[pocket].itemSlots[i].quantity);
- if (quantity + count <= slotCapacity)
- return TRUE;
- if (pocket == TMHM_POCKET || pocket == BERRIES_POCKET)
+ if (newItems[i].itemId == itemId)
+ {
+ ownedCount = GetBagItemQuantity(&newItems[i].quantity);
+ // check if won't exceed max slot capacity
+ if (ownedCount + count <= slotCapacity)
+ {
+ // successfully added to already existing item's count
+ SetBagItemQuantity(&newItems[i].quantity, ownedCount + count);
+
+ // goto SUCCESS_ADD_ITEM;
+ // is equivalent but won't match
+
+ memcpy(itemPocket->itemSlots, newItems, itemPocket->capacity * sizeof(struct ItemSlot));
+ Free(newItems);
+ return TRUE;
+ }
+ else
+ {
+ // try creating another instance of the item if possible
+ if (pocket == TMHM_POCKET || pocket == BERRIES_POCKET)
+ {
+ Free(newItems);
+ return FALSE;
+ }
+ else
+ {
+ count -= slotCapacity - ownedCount;
+ SetBagItemQuantity(&newItems[i].quantity, slotCapacity);
+ // don't create another instance of the item if it's at max slot capacity and count is equal to 0
+ if (count == 0)
+ {
+ goto SUCCESS_ADD_ITEM;
+ }
+ }
+ }
+ }
+ }
+
+ // we're done if quantity is equal to 0
+ if (count > 0)
+ {
+ // either no existing item was found or we have to create another instance, because the capacity was exceeded
+ for (i = 0; i < itemPocket->capacity; i++)
+ {
+ if (newItems[i].itemId == ITEM_NONE)
+ {
+ newItems[i].itemId = itemId;
+ if (count > slotCapacity)
+ {
+ // try creating a new slot with max capacity if duplicates are possible
+ if (pocket == TMHM_POCKET || pocket == BERRIES_POCKET)
+ {
+ Free(newItems);
+ return FALSE;
+ }
+ count -= slotCapacity;
+ SetBagItemQuantity(&newItems[i].quantity, slotCapacity);
+ }
+ else
+ {
+ // created a new slot and added quantity
+ SetBagItemQuantity(&newItems[i].quantity, count);
+ goto SUCCESS_ADD_ITEM;
+ }
+ }
+ }
+
+ if (count > 0)
+ {
+ Free(newItems);
return FALSE;
- count -= slotCapacity - quantity;
+ }
+ }
+
+ SUCCESS_ADD_ITEM:
+ memcpy(itemPocket->itemSlots, newItems, itemPocket->capacity * sizeof(struct ItemSlot));
+ Free(newItems);
+ return TRUE;
+ }
+}
+
+bool8 RemoveBagItem(u16 itemId, u16 count)
+{
+ u8 i;
+ u16 totalQuantity = 0;
+
+ if (ItemId_GetPocket(itemId) == POCKET_NONE || itemId == ITEM_NONE)
+ return FALSE;
+
+ // check Battle Pyramid Bag
+ if (InBattlePyramid() || FlagGet(FLAG_SPECIAL_FLAG_0x4004) == TRUE)
+ {
+ return RemovePyramidBagItem(itemId, count);
+ }
+ else
+ {
+ u8 pocket;
+ u8 var;
+ u16 ownedCount;
+ struct BagPocket *itemPocket;
+
+ pocket = ItemId_GetPocket(itemId) - 1;
+ itemPocket = &gBagPockets[pocket];
+
+ for (i = 0; i < itemPocket->capacity; i++)
+ {
+ if (itemPocket->itemSlots[i].itemId == itemId)
+ totalQuantity += GetBagItemQuantity(&itemPocket->itemSlots[i].quantity);
+ }
+
+ if (totalQuantity < count)
+ return FALSE; // We don't have enough of the item
+
+ if (CurrentMapIsSecretBase() == TRUE)
+ {
+ VarSet(VAR_0x40EE, VarGet(VAR_0x40EE) | 0x200);
+ VarSet(VAR_0x40ED, itemId);
+ }
+
+ var = sub_81ABB2C(pocket);
+ if (itemPocket->capacity > var
+ && itemPocket->itemSlots[var].itemId == itemId)
+ {
+ ownedCount = GetBagItemQuantity(&itemPocket->itemSlots[var].quantity);
+ if (ownedCount >= count)
+ {
+ SetBagItemQuantity(&itemPocket->itemSlots[var].quantity, ownedCount - count);
+ count = 0;
+ }
+ else
+ {
+ count -= ownedCount;
+ SetBagItemQuantity(&itemPocket->itemSlots[var].quantity, 0);
+ }
+
+ if (GetBagItemQuantity(&itemPocket->itemSlots[var].quantity) == 0)
+ itemPocket->itemSlots[var].itemId = ITEM_NONE;
+
if (count == 0)
return TRUE;
}
+
+ for (i = 0; i < itemPocket->capacity; i++)
+ {
+ if (itemPocket->itemSlots[i].itemId == itemId)
+ {
+ ownedCount = GetBagItemQuantity(&itemPocket->itemSlots[i].quantity);
+ if (ownedCount >= count)
+ {
+ SetBagItemQuantity(&itemPocket->itemSlots[i].quantity, ownedCount - count);
+ count = 0;
+ }
+ else
+ {
+ count -= ownedCount;
+ SetBagItemQuantity(&itemPocket->itemSlots[i].quantity, 0);
+ }
+
+ if (GetBagItemQuantity(&itemPocket->itemSlots[i].quantity) == 0)
+ itemPocket->itemSlots[i].itemId = ITEM_NONE;
+
+ if (count == 0)
+ return TRUE;
+ }
+ }
+ return TRUE;
}
+}
- //Check space in empty item slots
- if (count > 0)
+u8 GetPocketByItemId(u16 itemId)
+{
+ return ItemId_GetPocket(itemId);
+}
+
+void ClearItemSlots(struct ItemSlot *itemSlots, u8 itemCount)
+{
+ u16 i;
+
+ for (i = 0; i < itemCount; i++)
{
- for (i = 0; i < gBagPockets[pocket].capacity; i++)
+ itemSlots[i].itemId = ITEM_NONE;
+ SetBagItemQuantity(&itemSlots[i].quantity, 0);
+ }
+}
+
+static s32 FindFreePCItemSlot(void)
+{
+ s8 i;
+
+ for (i = 0; i < PC_ITEMS_COUNT; i++)
+ {
+ if (gSaveBlock1Ptr->pcItems[i].itemId == ITEM_NONE)
+ return i;
+ }
+ return -1;
+}
+
+u8 CountUsedPCItemSlots(void)
+{
+ u8 usedSlots = 0;
+ u8 i;
+
+ for (i = 0; i < PC_ITEMS_COUNT; i++)
+ {
+ if (gSaveBlock1Ptr->pcItems[i].itemId != ITEM_NONE)
+ usedSlots++;
+ }
+ return usedSlots;
+}
+
+bool8 CheckPCHasItem(u16 itemId, u16 count)
+{
+ u8 i;
+
+ for (i = 0; i < PC_ITEMS_COUNT; i++)
+ {
+ if (gSaveBlock1Ptr->pcItems[i].itemId == itemId && GetPCItemQuantity(&gSaveBlock1Ptr->pcItems[i].quantity) >= count)
+ return TRUE;
+ }
+ return FALSE;
+}
+
+bool8 AddPCItem(u16 itemId, u16 count)
+{
+ u8 i;
+ s8 freeSlot;
+ u16 ownedCount;
+ struct ItemSlot *newItems;
+
+ // Copy PC items
+ newItems = AllocZeroed(sizeof(gSaveBlock1Ptr->pcItems));
+ memcpy(newItems, gSaveBlock1Ptr->pcItems, sizeof(gSaveBlock1Ptr->pcItems));
+
+ // Use any item slots that already contain this item
+ for (i = 0; i < PC_ITEMS_COUNT; i++)
+ {
+ if (newItems[i].itemId == itemId)
{
- if (gBagPockets[pocket].itemSlots[i].itemId == 0)
+ ownedCount = GetPCItemQuantity(&newItems[i].quantity);
+ if (ownedCount + count <= 999)
{
- if (count <= slotCapacity)
- return TRUE;
- if (pocket == TMHM_POCKET || pocket == BERRIES_POCKET)
- return FALSE;
- count -= slotCapacity;
+ SetPCItemQuantity(&newItems[i].quantity, ownedCount + count);
+ memcpy(gSaveBlock1Ptr->pcItems, newItems, sizeof(gSaveBlock1Ptr->pcItems));
+ Free(newItems);
+ return TRUE;
+ }
+ count += ownedCount - 999;
+ SetPCItemQuantity(&newItems[i].quantity, 999);
+ if (count == 0)
+ {
+ memcpy(gSaveBlock1Ptr->pcItems, newItems, sizeof(gSaveBlock1Ptr->pcItems));
+ Free(newItems);
+ return TRUE;
}
}
- if (count > 0)
- return FALSE; //No more item slots. The bag is full
}
+ // Put any remaining items into a new item slot.
+ if (count > 0)
+ {
+ freeSlot = FindFreePCItemSlot();
+ if (freeSlot == -1)
+ {
+ Free(newItems);
+ return FALSE;
+ }
+ else
+ {
+ newItems[freeSlot].itemId = itemId;
+ SetPCItemQuantity(&newItems[freeSlot].quantity, count);
+ }
+ }
+
+ // Copy items back to the PC
+ memcpy(gSaveBlock1Ptr->pcItems, newItems, sizeof(gSaveBlock1Ptr->pcItems));
+ Free(newItems);
return TRUE;
-}*/
+}
+
+void RemovePCItem(u8 index, u16 count)
+{
+ // UB: should use GetPCItemQuantity and SetPCItemQuantity functions
+ gSaveBlock1Ptr->pcItems[index].quantity -= count;
+ if (gSaveBlock1Ptr->pcItems[index].quantity == 0)
+ {
+ gSaveBlock1Ptr->pcItems[index].itemId = ITEM_NONE;
+ CompactPCItems();
+ }
+}
+
+void CompactPCItems(void)
+{
+ u16 i;
+ u16 j;
+
+ for (i = 0; i < PC_ITEMS_COUNT - 1; i++)
+ {
+ for (j = i + 1; j < PC_ITEMS_COUNT; j++)
+ {
+ if (gSaveBlock1Ptr->pcItems[i].itemId == 0)
+ {
+ struct ItemSlot temp = gSaveBlock1Ptr->pcItems[i];
+ gSaveBlock1Ptr->pcItems[i] = gSaveBlock1Ptr->pcItems[j];
+ gSaveBlock1Ptr->pcItems[j] = temp;
+ }
+ }
+ }
+}
+
+void SwapRegisteredBike(void)
+{
+ switch (gSaveBlock1Ptr->registeredItem)
+ {
+ case ITEM_MACH_BIKE:
+ gSaveBlock1Ptr->registeredItem = ITEM_ACRO_BIKE;
+ break;
+ case ITEM_ACRO_BIKE:
+ gSaveBlock1Ptr->registeredItem = ITEM_MACH_BIKE;
+ break;
+ }
+}
+
+u16 BagGetItemIdByPocketPosition(u8 pocketId, u16 pocketPos)
+{
+ return gBagPockets[pocketId - 1].itemSlots[pocketPos].itemId;
+}
+
+u16 BagGetQuantityByPocketPosition(u8 pocketId, u16 pocketPos)
+{
+ return GetBagItemQuantity(&gBagPockets[pocketId - 1].itemSlots[pocketPos].quantity);
+}
+
+static void SwapItemSlots(struct ItemSlot *a, struct ItemSlot *b)
+{
+ struct ItemSlot temp = *a;
+ *a = *b;
+ *b = temp;
+}
+
+void CompactItemsInBagPocket(struct BagPocket *bagPocket)
+{
+ u16 i, j;
+
+ for (i = 0; i < bagPocket->capacity - 1; i++)
+ {
+ for (j = i + 1; j < bagPocket->capacity; j++)
+ {
+ if (GetBagItemQuantity(&bagPocket->itemSlots[i].quantity) == 0)
+ SwapItemSlots(&bagPocket->itemSlots[i], &bagPocket->itemSlots[j]);
+ }
+ }
+}
+
+void SortBerriesOrTMHMs(struct BagPocket *bagPocket)
+{
+ u16 i, j;
+
+ for (i = 0; i < bagPocket->capacity - 1; i++)
+ {
+ for (j = i + 1; j < bagPocket->capacity; j++)
+ {
+ if (GetBagItemQuantity(&bagPocket->itemSlots[i].quantity) != 0)
+ {
+ if (GetBagItemQuantity(&bagPocket->itemSlots[j].quantity) == 0)
+ continue;
+ if (bagPocket->itemSlots[i].itemId <= bagPocket->itemSlots[j].itemId)
+ continue;
+ }
+ SwapItemSlots(&bagPocket->itemSlots[i], &bagPocket->itemSlots[j]);
+ }
+ }
+}
+
+void MoveItemSlotInList(struct ItemSlot* itemSlots_, u32 from, u32 to_)
+{
+ // dumb assignments needed to match
+ struct ItemSlot *itemSlots = itemSlots_;
+ u32 to = to_;
+
+ if (from != to)
+ {
+ s16 i, count;
+ struct ItemSlot firstSlot = itemSlots[from];
+
+ if (to > from)
+ {
+ to--;
+ for (i = from, count = to; i < count; i++)
+ itemSlots[i] = itemSlots[i + 1];
+ }
+ else
+ {
+ for (i = from, count = to; i > count; i--)
+ itemSlots[i] = itemSlots[i - 1];
+ }
+ itemSlots[to] = firstSlot;
+ }
+}
+
+void ClearBag(void)
+{
+ u16 i;
+
+ for (i = 0; i < POCKETS_COUNT; i++)
+ {
+ ClearItemSlots(gBagPockets[i].itemSlots, gBagPockets[i].capacity);
+ }
+}
+
+u16 CountTotalItemQuantityInBag(u16 itemId)
+{
+ u16 i;
+ u16 ownedCount = 0;
+ struct BagPocket *bagPocket = &gBagPockets[ItemId_GetPocket(itemId) - 1];
+
+ for (i = 0; i < bagPocket->capacity; i++)
+ {
+ if (bagPocket->itemSlots[i].itemId == itemId)
+ ownedCount += GetBagItemQuantity(&bagPocket->itemSlots[i].quantity);
+ }
+
+ return ownedCount;
+}
+
+static bool8 CheckPyramidBagHasItem(u16 itemId, u16 count)
+{
+ u8 i;
+ u16 *items = gSaveBlock2Ptr->pyramidBag.itemId[gSaveBlock2Ptr->frontierChosenLvl];
+ u8 *quantities = gSaveBlock2Ptr->pyramidBag.quantity[gSaveBlock2Ptr->frontierChosenLvl];
+
+ for (i = 0; i < PYRAMID_BAG_ITEMS_COUNT; i++)
+ {
+ if (items[i] == itemId)
+ {
+ if (quantities[i] >= count)
+ return TRUE;
+
+ count -= quantities[i];
+ if (count == 0)
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+static bool8 CheckPyramidBagHasSpace(u16 itemId, u16 count)
+{
+ u8 i;
+ u16 *items = gSaveBlock2Ptr->pyramidBag.itemId[gSaveBlock2Ptr->frontierChosenLvl];
+ u8 *quantities = gSaveBlock2Ptr->pyramidBag.quantity[gSaveBlock2Ptr->frontierChosenLvl];
+
+ for (i = 0; i < PYRAMID_BAG_ITEMS_COUNT; i++)
+ {
+ if (items[i] == itemId || items[i] == ITEM_NONE)
+ {
+ if (quantities[i] + count <= 99)
+ return TRUE;
+
+ count = (quantities[i] + count) - 99;
+ if (count == 0)
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
+bool8 AddPyramidBagItem(u16 itemId, u16 count)
+{
+ u16 i;
+
+ u16 *items = gSaveBlock2Ptr->pyramidBag.itemId[gSaveBlock2Ptr->frontierChosenLvl];
+ u8 *quantities = gSaveBlock2Ptr->pyramidBag.quantity[gSaveBlock2Ptr->frontierChosenLvl];
+
+ u16 *newItems = Alloc(PYRAMID_BAG_ITEMS_COUNT * sizeof(u16));
+ u8 *newQuantities = Alloc(PYRAMID_BAG_ITEMS_COUNT * sizeof(u8));
+
+ memcpy(newItems, items, PYRAMID_BAG_ITEMS_COUNT * sizeof(u16));
+ memcpy(newQuantities, quantities, PYRAMID_BAG_ITEMS_COUNT * sizeof(u8));
+
+ for (i = 0; i < PYRAMID_BAG_ITEMS_COUNT; i++)
+ {
+ if (newItems[i] == itemId && newQuantities[i] < 99)
+ {
+ newQuantities[i] += count;
+ if (newQuantities[i] > 99)
+ {
+ count = newQuantities[i] - 99;
+ newQuantities[i] = 99;
+ }
+ else
+ {
+ count = 0;
+ }
+
+ if (count == 0)
+ break;
+ }
+ }
+
+ if (count > 0)
+ {
+ for (i = 0; i < PYRAMID_BAG_ITEMS_COUNT; i++)
+ {
+ if (newItems[i] == ITEM_NONE)
+ {
+ newItems[i] = itemId;
+ newQuantities[i] = count;
+ if (newQuantities[i] > 99)
+ {
+ count = newQuantities[i] - 99;
+ newQuantities[i] = 99;
+ }
+ else
+ {
+ count = 0;
+ }
+
+ if (count == 0)
+ break;
+ }
+ }
+ }
+
+ if (count == 0)
+ {
+ memcpy(items, newItems, PYRAMID_BAG_ITEMS_COUNT * sizeof(u16));
+ memcpy(quantities, newQuantities, PYRAMID_BAG_ITEMS_COUNT * sizeof(u8));
+ Free(newItems);
+ Free(newQuantities);
+ return TRUE;
+ }
+ else
+ {
+ Free(newItems);
+ Free(newQuantities);
+ return FALSE;
+ }
+}
+
+bool8 RemovePyramidBagItem(u16 itemId, u16 count)
+{
+ u16 i;
+
+ u16 *items = gSaveBlock2Ptr->pyramidBag.itemId[gSaveBlock2Ptr->frontierChosenLvl];
+ u8 *quantities = gSaveBlock2Ptr->pyramidBag.quantity[gSaveBlock2Ptr->frontierChosenLvl];
+
+ i = gUnknown_0203CF30[3] + gUnknown_0203CF30[4];
+ if (items[i] == itemId && quantities[i] >= count)
+ {
+ quantities[i] -= count;
+ if (quantities[i] == 0)
+ items[i] = ITEM_NONE;
+ return TRUE;
+ }
+ else
+ {
+ u16 *newItems = Alloc(PYRAMID_BAG_ITEMS_COUNT * sizeof(u16));
+ u8 *newQuantities = Alloc(PYRAMID_BAG_ITEMS_COUNT * sizeof(u8));
+
+ memcpy(newItems, items, PYRAMID_BAG_ITEMS_COUNT * sizeof(u16));
+ memcpy(newQuantities, quantities, PYRAMID_BAG_ITEMS_COUNT * sizeof(u8));
+
+ for (i = 0; i < PYRAMID_BAG_ITEMS_COUNT; i++)
+ {
+ if (newItems[i] == itemId)
+ {
+ if (newQuantities[i] >= count)
+ {
+ newQuantities[i] -= count;
+ count = 0;
+ if (newQuantities[i] == 0)
+ newItems[i] = ITEM_NONE;
+ }
+ else
+ {
+ count -= newQuantities[i];
+ newQuantities[i] = 0;
+ newItems[i] = ITEM_NONE;
+ }
+
+ if (count == 0)
+ break;
+ }
+ }
+
+ if (count == 0)
+ {
+ memcpy(items, newItems, PYRAMID_BAG_ITEMS_COUNT * sizeof(u16));
+ memcpy(quantities, newQuantities, PYRAMID_BAG_ITEMS_COUNT * sizeof(u8));
+ Free(newItems);
+ Free(newQuantities);
+ return TRUE;
+ }
+ else
+ {
+ Free(newItems);
+ Free(newQuantities);
+ return FALSE;
+ }
+ }
+}
+
+static u16 SanitizeItemId(u16 itemId)
+{
+ if (itemId >= ITEM_LAST_ID + 1)
+ return ITEM_NONE;
+ else
+ return itemId;
+}
+
+const u8 *ItemId_GetName(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].name;
+}
+
+u16 ItemId_GetId(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].itemId;
+}
+
+u16 ItemId_GetPrice(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].price;
+}
+
+u8 ItemId_GetHoldEffect(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].holdEffect;
+}
+
+u8 ItemId_GetHoldEffectParam(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].holdEffectParam;
+}
+
+const u8 *ItemId_GetDescription(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].description;
+}
+
+u8 ItemId_GetImportance(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].importance;
+}
+
+// unused
+u8 ItemId_GetUnknownValue(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].unk19;
+}
+
+u8 ItemId_GetPocket(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].pocket;
+}
+
+u8 ItemId_GetType(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].type;
+}
+
+ItemUseFunc ItemId_GetFieldFunc(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].fieldUseFunc;
+}
+
+u8 ItemId_GetBattleUsage(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].battleUsage;
+}
+
+ItemUseFunc ItemId_GetBattleFunc(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].battleUseFunc;
+}
+
+u8 ItemId_GetSecondaryId(u16 itemId)
+{
+ return gItems[SanitizeItemId(itemId)].secondaryId;
+}
diff --git a/src/item_icon.c b/src/item_icon.c
index 4aaad9c31..d6fedf892 100644
--- a/src/item_icon.c
+++ b/src/item_icon.c
@@ -4,13 +4,13 @@
#include "sprite.h"
#include "decompress.h"
#include "constants/items.h"
+#include "data/item_icon_table.h"
// EWRAM vars
EWRAM_DATA void *gItemIconDecompressionBuffer = NULL;
EWRAM_DATA void *gItemIcon4x4Buffer = NULL;
// const rom data
-extern const void *const gItemIconTable[][2]; // todo: move to C file
static const struct OamData sOamData_ItemIcon =
{
diff --git a/src/item_menu.c b/src/item_menu.c
index 8c05f0828..d7edea301 100755
--- a/src/item_menu.c
+++ b/src/item_menu.c
@@ -72,7 +72,7 @@ void AddBagItemIconSprite(u16, u8);
void bag_menu_print_description_box_text(int);
void bag_menu_print_cursor(u8, u8);
void bag_menu_print(u8, u8, const u8*, u8, u8, u8, u8, u8, u8);
-bool8 itemid_is_unique(u16);
+bool8 ItemId_GetImportance(u16);
u16 BagGetQuantityByPocketPosition(u8, u16);
void sub_81AB89C(void);
void task_close_bag_menu_2(u8);
@@ -687,7 +687,7 @@ void sub_81AB520(u8 rboxId, int item_index_in_pocket, u8 a)
offset = GetStringRightAlignXOffset(7, gStringVar4, 0x77);
bag_menu_print(rboxId, 7, gStringVar4, offset, a, 0, 0, -1, 0);
}
- else if (gUnknown_0203CE58.pocket != 4 && (unique = itemid_is_unique(itemId)) == FALSE)
+ else if (gUnknown_0203CE58.pocket != 4 && (unique = ItemId_GetImportance(itemId)) == FALSE)
{
ConvertIntToDecimalStringN(gStringVar1, itemQuantity, 1, 2);
StringExpandPlaceholders(gStringVar4, gText_xVar1);
@@ -804,10 +804,10 @@ void sub_81AB9A8(u8 pocketId)
{
case 2:
case 3:
- sub_80D6FB4(pocket);
+ SortBerriesOrTMHMs(pocket);
break;
default:
- sub_80D6F64(pocket);
+ CompactItemsInBagPocket(pocket);
break;
}
gUnknown_0203CE54->unk829[pocketId] = 0;
@@ -847,9 +847,9 @@ void sub_81ABAE0(void)
sub_8122298(&gUnknown_0203CE58.scrollPosition[i], &gUnknown_0203CE58.cursorPosition[i], gUnknown_0203CE54->unk82E[i], gUnknown_0203CE54->unk829[i], 8);
}
-u8 sub_81ABB2C(u8 a)
+u8 sub_81ABB2C(u8 pocketId)
{
- return gUnknown_0203CE58.scrollPosition[a] + gUnknown_0203CE58.cursorPosition[a];
+ return gUnknown_0203CE58.scrollPosition[pocketId] + gUnknown_0203CE58.cursorPosition[pocketId];
}
void DisplayItemMessage(u8 taskId, u8 fontId, const u8 *str, void ( *callback)(u8 taskId))
@@ -1179,7 +1179,7 @@ void sub_81AC498(u8 taskId)
sub_81AC590(taskId);
else
{
- sub_80D702C(gBagPockets[gUnknown_0203CE58.pocket].itemSlots, data[1], realPos);
+ MoveItemSlotInList(gBagPockets[gUnknown_0203CE58.pocket].itemSlots, data[1], realPos);
gUnknown_0203CE54->unk81A = -1;
DestroyListMenuTask(data[0], scrollPos, cursorPos);
if (data[1] < realPos)
@@ -1231,7 +1231,7 @@ void sub_81AC644(u8 unused)
gUnknown_0203CE54->unk828 = 4;
break;
case 8:
- if (!itemid_is_unique(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
+ if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
{
gUnknown_0203CE54->unk820 = gUnknown_0861404B;
gUnknown_0203CE54->unk828 = 2;
@@ -1243,7 +1243,7 @@ void sub_81AC644(u8 unused)
}
break;
case 6:
- if (!itemid_is_unique(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
+ if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
{
gUnknown_0203CE54->unk820 = gUnknown_0861404D;
gUnknown_0203CE54->unk828 = 2;
@@ -1255,7 +1255,7 @@ void sub_81AC644(u8 unused)
}
break;
case 7:
- if (!itemid_is_unique(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
+ if (!ItemId_GetImportance(gSpecialVar_ItemId) && gSpecialVar_ItemId != ITEM_ENIGMA_BERRY)
{
gUnknown_0203CE54->unk820 = gUnknown_0861404F;
gUnknown_0203CE54->unk828 = 2;
@@ -1605,7 +1605,7 @@ void ItemMenu_Give(u8 taskId)
{
DisplayItemMessage(taskId, 1, gText_CantWriteMail, sub_81AD350);
}
- else if (!itemid_is_unique(gSpecialVar_ItemId))
+ else if (!ItemId_GetImportance(gSpecialVar_ItemId))
{
if (CalculatePlayerPartyCount() == 0)
bag_menu_print_there_is_no_pokemon(taskId);
@@ -1686,7 +1686,7 @@ void item_menu_type_2(u8 taskId)
StringExpandPlaceholders(gStringVar4, gText_Var1CantBeHeldHere);
DisplayItemMessage(taskId, 1, gStringVar4, sub_81AD350);
}
- else if (gUnknown_0203CE58.pocket != 4 && !itemid_is_unique(gSpecialVar_ItemId))
+ else if (gUnknown_0203CE58.pocket != 4 && !ItemId_GetImportance(gSpecialVar_ItemId))
{
unknown_ItemMenu_Confirm(taskId);
}
@@ -1700,7 +1700,7 @@ void item_menu_type_b(u8 taskId)
{
if (ItemIsMail(gSpecialVar_ItemId) == TRUE)
DisplayItemMessage(taskId, 1, gText_CantWriteMail, sub_81AD350);
- else if (gUnknown_0203CE58.pocket != 4 && !itemid_is_unique(gSpecialVar_ItemId))
+ else if (gUnknown_0203CE58.pocket != 4 && !ItemId_GetImportance(gSpecialVar_ItemId))
gTasks[taskId].func = unknown_ItemMenu_Confirm;
else
bag_menu_print_cant_be_held_msg(taskId);
@@ -1738,7 +1738,7 @@ void display_sell_item_ask_str(u8 taskId)
{
s16* data = gTasks[taskId].data;
- if (itemid_get_market_price(gSpecialVar_ItemId) == 0)
+ if (ItemId_GetPrice(gSpecialVar_ItemId) == 0)
{
CopyItemName(gSpecialVar_ItemId, gStringVar2);
StringExpandPlaceholders(gStringVar4, gText_CantBuyKeyItem);
@@ -1765,7 +1765,7 @@ void sub_81AD680(u8 taskId)
{
s16* data = gTasks[taskId].data;
- ConvertIntToDecimalStringN(gStringVar1, (itemid_get_market_price(gSpecialVar_ItemId) / 2) * data[8], 0, 6);
+ ConvertIntToDecimalStringN(gStringVar1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8], 0, 6);
StringExpandPlaceholders(gStringVar4, gText_ICanPayVar1);
DisplayItemMessage(taskId, 1, gStringVar4, sub_81AD6E4);
}
@@ -1790,7 +1790,7 @@ void sub_81AD730(u8 taskId)
s16* data = gTasks[taskId].data;
u8 windowId = bag_menu_add_window(8);
- sub_81ABCC0(windowId, 1, (itemid_get_market_price(gSpecialVar_ItemId) / 2) * data[8]);
+ sub_81ABCC0(windowId, 1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8]);
bag_menu_AddMoney_window();
gTasks[taskId].func = sub_81AD794;
}
@@ -1801,7 +1801,7 @@ void sub_81AD794(u8 taskId)
if (AdjustQuantityAccordingToDPadInput(&data[8], data[2]) == TRUE)
{
- sub_81ABCC0(gUnknown_0203CE54->unk818, data[8], (itemid_get_market_price(gSpecialVar_ItemId) / 2) * data[8]);
+ sub_81ABCC0(gUnknown_0203CE54->unk818, data[8], (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8]);
}
else if (gMain.newKeys & A_BUTTON)
{
@@ -1825,7 +1825,7 @@ void sub_81AD84C(u8 taskId)
s16* data = gTasks[taskId].data;
CopyItemName(gSpecialVar_ItemId, gStringVar2);
- ConvertIntToDecimalStringN(gStringVar1, (itemid_get_market_price(gSpecialVar_ItemId) / 2) * data[8], 0, 6);
+ ConvertIntToDecimalStringN(gStringVar1, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8], 0, 6);
StringExpandPlaceholders(gStringVar4, gText_TurnedOverVar1ForVar2);
DisplayItemMessage(taskId, 1, gStringVar4, sub_81AD8C8);
}
@@ -1838,7 +1838,7 @@ void sub_81AD8C8(u8 taskId)
PlaySE(SE_REGI);
RemoveBagItem(gSpecialVar_ItemId, data[8]);
- AddMoney(&gSaveBlock1Ptr->money, (itemid_get_market_price(gSpecialVar_ItemId) / 2) * data[8]);
+ AddMoney(&gSaveBlock1Ptr->money, (ItemId_GetPrice(gSpecialVar_ItemId) / 2) * data[8]);
DestroyListMenuTask(data[0], scrollPos, cursorPos);
sub_81AB9A8(gUnknown_0203CE58.pocket);
sub_81ABA88(gUnknown_0203CE58.pocket);
@@ -1908,7 +1908,7 @@ void sub_81ADB14(u8 taskId)
s16* data = gTasks[taskId].data;
FillWindowPixelBuffer(1, 0);
- if (itemid_is_unique(gSpecialVar_ItemId))
+ if (ItemId_GetImportance(gSpecialVar_ItemId))
{
bag_menu_print(1, 1, gText_CantStoreImportantItems, 3, 1, 0, 0, 0, 0);
gTasks[taskId].func = sub_81ADC0C;
diff --git a/src/item_menu_icons.c b/src/item_menu_icons.c
index 1d9dbb106..f12bb454e 100644
--- a/src/item_menu_icons.c
+++ b/src/item_menu_icons.c
@@ -9,6 +9,9 @@
#include "berry.h"
#include "graphics.h"
#include "constants/items.h"
+#include "item.h"
+#include "item_use.h"
+#include "constants/hold_effects.h"
struct CompressedTilesPal
{
@@ -466,6 +469,9 @@ const struct SpriteTemplate gUnknown_0857FE88 =
.callback = sub_80D5B48,
};
+#include "data/text/item_descriptions.h"
+#include "data/items.h"
+
// code
void RemoveBagSprite(u8 id)
{
diff --git a/src/lilycove_lady.c b/src/lilycove_lady.c
index 812f1f975..ea244b6a0 100644
--- a/src/lilycove_lady.c
+++ b/src/lilycove_lady.c
@@ -392,7 +392,7 @@ bool8 sub_818DC60(void)
static void sub_818DCAC(u8 *dest, u16 itemId)
{
- StringCopy(dest, ItemId_GetItem(itemId)->name);
+ StringCopy(dest, ItemId_GetName(itemId));
}
void sub_818DCC8(void)
@@ -671,7 +671,7 @@ static u8 sub_818E258(const u8 *str)
void sub_818E274(void)
{
- StringCopy(gStringVar1, ItemId_GetItem(gUnknown_0203CD68->itemId)->name);
+ StringCopy(gStringVar1, ItemId_GetName(gUnknown_0203CD68->itemId));
}
bool8 sub_818E298(void)
diff --git a/src/load_save.c b/src/load_save.c
index e3de66bb8..917c1dfe1 100644
--- a/src/load_save.c
+++ b/src/load_save.c
@@ -4,33 +4,30 @@
#include "main.h"
#include "pokemon.h"
#include "random.h"
+#include "malloc.h"
+#include "item.h"
extern void* gUnknown_0203CF5C;
extern bool16 IdentifyFlash(void);
-extern void SetBagItemsPointers(void);
extern void SetDecorationInventoriesPointers(void);
extern void ApplyNewEncryptionKeyToGameStats(u32 key);
-extern void ApplyNewEncryptionKeyToBagItems(u32 newKey);
-extern void ApplyNewEncryptionKeyToBagItems_(u32 key);
extern void ApplyNewEncryptionKeyToBerryPowder(u32 key);
extern void sub_8084FAC(int unused);
-// this is probably wrong or misleading due to it being used in ResetHeap...
-extern void InitHeap(void *pointer, u32 size);
-
#define SAVEBLOCK_MOVE_RANGE 128
struct LoadedSaveData
{
- /*0x0000*/ struct ItemSlot items[30];
- /*0x0078*/ struct ItemSlot keyItems[30];
- /*0x00F0*/ struct ItemSlot pokeBalls[16];
- /*0x0130*/ struct ItemSlot TMsHMs[64];
- /*0x0230*/ struct ItemSlot berries[46];
+ /*0x0000*/ struct ItemSlot items[BAG_ITEMS_COUNT];
+ /*0x0078*/ struct ItemSlot keyItems[BAG_KEYITEMS_COUNT];
+ /*0x00F0*/ struct ItemSlot pokeBalls[BAG_POKEBALLS_COUNT];
+ /*0x0130*/ struct ItemSlot TMsHMs[BAG_TMHM_COUNT];
+ /*0x0230*/ struct ItemSlot berries[BAG_BERRIES_COUNT];
/*0x02E8*/ struct MailStruct mail[MAIL_COUNT];
};
+// EWRAM DATA
EWRAM_DATA struct SaveBlock2 gSaveblock2 = {0};
EWRAM_DATA u8 gSaveblock2_DMA[SAVEBLOCK_MOVE_RANGE] = {0};
@@ -43,8 +40,13 @@ EWRAM_DATA u8 gSaveblock3_DMA[SAVEBLOCK_MOVE_RANGE] = {0};
EWRAM_DATA struct LoadedSaveData gLoadedSaveData = {0};
EWRAM_DATA u32 gLastEncryptionKey = {0};
-void ApplyNewEncryptionKeyToAllEncryptedData(u32 encryptionKey);
+// IWRAM common
+IWRAM_DATA bool32 gFlashMemoryPresent;
+IWRAM_DATA struct SaveBlock1 *gSaveBlock1Ptr;
+IWRAM_DATA struct SaveBlock2 *gSaveBlock2Ptr;
+IWRAM_DATA struct PokemonStorage *gPokemonStoragePtr;
+// code
void CheckForFlashMemory(void)
{
if (!IdentifyFlash())
@@ -53,7 +55,9 @@ void CheckForFlashMemory(void)
InitFlashTimer();
}
else
+ {
gFlashMemoryPresent = FALSE;
+ }
}
void ClearSav2(void)
@@ -80,8 +84,6 @@ void SetSaveBlocksPointers(u16 offset)
SetDecorationInventoriesPointers();
}
-extern u8 gHeap[];
-
void MoveSaveBlocks_ResetHeap(void)
{
void *vblankCB, *hblankCB;
@@ -132,7 +134,6 @@ void MoveSaveBlocks_ResetHeap(void)
gSaveBlock2Ptr->encryptionKey = encryptionKey;
}
-
u32 GetSecretBase2Field_9(void)
{
return gSaveBlock2Ptr->specialSaveWarp & 1;
@@ -159,112 +160,112 @@ void sav2_gender2_inplace_and_xFE(void)
gSaveBlock2Ptr->specialSaveWarp &= ~1;
}
-void copy_player_party_to_sav1(void) // SavePlayerParty
+void SavePlayerParty(void)
{
int i;
gSaveBlock1Ptr->playerPartyCount = gPlayerPartyCount;
- for (i = 0; i < 6; i++)
+ for (i = 0; i < PARTY_SIZE; i++)
gSaveBlock1Ptr->playerParty[i] = gPlayerParty[i];
}
-void copy_player_party_from_sav1(void) // LoadPlayerParty
+void LoadPlayerParty(void)
{
int i;
gPlayerPartyCount = gSaveBlock1Ptr->playerPartyCount;
- for (i = 0; i < 6; i++)
+ for (i = 0; i < PARTY_SIZE; i++)
gPlayerParty[i] = gSaveBlock1Ptr->playerParty[i];
}
-void save_serialize_npcs(void) // SaveMapObjects
+void SaveMapObjects(void)
{
int i;
- for (i = 0; i < 16; i++)
+ for (i = 0; i < MAP_OBJECTS_COUNT; i++)
gSaveBlock1Ptr->mapObjects[i] = gMapObjects[i];
}
-void save_deserialize_npcs(void) // LoadMapObjects
+void LoadMapObjects(void)
{
int i;
- for (i = 0; i < 16; i++)
+ for (i = 0; i < MAP_OBJECTS_COUNT; i++)
gMapObjects[i] = gSaveBlock1Ptr->mapObjects[i];
}
void SaveSerializedGame(void)
{
- copy_player_party_to_sav1();
- save_serialize_npcs();
+ SavePlayerParty();
+ SaveMapObjects();
}
void LoadSerializedGame(void)
{
- copy_player_party_from_sav1();
- save_deserialize_npcs();
+ LoadPlayerParty();
+ LoadMapObjects();
}
-void copy_bags_and_unk_data_from_save_blocks(void)
+void LoadPlayerBag(void)
{
int i;
// load player items.
- for (i = 0; i < 30; i++)
+ for (i = 0; i < BAG_ITEMS_COUNT; i++)
gLoadedSaveData.items[i] = gSaveBlock1Ptr->bagPocket_Items[i];
// load player key items.
- for (i = 0; i < 30; i++)
+ for (i = 0; i < BAG_KEYITEMS_COUNT; i++)
gLoadedSaveData.keyItems[i] = gSaveBlock1Ptr->bagPocket_KeyItems[i];
// load player pokeballs.
- for (i = 0; i < 16; i++)
+ for (i = 0; i < BAG_POKEBALLS_COUNT; i++)
gLoadedSaveData.pokeBalls[i] = gSaveBlock1Ptr->bagPocket_PokeBalls[i];
// load player TMs and HMs.
- for (i = 0; i < 64; i++)
+ for (i = 0; i < BAG_TMHM_COUNT; i++)
gLoadedSaveData.TMsHMs[i] = gSaveBlock1Ptr->bagPocket_TMHM[i];
// load player berries.
- for (i = 0; i < 46; i++)
+ for (i = 0; i < BAG_BERRIES_COUNT; i++)
gLoadedSaveData.berries[i] = gSaveBlock1Ptr->bagPocket_Berries[i];
// load mail.
- for (i = 0; i < 16; i++)
+ for (i = 0; i < MAIL_COUNT; i++)
gLoadedSaveData.mail[i] = gSaveBlock1Ptr->mail[i];
gLastEncryptionKey = gSaveBlock2Ptr->encryptionKey;
}
-void copy_bags_and_unk_data_to_save_blocks(void)
+void SavePlayerBag(void)
{
int i;
u32 encryptionKeyBackup;
// save player items.
- for (i = 0; i < 30; i++)
+ for (i = 0; i < BAG_ITEMS_COUNT; i++)
gSaveBlock1Ptr->bagPocket_Items[i] = gLoadedSaveData.items[i];
// save player key items.
- for (i = 0; i < 30; i++)
+ for (i = 0; i < BAG_KEYITEMS_COUNT; i++)
gSaveBlock1Ptr->bagPocket_KeyItems[i] = gLoadedSaveData.keyItems[i];
// save player pokeballs.
- for (i = 0; i < 16; i++)
+ for (i = 0; i < BAG_POKEBALLS_COUNT; i++)
gSaveBlock1Ptr->bagPocket_PokeBalls[i] = gLoadedSaveData.pokeBalls[i];
// save player TMs and HMs.
- for (i = 0; i < 64; i++)
+ for (i = 0; i < BAG_TMHM_COUNT; i++)
gSaveBlock1Ptr->bagPocket_TMHM[i] = gLoadedSaveData.TMsHMs[i];
// save player berries.
- for (i = 0; i < 46; i++)
+ for (i = 0; i < BAG_BERRIES_COUNT; i++)
gSaveBlock1Ptr->bagPocket_Berries[i] = gLoadedSaveData.berries[i];
// save mail.
- for (i = 0; i < 16; i++)
+ for (i = 0; i < MAIL_COUNT; i++)
gSaveBlock1Ptr->mail[i] = gLoadedSaveData.mail[i];
encryptionKeyBackup = gSaveBlock2Ptr->encryptionKey;
diff --git a/src/mail.c b/src/mail.c
index 85ba86974..8fddc7045 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -101,7 +101,7 @@ struct MailRead
/*0x021c*/ u8 monIconSprite;
/*0x021d*/ u8 language;
/*0x021e*/ bool8 playerIsSender;
- /*0x0220*/ void (*parserSingle)(u8 *dest, u16 word);
+ /*0x0220*/ u8 * (*parserSingle)(u8 *dest, u16 word);
/*0x0224*/ void (*parserMultiple)(u8 *dest, const u16 *src, u16 length1, u16 length2);
/*0x0228*/ const struct MailLayout *layout;
/*0x022c*/ u8 bg1TilemapBuffer[0x1000];
diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c
new file mode 100644
index 000000000..ea466b2ec
--- /dev/null
+++ b/src/mauville_old_man.c
@@ -0,0 +1,1247 @@
+#include "global.h"
+#include "main.h"
+#include "constants/songs.h"
+#include "constants/easy_chat.h"
+#include "constants/map_objects.h"
+#include "constants/vars.h"
+#include "mauville_old_man.h"
+#include "event_data.h"
+#include "string_util.h"
+#include "text.h"
+#include "easy_chat.h"
+#include "script.h"
+#include "random.h"
+#include "event_scripts.h"
+#include "task.h"
+#include "menu.h"
+#include "m4a.h"
+#include "bard_music.h"
+#include "sound.h"
+#include "strings.h"
+#include "overworld.h"
+#include "field_message_box.h"
+#include "script_menu.h"
+#include "trader.h"
+
+#define CHAR_SONG_WORD_SEPARATOR 0x37
+
+extern struct MusicPlayerInfo gMPlayInfo_SE2;
+
+static void InitGiddyTaleList(void);
+static void StartBardSong(bool8 useTemporaryLyrics);
+static void Task_BardSong(u8 taskId);
+static void StorytellerSetup(void);
+static void Storyteller_ResetFlag(void);
+
+IWRAM_DATA u8 sSelectedStory;
+
+struct BardSong gBardSong;
+
+static EWRAM_DATA u16 sUnknownBardRelated = 0;
+static EWRAM_DATA struct MauvilleManStoryteller * sStorytellerPtr = NULL;
+static EWRAM_DATA u8 sStorytellerWindowId = 0;
+
+static const u16 sDefaultBardSongLyrics[6] = {
+ EC_WORD_SHAKE,
+ EC_WORD_IT,
+ EC_WORD_DO,
+ EC_WORD_THE,
+ EC_WORD_DIET,
+ EC_WORD_DANCE
+};
+
+static const u8 * const sGiddyAdjectives[] = {
+ gText_SoPretty,
+ gText_SoDarling,
+ gText_SoRelaxed,
+ gText_SoSunny,
+ gText_SoDesirable,
+ gText_SoExciting,
+ gText_SoAmusing,
+ gText_SoMagical
+};
+
+static const u8 * const sGiddyQuestions[] = {
+ gUnknown_08294313,
+ gUnknown_08294359,
+ gUnknown_08294398,
+ gUnknown_082943DA,
+ gUnknown_0829441C,
+ gUnknown_08294460,
+ gUnknown_082944A0,
+ gUnknown_082944D5
+};
+
+static void SetupBard(void)
+{
+ u16 i;
+ struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
+
+ bard->id = MAUVILLE_MAN_BARD;
+ bard->hasChangedSong = FALSE;
+ bard->language = gGameLanguage;
+ for (i = 0; i < 6; i++)
+ bard->songLyrics[i] = sDefaultBardSongLyrics[i];
+}
+
+static void SetupHipster(void)
+{
+ struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster;
+
+ hipster->id = MAUVILLE_MAN_HIPSTER;
+ hipster->alreadySpoken = FALSE;
+ hipster->language = gGameLanguage;
+}
+
+static void SetupStoryteller(void)
+{
+ StorytellerSetup();
+}
+
+static void SetupGiddy(void)
+{
+ struct MauvilleManGiddy *giddy = &gSaveBlock1Ptr->oldMan.giddy;
+
+ giddy->id = MAUVILLE_MAN_GIDDY;
+ giddy->taleCounter = 0;
+ giddy->language = gGameLanguage;
+}
+
+static void SetupTrader(void)
+{
+ TraderSetup();
+}
+
+void SetMauvilleOldMan(void)
+{
+ u16 trainerId = (gSaveBlock2Ptr->playerTrainerId[1] << 8) | gSaveBlock2Ptr->playerTrainerId[0];
+
+
+ // Determine man based on the last digit of the player's trainer ID.
+ switch ((trainerId % 10) / 2)
+ {
+ case MAUVILLE_MAN_BARD:
+ SetupBard();
+ break;
+ case MAUVILLE_MAN_HIPSTER:
+ SetupHipster();
+ break;
+ case MAUVILLE_MAN_TRADER:
+ SetupTrader();
+ break;
+ case MAUVILLE_MAN_STORYTELLER:
+ SetupStoryteller();
+ break;
+ case MAUVILLE_MAN_GIDDY:
+ SetupGiddy();
+ break;
+ }
+ ScrSpecial_SetMauvilleOldManMapObjGfx();
+}
+
+u8 GetCurrentMauvilleOldMan(void)
+{
+ struct MauvilleManCommon *common = &gSaveBlock1Ptr->oldMan.common;
+
+ return common->id;
+}
+
+void ScrSpecial_GetCurrentMauvilleMan(void)
+{
+ gSpecialVar_Result = GetCurrentMauvilleOldMan();
+}
+
+void ScrSpecial_HasBardSongBeenChanged(void)
+{
+ u16 *scriptResult = &gSpecialVar_Result; // why??
+ struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
+
+ *scriptResult = bard->hasChangedSong;
+}
+
+void ScrSpecial_SaveBardSongLyrics(void)
+{
+ u16 i;
+ struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
+
+ StringCopy(bard->playerName, gSaveBlock2Ptr->playerName);
+
+ for (i = 0; i < 4; i++)
+ bard->playerTrainerId[i] = gSaveBlock2Ptr->playerTrainerId[i];
+
+ for (i = 0; i < 6; i++)
+ bard->songLyrics[i] = bard->temporaryLyrics[i];
+
+ bard->hasChangedSong = TRUE;
+}
+
+// Copies lyrics into gStringVar4
+static void PrepareSongText(void)
+{
+ struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
+ u16 * lyrics = gSpecialVar_0x8004 == 0 ? bard->songLyrics : bard->temporaryLyrics;
+ u8 * wordEnd = gStringVar4;
+ u8 * str = wordEnd;
+ u16 lineNum;
+
+ // Put three words on each line
+ for (lineNum = 0; lineNum < 2; lineNum++)
+ {
+ wordEnd = CopyEasyChatWord(wordEnd, *(lyrics++));
+ while (wordEnd != str)
+ {
+ if (*str == CHAR_SPACE)
+ *str = CHAR_SONG_WORD_SEPARATOR;
+ str++;
+ }
+
+ str++;
+ *(wordEnd++) = CHAR_SPACE;
+
+ wordEnd = CopyEasyChatWord(wordEnd, *(lyrics++));
+ while (wordEnd != str)
+ {
+ if (*str == CHAR_SPACE)
+ *str = CHAR_SONG_WORD_SEPARATOR;
+ str++;
+ }
+
+ str++;
+ *(wordEnd++) = CHAR_NEWLINE;
+
+ wordEnd = CopyEasyChatWord(wordEnd, *(lyrics++));
+ while (wordEnd != str)
+ {
+ if (*str == CHAR_SPACE)
+ *str = CHAR_SONG_WORD_SEPARATOR;
+ str++;
+ }
+
+ if (lineNum == 0)
+ {
+ *(wordEnd++) = EXT_CTRL_CODE_BEGIN;
+ *(wordEnd++) = 15;
+ }
+ }
+}
+
+void ScrSpecial_PlayBardSong(void)
+{
+ StartBardSong(gSpecialVar_0x8004);
+ ScriptContext1_Stop();
+}
+
+void ScrSpecial_GetHipsterSpokenFlag(void)
+{
+ u16 *scriptResult = &gSpecialVar_Result; // again??
+ struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster;
+
+ *scriptResult = hipster->alreadySpoken;
+}
+
+void ScrSpecial_SetHipsterSpokenFlag(void)
+{
+ struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster;
+
+ hipster->alreadySpoken = TRUE;
+}
+
+void ScrSpecial_HipsterTeachWord(void)
+{
+ u16 var = sub_811F01C();
+
+ if (var == 0xFFFF)
+ {
+ gSpecialVar_Result = FALSE;
+ }
+ else
+ {
+ CopyEasyChatWord(gStringVar1, var);
+ gSpecialVar_Result = TRUE;
+ }
+}
+
+void ScrSpecial_GiddyShouldTellAnotherTale(void)
+{
+ struct MauvilleManGiddy *giddy = &gSaveBlock1Ptr->oldMan.giddy;
+
+ if (giddy->taleCounter == 10)
+ {
+ gSpecialVar_Result = FALSE;
+ giddy->taleCounter = 0;
+ }
+ else
+ {
+ gSpecialVar_Result = TRUE;
+ }
+}
+
+void ScrSpecial_GenerateGiddyLine(void)
+{
+ struct MauvilleManGiddy *giddy = &gSaveBlock1Ptr->oldMan.giddy;
+
+ if (giddy->taleCounter == 0)
+ InitGiddyTaleList();
+
+ if (giddy->randomWords[giddy->taleCounter] != 0xFFFF) // is not the last element of the array?
+ {
+ u8 *stringPtr;
+ u32 adjective = Random();
+
+ adjective %= 8;
+ stringPtr = CopyEasyChatWord(gStringVar4, giddy->randomWords[giddy->taleCounter]);
+ stringPtr = StringCopy(stringPtr, gOtherText_Is);
+ stringPtr = StringCopy(stringPtr, sGiddyAdjectives[adjective]);
+ StringCopy(stringPtr, gOtherText_DontYouAgree);
+ }
+ else
+ {
+ StringCopy(gStringVar4, sGiddyQuestions[giddy->questionList[giddy->questionNum++]]);
+ }
+
+ if (!(Random() % 10))
+ giddy->taleCounter = 10;
+ else
+ giddy->taleCounter++;
+
+ gSpecialVar_Result = TRUE;
+}
+
+static void InitGiddyTaleList(void)
+{
+ struct MauvilleManGiddy *giddy = &gSaveBlock1Ptr->oldMan.giddy;
+ u16 arr[][2] = {
+ {EC_GROUP_POKEMON, 0},
+ {EC_GROUP_LIFESTYLE, 0},
+ {EC_GROUP_HOBBIES, 0},
+ {EC_GROUP_MOVE_1, 0},
+ {EC_GROUP_MOVE_2, 0},
+ {EC_GROUP_POKEMON_2, 0}
+ };
+ u16 i;
+ u16 r10;
+ u16 r7;
+ u16 r1;
+
+ for (i = 0; i < 8; i++)
+ giddy->questionList[i] = i;
+
+ for (i = 0; i < 8; i++)
+ {
+ r1 = Random() % (i + 1);
+ r7 = giddy->questionList[i];
+ giddy->questionList[i] = giddy->questionList[r1];
+ giddy->questionList[r1] = r7;
+ }
+
+ r10 = 0;
+ for (i = 0; i < 6; i++)
+ {
+ arr[i][1] = EasyChat_GetNumWordsInGroup(arr[i][0]);
+ r10 += arr[i][1];
+ }
+
+ giddy->questionNum = 0;
+ r7 = 0;
+ for (i = 0; i < 10; i++)
+ {
+ r1 = Random() % 10;
+ if (r1 < 3 && r7 < 8)
+ {
+ giddy->randomWords[i] = 0xFFFF;
+ r7++;
+ }
+ else
+ {
+ s16 r2 = Random() % r10;
+ for (r1 = 0; i < 6; r1++)
+ if ((r2 -= arr[r1][1]) <= 0)
+ break;
+ if (r1 == 6)
+ r1 = 0;
+ giddy->randomWords[i] = sub_811EE90(arr[r1][0]);
+ }
+ }
+}
+static void ResetBardFlag(void)
+{
+ struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
+
+ bard->hasChangedSong = FALSE;
+}
+
+static void ResetHipsterFlag(void)
+{
+ struct MauvilleManHipster *hipster = &gSaveBlock1Ptr->oldMan.hipster;
+
+ hipster->alreadySpoken = FALSE;
+}
+
+static void ResetTraderFlag(void)
+{
+ Trader_ResetFlag();
+}
+
+static void ResetStorytellerFlag(void)
+{
+ Storyteller_ResetFlag();
+}
+
+void ResetMauvilleOldManFlag(void) // ResetMauvilleOldManFlag
+{
+ switch (GetCurrentMauvilleOldMan())
+ {
+ case MAUVILLE_MAN_BARD:
+ ResetBardFlag();
+ break;
+ case MAUVILLE_MAN_HIPSTER:
+ ResetHipsterFlag();
+ break;
+ case MAUVILLE_MAN_STORYTELLER:
+ ResetStorytellerFlag();
+ break;
+ case MAUVILLE_MAN_TRADER:
+ ResetTraderFlag();
+ break;
+ case MAUVILLE_MAN_GIDDY:
+ break;
+ }
+ ScrSpecial_SetMauvilleOldManMapObjGfx();
+}
+
+
+#define tState data[0]
+#define tCharIndex data[3]
+#define tCurrWord data[4]
+#define tUseTemporaryLyrics data[5]
+
+#define MACRO1(a) (((a) & 3) + (((a) / 8) & 1))
+#define MACRO2(a) (((a) % 4) + (((a) / 8) & 1))
+
+static void StartBardSong(bool8 useTemporaryLyrics)
+{
+ u8 taskId = CreateTask(Task_BardSong, 80);
+
+ gTasks[taskId].tUseTemporaryLyrics = useTemporaryLyrics;
+}
+
+static void sub_81206F0(void)
+{
+ gUnknown_03002F84 = FALSE;
+}
+
+static void BardSong_TextSubPrinter(struct TextSubPrinter * printer, u16 a1)
+{
+ gUnknown_03002F84 = TRUE;
+}
+
+static void sub_8120708(const u8 * src)
+{
+ NewMenuHelpers_DrawDialogueFrame(0, 0);
+ PrintTextOnWindow(0, 1, src, 0, 1, 1, BardSong_TextSubPrinter);
+ gUnknown_03002F84 = TRUE;
+ CopyWindowToVram(0, 3);
+}
+
+static void BardSing(struct Task *task, struct BardSong *song)
+{
+ switch (task->tState)
+ {
+ case 0: // Initialize song
+ {
+ struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
+ u16 *lyrics;
+ s32 i;
+
+ // Copy lyrics
+ if (gSpecialVar_0x8004 == 0)
+ lyrics = bard->songLyrics;
+ else
+ lyrics = bard->temporaryLyrics;
+ for (i = 0; i < 6; i++)
+ song->lyrics[i] = lyrics[i];
+ song->currWord = 0;
+ }
+ break;
+ case 1: // Wait for BGM to end
+ break;
+ case 2: // Initialize word
+ {
+ u16 word = song->lyrics[song->currWord];
+ song->sound = GetWordSounds(word);
+ GetWordPhonemes(song, MACRO1(word));
+ song->currWord++;
+ if (song->sound->var00 != 0xFF)
+ song->state = 0;
+ else
+ {
+ song->state = 3;
+ song->phonemeTimer = 2;
+ }
+ break;
+ }
+ case 3:
+ case 4:
+ {
+ const struct BardSound *sound = &song->sound[song->currPhoneme];
+
+ switch (song->state)
+ {
+ case 0:
+ song->phonemeTimer = song->phonemes[song->currPhoneme].length;
+ if (sound->var00 <= 50)
+ {
+ u8 num = sound->var00 / 3;
+ m4aSongNumStart(PH_TRAP_HELD + 3 * num);
+ }
+ song->state = 2;
+ song->phonemeTimer--;
+ break;
+ case 2:
+ song->state = 1;
+ if (sound->var00 <= 50)
+ {
+ song->volume = 0x100 + sound->volume * 16;
+ m4aMPlayVolumeControl(&gMPlayInfo_SE2, 0xFFFF, song->volume);
+ song->pitch = 0x200 + song->phonemes[song->currPhoneme].pitch;
+ m4aMPlayPitchControl(&gMPlayInfo_SE2, 0xFFFF, song->pitch);
+ }
+ break;
+ case 1:
+ if (song->voiceInflection > 10)
+ song->volume -= 2;
+ if (song->voiceInflection & 1)
+ song->pitch += 64;
+ else
+ song->pitch -= 64;
+ m4aMPlayVolumeControl(&gMPlayInfo_SE2, 0xFFFF, song->volume);
+ m4aMPlayPitchControl(&gMPlayInfo_SE2, 0xFFFF, song->pitch);
+ song->voiceInflection++;
+ song->phonemeTimer--;
+ if (song->phonemeTimer == 0)
+ {
+ song->currPhoneme++;
+ if (song->currPhoneme != 6 && song->sound[song->currPhoneme].var00 != 0xFF)
+ song->state = 0;
+ else
+ {
+ song->state = 3;
+ song->phonemeTimer = 2;
+ }
+ }
+ break;
+ case 3:
+ song->phonemeTimer--;
+ if (song->phonemeTimer == 0)
+ {
+ m4aMPlayStop(&gMPlayInfo_SE2);
+ song->state = 4;
+ }
+ break;
+ }
+ }
+ break;
+ case 5:
+ break;
+ }
+}
+
+static void Task_BardSong(u8 taskId)
+{
+ struct Task *task = &gTasks[taskId]; // r5
+
+ BardSing(task, &gBardSong);
+ switch (task->tState)
+ {
+ case 0: // Initialize song
+ PrepareSongText();
+ sub_8120708(gStringVar4);
+ task->data[1] = 0;
+ task->data[2] = 0;
+ task->tCharIndex = 0;
+ task->tCurrWord = 0;
+ FadeOutBGMTemporarily(4);
+ task->tState = 1;
+ break;
+ case 1: // Wait for BGM to end
+ if (IsBGMPausedOrStopped())
+ task->tState = 2;
+ break;
+ case 2: // Initialize word
+ {
+ struct MauvilleManBard *bard = &gSaveBlock1Ptr->oldMan.bard;
+ u8 *str = gStringVar4 + task->tCharIndex;
+ u16 wordLen = 0;
+ // Can't get it to match without hacking
+ u32 temp;
+ register s16 zero asm("r1");
+
+ while (*str != CHAR_SPACE
+ && *str != CHAR_NEWLINE
+ && *str != EXT_CTRL_CODE_BEGIN
+ && *str != EOS)
+ {
+ str++;
+ wordLen++;
+ }
+ if (!task->tUseTemporaryLyrics)
+ sUnknownBardRelated = MACRO2(bard->songLyrics[task->tCurrWord]);
+ else
+ sUnknownBardRelated = MACRO2(bard->temporaryLyrics[task->tCurrWord]);
+ temp = gBardSong.length / wordLen;
+ zero = 0;
+ gBardSong.length = temp;
+ if (gBardSong.length <= 0)
+ gBardSong.length = 1;
+ task->tCurrWord++;
+ if (task->data[2] == 0)
+ task->tState = 3;
+ else
+ task->tState = 5;
+ task->data[1] = zero;
+ }
+ break;
+ case 5:
+ if (task->data[2] == 0)
+ task->tState = 3;
+ else
+ task->data[2]--;
+ break;
+ case 3:
+ if (gStringVar4[task->tCharIndex] == EOS)
+ {
+ FadeInBGM(6);
+ m4aMPlayFadeOutTemporarily(&gMPlayInfo_SE2, 2);
+ EnableBothScriptContexts();
+ DestroyTask(taskId);
+ }
+ else if (gStringVar4[task->tCharIndex] == CHAR_SPACE)
+ {
+
+ sub_81206F0();
+ task->tCharIndex++;
+ task->tState = 2;
+ task->data[2] = 0;
+ }
+ else if (gStringVar4[task->tCharIndex] == CHAR_NEWLINE)
+ {
+ task->tCharIndex++;
+ task->tState = 2;
+ task->data[2] = 0;
+ }
+ else if (gStringVar4[task->tCharIndex] == EXT_CTRL_CODE_BEGIN)
+ {
+ task->tCharIndex += 2; // skip over control codes
+ task->tState = 2;
+ task->data[2] = 8;
+ }
+ else if (gStringVar4[task->tCharIndex] == CHAR_SONG_WORD_SEPARATOR)
+ {
+ gStringVar4[task->tCharIndex] = CHAR_SPACE; // restore it back to a space
+ sub_81206F0();
+ task->tCharIndex++;
+ task->data[2] = 0;
+ }
+ else
+ {
+ switch (task->data[1])
+ {
+ case 0:
+ sub_81206F0();
+ task->data[1]++;
+ break;
+ case 1:
+ task->data[1]++;
+ break;
+ case 2:
+ task->tCharIndex++;
+ task->data[1] = 0;
+ task->data[2] = gBardSong.length;
+ task->tState = 4;
+ break;
+ }
+ }
+ break;
+ case 4:
+ task->data[2]--;
+ if (task->data[2] == 0)
+ task->tState = 3;
+ break;
+ }
+ sub_8197224();
+}
+
+void ScrSpecial_SetMauvilleOldManMapObjGfx(void)
+{
+ VarSet(VAR_0x4010, MAP_OBJ_GFX_BARD);
+}
+
+// Language fixers?
+
+void sub_8120B70(union OldMan * oldMan)
+{
+ s32 i;
+ u8 sp00[8];
+
+ switch (oldMan->common.id)
+ {
+ case MAUVILLE_MAN_TRADER:
+ {
+ struct MauvilleOldManTrader * trader = &oldMan->trader;
+ for (i = 0; i < 4; i++)
+ {
+ if (trader->language[i] == LANGUAGE_JAPANESE)
+ {
+ ConvertInternationalString(trader->playerNames[i], LANGUAGE_JAPANESE);
+ }
+ }
+ }
+ break;
+ case MAUVILLE_MAN_STORYTELLER:
+ {
+ struct MauvilleManStoryteller * storyteller = &oldMan->storyteller;
+ for (i = 0; i < 4; i++)
+ {
+ if (storyteller->gameStatIDs[i] != 0)
+ {
+ memcpy(sp00, storyteller->trainerNames[i], 7);
+ sp00[7] = EOS;
+ if (IsStringJapanese(sp00))
+ {
+ memset(sp00, CHAR_SPACE, 8);
+ StringCopy(sp00, gText_Friend);
+ memcpy(storyteller->trainerNames[i], sp00, 7);
+ storyteller->language[i] = GAME_LANGUAGE;
+ }
+ }
+ }
+ }
+ break;
+ }
+}
+
+void sub_8120C0C(union OldMan * oldMan, u32 r8, u32 r7, u32 r3)
+{
+ s32 i;
+
+ switch (oldMan->common.id)
+ {
+ case MAUVILLE_MAN_TRADER:
+ {
+ struct MauvilleOldManTrader * trader = &oldMan->trader;
+
+ for (i = 0; i < 4; i++)
+ {
+ if (IsStringJapanese(trader->playerNames[i]))
+ {
+ trader->language[i] = r8;
+ }
+ else
+ {
+ trader->language[i] = r7;
+ }
+ }
+ }
+ break;
+ case MAUVILLE_MAN_STORYTELLER:
+ {
+ struct MauvilleManStoryteller * storyteller = &oldMan->storyteller;
+
+ for (i = 0; i < 4; i++)
+ {
+ if (IsStringJapanese(storyteller->trainerNames[i]))
+ {
+ storyteller->language[i] = r8;
+ }
+ else
+ {
+ storyteller->language[i] = r7;
+ }
+ }
+ }
+ break;
+ case MAUVILLE_MAN_BARD:
+ {
+ struct MauvilleManBard * bard = &oldMan->bard;
+
+ if (r3 == LANGUAGE_JAPANESE)
+ bard->language = r8;
+ else
+ bard->language = r7;
+ }
+ break;
+ case MAUVILLE_MAN_HIPSTER:
+ {
+ struct MauvilleManHipster * hipster = &oldMan->hipster;
+
+ if (r3 == LANGUAGE_JAPANESE)
+ hipster->language = r8;
+ else
+ hipster->language = r7;
+ }
+ break;
+ case MAUVILLE_MAN_GIDDY:
+ {
+ struct MauvilleManGiddy * giddy = &oldMan->giddy;
+
+ if (r3 == LANGUAGE_JAPANESE)
+ giddy->language = r8;
+ else
+ giddy->language = r7;
+ }
+ break;
+ }
+}
+
+void sub_8120CD0(union OldMan * oldMan, u32 unused, u32 a2)
+{
+ u8 sp00[8];
+ s32 i;
+ if (oldMan->common.id == MAUVILLE_MAN_STORYTELLER && a2 == LANGUAGE_JAPANESE)
+ {
+ struct MauvilleManStoryteller * storyteller = &oldMan->storyteller;
+
+ for (i = 0; i < 4; i++)
+ {
+ if (storyteller->gameStatIDs[i] != 0)
+ {
+ memcpy(sp00, storyteller->trainerNames[i], 7);
+ sp00[7] = EOS;
+ if (IsStringJapanese(sp00))
+ storyteller->language[i] = LANGUAGE_JAPANESE;
+ else
+ storyteller->language[i] = GAME_LANGUAGE;
+ }
+ }
+ }
+}
+
+void sub_8120D34(union OldMan * oldMan, u32 r1, u32 r6)
+{
+ u32 r2 = (r1 == LANGUAGE_JAPANESE || r1 == LANGUAGE_ENGLISH) ? 1 : 0;
+ switch (oldMan->common.id)
+ {
+ case MAUVILLE_MAN_TRADER:
+ {
+ struct MauvilleOldManTrader * trader = &oldMan->trader;
+ s32 i;
+
+ if (r2)
+ {
+ for (i = 0; i < 4; i++)
+ {
+ u8 * str = trader->playerNames[i];
+ if (str[0] == EXT_CTRL_CODE_BEGIN && str[1] == EXT_CTRL_CODE_JPN)
+ {
+ StripExtCtrlCodes(str);
+ trader->language[i] = LANGUAGE_JAPANESE;
+ }
+ else
+ trader->language[i] = r6;
+ }
+ }
+ else
+ {
+ for (i = 0; i < 4; i++)
+ {
+ if (trader->language[i] == LANGUAGE_JAPANESE)
+ {
+ StripExtCtrlCodes(trader->playerNames[i]);
+ }
+ }
+ }
+ }
+ break;
+ case MAUVILLE_MAN_STORYTELLER:
+ {
+
+ struct MauvilleManStoryteller * storyteller = &oldMan->storyteller;
+ s32 i;
+
+ if (r2)
+ {
+ for (i = 0; i < 4; i++)
+ {
+ if (storyteller->gameStatIDs[i] != 0)
+ storyteller->language[i] = r6;
+ }
+ }
+ }
+ break;
+ case MAUVILLE_MAN_BARD:
+ {
+ struct MauvilleManBard * bard = &oldMan->bard;
+
+ if (r2)
+ {
+ bard->language = r6;
+ }
+ }
+ break;
+ case MAUVILLE_MAN_HIPSTER:
+ {
+ struct MauvilleManHipster * hipster = &oldMan->hipster;
+
+ if (r2)
+ {
+ hipster->language = r6;
+ }
+ }
+ break;
+ case MAUVILLE_MAN_GIDDY:
+ {
+ struct MauvilleManGiddy * giddy = &oldMan->giddy;
+
+ if (r2)
+ {
+ giddy->language = r6;
+ }
+ }
+ break;
+ }
+}
+
+struct Story
+{
+ u8 stat;
+ u8 minVal;
+ const u8 *title;
+ const u8 *action;
+ const u8 *fullText;
+};
+
+static const struct Story sStorytellerStories[] = {
+ {GAME_STAT_50, 1, MauvilleCity_PokemonCenter_1F_Text_28E930, MauvilleCity_PokemonCenter_1F_Text_28E947, MauvilleCity_PokemonCenter_1F_Text_28E956},
+ {GAME_STAT_STARTED_TRENDS, 1, MauvilleCity_PokemonCenter_1F_Text_28E9D7, MauvilleCity_PokemonCenter_1F_Text_28E9EF, MauvilleCity_PokemonCenter_1F_Text_28E9FE},
+ {GAME_STAT_PLANTED_BERRIES, 1, MauvilleCity_PokemonCenter_1F_Text_28EA7D, MauvilleCity_PokemonCenter_1F_Text_28EA98, MauvilleCity_PokemonCenter_1F_Text_28EAA8},
+ {GAME_STAT_TRADED_BIKES, 1, MauvilleCity_PokemonCenter_1F_Text_28EB19, MauvilleCity_PokemonCenter_1F_Text_28EB31, MauvilleCity_PokemonCenter_1F_Text_28EB3E},
+ {GAME_STAT_GOT_INTERVIEWED, 1, MauvilleCity_PokemonCenter_1F_Text_28EBB5, MauvilleCity_PokemonCenter_1F_Text_28EBCD, MauvilleCity_PokemonCenter_1F_Text_28EBDD},
+ {GAME_STAT_TRAINER_BATTLES, 1, MauvilleCity_PokemonCenter_1F_Text_28EC60, MauvilleCity_PokemonCenter_1F_Text_28EC79, MauvilleCity_PokemonCenter_1F_Text_28EC81},
+ {GAME_STAT_POKEMON_CAPTURES, 1, MauvilleCity_PokemonCenter_1F_Text_28ED04, MauvilleCity_PokemonCenter_1F_Text_28ED21, MauvilleCity_PokemonCenter_1F_Text_28ED30},
+ {GAME_STAT_FISHING_CAPTURES, 1, MauvilleCity_PokemonCenter_1F_Text_28EDA1, MauvilleCity_PokemonCenter_1F_Text_28EDB5, MauvilleCity_PokemonCenter_1F_Text_28EDCF},
+ {GAME_STAT_HATCHED_EGGS, 1, MauvilleCity_PokemonCenter_1F_Text_28EE45, MauvilleCity_PokemonCenter_1F_Text_28EE5D, MauvilleCity_PokemonCenter_1F_Text_28EE6A},
+ {GAME_STAT_EVOLVED_POKEMON, 1, MauvilleCity_PokemonCenter_1F_Text_28EEDD, MauvilleCity_PokemonCenter_1F_Text_28EEF1, MauvilleCity_PokemonCenter_1F_Text_28EF01},
+ {GAME_STAT_USED_POKECENTER, 1, MauvilleCity_PokemonCenter_1F_Text_28EF73, MauvilleCity_PokemonCenter_1F_Text_28EF95, MauvilleCity_PokemonCenter_1F_Text_28EFAA},
+ {GAME_STAT_RESTED_AT_HOME, 1, MauvilleCity_PokemonCenter_1F_Text_28F045, MauvilleCity_PokemonCenter_1F_Text_28F05A, MauvilleCity_PokemonCenter_1F_Text_28F071},
+ {GAME_STAT_ENTERED_SAFARI_ZONE, 1, MauvilleCity_PokemonCenter_1F_Text_28F0F3, MauvilleCity_PokemonCenter_1F_Text_28F10D, MauvilleCity_PokemonCenter_1F_Text_28F125},
+ {GAME_STAT_USED_CUT, 1, MauvilleCity_PokemonCenter_1F_Text_28F1BE, MauvilleCity_PokemonCenter_1F_Text_28F1D5, MauvilleCity_PokemonCenter_1F_Text_28F1DE},
+ {GAME_STAT_USED_ROCK_SMASH, 1, MauvilleCity_PokemonCenter_1F_Text_28F24F, MauvilleCity_PokemonCenter_1F_Text_28F269, MauvilleCity_PokemonCenter_1F_Text_28F277},
+ {GAME_STAT_MOVED_SECRET_BASE, 1, MauvilleCity_PokemonCenter_1F_Text_28F2FC, MauvilleCity_PokemonCenter_1F_Text_28F314, MauvilleCity_PokemonCenter_1F_Text_28F32A},
+ {GAME_STAT_USED_SPLASH, 1, MauvilleCity_PokemonCenter_1F_Text_28F3AD, MauvilleCity_PokemonCenter_1F_Text_28F3C6, MauvilleCity_PokemonCenter_1F_Text_28F3D2},
+ {GAME_STAT_USED_STRUGGLE, 1, MauvilleCity_PokemonCenter_1F_Text_28F44B, MauvilleCity_PokemonCenter_1F_Text_28F461, MauvilleCity_PokemonCenter_1F_Text_28F47C},
+ {GAME_STAT_SLOT_JACKPOTS, 1, MauvilleCity_PokemonCenter_1F_Text_28F50C, MauvilleCity_PokemonCenter_1F_Text_28F51B, MauvilleCity_PokemonCenter_1F_Text_28F538},
+ {GAME_STAT_CONSECUTIVE_ROULETTE_WINS, 2, MauvilleCity_PokemonCenter_1F_Text_28F5BE, MauvilleCity_PokemonCenter_1F_Text_28F5D1, MauvilleCity_PokemonCenter_1F_Text_28F5F2},
+ {GAME_STAT_ENTERED_BATTLE_TOWER, 1, MauvilleCity_PokemonCenter_1F_Text_28F678, MauvilleCity_PokemonCenter_1F_Text_28F694, MauvilleCity_PokemonCenter_1F_Text_28F6B4},
+ {GAME_STAT_POKEBLOCKS, 1, MauvilleCity_PokemonCenter_1F_Text_28F751, MauvilleCity_PokemonCenter_1F_Text_28F76A, MauvilleCity_PokemonCenter_1F_Text_28F776},
+ {GAME_STAT_ENTERED_CONTEST, 1, MauvilleCity_PokemonCenter_1F_Text_28F7F6, MauvilleCity_PokemonCenter_1F_Text_28F811, MauvilleCity_PokemonCenter_1F_Text_28F822},
+ {GAME_STAT_WON_CONTEST, 1, MauvilleCity_PokemonCenter_1F_Text_28F89C, MauvilleCity_PokemonCenter_1F_Text_28F8AF, MauvilleCity_PokemonCenter_1F_Text_28F8BC},
+ {GAME_STAT_SHOPPED, 1, MauvilleCity_PokemonCenter_1F_Text_28F92F, MauvilleCity_PokemonCenter_1F_Text_28F941, MauvilleCity_PokemonCenter_1F_Text_28F949},
+ {GAME_STAT_USED_ITEMFINDER, 1, MauvilleCity_PokemonCenter_1F_Text_28F9D1, MauvilleCity_PokemonCenter_1F_Text_28F9EA, MauvilleCity_PokemonCenter_1F_Text_28F9FD},
+ {GAME_STAT_GOT_RAINED_ON, 1, MauvilleCity_PokemonCenter_1F_Text_28FA81, MauvilleCity_PokemonCenter_1F_Text_28FA99, MauvilleCity_PokemonCenter_1F_Text_28FAA7},
+ {GAME_STAT_CHECKED_POKEDEX, 1, MauvilleCity_PokemonCenter_1F_Text_28FB1D, MauvilleCity_PokemonCenter_1F_Text_28FB35, MauvilleCity_PokemonCenter_1F_Text_28FB47},
+ {GAME_STAT_RECEIVED_RIBBONS, 1, MauvilleCity_PokemonCenter_1F_Text_28FBC4, MauvilleCity_PokemonCenter_1F_Text_28FBD9, MauvilleCity_PokemonCenter_1F_Text_28FBEA},
+ {GAME_STAT_JUMPED_DOWN_LEDGES, 1, MauvilleCity_PokemonCenter_1F_Text_28FC6B, MauvilleCity_PokemonCenter_1F_Text_28FC85, MauvilleCity_PokemonCenter_1F_Text_28FC98},
+ {GAME_STAT_WATCHED_TV, 1, MauvilleCity_PokemonCenter_1F_Text_28FD1D, MauvilleCity_PokemonCenter_1F_Text_28FD35, MauvilleCity_PokemonCenter_1F_Text_28FD40},
+ {GAME_STAT_CHECKED_CLOCK, 1, MauvilleCity_PokemonCenter_1F_Text_28FDA2, MauvilleCity_PokemonCenter_1F_Text_28FDBD, MauvilleCity_PokemonCenter_1F_Text_28FDCE},
+ {GAME_STAT_WON_POKEMON_LOTTERY, 1, MauvilleCity_PokemonCenter_1F_Text_28FE57, MauvilleCity_PokemonCenter_1F_Text_28FE72, MauvilleCity_PokemonCenter_1F_Text_28FE88},
+ {GAME_STAT_USED_DAYCARE, 1, MauvilleCity_PokemonCenter_1F_Text_28FF0C, MauvilleCity_PokemonCenter_1F_Text_28FF27, MauvilleCity_PokemonCenter_1F_Text_28FF44},
+ {GAME_STAT_RODE_CABLE_CAR, 1, MauvilleCity_PokemonCenter_1F_Text_28FFDD, MauvilleCity_PokemonCenter_1F_Text_28FFFA, MauvilleCity_PokemonCenter_1F_Text_29000D},
+ {GAME_STAT_ENTERED_HOT_SPRINGS, 1, MauvilleCity_PokemonCenter_1F_Text_290097, MauvilleCity_PokemonCenter_1F_Text_2900B5, MauvilleCity_PokemonCenter_1F_Text_2900CB}
+};
+
+static void StorytellerSetup(void)
+{
+ s32 i;
+ sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller;
+
+ sStorytellerPtr->id = MAUVILLE_MAN_STORYTELLER;
+ sStorytellerPtr->alreadyRecorded = FALSE;
+ for (i = 0; i < 4; i++)
+ {
+ sStorytellerPtr->gameStatIDs[i] = 0;
+ sStorytellerPtr->trainerNames[0][i] = EOS; // Maybe they meant storyteller->trainerNames[i][0] instead?
+ }
+}
+
+static void Storyteller_ResetFlag(void)
+{
+ sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller;
+
+ sStorytellerPtr->id = MAUVILLE_MAN_STORYTELLER;
+ sStorytellerPtr->alreadyRecorded = FALSE;
+}
+
+static u32 StorytellerGetGameStat(u8 stat)
+{
+ if (stat == 50)
+ stat = 0;
+ return GetGameStat(stat);
+}
+
+static const struct Story *GetStoryByStat(u32 stat)
+{
+ s32 i;
+
+ for (i = 0; i < 36; i++)
+ {
+ if (sStorytellerStories[i].stat == stat)
+ return &sStorytellerStories[i];
+ }
+ return &sStorytellerStories[35];
+}
+
+static const u8 *GetStoryTitleByStat(u32 stat)
+{
+ return GetStoryByStat(stat)->title;
+}
+
+static const u8 *GetStoryTextByStat(u32 stat)
+{
+ return GetStoryByStat(stat)->fullText;
+}
+
+static const u8 *GetStoryActionByStat(u32 stat)
+{
+ return GetStoryByStat(stat)->action;
+}
+
+static u8 GetFreeStorySlot(void)
+{
+ u8 i;
+
+ for (i = 0; i < 4; i++)
+ {
+ if (sStorytellerPtr->gameStatIDs[i] == 0)
+ break;
+ }
+ return i;
+}
+
+static u32 StorytellerGetRecordedTrainerStat(u32 trainer)
+{
+ u8 *ptr = sStorytellerPtr->statValues[trainer];
+
+ return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24);
+}
+
+static void StorytellerSetRecordedTrainerStat(u32 trainer, u32 val)
+{
+ u8 *ptr = sStorytellerPtr->statValues[trainer];
+
+ ptr[0] = val;
+ ptr[1] = val >> 8;
+ ptr[2] = val >> 16;
+ ptr[3] = val >> 24;
+}
+
+static bool32 HasTrainerStatIncreased(u32 trainer)
+{
+ if (StorytellerGetGameStat(sStorytellerPtr->gameStatIDs[trainer]) > StorytellerGetRecordedTrainerStat(trainer))
+ return TRUE;
+ else
+ return FALSE;
+}
+
+static void GetStoryByStattellerPlayerName(u32 player, void *dst)
+{
+ u8 *name = sStorytellerPtr->trainerNames[player];
+
+ memset(dst, EOS, 8);
+ memcpy(dst, name, 7);
+}
+
+static void StorytellerSetPlayerName(u32 player, const u8 * src)
+{
+ u8 * name = sStorytellerPtr->trainerNames[player];
+ memset(name, EOS, 7);
+ memcpy(name, src, 7);
+}
+
+
+static void StorytellerRecordNewStat(u32 player, u32 stat)
+{
+ sStorytellerPtr->gameStatIDs[player] = stat;
+ StorytellerSetPlayerName(player, gSaveBlock2Ptr->playerName);
+ StorytellerSetRecordedTrainerStat(player, StorytellerGetGameStat(stat));
+ ConvertIntToDecimalStringN(gStringVar1, StorytellerGetGameStat(stat), STR_CONV_MODE_LEFT_ALIGN, 10);
+ StringCopy(gStringVar2, GetStoryActionByStat(stat));
+ sStorytellerPtr->language[player] = gGameLanguage;
+}
+
+static void ScrambleStatList(u8 * arr, s32 count)
+{
+ s32 i;
+
+ for (i = 0; i < count; i++)
+ arr[i] = i;
+ for (i = 0; i < count; i++)
+ {
+ u32 a = Random() % count;
+ u32 b = Random() % count;
+ u8 temp = arr[a];
+ arr[a] = arr[b];
+ arr[b] = temp;
+ }
+}
+
+struct UnknownStruct_0859F288
+{
+ s32 length;
+ u32 unused2;
+};
+
+static const struct UnknownStruct_0859F288 sStorytellerStuff = {
+ ARRAY_COUNT(sStorytellerStories),
+ sizeof(sStorytellerStuff)
+};
+
+static bool8 StorytellerInitializeRandomStat(void)
+{
+ u8 arr[sStorytellerStuff.length];
+ s32 i;
+ s32 j;
+
+ ScrambleStatList(arr, ARRAY_COUNT(sStorytellerStories));
+ for (i = 0; i < (s32)ARRAY_COUNT(sStorytellerStories); i++)
+ {
+ u8 stat = sStorytellerStories[arr[i]].stat;
+ u8 minVal = sStorytellerStories[arr[i]].minVal;
+
+ for (j = 0; j < 4; j++)
+ {
+ if (sStorytellerPtr->gameStatIDs[j] == stat)
+ break;
+ }
+ if (j == 4 && StorytellerGetGameStat(stat) >= minVal)
+ {
+ sStorytellerPtr->alreadyRecorded = TRUE;
+ if (GetFreeStorySlot() == 4)
+ StorytellerRecordNewStat(sSelectedStory, stat);
+ else
+ StorytellerRecordNewStat(GetFreeStorySlot(), stat);
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+static void StorytellerDisplayStory(u32 player)
+{
+ u8 stat = sStorytellerPtr->gameStatIDs[player];
+
+ ConvertIntToDecimalStringN(gStringVar1, StorytellerGetRecordedTrainerStat(player), 0, 10);
+ StringCopy(gStringVar2, GetStoryActionByStat(stat));
+ GetStoryByStattellerPlayerName(player, gStringVar3);
+ ConvertInternationalString(gStringVar3, sStorytellerPtr->language[player]);
+ ShowFieldMessage(GetStoryTextByStat(stat));
+}
+
+static void PrintStoryList(void)
+{
+ s32 i;
+ s32 width = GetStringWidth(1, gText_Exit, 0);
+ u8 tileWidth;
+ for (i = 0; i < 4; i++)
+ {
+ s32 curWidth;
+ u16 gameStatID = sStorytellerPtr->gameStatIDs[i];
+
+ if (gameStatID == 0)
+ break;
+ curWidth = GetStringWidth(1, GetStoryTitleByStat(gameStatID), 0);
+ if (curWidth > width)
+ width = curWidth;
+ }
+ sStorytellerWindowId = CreateWindowFromRect(0, 0, convert_pixel_width_to_tile_width(width), GetFreeStorySlot() * 2 + 2);
+ SetStandardWindowBorderStyle(sStorytellerWindowId, 0);
+ for (i = 0; i < 4; i++)
+ {
+ u16 gameStatID = sStorytellerPtr->gameStatIDs[i];
+ if (gameStatID == 0)
+ break;
+ PrintTextOnWindow(sStorytellerWindowId, 1, GetStoryTitleByStat(gameStatID), 8, 16 * i + 1, 0xFF, NULL);
+ }
+ PrintTextOnWindow(sStorytellerWindowId, 1, gText_Exit, 8, 16 * i + 1, 0xFF, NULL);
+ InitMenuInUpperLeftCornerPlaySoundWhenAPressed(sStorytellerWindowId, GetFreeStorySlot() + 1, 0);
+ CopyWindowToVram(sStorytellerWindowId, 3);
+}
+
+static void Task_StoryListMenu(u8 taskId) // Task_StoryListMenu
+{
+ struct Task *task = &gTasks[taskId];
+ s32 selection;
+
+ switch (task->data[0])
+ {
+ case 0:
+ PrintStoryList();
+ task->data[0]++;
+ break;
+ case 1:
+ selection = ProcessMenuInput();
+ if (selection == -2)
+ break;
+ if (selection == -1 || selection == GetFreeStorySlot())
+ {
+ gSpecialVar_Result = 0;
+ }
+ else
+ {
+ gSpecialVar_Result = 1;
+ sSelectedStory = selection;
+ }
+ sub_80E2A78(sStorytellerWindowId);
+ DestroyTask(taskId);
+ EnableBothScriptContexts();
+ break;
+ }
+}
+
+// Sets gSpecialVar_Result to TRUE if player selected a story
+void ScrSpecial_StorytellerStoryListMenu(void)
+{
+ CreateTask(Task_StoryListMenu, 80);
+}
+
+void ScrSpecial_StorytellerDisplayStory(void)
+{
+ StorytellerDisplayStory(sSelectedStory);
+}
+
+u8 ScrSpecial_StorytellerGetFreeStorySlot(void)
+{
+ sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller;
+ return GetFreeStorySlot();
+}
+
+// Returns TRUE if stat has increased
+bool8 ScrSpecial_StorytellerUpdateStat(void)
+{
+ u8 r4;
+ sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller;
+ r4 = sStorytellerPtr->gameStatIDs[sSelectedStory];
+
+ if (HasTrainerStatIncreased(sSelectedStory) == TRUE)
+ {
+ StorytellerRecordNewStat(sSelectedStory, r4);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+bool8 ScrSpecial_HasStorytellerAlreadyRecorded(void)
+{
+ sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller;
+
+ if (sStorytellerPtr->alreadyRecorded == FALSE)
+ return FALSE;
+ else
+ return TRUE;
+}
+
+bool8 ScrSpecial_StorytellerInitializeRandomStat(void)
+{
+ sStorytellerPtr = &gSaveBlock1Ptr->oldMan.storyteller;
+ return StorytellerInitializeRandomStat();
+}
+
diff --git a/src/new_game.c b/src/new_game.c
index 89771e92b..37336016e 100644
--- a/src/new_game.c
+++ b/src/new_game.c
@@ -20,8 +20,10 @@
#include "tv.h"
#include "coins.h"
#include "text.h"
+#include "overworld.h"
+#include "mail.h"
+#include "battle_records.h"
-extern u8 gPlayerPartyCount;
extern u8 gDifferentSaveFile;
extern u16 gSaveFileStatus;
extern u8 gUnknown_030060B0;
@@ -29,19 +31,15 @@ extern u8 gUnknown_030060B0;
// TODO: replace those declarations with file headers
extern u16 GetGeneratedTrainerIdLower(void);
extern void ClearContestWinnerPicsInContestHall(void);
-extern void Overworld_SetWarpDestination(s8 mapBank, s8 mapNo, s8 warpNo, s8 xPos, s8 yPos);
extern void warp_in(void);
extern void sub_80BB358(void);
extern void ResetBagScrollPositions(void);
extern void ResetPokedex(void);
extern void sub_8084400(void);
-extern void ClearMailData(void);
extern void ResetGabbyAndTy(void);
extern void ResetSecretBases(void);
extern void ResetLinkContestBoolean(void);
-extern void ResetGameStats(void);
extern void sub_8052DA8(void);
-extern void InitLinkBattleRecords(void);
extern void ResetPokemonStorageSystem(void);
extern void ClearBag(void);
extern void NewGameInitPCItems(void);
@@ -58,7 +56,7 @@ extern void ResetContestLinkResults(void);
extern void ResetPokeJumpResults(void);
extern void SetBerryPowder(u32* powder, u32 newValue);
-extern u8 EventScript_2715DE[];
+extern const u8 EventScript_2715DE[];
void WriteUnalignedWord(u32 var, u8 *dataPtr)
{
@@ -178,7 +176,7 @@ void NewGameInitData(void)
ResetLinkContestBoolean();
ResetGameStats();
ClearAllContestWinnerPics();
- InitLinkBattleRecords();
+ ClearPlayerLinkBattleRecords();
InitSeedotSizeRecord();
InitLotadSizeRecord();
gPlayerPartyCount = 0;
diff --git a/src/overworld.c b/src/overworld.c
index 532615f27..f42f0db7f 100644
--- a/src/overworld.c
+++ b/src/overworld.c
@@ -137,7 +137,6 @@ extern void trainer_hill_map_load_related(void);
extern void sub_8087D74(void);
extern void battle_pyramid_map_load_related(u8);
extern void sub_80B00E8(u8);
-extern void UpdateTVScreensOnMap(u32, u32);
extern void sub_80E9238(u8);
extern void sub_81A3908(void);
extern void sub_81AA2F8(void);
@@ -614,12 +613,12 @@ bool32 warp_data_is_not_neg_1(struct WarpData *warp)
return TRUE;
}
-const struct MapHeader *Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum)
+struct MapHeader const *const Overworld_GetMapHeaderByGroupAndId(u16 mapGroup, u16 mapNum)
{
return gMapGroups[mapGroup][mapNum];
}
-const struct MapHeader *warp1_get_mapheader(void)
+struct MapHeader const *const warp1_get_mapheader(void)
{
return Overworld_GetMapHeaderByGroupAndId(sWarpDestination.mapGroup, sWarpDestination.mapNum);
}
diff --git a/src/player_pc.c b/src/player_pc.c
index f56ecb128..6f39fa449 100644
--- a/src/player_pc.c
+++ b/src/player_pc.c
@@ -444,7 +444,7 @@ static void ItemStorage_Withdraw(u8 taskId)
{
s16 *data = gTasks[taskId].data;
- NUM_ITEMS = sub_80D6CE4();
+ NUM_ITEMS = CountUsedPCItemSlots();
if (NUM_ITEMS != 0)
ItemStorage_WithdrawToss_Helper(taskId, FALSE);
else
@@ -459,7 +459,7 @@ static void ItemStorage_Toss(u8 taskId)
{
s16 *data = gTasks[taskId].data;
- NUM_ITEMS = sub_80D6CE4();
+ NUM_ITEMS = CountUsedPCItemSlots();
if (NUM_ITEMS != 0)
ItemStorage_WithdrawToss_Helper(taskId, TRUE);
else
@@ -967,7 +967,7 @@ static void sub_816C0C8(void)
static void sub_816C110(void)
{
- sub_80D6E84();
+ CompactPCItems();
sub_812220C(gSaveBlock1Ptr->pcItems, 50, &(playerPCItemPageInfo.pageItems), &(playerPCItemPageInfo.count), 0x8);
}
@@ -1180,7 +1180,7 @@ static void ItemStorage_DoItemSwap(u8 taskId, bool8 a)
{
if(c != b - 1)
{
- sub_80D702C(gSaveBlock1Ptr->pcItems, c, b);
+ MoveItemSlotInList(gSaveBlock1Ptr->pcItems, c, b);
ItemStorage_RefreshListMenu();
}
}
@@ -1301,7 +1301,7 @@ static void ItemStorage_DoItemToss(u8 taskId)
data = gTasks[taskId].data;
b = (playerPCItemPageInfo.cursorPos + playerPCItemPageInfo.itemsAbove);
- if(!itemid_is_unique(gSaveBlock1Ptr->pcItems[b].itemId))
+ if(!ItemId_GetImportance(gSaveBlock1Ptr->pcItems[b].itemId))
{
CopyItemName(gSaveBlock1Ptr->pcItems[b].itemId, gStringVar1);
ConvertIntToDecimalStringN(gStringVar2, data[2], STR_CONV_MODE_LEFT_ALIGN, 3);
@@ -1335,7 +1335,7 @@ static void ItemStorage_HandleRemoveItem(u8 taskId)
data = gTasks[taskId].data;
if(gMain.newKeys & (A_BUTTON | B_BUTTON))
{
- sub_80D6E48((playerPCItemPageInfo.cursorPos + playerPCItemPageInfo.itemsAbove), data[2]);
+ RemovePCItem((playerPCItemPageInfo.cursorPos + playerPCItemPageInfo.itemsAbove), data[2]);
DestroyListMenuTask(data[5], &(playerPCItemPageInfo.itemsAbove), &(playerPCItemPageInfo.cursorPos));
sub_816C110();
sub_816C140();
diff --git a/src/pokeblock.c b/src/pokeblock.c
index e829452b2..60087b5bf 100644
--- a/src/pokeblock.c
+++ b/src/pokeblock.c
@@ -589,7 +589,7 @@ static void PutPokeblockInfoText(void)
{
u8 i;
- const u8 *itemName = ItemId_GetItem(ITEM_POKEBLOCK_CASE)->name;
+ const u8 *itemName = ItemId_GetName(ITEM_POKEBLOCK_CASE);
PrintOnPokeblockWindow(0, itemName, GetStringCenterAlignXOffset(1, itemName, 0x48));
PrintOnPokeblockWindow(2, gText_Spicy, 0);
diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c
index e7fcce629..f77b7c38c 100644
--- a/src/pokemon_summary_screen.c
+++ b/src/pokemon_summary_screen.c
@@ -3173,11 +3173,11 @@ void sub_81C3554(u8 taskId)
void sub_81C35E4()
{
- u8 *text;
+ const u8 *text;
int offset;
if (gUnknown_0203CF1C->summary.item == ITEM_ENIGMA_BERRY && sub_81B1250() == 1 && (gUnknown_0203CF1C->unk40BE == 1 || gUnknown_0203CF1C->unk40BE == 4 || gUnknown_0203CF1C->unk40BE == 5))
{
- text = (u8*)ItemId_GetItem(ITEM_ENIGMA_BERRY);
+ text = ItemId_GetName(ITEM_ENIGMA_BERRY);
}
else if (gUnknown_0203CF1C->summary.item == ITEM_NONE)
text = gText_None;
diff --git a/src/random.c b/src/random.c
index f2f0ede58..f0b2d9e5f 100644
--- a/src/random.c
+++ b/src/random.c
@@ -7,6 +7,10 @@
EWRAM_DATA static u8 sUnknown = 0;
EWRAM_DATA static u32 sRandCount = 0;
+// IWRAM common
+IWRAM_DATA u32 gRngValue;
+IWRAM_DATA u32 gRng2Value;
+
u16 Random(void)
{
gRngValue = 1103515245 * gRngValue + 24691;
diff --git a/src/save.c b/src/save.c
index 8025d6586..81731692e 100644
--- a/src/save.c
+++ b/src/save.c
@@ -4,17 +4,15 @@
#include "constants/game_stat.h"
#include "task.h"
#include "decompress.h"
+#include "load_save.h"
+#include "overworld.h"
// for the chunk declarations
-extern struct SaveBlock2 gSaveblock2;
-extern struct SaveBlock1 gSaveblock1;
-extern struct PokemonStorage gPokemonStorage;
extern struct SaveSectionLocation gRamSaveSectionLocations[0xE];
-extern u8 gDecompressionBuffer[];
-extern u32 gFlashMemoryPresent;
extern u16 gUnknown_03006294;
extern bool8 gSoftResetDisabled;
+extern u32 gUnknown_0203CF5C;
// Divide save blocks into individual chunks to be written to flash sectors
@@ -24,13 +22,13 @@ extern bool8 gSoftResetDisabled;
/*
* Sector Layout:
- *
+ *
* Sectors 0 - 13: Save Slot 1
* Sectors 14 - 27: Save Slot 2
* Sectors 28 - 29: Hall of Fame
* Sector 30: e-Reader/Mystery Gift Stuff (note: e-Reader is deprecated in Emerald US)
* Sector 31: Recorded Battle
- *
+ *
* There are two save slots for saving the player's game data. We alternate between
* them each time the game is saved, so that if the current save slot is corrupt,
* we can load the previous one. We also rotate the sectors in each save slot
@@ -41,7 +39,7 @@ extern bool8 gSoftResetDisabled;
// (u8 *)structure was removed from the first statement of the macro in Emerald.
// This is because malloc is used to allocate addresses so storing the raw
-// addresses should not be done in the offsets information.
+// addresses should not be done in the offsets information.
#define SAVEBLOCK_CHUNK(structure, chunkNum) \
{ \
chunkNum * SECTOR_DATA_SIZE, \
@@ -69,8 +67,10 @@ const struct SaveSectionOffsets gSaveSectionOffsets[] =
};
extern void DoSaveFailedScreen(u8); // save_failed_screen
-extern void LoadSerializedGame(void); // load_save
extern bool32 ProgramFlashSectorAndVerify(u8 sector, u8 *data);
+extern void save_serialize_map(void);
+extern void sub_800ADF8(void);
+extern bool8 sub_800A520(void);
// iwram common
u16 gLastWrittenSector;
@@ -656,11 +656,6 @@ void UpdateSaveAddresses(void)
}
}
-extern u32 GetGameStat(u8 index); // rom4
-extern void IncrementGameStat(u8 index); // rom4
-extern void SaveSerializedGame(void); // load_save
-extern u32 gUnknown_0203CF5C;
-
u8 HandleSavingData(u8 saveType)
{
u8 i;
@@ -836,7 +831,7 @@ u16 sub_815355C(void)
struct SaveSection* savSection;
savSection = gFastSaveSection = &gSaveDataBuffer;
- if (gFlashMemoryPresent != 1)
+ if (gFlashMemoryPresent != TRUE)
return 0;
UpdateSaveAddresses();
GetSaveValidStatus(gRamSaveSectionLocations);
@@ -897,12 +892,6 @@ u32 sub_8153634(u8 sector, u8* src)
return 1;
}
-extern void save_serialize_map(void);
-extern void sub_8076D5C(void);
-extern void sav2_gender2_inplace_and_xFE(void);
-extern void sub_800ADF8(void);
-extern bool8 sub_800A520(void);
-
void sub_8153688(u8 taskId)
{
s16* taskData = gTasks[taskId].data;
diff --git a/src/secret_base.c b/src/secret_base.c
index c886912f4..cd6143ed0 100644
--- a/src/secret_base.c
+++ b/src/secret_base.c
@@ -327,7 +327,7 @@ void sub_80E8E18(void)
VarSet(VAR_SECRET_BASE_MAP, gMapHeader.regionMapSectionId);
}
-void sub_80E8EE0(struct MapEvents *events)
+void sub_80E8EE0(struct MapEvents const *events)
{
u16 bgEventIndex;
u16 i;
diff --git a/src/trader.c b/src/trader.c
new file mode 100644
index 000000000..c4d70ac9a
--- /dev/null
+++ b/src/trader.c
@@ -0,0 +1,209 @@
+#include "global.h"
+#include "constants/decorations.h"
+#include "constants/mauville_man.h"
+#include "decoration.h"
+#include "decoration_inventory.h"
+#include "event_data.h"
+#include "main.h"
+#include "menu.h"
+#include "menu_helpers.h"
+#include "script.h"
+#include "constants/songs.h"
+#include "sound.h"
+#include "string_util.h"
+#include "strings.h"
+#include "task.h"
+#include "script_menu.h"
+
+static const u8 * const sDefaultTraderNames[] =
+{
+ gText_Tristan,
+ gText_Philip,
+ gText_Dennis,
+ gText_Roberto,
+};
+
+static const u8 sDefaultTraderDecorations[] =
+{
+ DECOR_DUSKULL_DOLL,
+ DECOR_BALL_CUSHION,
+ DECOR_TIRE,
+ DECOR_PRETTY_FLOWERS,
+};
+
+void TraderSetup(void)
+{
+ u8 i;
+ struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader;
+
+ trader->id = MAUVILLE_MAN_TRADER;
+ trader->alreadyTraded = FALSE;
+
+ for (i = 0; i < 4; i++)
+ {
+ StringCopy(trader->playerNames[i], sDefaultTraderNames[i]);
+ trader->decorIds[i] = sDefaultTraderDecorations[i];
+ trader->language[i] = GAME_LANGUAGE;
+ }
+}
+
+void Trader_ResetFlag(void)
+{
+ struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader;
+ trader->alreadyTraded = FALSE;
+}
+
+void CreateAvailableDecorationsMenu(u8 taskId)
+{
+ u8 i;
+ s16 * data = gTasks[taskId].data;
+ struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader;
+ struct WindowTemplate windowTemplate = {0, 1, 1, 10, 10, 15, 1};
+ s32 windowWidth = GetStringWidth(1, gText_Exit, 0);
+ s32 fiveMarksWidth = GetStringWidth(1, gText_FiveMarks, 0);
+ for (i = 0; i < 4; i++)
+ {
+ s32 curWidth;
+ if (trader->decorIds[i] > NUM_DECORATIONS)
+ curWidth = fiveMarksWidth;
+ else
+ curWidth = GetStringWidth(1, gDecorations[trader->decorIds[i]].name, 0);
+ if (curWidth > windowWidth)
+ windowWidth = curWidth;
+ }
+ windowTemplate.width = convert_pixel_width_to_tile_width(windowWidth);
+ data[3] = AddWindow(&windowTemplate);
+ SetWindowBorderStyle(data[3], FALSE, 0x214, 14);
+ for (i = 0; i < 4; i++)
+ {
+ if (trader->decorIds[i] > NUM_DECORATIONS)
+ PrintTextOnWindow(data[3], 1, gText_FiveMarks, 8, 16 * i + 1, 255, NULL);
+ else
+ PrintTextOnWindow(data[3], 1, gDecorations[trader->decorIds[i]].name, 8, 16 * i + 1, 255, NULL);
+ }
+ PrintTextOnWindow(data[3], 1, gText_Exit, 8, 16 * i + 1, 255, NULL);
+ InitMenuInUpperLeftCornerPlaySoundWhenAPressed(data[3], 5, 0);
+ schedule_bg_copy_tilemap_to_vram(0);
+}
+
+void sub_8133BE4(u8 taskId, u8 decorationId)
+{
+ s16 * data = gTasks[taskId].data;
+ if (decorationId > NUM_DECORATIONS)
+ {
+ gSpecialVar_0x8004 = 0xFFFF;
+ }
+ else
+ {
+ gSpecialVar_0x8004 = decorationId;
+ }
+
+ sub_8198070(data[3], FALSE);
+ ClearWindowTilemap(data[3]);
+ RemoveWindow(data[3]);
+ schedule_bg_copy_tilemap_to_vram(0);
+ DestroyTask(taskId);
+ EnableBothScriptContexts();
+}
+
+void Task_HandleGetDecorationMenuInput(u8 taskId)
+{
+ struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader;
+ s8 input = ProcessMenuInput();
+
+ switch (input)
+ {
+ case -2:
+ break;
+ case -1:
+ case 4:
+ PlaySE(SE_SELECT);
+ sub_8133BE4(taskId, 0);
+ break;
+ default:
+ PlaySE(SE_SELECT);
+ gSpecialVar_0x8005 = input;
+ StringCopy(gStringVar1, trader->playerNames[input]);
+ ConvertInternationalString(gStringVar1, trader->language[input]);
+ sub_8133BE4(taskId, trader->decorIds[input]);
+ break;
+ }
+}
+
+void ScrSpecial_GetTraderTradedFlag(void)
+{
+ struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader;
+ gSpecialVar_Result = trader->alreadyTraded;
+}
+
+void ScrSpecial_DoesPlayerHaveNoDecorations(void)
+{
+ u8 i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (CountDecorationCategoryN(i))
+ {
+ gSpecialVar_Result = FALSE;
+ return;
+ }
+ }
+ gSpecialVar_Result = TRUE;
+}
+
+void ScrSpecial_IsDecorationFull(void)
+{
+ gSpecialVar_Result = FALSE;
+ if (gDecorations[gSpecialVar_0x8004].category != gDecorations[gSpecialVar_0x8006].category
+ && GetFirstEmptyDecorSlot(gDecorations[gSpecialVar_0x8004].category) == -1)
+ {
+ sub_8127250(gStringVar2, gDecorations[gSpecialVar_0x8004].category);
+ gSpecialVar_Result = TRUE;
+ }
+}
+
+void ScrSpecial_TraderMenuGiveDecoration(void)
+{
+ CreateTask(sub_8127208, 0);
+}
+
+void sub_8133DA0(u8 taskId)
+{
+ if (IsSelectedDecorInThePC() == TRUE)
+ {
+ gSpecialVar_0x8006 = gCurDecorInventoryItems[gCurDecorationIndex];
+ StringCopy(gStringVar3, gDecorations[gSpecialVar_0x8004].name);
+ StringCopy(gStringVar2, gDecorations[gSpecialVar_0x8006].name);
+ }
+ else
+ {
+ gSpecialVar_0x8006 = 0xFFFF;
+ }
+ DestroyTask(taskId);
+ EnableBothScriptContexts();
+}
+
+void sub_8133E1C(u8 taskId)
+{
+ gSpecialVar_0x8006 = 0;
+ DestroyTask(taskId);
+ EnableBothScriptContexts();
+}
+
+void ScrSpecial_TraderDoDecorationTrade(void)
+{
+ struct MauvilleOldManTrader *trader = &gSaveBlock1Ptr->oldMan.trader;
+
+ DecorationRemove(gSpecialVar_0x8006);
+ DecorationAdd(gSpecialVar_0x8004);
+ StringCopy(trader->playerNames[gSpecialVar_0x8005], gSaveBlock2Ptr->playerName);
+ trader->decorIds[gSpecialVar_0x8005] = gSpecialVar_0x8006;
+ trader->language[gSpecialVar_0x8005] = GAME_LANGUAGE;
+ trader->alreadyTraded = TRUE;
+}
+
+void ScrSpecial_TraderMenuGetDecoration(void)
+{
+ u8 taskId = CreateTask(Task_HandleGetDecorationMenuInput, 0);
+ CreateAvailableDecorationsMenu(taskId);
+}
diff --git a/src/tv.c b/src/tv.c
index 769bd5080..4b6e682bd 100644
--- a/src/tv.c
+++ b/src/tv.c
@@ -1380,13 +1380,13 @@ void PutFanClubSpecialOnTheAir(void)
StringCopy(show->fanClubSpecial.idolName, name);
tv_store_id_2x(show);
show->fanClubSpecial.language = gGameLanguage;
- if (show->fanClubSpecial.language == LANGUAGE_JAPANESE || gSaveBlock1Ptr->unk_31A0 == LANGUAGE_JAPANESE)
+ if (show->fanClubSpecial.language == LANGUAGE_JAPANESE || gSaveBlock1Ptr->linkBattleRecords.languages[0] == LANGUAGE_JAPANESE)
{
show->fanClubSpecial.idolNameLanguage = LANGUAGE_JAPANESE;
}
else
{
- show->fanClubSpecial.idolNameLanguage = gSaveBlock1Ptr->unk_31A0;
+ show->fanClubSpecial.idolNameLanguage = gSaveBlock1Ptr->linkBattleRecords.languages[0];
}
}
@@ -2465,7 +2465,7 @@ bool8 sub_80EE7C0(void)
{
return TRUE;
}
- if (gSaveBlock1Ptr->linkBattleRecords[0].name[0] == EOS)
+ if (gSaveBlock1Ptr->linkBattleRecords.entries[0].name[0] == EOS)
{
return TRUE;
}
@@ -2945,7 +2945,7 @@ static void sub_80EF40C(u8 varIdx, TVShow *show)
{
if (show->smartshopperShow.itemIds[i] != ITEM_NONE)
{
- price += itemid_get_market_price(show->smartshopperShow.itemIds[i]) * show->smartshopperShow.itemAmounts[i];
+ price += ItemId_GetPrice(show->smartshopperShow.itemIds[i]) * show->smartshopperShow.itemAmounts[i];
}
}
if (show->smartshopperShow.priceReduced == TRUE)
@@ -5120,7 +5120,7 @@ static void DoTVShowTodaysSmartShopper(void)
break;
case 1:
TVShowConvertInternationalString(gStringVar1, show->smartshopperShow.playerName, show->smartshopperShow.language);
- StringCopy(gStringVar2, ItemId_GetItem(show->smartshopperShow.itemIds[0])->name);
+ StringCopy(gStringVar2, ItemId_GetName(show->smartshopperShow.itemIds[0]));
TV_PrintIntToStringVar(2, show->smartshopperShow.itemAmounts[0]);
sTVShowState += 1 + (Random() % 4);
break;
@@ -5148,7 +5148,7 @@ static void DoTVShowTodaysSmartShopper(void)
}
break;
case 6:
- StringCopy(gStringVar2, ItemId_GetItem(show->smartshopperShow.itemIds[1])->name);
+ StringCopy(gStringVar2, ItemId_GetName(show->smartshopperShow.itemIds[1]));
TV_PrintIntToStringVar(2, show->smartshopperShow.itemAmounts[1]);
if (show->smartshopperShow.itemIds[2] != ITEM_NONE)
{
@@ -5164,7 +5164,7 @@ static void DoTVShowTodaysSmartShopper(void)
}
break;
case 7:
- StringCopy(gStringVar2, ItemId_GetItem(show->smartshopperShow.itemIds[2])->name);
+ StringCopy(gStringVar2, ItemId_GetName(show->smartshopperShow.itemIds[2]));
TV_PrintIntToStringVar(2, show->smartshopperShow.itemAmounts[2]);
if (show->smartshopperShow.priceReduced == TRUE)
{
@@ -5201,7 +5201,7 @@ static void DoTVShowTodaysSmartShopper(void)
break;
case 11:
TVShowConvertInternationalString(gStringVar1, show->smartshopperShow.playerName, show->smartshopperShow.language);
- StringCopy(gStringVar2, ItemId_GetItem(show->smartshopperShow.itemIds[0])->name);
+ StringCopy(gStringVar2, ItemId_GetName(show->smartshopperShow.itemIds[0]));
if (show->smartshopperShow.priceReduced == TRUE)
{
sTVShowState = 8;
@@ -5344,7 +5344,7 @@ static void DoTVShowPokemonTodaySuccessfulCapture(void)
sTVShowState = 2;
break;
case 2:
- StringCopy(gStringVar2, ItemId_GetItem(show->pokemonToday.ball)->name);
+ StringCopy(gStringVar2, ItemId_GetName(show->pokemonToday.ball));
TV_PrintIntToStringVar(2, show->pokemonToday.nBallsUsed);
if (show->pokemonToday.nBallsUsed < 4)
{
@@ -6457,7 +6457,7 @@ static void DoTVShowHoennTreasureInvestigators(void)
switch (state)
{
case 0:
- StringCopy(gStringVar1, ItemId_GetItem(show->treasureInvestigators.item)->name);
+ StringCopy(gStringVar1, ItemId_GetName(show->treasureInvestigators.item));
if (show->treasureInvestigators.location == MAPSEC_DYNAMIC)
{
switch (show->treasureInvestigators.mapDataId)
@@ -6476,13 +6476,13 @@ static void DoTVShowHoennTreasureInvestigators(void)
}
break;
case 1:
- StringCopy(gStringVar1, ItemId_GetItem(show->treasureInvestigators.item)->name);
+ StringCopy(gStringVar1, ItemId_GetName(show->treasureInvestigators.item));
TVShowConvertInternationalString(gStringVar2, show->treasureInvestigators.playerName, show->treasureInvestigators.language);
GetMapName(gStringVar3, show->treasureInvestigators.location, 0);
TVShowDone();
break;
case 2:
- StringCopy(gStringVar1, ItemId_GetItem(show->treasureInvestigators.item)->name);
+ StringCopy(gStringVar1, ItemId_GetName(show->treasureInvestigators.item));
TVShowConvertInternationalString(gStringVar2, show->treasureInvestigators.playerName, show->treasureInvestigators.language);
TVShowDone();
break;
@@ -6598,7 +6598,7 @@ static void DoTVShowBreakingNewsTV(void)
break;
case 3:
TV_PrintIntToStringVar(0, show->breakingNews.balls);
- StringCopy(gStringVar2, ItemId_GetItem(show->breakingNews.caughtMonBall)->name);
+ StringCopy(gStringVar2, ItemId_GetName(show->breakingNews.caughtMonBall));
sTVShowState = 4;
break;
case 4:
@@ -6788,7 +6788,7 @@ static void DoTVShowPokemonLotteryWinnerFlashReport(void)
{
StringCopy(gStringVar2, gText_Third);
}
- StringCopy(gStringVar3, ItemId_GetItem(show->lottoWinner.item)->name);
+ StringCopy(gStringVar3, ItemId_GetName(show->lottoWinner.item));
TVShowDone();
ShowFieldMessage(sTVPokemonLotteryWinnerFlashReportTextGroup[state]);
}
@@ -7530,7 +7530,7 @@ static void DoTVShowSecretBaseSecrets(void)
sTVShowState = show->secretBaseSecrets.savedState;
break;
case 19:
- StringCopy(gStringVar2, ItemId_GetItem(show->secretBaseSecrets.item)->name);
+ StringCopy(gStringVar2, ItemId_GetName(show->secretBaseSecrets.item));
sTVShowState = show->secretBaseSecrets.savedState;
break;
case 20:
diff --git a/sym_bss.txt b/sym_bss.txt
index 24e6afa3b..186ff8ced 100644
--- a/sym_bss.txt
+++ b/sym_bss.txt
@@ -28,11 +28,9 @@
.include "src/script_menu.o"
.include "src/record_mixing.o"
.include "src/tv.o"
+ .include "src/mauville_old_man.o"
- .space 1 @ TODO: define this u32 in mauville_old_man
-gUnknown_03001178: @ 3001178
- .space 0x4
-
+ .align 2
gUnknown_0300117C: @ 300117C
.space 0x4
diff --git a/sym_common.txt b/sym_common.txt
index c59c30102..e2f08eacc 100644
--- a/sym_common.txt
+++ b/sym_common.txt
@@ -8,24 +8,8 @@
.include "link_rfu.o"
.include "rtc.o"
.include "battle_main.o"
-
-gRngValue: @ 3005D80
- .space 0x4
-
-gRng2Value: @ 3005D84
- .space 0x4
-
-gFlashMemoryPresent: @ 3005D88
- .space 0x4
-
-gSaveBlock1Ptr: @ 3005D8C
- .space 0x4
-
-gSaveBlock2Ptr: @ 3005D90
- .space 0x4
-
-gPokemonStoragePtr: @ 3005D94
- .space 0x4
+ .include "random.o"
+ .include "load_save.o"
gInGameOpponentsNo: @ 3005D98
.space 0x4
@@ -55,17 +39,8 @@ gUnknown_03005DB4: @ 3005DB4
gFieldLinkPlayerCount: @ 3005DB8
.space 0x8
-gUnknown_03005DC0: @ 3005DC0
- .space 0x10
-
-gUnknown_03005DD0: @ 3005DD0
- .space 0x18
-
-gUnknown_03005DE8: @ 3005DE8
- .space 0x4
-
-gUnknown_03005DEC: @ 3005DEC
- .space 0x4
+ .include "fieldmap.o"
+ .include "field_camera.o"
gSelectedMapObject: @ 3005DF0
.space 0x4
@@ -85,9 +60,7 @@ gUnknown_030060B4: @ 30060B4
.include "contest.o"
.include "tv.o"
-
-gUnknown_03006130: @ 3006130
- .space 0x34
+ .include "mauville_old_man.o"
gUnknown_03006164: @ 3006164
.space 0x4
diff --git a/sym_ewram.txt b/sym_ewram.txt
index ad1757eaa..37034208c 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -209,22 +209,10 @@ gUnknown_020322D5: @ 20322D5
.space 0x3
.include "src/overworld.o"
+ .include "src/fieldmap.o"
+ .include "src/field_camera.o"
-gUnknown_02032318: @ 2032318
- .space 0x5000
-
-gMapHeader: @ 2037318
- .space 0x1C
-
-gCamera: @ 2037334
- .space 0xC
-
-gUnknown_02037340: @ 2037340
- .space 0x8
-
-gUnusedBikeCameraAheadPanback: @ 2037348
- .space 0x4
-
+ .align 2
gUnknown_0203734C: @ 203734C
.space 0x4
@@ -318,7 +306,7 @@ gUnknown_02039B52: @ 2039B52
gUnknown_02039B54: @ 2039B54
.space 0x4
-gUnknown_02039B58: @ 2039B58
+gTrainerCards: @ 2039B58
.space 0x14
gUnknown_02039B6C: @ 2039B6C
@@ -494,16 +482,7 @@ gUnknown_0203A11C: @ 203A11C
gUnknown_0203A120: @ 203A120
.space 0x4
.include "src/mon_markings.o"
-
-gUnknown_0203A128: @ 203A128
- .space 0x4
-
-gUnknown_0203A12C: @ 203A12C
- .space 0x4
-
-gUnknown_0203A130: @ 203A130
- .space 0x4
-
+ .include "src/mauville_old_man.o"
.include "src/mail.o"
gUnknown_0203A138: @ 203A138
@@ -658,11 +637,7 @@ gUnknown_0203AB6F: @ 203AB6F
gUnknown_0203AB70: @ 203AB70
.space 0x4
-gResultsWindowId: @ 203AB74
- .space 0x4
-
-gUnknown_0203AB78: @ 203AB78
- .space 0x4
+ .include "src/battle_records.o"
gUnknown_0203AB7C: @ 203AB7C
.space 0x4