Пример #1
0
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;
}
Пример #2
0
bool CMusicVoiceMute::EnterViewMsg(CEnterViewMsg *msg) {
	loadFrame(1 - _controlVal);
	CMusicRoom *musicRoom = getMusicRoom();
	musicRoom->setMuteControl(_controlArea, _controlVal == 1 ? 1 : 0);

	return true;
}
Пример #3
0
bool CMusicVoiceMute::MusicSettingChangedMsg(CMusicSettingChangedMsg *msg) {
	if (++_controlVal > _controlMax)
		_controlVal = 0;

	CMusicRoom *musicRoom = getMusicRoom();
	musicRoom->setMuteControl(_controlArea, _controlVal == 1 ? 1 : 0);
	loadFrame(1 - _controlVal);
	playSound("z#55.wav", 50);

	return true;
}