Sprite : How do I keep a constant background

BlitzMax Forums/BlitzMax Beginners Area/Sprite : How do I keep a constant background

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.

Using both setmaskcolor and setclscolor is the solution


Graphics 1280,854 'set gfx mode
Global FrameTimer = MilliSecs()
Global frame:Int = 0
SetMaskColor 0,160,0
Global myimage:TImage = LoadAnimImage("ko2.png",16,16,0,5)
SetClsColor 0,160,0

Repeat

Cls

DrawImage myimage,50,50,frame

If MilliSecs() > FrameTimer + 100
FrameTimer = MilliSecs()
frame:+1
EndIf

If frame > 4 Then frame = 0

Flip
FlushMem

Until KeyHit(KEY_ESCAPE)


Thanks