named town map stuff

This commit is contained in:
YamaArashi 2015-07-13 19:24:07 -07:00
parent 0066e09828
commit 5d3b958763
4 changed files with 159 additions and 140 deletions

View file

@ -109,6 +109,8 @@ NAME_PLAYER_SCREEN EQU 0
NAME_RIVAL_SCREEN EQU 1 NAME_RIVAL_SCREEN EQU 1
NAME_MON_SCREEN EQU 2 NAME_MON_SCREEN EQU 2
NUM_TOWN_MAP_LOCATIONS EQU $2F
; serial ; serial
ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01

View file

@ -315,7 +315,7 @@ WriteMonPartySpriteOAMByPartyIndex: ; 71868 (1c:5868)
add hl, de add hl, de
ld a, [hl] ld a, [hl]
call GetPartyMonSpriteID call GetPartyMonSpriteID
ld [wcd5b], a ld [wOAMBaseTile], a
call WriteMonPartySpriteOAM call WriteMonPartySpriteOAM
pop bc pop bc
pop de pop de
@ -329,7 +329,7 @@ WriteMonPartySpriteOAMBySpecies: ; 71882 (1c:5882)
ld [hPartyMonIndex], a ld [hPartyMonIndex], a
ld a, [wMonPartySpriteSpecies] ld a, [wMonPartySpriteSpecies]
call GetPartyMonSpriteID call GetPartyMonSpriteID
ld [wcd5b], a ld [wOAMBaseTile], a
jr WriteMonPartySpriteOAM jr WriteMonPartySpriteOAM
UnusedPartyMonSpriteFunction: ; 71890 (1c:5890) UnusedPartyMonSpriteFunction: ; 71890 (1c:5890)

View file

