mode7_demo: update bouncing spheres

This commit is contained in:
Vince Weaver 2018-01-29 00:11:25 -05:00
parent 38e28f4169
commit 8ba2ff8e97
4 changed files with 68 additions and 25 deletions

View File

@ -326,6 +326,38 @@ draw_background:
;========================================
draw_sphere:
; draw shadow first
lda FRAME_COUNT
and #$0f
tax
lda gravity,X
cmp #$5
bmi high_shadow
low_shadow:
lda #>sphere_shadow1
sta INH
lda #<sphere_shadow1
sta INL
jmp done_shadow
high_shadow:
lda #>sphere_shadow2
sta INH
lda #<sphere_shadow2
sta INL
done_shadow:
lda #17 ; 2
sta XPOS ; 3
lda #28 ; 2
sta YPOS ; 3
jsr put_sprite
; draw sphere
lda #>sphere0 ; 2
sta INH ; 3
lda #<sphere0 ; 2
@ -1183,6 +1215,9 @@ gravity:
; .byte 10,10,10,10,10, 8, 8, 8, 8, 6, 6, 4, 4, 2, 2, 0
; .byte 0, 2, 2, 4, 4, 6, 6, 8, 8, 8, 8,10,10,10,10,10
; 5ps
.byte 10,10, 8, 8, 6, 4, 2, 0
.byte 0, 2, 4, 6, 8, 8, 10,10
; 5fps
; .byte 10,10, 8, 8, 6, 4, 2, 0
; .byte 0, 2, 4, 6, 8, 8, 10,10
.byte 10, 8, 8, 6, 6, 4, 2, 0
.byte 0, 2, 4, 6, 6, 8, 8,10

Binary file not shown.

View File

@ -62,42 +62,42 @@ sphere_offset:
sphere0:
.byte $5,$5
.byte $00,$b0,$b3,$b3,$00
.byte $00,$b0,$b3,$b0,$00
.byte $b0,$bb,$bb,$bb,$30
.byte $bb,$bb,$bb,$bb,$33
.byte $0b,$bb,$bb,$bb,$33
.byte $00,$0b,$3b,$3b,$03
.byte $bb,$bb,$bb,$bb,$33
.byte $00,$3b,$3b,$3b,$00
sphere1:
.byte $5,$5
.byte $00,$30,$bb,$bb,$00
.byte $00,$30,$bb,$b0,$00
.byte $30,$bb,$bb,$bb,$b0
.byte $bb,$bb,$bb,$bb,$bb
.byte $0b,$bb,$bb,$bb,$0b
.byte $00,$0b,$bb,$0b,$00
.byte $bb,$bb,$bb,$bb,$bb
.byte $00,$bb,$bb,$bb,$00
sphere2:
.byte $5,$5
.byte $00,$30,$b3,$bb,$00
.byte $30,$b3,$bb,$bb,$bb
.byte $00,$30,$b3,$b0,$00
.byte $30,$b3,$bb,$bb,$b0
.byte $33,$bb,$bb,$bb,$bb
.byte $33,$bb,$bb,$bb,$bb
.byte $03,$bb,$bb,$bb,$0b
.byte $00,$33,$3b,$3b,$00
sphere3:
.byte $5,$5
.byte $00,$30,$b3,$bb,$00
.byte $30,$b3,$bb,$bb,$bb
.byte $33,$bb,$bb,$bb,$bb
.byte $03,$bb,$bb,$bb,$0b
.byte $00,$33,$3b,$3b,$00
.byte $00,$30,$bb,$b0,$00
.byte $30,$bb,$bb,$bb,$b0
.byte $33,$3b,$bb,$bb,$bb
.byte $33,$33,$3b,$bb,$bb
.byte $00,$33,$33,$3b,$00
sphere4:
.byte $5,$5
.byte $00,$b0,$bb,$bb,$00
.byte $00,$b0,$bb,$b0,$00
.byte $30,$bb,$bb,$bb,$b0
.byte $33,$33,$3b,$bb,$bb
.byte $03,$33,$33,$33,$0b
.byte $33,$33,$33,$33,$3b
.byte $00,$33,$33,$33,$00
sphere5:
@ -105,23 +105,31 @@ sphere5:
.byte $00,$b0,$bb,$b0,$00
.byte $30,$bb,$bb,$bb,$30
.byte $33,$3b,$3b,$3b,$33
.byte $03,$33,$33,$33,$03
.byte $33,$33,$33,$33,$33
.byte $00,$33,$33,$33,$00
sphere6:
.byte $5,$5
.byte $00,$30,$bb,$bb,$00
.byte $00,$30,$bb,$b0,$00
.byte $30,$bb,$bb,$bb,$30
.byte $bb,$bb,$bb,$3b,$33
.byte $03,$3b,$33,$33,$33
.byte $33,$3b,$33,$33,$33
.byte $00,$33,$33,$33,$00
sphere7:
.byte $5,$5
.byte $00,$30,$bb,$b3,$30
.byte $b0,$bb,$bb,$bb,$33
.byte $00,$30,$bb,$b0,$00
.byte $b0,$bb,$bb,$bb,$30
.byte $bb,$bb,$bb,$bb,$33
.byte $0b,$bb,$bb,$3b,$33
.byte $bb,$bb,$bb,$3b,$33
.byte $00,$33,$33,$33,$00
sphere_shadow1:
.byte $5,$1
.byte $00,$a0,$a0,$a0,$00
sphere_shadow2:
.byte $5,$1
.byte $00,$00,$a0,$00,$00

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB