diff options
author | Max Horn | 2011-12-09 16:04:45 +0100 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-12-11 10:02:50 +0100 |
commit | 6b226d5943b61e700a8ec7a3099c99f654f13b89 (patch) | |
tree | 1354d866876ea7c9c9f5463fe6878bf1cc6b0cdd /engines/dreamweb/dreamweb.cpp | |
parent | 3d753794e6c266e7ee7bd1858a6175d34707e140 (diff) | |
download | scummvm-rg350-6b226d5943b61e700a8ec7a3099c99f654f13b89.tar.gz scummvm-rg350-6b226d5943b61e700a8ec7a3099c99f654f13b89.tar.bz2 scummvm-rg350-6b226d5943b61e700a8ec7a3099c99f654f13b89.zip |
DREAMWEB: Do savefile reading directly in loadPosition() / scanForNames()
Diffstat (limited to 'engines/dreamweb/dreamweb.cpp')
-rw-r--r-- | engines/dreamweb/dreamweb.cpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp index 12fea56202..b4fc1b7b77 100644 --- a/engines/dreamweb/dreamweb.cpp +++ b/engines/dreamweb/dreamweb.cpp @@ -232,6 +232,9 @@ void DreamWebEngine::openFile(const Common::String &name) { closeFile(); if (_file.open(name)) return; + // File not found? See if there is a save state with this name + // FIXME: Is this really needed? If yes, document why; if not, + // remove all traces of _inSaveFile. _inSaveFile = _saveFileMan->openForLoading(name); if (_inSaveFile) return; @@ -270,20 +273,6 @@ Common::String DreamWebEngine::getSavegameFilename(int slot) const { return filename; } -bool DreamWebEngine::openSaveFileForReading(const Common::String &name) { - processEvents(); - delete _inSaveFile; - _inSaveFile = _saveFileMan->openForLoading(name); - return _inSaveFile != 0; -} - -uint DreamWebEngine::readFromSaveFile(uint8 *data, uint size) { - processEvents(); - if (!_inSaveFile) - error("save file was not opened for reading"); - return _inSaveFile->read(data, size); -} - void DreamWebEngine::keyPressed(uint16 ascii) { debug(2, "key pressed = %04x", ascii); uint16 in = (_base.data.word(DreamGen::kBufferin) + 1) & 0x0f; |