diff options
author | David Corrales | 2007-05-31 23:44:43 +0000 |
---|---|---|
committer | David Corrales | 2007-05-31 23:44:43 +0000 |
commit | 0cab5b7791e56b32455748bf20c21f0d6b42f654 (patch) | |
tree | 9e6580328542f1db230e019ba77e3db1be8fa50b /engines/agos/saveload.cpp | |
parent | 6c69d531d262e14fa02b6e1adb42baaa5c74dbe6 (diff) | |
parent | 22c0403e0dfec16badf156afa842c6c37e850263 (diff) | |
download | scummvm-rg350-0cab5b7791e56b32455748bf20c21f0d6b42f654.tar.gz scummvm-rg350-0cab5b7791e56b32455748bf20c21f0d6b42f654.tar.bz2 scummvm-rg350-0cab5b7791e56b32455748bf20c21f0d6b42f654.zip |
Merged the fs branch with trunk. r26949:27031
svn-id: r27032
Diffstat (limited to 'engines/agos/saveload.cpp')
-rw-r--r-- | engines/agos/saveload.cpp | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp index de3a0f416a..1267e27daa 100644 --- a/engines/agos/saveload.cpp +++ b/engines/agos/saveload.cpp @@ -1,6 +1,8 @@ -/* ScummVM - Scumm Interpreter - * Copyright (C) 2001 Ludvig Strigeus - * Copyright (C) 2001-2006 The ScummVM project +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -247,7 +249,7 @@ void AGOSEngine::userGame(bool load) { name = buf + 192; for (;;) { - windowPutChar(window, 127); + windowPutChar(window, 128); _saveLoadEdit = true; @@ -980,6 +982,14 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) { addTimeEvent(timeout, subroutine_id); } + if (getGameType() == GType_WW) { + // TODO Load room state data + for (uint s = 0; s <= _numRoomStates; s++) { + f->readUint16BE(); + } + f->readUint16BE(); + } + item_index = 1; for (num = _itemArrayInited - 1; num; num--) { Item *item = _itemArrayPtr[item_index++], *parent_item; @@ -1042,7 +1052,7 @@ bool AGOSEngine_Elvira2::loadGame(const char *filename, bool restartMode) { // read the items in item store for (i = 0; i != _numItemStore; i++) { - if (getGameType() == GType_ELVIRA2) { + if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformPC) { _itemStore[i] = derefItem(readItemID(f)); } else { _itemStore[i] = derefItem(f->readUint16BE()); @@ -1120,6 +1130,14 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) { f->writeUint16BE(te->subroutine_id); } + if (getGameType() == GType_WW) { + // TODO Save room state data + for (uint s = 0; s <= _numRoomStates; s++) { + f->writeUint16BE(0); + } + f->writeUint16BE(_currentRoom); + } + item_index = 1; for (num_item = _itemArrayInited - 1; num_item; num_item--) { Item *item = _itemArrayPtr[item_index++]; @@ -1173,7 +1191,7 @@ bool AGOSEngine_Elvira2::saveGame(uint slot, const char *caption) { // write the items in item store for (i = 0; i != _numItemStore; i++) { - if (getGameType() == GType_ELVIRA2) { + if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformPC) { writeItemID(f, itemPtrToID(_itemStore[i])); } else { f->writeUint16BE(itemPtrToID(_itemStore[i])); |