mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Load pngs from cache
This commit is contained in:
@@ -230,4 +230,17 @@ class AssetCache
|
||||
|
||||
return .Ok;
|
||||
}
|
||||
|
||||
public Result<void> OpenFileStream(CachedAsset asset, FileStream fileStream)
|
||||
{
|
||||
if (asset == null)
|
||||
return .Err;
|
||||
|
||||
Try!(fileStream.Close());
|
||||
Try!(fileStream.Open(asset.FilePath, .Read, .Read));
|
||||
|
||||
fileStream.Position = asset.DataOffset;
|
||||
|
||||
return .Ok;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user