Hi,
I created some code corresponding to the
bouncing ball example.
The problem is that I wanna add a second image
on top of the first one, but Im cracking my mind with
what Im doing wrong - or maybe its not possible.
These are the parts of my code that are might
important:
transparentColor = ImgList.Pixel(0,1,1)
SetTransparentColor(transparentColor)
eraseBrush.new1(transparentColor)
Form.forelayer=true
rectSrc.new1(0,0,ImgList.width(0),ImgList.height(0))
rectDest.New1(50,120,ImgList.width(0),ImgList.height(0))
armSrc.new1(0,0,ImgList.width(11),ImgList.height(11))
armDest.New1(50,120,ImgList.width(11),ImgList.height(11))
drawer.new1("Form", True)
drawer.DrawImage1(ImgList.Item(0),rectSrc.Value,rectDest.Value,true)
drawer.Refresh2(rectDest.Value)
drawer.DrawImage1(ImgList.Item(11),armSrc.Value,armDest.Value,true)
Here are the lines for refreshing on movement (not
involving the overlay texture yet):
Sub hkey_HardKeyPressed
Select hkey.keypressed
Case hkey.keyright
drawer.FillRectangle(eraseBrush.Value,rectDest.Value)
drawer.Refresh2(rectDest.Value)
rectDest.X = rectDest.X + 3
drawer.DrawImage1(ImgList.Item(r),rectSrc.Value,rectDest.Value,true)
If r=3 Then
r=-1
End If
r=r+1
Case hkey.keyleft
drawer.FillRectangle(eraseBrush.Value,rectDest.Value)
drawer.Refresh2(rectDest.Value)
rectDest.X = rectDest.X - 3
drawer.DrawImage1(ImgList.Item(l),rectSrc.Value,rectDest.Value,true)
If l=7 Then
l=3
End If
l=l+1
End Select
End Sub
I created some code corresponding to the
bouncing ball example.
The problem is that I wanna add a second image
on top of the first one, but Im cracking my mind with
what Im doing wrong - or maybe its not possible.
These are the parts of my code that are might
important:
transparentColor = ImgList.Pixel(0,1,1)
SetTransparentColor(transparentColor)
eraseBrush.new1(transparentColor)
Form.forelayer=true
rectSrc.new1(0,0,ImgList.width(0),ImgList.height(0))
rectDest.New1(50,120,ImgList.width(0),ImgList.height(0))
armSrc.new1(0,0,ImgList.width(11),ImgList.height(11))
armDest.New1(50,120,ImgList.width(11),ImgList.height(11))
drawer.new1("Form", True)
drawer.DrawImage1(ImgList.Item(0),rectSrc.Value,rectDest.Value,true)
drawer.Refresh2(rectDest.Value)
drawer.DrawImage1(ImgList.Item(11),armSrc.Value,armDest.Value,true)
Here are the lines for refreshing on movement (not
involving the overlay texture yet):
Sub hkey_HardKeyPressed
Select hkey.keypressed
Case hkey.keyright
drawer.FillRectangle(eraseBrush.Value,rectDest.Value)
drawer.Refresh2(rectDest.Value)
rectDest.X = rectDest.X + 3
drawer.DrawImage1(ImgList.Item(r),rectSrc.Value,rectDest.Value,true)
If r=3 Then
r=-1
End If
r=r+1
Case hkey.keyleft
drawer.FillRectangle(eraseBrush.Value,rectDest.Value)
drawer.Refresh2(rectDest.Value)
rectDest.X = rectDest.X - 3
drawer.DrawImage1(ImgList.Item(l),rectSrc.Value,rectDest.Value,true)
If l=7 Then
l=3
End If
l=l+1
End Select
End Sub