public Bitmap Decode(RoomBlock roomBlock, int objectIndex, int imageIndex) { ObjectImage obj = roomBlock.GetOBIMs()[objectIndex]; if (obj.GetIMxx()[imageIndex].GetBOMP() == null) { return(new Bitmap(1, 1)); } var IMHD = obj.GetIMHD(); _width = IMHD.Width; _height = IMHD.Height; _imageData = obj.GetIMxx()[imageIndex].GetBOMP(); if (PaletteIndex == 0) { _pallete = roomBlock.GetDefaultPalette(); } else { _pallete = roomBlock.GetPALS().GetWRAP().GetAPALs()[PaletteIndex]; } Decode(); return(_resultBitmap); }
public Bitmap Decode(RoomBlock roomBlock, int objectIndex, int imageIndex) { var obj = roomBlock.GetOBIMs()[objectIndex]; if (obj.GetIMxx()[imageIndex].GetSMAP() == null) { return(new Bitmap(1, 1)); } var IMHD = obj.GetIMHD(); _width = IMHD.Width; _height = IMHD.Height; _transparency = roomBlock.GetTRNS().Value; _strips = obj.GetIMxx()[imageIndex].GetSMAP().Strips; if (PaletteIndex == 0) { _pallete = roomBlock.GetDefaultPalette(); } else { _pallete = roomBlock.GetPALS().GetWRAP().GetAPALs()[PaletteIndex]; } Decode(); return(_resultBitmap); }
public void Encode(RoomBlock roomBlock, Costume costume, int frameIndex, Bitmap imageToEncode) { _costume = costume; _pictureData = costume.Pictures[frameIndex]; _imageToEncode = imageToEncode; if (PaletteIndex == 0) { _palette = roomBlock.GetDefaultPalette(); } else { _palette = roomBlock.GetPALS().GetWRAP().GetAPALs()[PaletteIndex]; } Encode(); }
public Bitmap Decode(RoomBlock roomBlock, Costume costume, int frameIndex) { _pictureData = costume.Pictures[frameIndex]; _costume = costume; if (PaletteIndex == 0) { _palette = roomBlock.GetDefaultPalette(); } else { _palette = roomBlock.GetPALS().GetWRAP().GetAPALs()[PaletteIndex]; } Decode(); return(_resultBitmap); }
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(); }
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(); }
public void Encode(RoomBlock blockToEncode, int objectIndex, int imageIndex, Bitmap imageToEncode) { ObjectImage obj = blockToEncode.GetOBIMs()[objectIndex]; _imageToEncode = imageToEncode; var IMHD = obj.GetIMHD(); _width = IMHD.Width; _height = IMHD.Height; _imageBomp = obj.GetIMxx()[imageIndex].GetBOMP(); if (PaletteIndex == 0) { _pallete = blockToEncode.GetDefaultPalette(); } else { _pallete = blockToEncode.GetPALS().GetWRAP().GetAPALs()[PaletteIndex]; } Encode(); }
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); }
public void Encode(RoomBlock blockToEncode, int objectIndex, int imageIndex, Bitmap imageToEncode) { var obj = blockToEncode.GetOBIMs()[objectIndex]; _imageToEncode = imageToEncode; ObjectImageHeader IMHD = obj.GetIMHD(); _width = IMHD.Width; _height = IMHD.Height; _transparency = blockToEncode.GetTRNS().Value; _strips = obj.GetIMxx()[imageIndex].GetSMAP(); if (PaletteIndex == 0) { _pallete = blockToEncode.GetDefaultPalette(); } else { _pallete = blockToEncode.GetPALS().GetWRAP().GetAPALs()[PaletteIndex]; } Encode(); }