Hope this helps, if not sorry (I was in a hurry!!!)
What Ross C said is very important, and also unfortunately not all graphic cards support the same texture sizes.
[CODE]
RenderWorld
Flip
WaitKey
[/CODE]
You've flipped the buffers, so the sprites are now on the FrontBuffer(), not the BackBuffer()
[CODE]
; A tip(?)... ;-)
; Make your sprites parents of the camera, then you
; can position them relative to the ScreenWidth (in effect
; 1x1 texture pixels will equal 1x1 pixels on your monitor
kaart1 = LoadSprite ("kaart1.jpg",1+4+16+32,mycamera)
SpriteViewMode kaart1,3
;etc...
HandleSprite kaart1,-1,1
ScaleSprite kaart1,(0.5*ActualTextureWidthInPixels),(0.5*ActualHeightInPixels)
PositionEntity kaart1,2dScreenCoordsX-(GraphicsWidth()/2),-(2dScreenCoordsY-GraphicsHeight()/2),GraphicsWidth()
;...etc...
; this loop SHOULD do the following:
; chop the area from 0,0 to pieceSize,pieceSize in 16 tiles,
; place each tile (image) onto a texture, and place the texture on an entity (Sprite)
For y = 0 To 3
For x = 0 To 3
k.kaartstukje = New kaartstukje
k\entity = CreateSprite(Camera)
;Multiples of 16 - you can fake having different sizes
;by masking the Sprite's texture
k\texture=CreateTexture(pieceSize,pieceSize,1+16+32)
; There is no need to keep using SetBuffer().
CopyRect (x*pieceSize),(y*pieceSize),pieceSize,pieceSize,0,0,ImageBuffer(YourBuffer),TextureBuffer(k\texture)
DrawImage image,0,0
EntityTexture k\entity,k\texture
Next
Next
[/CODE]
Hope that helps, or at least gives you a couple of ideas - sorry I didn't have time to do something a bit more readable!
What Ross C said is very important, and also unfortunately not all graphic cards support the same texture sizes.
[CODE]
RenderWorld
Flip
WaitKey
[/CODE]
You've flipped the buffers, so the sprites are now on the FrontBuffer(), not the BackBuffer()
[CODE]
; A tip(?)... ;-)
; Make your sprites parents of the camera, then you
; can position them relative to the ScreenWidth (in effect
; 1x1 texture pixels will equal 1x1 pixels on your monitor
kaart1 = LoadSprite ("kaart1.jpg",1+4+16+32,mycamera)
SpriteViewMode kaart1,3
;etc...
HandleSprite kaart1,-1,1
ScaleSprite kaart1,(0.5*ActualTextureWidthInPixels),(0.5*ActualHeightInPixels)
PositionEntity kaart1,2dScreenCoordsX-(GraphicsWidth()/2),-(2dScreenCoordsY-GraphicsHeight()/2),GraphicsWidth()
;...etc...
; this loop SHOULD do the following:
; chop the area from 0,0 to pieceSize,pieceSize in 16 tiles,
; place each tile (image) onto a texture, and place the texture on an entity (Sprite)
For y = 0 To 3
For x = 0 To 3
k.kaartstukje = New kaartstukje
k\entity = CreateSprite(Camera)
;Multiples of 16 - you can fake having different sizes
;by masking the Sprite's texture
k\texture=CreateTexture(pieceSize,pieceSize,1+16+32)
; There is no need to keep using SetBuffer().
CopyRect (x*pieceSize),(y*pieceSize),pieceSize,pieceSize,0,0,ImageBuffer(YourBuffer),TextureBuffer(k\texture)
DrawImage image,0,0
EntityTexture k\entity,k\texture
Next
Next
[/CODE]
Hope that helps, or at least gives you a couple of ideas - sorry I didn't have time to do something a bit more readable!