|
Post by alexmega on Dec 30, 2018 15:42:01 GMT -5
Good afternoon, I wonder how I can change the size of the addsprites using the same variable? example to exchange shots / projectiles of varied size.
cd=0
Do
c=j
j=JoyPad(0)
Locate 10,10
Print CD
If j.4 Then
cd++
End If
If cd>1 Then
cd=0
End If
Select Case cd
Case 0
sprite1=AddSprite(1,1)
PropSprite sprite1,128,0
Exit Select
Case 1
sprite1=AddSprite(4,4)
PropSprite sprite1,128,0
Exit Select
End Select
MoveSprite sprite1,150,150
Loop
thank's
|
|
|
Post by tiberiyltim on Feb 19, 2019 15:38:45 GMT -5
Resize Sprite? To change the sprite at the right time: ResizeSprite sprite1,4,4 This should be in footer: Declare Asm Sub ResizeSprite(d0.w,d1.w,d2.w) move #$2700,sr lsl.w #3,d0 addi.w #$2C02,d0 swap d0 move.w #2,d0 move.l d0,4(a4) sub.b #1,d1 andi.w #3,d1 lsl.b #2,d1 move.w (a4),d3 sub.b #1,d2 andi.b #3,d2 or.b d2,d1 addi.l #$40000000,d0 lsl.w #8,d1 move.b d3,d1 move.l d0,4(a4) move.w d1,(a4) move #$2000,sr End Sub code by Mairtrus? devster.proboards.com/post/7508
|
|
|
Post by alexmega on Mar 6, 2019 9:39:15 GMT -5
Thank you so much, you are a great partner.
|
|