diff options
author | Paul Gilbert | 2016-12-15 23:26:44 -0500 |
---|---|---|
committer | Paul Gilbert | 2016-12-15 23:26:44 -0500 |
commit | f29a2f31f1e37ee733f1015c3d36df798c755172 (patch) | |
tree | 077659b90daaa6a9788f651ceabd874e5b2ebcb6 | |
parent | dc58af2749a0638a1d060ae87ef17266d583f217 (diff) | |
download | scummvm-rg350-f29a2f31f1e37ee733f1015c3d36df798c755172.tar.gz scummvm-rg350-f29a2f31f1e37ee733f1015c3d36df798c755172.tar.bz2 scummvm-rg350-f29a2f31f1e37ee733f1015c3d36df798c755172.zip |
TITANIC: Fix saving and loading of NPC dial values
-rw-r--r-- | engines/titanic/true_talk/tt_npc_script.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/titanic/true_talk/tt_npc_script.cpp b/engines/titanic/true_talk/tt_npc_script.cpp index 527e33f14c..7540a738b5 100644 --- a/engines/titanic/true_talk/tt_npc_script.cpp +++ b/engines/titanic/true_talk/tt_npc_script.cpp @@ -406,9 +406,10 @@ void TTnpcScript::save(SimpleFile *file) { file->writeNumber(_dialDelta); file->writeNumber(_field7C); + // Write out the dial values file->writeNumber(10); for (int idx = 0; idx < 10; ++idx) - file->writeNumber(_data[idx]); + file->writeNumber(_dialValues[idx]); } void TTnpcScript::load(SimpleFile *file) { @@ -423,11 +424,12 @@ void TTnpcScript::load(SimpleFile *file) { for (int idx = count; idx > 4; --idx) file->readNumber(); + // Read in the dial values count = file->readNumber(); for (int idx = 0; idx < count; ++idx) { int v = file->readNumber(); if (idx < 10) - _data[idx] = v; + _dialValues[idx] = v; } } |