diff --git a/028.game2/Makefile b/028.game2/Makefile index db79c5b..745e852 100644 --- a/028.game2/Makefile +++ b/028.game2/Makefile @@ -25,12 +25,10 @@ IMAGES=foreground.png \ sprite_pig_up_jump.png \ sprite_pig_down_jump.png \ sprite_pig_right_jump.png \ - sprite_coin1.png \ - sprite_coin2.png \ - sprite_coin3.png \ - sprite_coin4.png \ - sprite_coin6.png \ - sprite_coin7.png \ + sprite_coin-0.png \ + sprite_coin-1.png \ + sprite_coin-2.png \ + sprite_coin-3.png\ font8x8.png IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin)) @@ -42,10 +40,10 @@ LINKER_OPTIONS=-T link.script.x include ../shared/base.mk -out/%.bin: out/%.sized.png - $(IMAGECON) --input $< $(IMAGECON_ARGS) --quantize --colors $(NUM_COLORS) --output-bitplanes --output-palette-asm --output-grey-palette --output-palette $(DITHER) --output out/$* +#out/%.bin: out/%.sized.png +# $(IMAGECON) --input $< $(IMAGECON_ARGS) --quantize --colors $(NUM_COLORS) --output-bitplanes --output-palette-asm --output-grey-palette --output-palette $(DITHER) --output out/$* -out/foreground.bin: assets/foregroundTilemap.png +out/foreground.bin: assets/foreground.png $(IMAGECON) --use-palette=assets/foreground.pal --input $< $(IMAGECON_ARGS) --colors $(NUM_COLORS) --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-grey-palette --output-palette --output-png --output-copperlist --output out/foreground sed -i '' "1s/.*/ dc.w COLOR00,\$$$(BACKGROUND_COLOR)/" out/foreground-copper-list.s sed -i '' "1s/.*/ dc.w \$$$(BACKGROUND_COLOR)/" out/foreground-palette-table.s @@ -63,9 +61,12 @@ out/mpanel.bin: assets/mpanel.png out/sprite_pig_%.bin: assets/sprite_pig_%.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 4 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output out/sprite_pig_$* --palette-offset 16 --use-palette=assets/pig.pal -out/sprite_coin%.bin: assets/sprite_coin%.png +out/sprite_coin%.bin: out/sprite_coin%.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --colors 4 --output-bitplanes --output-palette --full-color-palette-file --output-palette-asm --output-palette --output-png --output-copperlist --output out/sprite_coin$* --palette-offset 20 --use-palette=assets/coin.pal +out/sprite_coin%.png: assets/assets.png + ../tools/croppa/out/croppa --input=assets/assets.png --output=out/sprite_coin --width=16 --height=16 --rows=1 --cols=4 --dx=16 --dy=16 --x=128 --y=192 + out/font%.bin: assets/font%.png $(IMAGECON) --input $< $(IMAGECON_ARGS) --output-bitplanes --output-grey-palette-asm --output-palette-asm --output-palette --output out/font$* --colors=16 --use-palette assets/mpanel.pal --full-color-palette-file --output-mask --transparent-color=0,0,0 --output-png diff --git a/028.game2/assets/assets.png b/028.game2/assets/assets.png new file mode 100644 index 0000000..89d6b38 Binary files /dev/null and b/028.game2/assets/assets.png differ diff --git a/028.game2/assets/foreground.png b/028.game2/assets/foreground.png index e45df48..798d77b 100644 Binary files a/028.game2/assets/foreground.png and b/028.game2/assets/foreground.png differ diff --git a/028.game2/assets/foregroundTilemap.png b/028.game2/assets/foregroundTilemap.png deleted file mode 100644 index 798d77b..0000000 Binary files a/028.game2/assets/foregroundTilemap.png and /dev/null differ diff --git a/028.game2/assets/sprite_coin1.png b/028.game2/assets/sprite_coin1.png deleted file mode 100644 index a8e9833..0000000 Binary files a/028.game2/assets/sprite_coin1.png and /dev/null differ diff --git a/028.game2/assets/sprite_coin2.png b/028.game2/assets/sprite_coin2.png deleted file mode 100644 index 4e50698..0000000 Binary files a/028.game2/assets/sprite_coin2.png and /dev/null differ diff --git a/028.game2/assets/sprite_coin3.png b/028.game2/assets/sprite_coin3.png deleted file mode 100644 index ac294d9..0000000 Binary files a/028.game2/assets/sprite_coin3.png and /dev/null differ diff --git a/028.game2/assets/sprite_coin4.png b/028.game2/assets/sprite_coin4.png deleted file mode 100644 index c850b27..0000000 Binary files a/028.game2/assets/sprite_coin4.png and /dev/null differ diff --git a/028.game2/assets/sprite_coin6.png b/028.game2/assets/sprite_coin6.png deleted file mode 100644 index 1d266a0..0000000 Binary files a/028.game2/assets/sprite_coin6.png and /dev/null differ diff --git a/028.game2/assets/sprite_coin7.png b/028.game2/assets/sprite_coin7.png deleted file mode 100644 index 1be5a52..0000000 Binary files a/028.game2/assets/sprite_coin7.png and /dev/null differ diff --git a/028.game2/constants.i b/028.game2/constants.i index 0ca16d4..56ffc1c 100644 --- a/028.game2/constants.i +++ b/028.game2/constants.i @@ -18,16 +18,20 @@ FOREGROUND_PLAYAREA_RIGHT_MARGIN_BYTES equ 12 FOREGROUND_PLAYAREA_HEIGHT_WORDS equ 8 ITEM_SPRITE_HEIGHT equ 15 -ITEM_SPRITE_NUM_VERTICAL_SPRITES equ 8 +ITEM_SPRITE_NUM_VERTICAL_SPRITES equ 6 ITEM_SPRITE_BYTES equ (ITEM_SPRITE_NUM_VERTICAL_SPRITES*(64+4))+4 - +ITEM_SPRITE_VSTART equ 149 + ITEM_X equ 0 ITEM_LAGX equ 2 ITEM_Y equ 4 ITEM_LAGY equ 6 ITEM_YEND equ 8 ITEM_LAGYEND equ 10 -ITEM_INDEX equ 12 +ITEM_INDEX equ 12 +ITEM_STRUCT_SIZE equ 16 +ITEM_STRUCT_MULU_SHIFT equ 4 +ITEM_NUM_COIN_ANIMS equ 7 SCREEN_WIDTH equ 320 SCREEN_HEIGHT equ 256 diff --git a/028.game2/copperlist.s b/028.game2/copperlist.s deleted file mode 100644 index 861bad4..0000000 --- a/028.game2/copperlist.s +++ /dev/null @@ -1,516 +0,0 @@ - dc.w $2c07,$fffe - dc.w COLOR01,$7dd - dc.w $2d07,$fffe - dc.w COLOR01,$9ec - dc.w $2e07,$fffe - dc.w COLOR01,$beb - dc.w $2f07,$fffe - dc.w COLOR01,$ce9 - dc.w $3007,$fffe - dc.w COLOR01,$ed7 - dc.w $3107,$fffe - dc.w COLOR01,$eb5 - dc.w $3207,$fffe - dc.w COLOR01,$e93 - dc.w $3307,$fffe - dc.w COLOR01,$d71 - dc.w $3407,$fffe - dc.w COLOR01,$c50 - dc.w $3507,$fffe - dc.w COLOR01,$a30 - dc.w $3607,$fffe - dc.w COLOR01,$820 - dc.w $3707,$fffe - dc.w COLOR01,$611 - dc.w $3807,$fffe - dc.w COLOR01,$403 - dc.w $3907,$fffe - dc.w COLOR01,$204 - dc.w $3a07,$fffe - dc.w COLOR01,$116 - dc.w $3b07,$fffe - dc.w COLOR01,$029 - dc.w $3c07,$fffe - dc.w COLOR01,$04a - dc.w $3d07,$fffe - dc.w COLOR01,$16c - dc.w $3e07,$fffe - dc.w COLOR01,$28d - dc.w $3f07,$fffe - dc.w COLOR01,$3ae - dc.w $4007,$fffe - dc.w COLOR01,$5ce - dc.w $4107,$fffe - dc.w COLOR01,$7dd - dc.w $4207,$fffe - dc.w COLOR01,$9ec - dc.w $4307,$fffe - dc.w COLOR01,$beb - dc.w $4407,$fffe - dc.w COLOR01,$de9 - dc.w $4507,$fffe - dc.w COLOR01,$ed6 - dc.w $4607,$fffe - dc.w COLOR01,$eb4 - dc.w $4707,$fffe - dc.w COLOR01,$e93 - dc.w $4807,$fffe - dc.w COLOR01,$d71 - dc.w $4907,$fffe - dc.w COLOR01,$c50 - dc.w $4a07,$fffe - dc.w COLOR01,$a30 - dc.w $4b07,$fffe - dc.w COLOR01,$820 - dc.w $4c07,$fffe - dc.w COLOR01,$611 - dc.w $4d07,$fffe - dc.w COLOR01,$403 - dc.w $4e07,$fffe - dc.w COLOR01,$204 - dc.w $4f07,$fffe - dc.w COLOR01,$117 - dc.w $5007,$fffe - dc.w COLOR01,$029 - dc.w $5107,$fffe - dc.w COLOR01,$04b - dc.w $5207,$fffe - dc.w COLOR01,$16c - dc.w $5307,$fffe - dc.w COLOR01,$28d - dc.w $5407,$fffe - dc.w COLOR01,$3ae - dc.w $5507,$fffe - dc.w COLOR01,$5ce - dc.w $5607,$fffe - dc.w COLOR01,$7dd - dc.w $5707,$fffe - dc.w COLOR01,$9ec - dc.w $5807,$fffe - dc.w COLOR01,$bea - dc.w $5907,$fffe - dc.w COLOR01,$de8 - dc.w $5a07,$fffe - dc.w COLOR01,$ed6 - dc.w $5b07,$fffe - dc.w COLOR01,$eb4 - dc.w $5c07,$fffe - dc.w COLOR01,$e93 - dc.w $5d07,$fffe - dc.w COLOR01,$d71 - dc.w $5e07,$fffe - dc.w COLOR01,$c50 - dc.w $5f07,$fffe - dc.w COLOR01,$a30 - dc.w $6007,$fffe - dc.w COLOR01,$820 - dc.w $6107,$fffe - dc.w COLOR01,$601 - dc.w $6207,$fffe - dc.w COLOR01,$403 - dc.w $6307,$fffe - dc.w COLOR01,$205 - dc.w $6407,$fffe - dc.w COLOR01,$117 - dc.w $6507,$fffe - dc.w COLOR01,$029 - dc.w $6607,$fffe - dc.w COLOR01,$04b - dc.w $6707,$fffe - dc.w COLOR01,$16c - dc.w $6807,$fffe - dc.w COLOR01,$28d - dc.w $6907,$fffe - dc.w COLOR01,$3ae - dc.w $6a07,$fffe - dc.w COLOR01,$5ce - dc.w $6b07,$fffe - dc.w COLOR01,$7dd - dc.w $6c07,$fffe - dc.w COLOR01,$9ec - dc.w $6d07,$fffe - dc.w COLOR01,$bea - dc.w $6e07,$fffe - dc.w COLOR01,$de8 - dc.w $6f07,$fffe - dc.w COLOR01,$ec6 - dc.w $7007,$fffe - dc.w COLOR01,$eb4 - dc.w $7107,$fffe - dc.w COLOR01,$e92 - dc.w $7207,$fffe - dc.w COLOR01,$d71 - dc.w $7307,$fffe - dc.w COLOR01,$b50 - dc.w $7407,$fffe - dc.w COLOR01,$a30 - dc.w $7507,$fffe - dc.w COLOR01,$810 - dc.w $7607,$fffe - dc.w COLOR01,$601 - dc.w $7707,$fffe - dc.w COLOR01,$403 - dc.w $7807,$fffe - dc.w COLOR01,$205 - dc.w $7907,$fffe - dc.w COLOR01,$117 - dc.w $7a07,$fffe - dc.w COLOR01,$029 - dc.w $7b07,$fffe - dc.w COLOR01,$04b - dc.w $7c07,$fffe - dc.w COLOR01,$16c - dc.w $7d07,$fffe - dc.w COLOR01,$28d - dc.w $7e07,$fffe - dc.w COLOR01,$3ae - dc.w $7f07,$fffe - dc.w COLOR01,$5ce - dc.w $8007,$fffe - dc.w COLOR01,$7dd - dc.w $8107,$fffe - dc.w COLOR01,$aec - dc.w $8207,$fffe - dc.w COLOR01,$bea - dc.w $8307,$fffe - dc.w COLOR01,$dd8 - dc.w $8407,$fffe - dc.w COLOR01,$ec6 - dc.w $8507,$fffe - dc.w COLOR01,$eb4 - dc.w $8607,$fffe - dc.w COLOR01,$e92 - dc.w $8707,$fffe - dc.w COLOR01,$d71 - dc.w $8807,$fffe - dc.w COLOR01,$b50 - dc.w $8907,$fffe - dc.w COLOR01,$a30 - dc.w $8a07,$fffe - dc.w COLOR01,$810 - dc.w $8b07,$fffe - dc.w COLOR01,$501 - dc.w $8c07,$fffe - dc.w COLOR01,$303 - dc.w $8d07,$fffe - dc.w COLOR01,$205 - dc.w $8e07,$fffe - dc.w COLOR01,$117 - dc.w $8f07,$fffe - dc.w COLOR01,$029 - dc.w $9007,$fffe - dc.w COLOR01,$04b - dc.w $9107,$fffe - dc.w COLOR01,$16c - dc.w $9207,$fffe - dc.w COLOR01,$28d - dc.w $9307,$fffe - dc.w COLOR01,$4ae - dc.w $9407,$fffe - dc.w COLOR01,$6ce - dc.w $9507,$fffe - dc.w COLOR01,$8dd - dc.w $9607,$fffe - dc.w COLOR01,$aec - dc.w $9707,$fffe - dc.w COLOR01,$bea - dc.w $9807,$fffe - dc.w COLOR01,$dd8 - dc.w $9907,$fffe - dc.w COLOR01,$ec6 - dc.w $9a07,$fffe - dc.w COLOR01,$eb4 - dc.w $9b07,$fffe - dc.w COLOR01,$e92 - dc.w $9c07,$fffe - dc.w COLOR01,$d71 - dc.w $9d07,$fffe - dc.w COLOR01,$b50 - dc.w $9e07,$fffe - dc.w COLOR01,$930 - dc.w $9f07,$fffe - dc.w COLOR01,$710 - dc.w $a007,$fffe - dc.w COLOR01,$502 - dc.w $a107,$fffe - dc.w COLOR01,$303 - dc.w $a207,$fffe - dc.w COLOR01,$205 - dc.w $a307,$fffe - dc.w COLOR01,$117 - dc.w $a407,$fffe - dc.w COLOR01,$029 - dc.w $a507,$fffe - dc.w COLOR01,$04b - dc.w $a607,$fffe - dc.w COLOR01,$16c - dc.w $a707,$fffe - dc.w COLOR01,$28e - dc.w $a807,$fffe - dc.w COLOR01,$4ae - dc.w $a907,$fffe - dc.w COLOR01,$6ce - dc.w $aa07,$fffe - dc.w COLOR01,$8dd - dc.w $ab07,$fffe - dc.w COLOR01,$aec - dc.w $ac07,$fffe - dc.w COLOR01,$cea - dc.w $ad07,$fffe - dc.w COLOR01,$dd8 - dc.w $ae07,$fffe - dc.w COLOR01,$ec6 - dc.w $af07,$fffe - dc.w COLOR01,$eb4 - dc.w $b007,$fffe - dc.w COLOR01,$e92 - dc.w $b107,$fffe - dc.w COLOR01,$d71 - dc.w $b207,$fffe - dc.w COLOR01,$b50 - dc.w $b307,$fffe - dc.w COLOR01,$930 - dc.w $b407,$fffe - dc.w COLOR01,$711 - dc.w $b507,$fffe - dc.w COLOR01,$502 - dc.w $b607,$fffe - dc.w COLOR01,$303 - dc.w $b707,$fffe - dc.w COLOR01,$205 - dc.w $b807,$fffe - dc.w COLOR01,$117 - dc.w $b907,$fffe - dc.w COLOR01,$039 - dc.w $ba07,$fffe - dc.w COLOR01,$04b - dc.w $bb07,$fffe - dc.w COLOR01,$16d - dc.w $bc07,$fffe - dc.w COLOR01,$29e - dc.w $bd07,$fffe - dc.w COLOR01,$4ae - dc.w $be07,$fffe - dc.w COLOR01,$6ce - dc.w $bf07,$fffe - dc.w COLOR01,$8dd - dc.w $c007,$fffe - dc.w COLOR01,$aec - dc.w $c107,$fffe - dc.w COLOR01,$cea - dc.w $c207,$fffe - dc.w COLOR01,$dd8 - dc.w $c307,$fffe - dc.w COLOR01,$ec6 - dc.w $c407,$fffe - dc.w COLOR01,$eb4 - dc.w $c507,$fffe - dc.w COLOR01,$e92 - dc.w $c607,$fffe - dc.w COLOR01,$d61 - dc.w $c707,$fffe - dc.w COLOR01,$b40 - dc.w $c807,$fffe - dc.w COLOR01,$930 - dc.w $c907,$fffe - dc.w COLOR01,$711 - dc.w $ca07,$fffe - dc.w COLOR01,$502 - dc.w $cb07,$fffe - dc.w COLOR01,$303 - dc.w $cc07,$fffe - dc.w COLOR01,$205 - dc.w $cd07,$fffe - dc.w COLOR01,$117 - dc.w $ce07,$fffe - dc.w COLOR01,$039 - dc.w $cf07,$fffe - dc.w COLOR01,$04b - dc.w $d007,$fffe - dc.w COLOR01,$17d - dc.w $d107,$fffe - dc.w COLOR01,$29e - dc.w $d207,$fffe - dc.w COLOR01,$4be - dc.w $d307,$fffe - dc.w COLOR01,$6ce - dc.w $d407,$fffe - dc.w COLOR01,$8dd - dc.w $d507,$fffe - dc.w COLOR01,$aec - dc.w $d607,$fffe - dc.w COLOR01,$cea - dc.w $d707,$fffe - dc.w COLOR01,$dd8 - dc.w $d807,$fffe - dc.w COLOR01,$ec6 - dc.w $d907,$fffe - dc.w COLOR01,$ea4 - dc.w $da07,$fffe - dc.w COLOR01,$e82 - dc.w $db07,$fffe - dc.w COLOR01,$d61 - dc.w $dc07,$fffe - dc.w COLOR01,$b40 - dc.w $dd07,$fffe - dc.w COLOR01,$930 - dc.w $de07,$fffe - dc.w COLOR01,$711 - dc.w $df07,$fffe - dc.w COLOR01,$502 - dc.w $e007,$fffe - dc.w COLOR01,$303 - dc.w $e107,$fffe - dc.w COLOR01,$205 - dc.w $e207,$fffe - dc.w COLOR01,$017 - dc.w $e307,$fffe - dc.w COLOR01,$039 - dc.w $e407,$fffe - dc.w COLOR01,$05b - dc.w $e507,$fffe - dc.w COLOR01,$17d - dc.w $e607,$fffe - dc.w COLOR01,$29e - dc.w $e707,$fffe - dc.w COLOR01,$4be - dc.w $e807,$fffe - dc.w COLOR01,$6ce - dc.w $e907,$fffe - dc.w COLOR01,$8dd - dc.w $ea07,$fffe - dc.w COLOR01,$aeb - dc.w $eb07,$fffe - dc.w COLOR01,$cea - dc.w $ec07,$fffe - dc.w COLOR01,$dd8 - dc.w $ed07,$fffe - dc.w COLOR01,$ec6 - dc.w $ee07,$fffe - dc.w COLOR01,$ea4 - dc.w $ef07,$fffe - dc.w COLOR01,$d82 - dc.w $f007,$fffe - dc.w COLOR01,$c61 - dc.w $f107,$fffe - dc.w COLOR01,$b40 - dc.w $f207,$fffe - dc.w COLOR01,$920 - dc.w $f307,$fffe - dc.w COLOR01,$711 - dc.w $f407,$fffe - dc.w COLOR01,$502 - dc.w $f507,$fffe - dc.w COLOR01,$303 - dc.w $f607,$fffe - dc.w COLOR01,$105 - dc.w $f707,$fffe - dc.w COLOR01,$017 - dc.w $f807,$fffe - dc.w COLOR01,$03a - dc.w $f907,$fffe - dc.w COLOR01,$05b - dc.w $fa07,$fffe - dc.w COLOR01,$17d - dc.w $fb07,$fffe - dc.w COLOR01,$29e - dc.w $fc07,$fffe - dc.w COLOR01,$4be - dc.w $fd07,$fffe - dc.w COLOR01,$6ce - dc.w $fe07,$fffe - dc.w COLOR01,$8dd - dc.w $ff07,$fffe - dc.w COLOR01,$aeb -.verticalPositionWrapped: - dc.w $ffdf,$fffe - dc.w $7,$fffe - dc.w COLOR01,$cea - dc.w $107,$fffe - dc.w COLOR01,$dd8 - dc.w $207,$fffe - dc.w COLOR01,$ec5 - dc.w $307,$fffe - dc.w COLOR01,$ea3 - dc.w $407,$fffe - dc.w COLOR01,$d82 - dc.w $507,$fffe - dc.w COLOR01,$c61 - dc.w $607,$fffe - dc.w COLOR01,$b40 - dc.w $707,$fffe - dc.w COLOR01,$920 - dc.w $807,$fffe - dc.w COLOR01,$711 - dc.w $907,$fffe - dc.w COLOR01,$502 - dc.w $a07,$fffe - dc.w COLOR01,$304 - dc.w $b07,$fffe - dc.w COLOR01,$106 - dc.w $c07,$fffe - dc.w COLOR01,$018 - dc.w $d07,$fffe - dc.w COLOR01,$03a - dc.w $e07,$fffe - dc.w COLOR01,$05b - dc.w $f07,$fffe - dc.w COLOR01,$17d - dc.w $1007,$fffe - dc.w COLOR01,$29e - dc.w $1107,$fffe - dc.w COLOR01,$4be - dc.w $1207,$fffe - dc.w COLOR01,$6ce - dc.w $1307,$fffe - dc.w COLOR01,$8dd - dc.w $1407,$fffe - dc.w COLOR01,$aeb - dc.w $1507,$fffe - dc.w COLOR01,$ce9 - dc.w $1607,$fffe - dc.w COLOR01,$dd7 - dc.w $1707,$fffe - dc.w COLOR01,$ec5 - dc.w $1807,$fffe - dc.w COLOR01,$ea3 - dc.w $1907,$fffe - dc.w COLOR01,$d82 - dc.w $1a07,$fffe - dc.w COLOR01,$c61 - dc.w $1b07,$fffe - dc.w COLOR01,$b40 - dc.w $1c07,$fffe - dc.w COLOR01,$920 - dc.w $1d07,$fffe - dc.w COLOR01,$711 - dc.w $1e07,$fffe - dc.w COLOR01,$502 - dc.w $1f07,$fffe - dc.w COLOR01,$304 - dc.w $2007,$fffe - dc.w COLOR01,$106 - dc.w $2107,$fffe - dc.w COLOR01,$028 - dc.w $2207,$fffe - dc.w COLOR01,$03a - dc.w $2307,$fffe - dc.w COLOR01,$05c - dc.w $2407,$fffe - dc.w COLOR01,$17d - dc.w $2507,$fffe - dc.w COLOR01,$39e - dc.w $2607,$fffe - dc.w COLOR01,$4be - dc.w $2707,$fffe - dc.w COLOR01,$6ce - dc.w $2807,$fffe - dc.w COLOR01,$8ed - dc.w $2907,$fffe - dc.w COLOR01,$aeb - dc.w $2a07,$fffe - dc.w COLOR01,$ce9 - dc.w $2b07,$fffe - dc.w COLOR01,$dd7 - dc.w $2c07,$fffe - dc.w COLOR01,$000 diff --git a/028.game2/game1.s b/028.game2/game1.s index 8842b26..d36bb1b 100644 --- a/028.game2/game1.s +++ b/028.game2/game1.s @@ -493,7 +493,7 @@ playAreaCopperPalettePtr2: InstallSpriteColorPalette: include "out/sprite_pig_up-palette.s" - include "out/sprite_coin1-palette.s" + include "out/sprite_coin-1-palette.s" rts InstallColorPalette: diff --git a/028.game2/items.s b/028.game2/items.s index e601ea9..2e3869e 100644 --- a/028.game2/items.s +++ b/028.game2/items.s @@ -6,7 +6,7 @@ ScrollItemSprites: move.l #1,d0 - lsl.w #4,d0 ; multiply by 16 (item control structure size) + lsl.w #ITEM_STRUCT_MULU_SHIFT,d0 ; multiply by 16 (item control structure size) lea item1,a1 add.l d0,a1 @@ -18,14 +18,13 @@ SetupItemSpriteData: ;; d0 - item slot ;; d1 - sprite slot move.l #1,d0 - lsl.w #4,d0 ; multiply by 16 (item control structure size) + lsl.w #ITEM_STRUCT_MULU_SHIFT,d0 ; multiply by 16 (item control structure size) lea item1,a1 add.l d0,a1 move.l currentItemSprite,a0 - ;; add.l #64+4,a0 - cmp.w #13<<3,ITEM_INDEX(a1) + cmp.w #(ITEM_NUM_COIN_ANIMS-1)<<3,ITEM_INDEX(a1) ble .dontResetIndex move.l #0,ITEM_INDEX(a1) .dontResetIndex: @@ -39,6 +38,9 @@ SetupItemSpriteData: lsr.l #3,d0 mulu.w #ITEM_SPRITE_BYTES,d0 add.l d0,a0 + + add.l #1*(64+4),a0 + move.w ITEM_LAGX(a1),d0 lsr.w #FOREGROUND_SCROLL_SHIFT_CONVERT,d0 ; convert to pixels move.w ITEM_X(a1),ITEM_LAGX(a1) @@ -48,18 +50,22 @@ SetupItemSpriteData: move.b d1,3(a0) ;spriteControl lsr.l #1,d0 move.b d0,1(a0) ;spriteHStart + + if 0 move.w ITEM_LAGY(a1),d0 move.w ITEM_Y(a1),ITEM_LAGY(a1) move.b d0,(a0) ;spriteVStart move.w ITEM_LAGYEND(a1),d0 move.w ITEM_YEND(a1),ITEM_LAGYEND(a1) move.b d0,2(a0) ;spriteVStop + endif .c1: + sub.l #1*(64+4),a0 move.l a0,SPR2PTH(a6) - add.w #1,ITEM_INDEX(a1) + add.w #1,ITEM_INDEX(a1) rts RenderItemSprite: @@ -67,7 +73,7 @@ RenderItemSprite: movem.l d2-d3,-(sp) move.l #1,d0 - lsl.w #4,d0 ; multiply by 16 (item control structure size) + lsl.w #ITEM_STRUCT_MULU_SHIFT,d0 ; multiply by 16 (item control structure size) lea item1,a1 add.l d0,a1 @@ -106,18 +112,12 @@ currentItemSprite: ItemControl item7 ItemControl item8 - ItemSprite spriteCoin1,sprite_coin1.bin - ItemSprite spriteCoin1_1,sprite_coin1.bin - ItemSprite spriteCoin2,sprite_coin2.bin - ItemSprite spriteCoin3,sprite_coin3.bin - ItemSprite spriteCoin4,sprite_coin4.bin - ItemSprite spriteCoin5,sprite_coin3.bin - ItemSprite spriteCoin6,sprite_coin6.bin - ItemSprite spriteCoin7,sprite_coin7.bin - ItemSprite spriteCoin7_1,sprite_coin7.bin - ItemSprite spriteCoin8,sprite_coin6.bin - ItemSprite spriteCoin9,sprite_coin3.bin - ItemSprite spriteCoin10,sprite_coin4.bin - ItemSprite spriteCoin11,sprite_coin3.bin - ItemSprite spriteCoin12,sprite_coin2.bin + ItemSprite spriteCoin1,sprite_coin-0.bin + ItemSprite spriteCoin2,sprite_coin-0.bin + ItemSprite spriteCoin3,sprite_coin-1.bin + ItemSprite spriteCoin4,sprite_coin-2.bin + ItemSprite spriteCoin5,sprite_coin-3.bin + ItemSprite spriteCoin6,sprite_coin-2.bin + ItemSprite spriteCoin7,sprite_coin-1.bin + diff --git a/028.game2/macros.i b/028.game2/macros.i index 9c4d039..afa00f2 100644 --- a/028.game2/macros.i +++ b/028.game2/macros.i @@ -8,22 +8,36 @@ WaitBlitter: macro ItemSprite: macro \1: - dc.w 0,0 + dc.b ITEM_SPRITE_VSTART ; vstart + dc.b 64 ; hstart + dc.b ITEM_SPRITE_VSTART+ITEM_SPRITE_HEIGHT+1; vstop + dc.b 0 incbin "out/\2" - dc.w 0,0 + dc.b ITEM_SPRITE_VSTART+(16*2); vstart + dc.b 0 ; hstart + dc.b ITEM_SPRITE_VSTART+(16*2)+ITEM_SPRITE_HEIGHT; vstop + dc.b 0 incbin "out/\2" - dc.w 0,0 + dc.b ITEM_SPRITE_VSTART+(16*2); vstart + dc.b 0 ; hstart + dc.b ITEM_SPRITE_VSTART+(16*2)+ITEM_SPRITE_HEIGHT; vstop + dc.b 0 incbin "out/\2" - dc.w 0,0 + dc.b ITEM_SPRITE_VSTART+(16*3); vstart + dc.b 0 ; hstart + dc.b ITEM_SPRITE_VSTART+(16*3)+ITEM_SPRITE_HEIGHT; vstop + dc.b 0 incbin "out/\2" - dc.w 0,0 + dc.b ITEM_SPRITE_VSTART+(16*4); vstart + dc.b 0 ; hstart + dc.b ITEM_SPRITE_VSTART+(16*4)+ITEM_SPRITE_HEIGHT; vstop + dc.b 0 incbin "out/\2" - dc.w 0,0 + dc.b ITEM_SPRITE_VSTART+(16*5); vstart + dc.b 0 ; hstart + dc.b ITEM_SPRITE_VSTART+(16*5)+ITEM_SPRITE_HEIGHT; vstop + dc.b 0 incbin "out/\2" - dc.w 0,0 - incbin "out/\2" - dc.w 0,0 - incbin "out/\2" dc.l 0 endm diff --git a/tools/croppa/croppa.c b/tools/croppa/croppa.c index 27625c9..65f721b 100644 --- a/tools/croppa/croppa.c +++ b/tools/croppa/croppa.c @@ -39,10 +39,6 @@ cleanup() DestroyImage(image.image); } - if (image.croppedImage != (Image *)NULL) { - DestroyImage(image.croppedImage); - } - if (image.imageInfo != (ImageInfo *) NULL) { DestroyImageInfo(image.imageInfo); } @@ -218,7 +214,7 @@ main(int argc, char **argv) image.croppedImage = CropImage(image.image, &rect, &exception); if (config.rows > 1 || config.cols > 1) { - sprintf(image.croppedImage->filename, "%d-%s", count, outputFile); + sprintf(image.croppedImage->filename, "%s-%d.png", outputFile, count); } else { strcpy(image.croppedImage->filename, outputFile); } @@ -227,6 +223,10 @@ main(int argc, char **argv) CatchException(&image.croppedImage->exception); abort_("Failed to write image %d\n", outputFile); } + + if (image.croppedImage != (Image *)NULL) { + DestroyImage(image.croppedImage); + } } }