diff options
author | yenatch <yenatch@gmail.com> | 2018-04-09 21:30:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-09 21:30:24 -0400 |
commit | 40b537d45b4b8937038126f7e5d2d21ccee460c0 (patch) | |
tree | 881a090b80b2c22985fc6d1231b03c6721a83462 /home/mon_data_2.asm | |
parent | e4b41fad4fd3787ca2e61adb5377ba8f68fca7ef (diff) | |
parent | 53ff57ca663dc5bf9c3731022b0eb0dc73f2207f (diff) |
Merge pull request #503 from Rangi42/master
Factor wMisc into meaningful parts; move most code out of home.asm
Diffstat (limited to 'home/mon_data_2.asm')
-rw-r--r-- | home/mon_data_2.asm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/home/mon_data_2.asm b/home/mon_data_2.asm new file mode 100644 index 000000000..a5e46d836 --- /dev/null +++ b/home/mon_data_2.asm @@ -0,0 +1,37 @@ +GetPartyParamLocation:: ; 3917 +; 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 +; 3927 + +GetPartyLocation:: ; 3927 +; Add the length of a PartyMon struct to hl a times. + ld bc, PARTYMON_STRUCT_LENGTH + jp AddNTimes +; 392d + +Unreferenced_GetDexNumber:: ; 392d +; 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 + ld a, BANK(BaseData) + call GetFarHalfword + ld b, l + ld c, h + pop hl + ret +; 3945 |