bool CMusicVoiceMute::EnterViewMsg(CEnterViewMsg *msg) { loadFrame(1 - _controlVal); CMusicRoom *musicRoom = getMusicRoom(); musicRoom->setItem5(_controlArea, _controlVal == 1 ? 1 : 0); return true; }
bool CMusicVoiceMute::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) { if (++_controlVal > _controlMax) _controlVal = 0; CMusicRoom *musicRoom = getMusicRoom(); musicRoom->setItem5(_controlArea, _controlVal == 1 ? 1 : 0); loadFrame(1 - _controlVal); playSound("z#55.wav", 50); return true; }
bool CPlayMusicButton::FrameMsg(CFrameMsg *msg) { if (_flag && !CMusicRoom::_musicHandler->isBusy()) { CMusicRoom *musicRoom = getMusicRoom(); musicRoom->stopMusic(); stopMovie(); loadFrame(0); _flag = false; } return true; }
bool CPlayMusicButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { CMusicRoom *musicRoom = getMusicRoom(); if (_flag) { musicRoom->stopMusic(); stopMovie(); loadFrame(0); _flag = false; } else { musicRoom->startMusic(100); playMovie(MOVIE_REPEAT); _ticks = getTicksCount(); _flag = true; } return true; }
bool CMusicConsoleButton::SetMusicControlsMsg(CSetMusicControlsMsg *msg) { CMusicRoom *musicRoom = getMusicRoom(); CQueryMusicControlSettingMsg queryMsg; queryMsg.execute("Bells Mute Control"); musicRoom->setMuteControl(BELLS, queryMsg._value == 1 ? 1 : 0); queryMsg.execute("Bells Pitch Control"); musicRoom->setPitchControl(BELLS, queryMsg._value); queryMsg.execute("Bells Speed Control"); musicRoom->setSpeedControl(BELLS, queryMsg._value); queryMsg.execute("Bells Inversion Control"); musicRoom->setInversionControl(BELLS, queryMsg._value == 0 ? 1 : 0); queryMsg.execute("Bells Direction Control"); musicRoom->setDirectionControl(BELLS, queryMsg._value == 0 ? 1 : 0); queryMsg.execute("Snake Mute Control"); musicRoom->setMuteControl(SNAKE, queryMsg._value == 1 ? 1 : 0); queryMsg.execute("Snake Pitch Control"); musicRoom->setPitchControl(SNAKE, queryMsg._value); queryMsg.execute("Snake Speed Control"); musicRoom->setSpeedControl(SNAKE, queryMsg._value); queryMsg.execute("Snake Inversion Control"); musicRoom->setInversionControl(SNAKE, queryMsg._value == 0 ? 1 : 0); queryMsg.execute("Snake Direction Control"); musicRoom->setDirectionControl(SNAKE, queryMsg._value == 0 ? 1 : 0); queryMsg.execute("Piano Mute Control"); musicRoom->setMuteControl(PIANO, queryMsg._value == 1 ? 1 : 0); queryMsg.execute("Piano Pitch Control"); musicRoom->setPitchControl(PIANO, queryMsg._value); queryMsg.execute("Piano Speed Control"); musicRoom->setSpeedControl(PIANO, queryMsg._value); queryMsg.execute("Piano Inversion Control"); musicRoom->setInversionControl(PIANO, queryMsg._value == 0 ? 1 : 0); queryMsg.execute("Piano Direction Control"); musicRoom->setDirectionControl(PIANO, queryMsg._value == 0 ? 1 : 0); queryMsg.execute("Bass Mute Control"); musicRoom->setMuteControl(BASS, queryMsg._value == 1 ? 1 : 0); queryMsg.execute("Bass Pitch Control"); musicRoom->setPitchControl(BASS, queryMsg._value); queryMsg.execute("Bass Speed Control"); musicRoom->setSpeedControl(BASS, queryMsg._value); queryMsg.execute("Bass Inversion Control"); musicRoom->setInversionControl(BASS, queryMsg._value == 0 ? 1 : 0); queryMsg.execute("Bass Direction Control"); musicRoom->setDirectionControl(BASS, queryMsg._value == 0 ? 1 : 0); return true; }
bool CPhonographCylinder::SetMusicControlsMsg(CSetMusicControlsMsg *msg) { if (!_itemName.hasPrefix("STMusic")) return true; CMusicRoom *musicRoom = getMusicRoom(); musicRoom->setItem5(BELLS, _bellsMuteControl); musicRoom->setItem2(BELLS, _bellsPitchControl); musicRoom->setItem1(BELLS, _bellsSpeedControl); musicRoom->setItem4(BELLS, _bellsInversionControl); musicRoom->setItem3(BELLS, _bellsDirectionControl); musicRoom->setItem5(SNAKE, _snakeMuteControl); musicRoom->setItem2(SNAKE, _snakePitchControl); musicRoom->setItem1(SNAKE, _snakeSpeedControl); musicRoom->setItem4(SNAKE, _snakeInversionControl); musicRoom->setItem3(SNAKE, _snakeDirectionControl); musicRoom->setItem5(PIANO, _pianoMuteControl); musicRoom->setItem2(PIANO, _pianoPitchControl); musicRoom->setItem1(PIANO, _pianoSpeedControl); musicRoom->setItem4(PIANO, _pianoInversionControl); musicRoom->setItem3(PIANO, _pianoDirectionControl); musicRoom->setItem5(BASS, _bassMuteControl); musicRoom->setItem2(BASS, _bassPitchControl); musicRoom->setItem1(BASS, _bassSpeedControl); musicRoom->setItem4(BASS, _bassInversionControl); musicRoom->setItem3(BASS, _bassDirectionControl); return true; }