diff --git a/tools/mpq-viewer/src/main/java/com/riiablo/tool/mpqviewer/MpqViewer.java b/tools/mpq-viewer/src/main/java/com/riiablo/tool/mpqviewer/MpqViewer.java index 1e3db5f7..dcad4c3c 100644 --- a/tools/mpq-viewer/src/main/java/com/riiablo/tool/mpqviewer/MpqViewer.java +++ b/tools/mpq-viewer/src/main/java/com/riiablo/tool/mpqviewer/MpqViewer.java @@ -2007,6 +2007,21 @@ public class MpqViewer extends Tool { batch.begin(); } }); + } else if (extension.equals("DAT")) { // palette + // TODO: update to new asset manager? + AssetDesc asset = AssetDesc.of(filename, Palette.class, MpqParams.of()); + MpqFileHandle handle = mpqs.resolve(asset); + try { + Palette pal = Palette.read(handle.buffer()); + renderer.setDrawable(new TextureRegionDrawable(pal.texture()) {{ + final float scale = 8; + setMinSize( + pal.texture().getWidth() * scale, + pal.texture().getHeight() * scale); + }}); + } finally { + handle.release(); + } } }