bool CAutoSoundPlayer::TurnOff(CTurnOff *msg) { if (_soundHandle != -1) { if (isSoundActive(_soundHandle)) stopSound(_soundHandle, _stopSeconds); _soundHandle = -1; _active = false; } return true; }
bool CAutoSoundPlayer::SignalObject(CSignalObject *msg) { if (_soundHandle != -1) { if (isSoundActive(_soundHandle)) stopSound(_soundHandle, msg->_numValue); _soundHandle = -1; _active = false; } return true; }
bool CTelevision::PETUpMsg(CPETUpMsg *msg) { if (msg->_name == "Television" && _isOn) { if (isSoundActive(_soundHandle)) stopSound(_soundHandle, 0); _channelNum = (_channelNum % _channelsCount) + 1; stopMovie(); playMovie(START_FRAMES[_channelNum], END_FRAMES[_channelNum], MOVIE_NOTIFY_OBJECT); } return true; }
bool CTelevision::LeaveViewMsg(CLeaveViewMsg *msg) { petClear(); if (_isOn) { if (isSoundActive(_soundHandle)) stopSound(_soundHandle, 0); loadFrame(622); stopMovie(); setVisible(0); _isOn = false; if (compareRoomNameTo("CSGState")) { CVisibleMsg visibleMsg(true); visibleMsg.execute("Tellypic"); } } return true; }
bool CTelevision::PETActivateMsg(CPETActivateMsg *msg) { if (msg->_name == "Television") { CVisibleMsg visibleMsg(_isOn); _isOn = !_isOn; if (_isOn) { setVisible(true); playMovie(0, 55, 0); _channelNum = 1; } else { stopMovie(); if (isSoundActive(_soundHandle)) stopSound(_soundHandle, 0); setVisible(false); } if (compareRoomNameTo("SGTState")) visibleMsg.execute("Tellypic"); } return true; }
bool CAutoSoundPlayer::SetVolumeMsg(CSetVolumeMsg *msg) { if (_soundHandle != -1 && isSoundActive(_soundHandle)) setSoundVolume(_soundHandle, msg->_volume, msg->_secondsTransition); return true; }