Fill the image blocks on XTX save
This commit is contained in:
parent
57d19b432d
commit
46ab6e64fa
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -221,12 +221,12 @@ namespace FirstPlugin
|
||||
|
||||
public void SaveFile(FileWriter writer)
|
||||
{
|
||||
SetupBlockSaving();
|
||||
|
||||
int Alignment = 512;
|
||||
uint TextureInfoType = 2;
|
||||
uint TextureBlockType = 3;
|
||||
|
||||
SetupBlockSaving(TextureBlockType);
|
||||
|
||||
writer.ByteOrder = Syroot.BinaryData.ByteOrder.LittleEndian;
|
||||
writer.WriteSignature("DFvN");
|
||||
writer.Write(HeaderSize);
|
||||
@ -241,7 +241,6 @@ namespace FirstPlugin
|
||||
{
|
||||
if (block.BlockType == TextureBlockType)
|
||||
{
|
||||
block.Data = TextureBlocks[curTexBlock++];
|
||||
block.WriteHeader(writer);
|
||||
block.WriteBlock(writer, 512);
|
||||
}
|
||||
@ -262,11 +261,15 @@ namespace FirstPlugin
|
||||
writer.Dispose();
|
||||
}
|
||||
|
||||
private void SetupBlockSaving()
|
||||
private void SetupBlockSaving(uint TextureBlockType)
|
||||
{
|
||||
foreach (var textureInfo in TextureInfos)
|
||||
int curTex = 0;
|
||||
foreach (var block in Blocks)
|
||||
{
|
||||
|
||||
if (block.BlockType == TextureBlockType)
|
||||
{
|
||||
block.Data = TextureInfos[curTex].ImageData;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Binary file not shown.
32
Switch_Toolbox_Library/FileFormats/DAE/DAE.cs
Normal file
32
Switch_Toolbox_Library/FileFormats/DAE/DAE.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Collada141;
|
||||
|
||||
namespace Switch_Toolbox.Library
|
||||
{
|
||||
public class DAE
|
||||
{
|
||||
public bool UseTransformMatrix = true;
|
||||
|
||||
public void LoadFile(string FileName)
|
||||
{
|
||||
COLLADA collada = COLLADA.Load(FileName);
|
||||
|
||||
foreach (var item in collada.Items)
|
||||
{
|
||||
if (item is library_geometries)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadGeometry()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -205,6 +205,8 @@
|
||||
<Compile Include="FileFormats\APNG\CRC.cs" />
|
||||
<Compile Include="FileFormats\Assimp\AssimpSaver.cs" />
|
||||
<Compile Include="FileFormats\Animation\SEANIM.cs" />
|
||||
<Compile Include="FileFormats\DAE\collada_schema_1_4.cs" />
|
||||
<Compile Include="FileFormats\DAE\DAE.cs" />
|
||||
<Compile Include="FileFormats\OBJ.cs" />
|
||||
<Compile Include="Forms\BatchFormatExport.cs">
|
||||
<SubType>Form</SubType>
|
||||
|
Loading…
Reference in New Issue
Block a user