Tu as raison....
Publié : jeu. 15/avr./2004 16:50
Je vais même le poster en entier...
InitSprite()
InitMouse()
InitKeyboard()
Taille_Chiffon_X=16
Taille_Chiffon_Y=16
Dim tableau (256,192)
Ma_fenetre = OpenWindow(0, 200, 200, 320, 320,#PB_Window_SystemMenu,"Cleaner")
;OpenScreen(1024,768,16,"rien")
OpenWindowedScreen(Ma_fenetre,0,0,256,192, 0, 0, 0)
LoadSprite(3072, "Data\Chiffon.bmp", 0)
StartDrawing(ScreenOutput())
DrawText("Salut")
FlipBuffers()
Delay (1000)
StopDrawing()
Repeat
;EventID.l = WaitWindowEvent()
StartDrawing(ScreenOutput())
For j=0 To 47
For k=0 To 63
If tableau(k,j)=0
Box(4*k,4*j,4,4,RGB(0,255,0))
EndIf
Next k
Next j
Box(x,y,16,16,RGB(0,0,0))
If MouseButton(1)
For b=1 To Taille_Chiffon_Y
For a=1 To Taille_Chiffon_X
tableau((x+a)/4,(y+b)/4)=1
Next a
Next b
EndIf
ExamineMouse()
ExamineKeyboard()
x = MouseX()
y = MouseY()
FlipBuffers()
IsScreenActive()
StopDrawing()
Until MouseButton(2)
End
InitSprite()
InitMouse()
InitKeyboard()
Taille_Chiffon_X=16
Taille_Chiffon_Y=16
Dim tableau (256,192)
Ma_fenetre = OpenWindow(0, 200, 200, 320, 320,#PB_Window_SystemMenu,"Cleaner")
;OpenScreen(1024,768,16,"rien")
OpenWindowedScreen(Ma_fenetre,0,0,256,192, 0, 0, 0)
LoadSprite(3072, "Data\Chiffon.bmp", 0)
StartDrawing(ScreenOutput())
DrawText("Salut")
FlipBuffers()
Delay (1000)
StopDrawing()
Repeat
;EventID.l = WaitWindowEvent()
StartDrawing(ScreenOutput())
For j=0 To 47
For k=0 To 63
If tableau(k,j)=0
Box(4*k,4*j,4,4,RGB(0,255,0))
EndIf
Next k
Next j
Box(x,y,16,16,RGB(0,0,0))
If MouseButton(1)
For b=1 To Taille_Chiffon_Y
For a=1 To Taille_Chiffon_X
tableau((x+a)/4,(y+b)/4)=1
Next a
Next b
EndIf
ExamineMouse()
ExamineKeyboard()
x = MouseX()
y = MouseY()
FlipBuffers()
IsScreenActive()
StopDrawing()
Until MouseButton(2)
End