StopTalkSound() публичный Метод

public StopTalkSound ( ) : void
Результат void
Пример #1
0
        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);
            }
        }
Пример #2
0
        internal void StopTalk()
        {
            Sound.StopTalkSound();

            _haveMsg   = 0;
            _talkDelay = 0;

            var act = TalkingActor;

            if (act != 0 && act < 0x80)
            {
                var a = Actors[act];
                if ((Game.Version >= 7 && !_string[0].NoTalkAnim) || (Game.Version <= 6 && a.IsInCurrentRoom && _useTalkAnims))
                {
                    a.RunTalkScript(a.TalkStopFrame);
                    _useTalkAnims = false;
                }
                if (Game.Version <= 7)
                {
                    TalkingActor = 0xFF;
                }
            }

            if (Game.GameId == GameId.Dig || _game.GameId == GameId.CurseOfMonkeyIsland)
            {
                TalkingActor = 0;
                Variables[VariableHaveMessage.Value] = 0;
            }

            _keepText = false;
            if (Game.Version >= 7)
            {
                ((ScummEngine7)this).ClearSubtitleQueue();
            }
            else if (_game.Platform == Platform.FMTowns)
            {
                TownsRestoreCharsetBg();
            }
            else
            {
                RestoreCharsetBg();
            }
        }