diff options
author | Paul Gilbert | 2017-02-04 19:20:11 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-04 19:20:11 -0500 |
commit | c31efeb8c7279d83e417d33705eeb50046ccef71 (patch) | |
tree | 3089a3010021e4b62a0187ac0af4a18146e4fe17 /engines/titanic/true_talk | |
parent | b005198eb15c15450a67842f8e8b936c3a0d08a6 (diff) | |
download | scummvm-rg350-c31efeb8c7279d83e417d33705eeb50046ccef71.tar.gz scummvm-rg350-c31efeb8c7279d83e417d33705eeb50046ccef71.tar.bz2 scummvm-rg350-c31efeb8c7279d83e417d33705eeb50046ccef71.zip |
TITANIC: Add missing copyData method to TTnpcScript
Diffstat (limited to 'engines/titanic/true_talk')
-rw-r--r-- | engines/titanic/true_talk/tt_npc_script.cpp | 8 | ||||
-rw-r--r-- | engines/titanic/true_talk/tt_npc_script.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/engines/titanic/true_talk/tt_npc_script.cpp b/engines/titanic/true_talk/tt_npc_script.cpp index ba205b6498..990f22722d 100644 --- a/engines/titanic/true_talk/tt_npc_script.cpp +++ b/engines/titanic/true_talk/tt_npc_script.cpp @@ -113,6 +113,13 @@ void TTnpcData::resetFlags() { Common::fill(&_array[20], &_array[136], 0); } +void TTnpcData::copyData() { + if (_array[20]) { + Common::copy_backward(&_array[16], &_array[136], &_array[24]); + Common::fill(&_array[20], &_array[28], 0); + } +} + /*------------------------------------------------------------------------*/ TTnpcScriptBase::TTnpcScriptBase(int charId_, const char *charClass, int v2, @@ -803,6 +810,7 @@ TTscriptRange *TTnpcScript::findRange(uint id) { } void TTnpcScript::checkItems(const TTroomScript *roomScript, const TTsentence *sentence) { + _data.copyData(); _field2CC = 0; ++CTrueTalkManager::_v2; diff --git a/engines/titanic/true_talk/tt_npc_script.h b/engines/titanic/true_talk/tt_npc_script.h index e5be7d7296..c2f001f8cc 100644 --- a/engines/titanic/true_talk/tt_npc_script.h +++ b/engines/titanic/true_talk/tt_npc_script.h @@ -43,6 +43,8 @@ public: int &operator[](int idx) { return _array[idx]; } int *getSlot(int idx) { return &_array[16 + idx * 4]; } void resetFlags(); + + void copyData(); }; class TTnpcScriptBase : public TTscriptBase { |