mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-25 14:00:21 +00:00
Try to fix build errors
This commit is contained in:
parent
fb81cc93b0
commit
622011d025
14 changed files with 160 additions and 10 deletions
|
@ -140,6 +140,8 @@ namespace FirstPlugin
|
|||
}
|
||||
}
|
||||
|
||||
public GLShaderGeneric Shader;
|
||||
|
||||
public ShaderProgram defaultShaderProgram;
|
||||
public ShaderProgram solidColorShaderProgram;
|
||||
|
||||
|
@ -181,6 +183,12 @@ namespace FirstPlugin
|
|||
gl_Position = mtxMdl * mtxCam * vec4(vPosition.xyz, 1.0);
|
||||
}");
|
||||
|
||||
Shader = new GLShaderGeneric()
|
||||
{
|
||||
FragmentShader = File.ReadAllText(pathFrag),
|
||||
VertexShader = File.ReadAllText(pathVert),
|
||||
};
|
||||
|
||||
defaultShaderProgram = new ShaderProgram(defaultFrag, defaultVert, control);
|
||||
solidColorShaderProgram = new ShaderProgram(solidColorFrag, solidColorVert, control);
|
||||
|
||||
|
|
|
@ -42,6 +42,10 @@ namespace Toolbox.Library
|
|||
uint compressedOffset = reader.ReadUInt32();
|
||||
uint uncompressedOffset = reader.ReadUInt32();
|
||||
|
||||
while (output.Count < decompressedSize)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return output.ToArray();
|
||||
|
|
|
@ -73,7 +73,9 @@ namespace Toolbox.Library
|
|||
bool ExportSuccessScene = v.ExportFile(scene, FileName, formatID, PostProcessSteps.FlipUVs);
|
||||
if (ExportSuccessScene)
|
||||
{
|
||||
if (ext == ".dae")
|
||||
WriteExtraSkinningInfo(FileName, scene, Meshes);
|
||||
|
||||
MessageBox.Show($"Exported {FileName} Successfuly!");
|
||||
}
|
||||
else
|
||||
|
|
|
@ -16,6 +16,27 @@ namespace Toolbox.Library
|
|||
{
|
||||
public class DAE : DAEHelper
|
||||
{
|
||||
public class ExportSettings
|
||||
{
|
||||
public Version FileVersion = new Version();
|
||||
}
|
||||
|
||||
public class Version
|
||||
{
|
||||
public int Major = 1;
|
||||
public int Minor = 4;
|
||||
public int Micro = 1;
|
||||
}
|
||||
|
||||
public static void Export(string fileName, ExportSettings exportSettings)
|
||||
{
|
||||
using (ColladaWriter writer = new ColladaWriter(fileName, exportSettings))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<STGenericObject> objects = new List<STGenericObject>();
|
||||
public List<STGenericMaterial> materials = new List<STGenericMaterial>();
|
||||
public STSkeleton skeleton;
|
||||
|
|
51
Switch_Toolbox_Library/FileFormats/DAE/DAE_Writer.cs
Normal file
51
Switch_Toolbox_Library/FileFormats/DAE/DAE_Writer.cs
Normal file
|
@ -0,0 +1,51 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
|
||||
namespace Toolbox.Library
|
||||
{
|
||||
public class ColladaWriter : IDisposable
|
||||
{
|
||||
private XmlTextWriter Writer;
|
||||
private DAE.ExportSettings Settings;
|
||||
private DAE.Version Version;
|
||||
|
||||
public ColladaWriter(string fileName, DAE.ExportSettings settings)
|
||||
{
|
||||
Settings = settings;
|
||||
Version = settings.FileVersion;
|
||||
Writer = new XmlTextWriter(fileName, Encoding.UTF8)
|
||||
{
|
||||
Formatting = Formatting.Indented,
|
||||
Indentation = 2,
|
||||
};
|
||||
}
|
||||
|
||||
public void WriteHeader()
|
||||
{
|
||||
Writer.WriteStartDocument();
|
||||
Writer.WriteStartElement("COLLADA");
|
||||
Writer.WriteAttributeString("xmlns", "http://www.collada.org/2005/11/COLLADASchema");
|
||||
Writer.WriteAttributeString("version", $"{Version.Major}.{Version.Minor}.{Version.Micro}");
|
||||
}
|
||||
|
||||
public void WriteAsset()
|
||||
{
|
||||
Writer.WriteStartElement("asset");
|
||||
Writer.WriteEndElement();
|
||||
}
|
||||
|
||||
public static void WriteSectionAsset()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Writer.Close();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -116,11 +116,17 @@ namespace Toolbox.Library
|
|||
foreach (TreeNode node in TextureIcons[i].IconTextureList)
|
||||
{
|
||||
if (node is STGenericTexture)
|
||||
{
|
||||
try
|
||||
{
|
||||
var image = ((STGenericTexture)node).GetBitmap();
|
||||
if (image != null)
|
||||
AddImageOnThread(image, node);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,10 +135,17 @@ namespace Toolbox.Library
|
|||
if (SingleTextureIcons[i] == null || SingleTextureIcons[i].IconTexture == null)
|
||||
continue;
|
||||
|
||||
try
|
||||
{
|
||||
var image = SingleTextureIcons[i].IconTexture.GetBitmap();
|
||||
if (image != null)
|
||||
AddImageOnThread(image, SingleTextureIcons[i].IconTexture);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}));
|
||||
Thread.Start();
|
||||
}
|
||||
|
|
|
@ -12,8 +12,15 @@ using ScintillaNET_FindReplaceDialog;
|
|||
|
||||
namespace Toolbox.Library.Forms
|
||||
{
|
||||
public partial class TextEditor : UserControl
|
||||
public partial class TextEditor : UserControl, IFIleEditor
|
||||
{
|
||||
public IFileFormat FileFormat;
|
||||
|
||||
public List<IFileFormat> GetFileFormats()
|
||||
{
|
||||
return new List<IFileFormat>() { FileFormat };
|
||||
}
|
||||
|
||||
FindReplace findReplaceDialog;
|
||||
|
||||
private void ResetTypes()
|
||||
|
|
|
@ -248,11 +248,11 @@ namespace Toolbox.Library
|
|||
var skybox = new DrawableSkybox();
|
||||
var background = new DrawableBackground();
|
||||
|
||||
scene.staticObjects.Add(floor);
|
||||
/* scene.staticObjects.Add(floor);
|
||||
scene.staticObjects.Add(xyzLnes);
|
||||
scene.staticObjects.Add(skybox);
|
||||
scene.staticObjects.Add(background);
|
||||
|
||||
*/
|
||||
// scene.objects.Add(new SingleObject(new Vector3(0, 0, 0)));
|
||||
|
||||
// LoadFog();
|
||||
|
|
|
@ -6,6 +6,16 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Toolbox.Library
|
||||
{
|
||||
public enum STPrimativeType
|
||||
{
|
||||
Points = 0,
|
||||
Lines = 1,
|
||||
LineStrips = 2,
|
||||
Triangles = 3,
|
||||
TrangleStrips,
|
||||
Quads,
|
||||
}
|
||||
|
||||
public class STGenericPolygonGroup
|
||||
{
|
||||
public int Offset { get; set; }
|
||||
|
@ -14,6 +24,8 @@ namespace Toolbox.Library
|
|||
|
||||
public List<int> faces = new List<int>();
|
||||
|
||||
public STPrimativeType PrimativeType = STPrimativeType.Triangles;
|
||||
|
||||
public int strip = 0x40;
|
||||
public int displayFaceSize = 0;
|
||||
|
||||
|
|
13
Switch_Toolbox_Library/OpenGL/ShaderManager.cs
Normal file
13
Switch_Toolbox_Library/OpenGL/ShaderManager.cs
Normal file
|
@ -0,0 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Toolbox.Library
|
||||
{
|
||||
public class ShaderManager
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -760,6 +760,16 @@ namespace Toolbox.Library.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
public static System.Drawing.Bitmap MissingTexture {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("MissingTexture", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
|
|
@ -415,4 +415,7 @@
|
|||
<data name="AnimationTrackZ" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\AnimationTrackZ.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="MissingTexture" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\MissingTexture.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
BIN
Switch_Toolbox_Library/Resources/MissingTexture.png
Normal file
BIN
Switch_Toolbox_Library/Resources/MissingTexture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
|
@ -247,6 +247,7 @@
|
|||
<Compile Include="Compression\Formats\Zlib.cs" />
|
||||
<Compile Include="Config.cs" />
|
||||
<Compile Include="Enums\CompressionType.cs" />
|
||||
<Compile Include="FileFormats\DAE\DAE_Writer.cs" />
|
||||
<Compile Include="FileFormats\DDS\RGBAPixelDecoder.cs" />
|
||||
<Compile Include="FileSystem\VirtualFileTreeNode.cs" />
|
||||
<Compile Include="FileSystem\VirtualTreeNode.cs" />
|
||||
|
@ -399,6 +400,7 @@
|
|||
<Compile Include="OpenGL\IPickableObject.cs" />
|
||||
<Compile Include="OpenGL\OpenGL2DEnums.cs" />
|
||||
<Compile Include="OpenGL\Render2D.cs" />
|
||||
<Compile Include="OpenGL\ShaderManager.cs" />
|
||||
<Compile Include="OpenGL\STRectangle.cs" />
|
||||
<Compile Include="OpenGL\Viewport2D.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
|
@ -1389,6 +1391,7 @@
|
|||
<Folder Include="FileFormats\Compression\" />
|
||||
<Folder Include="FileFormats\DAE\COLLADA\" />
|
||||
<Folder Include="FileFormats\DAE\Custom\" />
|
||||
<Folder Include="OpenGL\Engine\Camera\" />
|
||||
<Folder Include="Rendering\Shaders\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -1496,6 +1499,9 @@
|
|||
<ItemGroup>
|
||||
<None Include="Resources\AnimationTrackW.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\MissingTexture.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
|
Loading…
Reference in a new issue