ootw: add pool ripples

not sure how I feel about them

also added left-edge detection
This commit is contained in:
Vince Weaver 2019-01-16 23:16:11 -05:00
parent f154913403
commit fe45c8cee1
3 changed files with 84 additions and 4 deletions

View File

@ -78,8 +78,71 @@ game_loop:
jsr gr_copy_to_current
;=======================
; draw pool ripples
lda FRAMEL
and #$30 ; 0110 1100
lsr
lsr
lsr
tax
lda pool_ripples,X
sta INL
lda pool_ripples+1,X
sta INH
lda #9
sta XPOS
lda #30
sta YPOS
jsr put_sprite
lda FRAMEL
and #$30 ; 0110 1100
lsr
lsr
lsr
clc
adc #2
and #$6
tax
lda pool_ripples,X
sta INL
lda pool_ripples+1,X
sta INH
lda #27
sta XPOS
lda #30
sta YPOS
jsr put_sprite
lda FRAMEL
and #$30 ; 0110 1100
lsr
lsr
lsr
clc
adc #4
and #$6
tax
lda #18
sta XPOS
lda #28
sta YPOS
jsr put_sprite
; draw physicist
@ -108,6 +171,15 @@ game_loop:
jsr page_flip
; inc frame count
inc FRAMEL
bne frame_no_oflo
inc FRAMEH
frame_no_oflo:
; pause?
; loop forever
@ -146,6 +218,11 @@ left:
bne face_left
dec PHYSICIST_X
bpl just_fine_left
too_far_left:
inc PHYSICIST_X
just_fine_left:
inc GAIT
inc GAIT

View File

@ -125,11 +125,12 @@ pool_ripples:
.word ripple1
.word ripple2
.word ripple3
.word ripple4
ripple1:
.byte $3,$1
.byte $5a,$5a,$5a
.byte $5a,$5a,$aa
ripple2:
.byte $3,$1
@ -139,6 +140,10 @@ ripple3:
.byte $3,$1
.byte $aa,$aa,$aa
ripple4:
.byte $3,$1
.byte $aa,$aa,$aa
;=========================

View File

@ -1,7 +1,5 @@
;; Zero Page
FRAMEBUFFER = $00 ; $00 - $0F
;; LZ4 addresses
LZ4_SRC = $00
@ -42,7 +40,7 @@ FILEML = $64
FILEMH = $65
FRAME = $60
FRAMEL = $60
FRAMEH = $61
WAITING = $62
LETTERL = $63