Fix star link SDF
This commit is contained in:
parent
51eff3211d
commit
2d1c15a333
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -172,8 +172,8 @@ namespace FirstPlugin
|
||||
byte[] decomp = null;
|
||||
if (magic == 0xDFF25B82 || magic == 0xFD2FB528)
|
||||
decomp = STLibraryCompression.ZSTD.Decompress(CompressedBlock);
|
||||
else if (magic == 0x184D2204)
|
||||
decomp = STLibraryCompression.Type_LZ4.Decompress(CompressedBlock);
|
||||
else if (magic == 0x184D2204 || header.Version >= 0x17)
|
||||
decomp = STLibraryCompression.Type_LZ4.Decompress(CompressedBlock, 0, CompressedBlock.Length,(int)header.DecompressedSize);
|
||||
else
|
||||
decomp = STLibraryCompression.ZLIB.Decompress(CompressedBlock);
|
||||
|
||||
@ -414,7 +414,7 @@ namespace FirstPlugin
|
||||
}
|
||||
}
|
||||
|
||||
if (Header.Version >= 0x17)
|
||||
if (Header.Version < 0x16) //Unsure. Rabbids doesn't use it, newer versions don't.
|
||||
{
|
||||
fileId = (long)readVariadicInteger(4, reader);
|
||||
}
|
||||
|
@ -611,14 +611,13 @@ namespace FirstPlugin
|
||||
Vector3 lightDirection = new Vector3(0f, 0f, -1f);
|
||||
Vector3 difLightDirection = Vector3.TransformNormal(lightDirection, invertedCamera).Normalized();
|
||||
|
||||
GL.Enable(EnableCap.Texture2D);
|
||||
GL.Enable(EnableCap.DepthTest);
|
||||
|
||||
foreach (var model in models)
|
||||
{
|
||||
if (Runtime.RenderModels && model.Checked && model.Checked)
|
||||
{
|
||||
List<int> faces = model.lodMeshes[0].getDisplayFace();
|
||||
List<int> faces = model.getDisplayFace();
|
||||
|
||||
GL.Begin(PrimitiveType.Triangles);
|
||||
foreach (var index in faces)
|
||||
@ -626,7 +625,6 @@ namespace FirstPlugin
|
||||
Vertex vert = model.vertices[index];
|
||||
float normal = Vector3.Dot(difLightDirection, vert.nrm) * 0.5f + 0.5f;
|
||||
GL.Color3(new Vector3(normal));
|
||||
GL.TexCoord2(vert.uv0);
|
||||
GL.Vertex3(vert.pos);
|
||||
}
|
||||
GL.End();
|
||||
|
Binary file not shown.
Binary file not shown.
@ -482,8 +482,11 @@ namespace Switch_Toolbox.Library
|
||||
Extension = FindMatch(archiveFileInfo.FileData);
|
||||
}
|
||||
|
||||
if (ArchiveFileInfo.ExtensionImageKeyLookup.ContainsKey(Extension))
|
||||
SetImageKey(ArchiveFileInfo.ExtensionImageKeyLookup[Extension]);
|
||||
if (ArchiveFileInfo.ExtensionImageKeyLookup != null)
|
||||
{
|
||||
if (ArchiveFileInfo.ExtensionImageKeyLookup.ContainsKey(Extension))
|
||||
SetImageKey(ArchiveFileInfo.ExtensionImageKeyLookup[Extension]);
|
||||
}
|
||||
|
||||
switch (Extension)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user