TITANIC: Renamings for music controls

This commit is contained in:
Paul Gilbert 2017-01-28 23:55:54 -05:00
parent ce264f89da
commit f4c3de8da4
6 changed files with 9 additions and 8 deletions

View File

@ -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);
}

View File

@ -36,7 +36,7 @@ public:
MusicControlArea _controlArea;
int _controlVal;
int _controlMax;
int _fieldEC;
bool _enabled;
public:
CLASSDEF;
CMusicControl();

View File

@ -41,7 +41,7 @@ void CMusicSliderPitch::load(SimpleFile *file) {
}
bool CMusicSliderPitch::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) {
if (_fieldEC) {
if (_enabled) {
if (++_controlVal > _controlMax)
_controlVal = 0;

View File

@ -41,7 +41,7 @@ void CMusicSliderSpeed::load(SimpleFile *file) {
}
bool CMusicSliderSpeed::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) {
if (_fieldEC) {
if (_enabled) {
if (++_controlVal > _controlMax)
_controlVal = 0;

View File

@ -41,7 +41,7 @@ void CMusicSwitchInversion::load(SimpleFile *file) {
}
bool CMusicSwitchInversion::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) {
if (_fieldEC) {
if (_enabled) {
if (++_controlVal > _controlMax)
_controlVal = 0;

View File

@ -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;