changeset 1812:7460a9b804e9

Oops. Add missing fmtProbeCosmosDesignsHiresManager() function. :S
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 21 Jun 2018 13:04:53 +0300
parents 4f141426eb31
children cfe9807a1e64
files tools/lib64fmts.c
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tools/lib64fmts.c	Thu Jun 21 13:01:57 2018 +0300
+++ b/tools/lib64fmts.c	Thu Jun 21 13:04:53 2018 +0300
@@ -640,6 +640,25 @@
 }
 
 
+static int fmtProbeCosmosDesignsHiresManager(const DMGrowBuf *buf, const DMC64ImageFormat *fmt)
+{
+    if (buf->len > 32 && dmCompareAddr16(buf, 0, fmt->addr))
+    {
+        // Packed variant
+        if (fmt->size == 0 &&
+            dmCompareAddr16(buf, 2, fmt->addr + buf->len - 3) &&
+            dmCompareAddr16(buf, 4, 0x7ff2))
+            return DM_PROBE_SCORE_MAX;
+
+        // Unpacked variant
+        if (fmt->size != 0 && fmt->size == buf->len)
+            return DM_PROBE_SCORE_GOOD;
+    }
+
+    return DM_PROBE_SCORE_FALSE;
+}
+
+
 #define FUNPAINT2_HEADER_SIZE (0x10)
 static const char *fmtFunPaint2MagicID = "FUNPAINT (MT) ";