mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
34ceaac71d
Stupid name is stupid smh tbh fam.
36 lines
619 B
NASM
36 lines
619 B
NASM
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
|
|
|
|
SafeLoadTempTileMapToTileMap::
|
|
xor a
|
|
ldh [hBGMapMode], a
|
|
call LoadTempTileMapToTileMap
|
|
ld a, 1
|
|
ldh [hBGMapMode], a
|
|
ret
|
|
|
|
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
|