zut!! plus le temps , mais je code dés demain ap midi jusqu'à lundi soir
aidez moi (voir question au milieu du de ce code)
promis j'etudirais "openwindows" apres.....
Code : Tout sélectionner
InitSprite()
OpenScreen(1024, 768, 32, "squelette ecran")
; 992,736
InitKeyboard()
InitMouse()
Structure boule
xb.w
yb.w
sensx.b
sensy.b
EndStructure
Dim boule.boule(2)
CreateSprite ( 1,32,32) ; on cree un sprite (une balle)
StartDrawing ( SpriteOutput (1) ) ; on va dessiner dans le sprite
Circle (16, 16, 16, RGB (255,0,0)) ; on dessine un rond dedans(dans le sprite)
StopDrawing ()
CreateSprite ( 2,100,100) ; on cree un sprite (une balle)
StartDrawing(SpriteOutput (2))
Circle(16,16,16,RGB(0,255,0))
StopDrawing()
boule(2)\xb=600 : boule(2)\yb=200
Repeat
; xxxxxxxxxxxxxxxxxxxxxxxxx ICI JE VEUX CHOISIR L'ANGLE MOI MEME A CHAQUE FOIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!XXXXXXXXXXXXXXXXXXX
boule(1)\xb=992/2 : boule(1)\yb=736/2
StartDrawing(SpriteOutput (2))
Circle(16,16,16,RGB(255,255,0))
StopDrawing()
For t=1 To 30
xx=boule(1)\xb+10*Cos(angle*#PI/180)
yy=boule(1)\yb+10*Sin(angle*#PI/180)
StartDrawing ( ScreenOutput () )
DrawText (0,0, "angle: "+ Str(angle), RGB (255,255,0), RGB (0,0,0))
StopDrawing ()
boule(1)\xb=xx : boule(1)\yb=yy
For i=1 To 2
DisplayTransparentSprite(i,boule(i)\xb,boule(i)\yb)
Next i
FlipBuffers()
ClearScreen(RGB(0, 0,0))
ExamineKeyboard()
If KeyboardPushed(#PB_Key_Escape)
End
EndIf
Next t
ForEver