1. 10
80 x 768 is not a standard resolution (I changed to 1024x768)
2. I modified one code so it scrolls the sprites, and also grabs the original table as sprite #0
It seems to be complete, starting with 'A' and finishing with '|'. I see nothing missing or grabbed at the wrong place.
(on PB 6.21 6.12 6.30, W10/64bit) It behaves the same on all PB versions I tested, but maybe I am missing something?
Code: Select all
InitSprite()
InitKeyboard()
OpenScreen(1024,768,32,"Sprite")
StartDrawing(ScreenOutput())
For u=0 To 5
For i=0 To 10
DrawText(i*20,u*20,Chr(65+x),RGB(Random(115),Random(115),Random(255)),RGB(Random(255),Random(255),Random(255)))
x+1
Next
Next
StopDrawing()
GrabSprite(0,0,0,220,120)
taille_x=20
taille_y=20
nb=1
For u=0 To 5
For i=0 To 10
GrabSprite(nb,i*taille_x,u*taille_y,taille_x,taille_y)
nb+1
Next
Next
;;;
x_offset=-1024
Repeat
FlipBuffers()
ClearScreen(0)
DisplaySprite(0,0,0)
For i=1 To nb-1
DisplaySprite(i,(i*taille_x) - x_offset,400) ; erreur dans les numeros de sprites !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Next
x_offset+1
If x_offset>((nb+1)*taille_x)
x_offset=-1024
EndIf
ExamineKeyboard()
Until KeyboardPushed(#PB_Key_All)