@ -10,7 +10,7 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
ld a, [W_CURMAP] ld a, [W_CURMAP]
push af push af
ld b, $0 ld b, $0
call Func_711c4 call DrawPlayerOrBirdSprite ; player sprite
hlCoord 1, 0 hlCoord 1, 0
ld de, wcd6d ld de, wcd6d
call PlaceString call PlaceString
@ -23,39 +23,37 @@ DisplayTownMap: ; 70e3e (1c:4e3e)
ld bc, (BANK(TownMapCursor) << 8) + $04 ld bc, (BANK(TownMapCursor) << 8) + $04
call CopyVideoDataDouble call CopyVideoDataDouble
xor a xor a
ld [wWhichTrade], a ld [wWhichTownMapLocation], a
pop af pop af
jr Func_70e92 jr .next
.changeSelectedLocation
Func_70e7e: ; 70e7e (1c:4e7e)
ld hl, wTileMap ld hl, wTileMap
ld bc, $114 ld bc, $114
call ClearScreenArea call ClearScreenArea
ld hl, TownMapOrder ld hl, TownMapOrder
ld a, [wWhichTrade] ld a, [wWhichTownMapLocation]
ld c, a ld c, a
ld b, $0 ld b, 0
add hl, bc add hl, bc
ld a, [hl] ld a, [hl]
.next
Func_70e92: ; 70e92 (1c:4e92) ld de, wTownMapCoords
ld de, wHPBarMaxHP call LoadTownMapEntry
call Func_712f1
ld a, [de] ld a, [de]
push hl push hl
call Func_71258 call TownMapCoordsToOAMCoords
ld a, $4 ld a, $4
ld [wcd5b], a ld [wOAMBaseTile], a
ld hl, wOAMBuffer + $10 ld hl, wOAMBuffer + $10
call Func_71279 call WriteTownMapSpriteOAM ; town map cursor sprite
pop hl pop hl
ld de, wcd6d ld de, wcd6d
.asm_70eac .copyMapName
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
inc de inc de
cp $50 cp $50
jr nz, .asm_70eac jr nz, .copyMapName
hlCoord 1, 0 hlCoord 1, 0
ld de, wcd6d ld de, wcd6d
call PlaceString call PlaceString
@ -63,46 +61,46 @@ Func_70e92: ; 70e92 (1c:4e92)
ld de, wTileMapBackup + 16 ld de, wTileMapBackup + 16
ld bc, $10 ld bc, $10
call CopyData call CopyData
.asm_70ec8 .inputLoop
call TownMapSpriteBlinkingAnimation call TownMapSpriteBlinkingAnimation
call JoypadLowSensitivity call JoypadLowSensitivity
ld a, [hJoy5] ld a, [hJoy5]
ld b, a ld b, a
and $c3 and D_UP | D_DOWN | A_BUTTON | B_BUTTON
jr z, .asm_70ec8 jr z, .inputLoop
ld a, (SFX_02_3c - SFX_Headers_02) / 3 ld a, (SFX_02_3c - SFX_Headers_02) / 3
call PlaySound call PlaySound
bit 6, b bit 6, b
jr nz, .asm_70ef2 jr nz, .pressedUp
bit 7, b bit 7, b
jr nz, .asm_70f01 jr nz, .pressedDown
xor a xor a
ld [wTownMapSpriteBlinkingEnabled], a ld [wTownMapSpriteBlinkingEnabled], a
ld [hJoy7], a ld [hJoy7], a
ld [wAnimCounter], a ld [wAnimCounter], a
call Func_711ab call TownMapCleanUp
pop hl pop hl
pop af pop af
ld [hl], a ld [hl], a
ret ret
.asm_70ef2 .pressedUp
ld a, [wWhichTrade] ld a, [wWhichTownMapLocation]
inc a inc a
cp $2f cp NUM_TOWN_MAP_LOCATIONS
jr nz, .asm_70efb jr nz, .skipWrapping1
xor a xor a ; wrap to 0
.asm_70efb .skipWrapping1
ld [wWhichTrade], a ld [wWhichTownMapLocation], a
jp Func_70e7e jp .changeSelectedLocation
.asm_70f01 .pressedDown
ld a, [wWhichTrade] ld a, [wWhichTownMapLocation]
dec a dec a
cp $ff cp -1
jr nz, .asm_70f0b jr nz, .skipWrapping2
ld a, $2e ld a, NUM_TOWN_MAP_LOCATIONS - 1 ; wrap to last location
.asm_70f0b .skipWrapping2
ld [wWhichTrade], a ld [wWhichTownMapLocation], a
jp Func_70e7e jp .changeSelectedLocation
INCLUDE "data/town_map_order.asm" INCLUDE "data/town_map_order.asm"
@ -125,7 +123,7 @@ LoadTownMap_Nest: ; 70f60 (1c:4f60)
ld de, MonsNestText ld de, MonsNestText
call PlaceString call PlaceString
call WaitForTextScrollButtonPress call WaitForTextScrollButtonPress
call Func_711ab call TownMapCleanUp
pop hl pop hl
pop af pop af
ld [hl], a ld [hl], a
@ -147,7 +145,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
ld hl, vChars1 + $6d0 ld hl, vChars1 + $6d0
ld bc, (BANK(TownMapUpArrow) << 8) + $01 ld bc, (BANK(TownMapUpArrow) << 8) + $01
call CopyVideoDataDouble call CopyVideoDataDouble
call Func_71070 call BuildFlyLocationsList
ld hl, wUpdateSpritesEnabled ld hl, wUpdateSpritesEnabled
ld a, [hl] ld a, [hl]
push af push af
@ -158,10 +156,9 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
call PlaceString call PlaceString
ld a, [W_CURMAP] ld a, [W_CURMAP]
ld b, $0 ld b, $0
call Func_711c4 call DrawPlayerOrBirdSprite
ld hl, wTrainerEngageDistance ld hl, wFlyLocationsList
deCoord 18, 0 deCoord 18, 0
.townMapFlyLoop .townMapFlyLoop
ld a, $7f ld a, $7f
ld [de], a ld [de], a
@ -173,7 +170,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
pop hl pop hl
ld a, [hl] ld a, [hl]
ld b, $4 ld b, $4
call Func_711c4 call DrawPlayerOrBirdSprite ; draw bird sprite
hlCoord 3, 0 hlCoord 3, 0
ld de, wcd6d ld de, wcd6d
call PlaceString call PlaceString
@ -184,25 +181,25 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
hlCoord 19, 0 hlCoord 19, 0
ld [hl], $ee ld [hl], $ee
pop hl pop hl
.asm_71004 .inputLoop
push hl push hl
call DelayFrame call DelayFrame
call JoypadLowSensitivity call JoypadLowSensitivity
ld a, [hJoy5] ld a, [hJoy5]
ld b, a ld b, a
pop hl pop hl
and $c3 and D_UP | D_DOWN | A_BUTTON | B_BUTTON
jr z, .asm_71004 jr z, .inputLoop
bit 0, b bit 0, b
jr nz, .asm_71026 jr nz, .pressedA
ld a, (SFX_02_3c - SFX_Headers_02) / 3 ld a, (SFX_02_3c - SFX_Headers_02) / 3
call PlaySound call PlaySound
bit 6, b bit 6, b
jr nz, .asm_71042 jr nz, .pressedUp
bit 7, b bit 7, b
jr nz, .asm_71058 jr nz, .pressedDown
jr .asm_71037 jr .pressedB
.asm_71026 .pressedA
ld a, (SFX_02_3e - SFX_Headers_02) / 3 ld a, (SFX_02_3e - SFX_Headers_02) / 3
call PlaySound call PlaySound
ld a, [hl] ld a, [hl]
@ -211,7 +208,7 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
set 3, [hl] set 3, [hl]
inc hl inc hl
set 7, [hl] set 7, [hl]
.asm_71037 .pressedB
xor a xor a
ld [wTownMapSpriteBlinkingEnabled], a ld [wTownMapSpriteBlinkingEnabled], a
call GBPalWhiteOutWithDelay3 call GBPalWhiteOutWithDelay3
@ -219,55 +216,55 @@ LoadTownMap_Fly: ; 70f90 (1c:4f90)
pop af pop af
ld [hl], a ld [hl], a
ret ret
.asm_71042 .pressedUp
deCoord 18, 0 deCoord 18, 0
inc hl inc hl
ld a, [hl] ld a, [hl]
cp $ff cp $ff
jr z, .asm_71052 jr z, .wrapToStartOfList
cp $fe cp $fe
jr z, .asm_71042 jr z, .pressedUp ; skip past unvisited towns
jp .townMapFlyLoop jp .townMapFlyLoop
.asm_71052 .wrapToStartOfList
ld hl, wTrainerEngageDistance ld hl, wFlyLocationsList
jp .townMapFlyLoop jp .townMapFlyLoop
.asm_71058 .pressedDown
deCoord 19, 0 deCoord 19, 0
dec hl dec hl
ld a, [hl] ld a, [hl]
cp $ff cp $ff
jr z, .asm_71068 jr z, .wrapToEndOfList
cp $fe cp $fe
jr z, .asm_71058 jr z, .pressedDown ; skip past unvisited towns
jp .townMapFlyLoop jp .townMapFlyLoop
.asm_71068 .wrapToEndOfList
ld hl, wcd49 ld hl, wFlyLocationsList + 11
jr .asm_71058 jr .pressedDown
ToText: ; 7106d (1c:506d) ToText: ; 7106d (1c:506d)
db "To@" db "To@"
Func_71070: ; 71070 (1c:5070) BuildFlyLocationsList: ; 71070 (1c:5070)
ld hl, wWhichTrade ld hl, wFlyLocationsList - 1
ld [hl], $ff ld [hl], $ff
inc hl inc hl
ld a, [W_TOWNVISITEDFLAG] ld a, [W_TOWNVISITEDFLAG]
ld e, a ld e, a
ld a, [W_TOWNVISITEDFLAG + 1] ld a, [W_TOWNVISITEDFLAG + 1]
ld d, a ld d, a
ld bc, $b ld bc, 11 ; number of towns
.asm_71081 .loop
srl d srl d
rr e rr e
ld a, $fe ld a, $fe ; store $fe if the town hasn't been visited
jr nc, .asm_7108a jr nc, .next
ld a, b ld a, b ; store the map number of the town if it has been visited
.asm_7108a .next
ld [hl], a ld [hl], a
inc hl inc hl
inc b inc b
dec c dec c
jr nz, .asm_71081 jr nz, .loop
ld [hl], $ff ld [hl], $ff
ret ret
@ -295,10 +292,10 @@ LoadTownMap: ; 7109b (1c:509b)
call FarCopyDataDouble call FarCopyDataDouble
ld hl, wTileMap ld hl, wTileMap
ld de, CompressedMap ld de, CompressedMap
.asm_710d3 .loop
ld a, [de] ld a, [de]
and a and a
jr z, .asm_710e9 jr z, .done
ld b, a ld b, a
and $f and $f
ld c, a ld c, a
@ -306,13 +303,13 @@ LoadTownMap: ; 7109b (1c:509b)
swap a swap a
and $f and $f
add $60 add $60
.asm_710e2 .writeRunLoop ; write one run of the RLE data
ld [hli], a ld [hli], a
dec c dec c
jr nz, .asm_710e2 jr nz, .writeRunLoop
inc de inc de
jr .asm_710d3 jr .loop
.asm_710e9 .done
call EnableLCD call EnableLCD
ld b, $2 ld b, $2
call GoPAL_SET call GoPAL_SET
@ -328,7 +325,8 @@ CompressedMap: ; 71100 (1c:5100)
; you can decompress this file with the redrle program in the extras/ dir ; you can decompress this file with the redrle program in the extras/ dir
INCBIN "gfx/town_map.rle" INCBIN "gfx/town_map.rle"
Func_711ab: ; 711ab (1c:51ab) TownMapCleanUp: ; 711ab (1c:51ab)
; clear town map graphics data and load usual graphics data
xor a xor a
ld [wTownMapSpriteBlinkingEnabled], a ld [wTownMapSpriteBlinkingEnabled], a
call GBPalWhiteOut call GBPalWhiteOut
@ -339,17 +337,19 @@ Func_711ab: ; 711ab (1c:51ab)
call UpdateSprites call UpdateSprites
jp GoPAL_SET_CF1C jp GoPAL_SET_CF1C
Func_711c4: ; 711c4 (1c:51c4) DrawPlayerOrBirdSprite: ; 711c4 (1c:51c4)
; a = map number
; b = OAM base tile
push af push af
ld a, b ld a, b
ld [wcd5b], a ld [wOAMBaseTile], a
pop af pop af
ld de, wHPBarMaxHP ld de, wTownMapCoords
call Func_712f1 call LoadTownMapEntry
ld a, [de] ld a, [de]
push hl push hl
call Func_71258 call TownMapCoordsToOAMCoords
call Func_7126d call WritePlayerOrBirdSpriteOAM
pop hl pop hl
ld de, wcd6d ld de, wcd6d
.asm_711dc .asm_711dc
@ -365,33 +365,34 @@ Func_711c4: ; 711c4 (1c:51c4)
Func_711ef: ; 711ef (1c:51ef) Func_711ef: ; 711ef (1c:51ef)
callba FindWildLocationsOfMon callba FindWildLocationsOfMon
call Func_712d9 call ZeroOutDuplicatesInList
ld hl, wOAMBuffer ld hl, wOAMBuffer
ld de, wBuffer ld de, wTownMapCoords
.asm_71200 .loop
ld a, [de] ld a, [de]
cp $ff cp $ff
jr z, .asm_7121d jr z, .loopDone
and a and a
jr z, .asm_7121a jr z, .nextEntry
push hl push hl
call Func_712f1 call LoadTownMapEntry
pop hl pop hl
ld a, [de] ld a, [de]
cp $19 cp $19 ; Cerulean Cave's coordinates
jr z, .asm_7121a jr z, .nextEntry ; skip Cerulean Cave
call Func_71258 call TownMapCoordsToOAMCoords
ld a, $4 ld a, $4
ld [hli], a ld [hli], a
xor a xor a
ld [hli], a ld [hli], a
.asm_7121a .nextEntry
inc de inc de
jr .asm_71200 jr .loop
.asm_7121d .loopDone
ld a, l ld a, l
and a and a ; were any OAM entries written?
jr nz, .asm_71236 jr nz, .drawPlayerSprite
; if no OAM entries were written, print area unknown text
hlCoord 1, 7 hlCoord 1, 7
ld b, $2 ld b, $2
ld c, $f ld c, $f
@ -399,12 +400,12 @@ Func_711ef: ; 711ef (1c:51ef)
hlCoord 2, 9 hlCoord 2, 9
ld de, AreaUnknownText ld de, AreaUnknownText
call PlaceString call PlaceString
jr .asm_7123e jr .done
.asm_71236 .drawPlayerSprite
ld a, [W_CURMAP] ld a, [W_CURMAP]
ld b, $0 ld b, $0
call Func_711c4 call DrawPlayerOrBirdSprite
.asm_7123e .done
ld hl, wOAMBuffer ld hl, wOAMBuffer
ld de, wTileMapBackup ld de, wTileMapBackup
ld bc, $a0 ld bc, $a0
@ -413,39 +414,41 @@ Func_711ef: ; 711ef (1c:51ef)
AreaUnknownText: ; 7124a (1c:524a) AreaUnknownText: ; 7124a (1c:524a)
db " AREA UNKNOWN@" db " AREA UNKNOWN@"
Func_71258: ; 71258 (1c:5258) TownMapCoordsToOAMCoords: ; 71258 (1c:5258)
; in: lower nybble of a = x, upper nybble of a = y
; out: b and [hl] = (y * 8) + 24, c and [hl+1] = (x * 8) + 24
push af push af
and $f0 and $f0
srl a srl a
add $18 add 24
ld b, a ld b, a
ld [hli], a ld [hli], a
pop af pop af
and $f and $f
swap a swap a
srl a srl a
add $18 add 24
ld c, a ld c, a
ld [hli], a ld [hli], a
ret ret
Func_7126d: ; 7126d (1c:526d) WritePlayerOrBirdSpriteOAM: ; 7126d (1c:526d)
ld a, [wcd5b] ld a, [wOAMBaseTile]
and a and a
ld hl, wOAMBuffer + $90 ld hl, wOAMBuffer + $90 ; for player sprite
jr z, Func_71279 jr z, WriteTownMapSpriteOAM
ld hl, wOAMBuffer + $80 ld hl, wOAMBuffer + $80 ; for bird sprite
Func_71279: ; 71279 (1c:5279) WriteTownMapSpriteOAM: ; 71279 (1c:5279)
push hl push hl
ld hl, $fcfc ld hl, $fcfc
add hl, bc add hl, bc ; subtract 4 from c (X coord) and 3 from b (Y coord)
ld b, h ld b, h
ld c, l ld c, l
pop hl pop hl
WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281) WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281)
; Writes 4 OAM blocks for a helix mon party sprite, since is does not have ; Writes 4 OAM blocks for a helix mon party sprite, since it does not have
; a vertical line of symmetry. ; a vertical line of symmetry.
ld de, $202 ld de, $202
.loop .loop
@ -456,10 +459,10 @@ WriteAsymmetricMonPartySpriteOAM: ; 71281 (1c:5281)
ld [hli], a ld [hli], a
ld a, c ld a, c
ld [hli], a ld [hli], a
ld a, [wcd5b] ld a, [wOAMBaseTile]
ld [hli], a ld [hli], a
inc a inc a
ld [wcd5b], a ld [wOAMBaseTile], a
xor a xor a
ld [hli], a ld [hli], a
inc d inc d
@ -493,7 +496,7 @@ WriteSymmetricMonPartySpriteOAM: ; 712a6 (1c:52a6)
ld [hli], a ld [hli], a
ld a, c ld a, c
ld [hli], a ld [hli], a
ld a, [wcd5b] ld a, [wOAMBaseTile]
ld [hli], a ld [hli], a
ld a, [wcd5c] ld a, [wcd5c]
ld [hli], a ld [hli], a
@ -508,7 +511,7 @@ WriteSymmetricMonPartySpriteOAM: ; 712a6 (1c:52a6)
pop bc pop bc
pop de pop de
push hl push hl
ld hl, wcd5b ld hl, wOAMBaseTile
inc [hl] inc [hl]
inc [hl] inc [hl]
pop hl pop hl
@ -519,9 +522,10 @@ WriteSymmetricMonPartySpriteOAM: ; 712a6 (1c:52a6)
jr nz, .loop jr nz, .loop
ret ret
Func_712d9: ; 712d9 (1c:52d9) ZeroOutDuplicatesInList: ; 712d9 (1c:52d9)
ld de, wHPBarMaxHP ; replace duplicate bytes in the list of wild pokemon locations with 0
.asm_712dc ld de, wBuffer
.loop
ld a, [de] ld a, [de]
inc de inc de
cp $ff cp $ff
@ -529,39 +533,41 @@ Func_712d9: ; 712d9 (1c:52d9)
ld c, a ld c, a
ld l, e ld l, e
ld h, d ld h, d
.asm_712e4 .zeroDuplicatesLoop
ld a, [hl] ld a, [hl]
cp $ff cp $ff
jr z, .asm_712dc jr z, .loop
cp c cp c
jr nz, .asm_712ee jr nz, .skipZeroing
xor a xor a
ld [hl], a ld [hl], a
.asm_712ee .skipZeroing
inc hl inc hl
jr .asm_712e4 jr .zeroDuplicatesLoop
Func_712f1: ; 712f1 (1c:52f1) LoadTownMapEntry: ; 712f1 (1c:52f1)
; in: a = map number
; out: lower nybble of [de] = x, upper nybble of [de] = y, hl = address of name
cp REDS_HOUSE_1F cp REDS_HOUSE_1F
jr c, .asm_71304 jr c, .external
ld bc, $4 ld bc, 4
ld hl, InternalMapEntries ld hl, InternalMapEntries
.asm_712fb .loop
cp [hl] cp [hl]
jr c, .asm_71301 jr c, .foundEntry
add hl, bc add hl, bc
jr .asm_712fb jr .loop
.asm_71301 .foundEntry
inc hl inc hl
jr .asm_7130d jr .readEntry
.asm_71304 .external
ld hl, ExternalMapEntries ld hl, ExternalMapEntries
ld c, a ld c, a
ld b, $0 ld b, 0
add hl, bc add hl, bc
add hl, bc add hl, bc
add hl, bc add hl, bc
.asm_7130d .readEntry
ld a, [hli] ld a, [hli]
ld [de], a ld [de], a
ld a, [hli] ld a, [hli]

