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