1
0
mirror of synced 2024-09-24 19:48:21 +02:00

Some archive parent fixes for texture manager

This commit is contained in:
KillzXGaming 2019-10-14 18:38:55 -04:00
parent 858a85f641
commit 8529b0b818
2 changed files with 11 additions and 2 deletions

View File

@ -504,7 +504,7 @@ namespace LayoutBXLYT.Cafe
else
TextureManager.Platform = TextureManager.PlatformType.WiiU;
TextureManager.ArchiveParent = FileInfo.IFileInfo.ArchiveParent;
TextureManager.LayoutFile = this;
bool setRoot = false;
bool setGroupRoot = false;

View File

@ -11,12 +11,17 @@ namespace LayoutBXLYT
{
public class TextureManager : IDisposable
{
public BxlytHeader LayoutFile;
public Dictionary<string, BNTX> BinaryContainers = new Dictionary<string, BNTX>();
//The archive to put textures in if necessary
public Dictionary<string, IArchiveFile> ArchiveFile = new Dictionary<string, IArchiveFile>();
public IArchiveFile ArchiveParent;
public IArchiveFile ArchiveParent
{
get { return LayoutFile.FileInfo.IFileInfo.ArchiveParent; }
}
public PlatformType Platform = PlatformType.WiiU;
@ -55,6 +60,8 @@ namespace LayoutBXLYT
break;
case PlatformType.WiiU:
{
if (ArchiveParent == null) return null;
foreach (var file in ArchiveParent.Files)
{
if (file.FileName == name)
@ -92,6 +99,8 @@ namespace LayoutBXLYT
case PlatformType.WiiU:
{
var archive = ArchiveParent;
if (archive == null) return null;
var bflim = BFLIM.CreateNewFromImage();
if (bflim == null)
return textures;