diff --git a/028.game2/Makefile b/028.game2/Makefile index 9e3e03e..6496dde 100644 --- a/028.game2/Makefile +++ b/028.game2/Makefile @@ -22,7 +22,12 @@ IMAGES=foreground.png \ sprite_pig_up_jump.png \ sprite_pig_down_jump.png \ sprite_pig_right_jump.png \ - sprite_coin1.png + sprite_coin1.png \ + sprite_coin2.png \ + sprite_coin3.png \ + sprite_coin4.png \ + sprite_coin6.png \ + sprite_coin7.png IMAGEDATA=$(addprefix out/, $(IMAGES:.png=.bin)) diff --git a/028.game2/assets/sprite_coin2.png b/028.game2/assets/sprite_coin2.png new file mode 100644 index 0000000..4e50698 Binary files /dev/null and b/028.game2/assets/sprite_coin2.png differ diff --git a/028.game2/assets/sprite_coin3.png b/028.game2/assets/sprite_coin3.png new file mode 100644 index 0000000..ac294d9 Binary files /dev/null and b/028.game2/assets/sprite_coin3.png differ diff --git a/028.game2/assets/sprite_coin4.png b/028.game2/assets/sprite_coin4.png new file mode 100644 index 0000000..c850b27 Binary files /dev/null and b/028.game2/assets/sprite_coin4.png differ diff --git a/028.game2/assets/sprite_coin6.png b/028.game2/assets/sprite_coin6.png new file mode 100644 index 0000000..1d266a0 Binary files /dev/null and b/028.game2/assets/sprite_coin6.png differ diff --git a/028.game2/assets/sprite_coin7.png b/028.game2/assets/sprite_coin7.png new file mode 100644 index 0000000..1be5a52 Binary files /dev/null and b/028.game2/assets/sprite_coin7.png differ diff --git a/028.game2/foreground.tmx b/028.game2/foreground.tmx index ed2543e..41cded7 100644 --- a/028.game2/foreground.tmx +++ b/028.game2/foreground.tmx @@ -13,7 +13,7 @@ - eJxjYBgFo2AU4AKOjMTJgdjI2AmPvlEwMAA9vnCB0bgb3ABf3I2CUTAKRsEoGBoAABJBAtk= + eJxjYBgFo2AU4AKOjMTJgdjI2AmPvlFAW4Ar7NHji1T9o2BwAHxxNwpGwSgYBaNgaAAAFGIDHA== diff --git a/028.game2/items.s b/028.game2/items.s index 90e1853..e27e962 100644 --- a/028.game2/items.s +++ b/028.game2/items.s @@ -10,10 +10,21 @@ ScrollItemSprites: SetupItemSpriteData: move.l currentItemSprite,a0 + cmp.w #11<<3,itemIndex + ble .dontResetIndex + move.l #0,itemIndex +.dontResetIndex: cmp.l #deadSprite,a0 bne .setupSprite bra .c1 .setupSprite: + + move.l #0,d0 + move.w itemIndex,d0 + lsr.l #3,d0 + mulu.w #64+12,d0 + add.l d0,a0 + add.w #1,itemIndex move.w itemLagX,d0 move.w itemX,itemLagX add.w #32,d0 @@ -43,32 +54,88 @@ RenderItemSprite: cmpi.w #0,(a3) beq .dontAddSprite move.l #spriteCoin1,currentItemSprite - move.w #337,itemX + move.w #337,itemX mulu.w #16,d2 move.w #255-12,d3 sub.w d2,d3 move.w d3,itemY add.w #16,d3 move.w d3,itemYEnd + move.w #0,itemIndex .dontAddSprite: movem.l (sp)+,d2-d3 rts +currentItemSprite: + dc.l deadSprite +itemX: + dc.w 0 +itemLagX: + dc.w 0 +itemY: + dc.w 0 +itemYEnd: + dc.w 0 +itemIndex: + dc.w 4 + spriteCoin1: dc.w 0,0 dc.w 0,0 incbin "out/sprite_coin1.bin" - dc.l 0 - - -currentItemSprite: - dc.l deadSprite -itemX: - dc.w $E0 -itemLagX: - dc.w 0 -itemY: - dc.w $a4 -itemYEnd: - dc.w $b4 - \ No newline at end of file + dc.l 0 +spriteCoin2: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin2.bin" + dc.l 0 +spriteCoin3: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin3.bin" + dc.l 0 +spriteCoin4: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin4.bin" + dc.l 0 +spriteCoin5: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin3.bin" + dc.l 0 +spriteCoin6: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin6.bin" + dc.l 0 +spriteCoin7: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin7.bin" + dc.l 0 +spriteCoin8: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin6.bin" + dc.l 0 +spriteCoin9: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin3.bin" + dc.l 0 +spriteCoin10: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin4.bin" + dc.l 0 +spriteCoin11: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin3.bin" + dc.l 0 +spriteCoin12: + dc.w 0,0 + dc.w 0,0 + incbin "out/sprite_coin2.bin" + dc.l 0 \ No newline at end of file