From c6f4da19ceb061a2834daddd558ced63f5c3add4 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 4 Feb 2017 15:20:11 -0500 Subject: TITANIC: Fix CMusicParser to produce correct results --- engines/titanic/sound/music_object.cpp | 2 +- engines/titanic/sound/music_object.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/titanic/sound/music_object.cpp b/engines/titanic/sound/music_object.cpp index 7801bc5ce5..0b6951b2d9 100644 --- a/engines/titanic/sound/music_object.cpp +++ b/engines/titanic/sound/music_object.cpp @@ -150,11 +150,11 @@ bool CMusicParser::parse(CValuePair &r) { if (_flag) break; + _flag = true; r._field0 = 0x7FFFFFFF; r._field4 = _field10; _field14 = 0; _field1C += _field10; - _field10 = 1; FETCH_CHAR; } else if (_currentChar == '|') { _field1C = 0; diff --git a/engines/titanic/sound/music_object.h b/engines/titanic/sound/music_object.h index a4b11105ea..67fef67b85 100644 --- a/engines/titanic/sound/music_object.h +++ b/engines/titanic/sound/music_object.h @@ -31,6 +31,7 @@ namespace Titanic { struct CValuePair { uint _field0; uint _field4; + CValuePair() : _field0(0), _field4(0) {} }; class CMusicObject { -- cgit v1.2.3