LoadEDTile → CopyTilemapAtOnce (fix #345)

This commit is contained in:
Remy Oukaour 2017-12-24 18:11:17 -05:00
parent 0a1fef45fd
commit 040aa7cb17
10 changed files with 39 additions and 39 deletions

View File

@ -60,7 +60,7 @@ Predef_StartBattle: ; 8c20f
call UpdateSprites call UpdateSprites
call DelayFrame call DelayFrame
call .NonMobile_LoadPokeballTiles call .NonMobile_LoadPokeballTiles
call BattleStart_LoadEDTile call BattleStart_CopyTilemapAtOnce
jr .resume jr .resume
.mobile .mobile
@ -663,7 +663,7 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
ld a, $1 ld a, $1
ld [hCGBPalUpdate], a ld [hCGBPalUpdate], a
call DelayFrame call DelayFrame
call BattleStart_LoadEDTile call BattleStart_CopyTilemapAtOnce
.nextscene ; 8c673 (23:4673) .nextscene ; 8c673 (23:4673)
call StartTrainerBattle_NextScene call StartTrainerBattle_NextScene

View File

@ -307,7 +307,7 @@ Function8bec:
ld a, [EnemySafeguardCount] ; value ld a, [EnemySafeguardCount] ; value
and $3 and $3
call FillBoxCGB call FillBoxCGB
call LoadEDTile call CopyTilemapAtOnce
ret ret
ApplyMonOrTrainerPals: ApplyMonOrTrainerPals:

View File

@ -599,7 +599,7 @@ Phone_StartRinging: ; 9033f
call PlaySFX call PlaySFX
call Phone_CallerTextbox call Phone_CallerTextbox
call UpdateSprites call UpdateSprites
farcall PhoneRing_LoadEDTile farcall PhoneRing_CopyTilemapAtOnce
ret ret
; 90355 ; 90355
@ -609,7 +609,7 @@ HangUp_Wait20Frames: ; 90355
Phone_Wait20Frames Phone_Wait20Frames
ld c, 20 ld c, 20
call DelayFrames call DelayFrames
farcall PhoneRing_LoadEDTile farcall PhoneRing_CopyTilemapAtOnce
ret ret
; 90363 ; 90363

View File

@ -3,7 +3,7 @@ SaveMenu: ; 14a1a
farcall DisplaySaveInfoOnSave farcall DisplaySaveInfoOnSave
call SpeechTextBox call SpeechTextBox
call UpdateSprites call UpdateSprites
farcall SaveMenu_LoadEDTile farcall SaveMenu_CopyTilemapAtOnce
ld hl, Text_WouldYouLikeToSaveTheGame ld hl, Text_WouldYouLikeToSaveTheGame
call SaveTheGame_yesorno call SaveTheGame_yesorno
jr nz, .refused jr nz, .refused
@ -19,7 +19,7 @@ SaveMenu: ; 14a1a
.refused .refused
call ExitMenu call ExitMenu
call ret_d90 call ret_d90
farcall SaveMenu_LoadEDTile farcall SaveMenu_CopyTilemapAtOnce
scf scf
ret ret

View File

@ -476,7 +476,7 @@ Mom_ContinueMenuSetup: ; 1651a
lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6 lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6
call PrintNum call PrintNum
call UpdateSprites call UpdateSprites
call CGBOnly_LoadEDTile call CGBOnly_CopyTilemapAtOnce
ret ret
; 1656b ; 1656b

View File

@ -532,7 +532,7 @@ ApplyTilemap:: ; 321c
ld a, 1 ld a, 1
ld [hBGMapMode], a ld [hBGMapMode], a
jr LoadEDTile jr CopyTilemapAtOnce
.dmg .dmg
; WaitBGMap ; WaitBGMap
@ -543,13 +543,13 @@ ApplyTilemap:: ; 321c
ret ret
; 3238 ; 3238
CGBOnly_LoadEDTile:: ; 3238 CGBOnly_CopyTilemapAtOnce:: ; 3238
ld a, [hCGB] ld a, [hCGB]
and a and a
jr z, WaitBGMap jr z, WaitBGMap
LoadEDTile:: ; 323d CopyTilemapAtOnce:: ; 323d
jr .LoadEDTile jr .CopyTilemapAtOnce
; 323f ; 323f
; XXX ; XXX
@ -557,7 +557,7 @@ LoadEDTile:: ; 323d
ret ret
; 3246 ; 3246
.LoadEDTile: ; 3246 .CopyTilemapAtOnce: ; 3246
ld a, [hBGMapMode] ld a, [hBGMapMode]
push af push af
xor a xor a
@ -574,11 +574,11 @@ LoadEDTile:: ; 323d
jr c, .wait jr c, .wait
di di
ld a, 1 ; BANK(VTiles3) ld a, BANK(VTiles3)
ld [rVBK], a ld [rVBK], a
hlcoord 0, 0, AttrMap hlcoord 0, 0, AttrMap
call .StackPointerMagic call .StackPointerMagic
ld a, 0 ; BANK(VTiles0) ld a, BANK(VTiles0)
ld [rVBK], a ld [rVBK], a
hlcoord 0, 0 hlcoord 0, 0
call .StackPointerMagic call .StackPointerMagic
@ -623,7 +623,7 @@ rept SCREEN_WIDTH / 2
inc l inc l
endr endr
ld de, $20 - SCREEN_WIDTH ld de, BG_MAP_WIDTH - SCREEN_WIDTH
add hl, de add hl, de
ld a, [hTilesPerCycle] ld a, [hTilesPerCycle]
dec a dec a

View File

@ -309,12 +309,12 @@ endr
INCLUDE "data/collision_permissions.asm" INCLUDE "data/collision_permissions.asm"
INCLUDE "engine/empty_sram.asm" INCLUDE "engine/empty_sram.asm"
SaveMenu_LoadEDTile: ; 4cf45 (13:4f45) SaveMenu_CopyTilemapAtOnce: ; 4cf45 (13:4f45)
ld a, [hCGB] ld a, [hCGB]
and a and a
jp z, WaitBGMap jp z, WaitBGMap
; The following is a modified version of LoadEDTile. ; The following is a modified version of CopyTilemapAtOnce.
ld a, [hBGMapMode] ld a, [hBGMapMode]
push af push af
xor a xor a
@ -329,14 +329,14 @@ SaveMenu_LoadEDTile: ; 4cf45 (13:4f45)
jr c, .WaitLY jr c, .WaitLY
di di
ld a, 1 ; BANK(VBGMap2) ld a, BANK(VBGMap2)
ld [rVBK], a ld [rVBK], a
hlcoord 0, 0, AttrMap hlcoord 0, 0, AttrMap
call .LoadEDTile call .CopyTilemapAtOnce
ld a, 0 ; BANK(VBGMap0) ld a, BANK(VBGMap0)
ld [rVBK], a ld [rVBK], a
hlcoord 0, 0 hlcoord 0, 0
call .LoadEDTile call .CopyTilemapAtOnce
.WaitLY2: .WaitLY2:
ld a, [rLY] ld a, [rLY]
cp $60 cp $60
@ -349,7 +349,7 @@ SaveMenu_LoadEDTile: ; 4cf45 (13:4f45)
ld [hBGMapMode], a ld [hBGMapMode], a
ret ret
.LoadEDTile: ; 4cf80 (13:4f80) .CopyTilemapAtOnce: ; 4cf80 (13:4f80)
ld [hSPBuffer], sp ; $ffd9 ld [hSPBuffer], sp ; $ffd9
ld sp, hl ld sp, hl
ld a, [hBGMapAddress + 1] ld a, [hBGMapAddress + 1]
@ -373,7 +373,7 @@ rept SCREEN_WIDTH / 2
inc l inc l
endr endr
ld de, $20 - SCREEN_WIDTH ld de, BG_MAP_WIDTH - SCREEN_WIDTH
add hl, de add hl, de
ld a, [hTilesPerCycle] ld a, [hTilesPerCycle]
dec a dec a
@ -447,7 +447,7 @@ _LoadMapPart:: ; 4d15b
jr nz, .loop jr nz, .loop
ret ret
PhoneRing_LoadEDTile: ; 4d188 PhoneRing_CopyTilemapAtOnce: ; 4d188
ld a, [hCGB] ld a, [hCGB]
and a and a
jp z, WaitBGMap jp z, WaitBGMap
@ -455,7 +455,7 @@ PhoneRing_LoadEDTile: ; 4d188
cp $0 cp $0
jp z, WaitBGMap jp z, WaitBGMap
; What follows is a modified version of LoadEDTile. ; What follows is a modified version of CopyTilemapAtOnce.
ld a, [hBGMapMode] ld a, [hBGMapMode]
push af push af
xor a xor a
@ -470,14 +470,14 @@ PhoneRing_LoadEDTile: ; 4d188
jr c, .wait jr c, .wait
di di
ld a, 1 ; BANK(VBGMap2) ld a, BANK(VBGMap2)
ld [rVBK], a ld [rVBK], a
hlcoord 0, 0, AttrMap hlcoord 0, 0, AttrMap
call .LoadEDTile call .CopyTilemapAtOnce
ld a, 0 ; BANK(VBGMap0) ld a, BANK(VBGMap0)
ld [rVBK], a ld [rVBK], a
hlcoord 0, 0 hlcoord 0, 0
call .LoadEDTile call .CopyTilemapAtOnce
.wait2 .wait2
ld a, [rLY] ld a, [rLY]
cp $8f cp $8f
@ -490,7 +490,7 @@ PhoneRing_LoadEDTile: ; 4d188
ld [hBGMapMode], a ld [hBGMapMode], a
ret ret
.LoadEDTile: ; 4d1cb .CopyTilemapAtOnce: ; 4d1cb
ld [hSPBuffer], sp ld [hSPBuffer], sp
ld sp, hl ld sp, hl
ld a, [hBGMapAddress + 1] ld a, [hBGMapAddress + 1]
@ -514,7 +514,7 @@ rept SCREEN_WIDTH / 2
inc l inc l
endr endr
ld de, $20 - SCREEN_WIDTH ld de, BG_MAP_WIDTH - SCREEN_WIDTH
add hl, de add hl, de
ld a, [hTilesPerCycle] ld a, [hTilesPerCycle]
dec a dec a
@ -752,8 +752,8 @@ INCLUDE "engine/battle_transition.asm"
INCLUDE "event/field_moves.asm" INCLUDE "event/field_moves.asm"
INCLUDE "event/magnet_train.asm" INCLUDE "event/magnet_train.asm"
BattleStart_LoadEDTile: ; 8cf4f BattleStart_CopyTilemapAtOnce: ; 8cf4f
call CGBOnly_LoadEDTile call CGBOnly_CopyTilemapAtOnce
ret ret
INCLUDE "engine/sprites.asm" INCLUDE "engine/sprites.asm"

View File

@ -2226,7 +2226,7 @@ Function89d85: ; 89d85 (22:5d85)
push hl push hl
call Mobile22_SetBGMapMode0 call Mobile22_SetBGMapMode0
call _hl_ call _hl_
call CGBOnly_LoadEDTile call CGBOnly_CopyTilemapAtOnce
pop hl pop hl
asm_89d90: ; 89d90 (22:5d90) asm_89d90: ; 89d90 (22:5d90)
@ -2670,7 +2670,7 @@ Function8a055: ; 8a055 (22:6055)
inc hl inc hl
ld a, $6 ld a, $6
call Function8a5a3 call Function8a5a3
call CGBOnly_LoadEDTile call CGBOnly_CopyTilemapAtOnce
pop bc pop bc
ld a, c ld a, c
cp $b cp $b
@ -2685,7 +2685,7 @@ Function8a055: ; 8a055 (22:6055)
ld a, $6 ld a, $6
hlcoord 15, 4, AttrMap hlcoord 15, 4, AttrMap
call Function8a5a3 call Function8a5a3
call CGBOnly_LoadEDTile call CGBOnly_CopyTilemapAtOnce
jp Function89e36 jp Function89e36
Function8a0a1: ; 8a0a1 (22:60a1) Function8a0a1: ; 8a0a1 (22:60a1)

View File

@ -411,7 +411,7 @@ Function8b539: ; 8b539 (22:7539)
call Function8b4fd call Function8b4fd
ld e, $0 ld e, $0
call Function89c44 call Function89c44
call CGBOnly_LoadEDTile call CGBOnly_CopyTilemapAtOnce
ret ret
Function8b555: ; 8b555 (22:7555) Function8b555: ; 8b555 (22:7555)

View File

@ -3089,7 +3089,7 @@ Function1013d6: ; 1013d6
; 1013dd ; 1013dd
Function1013dd: ; 1013dd Function1013dd: ; 1013dd
call CGBOnly_LoadEDTile call CGBOnly_CopyTilemapAtOnce
ret ret
; 1013e1 ; 1013e1