diff --git a/engine/battle/trainer_huds.asm b/engine/battle/trainer_huds.asm index 3930549b2..488f55462 100644 --- a/engine/battle/trainer_huds.asm +++ b/engine/battle/trainer_huds.asm @@ -101,7 +101,7 @@ StageBallTilesData: DrawPlayerHUDBorder: ld hl, .tiles ld de, wTrainerHUDTiles - ld bc, 4 + ld bc, .tiles_end - .tiles call CopyBytes hlcoord 18, 10 ld de, -1 ; start on right @@ -112,11 +112,12 @@ DrawPlayerHUDBorder: db $77 ; bottom right db $6f ; bottom left db $76 ; bottom side +.tiles_end DrawPlayerPartyIconHUDBorder: ld hl, .tiles ld de, wTrainerHUDTiles - ld bc, 4 + ld bc, .tiles_end - .tiles call CopyBytes hlcoord 18, 10 ld de, -1 ; start on right @@ -127,11 +128,12 @@ DrawPlayerPartyIconHUDBorder: db $5c ; bottom right db $6f ; bottom left db $76 ; bottom side +.tiles_end DrawEnemyHUDBorder: ld hl, .tiles ld de, wTrainerHUDTiles - ld bc, 4 + ld bc, .tiles_end - .tiles call CopyBytes hlcoord 1, 2 ld de, 1 ; start on left @@ -152,23 +154,24 @@ DrawEnemyHUDBorder: db $74 ; bottom left db $78 ; bottom right db $76 ; bottom side +.tiles_end PlaceHUDBorderTiles: - ld a, [wTrainerHUDTiles] + ld a, [wTrainerHUDTiles+0] ld [hl], a ld bc, SCREEN_WIDTH add hl, bc - ld a, [wStartFlypoint] + ld a, [wTrainerHUDTiles+1] ld [hl], a - ld b, $8 + ld b, 8 .loop add hl, de - ld a, [wMovementBuffer] + ld a, [wTrainerHUDTiles+3] ld [hl], a dec b jr nz, .loop add hl, de - ld a, [wEndFlypoint] + ld a, [wTrainerHUDTiles+2] ld [hl], a ret @@ -181,7 +184,7 @@ LinkBattle_TrainerHuds: ld a, 10 * 8 ld [hli], a ld [hl], 8 * 8 - ld a, $8 + ld a, 8 ld [wPlaceBallsDirection], a ld hl, wVirtualOAMSprite00 call LoadTrainerHudOAM diff --git a/wram.asm b/wram.asm index 6f17c7c07..5bfc28ec5 100644 --- a/wram.asm +++ b/wram.asm @@ -1701,7 +1701,7 @@ NEXTU ; d002 ; trainer HUD data ds 1 wPlaceBallsDirection:: db -wTrainerHUDTiles:: db +wTrainerHUDTiles:: ds 4 NEXTU ; d002 ; mobile participant nicknames