Format all CopyTilemapAtOnce variations the same way

This commit is contained in:
Rangi
2020-05-16 22:25:52 -04:00
parent abf3858fc4
commit 395ebd8386
3 changed files with 37 additions and 23 deletions

View File

@@ -58,13 +58,13 @@ CGBOnly_CopyTilemapAtOnce::
jr z, WaitBGMap
CopyTilemapAtOnce::
jr .CopyTilemapAtOnce
jr _CopyTilemapAtOnce
; unused
farcall HDMATransferAttrmapAndTilemapToWRAMBank3
ret
.CopyTilemapAtOnce:
_CopyTilemapAtOnce:
ldh a, [hBGMapMode]
push af
xor a
@@ -77,22 +77,22 @@ CopyTilemapAtOnce::
.wait
ldh a, [rLY]
cp $7f
cp $80 - 1
jr c, .wait
di
ld a, BANK(vTiles3)
ld a, BANK(vBGMap2)
ldh [rVBK], a
hlcoord 0, 0, wAttrmap
call .StackPointerMagic
ld a, BANK(vTiles0)
call .CopyBGMapViaStack
ld a, BANK(vBGMap0)
ldh [rVBK], a
hlcoord 0, 0
call .StackPointerMagic
call .CopyBGMapViaStack
.wait2
ldh a, [rLY]
cp $7f
cp $80 - 1
jr c, .wait2
ei
@@ -102,7 +102,7 @@ CopyTilemapAtOnce::
ldh [hBGMapMode], a
ret
.StackPointerMagic:
.CopyBGMapViaStack:
; Copy all tiles to vBGMap
ld [hSPBuffer], sp
ld sp, hl
@@ -122,7 +122,7 @@ rept SCREEN_WIDTH / 2
ldh a, [c]
and b
jr nz, .loop\@
; load BGMap0
; load vBGMap
ld [hl], e
inc l
ld [hl], d