fixed hp bar wram label and misc

This commit is contained in:
YamaArashi 2015-02-07 22:18:42 -08:00
parent 32f7cf12de
commit 72bbaed99f
21 changed files with 169 additions and 161 deletions

View file

@ -77,7 +77,7 @@ DrainHPEffect_: ; 783f (1:783f)
hlCoord 2, 2
xor a
.next2
ld [wListMenuID], a
ld [wHPBarType], a
predef UpdateHPBar2
predef DrawPlayerHUDAndHPBar
predef DrawEnemyHUDAndHPBar

View file

@ -18,27 +18,28 @@ IsPlayerJustOutsideMap: ; 128d8 (4:68d8)
DrawHP: ; 128ef (4:68ef)
call GetPredefRegisters
ld a, $1
jr asm_128fb
jr DrawHP_
Func_128f6: ; 128f6 (4:68f6)
DrawHP2: ; 128f6 (4:68f6)
call GetPredefRegisters
ld a, $2
asm_128fb: ; 128fb (4:68fb)
ld [wListMenuID], a
DrawHP_: ; 128fb (4:68fb)
ld [wHPBarType], a
push hl
ld a, [wLoadedMonHP]
ld b, a
ld a, [wLoadedMonHP + 1]
ld c, a
or b
jr nz, .asm_12913
jr nz, .nonzeroHP
xor a
ld c, a
ld e, a
ld a, $6
ld d, a
jp DrawHPBarAndFraction
.asm_12913
jp .drawHPBarAndPrintFraction
.nonzeroHP
ld a, [wLoadedMonMaxHP]
ld d, a
ld a, [wLoadedMonMaxHP + 1]
@ -47,8 +48,7 @@ asm_128fb: ; 128fb (4:68fb)
ld a, $6
ld d, a
ld c, a
DrawHPBarAndFraction: ; 12924 (4:6924)
.drawHPBarAndPrintFraction
pop hl
push de
push hl
@ -59,10 +59,10 @@ DrawHPBarAndFraction: ; 12924 (4:6924)
bit 0, a
jr z, .printFractionBelowBar
ld bc, $9 ; right of bar
jr .printHPFraction
jr .printFraction
.printFractionBelowBar
ld bc, SCREEN_WIDTH + 1 ; below bar
.printHPFraction
.printFraction
add hl, bc
ld de, wLoadedMonHP
ld bc, $203

View file

@ -207,16 +207,16 @@ WildMonEncounterSlotChances: ; 13918 (4:7918)
db $FF, $12 ; 3/256 = 1.2% chance of slot 9
RecoilEffect_: ; 1392c (4:792c)
ld a, [H_WHOSETURN] ; $fff3
ld a, [H_WHOSETURN]
and a
ld a, [W_PLAYERMOVENUM] ; wcfd2
ld hl, wBattleMonMaxHP ; wd023
ld a, [W_PLAYERMOVENUM]
ld hl, wBattleMonMaxHP
jr z, .asm_1393d
ld a, [W_ENEMYMOVENUM] ; W_ENEMYMOVENUM
ld hl, wEnemyMonMaxHP ; wEnemyMonMaxHP
ld a, [W_ENEMYMOVENUM]
ld hl, wEnemyMonMaxHP
.asm_1393d
ld d, a
ld a, [W_DAMAGE] ; W_DAMAGE
ld a, [W_DAMAGE]
ld b, a
ld a, [W_DAMAGE + 1]
ld c, a
@ -260,16 +260,16 @@ RecoilEffect_: ; 1392c (4:792c)
ld [hl], a
.asm_13982
hlCoord 10, 9
ld a, [H_WHOSETURN] ; $fff3
ld a, [H_WHOSETURN]
and a
ld a, $1
jr z, .asm_13990
hlCoord 2, 2
xor a
.asm_13990
ld [wListMenuID], a ; wListMenuID
ld [wHPBarType], a
predef UpdateHPBar2
ld hl, HitWithRecoilText ; $799e
ld hl, HitWithRecoilText
jp PrintText
HitWithRecoilText: ; 1399e (4:799e)
TX_FAR _HitWithRecoilText
@ -392,8 +392,8 @@ GetTrainerName_: ; 13a58 (4:7a58)
ld a, [wLinkState]
and a
jr nz, .rival
ld hl, W_RIVALNAME ; wd34a
ld a, [W_TRAINERCLASS] ; wd031
ld hl, W_RIVALNAME
ld a, [W_TRAINERCLASS]
cp SONY1
jr z, .rival
cp SONY2

View file

@ -768,7 +768,7 @@ UpdateCurMonHPBar: ; 3c4f6 (f:44f6)
xor a
.playersTurn
push bc
ld [wListMenuID], a
ld [wHPBarType], a
predef UpdateHPBar2
pop bc
ret
@ -2029,7 +2029,7 @@ DrawEnemyHUDAndHPBar: ; 3cdec (f:4dec)
ld c, a
.drawHPBar
xor a
ld [wListMenuID], a
ld [wHPBarType], a
hlCoord 2, 2
call DrawHPBar
ld a, $1
@ -4899,7 +4899,7 @@ ApplyDamageToEnemyPokemon: ; 3e142 (f:6142)
ld [wHPBarNewHP],a
hlCoord 2, 2
xor a
ld [wListMenuID],a
ld [wHPBarType],a
predef UpdateHPBar2 ; animate the HP bar shortening
ApplyAttackToEnemyPokemonDone: ; 3e19d (f:619d)
jp DrawHUDsAndHPBars
@ -5017,7 +5017,7 @@ ApplyDamageToPlayerPokemon: ; 3e200 (f:6200)
ld [wHPBarMaxHP],a
hlCoord 10, 9
ld a,$01
ld [wListMenuID],a
ld [wHPBarType],a
predef UpdateHPBar2 ; animate the HP bar shortening
ApplyAttackToPlayerPokemonDone
jp DrawHUDsAndHPBars

View file

@ -1174,7 +1174,7 @@ Func_3a718: ; 3a718 (e:6718)
call AIPrintItemUse_
hlCoord 2, 2
xor a
ld [wListMenuID],a
ld [wHPBarType],a
predef UpdateHPBar2
jp DecrementAICount

View file

@ -91,7 +91,7 @@ HealEffect_: ; 3b9ec (e:79ec)
hlCoord 2, 2
xor a
.asm_3ba83
ld [wListMenuID], a
ld [wHPBarType], a
predef UpdateHPBar2
ld hl, DrawHUDsAndHPBars
call BankswitchEtoF