use screen size constants directly...
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
INCLUDE "hardware.inc"
|
||||
INCLUDE "utils.inc"
|
||||
INCLUDE "automata.inc"
|
||||
|
||||
RENDER_IN_HBL EQU 0
|
||||
|
||||
@@ -72,7 +71,7 @@ LCDStatInterruptHandler:
|
||||
|
||||
; go to next line
|
||||
ld a, e
|
||||
add a, SCRN_VX_B - TILE_WIDTH
|
||||
add a, SCRN_VX_B - SCRN_X_B
|
||||
ld e, a
|
||||
jr nc, .nocarry
|
||||
inc d
|
||||
@@ -83,7 +82,7 @@ LCDStatInterruptHandler:
|
||||
jr z, .finish
|
||||
|
||||
; reset tile counter
|
||||
ld c, TILE_WIDTH
|
||||
ld c, SCRN_X_B
|
||||
|
||||
jr .loop
|
||||
|
||||
@@ -137,9 +136,9 @@ StartRender:
|
||||
ld [Rendered + 1], a
|
||||
|
||||
; start rendering
|
||||
ld a, TILE_WIDTH
|
||||
ld a, SCRN_X_B
|
||||
ldh [TilesLeft], a
|
||||
ld a, TILE_HEIGHT
|
||||
ld a, SCRN_Y_B
|
||||
ldh [LinesLeft], a
|
||||
|
||||
; enable v-blank and lcd stat interrupt for h-blank
|
||||
|
||||
Reference in New Issue
Block a user