separated background and sprite tiles, check only lines left in wait for render routine, added build files, rom, git ignore
This commit is contained in:
@@ -43,8 +43,14 @@ DefaultMap:
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
db 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
|
||||
EXPORT Tiles, TilesEnd
|
||||
EXPORT BackgroundTiles, BackgroundTilesEnd
|
||||
SECTION "Graphics", ROM0
|
||||
Tiles:
|
||||
INCBIN "Tiles.bin"
|
||||
TilesEnd: ds 0
|
||||
BackgroundTiles:
|
||||
INCBIN "BackgroundTiles.bin"
|
||||
BackgroundTilesEnd: ds 0
|
||||
|
||||
EXPORT SpriteTiles, SpriteTilesEnd
|
||||
SECTION "Graphics", ROM0
|
||||
SpriteTiles:
|
||||
INCBIN "SpriteTiles.bin"
|
||||
SpriteTilesEnd: ds 0
|
||||
@@ -40,10 +40,15 @@ Start:
|
||||
; 16: sprite selection tile
|
||||
; 17: empty tile
|
||||
ld hl, _VRAM_BG_TILES
|
||||
ld de, Tiles
|
||||
ld bc, TilesEnd - Tiles
|
||||
ld de, BackgroundTiles
|
||||
ld bc, BackgroundTilesEnd - BackgroundTiles
|
||||
call MemoryCopy
|
||||
|
||||
|
||||
ld hl, _VRAM
|
||||
ld de, SpriteTiles
|
||||
ld bc, SpriteTilesEnd - SpriteTiles
|
||||
call MemoryCopy
|
||||
|
||||
; clear OAM
|
||||
ld hl, _OAMRAM
|
||||
ld d, 0
|
||||
|
||||
@@ -136,9 +136,7 @@ EXPORT WaitRender
|
||||
SECTION "WaitRender", ROM0
|
||||
WaitRender:
|
||||
ldh a, [LinesLeft]
|
||||
ld b, a
|
||||
ldh a, [TilesLeft]
|
||||
or a, b
|
||||
or a
|
||||
ret z
|
||||
halt
|
||||
jr WaitRender
|
||||
|
||||
Reference in New Issue
Block a user