void PlaySpeech(byte[] ptr) { if (Game.GameId == GameId.Dig && /*(ConfMan.getBool("speech_mute") ||*/ Variables[VariableVoiceMode.Value] == 2) { return; } if ((Game.GameId == GameId.Dig || Game.GameId == GameId.CurseOfMonkeyIsland) && ptr[0] != 0) { var count = Array.IndexOf(ptr, (byte)0); if (count < 0) { count = ptr.Length - 1; } var pointer = ptr.GetText(0, count); // Play speech if (!Game.Features.HasFlag(GameFeatures.Demo) && Game.GameId == GameId.CurseOfMonkeyIsland) // CMI demo does not have .IMX for voice { pointer += ".IMX"; } Sound.StopTalkSound(); IMuseDigital.StopSound(Sound.TalkSoundID); IMuseDigital.StartVoice(Sound.TalkSoundID, pointer); Sound.TalkSound(0, 0, 2); } }
public ScummEngine7(GameSettings game, IGraphicsManager graphicsManager, IInputManager inputManager, IMixer mixer) : base(game, graphicsManager, inputManager, mixer) { if (Game.GameId == GameId.Dig && (Game.Features.HasFlag(GameFeatures.Demo))) { _smushFrameRate = 15; } else { _smushFrameRate = (Game.GameId == GameId.FullThrottle) ? 10 : 12; } for (int i = 0; i < _subtitleQueue.Length; i++) { _subtitleQueue[i] = new SubtitleText(); } int dimuseTempo = 10; MusicEngine = IMuseDigital = new IMuseDigital(this, mixer, dimuseTempo); IMuseDigital.SetAudioNames(ResourceManager.AudioNames); // Create FT INSANE object if (Game.GameId == GameId.FullThrottle) { Insane = new Insane.Insane(this); } SmushMixer = new SmushMixer(Mixer); SmushPlayer = new SmushPlayer(this); }
protected internal override void HandleSound() { base.HandleSound(); if (IMuseDigital != null) { IMuseDigital.FlushTracks(); // In CoMI and the Dig the full (non-demo) version invoke IMuseDigital::refreshScripts if ((Game.GameId == GameId.Dig || Game.GameId == GameId.CurseOfMonkeyIsland) && !(Game.Features.HasFlag(GameFeatures.Demo))) { IMuseDigital.RefreshScripts(); } } if (SmushMixer != null) { SmushMixer.Flush(); } }
void akos_processQueue() { byte cmd; int actor, param_1, param_2; while (_akosQueuePos != 0) { cmd = (byte)_akosQueue[_akosQueuePos].cmd; actor = _akosQueue[_akosQueuePos].actor; param_1 = _akosQueue[_akosQueuePos].param1; param_2 = _akosQueue[_akosQueuePos].param2; _akosQueuePos--; var a = Actors[actor]; switch (cmd) { case 1: a.PutActor(new Point(), 0); break; case 3: if (param_1 != 0) { if (IMuseDigital != null) { IMuseDigital.StartSfx(param_1, 63); } } break; case 4: a.StartAnimActor(param_1); break; case 5: a.ForceClip = (byte)param_1; break; // case 6: // a._heOffsX = param_1; // a._heOffsY = param_2; // break; case 7: if (param_1 != 0) { if (IMuseDigital != null) { IMuseDigital.SetVolume(param_1, param_2); } } break; case 8: if (param_1 != 0) { if (IMuseDigital != null) { IMuseDigital.SetPan(param_1, param_2); } } break; case 9: if (param_1 != 0) { if (IMuseDigital != null) { IMuseDigital.SetPriority(param_1, param_2); } } break; default: throw new InvalidOperationException(string.Format("akos_queCommand({0},{1},{2},{3})", cmd, a.Number, param_1, param_2)); } } }