Tout d'abord, félicitation à tous les heureux possesseurs d'ordinateurs quantiques, à base de mémoire sans limites.
En attendant aussi ce jour, chez moi l'image apparait bien avant que la fenêtre fige, pour finir par proposer de fermer le programme ou bien d'attendre la réponse du programme.
On peut deviner dans ce cas, d'un problème d'empilement d'évènements non traités.
Un simple While WindowEvent():Wend dans la boucle, semble avoir résolu le problème.
Code : Tout sélectionner
; INIT
InitSprite():InitKeyboard():UsePNGImageDecoder() :InitSound() :InitMouse()
; CREATION FENETRE JEU
OpenWindow(0, 0, 0, 640, 400, "",#PB_Window_BorderLess|#PB_Window_ScreenCentered) ;#PB_Window_TitleBar | #PB_Window_ScreenCentered|#PB_Window_SystemMenu
OpenWindowedScreen(WindowID(0), 0, 0, 640, 400, 1, 0, 0)
; DECOUPE DES SPRITES
ClearScreen(RGB(0,0,0))
CatchSprite(9999,?sprite9999,#PB_Sprite_AlphaBlending)
DisplayTransparentSprite (9999,0,0,255)
GrabSprite(0,0,0,32,32,#PB_Sprite_PixelCollision|#PB_Sprite_AlphaBlending)
dessinmaria=0
; AFFICHAGE
Repeat
While WindowEvent() ; modif
Wend
ClearScreen(RGB(0,0,0))
DisplayTransparentSprite (dessinmaria,150,60,200)
FlipBuffers()
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape)
; FICHIERS
DataSection
sprite9999:
IncludeBinary "d:/td00110.png"
EndDataSection
Exemple pour le visionner en mode debug :
Code : Tout sélectionner
; INIT
InitSprite():InitKeyboard():UsePNGImageDecoder() :InitSound() :InitMouse()
; CREATION FENETRE JEU
OpenWindow(0, 0, 0, 640, 400, "",#PB_Window_BorderLess|#PB_Window_ScreenCentered) ;#PB_Window_TitleBar | #PB_Window_ScreenCentered|#PB_Window_SystemMenu
OpenWindowedScreen(WindowID(0), 0, 0, 640, 400, 1, 0, 0)
; DECOUPE DES SPRITES
ClearScreen(RGB(0,0,0))
CatchSprite(9999,?sprite9999,#PB_Sprite_AlphaBlending)
DisplayTransparentSprite (9999,0,0,255)
GrabSprite(0,0,0,32,32,#PB_Sprite_PixelCollision|#PB_Sprite_AlphaBlending)
dessinmaria=0
; AFFICHAGE
Repeat
While WindowEvent() ; modif
u+1
Debug u
Wend
ClearScreen(RGB(0,0,0))
DisplayTransparentSprite (dessinmaria,150+u,60,200) ; modif +u
FlipBuffers()
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_Escape)
; FICHIERS
DataSection
sprite9999:
IncludeBinary "d:/td00110.png"
EndDataSection
En ce qui concerne les versions PB, je les vois comme ça :
Code : Tout sélectionner
- 5.42 dernière version ASCII/UNICODE
- 5.73 dernière version Mac X86
- 4.00 dernière version Amiga
- 3.94 dernière version Mac PPC ?