mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-05-20 20:28:05 -05:00
Use the correct palette for 1-bit and 2-bit sprites (footprints and fonts)
This commit is contained in:
parent
3b22e8a2de
commit
02bfb3e35a
|
|
@ -431,8 +431,8 @@ namespace HavenSoft.HexManiac.Core.ViewModels {
|
|||
var spriteRun = inputRun as ISpriteRun;
|
||||
var palRun = inputRun as IPaletteRun;
|
||||
if (spriteRun == null) spriteRun = palRun.FindDependentSprites(model).First();
|
||||
if (palRun == null) palRun = spriteRun.FindRelatedPalettes(model).FirstOrDefault();
|
||||
if (palRun == null) palRun = model.GetNextRun(toolPaletteAddress) as IPaletteRun;
|
||||
if (palRun == null && spriteRun.SpriteFormat.BitsPerPixel > 2) palRun = spriteRun.FindRelatedPalettes(model).FirstOrDefault();
|
||||
if (palRun == null && spriteRun.SpriteFormat.BitsPerPixel > 2) palRun = model.GetNextRun(toolPaletteAddress) as IPaletteRun;
|
||||
SpritePointer = spriteRun.PointerSources[0];
|
||||
PalettePointer = palRun?.PointerSources[0] ?? Pointer.NULL;
|
||||
Palette = new PaletteCollection(this, model, history) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user