// Detect It Easy: detection rule file
// Author: BJNFNE <bjnfne@web.de>

// https://wiki.scummvm.org/index.php?title=Gob/DEV7_Information#Images
meta("image", "Image (DEV7)");

function detect() {
    if (Binary.compare("'IMG10'")) {
        var img10 = Binary.getString(3, 2).trim();

        if (/^[0-9]{2}$/.test(img10)) {
            if (X.isVerbose()) sVersion = img10;
            bDetected = true;
        }
    } else if (Binary.compare("'IMG1.0.1'")) {
        var img101 = Binary.getString(3, 5).trim();

        if (/^\d+\.\d+\.\d+$/.test(img101)) {
            if (X.isVerbose()) sVersion = img101;
            bDetected = true;
        }
    }

    return result();
}