// Check the roms to see if they code, graphics etc are complete static int CheckRoms() { nBzipError = 0; // Assume romset is fine for (int i = 0; i < nRomCount; i++) { struct BurnRomInfo ri; memset(&ri, 0, sizeof(ri)); BurnDrvGetRomInfo(&ri, i); // Find information about the wanted rom if (ri.nCrc && (ri.nType & 0x80) == 0) { int nState = RomFind[i].nState; // Get the state of the rom in the zip file if (nState == 0 && ri.nType) { // (A type of 0 means empty slot - no rom) char* szName = "Unknown"; RomDescribe(&BzipDetail, &ri); BurnDrvGetRomName(&szName, i, 0); BzipDetail.Add(_T("%hs was not found.\n"), szName); } if (ri.nType & 0x90) { // essential rom - without it the game may not run at all nBzipError |= GetBZipError(nState) << 0; } if (ri.nType & 0x01) { // rom which contains graphics information nBzipError |= GetBZipError(nState) << 1; } if (ri.nType & 0x02) { // rom which contains sound information nBzipError |= GetBZipError(nState) << 2; } } } if (!nZipsFound) { nBzipError |= 0x08; // No data at all! } return 0; }
// Check the roms to see if they code, graphics etc are complete static int CheckRoms() { nBzipError = 0; // Assume romset is fine for (int i = 0; i < nRomCount; i++) { struct BurnRomInfo ri; memset(&ri, 0, sizeof(ri)); BurnDrvGetRomInfo(&ri, i); // Find information about the wanted rom if (ri.nCrc && (ri.nType & BRF_OPT) == 0 && (ri.nType & BRF_NODUMP)) { int nState = RomFind[i].nState; // Get the state of the rom in the zip file int nError = GetBZipError(nState); if (nState == 0 && ri.nType) { // (A type of 0 means empty slot - no rom) char* szName = "Unknown"; RomDescribe(&BzipDetail, &ri); BurnDrvGetRomName(&szName, i, 0); BzipDetail.Add(_T("%hs was not found.\n"), szName); } if (nError == 0) { nBzipError |= 0x2000; } if (ri.nType & BRF_ESS) { // essential rom - without it the game may not run at all nBzipError |= nError << 0; } if (ri.nType & BRF_PRG) { // rom which contains program information nBzipError |= nError << 1; } if (ri.nType & BRF_GRA) { // rom which contains graphics information nBzipError |= nError << 2; } if (ri.nType & BRF_SND) { // rom which contains sound information nBzipError |= nError << 3; } } } if (nBzipError & 0x0F0F) { nBzipError |= 0x4000; } return 0; }
// Check the roms to see if they code, graphics etc are complete static int CheckRoms() { for (int i = 0; i < nRomCount; i++) { struct BurnRomInfo ri; memset(&ri, 0, sizeof(ri)); BurnDrvGetRomInfo(&ri, i); // Find information about the wanted rom if ( /*ri.nCrc &&*/ (ri.nType & BRF_OPT) == 0 && (ri.nType & BRF_NODUMP) == 0) { int nState = RomFind[i].nState; // Get the state of the rom in the zip file int nError = GetBZipError(nState); if (nState == 0 && ri.nType) { // (A type of 0 means empty slot - no rom) char* szName = "Unknown"; RomDescribe(&ri); BurnDrvGetRomName(&szName, i, 0); // FBAPopupAddText(PUF_TEXT_DEFAULT, MAKEINTRESOURCE(IDS_ERR_LOAD_NOTFOUND), szName); } if (nError == 0) { nBzipError |= 0x2000; } if (ri.nType & BRF_ESS) { // essential rom - without it the game may not run at all nBzipError |= nError << 0; } if (ri.nType & BRF_PRG) { // rom which contains program information nBzipError |= nError << 1; } if (ri.nType & BRF_GRA) { // rom which contains graphics information nBzipError |= nError << 2; } if (ri.nType & BRF_SND) { // rom which contains sound information nBzipError |= nError << 3; } } } if (nBzipError & 0x0F0F) { nBzipError |= 0x4000; } return 0; }