Organization of an idea.

BlitzMax Forums/BlitzMax Beginners Area/Organization of an idea.

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 would use a palette object and store the entire day by calling the setrange method multiple times:
Type TPalette
	Field r[256]
	Field g[256]
	Field b[256]
	
	Method UseColor(n)	
		SetColor r[n],g[n],b[n]
	End Method
	
	Method SetRange(lo,r0,g0,b0,hi,r1,g1,b1)
		Local i,d
		d=hi-lo		
		For i=0 To d
			r[lo+i]=r0+(r1-r0)*i/d
			g[lo+i]=g0+(g1-g0)*i/d
			b[lo+i]=b0+(b1-b0)*i/d
		Next
	End Method
End Type