More PartyMon labels for relative addressing.

This commit is contained in:
yenatch 2014-06-23 12:45:30 -07:00
parent 6fee80528a
commit 32a5f21cc7
8 changed files with 49 additions and 47 deletions

View File

@ -1523,13 +1523,13 @@ AIScoring_HealBell: ; 38d1f
ld b, a
ld c, 0
ld hl, OTPartyMon1HP
ld de, $0030
ld de, OTPartyMon2 - OTPartyMon1
.asm_38d2c
.loop
push hl
ld a, [hli]
or [hl]
jr z, .asm_38d37
jr z, .next
dec hl
dec hl
@ -1538,34 +1538,31 @@ AIScoring_HealBell: ; 38d1f
or c
ld c, a
.asm_38d37
.next
pop hl
add hl, de
dec b
jr nz, .asm_38d2c
jr nz, .loop
pop hl
ld a, c
and a
jr z, .asm_38d52
jr z, .no_status
ld a, [EnemyMonStatus]
and a
jr z, .asm_38d48
jr z, .ok
dec [hl]
.asm_38d48
and $27
.ok
and 1 << FRZ | SLP
ret z
call Function39527
ret c
dec [hl]
dec [hl]
ret
.asm_38d52
.no_status
ld a, [EnemyMonStatus]
and a
ret nz

View File

@ -2395,7 +2395,7 @@ Function3cf35: ; 3cf35
Function3cf4a: ; 3cf4a
ld hl, EnemyHPPal
ld e, $30
ld e, HP_BAR_LENGTH_PX
call Function3e12e
call WaitBGMap
callba Function2c012

View File

@ -5092,7 +5092,7 @@ BattleCommand4a: ; 35c0f
ld a, [AttackMissed]
and a
jp nz, .asm_35c91
ld bc, $0030
ld bc, PartyMon2 - PartyMon1 ; ????
ld hl, EnemyMonMoves
ld a, [hBattleTurn]
and a
@ -5106,7 +5106,7 @@ BattleCommand4a: ; 35c0f
cp STRUGGLE
jr z, .asm_35c91
ld b, a
ld c, $ff
ld c, -1
.asm_35c33
inc c
ld a, [hli]
@ -5114,9 +5114,9 @@ BattleCommand4a: ; 35c0f
jr nz, .asm_35c33
ld [$d265], a
dec hl
ld b, $0
ld b, 0
push bc
ld c, $6
ld c, BattleMonPP - BattleMonMoves
add hl, bc
pop bc
ld a, [hl]
@ -7380,7 +7380,7 @@ Function36994: ; 36994
ld a, [PartyCount]
ld d, a
ld e, 0
ld bc, $30
ld bc, PartyMon2 - PartyMon1
.asm_3699d
ld a, [CurBattleMon]
cp e

View File

@ -70,9 +70,11 @@ Function1f8000: ; 1f8000
Function1f8081: ; 1f8081
ld c, $3
.loop
push bc
ld a, $1
call GetSRAMBank
.asm_1f8089
ld a, [$d800]
dec a
@ -150,14 +152,15 @@ Function1f8081: ; 1f8081
ld h, d
ld l, e
pop de
ld bc, $000b
ld bc, PKMN_NAME_LENGTH
call CopyBytes
pop de
pop af
ld [$d265], a
pop bc
dec c
jp nz, $4083
jp nz, .loop
ld a, [$be51]
ld [$be54], a
ld a, [$be52]

View File

@ -1696,20 +1696,21 @@ Function3786:: ; 3786
Function378b:: ; 378b
ld a, [CurPartySpecies]
call IsAPokemon
jr c, .asm_37ad
jr c, .not_pokemon
push hl
ld de, VTiles2
predef GetFrontpic
pop hl
xor a
ld [$ffad], a
ld bc, $0707
lb bc, 7, 7
predef FillBox
xor a
ld [$c2c6], a
ret
.asm_37ad
.not_pokemon
xor a
ld [$c2c6], a
inc a

View File

@ -2356,10 +2356,10 @@ XSpecial: ; f4c5
; f504
Tablef504: ; f504
db X_ATTACK, 0
db X_DEFEND, 1
db X_SPEED, 2
db X_SPECIAL, 3
db X_ATTACK, ATTACK
db X_DEFEND, DEFENSE
db X_SPEED, SPEED
db X_SPECIAL, SP_ATTACK
; f50c
@ -2367,21 +2367,23 @@ PokeFlute: ; f50c
ld a, [IsInBattle]
and a
jr nz, .asm_f512
.asm_f512
xor a
ld [$d002], a
ld b, $f8
ld b, $ff ^ SLP
ld hl, PartyMon1Status
call .asm_f554
call .Functionf554
ld a, [IsInBattle]
cp $1
cp WILD_BATTLE
jr z, .asm_f52b
ld hl, OTPartyMon1Status
call .asm_f554
call .Functionf554
.asm_f52b
ld hl, BattleMonStatus
ld a, [hl]
and b
@ -2390,6 +2392,7 @@ PokeFlute: ; f50c
ld a, [hl]
and b
ld [hl], a
ld a, [$d002]
and a
ld hl, UnknownText_0xf56c
@ -2400,31 +2403,29 @@ PokeFlute: ; f50c
ld a, [Danger]
and $80
jr nz, .asm_f54e
.asm_f54e
ld hl, UnknownText_0xf571
jp PrintText
.asm_f554
ld de, $0030
ld c, $6
.Functionf554
ld de, PartyMon2 - PartyMon1
ld c, PARTY_LENGTH
.asm_f559
.loop
ld a, [hl]
push af
and $7
and SLP
jr z, .asm_f564
ld a, $1
ld a, 1
ld [$d002], a
.asm_f564
pop af
and b
ld [hl], a
add hl, de
dec c
jr nz, .asm_f559
jr nz, .loop
ret
; f56c

View File

@ -54741,9 +54741,9 @@ Function4d15b:: ; 4d15b
.asm_4d170
ld de, TileMap
ld b, $12
ld b, SCREEN_HEIGHT
.asm_4d175
ld c, $14
ld c, SCREEN_WIDTH
.asm_4d177
ld a, [hli]
ld [de], a
@ -93036,7 +93036,7 @@ Functione16c7: ; e16c7
; e16e2
Functione16e2: ; e16e2
ld bc, $0404
lb bc, 4, 4
.asm_e16e5
push bc
.asm_e16e6

View File

@ -611,7 +611,7 @@ Function91e4: ; 91e4
.asm_91f5
ld hl, PartyMon1DVs
ld bc, $0030
ld bc, PartyMon2 - PartyMon1
ld a, [CurPartyMon]
call AddNTimes
ld c, l