Post by PeterMaria on Mar 9, 2011 15:45:51 GMT -5
Hi,
For Easter. ;D
FullScreen would be good!
For Easter. ;D
FullScreen would be good!
'Easter Demo by P.Wirbelauer o9/o3/2011
TextMode(TEXT_BUFFERED)
ResizeSpriteArea(1024,768)
Dim bild,zfont(63),ufo(18),zUfo,u1,u2,sun(4),zSun,egg(1)
Dim zEgg,f,bun(21),zBun,zBun1,flw(0),ufo1,ufo2
zBun1 =22
bild = LoadTex("easter/b3d1024x768.png")
ufo = LoadTexStrip("easter/ufostrip.png",256,256)
sun = LoadTexStrip("easter/sunstrip.png",128,128)
egg = LoadTexStrip("easter/eggstrip.png",64,64)
bun = LoadTexStrip("easter/BunnyStrip.png",32,32)
flw = LoadTexStrip("easter/Flower.png",32,32)
zfont= LoadTexStrip("easter/zfont.png",32,32)
ufo1= LoadSound("easter/ufo1.wav")
ufo2= LoadSound("easter/ufo2.wav")
Sub Sprite(nr(),x,y,w,h,frame)
NewSprite(nr)
SprSetxCentre(0):SprSetyCentre(0)
SprSetZOrder(1)
SprSetSize(w,h)
SprSetPos(x,y)
SprSetFrame(frame)
End Sub
Sub Bitmap(Hnd,x1,y1,w1,h1)
NewSprite(Hnd)
SprSetxCentre(0):SprSetyCentre(0)
SprSetZOrder(1)
SprSetSize(w1,h1)
SprSetPos (x1,y1)
End Sub
Sub Text(txt$,x4,y4,w4,h4)
Dim sx, jx, px
sx = Len(txt$)
For jx =1 To sx
px = Asc(Mid$(txt$,jx,1))
iF px >=32 And px <=90 Then
px = px -32
Sprite(zFont,x4,y4,w4,h4,px)
x4 = x4 + w4
End iF
Next
End Sub
Function EscKey()
Return ScanKeyDown(vk_escape)
End Function
PlaySound(ufo1)
While EscKey() =0
Bitmap(bild,0,0,1024,768)
iF u1 =1 Then
Text("HAPPY EASTER",320,444,32,32)
iF u2 =0 and zUfo >0 Then
u2 =1:PlaySound(ufo2)
End iF
End iF
iF u1 =0 Then
Sprite(ufo,380,320,234,175,zUfo)
zUfo = zUfo +1
iF zUfo =19 Then:u1=1:End iF
End iF
iF u2 =1 Then
Sprite(ufo,380,320,234,175,zUfo)
zUfo = zUfo -1
iF zUfo <0 Then:u2=0:End iF
End iF
Sprite(sun,16,16,96,96,zSun)
zSun = zSun +1
iF zSun =4 Then:zSun =0:End iF
Sprite(egg,440,580,64,64,zEgg)
Sprite(egg,480,540,50,50,zEgg)
Sprite(egg,340,600,80,80,zEgg)
zEgg = zEgg +1
iF zEgg =2 Then:zEgg =0:End iF
Sprite(bun,640,490,28,28,zBun)
Sprite(bun,700,640,40,40,zBun1)
zBun =zBun +1
iF zBun =22 Then:zBun =0:End iF
zBun1 = zBun1 -1
iF zBun1 <0 Then:zBun1 =21:End iF
Sprite(flw,100,700,32,32,0)
Sprite(flw,800,500,16,16,0)
Sprite(flw,80,520,22,22,0)
Sprite(flw,900,720,32,32,0)
DrawText()
ClearSprites()
WaitTimer(160)
Wend
End