Exemple #1
0
        public override VideoState?GetVideoState()
        {
            if (gameSettings.Version < 7)
            {
                return(null);
            }

            var active = MemoryReader.ReadByte(EngineAddr + smushActiveOffset) != 0;

            if (!active)
            {
                return(null);
            }

            var addr = MemoryReader.ReadIntPtr(EngineAddr + smushPlayerOffset);

            if (addr == IntPtr.Zero)
            {
                throw new InconsistentDataException();
            }

            var state = new VideoState();

            state.CurrentFrame = MemoryReader.ReadUInt32(addr + smushPlayerFrameOffset);
            state.FrameCount   = MemoryReader.ReadUInt32(addr + smushPlayerNBFramesOffset);
            state.FrameRate    = new Rational(MemoryReader.ReadInt32(addr + smushPlayerSpeedOffset));
            state.FileName     = ReadComString(addr + smushPlayerSeekFileOffset);
            return(state);
        }
        public override VideoState?GetVideoState()
        {
            var playing = MemoryReader.ReadByte(EngineAddr + vqaIsPlayingOffset) != 0;

            if (!playing)
            {
                return(null);
            }

            var state = new VideoState();

            return(state);
        }
Exemple #3
0
        public override VideoState?GetVideoState()
        {
            var bmvPtr = MemoryReader.ReadIntPtr(EngineAddr + bmvOffset);

            bool movieOn = MemoryReader.ReadByte(bmvPtr + bmvp_movieOnOffset) != 0;

            if (!movieOn)
            {
                return(null);
            }

            var video = new VideoState();

            video.CurrentFrame = MemoryReader.ReadUInt32(bmvPtr + bmvp_currentFrameOffset);
            video.FileName     = this.ReadFileName(bmvPtr + bmvp_streamOffset);
            video.FrameRate    = new Rational(2, 24);

            return(video);
        }