[Scummvm-git-logs] scummvm master -> d07f2c8af20a197a396e62ec5150da869139296f
a-yyg
76591232+a-yyg at users.noreply.github.com
Thu Jul 15 12:08:20 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6518db9554 SAGA2: Fix original Tasks save/loading
d07f2c8af2 SAGA2: Fix rest of save/loading code
Commit: 6518db95547a6a9907060c8c69532237a95e0e8f
https://github.com/scummvm/scummvm/commit/6518db95547a6a9907060c8c69532237a95e0e8f
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-15T20:59:45+09:00
Commit Message:
SAGA2: Fix original Tasks save/loading
Changed paths:
engines/saga2/task.cpp
diff --git a/engines/saga2/task.cpp b/engines/saga2/task.cpp
index df2f748a3c..31ebae0889 100644
--- a/engines/saga2/task.cpp
+++ b/engines/saga2/task.cpp
@@ -475,7 +475,7 @@ void TaskList::read(Common::InSaveFile *in) {
// Retreive the Task's id number
id = in->readSint16LE();
- debugC(3, kDebugSaveload, "Loading Task %d", i);
+ debugC(3, kDebugSaveload, "Loading Task %d (%d)", i, id);
readTask(id, in);
}
@@ -773,7 +773,7 @@ void Task::write(Common::MemoryWriteStreamDynamic *out) const {
WanderTask::WanderTask(Common::InSaveFile *in, TaskID id) : Task(in, id) {
// Restore the paused flag
- paused = in->readByte();
+ paused = in->readUint16LE();
// Restore the counter
counter = in->readSint16LE();
@@ -794,7 +794,7 @@ void WanderTask::write(Common::MemoryWriteStreamDynamic *out) const {
Task::write(out);
// Store the paused flag
- out->writeByte(paused);
+ out->writeUint16LE(paused);
// Store the counter
out->writeSint16LE(counter);
@@ -1059,7 +1059,7 @@ GotoTask::GotoTask(Common::InSaveFile *in, TaskID id) : Task(in, id) {
wander = nullptr;
// Restore prevRunState
- prevRunState = in->readByte();
+ prevRunState = in->readUint16LE();
}
//----------------------------------------------------------------------
@@ -1097,7 +1097,7 @@ void GotoTask::write(Common::MemoryWriteStreamDynamic *out) const {
out->writeSint16LE(NoTask);
// Store prevRunState
- out->writeByte(prevRunState);
+ out->writeUint16LE(prevRunState);
}
#if DEBUG
@@ -2509,7 +2509,7 @@ HuntToPossessTask::HuntToPossessTask(Common::InSaveFile *in, TaskID id) : HuntOb
targetEvaluateCtr = in->readByte();
// Restore grab flag
- grabFlag = in->readByte();
+ grabFlag = in->readUint16LE();
}
//----------------------------------------------------------------------
@@ -2532,7 +2532,7 @@ void HuntToPossessTask::write(Common::MemoryWriteStreamDynamic *out) const {
out->writeByte(targetEvaluateCtr);
// Store the grab flag
- out->writeByte(grabFlag);
+ out->writeUint16LE(grabFlag);
}
//----------------------------------------------------------------------
@@ -3849,7 +3849,7 @@ FollowPatrolRouteTask::FollowPatrolRouteTask(Common::InSaveFile *in, TaskID id)
lastWayPointNum = in->readSint16LE();
// Restore the paused flag
- paused = in->readByte();
+ paused = in->readUint16LE();
// Restore the paused counter
counter = in->readSint16LE();
@@ -3900,7 +3900,7 @@ void FollowPatrolRouteTask::write(Common::MemoryWriteStreamDynamic *out) const {
out->writeSint16LE(lastWayPointNum);
// Store the paused flag
- out->writeByte(paused);
+ out->writeUint16LE(paused);
// Store the paused counter
out->writeSint16LE(counter);
Commit: d07f2c8af20a197a396e62ec5150da869139296f
https://github.com/scummvm/scummvm/commit/d07f2c8af20a197a396e62ec5150da869139296f
Author: a/ (yuri.kgpps at gmail.com)
Date: 2021-07-15T21:07:09+09:00
Commit Message:
SAGA2: Fix rest of save/loading code
Changed paths:
engines/saga2/contain.cpp
engines/saga2/intrface.cpp
diff --git a/engines/saga2/contain.cpp b/engines/saga2/contain.cpp
index db9879ed67..c06bf1f8ee 100644
--- a/engines/saga2/contain.cpp
+++ b/engines/saga2/contain.cpp
@@ -1441,7 +1441,7 @@ void ContainerNode::read(Common::InSaveFile *in) {
window = NULL;
action = 0;
- bool shown = in->readByte();
+ bool shown = in->readUint16LE();
// If this container was shown, re-show it
if (shown)
@@ -1462,7 +1462,7 @@ void ContainerNode::write(Common::MemoryWriteStreamDynamic *out) {
out->writeByte(owner);
position.write(out);
out->writeByte(mindType);
- out->writeByte(window != NULL);
+ out->writeUint16LE(window != NULL);
debugC(4, kDebugSaveload, "... object = %d", object);
debugC(4, kDebugSaveload, "... type = %d", type);
diff --git a/engines/saga2/intrface.cpp b/engines/saga2/intrface.cpp
index 7876fe2ee5..8ea5b03648 100644
--- a/engines/saga2/intrface.cpp
+++ b/engines/saga2/intrface.cpp
@@ -2598,7 +2598,7 @@ void saveUIState(Common::OutSaveFile *out) {
out->write("UIST", 4);
out->writeUint32LE(UIStateArchive::kUIStateArchiveSize);
- out->writeByte(indivControlsFlag);
+ out->writeUint16LE(indivControlsFlag);
out->writeUint16LE(indivBrother);
debugC(3, kDebugSaveload, "... indivControlsFlag = %d", indivControlsFlag);
@@ -2608,7 +2608,7 @@ void saveUIState(Common::OutSaveFile *out) {
void loadUIState(Common::InSaveFile *in) {
debugC(2, kDebugSaveload, "Loading UIState");
- indivControlsFlag = in->readByte();
+ indivControlsFlag = in->readUint16LE();
indivBrother = in->readUint16LE();
debugC(3, kDebugSaveload, "... indivControlsFlag = %d", indivControlsFlag);
More information about the Scummvm-git-logs
mailing list