pokecrystal-board/engine/tilesets/mapgroup_roofs.asm
Rangi 40902ffe24 Verify data table sizes with table_width and assert_table_length macros
This was discussed in #706

It also uncovered some off-by-one issues with defining some constants.

A few structs now use rsreset/_RS to define their offset constants, as discussed in #739
2021-03-04 00:15:03 -05:00

19 lines
275 B
NASM

LoadMapGroupRoof::
ld a, [wMapGroup]
ld e, a
ld d, 0
ld hl, MapGroupRoofs
add hl, de
ld a, [hl]
cp -1
ret z
ld hl, Roofs
ld bc, ROOF_LENGTH tiles
call AddNTimes
ld de, vTiles2 tile $0a
ld bc, ROOF_LENGTH tiles
call CopyBytes
ret
INCLUDE "data/maps/roofs.asm"