CEGUI - As object

BlitzMax Modules Forums/Brucey's Modules/CEGUI - As object

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.

Perfect! That did the trick plenty. Tiny bit of editing and I am able to load the files directly from my media archive by returning the bank buffer from my package type. Everything seems to be working without issue.

Method loadRawDataContainer(filename:String, dataContainer:TCERawDataContainer, resourceGroup:String)
		Local StrippedName:String = StripDir(filename)
		If Package.FileExists(StrippedName) <> - 1 Then
			DebugLog StrippedName + " found in archive...loading from archive..."
			dataContainer.setSize(Package.GetFileSizeByName(StrippedName))
			dataContainer.setData(Package.LoadFileByName(StrippedName).Buf())
		Else
			DebugLog StrippedName + " not found. Loading file from path"
			Local stream:TStream = ReadStream(filename)
			Local size:Int = stream.Size()
			Local data:Byte Ptr = MemAlloc(size)
		
			stream.ReadBytes(data, size)
			stream.Close()
			
			' Set size and data within container
			dataContainer.SetSize(size)
			dataContainer.SetData(data)
		End If
End Method


BlitzMax rocks :-)


Yes...yes it does. Thanks again brucey