From 5fd5bee1ebdcb674faf5a3bfa823bc36806efdb1 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sat, 15 Dec 2018 22:47:11 -0500 Subject: [PATCH] xmas2018: add candle flame --- xmas_2018/Makefile | 2 +- xmas_2018/sprites.inc | 41 +++++++++++++++++++++++++++++++++++++++++ xmas_2018/wreath.s | 26 ++++++++++++++++++++++---- 3 files changed, 64 insertions(+), 5 deletions(-) create mode 100644 xmas_2018/sprites.inc diff --git a/xmas_2018/Makefile b/xmas_2018/Makefile index 61ebe382..e8507b96 100644 --- a/xmas_2018/Makefile +++ b/xmas_2018/Makefile @@ -26,7 +26,7 @@ xmas2018.o: xmas2018.s \ zp.inc hardware.inc \ vapor_lock.s delay_a.s wait_keypress.s \ play_music.s mockingboard.s rts.s \ - wreath.s wreath.img.lz4 \ + wreath.s wreath.img.lz4 sprites.inc \ ball.s ball.img.lz4 \ merry.s merry.img.lz4 ca65 -o xmas2018.o xmas2018.s -l xmas2018.lst diff --git a/xmas_2018/sprites.inc b/xmas_2018/sprites.inc new file mode 100644 index 00000000..e983b250 --- /dev/null +++ b/xmas_2018/sprites.inc @@ -0,0 +1,41 @@ +wide_flame0: + .byte $2,$3 + .byte $dd,$dd + .byte $dd,$dd + .byte $dd,$dd + ; 00=0 0X=0 X0=0 XX=6 + ; = 33 + Y*(52)+ [30A + 64B + 69C + 54D]-Y + ; = 33 + 3*52 + 30*0 + 64*0 + 69*0 + 54*6 - 3 + ; = 510 + +wide_flame1: + .byte $2,$3 + .byte $dd,$dd + .byte $dd,$dd + .byte $dd,$dd + ; 00=0 0X=0 X0=0 XX=6 + ; = 33 + Y*(52)+ [30A + 64B + 69C + 54D]-Y + ; = 33 + 3*52 + 30*0 + 64*0 + 69*0 + 54*6 - 3 + ; = 510 + +wide_flame2: + .byte $2,$3 + .byte $dd,$dd + .byte $dd,$dd + .byte $dd,$dd + ; 00=0 0X=0 X0=0 XX=6 + ; = 33 + Y*(52)+ [30A + 64B + 69C + 54D]-Y + ; = 33 + 3*52 + 30*0 + 64*0 + 69*0 + 54*6 - 3 + ; = 510 + +wide_flame3: + .byte $2,$3 + .byte $dd,$dd + .byte $dd,$dd + .byte $dd,$dd + ; 00=0 0X=0 X0=0 XX=6 + ; = 33 + Y*(52)+ [30A + 64B + 69C + 54D]-Y + ; = 33 + 3*52 + 30*0 + 64*0 + 69*0 + 54*6 - 3 + ; = 510 + + diff --git a/xmas_2018/wreath.s b/xmas_2018/wreath.s index 6f20e386..34dd9273 100644 --- a/xmas_2018/wreath.s +++ b/xmas_2018/wreath.s @@ -136,19 +136,36 @@ wrloopF:dex ; 2 ; do_nothing should be 4550 ; play music 1023 + ; sprite 536 ; -10 keypress ; =========== - ; 3517 + ; 2981 jsr play_music ; 6+1017 - ; Try X=116 Y=6 cycles=3517 + ;======================== + ; draw sprites + ;======================== + lda #>wide_flame0 ; 2 + sta INH ; 3 + lda #