コード例 #1
0
        protected void GetPalette(Chunk decodeChunk, Chunk roomChunk, ImageInfo info)
        {
            Chunk paletteChunk = roomChunk.SelectSingle("PALS/WRAP/APAL");

            if (paletteChunk == null)
            {
                throw new DecodingException("Palette chunk not found");
            }

            // TODO: Check if this should be global
            StandardPaletteDecoder paletteDecoder = new StandardPaletteDecoder();

            info.Palette = paletteDecoder.Decode(paletteChunk);
        }
コード例 #2
0
ファイル: RMIMDecoder.cs プロジェクト: Jither/SCUMMRevLib
        protected void GetPalette(Chunk decodeChunk, Chunk roomChunk, ImageInfo info)
        {
            Chunk paletteChunk = null;

            foreach (string path in PALETTE_PATHS)
            {
                paletteChunk = roomChunk.SelectSingle(path);
                if (paletteChunk != null)
                {
                    break;
                }
            }

            if (paletteChunk == null)
            {
                throw new DecodingException("Palette chunk not found");
            }

            // TODO: Check if this should use global decoders
            StandardPaletteDecoder palDecoder = new StandardPaletteDecoder();

            info.Palette = palDecoder.Decode(paletteChunk);
        }