diff options
| author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-05-16 22:25:52 -0400 |
|---|---|---|
| committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-05-16 22:25:52 -0400 |
| commit | 395ebd83866161a93276f030bbf67f6ac0895f0f (patch) | |
| tree | 7f9565b75c7e427e4c65df0ddc1451beebf47a3b /engine/phone | |
| parent | abf3858fc4bc317f8cd43e04b46d5a11d14927de (diff) | |
Format all CopyTilemapAtOnce variations the same way
Diffstat (limited to 'engine/phone')
| -rw-r--r-- | engine/phone/phonering_copytilemapatonce.asm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/engine/phone/phonering_copytilemapatonce.asm b/engine/phone/phonering_copytilemapatonce.asm index 0ddb3c852..029c2958c 100644 --- a/engine/phone/phonering_copytilemapatonce.asm +++ b/engine/phone/phonering_copytilemapatonce.asm @@ -6,15 +6,18 @@ PhoneRing_CopyTilemapAtOnce: cp $0 jp z, WaitBGMap -; What follows is a modified version of CopyTilemapAtOnce. +; The following is a modified version of _CopyTilemapAtOnce +; that waits for [rLY] to be LY_VBLANK - 1 instead of $80 - 1. ldh a, [hBGMapMode] push af xor a ldh [hBGMapMode], a + ldh a, [hMapAnims] push af xor a ldh [hMapAnims], a + .wait ldh a, [rLY] cp LY_VBLANK - 1 @@ -24,11 +27,12 @@ PhoneRing_CopyTilemapAtOnce: ld a, BANK(vBGMap2) ldh [rVBK], a hlcoord 0, 0, wAttrmap - call .CopyTilemapAtOnce + call .CopyBGMapViaStack ld a, BANK(vBGMap0) ldh [rVBK], a hlcoord 0, 0 - call .CopyTilemapAtOnce + call .CopyBGMapViaStack + .wait2 ldh a, [rLY] cp LY_VBLANK - 1 @@ -41,7 +45,8 @@ PhoneRing_CopyTilemapAtOnce: ldh [hBGMapMode], a ret -.CopyTilemapAtOnce: +.CopyBGMapViaStack: +; Copy all tiles to vBGMap ld [hSPBuffer], sp ld sp, hl ldh a, [hBGMapAddress + 1] @@ -55,10 +60,12 @@ PhoneRing_CopyTilemapAtOnce: .loop rept SCREEN_WIDTH / 2 pop de +; if in v/hblank, wait until not in v/hblank .loop\@ ldh a, [c] and b jr nz, .loop\@ +; load vBGMap ld [hl], e inc l ld [hl], d |
