From 6552127256c1b41b6671b6048b34acea4ad166b1 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 10 Mar 2024 01:26:40 -0500 Subject: [PATCH] duke: autogen sprites --- games/duke/Makefile | 9 ++++--- games/duke/duke_level1.s | 2 +- games/duke/{ => old}/duke_sprites.inc | 0 games/duke/sprites/Makefile | 34 ++++++++++++++++++++++++++ games/duke/sprites/duke_sprites.png | Bin 0 -> 777 bytes 5 files changed, 41 insertions(+), 4 deletions(-) rename games/duke/{ => old}/duke_sprites.inc (100%) create mode 100644 games/duke/sprites/Makefile create mode 100644 games/duke/sprites/duke_sprites.png diff --git a/games/duke/Makefile b/games/duke/Makefile index 8104cc2c..7fa47b4c 100644 --- a/games/duke/Makefile +++ b/games/duke/Makefile @@ -48,7 +48,7 @@ DUKE_LEVEL1: duke_level1.o duke_level1.o: duke_level1.s zp.inc hardware.inc \ print_help.s gr_fast_clear.s quit_yn.s text_drawbox.s level_end.s \ enemies_level1.s actions_level1.s item_level1.s \ - graphics/duke_graphics.inc duke_l2_sprites.inc \ + graphics/duke_graphics.inc sprites/duke_sprites.inc \ maps/level1_map.lzsa \ status_bar.s draw_duke.s move_duke.s gr_putsprite_crop.s \ draw_tilemap.s \ @@ -64,7 +64,7 @@ DUKE_LEVEL2: duke_level2.o duke_level2.o: duke_level2.s zp.inc hardware.inc \ print_help.s gr_fast_clear.s quit_yn.s text_drawbox.s level_end.s \ enemies_level2.s actions_level2.s item_level2.s \ - graphics/duke_graphics.inc duke_sprites.inc \ + graphics/duke_graphics.inc sprites/duke_sprites.inc \ maps/level2_map.lzsa \ status_bar.s draw_duke.s move_duke.s gr_putsprite_crop.s \ draw_tilemap.s \ @@ -75,6 +75,9 @@ duke_level2.o: duke_level2.s zp.inc hardware.inc \ #### +sprites/duke_sprites.inc: + cd sprites && make + graphics/duke_graphics.inc: cd graphics && make @@ -91,4 +94,4 @@ clean: cd graphics && make clean cd maps && make clean cd title && make clean - + cd sprites && make clean diff --git a/games/duke/duke_level1.s b/games/duke/duke_level1.s index 24703938..a2912248 100644 --- a/games/duke/duke_level1.s +++ b/games/duke/duke_level1.s @@ -224,7 +224,7 @@ done_with_duke: .include "level_end.s" .include "draw_duke.s" - .include "duke_sprites.inc" + .include "sprites/duke_sprites.inc" .include "move_duke.s" .include "handle_laser.s" .include "draw_tilemap.s" diff --git a/games/duke/duke_sprites.inc b/games/duke/old/duke_sprites.inc similarity index 100% rename from games/duke/duke_sprites.inc rename to games/duke/old/duke_sprites.inc diff --git a/games/duke/sprites/Makefile b/games/duke/sprites/Makefile new file mode 100644 index 00000000..895c0726 --- /dev/null +++ b/games/duke/sprites/Makefile @@ -0,0 +1,34 @@ +include ../../../Makefile.inc + +ZX02 = ~/research/6502_compression/zx02.git/build/zx02 -f +PNG_TO_HGR = ../../../utils/hgr-utils/png2hgr +LINKER_SCRIPTS = ../../../linker_scripts +DOS33 = ../../../utils/dos33fs-utils/dos33 +EMPTY_DISK = ../../../empty_disk/empty.dsk +TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft +PNG2GR = ../../../utils/gr-utils/png2gr +PNG2SPRITES = ../../../utils/gr-utils/png2sprites +HGR_SPRITE = ../../../utils/hgr-utils/hgr_make_sprite + +all: duke_sprites.inc + +#### + +duke_sprites.inc: duke_sprites.png + $(PNG2SPRITES) duke_sprites.png duke_sprite_stand_right 1 2 4 8 > duke_sprites.inc + $(PNG2SPRITES) duke_sprites.png duke_sprite_stand_left 6 2 4 8 >> duke_sprites.inc + $(PNG2SPRITES) duke_sprites.png duke_sprite_walking_right 1 12 4 8 >> duke_sprites.inc + $(PNG2SPRITES) duke_sprites.png duke_sprite_walking_left 6 12 4 8 >> duke_sprites.inc + $(PNG2SPRITES) duke_sprites.png duke_sprite_jumping_right 1 22 4 8 >> duke_sprites.inc + $(PNG2SPRITES) duke_sprites.png duke_sprite_jumping_left 6 22 4 8 >> duke_sprites.inc + $(PNG2SPRITES) duke_sprites.png duke_sprite_falling_right 1 32 4 8 >> duke_sprites.inc + $(PNG2SPRITES) duke_sprites.png duke_sprite_falling_left 6 32 4 8 >> duke_sprites.inc + $(PNG2SPRITES) duke_sprites.png duke_sprite_shooting_right 11 2 4 8 >> duke_sprites.inc + $(PNG2SPRITES) duke_sprites.png duke_sprite_shooting_left 16 2 4 8 >> duke_sprites.inc + + +#### + +clean: + rm -f *~ *.o *.lst duke_sprites.inc + diff --git a/games/duke/sprites/duke_sprites.png b/games/duke/sprites/duke_sprites.png new file mode 100644 index 0000000000000000000000000000000000000000..15ca39e5e8323d2d6f16581b0a79260b85e3163b GIT binary patch literal 777 zcmV+k1NQuhP)EX>4Tx04R}tkv&MmKpe$iQ^gM|4$UCq5TrWUMMWHI6^c-y)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfc5qU3krMxx6k5c1aNLh~_a1le0HIM~n$;BpG~G7S ziMW)_tx7$w2%-;Rh!~ZbWz3~gN%)Shdj$A;7v)+0=l&c6YTjZ%Kq8JY!?cMvh-Wr! zgY!PI$V#$Gd`>)J(glehxvqHp#<}RSz%xZNlb$CQiKSu(D;>;ArbawX98oo$@`bF& zD(5ZETBXKX_v9}O<@J?iuG1Vr0*hEe3KA65P(}qdqO|IySV+@;+{Zuc`cvdm$W;a- z#{#O*AiI9>Klt6PRhXLel0tEy`^9lS#(oSYQT z{m{ezU~&WhYCN5to&TWF6!kpN-Hmep(EtDc0001;kA{E%000SaNLh0L01FcU01FcV z0GgZ_00007bV*G`2j~L|1`0K{5BcB#000?uMObu0Z*6U5Zgc=ca%Ew3Wn>_CX>@2H zM@dakSAh-}0002ANklnr04Gp95FcKf3+Nc)LBMIs z9ZZQ)Aa-TIJ=p4p0jDX`l#7_+cxin%rM$FmVM?t{;3a@hjx{SmVZaNT00000NkvXX Hu0mjfE1^_2 literal 0 HcmV?d00001