j'y comprend rien pourquoi il ne veut pas marcher j'ai créer un sprite (qui marche) et une image (qui ne marche pas) que ce passe t'il?
Code : Tout sélectionner
If InitSprite() = 0 Or InitKeyboard() = 0 Or InitMouse() = 0
MessageRequester("erreur","vous ne pouvez pas commencer")
EndIf
If ExamineDesktops()
borx = DesktopWidth(0)
bory = DesktopHeight(0)
EndIf
test = OpenWindow(0,0,0,borx,bory,0,"test")
OpenWindowedScreen(test,0,0,borx,bory,0,0,0)
CreateGadgetList(WindowID(0))
ImageGadget(0,0,0,0,0,image)
image = CreateImage(0,64,64)
StartDrawing(ImageOutput())
Circle(250,250,32,RGB(250,0,0))
StopDrawing()
If CreateSprite(0,64,64)
StartDrawing(SpriteOutput(0))
Circle(32,32,32,RGB(0,250,0))
StopDrawing()
EndIf
Repeat
ClearScreen(0,0,0)
ExamineMouse()
ExamineKeyboard()
If KeyboardPushed(#PB_Key_Up)
y - 1
EndIf
If KeyboardPushed(#PB_Key_Down)
y + 1
EndIf
If KeyboardPushed(#PB_Key_Left)
x - 1
EndIf
If KeyboardPushed(#PB_Key_Right)
x + 1
EndIf
If KeyboardPushed(#PB_Key_R)
b - 1
EndIf
If KeyboardPushed(#PB_Key_F)
b + 1
EndIf
If KeyboardPushed(#PB_Key_D)
a - 1
EndIf
If KeyboardPushed(#PB_Key_G)
a + 1
EndIf
DisplaySprite(0,x,y)
ResizeGadget(0,a,b,-1,-1)
FlipBuffers()
WaitWindowEvent()
Until KeyboardPushed(#PB_Key_Escape)