
Uploaded with ImageShack.us
et voilà le code
Code : Tout sélectionner
UsePNGImageDecoder()
If InitSprite() And InitSprite3D() And InitSound()
If InitKeyboard() And InitMouse()
winMain = OpenWindow(#PB_Any,0,0,640,480,"Press [Esc] to close",#PB_Window_ScreenCentered | #PB_Window_SystemMenu)
OpenWindowedScreen(WindowID(winMain), 0, 0, 640, 480, 1, 0, 0)
SetFrameRate(60)
EndIf
Else
MessageRequester("","Unable to initsprite") :
EndIf
LoadImage(0,"font_1.png")
CreateSprite(0,64,64,#PB_Sprite_Texture|#PB_Sprite_Alpha)
StartDrawing(SpriteOutput(0))
DrawingMode(#PB_2DDrawing_AlphaBlend)
DrawImage(ImageID(0),0,0)
Box(64,64,-10,-10,#Red)
StopDrawing()
CreateSprite3D(0,0)
Repeat
Delay(1)
EventID = WindowEvent()
ExamineKeyboard()
ClearScreen(0)
StartDrawing(ScreenOutput())
Box(0,0,320,200,#Blue)
DrawImage(ImageID(0),50,400)
StopDrawing()
Start3D()
x=x+1
If x>640:x=0:EndIf
y=y+1
If y>320:y=0:EndIf
DisplaySprite3D(0,x,y)
Stop3D()
FlipBuffers()
Until KeyboardReleased(#PB_Key_Escape) Or EventID = #PB_Event_CloseWindow