The code doesn't try to pack 16bpp cluts anymore
This commit is contained in:
@@ -134,14 +134,17 @@ public class VRAMEditorWindow : EditorWindow
|
|||||||
Debug.Log($"Packing {texture} at: x:{ta.PositionX + texture.PackingX} y:{ta.PositionY + texture.PackingY}");
|
Debug.Log($"Packing {texture} at: x:{ta.PositionX + texture.PackingX} y:{ta.PositionY + texture.PackingY}");
|
||||||
PasteTexture(vramImage, texture.GenerateVramPreview(), ta.PositionX + texture.PackingX, ta.PositionY + texture.PackingY);
|
PasteTexture(vramImage, texture.GenerateVramPreview(), ta.PositionX + texture.PackingX, ta.PositionY + texture.PackingY);
|
||||||
Debug.Log($"Texpage: {texture.TexpageNum} Offset:({texture.PackingX},{texture.PackingY})");
|
Debug.Log($"Texpage: {texture.TexpageNum} Offset:({texture.PackingX},{texture.PackingY})");
|
||||||
|
if (texture.BitDepth != PSXBPP.TEX_16BIT)
|
||||||
for(int i = 0; i < texture.ColorPalette.Count; i++) {
|
{
|
||||||
|
for (int i = 0; i < texture.ColorPalette.Count; i++)
|
||||||
|
{
|
||||||
vramImage.SetPixel(texture.ClutPackingX + i, texture.ClutPackingY, texture.ColorPalette[i].GetUnityColor());
|
vramImage.SetPixel(texture.ClutPackingX + i, texture.ClutPackingY, texture.ColorPalette[i].GetUnityColor());
|
||||||
}
|
}
|
||||||
vramImage.Apply();
|
vramImage.Apply();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void OnGUI()
|
private void OnGUI()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ namespace PSXSplash.RuntimeCode
|
|||||||
psxTex.ImageData[i] = vramPixel.Pack();
|
psxTex.ImageData[i] = vramPixel.Pack();
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
psxTex.ColorPalette = null;
|
||||||
return psxTex;
|
return psxTex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user