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
+12
+12
View File
@@ -242,6 +242,18 @@ x_not_too_big:
lda #0
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
sta $0403
lda current_screen_y