From f4c3de8da4e21311cd4e3e43c12cd1a44b79f205 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 28 Jan 2017 23:55:54 -0500 Subject: TITANIC: Renamings for music controls --- engines/titanic/gfx/music_control.cpp | 6 +++--- engines/titanic/gfx/music_control.h | 2 +- engines/titanic/gfx/music_slider_pitch.cpp | 2 +- engines/titanic/gfx/music_slider_speed.cpp | 2 +- engines/titanic/gfx/music_switch_inversion.cpp | 2 +- engines/titanic/gfx/music_switch_reverse.cpp | 3 ++- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/engines/titanic/gfx/music_control.cpp b/engines/titanic/gfx/music_control.cpp index 317bec209f..26f27666ba 100644 --- a/engines/titanic/gfx/music_control.cpp +++ b/engines/titanic/gfx/music_control.cpp @@ -30,7 +30,7 @@ BEGIN_MESSAGE_MAP(CMusicControl, CBackground) END_MESSAGE_MAP() CMusicControl::CMusicControl() : CBackground(), - _controlArea(BELLS), _controlVal(0), _controlMax(1), _fieldEC(1) { + _controlArea(BELLS), _controlVal(0), _controlMax(1), _enabled(true) { } void CMusicControl::save(SimpleFile *file, int indent) { @@ -38,7 +38,7 @@ void CMusicControl::save(SimpleFile *file, int indent) { file->writeNumberLine(_controlArea, indent); file->writeNumberLine(_controlVal, indent); file->writeNumberLine(_controlMax, indent); - file->writeNumberLine(_fieldEC, indent); + file->writeNumberLine(_enabled, indent); CBackground::save(file, indent); } @@ -48,7 +48,7 @@ void CMusicControl::load(SimpleFile *file) { _controlArea = (MusicControlArea)file->readNumber(); _controlVal = file->readNumber(); _controlMax = file->readNumber(); - _fieldEC = file->readNumber(); + _enabled = file->readNumber(); CBackground::load(file); } diff --git a/engines/titanic/gfx/music_control.h b/engines/titanic/gfx/music_control.h index a0e73392f9..b33b4ae809 100644 --- a/engines/titanic/gfx/music_control.h +++ b/engines/titanic/gfx/music_control.h @@ -36,7 +36,7 @@ public: MusicControlArea _controlArea; int _controlVal; int _controlMax; - int _fieldEC; + bool _enabled; public: CLASSDEF; CMusicControl(); diff --git a/engines/titanic/gfx/music_slider_pitch.cpp b/engines/titanic/gfx/music_slider_pitch.cpp index 5f0432e742..49d53f7724 100644 --- a/engines/titanic/gfx/music_slider_pitch.cpp +++ b/engines/titanic/gfx/music_slider_pitch.cpp @@ -41,7 +41,7 @@ void CMusicSliderPitch::load(SimpleFile *file) { } bool CMusicSliderPitch::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) { - if (_fieldEC) { + if (_enabled) { if (++_controlVal > _controlMax) _controlVal = 0; diff --git a/engines/titanic/gfx/music_slider_speed.cpp b/engines/titanic/gfx/music_slider_speed.cpp index 93af5d82b7..bc0490677f 100644 --- a/engines/titanic/gfx/music_slider_speed.cpp +++ b/engines/titanic/gfx/music_slider_speed.cpp @@ -41,7 +41,7 @@ void CMusicSliderSpeed::load(SimpleFile *file) { } bool CMusicSliderSpeed::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) { - if (_fieldEC) { + if (_enabled) { if (++_controlVal > _controlMax) _controlVal = 0; diff --git a/engines/titanic/gfx/music_switch_inversion.cpp b/engines/titanic/gfx/music_switch_inversion.cpp index d11df79ab4..b6aa1be3e3 100644 --- a/engines/titanic/gfx/music_switch_inversion.cpp +++ b/engines/titanic/gfx/music_switch_inversion.cpp @@ -41,7 +41,7 @@ void CMusicSwitchInversion::load(SimpleFile *file) { } bool CMusicSwitchInversion::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) { - if (_fieldEC) { + if (_enabled) { if (++_controlVal > _controlMax) _controlVal = 0; diff --git a/engines/titanic/gfx/music_switch_reverse.cpp b/engines/titanic/gfx/music_switch_reverse.cpp index 9fe6d51d47..674119d571 100644 --- a/engines/titanic/gfx/music_switch_reverse.cpp +++ b/engines/titanic/gfx/music_switch_reverse.cpp @@ -39,8 +39,9 @@ void CMusicSwitchReverse::load(SimpleFile *file) { file->readNumber(); CMusicSwitch::load(file); } + bool CMusicSwitchReverse::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) { - if (_fieldEC) { + if (_enabled) { if (++_controlVal > _controlMax) _controlVal = 0; -- cgit v1.2.3