From d6412c531a06275b752c03ba56208e3ee86a7bf2 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Tue, 3 Sep 2024 01:04:44 -0400 Subject: [PATCH] cliff: working on compressed sprites --- games/peasant_mini/cliff/Makefile | 17 ++++- games/peasant_mini/cliff/NOTES | 8 ++ games/peasant_mini/cliff/walking_sprites.s | 88 ++++++++++++++++++++++ 3 files changed, 111 insertions(+), 2 deletions(-) create mode 100644 games/peasant_mini/cliff/NOTES create mode 100644 games/peasant_mini/cliff/walking_sprites.s diff --git a/games/peasant_mini/cliff/Makefile b/games/peasant_mini/cliff/Makefile index 82ef684e..c296fa95 100644 --- a/games/peasant_mini/cliff/Makefile +++ b/games/peasant_mini/cliff/Makefile @@ -22,6 +22,7 @@ cliff.dsk: HELLO CLIFF HELLO: hello.bas $(TOKENIZE) < hello.bas > HELLO + #### CLIFF: cliff.o @@ -36,8 +37,20 @@ cliff.o: cliff.s zx02_optim.s \ sprites/enemy_sprites.inc \ sprites/walk_sprites.inc \ sprites/flame_sprites.inc \ - zp.inc hardware.inc + zp.inc hardware.inc \ + walking_sprites.zx02 ca65 -o cliff.o cliff.s -l cliff.lst +#### + +walking_sprites.zx02: walking_sprites + $(ZX02) -f walking_sprites walking_sprites.zx02 + +walking_sprites: walking_sprites.o + ld65 -o walking_sprites walking_sprites.o -C $(LINKER_SCRIPTS)/apple2_a000.inc + +walking_sprites.o: walking_sprites.s sprites/walk_sprites.inc + ca65 -o walking_sprites.o walking_sprites.s -l walking_sprites.lst + #### @@ -51,6 +64,6 @@ sprites/enemy_sprites.inc: #### clean: - rm -f *.lst *.o CLIFF HELLO + rm -f *.lst *.o CLIFF HELLO walking_sprites *.zx02 cd cliff_graphics && make clean cd sprites && make clean diff --git a/games/peasant_mini/cliff/NOTES b/games/peasant_mini/cliff/NOTES new file mode 100644 index 00000000..b8122b73 --- /dev/null +++ b/games/peasant_mini/cliff/NOTES @@ -0,0 +1,8 @@ + + + +$2000-$3FFF = saved bg +$4000-$5FFF = HGR2 display +$6000-$9FFF = code (16k) +$A000-$B000 = sprite data (4k) +$B000-$BFFF = lookup tables and such diff --git a/games/peasant_mini/cliff/walking_sprites.s b/games/peasant_mini/cliff/walking_sprites.s new file mode 100644 index 00000000..2ef26a00 --- /dev/null +++ b/games/peasant_mini/cliff/walking_sprites.s @@ -0,0 +1,88 @@ + + +walk_sprites_xsize: + .byte 2, 2, 2, 2, 2, 2 ; right ; 0 + .byte 2, 2, 2, 2, 2, 2 ; left ; 6 + .byte 2, 2, 2, 2, 2, 2 ; up ; 12 + .byte 2, 2, 2, 2, 2, 2 ; down ; 18 +flame_sprites_xsize: + .byte 2, 2, 2 ; right ; 24 + .byte 2, 2, 2 ; left ; 27 + .byte 2, 2, 2 ; up ; 30 + .byte 2, 2, 2 ; down ; 33 + + +walk_sprites_ysize: + .byte 30, 30, 30, 30, 30, 30 ; right + .byte 30, 30, 30, 30, 30, 30 ; left + .byte 30, 30, 30, 30, 30, 30 ; up + .byte 30, 30, 30, 30, 30, 30 ; down +flame_sprites_ysize: + .byte 9, 9, 9 ; right + .byte 9, 9, 9 ; left + .byte 9, 9, 9 ; up + .byte 9, 9, 9 ; down + +walk_sprites_data_l: + .byte walk_r0_sprite,>walk_r1_sprite,>walk_r2_sprite + .byte >walk_r3_sprite,>walk_r4_sprite,>walk_r5_sprite + .byte >walk_l0_sprite,>walk_l1_sprite,>walk_l2_sprite + .byte >walk_l3_sprite,>walk_l4_sprite,>walk_l5_sprite + .byte >walk_u0_sprite,>walk_u1_sprite,>walk_u2_sprite + .byte >walk_u3_sprite,>walk_u4_sprite,>walk_u5_sprite + .byte >walk_d0_sprite,>walk_d1_sprite,>walk_d2_sprite + .byte >walk_d3_sprite,>walk_d4_sprite,>walk_d5_sprite +flame_sprites_data_h: + .byte >flame_r0_sprite,>flame_r1_sprite,>flame_r2_sprite + .byte >flame_l0_sprite,>flame_l1_sprite,>flame_l2_sprite + .byte >flame_u0_sprite,>flame_u1_sprite,>flame_u2_sprite + .byte >flame_d0_sprite,>flame_d1_sprite,>flame_d2_sprite + +walk_mask_data_l: + .byte walk_r0_mask,>walk_r1_mask,>walk_r2_mask + .byte >walk_r3_mask,>walk_r4_mask,>walk_r5_mask + .byte >walk_l0_mask,>walk_l1_mask,>walk_l2_mask + .byte >walk_l3_mask,>walk_l4_mask,>walk_l5_mask + .byte >walk_u0_mask,>walk_u1_mask,>walk_u2_mask + .byte >walk_u3_mask,>walk_u4_mask,>walk_u5_mask + .byte >walk_d0_mask,>walk_d1_mask,>walk_d2_mask + .byte >walk_d3_mask,>walk_d4_mask,>walk_d5_mask +flame_mask_data_h: + .byte >flame_r0_mask,>flame_r1_mask,>flame_r2_mask + .byte >flame_l0_mask,>flame_r1_mask,>flame_l2_mask + .byte >flame_u0_mask,>flame_u1_mask,>flame_u2_mask + .byte >flame_d0_mask,>flame_d1_mask,>flame_d2_mask + + .include "sprites/walk_sprites.inc" + + .include "sprites/flame_sprites.inc"