Example #1
0
        public Bitmap Decode(RoomBlock roomBlock, int zPlaneIndex)
        {
            var RMHD = roomBlock.GetRMHD();

            _width  = RMHD.Width;
            _height = RMHD.Height;
            _zPlane = roomBlock.GetRMIM().GetIM00().GetZPlanes()[zPlaneIndex];

            Decode();

            return(_resultBitmap);
        }
Example #2
0
        public void Encode(RoomBlock blockToEncode, Bitmap imageToEncode, int zPlaneIndex)
        {
            _imageToEncode = imageToEncode;

            var RMHD = blockToEncode.GetRMHD();

            _width  = RMHD.Width;
            _height = RMHD.Height;
            _zPlane = blockToEncode.GetRMIM().GetIM00().GetZPlanes()[zPlaneIndex];

            Encode();
        }
Example #3
0
        public void Encode(RoomBlock blockToEncode, Bitmap imageToEncode)
        {
            _imageToEncode = imageToEncode;
            RoomHeader RMHD = blockToEncode.GetRMHD();

            _width     = RMHD.Width;
            _height    = RMHD.Height;
            _imageBomp = blockToEncode.GetRMIM().GetIM00().GetBOMP();

            if (PaletteIndex == 0)
            {
                _pallete = blockToEncode.GetDefaultPalette();
            }
            else
            {
                _pallete = blockToEncode.GetPALS().GetWRAP().GetAPALs()[PaletteIndex];
            }

            Encode();
        }
Example #4
0
        public void Encode(RoomBlock blockToEncode, Bitmap imageToEncode)
        {
            _imageToEncode = imageToEncode;
            var RMHD = blockToEncode.GetRMHD();

            _width        = RMHD.Width;
            _height       = RMHD.Height;
            _transparency = blockToEncode.GetTRNS().Value;
            _strips       = blockToEncode.GetRMIM().GetIM00().GetSMAP();
            if (PaletteIndex == 0)
            {
                _pallete = blockToEncode.GetDefaultPalette();
            }
            else
            {
                _pallete = blockToEncode.GetPALS().GetWRAP().GetAPALs()[PaletteIndex];
            }

            Encode();
        }
Example #5
0
        public Bitmap Decode(RoomBlock roomBlock)
        {
            var RMHD = roomBlock.GetRMHD();

            _width        = RMHD.Width;
            _height       = RMHD.Height;
            _transparency = roomBlock.GetTRNS().Value;
            _strips       = roomBlock.GetRMIM().GetIM00().GetSMAP().Strips;

            if (PaletteIndex == 0)
            {
                _pallete = roomBlock.GetDefaultPalette();
            }
            else
            {
                _pallete = roomBlock.GetPALS().GetWRAP().GetAPALs()[PaletteIndex];
            }

            Decode();

            return(_resultBitmap);
        }