From 9fc6a83daff6e2772e05b604346c6a037a10188f Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 17 Mar 2018 01:02:19 -0400 Subject: [PATCH] mode7: add some more ship sprites --- mode7_demo/sprites.inc | 10 +++++++++ mode7_demo/starfield_demo.s | 43 +++++++++++++++++++++++------------- tfv/sprites.png | Bin 2472 -> 2566 bytes 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/mode7_demo/sprites.inc b/mode7_demo/sprites.inc index b1290faa..25130a3f 100644 --- a/mode7_demo/sprites.inc +++ b/mode7_demo/sprites.inc @@ -57,6 +57,16 @@ ship_left: .byte $00,$00,$77,$f2,$d9,$dd,$00,$00,$00 .byte $00,$70,$ff,$0f,$00,$00,$00,$00,$00 +ship_small: + .byte $5,$3 + .byte $00,$00,$ff,$00,$00 + .byte $00,$76,$2f,$76,$00 + .byte $0f,$0f,$d9,$0f,$0f + +ship_tiny: + .byte $3,$1 + .byte $f0,$9f,$f0 + sphere_offset: .byte 0,27,54,81, 108,135,162,189 diff --git a/mode7_demo/starfield_demo.s b/mode7_demo/starfield_demo.s index 9a4ed755..2156de4f 100644 --- a/mode7_demo/starfield_demo.s +++ b/mode7_demo/starfield_demo.s @@ -6,16 +6,18 @@ NUMSTARS EQU 16 -; State Number Length Speed BGColor CLS -; =========== ====== ====== ===== ======= === -; Ship at rest 0 64 0 black 1 -; Flash 1 8 3 blue 1 -; Moving stars 2 64 5 black 1 -; Crazy stars 3 64 5 black 0 -; Ship moves off 4 64 5 black 1 -; Shrinking line 5 64 5 black 1 -; Back to stars 6 256 5 black 1 -; Done 7 +; State Number Speed BGColor CLS +; =========== ====== ===== ======= === +; Ship at rest 0 64 black 1 +; Flash 1 8 blue 1 +; Moving stars 2 128 black 1 +; Crazy stars 3 64 black 0 +; Ship moves off 1 4 16 black 1 +; Ship moves off 2 5 16 black 1 +; Ship moves off 3 6 16 black 1 +; Shrinking line 7 20 black 1 +; Back to stars 8 256 black 1 +; Done 9 ;===================== ;===================== @@ -45,6 +47,8 @@ starfield_demo: ; always multiply with low byte as zero sta NUM2L ; 3 sta FRAME_COUNT + + lda #64 sta SPEED ldy #(NUMSTARS-1) ; 2 @@ -112,9 +116,8 @@ no_clear: jsr page_flip ; 6 - inc FRAME_COUNT - lda FRAME_COUNT - cmp #$ff + dec SPEED + lda SPEED beq done_stars @@ -126,12 +129,17 @@ near_loop: done_stars: inc STATE - lda STATE - cmp #$5 + ldx STATE + lda speed_table,X + sta SPEED + + cpx #$7 bne near_loop rts +speed_table: + .byte 64,8,128,64,64,64,255 ;===================== @@ -387,6 +395,9 @@ plot_star_continue: ;============================= ; Move stars move_stars: + lda STATE + beq done_move_stars + ldy #(NUMSTARS-1) ; 2 move_stars_loop: ; increment z @@ -403,6 +414,8 @@ move_loop_skip: dey ; 2 bpl move_stars_loop ; 2nt/3 +done_move_stars: + rts diff --git a/tfv/sprites.png b/tfv/sprites.png index 6474a5fd84bdb4a3d07772ee599200e5c5bfb41d..7d7169c0d4dda6dad9889079254a2a14f1ed8cfa 100644 GIT binary patch delta 2468 zcmXApX*iVo!+?L!j2Sb=G?pQhF;wmdp;JrCI;St2BilRZl) z(uA=^andGhLXxE#TZ^UfKkxP4AMfkBzuqO1G1TO61S^h%G^Lz6tNPZ=$uY>KTWICfqpf==8M#dqbj$<#d}=_ya|j#cHalQl(U3J3jL96-ubt|FBK+fP8Xx^DfCz{H@|T95!z+SntI)T?jLtjk!R&KLU-J08NQh; z50>j5C1C9xH6_Pao)$H{MFI@-@<@ke^sTwb>X%N+{sU`*3~Rj@h6B*?b>eA-vwenL zN3sZFXD!hsJ&aCyXsx&tPGs!86vUZL70Ed@n0gCJr&(>~CE1Zc&(C9uw}6?$VMZlslI@QpV%e(F6joM1 z8MyKV=sn!I`^IP7m;n;ep8X|=Ju|TA!!V23ZLq-tR@B9(@4en9F@t~()Wx3zV@Bi|cImpTIx6n}5Hz762O<~@uW`9N{yx4HNb zGf0#(;z0(b6{Qu#1K?pvam|ZdVblPp{WypG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