summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home.asm34
-rwxr-xr-xhome/mon_data_2.asm35
2 files changed, 36 insertions, 33 deletions
diff --git a/home.asm b/home.asm
index 97b41248..20bdb067 100644
--- a/home.asm
+++ b/home.asm
@@ -265,39 +265,7 @@ INCLUDE "home/cry.asm"
INCLUDE "home/print_level.asm"
INCLUDE "home/mon_data.asm"
INCLUDE "home/print_bcd.asm"
-
-GetPartyParamLocation::
- push bc
- ld hl, wPartyMons
- ld c, a
- ld b, $0
- add hl, bc
- ld a, [wCurPartyMon]
- call GetPartyLocation
- pop bc
- ret
-
-GetPartyLocation:: ; 3b4a (0:3b4a)
- ld bc, $30
- jp AddNTimes
-
-Function3b51::
- push hl
- ld a, b
- dec a
- ld b, $0
- add hl, bc
- ld hl, BaseData + 0
- ld bc, $20
- call AddNTimes
- pop bc
- ld a, BANK(BaseData)
- call GetFarHalfword
- ld b, l
- ld c, h
- pop hl
- ret
-
+INCLUDE "home/mon_data_2.asm"
INCLUDE "home/battle.asm"
PushLYOverrides:: ; 3d0d
diff --git a/home/mon_data_2.asm b/home/mon_data_2.asm
new file mode 100755
index 00000000..5da498c8
--- /dev/null
+++ b/home/mon_data_2.asm
@@ -0,0 +1,35 @@
+GetPartyParamLocation::
+; Get the location of parameter a from wCurPartyMon in hl
+ push bc
+ ld hl, wPartyMons
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [wCurPartyMon]
+ call GetPartyLocation
+ pop bc
+ ret
+
+GetPartyLocation::
+; Add the length of a PartyMon struct to hl a times.
+ ld bc, PARTYMON_STRUCT_LENGTH
+ jp AddNTimes
+
+Unreferenced_GetDexNumber::
+; Probably used in gen 1 to convert index number to dex number
+; Not required in gen 2 because index number == dex number
+ push hl
+ ld a, b
+ dec a
+ ld b, 0
+ add hl, bc
+ ld hl, BaseData + BASE_DEX_NO
+ ld bc, BASE_DATA_SIZE
+ call AddNTimes
+ pop bc
+ ld a, BANK(BaseData)
+ call GetFarHalfword
+ ld b, l
+ ld c, h
+ pop hl
+ ret \ No newline at end of file