Skip to content

Commit

Permalink
add TEX1
Browse files Browse the repository at this point in the history
  • Loading branch information
Venomalia committed Jul 3, 2022
1 parent 7fa0b8b commit 6106b3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TextureExtraction tool/Data/Dictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ static Dictionary()
new FileTypInfo("bti", FileTyp.Texture, "Image"),
new FileTypInfo("TPL", FileTyp.Texture, "Palette Library"),
new FileTypInfo("TPL",new Header(new byte[]{32,175,48},1), FileTyp.Texture, "Palette Library"),
new FileTypInfo("",new Header("TEX1"), FileTyp.Texture, "raw"),

//Not supported
//Archives
Expand Down Expand Up @@ -82,6 +83,7 @@ static Dictionary()
new FileTypInfo(".bmp", new Header("BM8"), FileTyp.Texture),
new FileTypInfo(".bmp", new Header("BMö"), FileTyp.Texture),
new FileTypInfo("DDS", new Header("DDS |"), FileTyp.Texture, "Direct Draw Surface"),
new FileTypInfo("",new Header("TEX0"), FileTyp.Texture, "Wii raw"),
//Roms
new FileTypInfo("gba", new Header(new byte[]{46,0,0,234,36,255,174,81,105,154,162,33,61,132,130}), FileTyp.Executable, "GBA Rom"),
new FileTypInfo("nes", new Header(new byte[]{78,69,83,26,1,1}) , FileTyp.Executable, "Rom"),
Expand Down
7 changes: 7 additions & 0 deletions TextureExtraction tool/Data/TextureExtractor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@ private void Scan(Stream stream, string subdirectory, string Extension = "")
case "CLZ":
Scan(Compression<CLZ>.Decompress(stream), GetDirectoryWithoutExtension(subdirectory));
break;
case "TEX1":
foreach (var item in new BMD.TEX1(stream).Textures)
{
Save(item, subdirectory);
}
result.ExtractedSize += stream.Length;
break;
case " 0": //TPL
Save(new TPL(stream), subdirectory);
result.ExtractedSize += stream.Length;
Expand Down

0 comments on commit 6106b3b

Please sign in to comment.