Some archive parent fixes for texture manager
This commit is contained in:
parent
858a85f641
commit
8529b0b818
@ -504,7 +504,7 @@ namespace LayoutBXLYT.Cafe
|
|||||||
else
|
else
|
||||||
TextureManager.Platform = TextureManager.PlatformType.WiiU;
|
TextureManager.Platform = TextureManager.PlatformType.WiiU;
|
||||||
|
|
||||||
TextureManager.ArchiveParent = FileInfo.IFileInfo.ArchiveParent;
|
TextureManager.LayoutFile = this;
|
||||||
|
|
||||||
bool setRoot = false;
|
bool setRoot = false;
|
||||||
bool setGroupRoot = false;
|
bool setGroupRoot = false;
|
||||||
|
@ -11,12 +11,17 @@ namespace LayoutBXLYT
|
|||||||
{
|
{
|
||||||
public class TextureManager : IDisposable
|
public class TextureManager : IDisposable
|
||||||
{
|
{
|
||||||
|
public BxlytHeader LayoutFile;
|
||||||
|
|
||||||
public Dictionary<string, BNTX> BinaryContainers = new Dictionary<string, BNTX>();
|
public Dictionary<string, BNTX> BinaryContainers = new Dictionary<string, BNTX>();
|
||||||
|
|
||||||
//The archive to put textures in if necessary
|
//The archive to put textures in if necessary
|
||||||
public Dictionary<string, IArchiveFile> ArchiveFile = new Dictionary<string, IArchiveFile>();
|
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;
|
public PlatformType Platform = PlatformType.WiiU;
|
||||||
|
|
||||||
@ -55,6 +60,8 @@ namespace LayoutBXLYT
|
|||||||
break;
|
break;
|
||||||
case PlatformType.WiiU:
|
case PlatformType.WiiU:
|
||||||
{
|
{
|
||||||
|
if (ArchiveParent == null) return null;
|
||||||
|
|
||||||
foreach (var file in ArchiveParent.Files)
|
foreach (var file in ArchiveParent.Files)
|
||||||
{
|
{
|
||||||
if (file.FileName == name)
|
if (file.FileName == name)
|
||||||
@ -92,6 +99,8 @@ namespace LayoutBXLYT
|
|||||||
case PlatformType.WiiU:
|
case PlatformType.WiiU:
|
||||||
{
|
{
|
||||||
var archive = ArchiveParent;
|
var archive = ArchiveParent;
|
||||||
|
if (archive == null) return null;
|
||||||
|
|
||||||
var bflim = BFLIM.CreateNewFromImage();
|
var bflim = BFLIM.CreateNewFromImage();
|
||||||
if (bflim == null)
|
if (bflim == null)
|
||||||
return textures;
|
return textures;
|
||||||
|
Loading…
Reference in New Issue
Block a user