INCLUDE "hardware.inc"
|
|
|
|
; SCENE.Z80
|
|
;
|
|
; Map Source File.
|
|
;
|
|
; Info:
|
|
; Section : ROM0
|
|
; Bank : 0
|
|
; Map size : 20 x 18
|
|
; Tile set : C:\Users\case\Downloads\woods.gbr
|
|
; Plane count : 1 plane (8 bits)
|
|
; Plane order : Tiles are continues
|
|
; Tile offset : 0
|
|
; Split data : No
|
|
;
|
|
; This file was generated by GBMB v1.8
|
|
|
|
sceneWidth EQU 20
|
|
sceneHeight EQU 18
|
|
|
|
SECTION "BG0", ROM0
|
|
|
|
bg:
|
|
INCBIN "png/map/intro.map.2bpp"
|
|
bg_tiles:
|
|
INCBIN "png/map/intro.tiles.2bpp"
|
|
bg_tiles_end:
|
|
|
|
BG_Init::
|
|
; copy map
|
|
ld e, 18
|
|
ld bc, _SCRN0
|
|
ld hl, bg
|
|
.copy_map_row:
|
|
ld d, 20
|
|
call memcpy
|
|
dec e
|
|
jr z, .done
|
|
ld d, 32 - 20
|
|
.skip:
|
|
; skip over trailing part in vram
|
|
inc c
|
|
jr nz, .nocarry
|
|
inc b
|
|
.nocarry:
|
|
dec d
|
|
jr nz, .skip
|
|
jr .copy_map_row
|
|
.done:
|
|
|
|
; copy tiles
|
|
ld hl, bg_tiles
|
|
ld bc, _VRAM
|
|
ld d, bg_tiles_end - bg_tiles
|
|
call memcpy
|
|
|
|
ret
|