summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2019-04-11 16:30:30 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2019-04-11 16:30:30 -0400
commitc5e238b8c12f58ae2043587c610bcd70215d39e2 (patch)
treeb8b5cfe14cc558e35dae3fcf3a86a4e94a40d002
parent532907559304e1b32f8efa76e2fb8a2fc526ec02 (diff)
Roamer: Documentation
-rw-r--r--asm/field_specials.s20
-rw-r--r--asm/new_game.s2
-rw-r--r--asm/roamer.s92
-rw-r--r--asm/wild_pokemon_area.s4
-rw-r--r--data/data_83F5738.s2
-rw-r--r--data/roamer.s2
-rw-r--r--data/specials.inc4
-rw-r--r--include/constants/vars.h2
-rw-r--r--sym_ewram.txt4
9 files changed, 66 insertions, 66 deletions
diff --git a/asm/field_specials.s b/asm/field_specials.s
index 4c0b97151..8e24bedbf 100644
--- a/asm/field_specials.s
+++ b/asm/field_specials.s
@@ -756,7 +756,7 @@ sub_80CAB78: @ 80CAB78
bl VarGet
lsls r0, 16
lsrs r0, 16
- bl sub_80CBD94
+ bl GetStarterPokemon
lsls r0, 16
lsrs r6, r0, 16
bl CalculatePlayerPartyCount
@@ -3085,8 +3085,8 @@ sub_80CBD80: @ 80CBD80
bx r0
thumb_func_end sub_80CBD80
- thumb_func_start sub_80CBD94
-sub_80CBD94: @ 80CBD94
+ thumb_func_start GetStarterPokemon
+GetStarterPokemon: @ 80CBD94
push {lr}
lsls r0, 16
lsrs r1, r0, 16
@@ -3094,31 +3094,31 @@ sub_80CBD94: @ 80CBD94
bls _080CBDA0
movs r1, 0
_080CBDA0:
- ldr r0, _080CBDAC @ =gUnknown_83F5D2C
+ ldr r0, _080CBDAC @ =sStarterMon
lsls r1, 1
adds r1, r0
ldrh r0, [r1]
pop {r1}
bx r1
.align 2, 0
-_080CBDAC: .4byte gUnknown_83F5D2C
- thumb_func_end sub_80CBD94
+_080CBDAC: .4byte sStarterMon
+ thumb_func_end GetStarterPokemon
- thumb_func_start sub_80CBDB0
-sub_80CBDB0: @ 80CBDB0
+ thumb_func_start ScrSpecial_GetStarter
+ScrSpecial_GetStarter: @ 80CBDB0
push {lr}
ldr r0, _080CBDC8 @ =0x00004031
bl VarGet
lsls r0, 16
lsrs r0, 16
- bl sub_80CBD94
+ bl GetStarterPokemon
lsls r0, 16
lsrs r0, 16
pop {r1}
bx r1
.align 2, 0
_080CBDC8: .4byte 0x00004031
- thumb_func_end sub_80CBDB0
+ thumb_func_end ScrSpecial_GetStarter
thumb_func_start sub_80CBDCC
sub_80CBDCC: @ 80CBDCC
diff --git a/asm/new_game.s b/asm/new_game.s
index cec2b2c9a..d1d5a1487 100644
--- a/asm/new_game.s
+++ b/asm/new_game.s
@@ -257,7 +257,7 @@ sub_8054A60: @ 8054A60
strb r5, [r0]
bl ZeroPlayerPartyMons
bl sub_808C7E0
- bl sub_8141C54
+ bl ClearRoamerData
ldr r0, [r6]
ldr r1, _08054B68 @ =0x00000296
adds r0, r1
diff --git a/asm/roamer.s b/asm/roamer.s
index d42b34293..82ce82395 100644
--- a/asm/roamer.s
+++ b/asm/roamer.s
@@ -5,8 +5,8 @@
.text
- thumb_func_start sub_8141C54
-sub_8141C54: @ 8141C54
+ thumb_func_start ClearRoamerData
+ClearRoamerData: @ 8141C54
push {lr}
ldr r0, _08141C84 @ =gSaveBlock1Ptr
ldr r0, [r0]
@@ -15,13 +15,13 @@ sub_8141C54: @ 8141C54
movs r1, 0
movs r2, 0x1C
bl memset
- ldr r1, _08141C8C @ =gUnknown_203F3AE
+ ldr r1, _08141C8C @ =sRoamerLocation
movs r0, 0
strb r0, [r1]
strb r0, [r1, 0x1]
movs r1, 0
movs r2, 0
- ldr r0, _08141C90 @ =gUnknown_203F3A8
+ ldr r0, _08141C90 @ =sLocationHistory
_08141C74:
strb r2, [r0]
strb r2, [r0, 0x1]
@@ -34,31 +34,31 @@ _08141C74:
.align 2, 0
_08141C84: .4byte gSaveBlock1Ptr
_08141C88: .4byte 0x000030d0
-_08141C8C: .4byte gUnknown_203F3AE
-_08141C90: .4byte gUnknown_203F3A8
- thumb_func_end sub_8141C54
+_08141C8C: .4byte sRoamerLocation
+_08141C90: .4byte sLocationHistory
+ thumb_func_end ClearRoamerData
- thumb_func_start sub_8141C94
-sub_8141C94: @ 8141C94
+ thumb_func_start CreateInitialRoamerMon
+CreateInitialRoamerMon: @ 8141C94
push {r4-r7,lr}
sub sp, 0x10
ldr r7, _08141CB0 @ =gEnemyParty
- bl sub_80CBDB0
+ bl ScrSpecial_GetStarter
lsls r0, 16
lsrs r0, 16
- cmp r0, 0x1
+ cmp r0, 0x1 @ SPECIES_BULBASAUR
beq _08141CB4
- cmp r0, 0x4
+ cmp r0, 0x4 @ SPECIES_CHARMANDER
beq _08141CB8
- movs r6, 0xF3
+ movs r6, 0xF3 @ SPECIES_RAIKOU
b _08141CBA
.align 2, 0
_08141CB0: .4byte gEnemyParty
_08141CB4:
- movs r6, 0xF4
+ movs r6, 0xF4 @ SPECIES_ENTEI
b _08141CBA
_08141CB8:
- movs r6, 0xF5
+ movs r6, 0xF5 @ SPECIES_SUICUNE
_08141CBA:
movs r0, 0
str r0, [sp]
@@ -133,11 +133,11 @@ _08141CBA:
ldr r1, [r5]
adds r1, r4
strb r0, [r1, 0x12]
- ldr r5, _08141D94 @ =gUnknown_203F3AE
+ ldr r5, _08141D94 @ =sRoamerLocation
movs r0, 0x3
strb r0, [r5]
bl Random
- ldr r4, _08141D98 @ =gUnknown_8466C58
+ ldr r4, _08141D98 @ =sRoamerLocations
lsls r0, 16
lsrs r0, 16
movs r1, 0x19
@@ -156,22 +156,22 @@ _08141CBA:
.align 2, 0
_08141D8C: .4byte gSaveBlock1Ptr
_08141D90: .4byte 0x000030d0
-_08141D94: .4byte gUnknown_203F3AE
-_08141D98: .4byte gUnknown_8466C58
- thumb_func_end sub_8141C94
+_08141D94: .4byte sRoamerLocation
+_08141D98: .4byte sRoamerLocations
+ thumb_func_end CreateInitialRoamerMon
- thumb_func_start sub_8141D9C
-sub_8141D9C: @ 8141D9C
+ thumb_func_start InitRoamer
+InitRoamer: @ 8141D9C
push {lr}
- bl sub_8141C54
- bl sub_8141C94
+ bl ClearRoamerData
+ bl CreateInitialRoamerMon
pop {r0}
bx r0
- thumb_func_end sub_8141D9C
+ thumb_func_end InitRoamer
thumb_func_start UpdateLocationHistoryForRoamer
UpdateLocationHistoryForRoamer: @ 8141DAC
- ldr r0, _08141DCC @ =gUnknown_203F3A8
+ ldr r0, _08141DCC @ =sLocationHistory
ldrb r1, [r0, 0x2]
strb r1, [r0, 0x4]
ldrb r1, [r0, 0x3]
@@ -188,7 +188,7 @@ UpdateLocationHistoryForRoamer: @ 8141DAC
strb r1, [r0, 0x1]
bx lr
.align 2, 0
-_08141DCC: .4byte gUnknown_203F3A8
+_08141DCC: .4byte sLocationHistory
_08141DD0: .4byte gSaveBlock1Ptr
thumb_func_end UpdateLocationHistoryForRoamer
@@ -202,10 +202,10 @@ RoamerMoveToOtherLocationSet: @ 8141DD4
ldrb r0, [r0, 0x13]
cmp r0, 0
beq _08141E10
- ldr r1, _08141E20 @ =gUnknown_203F3AE
+ ldr r1, _08141E20 @ =sRoamerLocation
movs r0, 0x3
strb r0, [r1]
- ldr r5, _08141E24 @ =gUnknown_8466C58
+ ldr r5, _08141E24 @ =sRoamerLocations
adds r4, r1, 0
_08141DEE:
bl Random
@@ -230,8 +230,8 @@ _08141E10:
.align 2, 0
_08141E18: .4byte gSaveBlock1Ptr
_08141E1C: .4byte 0x000030d0
-_08141E20: .4byte gUnknown_203F3AE
-_08141E24: .4byte gUnknown_8466C58
+_08141E20: .4byte sRoamerLocation
+_08141E24: .4byte sRoamerLocations
thumb_func_end RoamerMoveToOtherLocationSet
thumb_func_start RoamerMove
@@ -255,9 +255,9 @@ _08141E42:
ldrb r0, [r0, 0x13]
cmp r0, 0
beq _08141EB2
- ldr r7, _08141E9C @ =gUnknown_203F3AE
+ ldr r7, _08141E9C @ =sRoamerLocation
_08141E52:
- ldr r3, _08141EA0 @ =gUnknown_8466C58
+ ldr r3, _08141EA0 @ =sRoamerLocations
lsls r0, r4, 3
subs r2, r0, r4
adds r1, r2, r3
@@ -267,7 +267,7 @@ _08141E52:
bne _08141EA8
adds r6, r3, 0
adds r5, r2, 0x1
- ldr r4, _08141EA4 @ =gUnknown_203F3A8
+ ldr r4, _08141EA4 @ =sLocationHistory
_08141E68:
bl Random
lsls r0, 16
@@ -293,9 +293,9 @@ _08141E8C:
.align 2, 0
_08141E94: .4byte gSaveBlock1Ptr
_08141E98: .4byte 0x000030d0
-_08141E9C: .4byte gUnknown_203F3AE
-_08141EA0: .4byte gUnknown_8466C58
-_08141EA4: .4byte gUnknown_203F3A8
+_08141E9C: .4byte sRoamerLocation
+_08141EA0: .4byte sRoamerLocations
+_08141EA4: .4byte sLocationHistory
_08141EA8:
adds r0, r4, 0x1
lsls r0, 24
@@ -322,7 +322,7 @@ IsRoamerAt: @ 8141EB8
ldrb r0, [r0, 0x13]
cmp r0, 0
beq _08141EF0
- ldr r0, _08141EEC @ =gUnknown_203F3AE
+ ldr r0, _08141EEC @ =sRoamerLocation
ldrb r3, [r0]
cmp r2, r3
bne _08141EF0
@@ -334,7 +334,7 @@ IsRoamerAt: @ 8141EB8
.align 2, 0
_08141EE4: .4byte gSaveBlock1Ptr
_08141EE8: .4byte 0x000030d0
-_08141EEC: .4byte gUnknown_203F3AE
+_08141EEC: .4byte sRoamerLocation
_08141EF0:
movs r0, 0
_08141EF2:
@@ -491,18 +491,18 @@ _08142030: .4byte 0x000030d0
thumb_func_start GetRoamerLocation
GetRoamerLocation: @ 8142034
- ldr r3, _08142040 @ =gUnknown_203F3AE
+ ldr r3, _08142040 @ =sRoamerLocation
ldrb r2, [r3]
strb r2, [r0]
ldrb r0, [r3, 0x1]
strb r0, [r1]
bx lr
.align 2, 0
-_08142040: .4byte gUnknown_203F3AE
+_08142040: .4byte sRoamerLocation
thumb_func_end GetRoamerLocation
- thumb_func_start sub_8142044
-sub_8142044: @ 8142044
+ thumb_func_start GetRoamerLocationMapSectionId
+GetRoamerLocationMapSectionId: @ 8142044
push {lr}
ldr r0, _08142064 @ =gSaveBlock1Ptr
ldr r0, [r0]
@@ -511,7 +511,7 @@ sub_8142044: @ 8142044
ldrb r0, [r0, 0x13]
cmp r0, 0
beq _08142070
- ldr r1, _0814206C @ =gUnknown_203F3AE
+ ldr r1, _0814206C @ =sRoamerLocation
ldrb r0, [r1]
ldrb r1, [r1, 0x1]
bl get_mapheader_by_bank_and_number
@@ -520,12 +520,12 @@ sub_8142044: @ 8142044
.align 2, 0
_08142064: .4byte gSaveBlock1Ptr
_08142068: .4byte 0x000030d0
-_0814206C: .4byte gUnknown_203F3AE
+_0814206C: .4byte sRoamerLocation
_08142070:
movs r0, 0xC5
_08142072:
pop {r1}
bx r1
- thumb_func_end sub_8142044
+ thumb_func_end GetRoamerLocationMapSectionId
.align 2, 0 @ Don't pad with nop.
diff --git a/asm/wild_pokemon_area.s b/asm/wild_pokemon_area.s
index 26c908a14..71d8ac8dc 100644
--- a/asm/wild_pokemon_area.s
+++ b/asm/wild_pokemon_area.s
@@ -221,13 +221,13 @@ sub_813CB5C: @ 813CB5C
ldr r0, _0813CBBC @ =gUnknown_84642F4
lsls r4, 2
adds r4, r0
- bl sub_80CBDB0
+ bl ScrSpecial_GetStarter
ldrh r1, [r4, 0x2]
lsls r0, 16
lsrs r0, 16
cmp r1, r0
bne _0813CBC4
- bl sub_8142044
+ bl GetRoamerLocationMapSectionId
lsls r0, 16
lsrs r0, 16
movs r1, 0
diff --git a/data/data_83F5738.s b/data/data_83F5738.s
index e6f026d0e..c14edc5c8 100644
--- a/data/data_83F5738.s
+++ b/data/data_83F5738.s
@@ -55,7 +55,7 @@ gUnknown_83F5BCC:: @ 83F5BCC
gUnknown_83F5D1C:: @ 83F5D1C
.incbin "baserom.gba", 0x3F5D1C, 0x10
-gUnknown_83F5D2C:: @ 83F5D2C
+sStarterMon:: @ 83F5D2C
.incbin "baserom.gba", 0x3F5D2C, 0x6
gUnknown_83F5D32:: @ 83F5D32
diff --git a/data/roamer.s b/data/roamer.s
index a17d9d26b..92ef32ff3 100644
--- a/data/roamer.s
+++ b/data/roamer.s
@@ -1,5 +1,5 @@
.section .rodata
.align 2
-gUnknown_8466C58:: @ 8466C58
+sRoamerLocations:: @ 8466C58
.incbin "baserom.gba", 0x466C58, 0xB8
diff --git a/data/specials.inc b/data/specials.inc
index 56b666207..33cc5736b 100644
--- a/data/specials.inc
+++ b/data/specials.inc
@@ -306,7 +306,7 @@ gSpecials:: @ 815FD60
def_special ScrSpecial_AreLeadMonEVsMaxedOut
def_special sub_8069740
def_special sub_8069768
- def_special sub_8141D9C
+ def_special InitRoamer
def_special nullsub_75
def_special sub_80CA804
def_special nullsub_75
@@ -363,7 +363,7 @@ gSpecials:: @ 815FD60
def_special GetDaycarePokemonCount
def_special sub_80CB63C
def_special sub_80CBD80
- def_special sub_80CBDB0
+ def_special ScrSpecial_GetStarter
def_special sub_80CBDCC
def_special sub_810C444
def_special sub_80CC7B4
diff --git a/include/constants/vars.h b/include/constants/vars.h
index 886bae93c..2f817fb02 100644
--- a/include/constants/vars.h
+++ b/include/constants/vars.h
@@ -54,7 +54,7 @@
#define VAR_0x402F 0x402F
#define VAR_0x4030 0x4030
-#define VAR_0x4031 0x4031
+#define VAR_STARTER_MON 0x4031
#define VAR_0x4032 0x4032
#define VAR_ENIGMA_BERRY_AVAILABLE 0x4033
diff --git a/sym_ewram.txt b/sym_ewram.txt
index b18406af2..36b7c991c 100644
--- a/sym_ewram.txt
+++ b/sym_ewram.txt
@@ -1638,10 +1638,10 @@ gUnknown_203F3A0: @ 203F3A0
gUnknown_203F3A4: @ 203F3A4
.space 0x4
-gUnknown_203F3A8: @ 203F3A8
+sLocationHistory: @ 203F3A8
.space 0x6
-gUnknown_203F3AE: @ 203F3AE
+sRoamerLocation: @ 203F3AE
.space 0x2
gUnknown_203F3B0: @ 203F3B0