summaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm')
-rw-r--r--asm/battle_2.s4
-rw-r--r--asm/battle_controller_player.s2
-rw-r--r--asm/battle_controller_safari.s2
-rw-r--r--asm/battle_controller_wally.s2
-rw-r--r--asm/battle_setup.s22
-rw-r--r--asm/berry.s1120
-rw-r--r--asm/berry_blender.s6
-rw-r--r--asm/berry_tag_screen.s2
-rw-r--r--asm/bike.s38
-rw-r--r--asm/field_control_avatar.s12
-rw-r--r--asm/field_effect.s82
-rw-r--r--asm/field_effect_helpers.s40
-rw-r--r--asm/field_map_obj.s200
-rw-r--r--asm/field_player_avatar.s96
-rw-r--r--asm/fldeff_80F9BCC.s6
-rw-r--r--asm/fldeff_emotion.s6
-rw-r--r--asm/item_use.s42
-rw-r--r--asm/lilycove_lady.s6
-rw-r--r--asm/link.s10
-rw-r--r--asm/load_save.s4
-rw-r--r--asm/map_obj_8097404.s8
-rw-r--r--asm/map_obj_lock.s28
-rw-r--r--asm/mystery_event_script.s6
-rw-r--r--asm/pokeblock_feed.s4
-rw-r--r--asm/porthole.s2
-rw-r--r--asm/rom4.s28
-rw-r--r--asm/rom6.s28
-rw-r--r--asm/rom_80AEFFC.s10
-rw-r--r--asm/rom_80C6FA0.s10
-rw-r--r--asm/rom_8161F74.s2
-rw-r--r--asm/rom_818E9AC.s134
-rw-r--r--asm/rom_81BE66C.s54
-rw-r--r--asm/scrcmd.s20
-rw-r--r--asm/script_pokemon_util_80F87D8.s2
-rw-r--r--asm/secret_base.s2
-rw-r--r--asm/shop.s4
-rw-r--r--asm/trainer_see.s14
37 files changed, 469 insertions, 1589 deletions
diff --git a/asm/battle_2.s b/asm/battle_2.s
index 53b83c10e..078a7a939 100644
--- a/asm/battle_2.s
+++ b/asm/battle_2.s
@@ -410,7 +410,7 @@ sub_8036B44: @ 8036B44
movs r0, 0xC2
lsls r0, 1
adds r4, r5, r0
- bl sub_80E162C
+ bl IsEnigmaBerryValid
cmp r0, 0x1
bne _08036BC0
movs r2, 0
@@ -513,7 +513,7 @@ berry_801017C: @ 8036C08
beq _08036C20
b _08036D4C
_08036C20:
- bl sub_80E162C
+ bl IsEnigmaBerryValid
cmp r0, 0x1
bne _08036CDC
movs r5, 0
diff --git a/asm/battle_controller_player.s b/asm/battle_controller_player.s
index 5854d5e47..2d1f6de7f 100644
--- a/asm/battle_controller_player.s
+++ b/asm/battle_controller_player.s
@@ -4127,7 +4127,7 @@ sub_80598E0: @ 80598E0
ands r0, r1
cmp r0, 0
bne _08059906
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r1, [r0]
movs r0, 0x1
bl dp01_build_cmdbuf_x23_aa_0
diff --git a/asm/battle_controller_safari.s b/asm/battle_controller_safari.s
index 3de3c2608..5f26cf4e7 100644
--- a/asm/battle_controller_safari.s
+++ b/asm/battle_controller_safari.s
@@ -396,7 +396,7 @@ sub_8159698: @ 8159698
ands r0, r1
cmp r0, 0
bne _081596BE
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r1, [r0]
movs r0, 0x1
bl dp01_build_cmdbuf_x23_aa_0
diff --git a/asm/battle_controller_wally.s b/asm/battle_controller_wally.s
index c00988ed2..3ee2b7e45 100644
--- a/asm/battle_controller_wally.s
+++ b/asm/battle_controller_wally.s
@@ -308,7 +308,7 @@ sub_8168610: @ 8168610
ands r0, r1
cmp r0, 0
bne _08168636
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r1, [r0]
movs r0, 0x1
bl dp01_build_cmdbuf_x23_aa_0
diff --git a/asm/battle_setup.s b/asm/battle_setup.s
index aea1be97c..058d649f3 100644
--- a/asm/battle_setup.s
+++ b/asm/battle_setup.s
@@ -1678,7 +1678,7 @@ battle_80801F0: @ 80B13F8
ldrb r1, [r2, 0x5]
ldrb r2, [r2, 0x4]
bl GetFieldObjectIdByLocalIdAndMap
- ldr r1, =gUnknown_03005DF0
+ ldr r1, =gSelectedMapObject
strb r0, [r1]
_080B141A:
pop {r0}
@@ -1880,10 +1880,10 @@ SingleTrainerWantsBattle: @ 80B162C
push {r4,lr}
lsls r0, 24
lsrs r0, 24
- ldr r2, =gUnknown_03005DF0
+ ldr r2, =gSelectedMapObject
strb r0, [r2]
ldr r4, =gScriptLastTalked
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
lsls r2, r0, 3
adds r2, r0
lsls r2, 2
@@ -1908,10 +1908,10 @@ TwoTrainersWantBattle: @ 80B1670
push {r4,lr}
lsls r0, 24
lsrs r0, 24
- ldr r2, =gUnknown_03005DF0
+ ldr r2, =gSelectedMapObject
strb r0, [r2]
ldr r4, =gScriptLastTalked
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
lsls r2, r0, 3
adds r2, r0
lsls r2, 2
@@ -1960,12 +1960,12 @@ GetTrainerFlagFromScriptPointer: @ 80B16B8
thumb_func_start sub_80B16D8
sub_80B16D8: @ 80B16D8
push {r4,lr}
- ldr r0, =gUnknown_03005DF0
+ ldr r0, =gSelectedMapObject
ldrb r0, [r0]
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
ldrb r0, [r4, 0x18]
lsls r0, 28
@@ -1998,7 +1998,7 @@ check_trainer_flag: @ 80B1718
lsls r0, 24
cmp r0, 0
beq _080B1734
- ldr r0, =gUnknown_03005DF0
+ ldr r0, =gSelectedMapObject
ldrb r0, [r0]
bl GetBattlePyramidTrainerFlag
b _080B1752
@@ -2013,7 +2013,7 @@ _080B1734:
bl FlagGet
b _080B1752
_080B174A:
- ldr r0, =gUnknown_03005DF0
+ ldr r0, =gSelectedMapObject
ldrb r0, [r0]
bl GetTrainerHillTrainerFlag
_080B1752:
@@ -2341,7 +2341,7 @@ sub_80B1A14: @ 80B1A14
b _080B1AD8
.pool
_080B1A44:
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
ldr r2, =gUnknown_03006090
ldr r0, =gUnknown_02038BFC
ldrb r1, [r0]
@@ -2381,7 +2381,7 @@ _080B1A7C:
b _080B1AD8
.pool
_080B1AAC:
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
ldr r2, =gUnknown_03006090
ldr r0, =gUnknown_02038BFC
ldrb r1, [r0]
diff --git a/asm/berry.s b/asm/berry.s
deleted file mode 100644
index 54c4333d5..000000000
--- a/asm/berry.s
+++ /dev/null
@@ -1,1120 +0,0 @@
- .include "asm/macros.inc"
- .include "constants/constants.inc"
-
- .syntax unified
-
- .text
-
- thumb_func_start sub_80E15B8
-sub_80E15B8: @ 80E15B8
- push {lr}
- sub sp, 0x4
- mov r1, sp
- movs r0, 0
- strh r0, [r1]
- ldr r0, =gSaveBlock1Ptr
- ldr r1, [r0]
- ldr r0, =0x000031f8
- adds r1, r0
- ldr r2, =0x0100001a
- mov r0, sp
- bl CpuSet
- add sp, 0x4
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_80E15B8
-
- thumb_func_start sub_80E15E4
-sub_80E15E4: @ 80E15E4
- push {r4,lr}
- adds r4, r0, 0
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x000031f8
- adds r3, r0, r1
- movs r2, 0
-_080E15F2:
- adds r0, r3, r2
- adds r1, r4, r2
- ldrb r1, [r1]
- strb r1, [r0]
- adds r2, 0x1
- cmp r2, 0x33
- bls _080E15F2
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end sub_80E15E4
-
- thumb_func_start sub_80E1610
-sub_80E1610: @ 80E1610
- push {lr}
- adds r3, r0, 0
- movs r2, 0
- movs r1, 0
-_080E1618:
- adds r0, r3, r1
- ldrb r0, [r0]
- adds r2, r0
- adds r1, 0x1
- cmp r1, 0x2F
- bls _080E1618
- adds r0, r2, 0
- pop {r1}
- bx r1
- thumb_func_end sub_80E1610
-
- thumb_func_start sub_80E162C
-sub_80E162C: @ 80E162C
- push {r4,lr}
- ldr r4, =gSaveBlock1Ptr
- ldr r1, [r4]
- ldr r2, =0x0000320c
- adds r0, r1, r2
- ldrb r0, [r0]
- cmp r0, 0
- beq _080E1674
- ldr r2, =0x00003202
- adds r0, r1, r2
- ldrb r0, [r0]
- cmp r0, 0
- beq _080E1674
- ldr r2, =0x000031f8
- adds r0, r1, r2
- bl sub_80E1610
- ldr r1, [r4]
- ldr r2, =0x00003228
- adds r1, r2
- ldr r1, [r1]
- cmp r0, r1
- bne _080E1674
- movs r0, 0x1
- b _080E1676
- .pool
-_080E1674:
- movs r0, 0
-_080E1676:
- pop {r4}
- pop {r1}
- bx r1
- thumb_func_end sub_80E162C
-
- thumb_func_start GetBerryInfo
-@ struct berry_info *GetBerryInfo(u8 berryType)
-GetBerryInfo: @ 80E167C
- push {r4,lr}
- lsls r0, 24
- lsrs r4, r0, 24
- cmp r4, 0x2B
- bne _080E16A0
- bl sub_80E162C
- cmp r0, 0
- beq _080E16A0
- ldr r0, =gSaveBlock1Ptr
- ldr r0, [r0]
- ldr r1, =0x000031f8
- b _080E16B4
- .pool
-_080E16A0:
- subs r0, r4, 0x1
- lsls r0, 24
- lsrs r0, 24
- cmp r0, 0x2A
- bls _080E16AC
- movs r4, 0x1
-_080E16AC:
- lsls r0, r4, 3
- subs r0, r4
- lsls r0, 2
- ldr r1, =gBerries - 0x1c @ 1-based array
-_080E16B4:
- adds r0, r1
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end GetBerryInfo
-
- thumb_func_start GetBerryTreeInfo
-@ struct BerryTreeInfo *GetBerryTreeInfo(u8 berryTreeId)
-GetBerryTreeInfo: @ 80E16C0
- lsls r0, 24
- ldr r1, =gSaveBlock1Ptr
- lsrs r0, 21
- ldr r2, =0x0000169c
- adds r0, r2
- ldr r1, [r1]
- adds r1, r0
- adds r0, r1, 0
- bx lr
- .pool
- thumb_func_end GetBerryTreeInfo
-
- thumb_func_start FieldObjectInteractionWaterBerryTree
-@ bool8 FieldObjectInteractionWaterBerryTree()
-FieldObjectInteractionWaterBerryTree: @ 80E16DC
- push {lr}
- ldr r0, =gUnknown_03005DF0
- ldrb r0, [r0]
- bl FieldObjectGetBerryTreeId
- lsls r0, 24
- lsrs r0, 24
- bl GetBerryTreeInfo
- adds r2, r0, 0
- ldrb r0, [r2, 0x1]
- lsls r0, 25
- lsrs r0, 25
- cmp r0, 0x2
- beq _080E1718
- cmp r0, 0x2
- bgt _080E1708
- cmp r0, 0x1
- beq _080E1712
- b _080E172E
- .pool
-_080E1708:
- cmp r0, 0x3
- beq _080E171E
- cmp r0, 0x4
- beq _080E1724
- b _080E172E
-_080E1712:
- ldrb r0, [r2, 0x5]
- movs r1, 0x10
- b _080E1728
-_080E1718:
- ldrb r0, [r2, 0x5]
- movs r1, 0x20
- b _080E1728
-_080E171E:
- ldrb r0, [r2, 0x5]
- movs r1, 0x40
- b _080E1728
-_080E1724:
- ldrb r0, [r2, 0x5]
- movs r1, 0x80
-_080E1728:
- orrs r0, r1
- strb r0, [r2, 0x5]
- b _080E1732
-_080E172E:
- movs r0, 0
- b _080E1734
-_080E1732:
- movs r0, 0x1
-_080E1734:
- pop {r1}
- bx r1
- thumb_func_end FieldObjectInteractionWaterBerryTree
-
- thumb_func_start IsPlayerFacingPlantedBerryTree
-@ bool8 IsPlayerFacingPlantedBerryTree()
-IsPlayerFacingPlantedBerryTree: @ 80E1738
- push {lr}
- bl GetFieldObjectScriptPointerForComparison
- ldr r1, =gUnknown_082742F9
- cmp r0, r1
- bne _080E1768
- ldr r0, =gUnknown_03005DF0
- ldrb r0, [r0]
- bl FieldObjectGetBerryTreeId
- lsls r0, 24
- lsrs r0, 24
- bl GetStageByBerryTreeId
- lsls r0, 24
- cmp r0, 0
- bne _080E1768
- movs r0, 0x1
- b _080E176A
- .pool
-_080E1768:
- movs r0, 0
-_080E176A:
- pop {r1}
- bx r1
- thumb_func_end IsPlayerFacingPlantedBerryTree
-
- thumb_func_start WaterBerryTree
-@ bool8 WaterBerryTree()
-WaterBerryTree: @ 80E1770
- push {lr}
- bl GetFieldObjectScriptPointerForComparison
- ldr r1, =gUnknown_082742F9
- cmp r0, r1
- bne _080E178C
- bl FieldObjectInteractionWaterBerryTree
- lsls r0, 24
- lsrs r0, 24
- b _080E178E
- .pool
-_080E178C:
- movs r0, 0
-_080E178E:
- pop {r1}
- bx r1
- thumb_func_end WaterBerryTree
-
- thumb_func_start ClearBerryTrees
-@ void ClearBerryTrees()
-ClearBerryTrees: @ 80E1794
- push {r4-r6,lr}
- movs r2, 0
- ldr r6, =gSaveBlock1Ptr
- ldr r5, =0x0000169c
- ldr r0, =gUnknown_0858ABD0
- ldr r3, [r0]
- ldr r4, [r0, 0x4]
-_080E17A2:
- ldr r0, [r6]
- lsls r1, r2, 3
- adds r0, r1
- adds r0, r5
- str r3, [r0]
- str r4, [r0, 0x4]
- adds r2, 0x1
- cmp r2, 0x7F
- ble _080E17A2
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end ClearBerryTrees
-
- thumb_func_start BerryTreeGrow
-@ bool8 BerryTreeGrow(struct BerryTreeInfo *berryTree)
-BerryTreeGrow: @ 80E17C8
- push {r4,lr}
- adds r4, r0, 0
- ldrb r1, [r4, 0x1]
- movs r0, 0x80
- ands r0, r1
- cmp r0, 0
- beq _080E17DA
-_080E17D6:
- movs r0, 0
- b _080E1866
-_080E17DA:
- lsls r0, r1, 25
- lsrs r0, 25
- cmp r0, 0x5
- bhi _080E1864
- lsls r0, 2
- ldr r1, =_080E17F0
- adds r0, r1
- ldr r0, [r0]
- mov pc, r0
- .pool
- .align 2, 0
-_080E17F0:
- .4byte _080E17D6
- .4byte _080E1810
- .4byte _080E1810
- .4byte _080E1810
- .4byte _080E1808
- .4byte _080E1828
-_080E1808:
- adds r0, r4, 0
- bl CalcBerryYield
- strb r0, [r4, 0x4]
-_080E1810:
- ldrb r2, [r4, 0x1]
- lsls r1, r2, 25
- lsrs r1, 25
- adds r1, 0x1
- movs r0, 0x7F
- ands r1, r0
- movs r0, 0x80
- negs r0, r0
- ands r0, r2
- orrs r0, r1
- strb r0, [r4, 0x1]
- b _080E1864
-_080E1828:
- ldrb r0, [r4, 0x5]
- movs r1, 0x11
- negs r1, r1
- ands r1, r0
- movs r0, 0x21
- negs r0, r0
- ands r1, r0
- subs r0, 0x20
- ands r1, r0
- movs r0, 0x7F
- ands r1, r0
- movs r0, 0
- strb r0, [r4, 0x4]
- ldrb r2, [r4, 0x1]
- subs r0, 0x80
- ands r0, r2
- movs r2, 0x2
- orrs r0, r2
- strb r0, [r4, 0x1]
- adds r1, 0x1
- movs r0, 0xF
- ands r1, r0
- strb r1, [r4, 0x5]
- cmp r1, 0xA
- bne _080E1864
- ldr r0, =gUnknown_0858ABD0
- ldr r1, [r0, 0x4]
- ldr r0, [r0]
- str r0, [r4]
- str r1, [r4, 0x4]
-_080E1864:
- movs r0, 0x1
-_080E1866:
- pop {r4}
- pop {r1}
- bx r1
- .pool
- thumb_func_end BerryTreeGrow
-
- thumb_func_start BerryTreeTimeUpdate
-@ void BerryTreeTimeUpdate(s32 deltaSeconds)
-BerryTreeTimeUpdate: @ 80E1870
- push {r4-r7,lr}
- adds r6, r0, 0
- movs r2, 0
-_080E1876:
- ldr r1, =gSaveBlock1Ptr
- lsls r0, r2, 3
- ldr r3, =0x0000169c
- adds r0, r3
- ldr r1, [r1]
- adds r4, r1, r0
- ldrb r0, [r4]
- adds r7, r2, 0x1
- cmp r0, 0
- beq _080E1910
- ldrb r1, [r4, 0x1]
- movs r0, 0x7F
- ands r0, r1
- cmp r0, 0
- beq _080E1910
- movs r0, 0x80
- ands r0, r1
- cmp r0, 0
- bne _080E1910
- ldrb r0, [r4]
- bl GetStageDurationByBerryType
- lsls r0, 16
- lsrs r0, 16
- lsls r1, r0, 3
- adds r1, r0
- lsls r1, 3
- subs r1, r0
- cmp r6, r1
- blt _080E18CC
- ldr r0, =gUnknown_0858ABD0
- ldr r1, [r0, 0x4]
- ldr r0, [r0]
- str r0, [r4]
- str r1, [r4, 0x4]
- b _080E1910
- .pool
-_080E18CC:
- adds r5, r6, 0
- cmp r5, 0
- beq _080E1910
- ldrh r1, [r4, 0x2]
- cmp r1, r5
- ble _080E18DC
- subs r0, r1, r5
- b _080E190E
-_080E18DC:
- subs r5, r1
- ldrb r0, [r4]
- bl GetStageDurationByBerryType
- strh r0, [r4, 0x2]
- adds r0, r4, 0
- bl BerryTreeGrow
- cmp r0, 0
- beq _080E1910
- ldrb r1, [r4, 0x1]
- movs r0, 0x7F
- ands r0, r1
- cmp r0, 0x5
- bne _080E1900
- ldrh r0, [r4, 0x2]
- lsls r0, 2
- strh r0, [r4, 0x2]
-_080E1900:
- cmp r5, 0
- beq _080E1910
- ldrh r0, [r4, 0x2]
- adds r1, r0, 0
- cmp r0, r5
- ble _080E18DC
- subs r0, r5
-_080E190E:
- strh r0, [r4, 0x2]
-_080E1910:
- adds r2, r7, 0
- cmp r2, 0x7F
- ble _080E1876
- pop {r4-r7}
- pop {r0}
- bx r0
- thumb_func_end BerryTreeTimeUpdate
-
- thumb_func_start PlantBerryTree
-@ void PlantBerryTree(u8 berryTreeId, u8 berryType, u8 stage, u8 a4)
-PlantBerryTree: @ 80E191C
- push {r4-r7,lr}
- adds r4, r1, 0
- adds r5, r2, 0
- lsls r0, 24
- lsrs r0, 24
- lsls r4, 24
- lsrs r4, 24
- lsls r5, 24
- lsrs r5, 24
- lsls r3, 24
- lsrs r7, r3, 24
- bl GetBerryTreeInfo
- adds r6, r0, 0
- ldr r0, =gUnknown_0858ABD0
- ldr r1, [r0, 0x4]
- ldr r0, [r0]
- str r0, [r6]
- str r1, [r6, 0x4]
- strb r4, [r6]
- adds r0, r4, 0
- bl GetStageDurationByBerryType
- strh r0, [r6, 0x2]
- movs r1, 0x7F
- ands r1, r5
- ldrb r2, [r6, 0x1]
- movs r0, 0x80
- negs r0, r0
- ands r0, r2
- orrs r0, r1
- strb r0, [r6, 0x1]
- cmp r5, 0x5
- bne _080E196E
- adds r0, r6, 0
- bl CalcBerryYield
- strb r0, [r6, 0x4]
- ldrh r0, [r6, 0x2]
- lsls r0, 2
- strh r0, [r6, 0x2]
-_080E196E:
- cmp r7, 0
- bne _080E197A
- ldrb r0, [r6, 0x1]
- movs r1, 0x80
- orrs r0, r1
- strb r0, [r6, 0x1]
-_080E197A:
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end PlantBerryTree
-
- thumb_func_start RemoveBerryTree
-@ void RemoveBerryTree(u8 berryTreeId)
-RemoveBerryTree: @ 80E1984
- lsls r0, 24
- ldr r1, =gSaveBlock1Ptr
- ldr r2, [r1]
- lsrs r0, 21
- adds r2, r0
- ldr r0, =0x0000169c
- adds r2, r0
- ldr r0, =gUnknown_0858ABD0
- ldr r1, [r0, 0x4]
- ldr r0, [r0]
- str r0, [r2]
- str r1, [r2, 0x4]
- bx lr
- .pool
- thumb_func_end RemoveBerryTree
-
- thumb_func_start GetBerryTypeByBerryTreeId
-@ u8 GetBerryTypeByBerryTreeId(u8 berryTreeId)
-GetBerryTypeByBerryTreeId: @ 80E19AC
- lsls r0, 24
- ldr r1, =gSaveBlock1Ptr
- ldr r1, [r1]
- lsrs r0, 21
- adds r1, r0
- ldr r0, =0x0000169c
- adds r1, r0
- ldrb r0, [r1]
- bx lr
- .pool
- thumb_func_end GetBerryTypeByBerryTreeId
-
- thumb_func_start GetStageByBerryTreeId
-@ u8 GetStageByBerryTreeId(u8 berryTreeId)
-GetStageByBerryTreeId: @ 80E19C8
- lsls r0, 24
- ldr r1, =gSaveBlock1Ptr
- ldr r1, [r1]
- lsrs r0, 21
- adds r1, r0
- ldr r0, =0x0000169d
- adds r1, r0
- ldrb r0, [r1]
- lsls r0, 25
- lsrs r0, 25
- bx lr
- .pool
- thumb_func_end GetStageByBerryTreeId
-
- thumb_func_start ItemIdToBerryType
-@ u8 ItemIdToBerryType(u16 itemId)
-ItemIdToBerryType: @ 80E19E8
- push {lr}
- lsls r0, 16
- lsrs r1, r0, 16
- ldr r2, =0xff7b0000
- adds r0, r2
- lsrs r0, 16
- cmp r0, 0x2A
- bhi _080E1A08
- adds r0, r1, 0
- adds r0, 0x7C
- lsls r0, 24
- lsrs r0, 24
- b _080E1A0A
- .pool
-_080E1A08:
- movs r0, 0x1
-_080E1A0A:
- pop {r1}
- bx r1
- thumb_func_end ItemIdToBerryType
-
- thumb_func_start BerryTypeToItemId
-@ u16 BerryTypeToItemId(u16 berryType)
-BerryTypeToItemId: @ 80E1A10
- push {lr}
- lsls r0, 16
- lsrs r1, r0, 16
- ldr r2, =0xffff0000
- adds r0, r2
- lsrs r0, 16
- cmp r0, 0x2A
- bhi _080E1A30
- adds r0, r1, 0
- adds r0, 0x84
- lsls r0, 16
- lsrs r0, 16
- b _080E1A32
- .pool
-_080E1A30:
- movs r0, 0x85
-_080E1A32:
- pop {r1}
- bx r1
- thumb_func_end BerryTypeToItemId
-
- thumb_func_start GetBerryNameByBerryType
-@ void GetBerryNameByBerryType(u8 berryType, u8 *dest)
-GetBerryNameByBerryType: @ 80E1A38
- push {r4,lr}
- adds r4, r1, 0
- lsls r0, 24
- lsrs r0, 24
- bl GetBerryInfo
- adds r1, r0, 0
- adds r0, r4, 0
- movs r2, 0x6
- bl memcpy
- movs r0, 0xFF
- strb r0, [r4, 0x6]
- pop {r4}
- pop {r0}
- bx r0
- thumb_func_end GetBerryNameByBerryType
-
- thumb_func_start GetBerryCountStringByBerryType
-@ void GetBerryCountStringByBerryType(u8 berryType, u8 *dest, u32 berryCount)
-GetBerryCountStringByBerryType: @ 80E1A58
- push {r4,r5,lr}
- adds r4, r1, 0
- adds r5, r2, 0
- lsls r0, 24
- lsrs r0, 24
- bl GetBerryInfo
- adds r1, r0, 0
- adds r0, r4, 0
- adds r2, r5, 0
- bl GetBerryCountString
- pop {r4,r5}
- pop {r0}
- bx r0
- thumb_func_end GetBerryCountStringByBerryType
-
- thumb_func_start ResetBerryTreeSparkleFlag
-@ void ResetBerryTreeSparkleFlag(u8 berryTreeId)
-ResetBerryTreeSparkleFlag: @ 80E1A78
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- bl GetBerryTreeInfo
- ldrb r2, [r0, 0x1]
- movs r1, 0x7F
- ands r1, r2
- strb r1, [r0, 0x1]
- pop {r0}
- bx r0
- thumb_func_end ResetBerryTreeSparkleFlag
-
- thumb_func_start BerryTreeGetNumStagesWatered
-@ u8 BerryTreeGetNumStagesWatered(struct BerryTreeInfo *berryTree)
-BerryTreeGetNumStagesWatered: @ 80E1A90
- push {lr}
- ldrb r2, [r0, 0x5]
- movs r0, 0x10
- ands r0, r2
- lsls r0, 24
- lsrs r0, 24
- negs r0, r0
- lsrs r1, r0, 31
- movs r0, 0x20
- ands r0, r2
- cmp r0, 0
- beq _080E1AAA
- adds r1, 0x1
-_080E1AAA:
- movs r0, 0x40
- ands r0, r2
- cmp r0, 0
- beq _080E1AB8
- adds r0, r1, 0x1
- lsls r0, 24
- lsrs r1, r0, 24
-_080E1AB8:
- movs r0, 0x80
- ands r0, r2
- cmp r0, 0
- beq _080E1AC6
- adds r0, r1, 0x1
- lsls r0, 24
- lsrs r1, r0, 24
-_080E1AC6:
- adds r0, r1, 0
- pop {r1}
- bx r1
- thumb_func_end BerryTreeGetNumStagesWatered
-
- thumb_func_start GetNumStagesWateredByBerryTreeId
-@ u8 GetNumStagesWateredByBerryTreeId(u8 berryTreeId)
-GetNumStagesWateredByBerryTreeId: @ 80E1ACC
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- bl GetBerryTreeInfo
- bl BerryTreeGetNumStagesWatered
- lsls r0, 24
- lsrs r0, 24
- pop {r1}
- bx r1
- thumb_func_end GetNumStagesWateredByBerryTreeId
-
- thumb_func_start CalcBerryYieldInternal
-@ u8 CalcBerryYieldInternal(u16 max, u16 min, u8 numStagesWatered)
-CalcBerryYieldInternal: @ 80E1AE4
- push {r4-r6,lr}
- lsls r0, 16
- lsrs r0, 16
- lsls r1, 16
- lsrs r6, r1, 16
- lsls r2, 24
- lsrs r2, 24
- cmp r2, 0
- bne _080E1AFA
- lsls r0, r6, 24
- b _080E1B2E
-_080E1AFA:
- subs r1, r0, r6
- subs r0, r2, 0x1
- adds r5, r1, 0
- muls r5, r0
- adds r4, r1, 0
- muls r4, r2
- bl Random
- lsls r0, 16
- lsrs r0, 16
- subs r4, r5
- adds r4, 0x1
- adds r1, r4, 0
- bl __umodsi3
- adds r5, r0
- movs r0, 0x3
- ands r0, r5
- cmp r0, 0x1
- bls _080E1B28
- lsrs r0, r5, 2
- adds r0, 0x1
- b _080E1B2A
-_080E1B28:
- lsrs r0, r5, 2
-_080E1B2A:
- adds r0, r6
- lsls r0, 24
-_080E1B2E:
- lsrs r0, 24
- pop {r4-r6}
- pop {r1}
- bx r1
- thumb_func_end CalcBerryYieldInternal
-
- thumb_func_start CalcBerryYield
-@ u8 CalcBerryYield(struct BerryTreeInfo *berryTree)
-CalcBerryYield: @ 80E1B38
- push {r4-r6,lr}
- adds r4, r0, 0
- ldrb r0, [r4]
- bl GetBerryInfo
- ldrb r6, [r0, 0xB]
- ldrb r5, [r0, 0xA]
- adds r0, r4, 0
- bl BerryTreeGetNumStagesWatered
- adds r2, r0, 0
- lsls r2, 24
- lsrs r2, 24
- adds r0, r5, 0
- adds r1, r6, 0
- bl CalcBerryYieldInternal
- lsls r0, 24
- lsrs r0, 24
- pop {r4-r6}
- pop {r1}
- bx r1
- thumb_func_end CalcBerryYield
-
- thumb_func_start GetBerryCountByBerryTreeId
-@ u8 GetBerryCountByBerryTreeId(u8 berryTreeId)
-GetBerryCountByBerryTreeId: @ 80E1B64
- lsls r0, 24
- ldr r1, =gSaveBlock1Ptr
- ldr r1, [r1]
- lsrs r0, 21
- adds r1, r0
- movs r0, 0xB5
- lsls r0, 5
- adds r1, r0
- ldrb r0, [r1]
- bx lr
- .pool
- thumb_func_end GetBerryCountByBerryTreeId
-
- thumb_func_start GetStageDurationByBerryType
-@ u16 GetStageDurationByBerryType(u8 berryType)
-GetStageDurationByBerryType: @ 80E1B7C
- push {lr}
- lsls r0, 24
- lsrs r0, 24
- bl GetBerryInfo
- ldrb r1, [r0, 0x14]
- lsls r0, r1, 4
- subs r0, r1
- lsls r0, 18
- lsrs r0, 16
- pop {r1}
- bx r1
- thumb_func_end GetStageDurationByBerryType
-
- thumb_func_start FieldObjectInteractionGetBerryTreeData
-@ void FieldObjectInteractionGetBerryTreeData()
-FieldObjectInteractionGetBerryTreeData: @ 80E1B94
- push {r4-r6,lr}
- ldr r0, =gUnknown_03005DF0
- ldrb r0, [r0]
- bl FieldObjectGetBerryTreeId
- lsls r0, 24
- lsrs r5, r0, 24
- adds r0, r5, 0
- bl GetBerryTypeByBerryTreeId
- lsls r0, 24
- lsrs r6, r0, 24
- adds r0, r5, 0
- bl ResetBerryTreeSparkleFlag
- ldr r0, =gScriptLastTalked
- ldrb r0, [r0]
- ldr r1, =gSaveBlock1Ptr
- ldr r2, [r1]
- ldrb r1, [r2, 0x5]
- ldrb r2, [r2, 0x4]
- bl sub_8092E9C
- lsls r0, 24
- cmp r0, 0
- beq _080E1BE0
- ldr r1, =gSpecialVar_0x8004
- movs r0, 0xFF
- strh r0, [r1]
- b _080E1BEE
- .pool
-_080E1BE0:
- ldr r4, =gSpecialVar_0x8004
- adds r0, r5, 0
- bl GetStageByBerryTreeId
- lsls r0, 24
- lsrs r0, 24
- strh r0, [r4]
-_080E1BEE:
- ldr r4, =gSpecialVar_0x8005
- adds r0, r5, 0
- bl GetNumStagesWateredByBerryTreeId
- lsls r0, 24
- lsrs r0, 24
- strh r0, [r4]
- ldr r4, =gSpecialVar_0x8006
- adds r0, r5, 0
- bl GetBerryCountByBerryTreeId
- lsls r0, 24
- lsrs r0, 24
- strh r0, [r4]
- ldr r1, =gStringVar1
- ldrh r2, [r4]
- adds r0, r6, 0
- bl GetBerryCountStringByBerryType
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end FieldObjectInteractionGetBerryTreeData
-
- thumb_func_start FieldObjectInteractionGetBerryName
-@ void FieldObjectInteractionGetBerryName()
-FieldObjectInteractionGetBerryName: @ 80E1C2C
- push {lr}
- ldr r0, =gUnknown_03005DF0
- ldrb r0, [r0]
- bl FieldObjectGetBerryTreeId
- lsls r0, 24
- lsrs r0, 24
- bl GetBerryTypeByBerryTreeId
- lsls r0, 24
- lsrs r0, 24
- ldr r1, =gStringVar1
- bl GetBerryNameByBerryType
- pop {r0}
- bx r0
- .pool
- thumb_func_end FieldObjectInteractionGetBerryName
-
- thumb_func_start FieldObjectInteractionGetBerryCountString
-@ void FieldObjectInteractionGetBerryCountString()
-FieldObjectInteractionGetBerryCountString: @ 80E1C54
- push {r4,r5,lr}
- ldr r0, =gUnknown_03005DF0
- ldrb r0, [r0]
- bl FieldObjectGetBerryTreeId
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- adds r0, r4, 0
- bl GetBerryTypeByBerryTreeId
- adds r5, r0, 0
- lsls r5, 24
- lsrs r5, 24
- adds r0, r4, 0
- bl GetBerryCountByBerryTreeId
- adds r2, r0, 0
- lsls r2, 24
- lsrs r2, 24
- ldr r1, =gStringVar1
- adds r0, r5, 0
- bl GetBerryCountStringByBerryType
- pop {r4,r5}
- pop {r0}
- bx r0
- .pool
- thumb_func_end FieldObjectInteractionGetBerryCountString
-
- thumb_func_start ChooseBerry
-@ void ChooseBerry()
-ChooseBerry: @ 80E1C94
- push {lr}
- ldr r0, =CB2_ChooseBerry
- bl SetMainCallback2
- pop {r0}
- bx r0
- .pool
- thumb_func_end ChooseBerry
-
- thumb_func_start FieldObjectInteractionPlantBerryTree
-@ void FieldObjectInteractionPlantBerryTree()
-FieldObjectInteractionPlantBerryTree: @ 80E1CA4
- push {r4,lr}
- ldr r0, =gUnknown_0203CE7C
- ldrh r0, [r0]
- bl ItemIdToBerryType
- adds r4, r0, 0
- lsls r4, 24
- lsrs r4, 24
- ldr r0, =gUnknown_03005DF0
- ldrb r0, [r0]
- bl FieldObjectGetBerryTreeId
- lsls r0, 24
- lsrs r0, 24
- adds r1, r4, 0
- movs r2, 0x1
- movs r3, 0x1
- bl PlantBerryTree
- bl FieldObjectInteractionGetBerryTreeData
- pop {r4}
- pop {r0}
- bx r0
- .pool
- thumb_func_end FieldObjectInteractionPlantBerryTree
-
- thumb_func_start FieldObjectInteractionPickBerryTree
-@ void FieldObjectInteractionPickBerryTree()
-FieldObjectInteractionPickBerryTree: @ 80E1CDC
- push {r4-r6,lr}
- ldr r0, =gUnknown_03005DF0
- ldrb r0, [r0]
- bl FieldObjectGetBerryTreeId
- adds r5, r0, 0
- lsls r5, 24
- lsrs r5, 24
- adds r0, r5, 0
- bl GetBerryTypeByBerryTreeId
- lsls r0, 24
- lsrs r0, 24
- ldr r6, =gSpecialVar_0x8004
- bl BerryTypeToItemId
- adds r4, r0, 0
- lsls r4, 16
- lsrs r4, 16
- adds r0, r5, 0
- bl GetBerryCountByBerryTreeId
- adds r1, r0, 0
- lsls r1, 24
- lsrs r1, 24
- adds r0, r4, 0
- bl AddBagItem
- lsls r0, 24
- lsrs r0, 24
- strh r0, [r6]
- pop {r4-r6}
- pop {r0}
- bx r0
- .pool
- thumb_func_end FieldObjectInteractionPickBerryTree
-
- thumb_func_start FieldObjectInteractionRemoveBerryTree
-@ void FieldObjectInteractionRemoveBerryTree()
-FieldObjectInteractionRemoveBerryTree: @ 80E1D28
- push {lr}
- ldr r0, =gUnknown_03005DF0
- ldrb r0, [r0]
- bl FieldObjectGetBerryTreeId
- lsls r0, 24
- lsrs r0, 24
- bl RemoveBerryTree
- ldr r0, =gScriptLastTalked
- ldrb r0, [r0]
- ldr r1, =gSaveBlock1Ptr
- ldr r2, [r1]
- ldrb r1, [r2, 0x5]
- ldrb r2, [r2, 0x4]
- bl sub_8092EF0
- pop {r0}
- bx r0
- .pool
- thumb_func_end FieldObjectInteractionRemoveBerryTree
-
- thumb_func_start PlayerHasBerries
-@ bool8 PlayerHasBerries()
-PlayerHasBerries: @ 80E1D5C
- push {lr}
- movs r0, 0x4
- bl IsBagPocketNonEmpty
- lsls r0, 24
- lsrs r0, 24
- pop {r1}
- bx r1
- thumb_func_end PlayerHasBerries
-
- thumb_func_start ResetBerryTreeSparkleFlags
-@ void ResetBerryTreeSparkleFlags()
-ResetBerryTreeSparkleFlags: @ 80E1D6C
- push {r4-r7,lr}
- mov r7, r10
- mov r6, r9
- mov r5, r8
- push {r5-r7}
- sub sp, 0x4
- mov r4, sp
- adds r4, 0x2
- mov r0, sp
- adds r1, r4, 0
- bl GetCameraCoords
- mov r0, sp
- ldrh r2, [r0]
- ldrh r1, [r4]
- adds r1, 0x3
- adds r3, r2, 0
- adds r3, 0xE
- lsls r1, 16
- movs r5, 0x80
- lsls r5, 12
- adds r0, r1, r5
- lsrs r0, 16
- mov r10, r0
- mov r5, sp
- lsls r2, 16
- asrs r2, 16
- mov r9, r2
- ldr r4, =gUnknown_02037350
- lsls r3, 16
- asrs r3, 16
- mov r8, r3
- asrs r7, r1, 16
- movs r6, 0xF
-_080E1DB0:
- ldrb r0, [r4]
- lsls r0, 31
- cmp r0, 0
- beq _080E1DEC
- ldrb r0, [r4, 0x6]
- cmp r0, 0xC
- bne _080E1DEC
- ldrh r0, [r4, 0x10]
- strh r0, [r5]
- ldrh r0, [r4, 0x12]
- mov r1, sp
- strh r0, [r1, 0x2]
- movs r2, 0
- ldrsh r1, [r5, r2]
- cmp r9, r1
- bgt _080E1DEC
- cmp r1, r8
- bgt _080E1DEC
- lsls r0, 16
- asrs r1, r0, 16
- cmp r7, r1
- bgt _080E1DEC
- mov r2, r10
- lsls r0, r2, 16
- asrs r0, 16
- cmp r1, r0
- bgt _080E1DEC
- ldrb r0, [r4, 0x1D]
- bl ResetBerryTreeSparkleFlag
-_080E1DEC:
- adds r4, 0x24
- subs r6, 0x1
- cmp r6, 0
- bge _080E1DB0
- add sp, 0x4
- pop {r3-r5}
- mov r8, r3
- mov r9, r4
- mov r10, r5
- pop {r4-r7}
- pop {r0}
- bx r0
- .pool
- thumb_func_end ResetBerryTreeSparkleFlags
-
- .align 2, 0 @ Don't pad with nop.
diff --git a/asm/berry_blender.s b/asm/berry_blender.s
index cc859f052..fb410e9f3 100644
--- a/asm/berry_blender.s
+++ b/asm/berry_blender.s
@@ -1190,7 +1190,7 @@ _080801F8:
movs r5, 0xAC
lsls r5, 1
adds r0, r5
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
ldrh r1, [r1]
bl sub_807FE14
ldr r0, =gUnknown_020228C4
@@ -2043,7 +2043,7 @@ _080808F8:
_08080950:
bl sub_800B4C0
bl sub_8080588
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r1, [r4]
movs r0, 0
bl sub_8082FDC
@@ -7619,7 +7619,7 @@ _080837EA:
movs r1, 0x6
bl CreateTask
bl sub_80EECEC
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
movs r1, 0x1
bl RemoveBagItem
diff --git a/asm/berry_tag_screen.s b/asm/berry_tag_screen.s
index 4d5022189..4d7644723 100644
--- a/asm/berry_tag_screen.s
+++ b/asm/berry_tag_screen.s
@@ -12,7 +12,7 @@ sub_8177C14: @ 8177C14
ldr r0, =0x0000180c
bl AllocZeroed
str r0, [r4]
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl ItemIdToBerryType
ldr r1, [r4]
diff --git a/asm/bike.s b/asm/bike.s
index bcb5177be..22d52c0fa 100644
--- a/asm/bike.s
+++ b/asm/bike.s
@@ -131,7 +131,7 @@ sub_8119238: @ 8119238
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
ldrb r1, [r4, 0x1E]
adds r0, r5, 0
@@ -166,7 +166,7 @@ sub_8119280: @ 8119280
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
ldrb r1, [r4, 0x1E]
adds r0, r5, 0
@@ -525,7 +525,7 @@ CheckMovementInputAcroBikeStandingWheelie: @ 8119540
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r1, r0, r1
movs r0, 0
strb r0, [r5, 0x2]
@@ -613,7 +613,7 @@ CheckMovementInputAcroBikeBunnyHop: @ 81195E0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r7, r0, r1
movs r0, 0x2
mov r1, r8
@@ -698,7 +698,7 @@ CheckMovementInputAcroBikeMovingWheelie: @ 8119688
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r7, r0, r1
movs r0, 0x2
mov r9, r0
@@ -802,7 +802,7 @@ CheckMovementInputAcroBikeUnknownMode5: @ 8119764
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldrb r2, [r0, 0x1]
movs r1, 0x3
@@ -868,7 +868,7 @@ sub_81197F4: @ 81197F4
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrb r1, [r5, 0x1E]
adds r0, r4, 0
@@ -898,7 +898,7 @@ sub_8119830: @ 8119830
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
ldrb r1, [r4, 0x1E]
adds r0, r5, 0
@@ -966,7 +966,7 @@ sub_81198C0: @ 81198C0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrb r1, [r5, 0x1E]
adds r0, r4, 0
@@ -995,7 +995,7 @@ sub_81198FC: @ 81198FC
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrb r1, [r5, 0x1E]
adds r0, r4, 0
@@ -1024,7 +1024,7 @@ sub_8119938: @ 8119938
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrb r1, [r5, 0x1E]
adds r0, r4, 0
@@ -1053,7 +1053,7 @@ sub_8119974: @ 8119974
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrb r1, [r5, 0x1E]
adds r0, r4, 0
@@ -1082,7 +1082,7 @@ sub_81199B0: @ 81199B0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrb r1, [r5, 0x1E]
adds r0, r4, 0
@@ -1161,7 +1161,7 @@ _08119A58:
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
movs r0, 0x22
bl PlaySE
@@ -1203,7 +1203,7 @@ sub_8119AA4: @ 8119AA4
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrb r1, [r5, 0x1E]
adds r0, r4, 0
@@ -1272,7 +1272,7 @@ sub_8119B34: @ 8119B34
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrb r1, [r5, 0x1E]
adds r0, r4, 0
@@ -1341,7 +1341,7 @@ sub_8119BC4: @ 8119BC4
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrb r1, [r5, 0x1E]
adds r0, r4, 0
@@ -1686,7 +1686,7 @@ sub_8119E38: @ 8119E38
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
ldrh r1, [r4, 0x10]
add r0, sp, 0x4
@@ -1965,7 +1965,7 @@ player_should_look_direction_be_enforced_upon_movement: @ 811A044
lsls r0, 24
cmp r0, 0
beq _0811A078
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
diff --git a/asm/field_control_avatar.s b/asm/field_control_avatar.s
index f3321f27a..0e83f4b80 100644
--- a/asm/field_control_avatar.s
+++ b/asm/field_control_avatar.s
@@ -187,7 +187,7 @@ sub_809C014: @ 809C014
ldr r0, =gScriptLastTalked
movs r1, 0
strh r1, [r0]
- ldr r0, =gUnknown_03005DF0
+ ldr r0, =gSelectedMapObject
strb r1, [r0]
bl player_get_direction_lower_nybble
lsls r0, 24
@@ -552,7 +552,7 @@ _0809C30E:
lsrs r3, r0, 24
cmp r3, 0x10
beq _0809C32E
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
lsls r2, r3, 3
adds r0, r2, r3
lsls r0, 2
@@ -580,7 +580,7 @@ _0809C34C:
adds r4, 0x1
cmp r4, 0x3
ble _0809C340
- ldr r0, =gUnknown_03005DF0
+ ldr r0, =gSelectedMapObject
strb r3, [r0]
ldr r1, =gScriptLastTalked
adds r0, r2, r3
@@ -615,7 +615,7 @@ TryGetMapObjectScript: @ 809C384
lsrs r4, r0, 24
cmp r4, 0x10
beq _0809C3B4
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
lsls r2, r4, 3
adds r0, r2, r4
lsls r0, 2
@@ -652,7 +652,7 @@ _0809C3B4:
lsrs r4, r0, 24
cmp r4, 0x10
beq _0809C400
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
lsls r2, r4, 3
adds r0, r2, r4
lsls r0, 2
@@ -666,7 +666,7 @@ _0809C400:
b _0809C44E
.pool
_0809C40C:
- ldr r0, =gUnknown_03005DF0
+ ldr r0, =gSelectedMapObject
strb r4, [r0]
ldr r1, =gScriptLastTalked
adds r0, r2, r4
diff --git a/asm/field_effect.s b/asm/field_effect.s
index c2f98a3e3..c40098993 100644
--- a/asm/field_effect.s
+++ b/asm/field_effect.s
@@ -2032,7 +2032,7 @@ mapldr_08084390: @ 80B6AA4
ldr r0, =c3_080843F8
movs r1, 0
bl CreateTask
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
ldr r3, =gUnknown_02037590
ldrb r1, [r3, 0x5]
lsls r0, r1, 3
@@ -2168,7 +2168,7 @@ sub_80B6BCC: @ 80B6BCC
lsls r5, r0, 3
adds r5, r0
lsls r5, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
mov r8, r0
add r5, r8
ldrb r0, [r6, 0x4]
@@ -2282,7 +2282,7 @@ sub_80B6C90: @ 80B6C90
movs r0, 0x1
strh r0, [r5, 0xA]
strh r1, [r5, 0xC]
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldrb r0, [r6, 0x5]
lsls r1, r0, 3
adds r1, r0
@@ -2314,7 +2314,7 @@ sub_80B6D04: @ 80B6D04
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r6, r0, r1
ldrb r1, [r2, 0x4]
lsls r0, r1, 4
@@ -2556,7 +2556,7 @@ sub_80B6EE0: @ 80B6EE0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@@ -2833,7 +2833,7 @@ sub_80B7114: @ 80B7114
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
movs r0, 0x4
bl GetFaceDirectionAnimId
@@ -3068,7 +3068,7 @@ sub_80B72F4: @ 80B72F4
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectClearAnimIfSpecialAnimFinished
@@ -3143,7 +3143,7 @@ _080B7396:
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r1, r0
ldr r2, [r2]
adds r0, r4, 0
@@ -3392,7 +3392,7 @@ dive_3_unknown: @ 80B7580
lsls r0, 24
cmp r0, 0
bne _080B75C4
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -3451,7 +3451,7 @@ _080B7604:
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r1, r0
ldrb r0, [r5, 0x4]
lsls r2, r0, 4
@@ -3781,7 +3781,7 @@ _080B78A4:
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r1, r0
ldrb r0, [r5, 0x4]
lsls r2, r0, 4
@@ -4030,7 +4030,7 @@ _080B7AA0:
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r1, r0
ldrb r0, [r5, 0x4]
lsls r2, r0, 4
@@ -4364,7 +4364,7 @@ _080B7D60:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
adds r0, r5, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@@ -4465,7 +4465,7 @@ mapldr_080859D4: @ 80B7E48
ldr r1, =gUnknown_03005DAC
movs r0, 0
str r0, [r1]
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -4542,7 +4542,7 @@ sub_80B7EE8: @ 80B7EE8
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r6, r0, r1
ldrh r1, [r5, 0xA]
movs r2, 0xA
@@ -4700,7 +4700,7 @@ sub_80B8034: @ 80B8034
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrh r1, [r4, 0xA]
movs r2, 0xA
@@ -4770,7 +4770,7 @@ sub_80B80C4: @ 80B80C4
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r3, r0, r1
ldrb r1, [r2, 0x4]
lsls r0, r1, 4
@@ -4910,7 +4910,7 @@ mapldr_08085D88: @ 80B8200
ldr r1, =gUnknown_03005DAC
movs r0, 0
str r0, [r1]
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -4983,7 +4983,7 @@ sub_80B8280: @ 80B8280
adds r0, r1
negs r0, r0
strh r0, [r2, 0x26]
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
ldrb r0, [r5, 0x5]
lsls r1, r0, 3
adds r1, r0
@@ -5032,7 +5032,7 @@ sub_80B830C: @ 80B830C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r6, r0, r1
ldrb r1, [r2, 0x4]
lsls r0, r1, 4
@@ -5161,7 +5161,7 @@ sub_80B8410: @ 80B8410
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrh r0, [r4, 0xA]
subs r0, 0x1
@@ -6348,7 +6348,7 @@ sub_80B8DB4: @ 80B8DB4
adds r0, r6, 0
mov r1, r8
bl PlayerGetDestCoords
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldrb r1, [r5, 0x5]
lsls r0, r1, 3
adds r0, r1
@@ -6379,7 +6379,7 @@ sub_80B8E14: @ 80B8E14
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@@ -6415,7 +6415,7 @@ sub_80B8E60: @ 80B8E60
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectCheckIfSpecialAnimFinishedOrInactive
lsls r0, 24
@@ -6454,7 +6454,7 @@ sub_80B8EA8: @ 80B8EA8
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
movs r0, 0x3
bl GetPlayerAvatarGraphicsIdByStateId
@@ -6503,7 +6503,7 @@ sub_80B8F24: @ 80B8F24
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectClearAnimIfSpecialAnimFinished
@@ -6834,7 +6834,7 @@ sub_80B9204: @ 80B9204
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@@ -6875,7 +6875,7 @@ sub_80B925C: @ 80B925C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectClearAnimIfSpecialAnimFinished
lsls r0, 24
@@ -6911,7 +6911,7 @@ sub_80B92A0: @ 80B92A0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrh r1, [r4, 0x26]
movs r0, 0x8
@@ -6960,7 +6960,7 @@ sub_80B92F8: @ 80B92F8
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
movs r1, 0x2
bl FieldObjectSetSpecialAnim
@@ -6980,7 +6980,7 @@ sub_80B933C: @ 80B933C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r2, r0, r1
ldrh r1, [r4, 0xC]
movs r3, 0xC
@@ -7028,7 +7028,7 @@ sub_80B9390: @ 80B9390
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
movs r0, 0x3
bl GetPlayerAvatarGraphicsIdByStateId
@@ -7092,7 +7092,7 @@ sub_80B9418: @ 80B9418
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
adds r0, r4, 0
bl FieldObjectClearAnimIfSpecialAnimActive
@@ -7587,7 +7587,7 @@ sub_80B9804: @ 80B9804
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@@ -7678,7 +7678,7 @@ _080B98D0:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldrb r0, [r0, 0x4]
lsls r4, r0, 4
@@ -7765,7 +7765,7 @@ sub_80B9978: @ 80B9978
lsls r5, r0, 3
adds r5, r0
lsls r5, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r5, r0
ldrb r0, [r5, 0x4]
lsls r4, r0, 4
@@ -7815,7 +7815,7 @@ sub_80B99F0: @ 80B99F0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectClearAnimIfSpecialAnimFinished
lsls r0, 24
@@ -7877,7 +7877,7 @@ sub_80B9A60: @ 80B9A60
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
movs r7, 0
ldrh r1, [r5, 0x26]
@@ -8119,7 +8119,7 @@ sub_80B9C54: @ 80B9C54
asrs r0, 16
cmp r0, 0x78
ble _080B9CC2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
movs r1, 0x4
ldrsh r0, [r7, r1]
lsls r1, r0, 3
@@ -8357,7 +8357,7 @@ sub_80B9E28: @ 80B9E28
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
movs r0, 0x10
ldrsh r5, [r4, r0]
@@ -8507,7 +8507,7 @@ _080B9F7C:
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
ldrh r0, [r5, 0x4]
strh r0, [r6, 0x20]
diff --git a/asm/field_effect_helpers.s b/asm/field_effect_helpers.s
index fc2a8682a..69c67672c 100644
--- a/asm/field_effect_helpers.s
+++ b/asm/field_effect_helpers.s
@@ -248,7 +248,7 @@ objc_reflection_maybe: @ 81540A8
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r7, r0, r1
ldrb r1, [r7, 0x4]
lsls r0, r1, 4
@@ -581,7 +581,7 @@ oei_shadow: @ 8154340
bl GetFieldObjectIdByLocalIdAndMap
lsls r0, 24
lsrs r0, 24
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
@@ -673,7 +673,7 @@ _08154412:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
ldrb r0, [r4, 0x4]
lsls r1, r0, 4
@@ -909,7 +909,7 @@ _08154604:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r2, r0, r1
ldr r0, [r2, 0x10]
ldr r1, [r5, 0x30]
@@ -1248,7 +1248,7 @@ _081548B4:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r2, r0, r1
ldr r0, [r2, 0x10]
ldr r1, [r5, 0x30]
@@ -1346,7 +1346,7 @@ sub_815496C: @ 815496C
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r5, r1, r0
ldr r0, =gFieldEffectObjectTemplatePointers
ldr r0, [r0, 0x78]
@@ -1432,7 +1432,7 @@ sub_8154A10: @ 8154A10
lsls r0, 24
cmp r0, 0
bne _08154A4E
- ldr r5, =gUnknown_02037350
+ ldr r5, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -1787,7 +1787,7 @@ sub_8154CEC: @ 8154CEC
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r5, r1, r0
ldr r0, =gFieldEffectObjectTemplatePointers
ldr r0, [r0, 0x34]
@@ -1881,7 +1881,7 @@ _08154DC0:
b _08154E0A
_08154DCA:
ldr r3, =gSprites
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -2040,7 +2040,7 @@ sub_8154EFC: @ 8154EFC
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r6, r1, r0
ldr r0, =gFieldEffectObjectTemplatePointers
ldr r0, [r0, 0x34]
@@ -2127,7 +2127,7 @@ sub_8154FB4: @ 8154FB4
lsls r0, 24
cmp r0, 0
bne _08154FEE
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -2248,7 +2248,7 @@ sub_81550B4: @ 81550B4
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r5, r1, r0
ldr r0, =gFieldEffectObjectTemplatePointers
ldr r0, [r0, 0x7C]
@@ -2332,7 +2332,7 @@ sub_8155158: @ 8155158
lsls r0, 24
cmp r0, 0
bne _08155192
- ldr r5, =gUnknown_02037350
+ ldr r5, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -2765,7 +2765,7 @@ sub_81554AC: @ 81554AC
movs r2, 0x32
ldrsh r1, [r4, r2]
bl CurrentMapDrawMetatileAt
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -2972,7 +2972,7 @@ sub_8155658: @ 8155658
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
ldrb r0, [r4, 0x4]
lsls r5, r0, 4
@@ -3325,7 +3325,7 @@ sub_8155900: @ 8155900
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r6, r1, r0
ldr r0, =gFieldEffectObjectTemplatePointers
ldr r0, [r0, 0x74]
@@ -3419,7 +3419,7 @@ sub_81559BC: @ 81559BC
lsls r0, 24
cmp r0, 0
bne _081559F6
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -3474,7 +3474,7 @@ _08155A46:
strh r6, [r4, 0x20]
strh r5, [r4, 0x22]
ldr r3, =gSprites
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -3793,7 +3793,7 @@ sub_8155C88: @ 8155C88
adds r0, r5, 0
bl FieldEffectStop
_08155CB8:
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -4514,7 +4514,7 @@ _08156212:
lsls r0, r7, 3
adds r0, r7
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
ldrb r0, [r4]
lsls r0, 31
diff --git a/asm/field_map_obj.s b/asm/field_map_obj.s
index 468f859d8..223e29ad7 100644
--- a/asm/field_map_obj.s
+++ b/asm/field_map_obj.s
@@ -28,7 +28,7 @@ npc_clear_ids_and_state: @ 808D3F0
npcs_clear_ids_and_state: @ 808D410
push {r4,r5,lr}
movs r4, 0
- ldr r5, =gUnknown_02037350
+ ldr r5, =gMapObjects
_0808D416:
lsls r0, r4, 3
adds r0, r4
@@ -138,7 +138,7 @@ sub_808D450: @ 808D450
sub_808D4F4: @ 808D4F4
push {lr}
movs r1, 0
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldrb r0, [r2]
b _0808D518
.pool
@@ -218,7 +218,7 @@ _0808D56C:
GetFieldObjectIdByXY: @ 808D574
push {r4-r6,lr}
movs r3, 0
- ldr r5, =gUnknown_02037350
+ ldr r5, =gMapObjects
lsls r0, 16
asrs r4, r0, 16
lsls r1, 16
@@ -265,7 +265,7 @@ GetFieldObjectIdByLocalIdAndMapInternal: @ 808D5B8
lsls r2, 24
lsrs r2, 24
movs r1, 0
- ldr r6, =gUnknown_02037350
+ ldr r6, =gMapObjects
_0808D5CA:
lsls r0, r1, 3
adds r0, r1
@@ -307,7 +307,7 @@ GetFieldObjectIdByLocalId: @ 808D608
lsls r0, 24
lsrs r3, r0, 24
movs r2, 0
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
_0808D612:
lsls r0, r2, 3
adds r0, r2
@@ -365,7 +365,7 @@ _0808D66E:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl npc_clear_ids_and_state
@@ -582,7 +582,7 @@ GetAvailableFieldObjectSlot: @ 808D810
lsls r2, 24
lsrs r4, r2, 24
movs r2, 0
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
ldrb r0, [r1]
lsls r0, 31
adds r7, r1, 0
@@ -627,7 +627,7 @@ _0808D868:
_0808D870:
mov r0, r12
strb r2, [r0]
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
_0808D876:
lsls r0, r2, 3
adds r0, r2
@@ -701,7 +701,7 @@ RemoveFieldObjectByLocalIdAndMap: @ 808D8C4
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl RemoveFieldObject
_0808D902:
@@ -760,7 +760,7 @@ _0808D95C:
lsls r0, r4, 3
adds r0, r4
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl RemoveFieldObject
_0808D972:
@@ -812,7 +812,7 @@ _0808D9C8:
lsls r4, r0, 3
adds r0, r4, r0
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r6, r0, r1
ldrb r0, [r6, 0x5]
bl GetFieldObjectGraphicsInfo
@@ -867,7 +867,7 @@ _0808DA24:
mov r8, r0
cmp r0, 0x40
bne _0808DA64
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
mov r2, r9
adds r1, r4, r2
lsls r1, 2
@@ -1051,7 +1051,7 @@ SpawnFieldObject: @ 808DB40
.pool
_0808DBBC:
ldr r4, =gSprites
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
@@ -1704,7 +1704,7 @@ _0808E0AA:
lsls r0, r3, 3
adds r0, r3
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r2, r0, r1
ldr r0, [r2]
ldr r1, =0x00010001
@@ -1804,7 +1804,7 @@ sub_808E16C: @ 808E16C
lsrs r5, 16
bl ClearPlayerAvatarInfo
movs r6, 0
- ldr r7, =gUnknown_02037350
+ ldr r7, =gMapObjects
lsls r4, 16
lsls r5, 16
_0808E186:
@@ -1872,7 +1872,7 @@ _0808E1EC:
lsls r0, r1, 3
add r0, r9
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r6, r0, r1
movs r0, 0
str r0, [sp, 0x20]
@@ -2097,7 +2097,7 @@ SetPlayerAvatarFieldObjectIdAndObjectId: @ 808E3C4
ldr r5, =gUnknown_02037590
strb r0, [r5, 0x5]
strb r1, [r5, 0x4]
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
@@ -2270,7 +2270,7 @@ sub_808E504: @ 808E504
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
adds r1, r4, 0
bl FieldObjectSetGraphicsId
@@ -2346,7 +2346,7 @@ FieldObjectTurnByLocalIdAndMap: @ 808E594
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
adds r1, r4, 0
bl FieldObjectTurn
@@ -2367,7 +2367,7 @@ sub_808E5D4: @ 808E5D4
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
bl FieldObjectTurn
pop {r0}
@@ -2528,7 +2528,7 @@ npc_by_local_id_and_map_set_field_1_bit_x20: @ 808E6F8
lsls r0, 24
cmp r0, 0
bne _0808E73A
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r0, [r0]
lsls r1, r0, 3
@@ -2583,7 +2583,7 @@ sub_808E75C: @ 808E75C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldrb r1, [r0]
movs r2, 0x4
@@ -2617,7 +2617,7 @@ sub_808E78C: @ 808E78C
lsls r2, r0, 3
adds r2, r0
lsls r2, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r2, r0
ldrb r1, [r2, 0x4]
lsls r0, r1, 4
@@ -2659,7 +2659,7 @@ sub_808E7E4: @ 808E7E4
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r1, r0
ldrb r2, [r1, 0x3]
movs r0, 0x5
@@ -2697,7 +2697,7 @@ sub_808E82C: @ 808E82C
lsls r0, 24
cmp r0, 0
bne _0808E870
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -3176,7 +3176,7 @@ sub_808EBA8: @ 808EBA8
lsls r0, r3, 3
adds r0, r3
lsls r0, 2
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
adds r0, r3
movs r3, 0xE0
lsls r3, 11
@@ -3217,7 +3217,7 @@ UpdateFieldObjectCoordsForCameraUpdate: @ 808EC10
cmp r0, 0
beq _0808EC68
movs r3, 0
- ldr r5, =gUnknown_02037350
+ ldr r5, =gMapObjects
movs r0, 0x4
ldrsh r4, [r2, r0]
movs r0, 0x8
@@ -3275,7 +3275,7 @@ GetFieldObjectIdByXYZ: @ 808EC78
lsls r2, 24
lsrs r5, r2, 24
movs r4, 0
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
mov r8, r0
_0808EC90:
lsls r0, r4, 3
@@ -3795,7 +3795,7 @@ GetFieldObjectScriptPointerByFieldObjectId: @ 808F01C
push {lr}
lsls r0, 24
lsrs r0, 24
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
lsls r2, r0, 3
adds r2, r0
lsls r2, 2
@@ -3831,7 +3831,7 @@ GetFieldObjectFlagIdByFieldObjectId: @ 808F058
push {lr}
lsls r0, 24
lsrs r0, 24
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
lsls r2, r0, 3
adds r2, r0
lsls r2, 2
@@ -3862,7 +3862,7 @@ sub_808F080: @ 808F080
lsls r0, 24
cmp r0, 0
bne _0808F0B4
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -3884,7 +3884,7 @@ _0808F0B6:
sub_808F0BC: @ 808F0BC
lsls r0, 24
lsrs r0, 24
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
@@ -3909,7 +3909,7 @@ sub_808F0D4: @ 808F0D4
lsls r0, 24
cmp r0, 0
bne _0808F108
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -3932,7 +3932,7 @@ _0808F10A:
FieldObjectGetBerryTreeId: @ 808F110
lsls r0, 24
lsrs r0, 24
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
@@ -4141,7 +4141,7 @@ sub_808F254: @ 808F254
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl sub_808F208
_0808F282:
@@ -4179,7 +4179,7 @@ _0808F2B6:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldr r1, =gUnknown_082766A2
bl sub_808F228
@@ -4191,7 +4191,7 @@ _0808F2D4:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldr r1, =gUnknown_082766A6
bl sub_808F228
@@ -4319,7 +4319,7 @@ FieldObjectCB_NoMovement1: @ 808F3E0
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =FieldObjectCB2_NoMovement1
bl FieldObjectStep
@@ -4343,7 +4343,7 @@ FieldObjectCB_GoRandomDirections: @ 808F408
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =FieldObjectCB2_GoRandomDirections
bl FieldObjectStep
@@ -5082,7 +5082,7 @@ FieldObjectCB_LookRandomDirections: @ 808F944
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =FieldObjectCB2_LookRandomDirections
bl FieldObjectStep
@@ -5256,7 +5256,7 @@ FieldObjectCB_RandomlyGoNorthOrSouth: @ 808FA84
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =FieldObjectCB2_RandomlyGoNorthOrSouth
bl FieldObjectStep
@@ -5469,7 +5469,7 @@ FieldObjectCB_RandomlyGoEastOrWest: @ 808FC08
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =FieldObjectCB2_RandomlyGoEastOrWest
bl FieldObjectStep
@@ -5679,7 +5679,7 @@ FieldObjectCB_FaceFixedDirection: @ 808FD8C
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =FieldObjectCB2_FaceFixedDirection
bl FieldObjectStep
@@ -5773,7 +5773,7 @@ FieldObjectCB_BerryTree: @ 808FE2C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrh r1, [r4, 0x3C]
movs r0, 0x1
@@ -6071,7 +6071,7 @@ FieldObjectCB_RandomlyLookNorthOrSouth: @ 8090050
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =FieldObjectCB2_RandomlyLookNorthOrSouth
bl FieldObjectStep
@@ -6239,7 +6239,7 @@ FieldObjectCB_RandomlyLookEastOrWest: @ 8090190
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =FieldObjectCB2_RandomlyLookEastOrWest
bl FieldObjectStep
@@ -6407,7 +6407,7 @@ FieldObjectCB_RandomlyLookNorthOrWest: @ 80902D0
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =FieldObjectCB2_RandomlyLookNorthOrWest
bl FieldObjectStep
@@ -6575,7 +6575,7 @@ FieldObjectCB_RandomlyLookNorthOrEast: @ 8090410
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8090434
bl FieldObjectStep
@@ -6743,7 +6743,7 @@ FieldObjectCB_RandomlyLookSouthOrWest: @ 8090550
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8090574
bl FieldObjectStep
@@ -6911,7 +6911,7 @@ FieldObjectCB_RandomlyLookSouthOrEast: @ 8090690
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80906B4
bl FieldObjectStep
@@ -7079,7 +7079,7 @@ FieldObjectCB_RandomlyLookNorthOrSouthOrWest: @ 80907D0
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80907F4
bl FieldObjectStep
@@ -7247,7 +7247,7 @@ FieldObjectCB_RandomlyLookNorthOrSouthOrEast: @ 8090910
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8090934
bl FieldObjectStep
@@ -7415,7 +7415,7 @@ FieldObjectCB_RandomlyLookNorthOrEastOrWest: @ 8090A50
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8090A74
bl FieldObjectStep
@@ -7583,7 +7583,7 @@ FieldObjectCB_RandomlyLookSouthOrEastOrWest: @ 8090B90
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8090BB4
bl FieldObjectStep
@@ -7751,7 +7751,7 @@ FieldObjectCB_LookAroundCounterclockwise: @ 8090CD0
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8090CF4
bl FieldObjectStep
@@ -7891,7 +7891,7 @@ FieldObjectCB_LookAroundClockwise: @ 8090DD4
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8090DF8
bl FieldObjectStep
@@ -8030,7 +8030,7 @@ FieldObjectCB_AlternatelyGoInOppositeDirections: @ 8090ED8
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8090EFC
bl FieldObjectStep
@@ -8348,7 +8348,7 @@ FieldObjectCB_GoInDirectionSequence1: @ 8091138
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_809115C
bl FieldObjectStep
@@ -8421,7 +8421,7 @@ FieldObjectCB_GoInDirectionSequence2: @ 80911C4
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80911E8
bl FieldObjectStep
@@ -8494,7 +8494,7 @@ FieldObjectCB_GoInDirectionSequence3: @ 8091250
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091274
bl FieldObjectStep
@@ -8567,7 +8567,7 @@ FieldObjectCB_GoInDirectionSequence4: @ 80912DC
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091300
bl FieldObjectStep
@@ -8640,7 +8640,7 @@ FieldObjectCB_GoInDirectionSequence5: @ 8091368
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_809138C
bl FieldObjectStep
@@ -8714,7 +8714,7 @@ FieldObjectCB_GoInDirectionSequence6: @ 80913F4
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091418
bl FieldObjectStep
@@ -8787,7 +8787,7 @@ FieldObjectCB_GoInDirectionSequence7: @ 8091480
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80914A4
bl FieldObjectStep
@@ -8860,7 +8860,7 @@ FieldObjectCB_GoInDirectionSequence8: @ 809150C
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091530
bl FieldObjectStep
@@ -8933,7 +8933,7 @@ FieldObjectCB_GoInDirectionSequence9: @ 8091598
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80915BC
bl FieldObjectStep
@@ -9006,7 +9006,7 @@ FieldObjectCB_GoInDirectionSequence10: @ 8091624
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091648
bl FieldObjectStep
@@ -9079,7 +9079,7 @@ FieldObjectCB_GoInDirectionSequence11: @ 80916B0
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80916D4
bl FieldObjectStep
@@ -9152,7 +9152,7 @@ FieldObjectCB_GoInDirectionSequence12: @ 809173C
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091760
bl FieldObjectStep
@@ -9225,7 +9225,7 @@ FieldObjectCB_GoInDirectionSequence13: @ 80917C8
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80917EC
bl FieldObjectStep
@@ -9298,7 +9298,7 @@ FieldObjectCB_GoInDirectionSequence14: @ 8091854
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091878
bl FieldObjectStep
@@ -9371,7 +9371,7 @@ FieldObjectCB_GoInDirectionSequence15: @ 80918E0
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091904
bl FieldObjectStep
@@ -9444,7 +9444,7 @@ FieldObjectCB_GoInDirectionSequence16: @ 809196C
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091990
bl FieldObjectStep
@@ -9517,7 +9517,7 @@ FieldObjectCB_GoInDirectionSequence17: @ 80919F8
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091A1C
bl FieldObjectStep
@@ -9590,7 +9590,7 @@ FieldObjectCB_GoInDirectionSequence18: @ 8091A84
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091AA8
bl FieldObjectStep
@@ -9663,7 +9663,7 @@ FieldObjectCB_GoInDirectionSequence19: @ 8091B10
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091B34
bl FieldObjectStep
@@ -9736,7 +9736,7 @@ FieldObjectCB_GoInDirectionSequence20: @ 8091B9C
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091BC0
bl FieldObjectStep
@@ -9809,7 +9809,7 @@ FieldObjectCB_GoInDirectionSequence21: @ 8091C28
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091C4C
bl FieldObjectStep
@@ -9882,7 +9882,7 @@ FieldObjectCB_GoInDirectionSequence22: @ 8091CB4
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091CD8
bl FieldObjectStep
@@ -9955,7 +9955,7 @@ FieldObjectCB_GoInDirectionSequence23: @ 8091D40
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091D64
bl FieldObjectStep
@@ -10028,7 +10028,7 @@ FieldObjectCB_GoInDirectionSequence24: @ 8091DCC
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091DF0
bl FieldObjectStep
@@ -10101,7 +10101,7 @@ FieldObjectCB_CopyPlayer1: @ 8091E58
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8091E7C
bl FieldObjectStep
@@ -10155,7 +10155,7 @@ sub_8091EC0: @ 8091EC0
push {r4-r7,lr}
adds r6, r0, 0
adds r7, r1, 0
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r3, =gUnknown_02037590
ldrb r1, [r3, 0x5]
lsls r0, r1, 3
@@ -10878,7 +10878,7 @@ FieldObjectCB_CopyPlayer2: @ 8092494
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80924B8
bl FieldObjectStep
@@ -10910,7 +10910,7 @@ mss_08062EA4: @ 80924D8
push {r4-r7,lr}
adds r6, r0, 0
adds r7, r1, 0
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r3, =gUnknown_02037590
ldrb r1, [r3, 0x5]
lsls r0, r1, 3
@@ -10962,7 +10962,7 @@ FieldObjectCB_TreeDisguise: @ 809253C
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r1, r0
adds r6, r4, 0
adds r6, 0x21
@@ -10996,7 +10996,7 @@ _08092584:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldr r2, =sub_80925AC
adds r1, r5, 0
@@ -11025,7 +11025,7 @@ FieldObjectCB_MountainDisguise: @ 80925B8
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r1, r0
adds r6, r4, 0
adds r6, 0x21
@@ -11059,7 +11059,7 @@ _08092600:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldr r2, =sub_80925AC
adds r1, r5, 0
@@ -11077,7 +11077,7 @@ FieldObjectCB_Hidden1: @ 8092628
adds r3, r0, 0
movs r1, 0x3C
ldrsh r0, [r3, r1]
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
cmp r0, 0
bne _08092668
movs r0, 0x2E
@@ -11175,7 +11175,7 @@ FieldObjectCB_WalkInPlace1: @ 80926D4
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80926F8
bl FieldObjectStep
@@ -11234,7 +11234,7 @@ FieldObjectCB_WalkInPlace4: @ 8092744
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8092768
bl FieldObjectStep
@@ -11293,7 +11293,7 @@ FieldObjectCB_WalkInPlace2: @ 80927B4
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80927D8
bl FieldObjectStep
@@ -11353,7 +11353,7 @@ FieldObjectCB_WalkInPlace3: @ 8092824
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_8092848
bl FieldObjectStep
@@ -11412,7 +11412,7 @@ FieldObjectCB_Hidden2: @ 8092894
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =sub_80928B8
bl FieldObjectStep
@@ -12234,7 +12234,7 @@ _08092E2E:
lsls r0, r4, 3
adds r0, r4
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r2, r0, r1
ldrb r0, [r2]
lsls r0, 31
@@ -12304,7 +12304,7 @@ sub_8092E9C: @ 8092E9C
cmp r0, 0
bne _08092EE8
ldr r3, =gSprites
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -12348,7 +12348,7 @@ sub_8092EF0: @ 8092EF0
cmp r0, 0
bne _08092F2E
ldr r3, =gSprites
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -16972,7 +16972,7 @@ sub_8094F38: @ 8094F38
ldrsh r0, [r5, r1]
movs r2, 0x12
ldrsh r1, [r5, r2]
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
mov r2, sp
ldrb r2, [r2]
lsls r3, r2, 3
@@ -17018,7 +17018,7 @@ sub_8094F94: @ 8094F94
ldrsh r0, [r5, r1]
movs r2, 0x12
ldrsh r1, [r5, r2]
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
mov r2, sp
ldrb r2, [r2]
lsls r3, r2, 3
diff --git a/asm/field_player_avatar.s b/asm/field_player_avatar.s
index 6947746ef..1698c054e 100644
--- a/asm/field_player_avatar.s
+++ b/asm/field_player_avatar.s
@@ -15,7 +15,7 @@ FieldObjectCB_NoMovement2: @ 808A998
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldr r2, =FieldObjectCB2_NoMovement2
bl FieldObjectStep
@@ -48,7 +48,7 @@ player_step: @ 808A9C0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
adds r0, r5, 0
bl sub_808C280
@@ -240,7 +240,7 @@ GetForcedMovementByMetatileBehavior: @ 808AB38
ands r0, r1
cmp r0, 0
bne _0808AB8A
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldrb r1, [r3, 0x5]
lsls r0, r1, 3
adds r0, r1
@@ -290,7 +290,7 @@ ForcedMovement_None: @ 808AB94
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldrb r2, [r0, 0x1]
movs r1, 0x3
@@ -386,7 +386,7 @@ DoForcedMovementInCurrentDirection: @ 808AC58
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
ldrb r2, [r0, 0x1]
movs r3, 0x4
@@ -528,7 +528,7 @@ ForcedMovement_Slide: @ 808AD60
lsls r2, r3, 3
adds r2, r3
lsls r2, 2
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
adds r2, r3
ldrb r3, [r2, 0x1]
movs r4, 0x4
@@ -623,7 +623,7 @@ ForcedMovement_MuddySlope: @ 808AE10
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
ldrb r1, [r4, 0x18]
movs r0, 0xF0
@@ -809,7 +809,7 @@ _0808AF68:
lsls r0, 24
cmp r0, 0
beq _0808AFB0
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldrb r1, [r4, 0x5]
lsls r0, r1, 3
adds r0, r1
@@ -848,7 +848,7 @@ CheckForPlayerAvatarCollision: @ 808AFBC
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
ldrh r1, [r4, 0x10]
add r0, sp, 0x4
@@ -899,7 +899,7 @@ sub_808B028: @ 808B028
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
ldrh r1, [r4, 0x10]
add r0, sp, 0x4
@@ -1187,7 +1187,7 @@ sub_808B238: @ 808B238
lsrs r6, r0, 24
cmp r6, 0x10
beq _0808B2D8
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
lsls r1, r6, 3
adds r1, r6
lsls r1, 2
@@ -1290,7 +1290,7 @@ IsPlayerCollidingWithFarawayIslandMew: @ 808B324
lsls r1, r2, 3
adds r1, r2
lsls r1, 2
- ldr r5, =gUnknown_02037350
+ ldr r5, =gMapObjects
adds r3, r1, r5
ldrh r2, [r3, 0x10]
mov r1, sp
@@ -1401,7 +1401,7 @@ _0808B3F4:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldr r1, [r2]
bl _call_via_r1
@@ -1621,7 +1621,7 @@ _0808B5B6:
thumb_func_start player_is_anim_in_certain_ranges
player_is_anim_in_certain_ranges: @ 808B5BC
push {lr}
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -1696,7 +1696,7 @@ PlayerIsAnimActive: @ 808B63C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
lsls r0, 24
@@ -1715,7 +1715,7 @@ PlayerCheckIfAnimFinishedOrInactive: @ 808B660
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectCheckIfSpecialAnimFinishedOrInactive
lsls r0, 24
@@ -1727,7 +1727,7 @@ PlayerCheckIfAnimFinishedOrInactive: @ 808B660
thumb_func_start player_set_x22
player_set_x22: @ 808B684
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
ldr r1, =gUnknown_02037590
ldrb r2, [r1, 0x5]
lsls r1, r2, 3
@@ -1742,7 +1742,7 @@ player_set_x22: @ 808B684
thumb_func_start player_get_x22
player_get_x22: @ 808B6A0
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -1766,7 +1766,7 @@ sub_808B6BC: @ 808B6BC
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r0, r2
bl FieldObjectForceSetSpecialAnim
pop {r0}
@@ -1793,7 +1793,7 @@ player_npc_set_state_and_x22_etc: @ 808B6E4
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
adds r1, r5, 0
bl FieldObjectSetSpecialAnim
@@ -2013,7 +2013,7 @@ _0808B872:
lsls r0, 24
cmp r0, 0
beq _0808B89A
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldrb r1, [r4, 0x5]
lsls r0, r1, 3
adds r0, r1
@@ -2219,7 +2219,7 @@ PlayCollisionSoundIfNotFacingWarp: @ 808B9EC
sub sp, 0x4
lsls r0, 24
lsrs r4, r0, 24
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -2275,7 +2275,7 @@ GetXYCoordsOneStepInFrontOfPlayer: @ 808BA68
push {r4,r5,lr}
adds r4, r0, 0
adds r5, r1, 0
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
ldr r2, =gUnknown_02037590
ldrb r1, [r2, 0x5]
lsls r0, r1, 3
@@ -2307,7 +2307,7 @@ GetXYCoordsOneStepInFrontOfPlayer: @ 808BA68
@ void PlayerGetDestCoords(u16 *x, u16 *y)
PlayerGetDestCoords: @ 808BAAC
push {r4,r5,lr}
- ldr r5, =gUnknown_02037350
+ ldr r5, =gMapObjects
ldr r4, =gUnknown_02037590
ldrb r3, [r4, 0x5]
lsls r2, r3, 3
@@ -2339,7 +2339,7 @@ plaer_get_pos_including_state_based_drift: @ 808BADC
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r3, r0, r1
ldrb r1, [r3]
movs r0, 0xC0
@@ -2465,7 +2465,7 @@ _0808BC30:
thumb_func_start player_get_direction_lower_nybble
@ u8 player_get_direction_lower_nybble()
player_get_direction_lower_nybble: @ 808BC38
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -2482,7 +2482,7 @@ player_get_direction_lower_nybble: @ 808BC38
thumb_func_start player_get_direction_upper_nybble
@ u8 player_get_direction_upper_nybble()
player_get_direction_upper_nybble: @ 808BC58
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -2498,7 +2498,7 @@ player_get_direction_upper_nybble: @ 808BC58
thumb_func_start PlayerGetZCoord
@ u8 PlayerGetZCoord()
PlayerGetZCoord: @ 808BC74
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -2521,7 +2521,7 @@ sub_808BC90: @ 808BC90
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
lsls r3, 16
asrs r3, 16
@@ -2578,7 +2578,7 @@ sub_808BCF4: @ 808BCF4
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
adds r0, r4, 0
bl npc_clear_strange_bits
@@ -2809,7 +2809,7 @@ IsPlayerFacingSurfableFishableWater: @ 808BE74
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
ldrh r1, [r4, 0x10]
mov r0, sp
@@ -3060,7 +3060,7 @@ InitPlayerAvatar: @ 808BFE0
lsls r4, r5, 3
adds r4, r5
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
ldrb r0, [r4, 0x2]
movs r1, 0x1
@@ -3097,7 +3097,7 @@ sub_808C0A8: @ 808C0A8
push {r4-r6,lr}
lsls r0, 24
lsrs r4, r0, 24
- ldr r6, =gUnknown_02037350
+ ldr r6, =gMapObjects
ldr r5, =gUnknown_02037590
ldrb r0, [r5, 0x5]
lsls r1, r0, 3
@@ -3152,7 +3152,7 @@ sub_808C114: @ 808C114
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
movs r0, 0x5
bl GetPlayerAvatarGraphicsIdByStateId
@@ -3186,7 +3186,7 @@ sub_808C15C: @ 808C15C
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
movs r0, 0x6
bl GetPlayerAvatarGraphicsIdByStateId
@@ -3227,7 +3227,7 @@ sub_808C1B4: @ 808C1B4
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
movs r0, 0x2
bl GetPlayerAvatarGraphicsIdByStateId
@@ -3276,7 +3276,7 @@ sub_808C228: @ 808C228
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
movs r0, 0x7
bl GetPlayerAvatarGraphicsIdByStateId
@@ -3414,7 +3414,7 @@ taskFF_bump_boulder: @ 808C34C
lsrs r0, 24
ldr r6, =gUnknown_08497530
ldr r2, =gTasks
- ldr r5, =gUnknown_02037350
+ ldr r5, =gMapObjects
lsls r1, r0, 2
adds r1, r0
lsls r1, 3
@@ -3625,7 +3625,7 @@ _0808C50A:
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r1, r0
ldr r2, [r2]
adds r0, r4, 0
@@ -3726,7 +3726,7 @@ _0808C5E2:
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r1, r0
ldr r2, [r2]
adds r0, r4, 0
@@ -3936,7 +3936,7 @@ taskFF_0805D1D4: @ 808C7A8
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
adds r0, r5, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@@ -3983,7 +3983,7 @@ sub_808C814: @ 808C814
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectClearAnimIfSpecialAnimFinished
@@ -4127,7 +4127,7 @@ fish1: @ 808C918
ldrh r1, [r6]
adds r1, r0
strh r1, [r5, 0x22]
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
ldr r2, =gUnknown_02037590
ldrb r1, [r2, 0x5]
lsls r0, r1, 3
@@ -4579,7 +4579,7 @@ _0808CCBC:
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
mov r8, r0
add r4, r8
ldrh r1, [r5, 0x24]
@@ -4792,7 +4792,7 @@ fishE: @ 808CE8C
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
mov r8, r0
add r4, r8
ldrh r1, [r6, 0x24]
@@ -4984,7 +4984,7 @@ _0808D03A:
ands r0, r1
cmp r0, 0
beq _0808D05E
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldrb r1, [r3, 0x5]
lsls r0, r1, 3
adds r0, r1
@@ -5037,7 +5037,7 @@ sub_808D094: @ 808D094
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
ldrb r1, [r4, 0x4]
lsls r0, r1, 4
@@ -5217,7 +5217,7 @@ sub_808D1FC: @ 808D1FC
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
ldrb r1, [r4, 0x4]
lsls r0, r1, 4
diff --git a/asm/fldeff_80F9BCC.s b/asm/fldeff_80F9BCC.s
index dffc7c780..f783547e1 100644
--- a/asm/fldeff_80F9BCC.s
+++ b/asm/fldeff_80F9BCC.s
@@ -1722,7 +1722,7 @@ _080FA9CA:
sub_80FA9D0: @ 80FA9D0
push {r4,lr}
sub sp, 0x4
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
ldr r2, =gUnknown_02037590
ldrb r1, [r2, 0x5]
lsls r0, r1, 3
@@ -2312,7 +2312,7 @@ sub_80FAEF0: @ 80FAEF0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@@ -2362,7 +2362,7 @@ sub_80FAF64: @ 80FAF64
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
adds r0, r5, 0
bl FieldObjectClearAnimIfSpecialAnimFinished
diff --git a/asm/fldeff_emotion.s b/asm/fldeff_emotion.s
index 845f5618f..f8b66da0d 100644
--- a/asm/fldeff_emotion.s
+++ b/asm/fldeff_emotion.s
@@ -167,7 +167,7 @@ _080B4756:
bl FieldEffectStop
b _080B47B2
_080B4764:
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r0, sp
ldrb r1, [r0]
lsls r0, r1, 3
@@ -274,7 +274,7 @@ sub_80B4808: @ 80B4808
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldrb r0, [r0, 0x18]
lsls r0, 28
@@ -301,7 +301,7 @@ _080B4870:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldrb r0, [r0, 0x18]
lsls r0, 28
diff --git a/asm/item_use.s b/asm/item_use.s
index 733b24470..7298407b9 100644
--- a/asm/item_use.s
+++ b/asm/item_use.s
@@ -11,7 +11,7 @@ SetUpItemUseCallback: @ 80FD060
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
ldrh r0, [r1]
cmp r0, 0xAF
bne _080FD084
@@ -260,7 +260,7 @@ sub_80FD254: @ 80FD254
push {lr}
sub sp, 0x24
mov r1, sp
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
strh r0, [r1, 0x20]
ldr r1, =bag_menu_mail_related
@@ -381,7 +381,7 @@ ItemUseOnFieldCB_Bike: @ 80FD358
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl ItemId_GetSecondaryId
lsls r0, 24
@@ -515,7 +515,7 @@ ItemUseOnFieldCB_Rod: @ 80FD468
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl ItemId_GetSecondaryId
lsls r0, 24
@@ -1306,7 +1306,7 @@ sub_80FDA24: @ 80FDA24
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
adds r0, r4
bl FieldObjectClearAnimIfSpecialAnimFinished
movs r0, 0xFF
@@ -1356,7 +1356,7 @@ sub_80FDA94: @ 80FDA94
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectCheckIfSpecialAnimFinishedOrInactive
lsls r0, 24
@@ -1395,7 +1395,7 @@ sub_80FDADC: @ 80FDADC
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectCheckIfSpecialAnimFinishedOrInactive
lsls r0, 24
@@ -1642,7 +1642,7 @@ sub_80FDD10: @ 80FDD10
b _080FDD68
.pool
_080FDD58:
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl ItemId_GetFieldFunc
adds r1, r0, 0
@@ -1661,7 +1661,7 @@ sub_80FDD74: @ 80FDD74
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
movs r1, 0x1
bl RemoveBagItem
@@ -1692,7 +1692,7 @@ ItemUseOutOfBattle_WailmerPail: @ 80FDDA4
b _080FDDD8
.pool
_080FDDC8:
- bl WaterBerryTree
+ bl TryToWaterBerryTree
lsls r0, 24
lsrs r0, 24
cmp r0, 0x1
@@ -1759,7 +1759,7 @@ sub_80FDE2C: @ 80FDE2C
lsrs r2, r0, 24
cmp r2, 0x10
beq _080FDE68
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
lsls r1, r2, 3
adds r1, r2
lsls r1, 2
@@ -1886,7 +1886,7 @@ ItemUseOutOfBattle_TMHM: @ 80FDF48
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r1, [r0]
movs r0, 0xA9
lsls r0, 1
@@ -1945,7 +1945,7 @@ task08_0809AD8C: @ 80FDFBC
cmp r0, 0
beq _080FE000
ldr r4, =gStringVar1
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl ItemIdToBattleMoveId
lsls r0, 16
@@ -2002,7 +2002,7 @@ sub_80FE03C: @ 80FE03C
thumb_func_start sub_80FE058
sub_80FE058: @ 80FE058
push {r4,lr}
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
movs r1, 0x1
bl RemoveBagItem
@@ -2125,7 +2125,7 @@ sub_80FE164: @ 80FE164
cmp r0, 0
bne _080FE1C2
ldr r4, =0x00004021
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl ItemId_GetHoldEffectParam
adds r1, r0, 0
@@ -2205,7 +2205,7 @@ ItemUseOutOfBattle_BlackWhiteFlute: @ 80FE234
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
ldr r1, =gStringVar2
bl CopyItemName
@@ -2361,7 +2361,7 @@ ItemUseInBattle_PokeBall: @ 80FE394
lsls r0, 24
cmp r0, 0
bne _080FE3D0
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
movs r1, 0x1
bl RemoveBagItem
@@ -2450,7 +2450,7 @@ sub_80FE440: @ 80FE440
ble _080FE4AC
movs r0, 0x1
bl PlaySE
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
movs r1, 0x1
bl RemoveBagItem
@@ -2496,7 +2496,7 @@ ItemUseInBattle_StatIncrease: @ 80FE4B8
muls r0, r2
ldr r1, =gPlayerParty
adds r0, r1
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
ldrh r1, [r1]
lsls r2, 24
lsrs r2, 24
@@ -2664,7 +2664,7 @@ ItemUseOutOfBattle_EnigmaBerry: @ 80FE650
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl GetItemEffectType
lsls r0, 24
@@ -2785,7 +2785,7 @@ ItemUseInBattle_EnigmaBerry: @ 80FE77C
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl GetItemEffectType
lsls r0, 24
diff --git a/asm/lilycove_lady.s b/asm/lilycove_lady.s
index debcc3fbe..fca8cb29b 100644
--- a/asm/lilycove_lady.s
+++ b/asm/lilycove_lady.s
@@ -566,7 +566,7 @@ _0818DE36:
thumb_func_start sub_818DE44
sub_818DE44: @ 818DE44
push {lr}
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl sub_818DD84
lsls r0, 24
@@ -1323,7 +1323,7 @@ sub_818E47C: @ 818E47C
thumb_func_start sub_818E490
sub_818E490: @ 818E490
push {lr}
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
movs r1, 0x1
bl RemoveBagItem
@@ -1341,7 +1341,7 @@ sub_818E4A4: @ 818E4A4
ldr r1, =0x00003b58
adds r0, r1
str r0, [r2]
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
ldrh r1, [r1]
strh r1, [r0, 0x28]
movs r3, 0
diff --git a/asm/link.s b/asm/link.s
index e052aec63..da9cbc928 100644
--- a/asm/link.s
+++ b/asm/link.s
@@ -1232,7 +1232,7 @@ _08009E8C:
_08009EA8:
ldr r0, =gUnknown_03003110
strh r2, [r0]
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
ldrh r1, [r1]
b _08009F04
.pool
@@ -31367,7 +31367,7 @@ sub_8019AD8: @ 8019AD8
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@@ -31413,7 +31413,7 @@ sub_8019B3C: @ 8019B3C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectClearAnimIfSpecialAnimFinished
@@ -45605,7 +45605,7 @@ _08020D74:
sub_8020D8C: @ 8020D8C
push {r4,lr}
sub sp, 0xC
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
ldrh r0, [r1]
subs r0, 0x85
lsls r0, 16
@@ -45626,7 +45626,7 @@ _08020DB0:
ldrb r0, [r2, 0x8]
lsls r0, 5
adds r0, r2, r0
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
ldrh r1, [r1]
subs r1, 0x85
adds r0, 0xA4
diff --git a/asm/load_save.s b/asm/load_save.s
index 08170b446..2b4be8e67 100644
--- a/asm/load_save.s
+++ b/asm/load_save.s
@@ -244,7 +244,7 @@ save_serialize_npcs: @ 8076E1C
movs r5, 0xA3
lsls r5, 4
mov r8, r5
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
movs r3, 0
movs r2, 0xF
_08076E32:
@@ -282,7 +282,7 @@ save_deserialize_npcs: @ 8076E64
movs r5, 0xA3
lsls r5, 4
mov r8, r5
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
movs r3, 0
movs r2, 0xF
_08076E7A:
diff --git a/asm/map_obj_8097404.s b/asm/map_obj_8097404.s
index 404ae3675..50284a013 100644
--- a/asm/map_obj_8097404.s
+++ b/asm/map_obj_8097404.s
@@ -87,7 +87,7 @@ _0809748E:
player_bitmagic: @ 8097494
push {r4,r5,lr}
movs r4, 0
- ldr r5, =gUnknown_02037350
+ ldr r5, =gMapObjects
_0809749A:
lsls r0, r4, 3
adds r0, r4
@@ -121,7 +121,7 @@ sub_80974D0: @ 80974D0
lsls r0, 24
lsrs r5, r0, 24
movs r4, 0
- ldr r6, =gUnknown_02037350
+ ldr r6, =gMapObjects
_080974DA:
cmp r4, r5
beq _080974FC
@@ -209,7 +209,7 @@ _0809756C:
sub_809757C: @ 809757C
push {r4,r5,lr}
movs r4, 0
- ldr r5, =gUnknown_02037350
+ ldr r5, =gMapObjects
_08097582:
lsls r0, r4, 3
adds r0, r4
@@ -1757,7 +1757,7 @@ sub_8098074: @ 8098074
lsls r1, 24
lsrs r5, r1, 24
movs r4, 0
- ldr r7, =gUnknown_02037350
+ ldr r7, =gMapObjects
_08098082:
cmp r4, r6
beq _080980A8
diff --git a/asm/map_obj_lock.s b/asm/map_obj_lock.s
index 7547f23c0..6530c268b 100644
--- a/asm/map_obj_lock.s
+++ b/asm/map_obj_lock.s
@@ -97,8 +97,8 @@ _0809842A:
ldrsh r0, [r5, r1]
cmp r0, 0
bne _08098452
- ldr r2, =gUnknown_02037350
- ldr r0, =gUnknown_03005DF0
+ ldr r2, =gMapObjects
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
@@ -152,7 +152,7 @@ _0809849A:
thumb_func_start sub_80984A0
sub_80984A0: @ 80984A0
push {r4,r5,lr}
- ldr r4, =gUnknown_03005DF0
+ ldr r4, =gSelectedMapObject
ldrb r0, [r4]
bl sub_80974D0
ldr r0, =sub_8098400
@@ -160,7 +160,7 @@ sub_80984A0: @ 80984A0
bl CreateTask
lsls r0, 24
lsrs r5, r0, 24
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldrb r1, [r4]
lsls r0, r1, 3
adds r0, r1
@@ -199,7 +199,7 @@ sub_80984F4: @ 80984F4
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectClearAnimIfSpecialAnimFinished
bl sub_80D338C
@@ -212,8 +212,8 @@ sub_80984F4: @ 80984F4
thumb_func_start sub_8098524
sub_8098524: @ 8098524
push {r4,lr}
- ldr r4, =gUnknown_02037350
- ldr r0, =gUnknown_03005DF0
+ ldr r4, =gMapObjects
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
@@ -249,12 +249,12 @@ _08098542:
thumb_func_start sub_8098574
sub_8098574: @ 8098574
push {lr}
- ldr r0, =gUnknown_03005DF0
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldr r1, =gScriptFacing
ldrb r1, [r1]
@@ -267,12 +267,12 @@ sub_8098574: @ 8098574
thumb_func_start sub_809859C
sub_809859C: @ 809859C
push {lr}
- ldr r0, =gUnknown_03005DF0
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectClearAnimIfSpecialAnimActive
pop {r0}
@@ -307,7 +307,7 @@ _080985E8:
ldrsh r0, [r5, r1]
cmp r0, 0
bne _0809860C
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
lsls r1, r7, 3
adds r1, r7
lsls r1, 2
@@ -374,7 +374,7 @@ sub_8098630: @ 8098630
mov r1, r9
adds r6, r0, r1
strh r4, [r6, 0xC]
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
mov r8, r2
lsls r0, r4, 3
adds r0, r4
@@ -429,7 +429,7 @@ _080986E0:
lsls r0, 3
adds r5, r0, r1
strh r4, [r5, 0xC]
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
lsls r0, r4, 3
adds r0, r4
lsls r0, 2
diff --git a/asm/mystery_event_script.s b/asm/mystery_event_script.s
index 07c940f58..df5c034c4 100644
--- a/asm/mystery_event_script.s
+++ b/asm/mystery_event_script.s
@@ -432,7 +432,7 @@ sub_8153AE8: @ 8153AE8
mov r6, r8
push {r6,r7}
adds r7, r0, 0
- bl sub_80E162C
+ bl IsEnigmaBerryValid
mov r8, r0
adds r0, r7, 0
bl ScriptReadWord
@@ -450,7 +450,7 @@ sub_8153AE8: @ 8153AE8
movs r2, 0x7
bl StringCopyN
adds r0, r4, 0
- bl sub_80E15E4
+ bl SetEnigmaBerry
ldr r4, =gStringVar2
ldr r1, [r6]
adds r1, r5
@@ -481,7 +481,7 @@ _08153B74:
bl StringExpandPlaceholders
movs r0, 0x2
str r0, [r7, 0x6C]
- bl sub_80E162C
+ bl IsEnigmaBerryValid
cmp r0, 0x1
bne _08153B9C
ldr r0, =0x0000402d
diff --git a/asm/pokeblock_feed.s b/asm/pokeblock_feed.s
index 8f63be452..4335e22cc 100644
--- a/asm/pokeblock_feed.s
+++ b/asm/pokeblock_feed.s
@@ -380,7 +380,7 @@ _08179EEC:
b _08179F5E
.pool
_08179F00:
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrb r0, [r0]
bl sub_8179FEC
ldr r0, =gUnknown_0203BD1C
@@ -692,7 +692,7 @@ sub_817A1C4: @ 817A1C4
ldr r0, =gPlayerParty
adds r5, r0
ldr r1, =gSaveBlock1Ptr
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
lsls r0, 3
ldr r2, =0x00000848
diff --git a/asm/porthole.s b/asm/porthole.s
index 0efe88773..e5986b47e 100644
--- a/asm/porthole.s
+++ b/asm/porthole.s
@@ -231,7 +231,7 @@ _080FB75E:
sub_80FB768: @ 80FB768
push {lr}
bl sub_80FB6EC
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
diff --git a/asm/rom4.s b/asm/rom4.s
index 9acdbec0a..9e4e9f108 100644
--- a/asm/rom4.s
+++ b/asm/rom4.s
@@ -4395,7 +4395,7 @@ sub_8086A68: @ 8086A68
thumb_func_start sub_8086A80
sub_8086A80: @ 8086A80
push {lr}
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r3, =gUnknown_02037590
ldrb r1, [r3, 0x5]
lsls r0, r1, 3
@@ -6030,7 +6030,7 @@ sub_80876F0: @ 80876F0
lsls r5, r6, 3
adds r5, r6
lsls r5, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r5, r0
adds r0, r4, 0
bl sub_80876C4
@@ -6128,7 +6128,7 @@ sub_80877DC: @ 80877DC
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r1, r0
strb r2, [r1, 0x19]
_080877FE:
@@ -6148,7 +6148,7 @@ sub_808780C: @ 808780C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
ldrb r0, [r4, 0x4]
cmp r0, 0x40
@@ -6183,7 +6183,7 @@ sub_8087858: @ 8087858
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldrb r0, [r0, 0x4]
bx lr
@@ -6200,7 +6200,7 @@ sub_8087878: @ 8087878
lsls r0, r3, 3
adds r0, r3
lsls r0, 2
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
adds r0, r3
ldrh r3, [r0, 0x10]
strh r3, [r1]
@@ -6220,7 +6220,7 @@ sub_80878A0: @ 80878A0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldrb r0, [r0, 0x19]
bx lr
@@ -6237,7 +6237,7 @@ sub_80878C0: @ 80878C0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
ldrb r0, [r0, 0xB]
lsls r0, 28
@@ -6256,7 +6256,7 @@ sub_80878E4: @ 80878E4
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
adds r0, 0x21
movs r1, 0
@@ -6292,7 +6292,7 @@ _0808792E:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r1, r0, r1
movs r6, 0x10
ldrsh r0, [r1, r6]
@@ -6332,7 +6332,7 @@ sub_808796C: @ 808796C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r6, r0, r1
ldrb r0, [r5]
cmp r0, 0
@@ -6584,7 +6584,7 @@ npc_080587EC: @ 8087B40
mov r12, r2
lsls r3, 16
movs r4, 0
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
mov r9, r0
lsrs r2, r3, 16
mov r10, r2
@@ -6660,7 +6660,7 @@ sub_8087BCC: @ 8087BCC
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
ldrb r0, [r2]
cmp r0, 0
@@ -6748,7 +6748,7 @@ sub_8087C8C: @ 8087C8C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r6, r0, r1
ldrh r0, [r6, 0xC]
strh r0, [r5, 0x20]
diff --git a/asm/rom6.s b/asm/rom6.s
index 65b3d9b94..16cb5827b 100644
--- a/asm/rom6.s
+++ b/asm/rom6.s
@@ -23,7 +23,7 @@ npc_before_player_of_type: @ 8135424
bl GetFieldObjectIdByXYZ
lsls r0, 24
lsrs r0, 24
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
@@ -75,7 +75,7 @@ task08_080C9820: @ 813549C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@@ -132,7 +132,7 @@ sub_813552C: @ 813552C
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectCheckIfSpecialAnimFinishedOrInactive
lsls r0, 24
@@ -196,7 +196,7 @@ _081355B8:
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
bl GetPlayerAvatarGraphicsIdByCurrentState
adds r1, r0, 0
@@ -2140,7 +2140,7 @@ _081366D0:
ldr r2, =0x0000ffff
adds r1, r2, 0
strh r1, [r0]
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
mov r1, r9
strh r1, [r0]
adds r0, r7, 0
@@ -2150,7 +2150,7 @@ _081366D0:
_081366F8:
movs r0, 0x5
bl PlaySE
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
strh r4, [r0]
adds r0, r7, 0
bl sub_8136938
@@ -2541,7 +2541,7 @@ sub_8136A50: @ 8136A50
sub_8136A74: @ 8136A74
push {lr}
ldr r2, =gSaveBlock1Ptr
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r1, [r0]
lsls r1, 3
ldr r0, =0x00000848
@@ -2586,7 +2586,7 @@ sub_8136AB4: @ 8136AB4
ldr r3, =gPokeblockNames
ldr r1, =gSaveBlock1Ptr
ldr r2, [r1]
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
ldrh r1, [r1]
lsls r1, 3
adds r2, r1
@@ -2689,7 +2689,7 @@ sub_8136BC0: @ 8136BC0
ands r0, r1
cmp r0, 0
beq _08136C36
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrb r0, [r0]
bl sub_8136F68
movs r0, 0x5
@@ -2772,7 +2772,7 @@ sub_8136C8C: @ 8136C8C
lsls r0, 24
lsrs r0, 24
ldr r5, =gSaveBlock1Ptr
- ldr r7, =gUnknown_0203CE7C
+ ldr r7, =gScriptItemId
ldrh r2, [r7]
lsls r2, 3
ldr r6, =0x00000848
@@ -2836,7 +2836,7 @@ sub_8136D2C: @ 8136D2C
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
- ldr r5, =gUnknown_0203CE7C
+ ldr r5, =gScriptItemId
ldrb r0, [r5]
bl SafariZoneActivatePokeblockFeeder
ldr r0, =gStringVar1
@@ -2877,7 +2877,7 @@ sub_8136D90: @ 8136D90
lsrs r4, 24
ldr r6, =gSpecialVar_0x8004
ldr r0, =gSaveBlock1Ptr
- ldr r5, =gUnknown_0203CE7C
+ ldr r5, =gScriptItemId
ldrh r1, [r5]
lsls r1, 3
ldr r2, =0x00000848
@@ -5673,7 +5673,7 @@ _08138454:
lsrs r2, r0, 24
cmp r2, 0x10
beq _081384E6
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
@@ -7257,7 +7257,7 @@ SpawnScriptFieldObject: @ 8139158
bl SpawnSpecialFieldObjectParametrized
lsls r0, 24
lsrs r0, 24
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
diff --git a/asm/rom_80AEFFC.s b/asm/rom_80AEFFC.s
index 566947ba3..23926a93e 100644
--- a/asm/rom_80AEFFC.s
+++ b/asm/rom_80AEFFC.s
@@ -599,7 +599,7 @@ _080AF4A4:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
movs r1, 0x8
bl FieldObjectSetSpecialAnim
@@ -630,7 +630,7 @@ _080AF4DC:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectClearAnimIfSpecialAnimFinished
movs r0, 0x3
@@ -719,7 +719,7 @@ _080AF5A2:
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
bl player_get_direction_lower_nybble
lsls r0, 24
@@ -1370,7 +1370,7 @@ _080AFB26:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
adds r0, r4
bl FieldObjectClearAnimIfSpecialAnimActive
movs r0, 0xFF
@@ -1414,7 +1414,7 @@ _080AFB6C:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectClearAnimIfSpecialAnimFinished
movs r0, 0
diff --git a/asm/rom_80C6FA0.s b/asm/rom_80C6FA0.s
index 570116cd3..715f45609 100644
--- a/asm/rom_80C6FA0.s
+++ b/asm/rom_80C6FA0.s
@@ -2252,7 +2252,7 @@ _080C8230:
ldrb r0, [r0]
cmp r0, 0x2
bne _080C825C
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
cmp r0, 0
beq _080C825C
@@ -5458,7 +5458,7 @@ _080C9F56:
sub_80C9F6C: @ 80C9F6C
push {lr}
sub sp, 0x4
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r1, [r0]
mov r0, sp
strh r1, [r0]
@@ -23955,7 +23955,7 @@ _080D3630:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl npc_sync_anim_pause_bits
_080D3646:
@@ -24023,7 +24023,7 @@ sub_80D36A4: @ 80D36A4
lsls r0, r2, 3
adds r0, r2
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectIsSpecialAnimActive
@@ -27175,7 +27175,7 @@ sub_80D5070: @ 80D5070
adds r4, r0, 0
cmp r4, 0x2A
bne _080D5082
- bl sub_80E162C
+ bl IsEnigmaBerryValid
_080D5082:
ldr r5, =gBerryPicTable
lsls r4, 3
diff --git a/asm/rom_8161F74.s b/asm/rom_8161F74.s
index 339476c45..605d3da1c 100644
--- a/asm/rom_8161F74.s
+++ b/asm/rom_8161F74.s
@@ -8813,7 +8813,7 @@ _08166BB6:
lsls r0, 24
cmp r0, 0
bne _08166BDA
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrb r0, [r0]
bl sub_8136F68
ldr r0, =sub_8166BEC
diff --git a/asm/rom_818E9AC.s b/asm/rom_818E9AC.s
index 3fac8c672..b4087b09e 100644
--- a/asm/rom_818E9AC.s
+++ b/asm/rom_818E9AC.s
@@ -14292,7 +14292,7 @@ sub_81963F0: @ 81963F0
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectClearAnimIfSpecialAnimFinished
bl sub_80D338C
@@ -49829,7 +49829,7 @@ _081A896E:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectClearAnimIfSpecialAnimFinished
bl sub_80D338C
@@ -50127,7 +50127,7 @@ _081A8BB4:
bne _081A8BDC
b _081A8D32
_081A8BDC:
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
lsls r1, r2, 3
adds r1, r2
lsls r1, 2
@@ -51130,8 +51130,8 @@ sub_81A9424: @ 81A9424
lsls r1, 4
adds r1, r0
mov r8, r1
- ldr r2, =gUnknown_02037350
- ldr r0, =gUnknown_03005DF0
+ ldr r2, =gMapObjects
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
@@ -51178,8 +51178,8 @@ _081A9488:
mov r9, r0
_081A94AE:
ldr r3, =gUnknown_08613ED8
- ldr r2, =gUnknown_02037350
- ldr r0, =gUnknown_03005DF0
+ ldr r2, =gMapObjects
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
@@ -51790,7 +51790,7 @@ sub_81A9998: @ 81A9998
mov r8, r0
ldr r1, =0x0000028e
mov r12, r1
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
mov r9, r0
_081A99CC:
movs r2, 0
@@ -51803,7 +51803,7 @@ _081A99CE:
cmp r0, r12
bne _081A9A8A
adds r2, 0x7
- ldr r0, =gUnknown_03005DF0
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
@@ -51931,7 +51931,7 @@ GetBattlePyramidTrainerFlag: @ 81A9AC4
ldr r1, =0x00000e2a
adds r2, r1
ldr r4, =gBitTable
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
@@ -51964,7 +51964,7 @@ sub_81A9B04: @ 81A9B04
beq _081A9B2E
movs r0, 0x1
bl sub_80B47E0
- ldr r1, =gUnknown_03005DF0
+ ldr r1, =gSelectedMapObject
strb r0, [r1]
ldr r0, =gTrainerBattleOpponent_B
ldrh r0, [r0]
@@ -51985,9 +51985,9 @@ sub_81A9B44: @ 81A9B44
lsls r0, 16
lsrs r5, r0, 16
movs r3, 0
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
mov r12, r0
- ldr r6, =gUnknown_03005DF0
+ ldr r6, =gSelectedMapObject
ldr r1, =gSaveBlock1Ptr
mov r10, r1
ldr r7, =gSaveBlock2Ptr
@@ -56182,7 +56182,7 @@ _081ABE32:
_081ABE40:
movs r0, 0x5
bl PlaySE
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
mov r1, r10
strh r1, [r0]
ldr r0, =gTasks + 0x8
@@ -56216,7 +56216,7 @@ _081ABE68:
lsrs r0, 24
adds r1, r4, 0
bl BagGetItemIdByPocketPosition
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
strh r0, [r1]
ldr r1, =gUnknown_08614054
ldrb r0, [r5, 0x4]
@@ -57126,7 +57126,7 @@ _081AC668:
.4byte _081AC70C
.4byte _081AC690
_081AC690:
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl ItemId_GetBattleUsage
lsls r0, 24
@@ -57171,7 +57171,7 @@ _081AC6E8:
b _081ACA10
.pool
_081AC70C:
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
bl itemid_is_unique
lsls r0, 24
@@ -57206,7 +57206,7 @@ _081AC748:
b _081ACA10
.pool
_081AC76C:
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
bl itemid_is_unique
lsls r0, 24
@@ -57241,7 +57241,7 @@ _081AC7A8:
b _081ACA10
.pool
_081AC7CC:
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
bl itemid_is_unique
lsls r0, 24
@@ -57289,7 +57289,7 @@ _081AC840:
ldrb r0, [r0, 0x5]
cmp r0, 0x4
beq _081AC856
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl sub_8122148
lsls r0, 24
@@ -57359,7 +57359,7 @@ _081AC8D4:
ldr r1, =gUnknown_0861402C
movs r2, 0x4
bl memcpy
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl itemid_is_mail
lsls r0, 24
@@ -57397,7 +57397,7 @@ _081AC92C:
ldr r0, [r0]
ldr r1, =0x00000496
adds r0, r1
- ldr r2, =gUnknown_0203CE7C
+ ldr r2, =gScriptItemId
ldrh r0, [r0]
ldrh r1, [r2]
cmp r0, r1
@@ -57473,7 +57473,7 @@ _081ACA12:
bne _081ACA50
movs r0, 0x1
bl ClearWindowTilemap
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl PrintTMHMMoveData
movs r0, 0x3
@@ -57485,7 +57485,7 @@ _081ACA12:
b _081ACA86
.pool
_081ACA50:
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -57986,7 +57986,7 @@ ItemMenu_UseOutOfBattle: @ 81ACE7C
push {r4,r5,lr}
lsls r0, 24
lsrs r4, r0, 24
- ldr r5, =gUnknown_0203CE7C
+ ldr r5, =gScriptItemId
ldrh r0, [r5]
bl ItemId_GetFieldFunc
cmp r0, 0
@@ -58016,7 +58016,7 @@ _081ACEB8:
ldrb r0, [r0, 0x5]
cmp r0, 0x3
beq _081ACEE8
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl ItemId_GetFieldFunc
adds r1, r0, 0
@@ -58056,7 +58056,7 @@ ItemMenu_Toss: @ 81ACEF4
b _081ACF6A
.pool
_081ACF24:
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -58106,7 +58106,7 @@ BagMenuConfirmToss: @ 81ACF88
lsls r4, 3
ldr r0, =gTasks + 0x8
adds r4, r0
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -58243,7 +58243,7 @@ BagMenuActuallyToss: @ 81AD0CC
lsls r4, 3
ldr r5, =gTasks + 0x8
adds r6, r4, r5
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -58313,7 +58313,7 @@ Task_ActuallyToss: @ 81AD150
beq _081AD1CE
movs r0, 0x5
bl PlaySE
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldrh r1, [r5, 0x10]
bl RemoveBagItem
@@ -58370,7 +58370,7 @@ ItemMenu_Register: @ 81AD1EC
ldr r0, [r0]
ldr r2, =0x00000496
adds r1, r0, r2
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r2, [r0]
ldrh r0, [r1]
cmp r0, r2
@@ -58413,7 +58413,7 @@ ItemMenu_Give: @ 81AD278
lsrs r4, r0, 24
adds r6, r4, 0
bl bag_menu_remove_some_window
- ldr r5, =gUnknown_0203CE7C
+ ldr r5, =gScriptItemId
ldrh r0, [r5]
bl itemid_80BF6D8_mail_related
lsls r0, 24
@@ -58477,7 +58477,7 @@ bag_menu_print_cant_be_held_msg: @ 81AD30C
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -58568,7 +58568,7 @@ ItemMenu_UseInBattle: @ 81AD3DC
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
bl ItemId_GetBattleFunc
cmp r0, 0
@@ -58602,7 +58602,7 @@ item_menu_type_2: @ 81AD41C
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
bl itemid_80BF6D8_mail_related
lsls r0, 24
@@ -58663,7 +58663,7 @@ item_menu_type_b: @ 81AD4B4
push {r4,r5,lr}
lsls r0, 24
lsrs r4, r0, 24
- ldr r5, =gUnknown_0203CE7C
+ ldr r5, =gScriptItemId
ldrh r0, [r5]
bl itemid_is_mail
lsls r0, 24
@@ -58752,7 +58752,7 @@ _081AD550:
bl player_bitmagic
bl sub_808B864
bl sub_808BCF4
- ldr r2, =gUnknown_0203CE7C
+ ldr r2, =gScriptItemId
ldr r0, [r4]
adds r0, r5
ldrh r1, [r0]
@@ -58799,7 +58799,7 @@ display_sell_item_ask_str: @ 81AD5DC
lsls r0, 3
ldr r1, =gTasks + 0x8
adds r4, r0, r1
- ldr r6, =gUnknown_0203CE7C
+ ldr r6, =gScriptItemId
ldrh r0, [r6]
bl itemid_get_market_price
lsls r0, 16
@@ -58862,7 +58862,7 @@ sub_81AD680: @ 81AD680
ldr r0, =gTasks + 0x8
adds r4, r0
ldr r6, =gStringVar1
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl itemid_get_market_price
lsls r0, 16
@@ -58945,7 +58945,7 @@ sub_81AD730: @ 81AD730
adds r5, r0, 0
lsls r5, 24
lsrs r5, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl itemid_get_market_price
lsls r0, 16
@@ -58997,7 +58997,7 @@ sub_81AD794: @ 81AD794
ldrb r4, [r0]
movs r2, 0x10
ldrsh r5, [r6, r2]
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl itemid_get_market_price
lsls r0, 16
@@ -59062,7 +59062,7 @@ sub_81AD84C: @ 81AD84C
lsls r4, 3
ldr r0, =gTasks + 0x8
adds r4, r0
- ldr r6, =gUnknown_0203CE7C
+ ldr r6, =gScriptItemId
ldrh r0, [r6]
ldr r1, =gStringVar2
bl CopyItemName
@@ -59123,7 +59123,7 @@ sub_81AD8C8: @ 81AD8C8
adds r5, r0
movs r0, 0x5F
bl PlaySE
- ldr r2, =gUnknown_0203CE7C
+ ldr r2, =gScriptItemId
mov r8, r2
ldrh r0, [r2]
mov r3, r10
@@ -59242,7 +59242,7 @@ display_deposit_item_ask_str: @ 81AD9EC
b _081ADA5E
.pool
_081ADA18:
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -59367,7 +59367,7 @@ sub_81ADB14: @ 81ADB14
movs r0, 0x1
movs r1, 0
bl FillWindowPixelBuffer
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
bl itemid_is_unique
lsls r0, 24
@@ -59691,7 +59691,7 @@ _081ADDEC:
ldrb r0, [r4]
movs r1, 0x2
bl bag_menu_print_cursor_
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
movs r0, 0x4
strh r0, [r1]
adds r0, r5, 0
@@ -59727,7 +59727,7 @@ unknown_ItemMenu_Show: @ 81ADE38
lsls r4, 24
lsrs r4, 24
ldr r1, =gSpecialVar_0x8005
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
strh r0, [r1]
ldr r1, =gScriptResult
@@ -59761,7 +59761,7 @@ unknown_ItemMenu_Give2: @ 81ADE8C
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
movs r1, 0x1
bl RemoveBagItem
@@ -65475,7 +65475,7 @@ sub_81B0BFC: @ 81B0BFC
muls r1, r0
ldr r0, =gPlayerParty
adds r6, r1, r0
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r4, [r0]
ldr r0, =gUnknown_0203CEC8
ldrb r0, [r0, 0xB]
@@ -72001,7 +72001,7 @@ c2_8123744: @ 81B41F0
mov r7, r8
push {r7}
sub sp, 0xC
- ldr r6, =gUnknown_0203CE7C
+ ldr r6, =gScriptItemId
ldrh r0, [r6]
cmp r0, 0
bne _081B4224
@@ -72107,7 +72107,7 @@ sub_81B42D0: @ 81B42D0
ands r0, r1
cmp r0, 0
bne _081B432C
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r4, [r0]
ldr r0, =gUnknown_0203CEC8
mov r8, r0
@@ -72231,7 +72231,7 @@ _081B43FC:
beq _081B44DE
b _081B44EC
_081B4402:
- ldr r5, =gUnknown_0203CE7C
+ ldr r5, =gScriptItemId
ldrh r0, [r5]
movs r1, 0x1
bl RemoveBagItem
@@ -72474,7 +72474,7 @@ sub_81B4624: @ 81B4624
muls r0, r1
ldr r1, =gPlayerParty
adds r0, r1
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
ldrh r1, [r1]
movs r2, 0
movs r3, 0
@@ -72482,7 +72482,7 @@ sub_81B4624: @ 81B4624
b _081B467C
.pool
_081B4670:
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldrh r1, [r1]
movs r2, 0
@@ -75621,7 +75621,7 @@ _081B61BC:
movs r7, 0
movs r6, 0
_081B61C0:
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
bl GetItemEffectType
lsls r0, 24
@@ -76049,7 +76049,7 @@ ItemUseCB_Medicine: @ 81B6588
muls r1, r0
ldr r0, =gPlayerParty
adds r5, r1, r0
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r6, [r0]
adds r0, r5, 0
adds r1, r6, 0
@@ -76294,7 +76294,7 @@ sub_81B67C8: @ 81B67C8
muls r1, r0
ldr r0, =gPlayerParty
adds r5, r1, r0
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r6, [r0]
adds r0, r6, 0
bl GetItemEffectType
@@ -76653,7 +76653,7 @@ dp05_ether: @ 81B6AFC
push {r4,lr}
lsls r0, 24
lsrs r4, r0, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
cmp r0, 0xAF
bne _081B6B20
@@ -76762,7 +76762,7 @@ ether_effect_related: @ 81B6BEC
lsrs r6, r0, 24
movs r4, 0
ldr r7, =gUnknown_0203CED6
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r5, [r0]
movs r0, 0xE
negs r0, r0
@@ -76991,7 +76991,7 @@ sub_81B6DC4: @ 81B6DC4
movs r0, 0xE
adds r0, r7
mov r8, r0
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r4, [r0]
ldr r1, =gStringVar1
adds r0, r5, 0
@@ -77080,7 +77080,7 @@ sub_81B6EB4: @ 81B6EB4
adds r5, r1, r0
adds r6, r2, 0
adds r6, 0xE
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r4, [r0]
movs r1, 0x2
ldrsh r0, [r6, r1]
@@ -77671,7 +77671,7 @@ dp05_rare_candy: @ 81B7404
movs r1, 0x86
lsls r1, 2
adds r4, r6, r1
- ldr r2, =gUnknown_0203CE7C
+ ldr r2, =gScriptItemId
mov r8, r2
adds r0, r5, 0
movs r1, 0x38
@@ -77729,7 +77729,7 @@ _081B74B4:
ldrb r0, [r0, 0x9]
adds r1, r5, 0
bl sub_81B754C
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
movs r1, 0x1
bl RemoveBagItem
@@ -78346,7 +78346,7 @@ sub_81B7A28: @ 81B7A28
lsls r0, 16
lsrs r7, r0, 16
ldrb r0, [r6, 0x9]
- ldr r1, =gUnknown_0203CE7C
+ ldr r1, =gScriptItemId
ldrh r1, [r1]
movs r2, 0
bl ExecuteTableBasedItemEffect__
@@ -78498,7 +78498,7 @@ _081B7BC8:
ldr r1, =gUnknown_0203CEE8
movs r0, 0x1
strb r0, [r1]
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
movs r1, 0x1
bl RemoveBagItem
@@ -78574,7 +78574,7 @@ sub_81B7C74: @ 81B7C74
ldr r0, [r1]
str r0, [r2]
ldrb r0, [r1, 0x9]
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r1, [r4]
movs r2, 0
bl ExecuteTableBasedItemEffect__
@@ -78947,7 +78947,7 @@ _081B7F72:
movs r3, 0
bl sub_81B0038
ldr r1, =gUnknown_0203CEC8
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
strh r0, [r1, 0xC]
add sp, 0xC
diff --git a/asm/rom_81BE66C.s b/asm/rom_81BE66C.s
index 119556f70..4a53cd463 100644
--- a/asm/rom_81BE66C.s
+++ b/asm/rom_81BE66C.s
@@ -225,7 +225,7 @@ sub_81BE808: @ 81BE808
lsls r2, r0, 3
adds r2, r0
lsls r2, 2
- ldr r4, =gUnknown_02037350
+ ldr r4, =gMapObjects
adds r2, r4
ldr r3, =gSprites
ldrb r1, [r2, 0x4]
@@ -13574,7 +13574,7 @@ _081C5C5C:
_081C5C88:
movs r0, 0x5
bl PlaySE
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
strh r4, [r0]
adds r0, r5, 0
bl sub_81C5B14
@@ -13583,7 +13583,7 @@ _081C5C88:
_081C5CA0:
movs r0, 0x5
bl PlaySE
- ldr r2, =gUnknown_0203CE7C
+ ldr r2, =gScriptItemId
mov r12, r2
ldr r0, =gSaveBlock2Ptr
ldr r2, [r0]
@@ -13670,7 +13670,7 @@ sub_81C5D20: @ 81C5D20
b _081C5DD8
.pool
_081C5D74:
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
bl ItemId_GetBattleUsage
lsls r0, 24
@@ -13711,7 +13711,7 @@ _081C5DCE:
_081C5DD8:
strb r0, [r1]
_081C5DDA:
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -14184,7 +14184,7 @@ sub_81C61E0: @ 81C61E0
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
bl ItemId_GetPocket
lsls r0, 24
@@ -14304,7 +14304,7 @@ sub_81C62C4: @ 81C62C4
b _081C6334
.pool
_081C62F4:
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -14351,7 +14351,7 @@ sub_81C6350: @ 81C6350
lsls r4, 3
ldr r0, =gTasks + 0x8
adds r4, r0
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -14566,7 +14566,7 @@ sub_81C654C: @ 81C654C
lsls r4, 3
ldr r5, =gTasks + 0x8
adds r6, r4, r5
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -14624,7 +14624,7 @@ sub_81C65CC: @ 81C65CC
beq _081C662E
movs r0, 0x5
bl PlaySE
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldrh r1, [r4, 0x10]
bl RemovePyramidBagItem
@@ -14660,7 +14660,7 @@ sub_81C6648: @ 81C6648
lsrs r4, r0, 24
adds r6, r4, 0
bl sub_81C61A8
- ldr r5, =gUnknown_0203CE7C
+ ldr r5, =gScriptItemId
ldrh r0, [r5]
bl itemid_is_mail
lsls r0, 24
@@ -14702,7 +14702,7 @@ sub_81C66AC: @ 81C66AC
adds r4, r0, 0
lsls r4, 24
lsrs r4, 24
- ldr r0, =gUnknown_0203CE7C
+ ldr r0, =gScriptItemId
ldrh r0, [r0]
ldr r1, =gStringVar1
bl CopyItemName
@@ -14774,7 +14774,7 @@ sub_81C674C: @ 81C674C
lsls r0, 24
lsrs r4, r0, 24
adds r6, r4, 0
- ldr r5, =gUnknown_0203CE7C
+ ldr r5, =gScriptItemId
ldrh r0, [r5]
bl itemid_80BF6D8_mail_related
lsls r0, 24
@@ -14809,7 +14809,7 @@ sub_81C679C: @ 81C679C
push {r4,r5,lr}
lsls r0, 24
lsrs r5, r0, 24
- ldr r4, =gUnknown_0203CE7C
+ ldr r4, =gScriptItemId
ldrh r0, [r4]
bl ItemId_GetBattleFunc
cmp r0, 0
@@ -42692,7 +42692,7 @@ sub_81D427C: @ 81D427C
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
adds r5, r1, r2
ldr r4, =gUnknown_030012F8
ldr r3, =gUnknown_02037590
@@ -42730,7 +42730,7 @@ _081D42CA:
mov r8, r0
cmp r0, 0x3
bls _081D42CA
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -42786,7 +42786,7 @@ _081D4356:
_081D4360:
movs r4, 0
mov r8, r4
- ldr r6, =gUnknown_02037350
+ ldr r6, =gMapObjects
mov r10, r6
_081D4368:
ldr r3, =gUnknown_02037590
@@ -42804,7 +42804,7 @@ _081D4368:
ldrsh r2, [r4, r6]
movs r6, 0
ldrsh r0, [r0, r6]
- ldr r6, =gUnknown_02037350
+ ldr r6, =gMapObjects
mov r9, r6
mov r12, r3
adds r7, r1, 0
@@ -42952,7 +42952,7 @@ _081D449E:
ldrsh r1, [r4, r3]
movs r3, 0
ldrsh r0, [r0, r3]
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
mov r9, r3
mov r12, r2
cmp r1, r0
@@ -43210,7 +43210,7 @@ _081D46D0:
ldrsh r0, [r0, r3]
cmp r0, 0
bne _081D476E
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -43235,7 +43235,7 @@ _081D46D0:
beq _081D470C
b _081D447C
_081D470C:
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -43289,7 +43289,7 @@ _081D476E:
ldrsh r0, [r0, r2]
cmp r0, 0
bne _081D480C
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -43314,7 +43314,7 @@ _081D476E:
beq _081D47AA
b _081D45AA
_081D47AA:
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
ldr r0, =gUnknown_02037590
ldrb r1, [r0, 0x5]
lsls r0, r1, 3
@@ -43385,7 +43385,7 @@ sub_81D4834: @ 81D4834
lsls r0, 16
lsls r1, 16
lsrs r4, r1, 16
- ldr r3, =gUnknown_02037350
+ ldr r3, =gMapObjects
ldr r1, =gUnknown_02037590
ldrb r2, [r1, 0x5]
lsls r1, r2, 3
@@ -43436,7 +43436,7 @@ sub_81D4890: @ 81D4890
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r1, r0
movs r1, 0
ldr r3, =gUnknown_030012FC
@@ -43684,7 +43684,7 @@ sub_81D4A90: @ 81D4A90
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r5, r1, r0
ldrb r1, [r5, 0x1]
movs r0, 0x21
@@ -46426,7 +46426,7 @@ GetTrainerHillTrainerFlag: @ 81D619C
bl sub_81D5520
lsls r0, 24
lsrs r0, 23
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
lsls r1, r4, 3
adds r1, r4
lsls r1, 2
diff --git a/asm/scrcmd.s b/asm/scrcmd.s
index 2cef4b0b0..139f1cf8e 100644
--- a/asm/scrcmd.s
+++ b/asm/scrcmd.s
@@ -2987,8 +2987,8 @@ sA9_unknown: @ 809A974
thumb_func_start s5A_face_player
s5A_face_player: @ 809A9A4
push {r4,lr}
- ldr r2, =gUnknown_02037350
- ldr r0, =gUnknown_03005DF0
+ ldr r2, =gMapObjects
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
@@ -3163,8 +3163,8 @@ sub_809AAEC: @ 809AAEC
movs r0, 0
b _0809AB3A
_0809AAFC:
- ldr r2, =gUnknown_02037350
- ldr r0, =gUnknown_03005DF0
+ ldr r2, =gMapObjects
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
@@ -3208,7 +3208,7 @@ s6B_release: @ 809AB44
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl FieldObjectClearAnimIfSpecialAnimFinished
bl sub_80D338C
@@ -3223,8 +3223,8 @@ s6B_release: @ 809AB44
s6C_release_2: @ 809AB7C
push {r4,lr}
bl textbox_close
- ldr r4, =gUnknown_02037350
- ldr r0, =gUnknown_03005DF0
+ ldr r4, =gMapObjects
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
@@ -5379,7 +5379,7 @@ sub_809BBDC: @ 809BBDC
sub_809BBE8: @ 809BBE8
push {lr}
bl sub_80B47BC
- ldr r1, =gUnknown_03005DF0
+ ldr r1, =gSelectedMapObject
strb r0, [r1]
movs r0, 0
pop {r1}
@@ -5397,8 +5397,8 @@ sub_809BBFC: @ 809BBFC
movs r0, 0
b _0809BC30
_0809BC0C:
- ldr r2, =gUnknown_02037350
- ldr r0, =gUnknown_03005DF0
+ ldr r2, =gMapObjects
+ ldr r0, =gSelectedMapObject
ldrb r1, [r0]
lsls r0, r1, 3
adds r0, r1
diff --git a/asm/script_pokemon_util_80F87D8.s b/asm/script_pokemon_util_80F87D8.s
index c0bcb5a6e..e5193c4d2 100644
--- a/asm/script_pokemon_util_80F87D8.s
+++ b/asm/script_pokemon_util_80F87D8.s
@@ -508,7 +508,7 @@ _080F8BBA:
bl GetFieldObjectIdByLocalIdAndMap
lsls r0, 24
lsrs r0, 24
- ldr r2, =gUnknown_02037350
+ ldr r2, =gMapObjects
lsls r1, r0, 3
adds r1, r0
lsls r1, 2
diff --git a/asm/secret_base.s b/asm/secret_base.s
index 286033edd..4e2ac0c9b 100644
--- a/asm/secret_base.s
+++ b/asm/secret_base.s
@@ -756,7 +756,7 @@ sub_80E90C8: @ 80E90C8
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
movs r1, 0x2
bl FieldObjectTurn
diff --git a/asm/shop.s b/asm/shop.s
index e5be4cd20..268f5911a 100644
--- a/asm/shop.s
+++ b/asm/shop.s
@@ -1633,7 +1633,7 @@ _080E07AA:
lsrs r0, 24
mov r1, r12
strh r0, [r1]
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
lsls r0, r6, 3
adds r0, r6
lsls r0, 2
@@ -1730,7 +1730,7 @@ BuyMenuDrawFieldObjects: @ 80E08F0
movs r7, 0
ldr r0, =gUnknown_02039F70
mov r8, r0
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
mov r10, r1
ldr r2, =gSprites
mov r9, r2
diff --git a/asm/trainer_see.s b/asm/trainer_see.s
index cd9715a5c..d725b9f15 100644
--- a/asm/trainer_see.s
+++ b/asm/trainer_see.s
@@ -15,7 +15,7 @@ CheckForTrainersWantingBattle: @ 80B3BE8
ldr r0, =gUnknown_02038BFC
strb r1, [r0]
movs r4, 0
- ldr r6, =gUnknown_02037350
+ ldr r6, =gMapObjects
_080B3BF8:
lsls r0, r4, 3
adds r0, r4
@@ -180,7 +180,7 @@ _080B3D56:
lsls r4, r5, 3
adds r0, r4, r5
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
bl CheckIfTrainerCanApproachPlayer
lsls r0, 24
@@ -227,7 +227,7 @@ _080B3D8A:
mov r1, r8
adds r0, r1, r5
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r0, r1
subs r1, r6, 0x1
lsls r1, 24
@@ -691,7 +691,7 @@ c3_8081EDC: @ 80B4118
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r5, r0, r1
ldrb r0, [r5]
lsls r0, 31
@@ -887,7 +887,7 @@ _080B427A:
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive
@@ -906,7 +906,7 @@ _080B42D2:
lsls r4, r0, 3
adds r4, r0
lsls r4, 2
- ldr r0, =gUnknown_02037350
+ ldr r0, =gMapObjects
adds r4, r0
ldrb r0, [r5, 0x18]
lsls r0, 28
@@ -941,7 +941,7 @@ sub_80B4318: @ 80B4318
lsls r0, r1, 3
adds r0, r1
lsls r0, 2
- ldr r1, =gUnknown_02037350
+ ldr r1, =gMapObjects
adds r4, r0, r1
adds r0, r4, 0
bl FieldObjectIsSpecialAnimOrDirectionSequenceAnimActive