2018-06-24 14:09:41 +00:00
|
|
|
LoadTileMapToTempTileMap::
|
2018-04-05 04:35:14 +00:00
|
|
|
; Load wTileMap into wTempTileMap
|
|
|
|
ld a, [rSVBK]
|
|
|
|
push af
|
|
|
|
ld a, BANK(wTempTileMap)
|
|
|
|
ld [rSVBK], a
|
|
|
|
hlcoord 0, 0
|
|
|
|
decoord 0, 0, wTempTileMap
|
|
|
|
ld bc, wTileMapEnd - wTileMap
|
|
|
|
call CopyBytes
|
|
|
|
pop af
|
|
|
|
ld [rSVBK], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
Call_LoadTempTileMapToTileMap::
|
2018-04-05 04:35:14 +00:00
|
|
|
xor a
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
call LoadTempTileMapToTileMap
|
|
|
|
ld a, 1
|
|
|
|
ld [hBGMapMode], a
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
LoadTempTileMapToTileMap::
|
2018-04-05 04:35:14 +00:00
|
|
|
; Load wTempTileMap into wTileMap
|
|
|
|
ld a, [rSVBK]
|
|
|
|
push af
|
|
|
|
ld a, BANK(wTempTileMap)
|
|
|
|
ld [rSVBK], a
|
|
|
|
hlcoord 0, 0, wTempTileMap
|
|
|
|
decoord 0, 0
|
|
|
|
ld bc, wTileMapEnd - wTileMap
|
|
|
|
call CopyBytes
|
|
|
|
pop af
|
|
|
|
ld [rSVBK], a
|
|
|
|
ret
|