Broken UI system

This commit is contained in:
Jan Racek
2026-03-25 12:25:48 +01:00
parent bb8e0804f5
commit 8914ba35cc
28 changed files with 2094 additions and 25 deletions

View File

@@ -64,8 +64,9 @@ namespace SplashEdit.RuntimeCode
/// Returns the processed objects and the final VRAM pixel array.
/// </summary>
/// <param name="objects">Array of PSXObjectExporter objects to process.</param>
/// <param name="additionalTextures">Optional standalone textures (e.g. UI images) to include in VRAM packing.</param>
/// <returns>Tuple containing processed objects, texture atlases, and the VRAM pixel array.</returns>
public (PSXObjectExporter[] processedObjects, TextureAtlas[] atlases, VRAMPixel[,] vramPixels) PackTexturesIntoVRAM(PSXObjectExporter[] objects)
public (PSXObjectExporter[] processedObjects, TextureAtlas[] atlases, VRAMPixel[,] vramPixels) PackTexturesIntoVRAM(PSXObjectExporter[] objects, List<PSXTexture2D> additionalTextures = null)
{
// Gather all textures from all exporters.
List<PSXTexture2D> allTextures = new List<PSXTexture2D>();
@@ -74,6 +75,10 @@ namespace SplashEdit.RuntimeCode
allTextures.AddRange(obj.Textures);
}
// Include additional standalone textures (e.g. UI images)
if (additionalTextures != null)
allTextures.AddRange(additionalTextures);
// List to track unique textures and their indices
List<PSXTexture2D> uniqueTextures = new List<PSXTexture2D>();
Dictionary<(int, PSXBPP), int> textureToIndexMap = new Dictionary<(int, PSXBPP), int>();