mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-13 21:20:58 +00:00
add dumpFile(), as per rest of scummvm dumps dir must exist etc missed a file..
svn-id: r6796
This commit is contained in:
parent
ee26af6e50
commit
d7f21b46e8
18
sky/disk.cpp
18
sky/disk.cpp
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user