Simon S:
It's in this bit of code:
For the "Y increment" you need to use the pitch (LockedPitch(buffer)) of the screen buffer instead of Graphicswidth()*4 as these two values can vary. This is the problem I ran into when first experimenting with LockedPixels.
It's in this bit of code:
imagebank=LockedPixels(buffer) pitch=LockedPitch(buffer) ; copy bank to image line by line For y=0 To DHEIGHT-1 yoff=y*pitch For x=0 To DWIDTH-1 PokeInt imagebank,yoff+(x*4),image(x,y) Next Next
For the "Y increment" you need to use the pitch (LockedPitch(buffer)) of the screen buffer instead of Graphicswidth()*4 as these two values can vary. This is the problem I ran into when first experimenting with LockedPixels.