pokecrystal-board/home/copy_tilemap.asm

36 lines
620 B
NASM
Raw Normal View History

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