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.
Yes...yes it does. Thanks again brucey
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