add dumpFile(), as per rest of scummvm dumps dir must exist etc missed a file..

svn-id: r6796
This commit is contained in:
Jonathan Gray 2003-03-11 07:19:16 +00:00
parent ee26af6e50
commit d7f21b46e8

View File

@ -203,3 +203,21 @@ uint16 *SkyState::getFileInfo(uint16 fileNr) {
return (uint16 *)NULL;
}
void SkyState::dumpFile(uint16 fileNr) {
char buf[128];
File out;
byte* filePtr;
filePtr = (byte *)loadFile(fileNr, NULL);
sprintf(buf, "dumps/file-%d.dmp", fileNr);
out.open(buf, "", 1);
if (out.isOpen() == false) {
out.open(buf, "", 2);
if (out.isOpen() == false)
return;
out.write(filePtr, _lastLoadedFileSize);
}
out.close();
free(filePtr);
}