mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
26b8bf003e
We used to have a mixture of TileMap and and Tilemap, as well as the similar AttrMap. Standardize on one.
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
|