Noob Framework

BlitzMax Forums/BlitzMax Beginners Area/Noob Framework

H&K(Posted 2007) [#1]
IF FA says I dont need to import any Mods, then what Framework do I use to.. well.. not import any mods?

I am using "Framework brl.blitz", but that is importing stuff


FlameDuck(Posted 2007) [#2]
IF FA says I dont need to import any Mods,
Then I wager it's broken. BRL.Blitz is probably a good start, since that's were all the keywords are defined.


tonyg(Posted 2007) [#3]
How about posting a sample which doesn't need any imports? If the code is too big to post I would guess FA is broken if it's a few lines then you can get a second (and fiftieth) opinion by posting it.


H&K(Posted 2007) [#4]
'===================================================================================================
'
'								Type_TRGB
'								_________
'		------------------------------------------------------------------------------------
'SuperStrict
'		------------------------------------------------------------------------------------
'
'	A Three Int Container Type for Colour
'
'===================================================================================================
Type TRGB                               'A Colour Tri
'				--------------------------------------------------------------------
	Field red	:Int
	Field green	:Int
	Field blue	:Int
'				--------------------------------------------------------------------
	Method Set:TRGB(PRed:Int=0,PGreen:Int=0,PBlue:Int=0)
	
		Self.red	= pred
		Self.green	= pgreen
		Self.blue	= pblue
		Return Self
	
	End Method
'				--------------------------------------------------------------------
	Function Create:TRGB(PRed:Int=0,PGreen:Int=0,PBlue:Int=0)
	
		Return New TRGB.Set (PRed,PGreen,PBlue)
	
	End Function
'				--------------------------------------------------------------------
	Method CreateCopy:TRGB()

		Return TRGB.Create (Self.red,Self.green,Self.blue)
	
	End Method
'				--------------------------------------------------------------------
	Method Brightness (PPercent:Float)
	
		Self.red:*	(PPercent/100.0)
		Self.green:* (PPercent/100.0)
		Self.blue:* (PPercent/100.0)
	
	End Method
'				--------------------------------------------------------------------
	Method Copy(PRgb:TRGB)
	
		Self.Set(PRgb.red,PRgb.green,PRgb.blue)

	End Method
'				--------------------------------------------------------------------
	Method Add(PRgb:TRGB)
	
		Self.AddInts(PRgb.red,PRgb.green,PRgb.blue)
	
	End Method
'				--------------------------------------------------------------------
	Method AddInts(pred:Int, pgreen:Int, pblue:Int)
	
		Self.red:+ PRed
		Self.red:mod 256
		Self.green:+ PGreen
		Self.green:mod 256
		Self.blue:+ PBlue
		Self.blue:mod 256
	
	End Method
'				--------------------------------------------------------------------
End Type
'===================================================================================================
As you can see, its just a really simple type, which yes will be included in my main type loader, and as such will be in somthing elses Framework/imports , But ATM its by itself and I just wanted a Framework for it. And its the first time FA has ever said no mods.


tonyg(Posted 2007) [#5]
I think it says 'no modules required' as you're not using any Bmax functions.


H&K(Posted 2007) [#6]
So, what Framework statment would you use to not have everything included?


tonyg(Posted 2007) [#7]
I would have thought it should have listed BRL.Blitz as well so I would use that.