aboutsummaryrefslogtreecommitdiff
path: root/engines/dreamweb/dreamweb.cpp
diff options
context:
space:
mode:
authorMax Horn2011-12-28 17:48:33 +0100
committerWillem Jan Palenstijn2011-12-28 19:59:53 +0100
commite2c006f7935df5f6e1c37c62b5104d4e24ab4b61 (patch)
treee5ca3bf59366669ca4df9c23b99c4858b76cba2d /engines/dreamweb/dreamweb.cpp
parentea6546ae25226a22b14cbb847f13ea17a22cd22a (diff)
downloadscummvm-rg350-e2c006f7935df5f6e1c37c62b5104d4e24ab4b61.tar.gz
scummvm-rg350-e2c006f7935df5f6e1c37c62b5104d4e24ab4b61.tar.bz2
scummvm-rg350-e2c006f7935df5f6e1c37c62b5104d4e24ab4b61.zip
DREAMWEB: Remove global file handle
Diffstat (limited to 'engines/dreamweb/dreamweb.cpp')
-rw-r--r--engines/dreamweb/dreamweb.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index f942b84f76..e790baa3e3 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -54,7 +54,6 @@ DreamWebEngine::DreamWebEngine(OSystem *syst, const DreamWebGameDescription *gam
_console = 0;
DebugMan.addDebugChannel(kDebugAnimation, "Animation", "Animation Debug Flag");
DebugMan.addDebugChannel(kDebugSaveLoad, "SaveLoad", "Track Save/Load Function");
- _inSaveFile = 0;
_speed = 1;
_turbo = false;
_oldMouseState = 0;
@@ -387,43 +386,6 @@ void DreamWebEngine::setSpeed(uint speed) {
_timer->installTimerProc(vSyncInterrupt, 1000000 / 70 / speed, this, "dreamwebVSync");
}
-void DreamWebEngine::openFile(const Common::String &name) {
- processEvents();
- 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;
- error("cannot open file %s", name.c_str());
-}
-
-uint32 DreamWebEngine::skipBytes(uint32 bytes) {
- if (!_file.seek(bytes, SEEK_CUR))
- error("seek failed");
- return _file.pos();
-}
-
-uint32 DreamWebEngine::readFromFile(uint8 *dst, unsigned size) {
- processEvents();
- if (_file.isOpen())
- return _file.read(dst, size);
- if (_inSaveFile)
- return _inSaveFile->read(dst, size);
- error("file was not opened (read before open)");
-}
-
-void DreamWebEngine::closeFile() {
- processEvents();
- if (_file.isOpen())
- _file.close();
- delete _inSaveFile;
- _inSaveFile = 0;
-}
-
Common::String DreamWebEngine::getSavegameFilename(int slot) const {
// TODO: Are saves from all versions of Dreamweb compatible with each other?
// Then we can can consider keeping the filenames as DREAMWEB.Dnn.