make sure screen Y is not too large when normalising

This commit is contained in:
Paul Gardner-Stephen committed 2019-04-21 00:05:16 +09:30
1 parent b03742b745
commit 654abce59d
1 file changed
+13 -1
+13 -1
View File
@@ -241,7 +241,19 @@ x_not_too_big:
bpl + bpl +
lda #0 lda #0
sta current_screen_y sta current_screen_y
* *
;; Make sure Y isn't too large for absolute size of
;; screen
cmp #24
bcc +
lda #24
sta current_screen_y
*
;; Make sure Y isn't too much for the screen, taking
;; into account
lda current_screen_x lda current_screen_x
sta $0403 sta $0403
lda current_screen_y lda current_screen_y