bug fixes

This commit is contained in:
haven1433 2025-11-27 15:43:19 -06:00
parent 68991ed780
commit 4c3adfc2a0
2 changed files with 9 additions and 2 deletions

View File

@ -1,7 +1,6 @@
using HavenSoft.HexManiac.Core.Models.Runs;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
@ -515,6 +514,9 @@ namespace HavenSoft.HexManiac.Core.Models {
if (name == MoveTutors) format = format.Replace("]15", "]128");
if (name == TmMoves) format = format.Replace("]58", "]128");
// graphics.pokemon.type.map[width. height. xy:|t|:|x:|.|y::]data.pokemon.type.names+1+2
if (name == "graphics.pokemon.type.map") format = format.Replace("data.pokemon.type.names+1+5", "data.pokemon.type.names+1+2");
// overworld sprites
if (name == OverworldSprites) format = format.Replace("graphics.overworld.tablelength", "240");

View File

@ -1696,7 +1696,12 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Tools {
}
}
}
fileSystem.SaveImage(pixels, palette);
try {
fileSystem.SaveImage(pixels, palette);
} catch (Exception) {
// failed to export - try again using the un-indexed system.
fileSystem.SaveImage(PixelData, PixelWidth);
}
}
}