diff --git a/demos/driven/part20_credits/hgr_sprite.s b/demos/driven/hgr_sprite.s similarity index 100% rename from demos/driven/part20_credits/hgr_sprite.s rename to demos/driven/hgr_sprite.s diff --git a/demos/driven/part00_intro/Makefile b/demos/driven/part00_intro/Makefile index 3fed3a30..4556b46c 100644 --- a/demos/driven/part00_intro/Makefile +++ b/demos/driven/part00_intro/Makefile @@ -19,7 +19,8 @@ intro.o: intro.s \ ../zp.inc ../hardware.inc ../qload.inc \ erase.s \ graphics/logo_frame01.hgr.zx02 \ - graphics/logo_frame46.hgr.zx02 + graphics/logo_frame46.hgr.zx02 \ + graphics/d_sprites.inc ca65 -o intro.o intro.s -l intro.lst ### @@ -27,6 +28,9 @@ intro.o: intro.s \ graphics/logo_frame01.hgr.zx02: cd graphics && make +graphics/d_sprites.inc: + cd graphics && make + ### diff --git a/demos/driven/part00_intro/graphics/Makefile b/demos/driven/part00_intro/graphics/Makefile index db109663..c4cddbe0 100644 --- a/demos/driven/part00_intro/graphics/Makefile +++ b/demos/driven/part00_intro/graphics/Makefile @@ -3,8 +3,26 @@ include ../../../../Makefile.inc ZX02 = ~/research/6502_compression/zx02.git/build/zx02 PNG_TO_HGR = ../../../../utils/hgr-utils/png2hgr PNG2GR = ../../../../utils/gr-utils/png2gr +HGR_SPRITE = ../../../../utils/hgr-utils/hgr_make_sprite -all: desire.hgr.zx02 logo_frame01.hgr.zx02 logo_frame46.hgr.zx02 +all: desire.hgr.zx02 logo_frame01.hgr.zx02 logo_frame46.hgr.zx02 \ + d_sprites.inc + + +#### + +d_sprites.inc: logo_frame11.png logo_frame12.png logo_frame13.png \ + logo_frame14.png logo_frame15.png logo_frame16.png \ + logo_frame17.png logo_frame18.png logo_frame19.png + $(HGR_SPRITE) -s -l d11_sprite logo_frame11.png 70 55 125 109 > d_sprites.inc + $(HGR_SPRITE) -s -l d12_sprite logo_frame12.png 70 55 125 109 >> d_sprites.inc + $(HGR_SPRITE) -s -l d13_sprite logo_frame13.png 70 55 125 109 >> d_sprites.inc + $(HGR_SPRITE) -s -l d14_sprite logo_frame14.png 56 55 125 109 >> d_sprites.inc + $(HGR_SPRITE) -s -l d15_sprite logo_frame15.png 56 56 125 109 >> d_sprites.inc + $(HGR_SPRITE) -s -l d16_sprite logo_frame16.png 42 56 125 109 >> d_sprites.inc + $(HGR_SPRITE) -s -l d17_sprite logo_frame17.png 42 56 111 107 >> d_sprites.inc + $(HGR_SPRITE) -s -l d18_sprite logo_frame18.png 42 56 98 107 >> d_sprites.inc + $(HGR_SPRITE) -s -l d19_sprite logo_frame19.png 28 56 98 108 >> d_sprites.inc #### @@ -34,4 +52,4 @@ desire.hgr.zx02: desire.hgr #### clean: - rm -f *~ *.zx02 *.hgr + rm -f *~ *.zx02 *.hgr *.inc diff --git a/demos/driven/part00_intro/graphics/logo_frame11.png b/demos/driven/part00_intro/graphics/logo_frame11.png index 26efccd8..6f20ff67 100644 Binary files a/demos/driven/part00_intro/graphics/logo_frame11.png and b/demos/driven/part00_intro/graphics/logo_frame11.png differ diff --git a/demos/driven/part00_intro/graphics/logo_frame12.png b/demos/driven/part00_intro/graphics/logo_frame12.png index 8e4f583c..5288ae8f 100644 Binary files a/demos/driven/part00_intro/graphics/logo_frame12.png and b/demos/driven/part00_intro/graphics/logo_frame12.png differ diff --git a/demos/driven/part00_intro/graphics/logo_frame13.png b/demos/driven/part00_intro/graphics/logo_frame13.png index a7141b8c..c7f5b96b 100644 Binary files a/demos/driven/part00_intro/graphics/logo_frame13.png and b/demos/driven/part00_intro/graphics/logo_frame13.png differ diff --git a/demos/driven/part00_intro/graphics/logo_frame14.png b/demos/driven/part00_intro/graphics/logo_frame14.png index 9e44921d..7351f22d 100644 Binary files a/demos/driven/part00_intro/graphics/logo_frame14.png and b/demos/driven/part00_intro/graphics/logo_frame14.png differ diff --git a/demos/driven/part00_intro/graphics/logo_frame15.png b/demos/driven/part00_intro/graphics/logo_frame15.png index 2cdbaee8..349ab8f0 100644 Binary files a/demos/driven/part00_intro/graphics/logo_frame15.png and b/demos/driven/part00_intro/graphics/logo_frame15.png differ diff --git a/demos/driven/part00_intro/graphics/logo_frame16.png b/demos/driven/part00_intro/graphics/logo_frame16.png index c6e03889..7326d108 100644 Binary files a/demos/driven/part00_intro/graphics/logo_frame16.png and b/demos/driven/part00_intro/graphics/logo_frame16.png differ diff --git a/demos/driven/part00_intro/graphics/logo_frame17.png b/demos/driven/part00_intro/graphics/logo_frame17.png index d42a72e2..0f99cb23 100644 Binary files a/demos/driven/part00_intro/graphics/logo_frame17.png and b/demos/driven/part00_intro/graphics/logo_frame17.png differ diff --git a/demos/driven/part00_intro/graphics/logo_frame18.png b/demos/driven/part00_intro/graphics/logo_frame18.png index 3654cb5a..5078d4fd 100644 Binary files a/demos/driven/part00_intro/graphics/logo_frame18.png and b/demos/driven/part00_intro/graphics/logo_frame18.png differ diff --git a/demos/driven/part00_intro/graphics/logo_frame19.png b/demos/driven/part00_intro/graphics/logo_frame19.png index d9f1949e..842ada07 100644 Binary files a/demos/driven/part00_intro/graphics/logo_frame19.png and b/demos/driven/part00_intro/graphics/logo_frame19.png differ diff --git a/demos/driven/part00_intro/intro.s b/demos/driven/part00_intro/intro.s index 70bef0a7..2788d73f 100644 --- a/demos/driven/part00_intro/intro.s +++ b/demos/driven/part00_intro/intro.s @@ -58,8 +58,39 @@ load_loop: jsr erase_frame + ;============================== + ; rotate D into place + ;============================== + + lda #0 + sta X_OFFSET + + + +d_rotate_loop: + ldx X_OFFSET + + lda d_sprite_x,X + sta CURSOR_X + + lda d_sprite_y,X + sta CURSOR_Y + + lda d_sprite_l,X + sta INL + lda d_sprite_h,X + sta INH + + jsr hgr_draw_sprite + jsr wait_until_keypress + inc X_OFFSET + lda X_OFFSET + cmp #13 + bne d_rotate_loop + + ;============================== ; gradually load in final logo ;============================== @@ -247,3 +278,24 @@ masks_reverse: .include "erase.s" .include "../wait_keypress.s" + +.include "graphics/d_sprites.inc" + +.include "../hgr_sprite.s" + +d_sprite_h: + .byte >d11_sprite,>d12_sprite,>d13_sprite + .byte >d14_sprite,>d15_sprite,>d16_sprite + .byte >d17_sprite,>d18_sprite,>d19_sprite +d_sprite_l: + .byte