View file

@ -600,6 +600,8 @@ wOverrideSimulatedJoypadStatesMask:: ; cd3b
ds 1 ds 1
wWhichTownMapLocation:: ; cd3d
wStoppingWhichSlotMachineWheel:: ; cd3d wStoppingWhichSlotMachineWheel:: ; cd3d
; which wheel the player is trying to stop ; which wheel the player is trying to stop
; 0 = none, 1 = wheel 1, 2 = wheel 2, 3 or greater = wheel 3 ; 0 = none, 1 = wheel 1, 2 = wheel 2, 3 or greater = wheel 3
@ -627,6 +629,9 @@ wWhichTrade:: ; cd3d
wTrainerSpriteOffset:: ; cd3d wTrainerSpriteOffset:: ; cd3d
ds 1 ds 1
wFlyLocationsList:: ; cd3e
; 11 bytes plus $ff sentinel values at each end
wSlotMachineWheel1Offset:: ; cd3e wSlotMachineWheel1Offset:: ; cd3e
wTradedEnemyMonSpecies:: ; cd3e wTradedEnemyMonSpecies:: ; cd3e
@ -761,6 +766,8 @@ wcd50:: ds 9 ; used with in-game trades, emotion bubbles, and player and miscell
wTradedEnemyMonOTID:: ; cd59 wTradedEnemyMonOTID:: ; cd59
ds 2 ds 2
wOAMBaseTile:: ; cd5b
wcd5b:: ds 1 ; used in some sprite stuff, town map and surge gym trash cans wcd5b:: ds 1 ; used in some sprite stuff, town map and surge gym trash cans
wcd5c:: ds 1 ; used in town map wcd5c:: ds 1 ; used in town map
@ -807,6 +814,10 @@ wTileMapBackup2:: ; cd81
wBuffer:: ; cee9 wBuffer:: ; cee9
; Temporary storage area of 30 bytes. ; Temporary storage area of 30 bytes.
wTownMapCoords:: ; cee9
; lower nybble is x, upper nybble is y
wHPBarMaxHP:: ; cee9 wHPBarMaxHP:: ; cee9
ds 2 ds 2
wHPBarOldHP:: ; ceeb wHPBarOldHP:: ; ceeb