ootw: add swaying plant

not 100% happy with this
This commit is contained in:
Vince Weaver 2019-01-16 23:50:32 -05:00
parent 17258bfb94
commit c3b36946b0
2 changed files with 56 additions and 20 deletions

View File

@ -67,12 +67,16 @@ ootw:
lda #0
sta GAIT
;============================
; Main Loop
;============================
game_loop:
; check keyboard
jsr handle_keypress
;================================
; copy background to current page
jsr gr_copy_to_current
@ -143,22 +147,32 @@ game_loop:
jsr put_sprite
;===============
; draw physicist
jsr draw_physicist
;===============
; draw slugs
jsr draw_slugs
; draw foreground
;======================
; draw foreground plant
lda #>foreground_plant
sta INH
lda #<foreground_plant
lda FRAMEL
and #$c0 ; 0110 1100
lsr
lsr
lsr
lsr
lsr
tax
lda plant_wind,X
sta INL
lda plant_wind+1,X
sta INH
lda #4
sta XPOS

View File

@ -104,21 +104,43 @@ phys_walk_left7:
;=======================
; scenery
foreground_plant:
.byte $5,$5
.byte $aa,$00,$aa,$aa,$aa
.byte $aa,$a0,$0a,$aa,$aa
.byte $aa,$aa,$00,$aa,$aa
.byte $0a,$0a,$00,$aa,$0a
.byte $aa,$aa,$00,$aa,$00
plant_wind:
.word plant1
.word plant2
.word plant3
.word plant4
foreground_plant2:
.byte $5,$5
.byte $aa,$00,$aa,$aa,$aa
.byte $aa,$a0,$0a,$aa,$aa
.byte $aa,$aa,$00,$aa,$aa
.byte $0a,$0a,$00,$aa,$0a
.byte $aa,$aa,$00,$aa,$00
plant1:
.byte $4,$5
.byte $aa,$00,$aa,$aa
.byte $aa,$00,$aa,$aa
.byte $aa,$00,$aa,$aa
.byte $aa,$00,$aa,$00
.byte $aa,$00,$aa,$00
plant2:
.byte $4,$5
.byte $a0,$0a,$aa,$aa
.byte $aa,$00,$aa,$aa
.byte $aa,$00,$aa,$aa
.byte $aa,$00,$aa,$00
.byte $aa,$00,$aa,$00
plant3:
.byte $4,$5
.byte $00,$aa,$aa,$aa
.byte $a0,$0a,$aa,$aa
.byte $aa,$00,$aa,$aa
.byte $aa,$00,$aa,$00
.byte $aa,$00,$aa,$00
plant4:
.byte $4,$5
.byte $00,$aa,$aa,$aa
.byte $aa,$00,$aa,$aa
.byte $aa,$00,$aa,$aa
.byte $aa,$00,$aa,$00
.byte $aa,$00,$aa,$00
pool_ripples: