Merge pull request #4 from yenatch/document_some_asm

label expansion
This commit is contained in:
Bryan Bishop
2012-04-18 21:59:05 -07:00
2 changed files with 442 additions and 45 deletions

View File

@@ -3758,13 +3758,13 @@ SpecialDratini: ; 0x8b170
ld a, [$c2dd] ld a, [$c2dd]
cp $2 cp $2
ret nc ret nc
ld bc, TeamCount ld bc, PartyCount
ld a, [bc] ld a, [bc]
ld hl, 0 ld hl, 0
call GetNthTeamMon call GetNthPartyMon
ld a, [bc] ld a, [bc]
ld c, a ld c, a
ld de, TeamMon2 - TeamMon1 ld de, PartyMon2 - PartyMon1
.CheckForDratini .CheckForDratini
; start at the end of the party and search backwards for a Dratini ; start at the end of the party and search backwards for a Dratini
ld a, [hl] ld a, [hl]
@@ -3810,7 +3810,7 @@ SpecialDratini: ; 0x8b170
call GetFarByte call GetFarByte
; get the address of the move's PP and update the PP ; get the address of the move's PP and update the PP
ld hl, TeamMon1PP - TeamMon1Moves ld hl, PartyMon1PP - PartyMon1Moves
add hl, de add hl, de
ld [hl], a ld [hl], a
@@ -3837,7 +3837,7 @@ SpecialDratini: ; 0x8b170
db 0 db 0
GetNthTeamMon: ; 0x8b1ce GetNthPartyMon: ; 0x8b1ce
; inputs: ; inputs:
; hl must be set to 0 before calling this function. ; hl must be set to 0 before calling this function.
; a must be set to the number of Pokémon in the party. ; a must be set to the number of Pokémon in the party.
@@ -3846,13 +3846,13 @@ GetNthTeamMon: ; 0x8b1ce
; returns the address of the last Pokémon in the party in hl. ; returns the address of the last Pokémon in the party in hl.
; sets carry if a is 0. ; sets carry if a is 0.
ld de, TeamMon1 ld de, PartyMon1
add hl, de add hl, de
and a and a
jr z, .EmptyParty jr z, .EmptyParty
dec a dec a
ret z ret z
ld de, TeamMon2 - TeamMon1 ld de, PartyMon2 - PartyMon1
.loop .loop
add hl, de add hl, de
dec a dec a

473
wram.asm

File diff suppressed because it is too large Load Diff