mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Improve wTrainerHUDTiles usage
This commit is contained in:
parent
5145d69506
commit
0c746447e7
@ -101,7 +101,7 @@ StageBallTilesData:
|
|||||||
DrawPlayerHUDBorder:
|
DrawPlayerHUDBorder:
|
||||||
ld hl, .tiles
|
ld hl, .tiles
|
||||||
ld de, wTrainerHUDTiles
|
ld de, wTrainerHUDTiles
|
||||||
ld bc, 4
|
ld bc, .tiles_end - .tiles
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
hlcoord 18, 10
|
hlcoord 18, 10
|
||||||
ld de, -1 ; start on right
|
ld de, -1 ; start on right
|
||||||
@ -112,11 +112,12 @@ DrawPlayerHUDBorder:
|
|||||||
db $77 ; bottom right
|
db $77 ; bottom right
|
||||||
db $6f ; bottom left
|
db $6f ; bottom left
|
||||||
db $76 ; bottom side
|
db $76 ; bottom side
|
||||||
|
.tiles_end
|
||||||
|
|
||||||
DrawPlayerPartyIconHUDBorder:
|
DrawPlayerPartyIconHUDBorder:
|
||||||
ld hl, .tiles
|
ld hl, .tiles
|
||||||
ld de, wTrainerHUDTiles
|
ld de, wTrainerHUDTiles
|
||||||
ld bc, 4
|
ld bc, .tiles_end - .tiles
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
hlcoord 18, 10
|
hlcoord 18, 10
|
||||||
ld de, -1 ; start on right
|
ld de, -1 ; start on right
|
||||||
@ -127,11 +128,12 @@ DrawPlayerPartyIconHUDBorder:
|
|||||||
db $5c ; bottom right
|
db $5c ; bottom right
|
||||||
db $6f ; bottom left
|
db $6f ; bottom left
|
||||||
db $76 ; bottom side
|
db $76 ; bottom side
|
||||||
|
.tiles_end
|
||||||
|
|
||||||
DrawEnemyHUDBorder:
|
DrawEnemyHUDBorder:
|
||||||
ld hl, .tiles
|
ld hl, .tiles
|
||||||
ld de, wTrainerHUDTiles
|
ld de, wTrainerHUDTiles
|
||||||
ld bc, 4
|
ld bc, .tiles_end - .tiles
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
hlcoord 1, 2
|
hlcoord 1, 2
|
||||||
ld de, 1 ; start on left
|
ld de, 1 ; start on left
|
||||||
@ -152,23 +154,24 @@ DrawEnemyHUDBorder:
|
|||||||
db $74 ; bottom left
|
db $74 ; bottom left
|
||||||
db $78 ; bottom right
|
db $78 ; bottom right
|
||||||
db $76 ; bottom side
|
db $76 ; bottom side
|
||||||
|
.tiles_end
|
||||||
|
|
||||||
PlaceHUDBorderTiles:
|
PlaceHUDBorderTiles:
|
||||||
ld a, [wTrainerHUDTiles]
|
ld a, [wTrainerHUDTiles+0]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld bc, SCREEN_WIDTH
|
ld bc, SCREEN_WIDTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [wStartFlypoint]
|
ld a, [wTrainerHUDTiles+1]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld b, $8
|
ld b, 8
|
||||||
.loop
|
.loop
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wMovementBuffer]
|
ld a, [wTrainerHUDTiles+3]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
dec b
|
dec b
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wEndFlypoint]
|
ld a, [wTrainerHUDTiles+2]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -181,7 +184,7 @@ LinkBattle_TrainerHuds:
|
|||||||
ld a, 10 * 8
|
ld a, 10 * 8
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], 8 * 8
|
ld [hl], 8 * 8
|
||||||
ld a, $8
|
ld a, 8
|
||||||
ld [wPlaceBallsDirection], a
|
ld [wPlaceBallsDirection], a
|
||||||
ld hl, wVirtualOAMSprite00
|
ld hl, wVirtualOAMSprite00
|
||||||
call LoadTrainerHudOAM
|
call LoadTrainerHudOAM
|
||||||
|
Loading…
Reference in New Issue
Block a user