mirror of
https://frontier.innolan.net/github/AmigaExamples.git
synced 2026-09-12 03:12:24 +00:00
animated board item
This commit is contained in:
+6
-1
@@ -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))
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -13,7 +13,7 @@
|
||||
</layer>
|
||||
<layer name="items" width="100" height="8">
|
||||
<data encoding="base64" compression="zlib">
|
||||
eJxjYBgFo2AU4AKOjMTJgdjI2AmPvlEwMAA9vnCB0bgb3ABf3I2CUTAKRsEoGBoAABJBAtk=
|
||||
eJxjYBgFo2AU4AKOjMTJgdjI2AmPvlFAW4Ar7NHji1T9o2BwAHxxNwpGwSgYBaNgaAAAFGIDHA==
|
||||
</data>
|
||||
</layer>
|
||||
</map>
|
||||
|
||||
+82
-15
@@ -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
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user