// DIE's signature file
// Author: Tembo (http://tembolab.pl/products/executable-image-viewer.html)

init("format", "Guitar Pro");

function detect(bShowType,bShowVersion,bShowOptions)
{
    if (Binary.getSize() > 31)
    {
        if (Binary.compare("'BCFZ'") || Binary.compare("'BCFS'"))
        {
            sVersion = "6.x";
            sName += " Tablature";
            bDetected = true;
        }
        else if (Binary.compare("'GPAR'"))
        {
            sVersion = "6.x";
            sName += " Soundbank";
            bDetected = true;
        }
        else  if (Binary.compare("18'FICHIER GUITAR PRO'20"))
        {
            sVersion = Binary.getString(0x14, 5);
            if (sVersion)
            {
                sName += " Tablature";
                bDetected = true;
            }
        }
    }

    return result(bShowType,bShowVersion,bShowOptions);
}