Improve the randN function. Show a different colour on the border when drawing versus updating the game state.

This commit is contained in:
Jeremy Rand 2020-07-27 21:47:28 -04:00
parent 9fde825430
commit 36be001229
2 changed files with 12 additions and 2 deletions

View File

@ -36,6 +36,12 @@ gameLoop anop
jsl drawFlea
jsl drawDirtyNonGameTiles
short i,m
lda >BORDER_COLOUR_REGISTER
and #$f1
sta >BORDER_COLOUR_REGISTER
long i,m
jsl updateScorpion
jsl updateSpider
jsl updateFlea

View File

@ -88,10 +88,14 @@ randN_ret0 anop
randN_doit anop
sta upperLimit
randN_retry anop
jsl rand0_to_14
randN_loop anop
cmp upperLimit
bge randN_retry
blt randN_done
sec
sbc upperLimit
bra randN_loop
randN_done anop
rtl