[Scummvm-cvs-logs] SF.net SVN: scummvm: [30368] scummvm/branches/branch-0-11-0/engines/lure
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Thu Jan 10 10:45:20 CET 2008
Revision: 30368
http://scummvm.svn.sourceforge.net/scummvm/?rev=30368&view=rev
Author: dreammaster
Date: 2008-01-10 01:45:19 -0800 (Thu, 10 Jan 2008)
Log Message:
-----------
Backport of r30367 - Added proper reset of barmen data when game is restarted, and added missing barman data to savegames
Modified Paths:
--------------
scummvm/branches/branch-0-11-0/engines/lure/luredefs.h
scummvm/branches/branch-0-11-0/engines/lure/res.cpp
scummvm/branches/branch-0-11-0/engines/lure/res_struct.cpp
scummvm/branches/branch-0-11-0/engines/lure/res_struct.h
Modified: scummvm/branches/branch-0-11-0/engines/lure/luredefs.h
===================================================================
--- scummvm/branches/branch-0-11-0/engines/lure/luredefs.h 2008-01-10 09:42:51 UTC (rev 30367)
+++ scummvm/branches/branch-0-11-0/engines/lure/luredefs.h 2008-01-10 09:45:19 UTC (rev 30368)
@@ -36,7 +36,7 @@
#define LURE_DAT_MAJOR 1
#define LURE_DAT_MINOR 28
#define LURE_MIN_SAVEGAME_MINOR 25
-#define LURE_SAVEGAME_MINOR 29
+#define LURE_SAVEGAME_MINOR 30
#define LURE_DEBUG 1
Modified: scummvm/branches/branch-0-11-0/engines/lure/res.cpp
===================================================================
--- scummvm/branches/branch-0-11-0/engines/lure/res.cpp 2008-01-10 09:42:51 UTC (rev 30367)
+++ scummvm/branches/branch-0-11-0/engines/lure/res.cpp 2008-01-10 09:45:19 UTC (rev 30368)
@@ -97,6 +97,7 @@
freeData();
_fieldList.reset();
+ _barmanLists.reset();
_talkState = TALK_NONE;
_activeTalkData = NULL;
Modified: scummvm/branches/branch-0-11-0/engines/lure/res_struct.cpp
===================================================================
--- scummvm/branches/branch-0-11-0/engines/lure/res_struct.cpp 2008-01-10 09:42:51 UTC (rev 30367)
+++ scummvm/branches/branch-0-11-0/engines/lure/res_struct.cpp 2008-01-10 09:45:19 UTC (rev 30368)
@@ -1153,6 +1153,11 @@
_barList[index] = default_barList[index];
}
+void BarmanLists::reset() {
+ for (int index = 0; index < 3; ++index)
+ _barList[index] = default_barList[index];
+}
+
BarEntry &BarmanLists::getDetails(uint16 roomNumber) {
for (int index = 0; index < 3; ++index)
if (_barList[index].roomNumber == roomNumber)
@@ -1173,7 +1178,10 @@
}
void BarmanLists::loadFromStream(Common::ReadStream *stream) {
- for (int index = 0; index < 2; ++index) {
+ uint8 saveVersion = LureEngine::getReference().saveVersion();
+ int numEntries = (saveVersion >= 30) ? 3 : 2;
+
+ for (int index = 0; index < numEntries; ++index) {
int16 value = stream->readUint16LE();
_barList[index].currentCustomer = (value == 0) ? NULL : &_barList[index].customers[value - 1];
Modified: scummvm/branches/branch-0-11-0/engines/lure/res_struct.h
===================================================================
--- scummvm/branches/branch-0-11-0/engines/lure/res_struct.h 2008-01-10 09:42:51 UTC (rev 30367)
+++ scummvm/branches/branch-0-11-0/engines/lure/res_struct.h 2008-01-10 09:45:19 UTC (rev 30368)
@@ -774,6 +774,7 @@
public:
BarmanLists();
+ void reset();
BarEntry &getDetails(uint16 roomNumber);
void saveToStream(Common::WriteStream *stream);
void loadFromStream(Common::ReadStream *stream);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list