Converting blitz2d to max

BlitzMax Forums/BlitzMax Programming/Converting blitz2d to max

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.

I have this code in Blitz2D, and I want it work in blitzmax but there is no copyrect or imagebuffers. I think you should be able to do everything in blitzmax that you could do in blitz2d... but this code needs to run very fast. And it is fast in blitz2d.


Heres basically what the code looks like:
Each loop it has to write to every fire image buffer using copyrect and writepixelfast.

I haven't ever used pixmaps, can they do this?
Is there some sort of copyrect function?
Function FireUpdate(Fire.Fire)	
	
	SetBuffer ImageBuffer(Fire\image)
	
	For whatever
		X=Rnd()
		Y=Rnd()
		AddX=Rand(-1,1)
		CopyRect X,Y,Rnd(5,7),Rnd(5,10), X+AddX, Y - 1
	Next
	
	LockBuffer ImageBuffer(Fire\image)
	For whatever
		X=Rnd()
		Y=Rnd()
		WritePixelFast X,Y,0
	Next
	UnlockBuffer ImageBuffer(Fire\image)
	
End Function