Image Wrapping

BlitzMax Forums/BlitzMax Programming/Image Wrapping

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

try this with an image that is wider than the screen
Strict 

Framework BRL.GlMax2D

Import BRL.System
Import BRL.Basic
Import BRL.pngloader
Import BRL.Retro

?Win32
SetGraphicsDriver(GLMax2DDriver())
?

Graphics 640,480

Global x:Int=0

Global image:TImage = LoadImage("test.png")


While KeyDown(KEY_ESCAPE)=False
        cls
	DrawImage image,x,0
	x:-3
	If x<0 Then DrawImage image,(x+ImageWidth(image)),0
	If x<=-ImageWidth(image) Then x=0
	DebugLog x
	Flip
	flushmem
Wend