예제 #1
0
        public override ImageInfo GetInfo(Chunk chunk, uint index)
        {
            Chunk parentChunk = chunk.Parent;

            ImageInfo info = new ImageInfo();

            info.X = 0;
            info.Y = 0;
            Size dims = SCUMMUtils.GetRoomDimensions(parentChunk);

            info.Width       = dims.Width;
            info.Height      = dims.Height;
            info.PixelFormat = PixelDepth.Depth8;

            GetPalette(chunk, parentChunk, info);

            return(info);
        }
예제 #2
0
        private bool CheckFormat(SCUMM3File file)
        {
            foreach (byte enc in ENCRYPTION_VALUES)
            {
                file.Encryption = enc;

                file.Position = 0;
                uint  size  = file.ReadU32LE();
                TwoCC twoCC = file.ReadTwoCC();

                if (twoCC.IsValid && size <= file.Size)
                {
                    file.FileVersion = SCUMMUtils.DetermineSCUMMVersion(file);
                    return(true);
                }
            }
            return(false);
        }