diff --git a/exeinfogui/GEM/GemIcon.cs b/exeinfogui/GEM/GemIcon.cs index 5a62eef..cec47c1 100644 --- a/exeinfogui/GEM/GemIcon.cs +++ b/exeinfogui/GEM/GemIcon.cs @@ -38,8 +38,8 @@ namespace exeinfogui.GEM const uint ALPHAMASK = 0xFF000000; List pixels = new List(); - byte[] data = libexeinfo.GEM.FlipPlane(icon.Data, icon.Width); - byte[] mask = libexeinfo.GEM.FlipPlane(icon.Mask, icon.Width); + byte[] data = libexeinfo.GEM.FlipPlane(icon.Data, (int)icon.Width); + byte[] mask = libexeinfo.GEM.FlipPlane(icon.Mask, (int)icon.Width); for(int pos = 0; pos < data.Length; pos++) { @@ -48,7 +48,7 @@ namespace exeinfogui.GEM ((mask[pos] & (1 << i)) != 0 ? ALPHAMASK : 0))); } - return new Bitmap(icon.Width, icon.Height, PixelFormat.Format32bppRgba, pixels); + return new Bitmap((int)icon.Width, (int)icon.Height, PixelFormat.Format32bppRgba, pixels); } } } \ No newline at end of file diff --git a/exeinfogui/GEM/PanelGemColorIcon.xeto.cs b/exeinfogui/GEM/PanelGemColorIcon.xeto.cs index dcbea69..5c6ca62 100644 --- a/exeinfogui/GEM/PanelGemColorIcon.xeto.cs +++ b/exeinfogui/GEM/PanelGemColorIcon.xeto.cs @@ -95,8 +95,8 @@ namespace exeinfogui.GEM txtText.Text = colorIcon.Monochrome.Text; imgIcon.Image = GemIcon.GemIconToEto(colorIcon.Monochrome); treePlanes.DataStore = colorIcon.Color; - iconWidth = colorIcon.Monochrome.Width; - iconHeight = colorIcon.Monochrome.Height; + iconWidth = (int)colorIcon.Monochrome.Width; + iconHeight = (int)colorIcon.Monochrome.Height; treePlanes.SelectRow(0); if(colorIcon.Color != null && colorIcon.Color.Length >= 1 && colorIcon.Color[0] != null) { diff --git a/exeinfogui/GEM/PanelGemImage.xeto.cs b/exeinfogui/GEM/PanelGemImage.xeto.cs index d30be46..3097c90 100644 --- a/exeinfogui/GEM/PanelGemImage.xeto.cs +++ b/exeinfogui/GEM/PanelGemImage.xeto.cs @@ -67,7 +67,7 @@ namespace exeinfogui.GEM byte[] data = new byte[node.BitBlock.Data.Length]; int pos = 0; - int w = node.BitBlock.Width / 8; + int w = (int)(node.BitBlock.Width / 8); // This flips the image. while(pos < data.Length) { @@ -91,7 +91,7 @@ namespace exeinfogui.GEM for(int i = 0; i < 8; i++) pixels.Add((b & (1 << i)) != 0 ? color : background); - return new Bitmap(node.BitBlock.Width, node.BitBlock.Height, PixelFormat.Format32bppRgb, pixels); + return new Bitmap((int)node.BitBlock.Width, (int)node.BitBlock.Height, PixelFormat.Format32bppRgb, pixels); } } } \ No newline at end of file diff --git a/libexeinfo/GEM/Resources.cs b/libexeinfo/GEM/Resources.cs index 3362476..cae56e3 100644 --- a/libexeinfo/GEM/Resources.cs +++ b/libexeinfo/GEM/Resources.cs @@ -125,7 +125,7 @@ namespace libexeinfo { Color = (ObjectColors)bitBlock.bi_color, Height = bitBlock.bi_hl, - Width = bitBlock.bi_wb * 8, + Width = (uint)(bitBlock.bi_wb * 8), X = bitBlock.bi_x, Y = bitBlock.bi_y }; diff --git a/libexeinfo/GEM/Structs.cs b/libexeinfo/GEM/Structs.cs index 13e162f..272411f 100644 --- a/libexeinfo/GEM/Structs.cs +++ b/libexeinfo/GEM/Structs.cs @@ -38,76 +38,76 @@ namespace libexeinfo /// the third bit set (i.e. 0x0004) in the new file format. If file is in the new format, it is appended at the end /// with /// - public short rsh_vrsn; + public ushort rsh_vrsn; /// /// Contains an offset from the beginning of the file to the OBJECT structures. /// - public short rsh_object; + public ushort rsh_object; /// /// Contains an offset from the beginning of the file to the TEDINFO structures. /// - public short rsh_tedinfo; + public ushort rsh_tedinfo; /// /// Contains an offset from the beginning of the file to the ICONBLK structures. /// - public short rsh_iconblk; + public ushort rsh_iconblk; /// /// Contains an offset from the beginning of the file to the BITBLK structures. /// - public short rsh_bitblk; + public ushort rsh_bitblk; /// /// Contains an offset from the beginning of the file to the string pointer table. /// - public short rsh_frstr; + public ushort rsh_frstr; /// /// Contains an offset from the beginning of the file to the string data. /// - public short rsh_string; + public ushort rsh_string; /// /// Contains an offset from the beginning of the file to the image data. /// - public short rsh_imdata; + public ushort rsh_imdata; /// /// Contains an offset from the beginning of the file to the image pointer table. /// - public short rsh_frimg; + public ushort rsh_frimg; /// /// Contains an offset from the beginning of the file to the tree pointer table. /// - public short rsh_trindex; + public ushort rsh_trindex; /// /// Number of OBJECTs in the file. /// - public short rsh_nobs; + public ushort rsh_nobs; /// /// Number of object trees in the file. /// - public short rsh_ntree; + public ushort rsh_ntree; /// /// Number of TEDINFOs in the file. /// - public short rsh_nted; + public ushort rsh_nted; /// /// Number of ICONBLKs in the file. /// - public short rsh_nib; + public ushort rsh_nib; /// /// Number of BITBLKs in the file. /// - public short rsh_nbb; + public ushort rsh_nbb; /// /// Number of free strings in the file. /// - public short rsh_nstring; + public ushort rsh_nstring; /// /// Number of free images in the file. /// - public short rsh_nimages; + public ushort rsh_nimages; /// /// Size of the resource file (in bytes). Note that this is the size of the old format resource file. If the newer /// format file is being used then this value can be used as an offset to the extension array. /// - public short rsh_rssize; + public ushort rsh_rssize; } [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -116,80 +116,80 @@ namespace libexeinfo /// /// Must be version 3 /// - public short rsh_vrsn; + public ushort rsh_vrsn; /// /// Not used /// - public short rsh_extvrsn; + public ushort rsh_extvrsn; /// /// Contains an offset from the beginning of the file to the OBJECT structures. /// - public int rsh_object; + public uint rsh_object; /// /// Contains an offset from the beginning of the file to the TEDINFO structures. /// - public int rsh_tedinfo; + public uint rsh_tedinfo; /// /// Contains an offset from the beginning of the file to the ICONBLK structures. /// - public int rsh_iconblk; + public uint rsh_iconblk; /// /// Contains an offset from the beginning of the file to the BITBLK structures. /// - public int rsh_bitblk; + public uint rsh_bitblk; /// /// Contains an offset from the beginning of the file to the string pointer table. /// - public int rsh_frstr; + public uint rsh_frstr; /// /// Contains an offset from the beginning of the file to the string data. /// - public int rsh_string; + public uint rsh_string; /// /// Contains an offset from the beginning of the file to the image data. /// - public int rsh_imdata; + public uint rsh_imdata; /// /// Contains an offset from the beginning of the file to the image pointer table. /// - public int rsh_frimg; + public uint rsh_frimg; /// /// Contains an offset from the beginning of the file to the tree pointer table. /// - public int rsh_trindex; + public uint rsh_trindex; /// /// Number of OBJECTs in the file. /// - public int rsh_nobs; + public uint rsh_nobs; /// /// Number of object trees in the file. /// - public int rsh_ntree; + public uint rsh_ntree; /// /// Number of TEDINFOs in the file. /// - public int rsh_nted; + public uint rsh_nted; /// /// Number of ICONBLKs in the file. /// - public int rsh_nib; + public uint rsh_nib; /// /// Number of BITBLKs in the file. /// - public int rsh_nbb; + public uint rsh_nbb; /// /// Number of free strings in the file. /// - public int rsh_nstring; + public uint rsh_nstring; /// /// Number of free images in the file. /// - public int rsh_nimages; + public uint rsh_nimages; /// /// Size of the resource file (in bytes). Note that this is the size of the old format resource file. If the newer /// format file is being used then this value can be used as an offset to the extension array. /// - public int rsh_rssize; + public uint rsh_rssize; } [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -198,7 +198,7 @@ namespace libexeinfo /// /// Size of the file /// - public int filesize; + public uint filesize; /// /// Slot for color icons containing an offset to table. The table is an array of /// offsets in file with -1 meaning table end. @@ -247,23 +247,23 @@ namespace libexeinfo /// A long value containing object specific data. Depending on the object's type, can be a pointer to any combination /// of word and/or byte values that add up to 32 bits. /// - public int ob_spec; + public uint ob_spec; /// /// A word containing the X-coordinate of the object relative to its parent or (for the root object) the screen /// - public short ob_x; + public ushort ob_x; /// /// A word containing the Y-coordinate of the object relative to its parent or (for the root object) the screen /// - public short ob_y; + public ushort ob_y; /// /// A word containing the width of the object in pixels /// - public short ob_width; + public ushort ob_width; /// /// A word containing the height of the object in pixels /// - public short ob_height; + public ushort ob_height; } /// @@ -277,9 +277,9 @@ namespace libexeinfo public BitmapBlock BitBlock; public TreeObjectNode child; public ColorIcon ColorIcon; - public int data; + public uint data; public ObjectFlags flags; - public short height; + public ushort height; public Icon IconBlock; public TreeObjectNode sibling; public ObjectStates state; @@ -287,9 +287,9 @@ namespace libexeinfo public TextBlock TedInfo; public ObjectTypes type; - public short width; - public short x; - public short y; + public ushort width; + public ushort x; + public ushort y; } public class TextBlock @@ -302,7 +302,7 @@ namespace libexeinfo public string Template; public string Text; public ObjectColors TextColor; - public short Thickness; + public ushort Thickness; public bool Transparency; public string Validation; } @@ -311,37 +311,37 @@ namespace libexeinfo { public ObjectColors Color; public byte[] Data; - public int Height; - public int Width; - public short X; - public short Y; + public uint Height; + public uint Width; + public ushort X; + public ushort Y; } public class Icon { public ObjectColors BackgroundColor; public char Character; - public short CharX; - public short CharY; + public ushort CharX; + public ushort CharY; public byte[] Data; public ObjectColors ForegroundColor; - public int Height; + public uint Height; public byte[] Mask; public string Text; - public short TextHeight; - public short TextWidth; - public short TextX; - public short TextY; - public int Width; - public short X; - public short Y; + public ushort TextHeight; + public ushort TextWidth; + public ushort TextX; + public ushort TextY; + public uint Width; + public ushort X; + public ushort Y; } public class ColorIconPlane { public byte[] Data; public byte[] Mask; - public short Planes; + public ushort Planes; public byte[] SelectedData; public byte[] SelectedMask; } @@ -362,48 +362,48 @@ namespace libexeinfo /// /// A pointer to the actual text. If the first character is '@', the field is blank. /// - public int te_ptext; + public uint te_ptext; /// /// A pointer to a string template for any data entry. The editable portion is represented by underscores. /// - public int te_ptmplt; + public uint te_ptmplt; /// /// A pointer to a text string contianing characters tht validate any entered text /// - public int te_pvalid; + public uint te_pvalid; /// /// A word identifying the font used to draw the text. 3 for system font, 5 for small font. /// - public short te_font; + public ushort te_font; /// /// On SpeedGDOS it specifies the id for the font to use /// - public short te_fontid; + public ushort te_fontid; /// /// A word identifying the type of text justification desired. 0 = left, 1 = right, 2 = center /// - public short te_just; + public ushort te_just; /// /// A word identifying the color and pattern of box-type objects /// - public short te_color; + public ushort te_color; /// /// On SpeedGDOS it specifies the size for the font to use /// - public short te_fontsize; + public ushort te_fontsize; /// /// A word containing the thickness in pixels of the border of the text box. 0 for none, positive for inside, negative /// for outside /// - public short te_thickness; + public ushort te_thickness; /// /// A word containing the length of the string pointed by . /// - public short te_txtlen; + public ushort te_txtlen; /// /// A word containing the length of the string pointed by . /// - public short te_tmplen; + public ushort te_tmplen; } /// @@ -416,64 +416,64 @@ namespace libexeinfo /// /// A pointer to an array of words representing the mask bit image of the icon /// - public int ib_pmask; + public uint ib_pmask; /// /// A pointer to an array of words representing the data bit image of the icon /// - public int ib_pdata; + public uint ib_pdata; /// /// A pointer to the icon's text /// - public int ib_ptext; + public uint ib_ptext; /// /// A word containing a character to be drawn in the icon. The high byte contains the foreground color in the high /// nibble and the background color in the low nibble. /// - public short ib_char; + public ushort ib_char; /// /// A word containing the X-coordinate of /// - public short ib_xchar; + public ushort ib_xchar; /// /// A word containing the Y-coordinate of /// - public short ib_ychar; + public ushort ib_ychar; /// /// A word containing the X-coordinate of the icon /// - public short ib_xicon; + public ushort ib_xicon; /// /// A word containing the Y-coordinate of the icon /// - public short ib_yicon; + public ushort ib_yicon; /// /// A word containing the width of the icon in pixels. Must be divisible by 16. /// - public short ib_wicon; + public ushort ib_wicon; /// /// A word containing the height of the icon in pixels /// - public short ib_hicon; + public ushort ib_hicon; /// /// A word containing the X-coordinate of the icon's text /// - public short ib_xtext; + public ushort ib_xtext; /// /// A word containing the Y-coordinate of the icon's text /// - public short ib_ytext; + public ushort ib_ytext; /// /// A word containing the width of a rectangle in which the icon's text will be centered /// - public short ib_wtext; + public ushort ib_wtext; /// /// A word containing the height of the icon's text in pixels /// - public short ib_htext; + public ushort ib_htext; /// /// Zeros /// - public short empty; + public ushort empty; } /// @@ -485,31 +485,31 @@ namespace libexeinfo /// /// A pointer to an array of words contianing the bit image /// - public int bi_pdata; + public uint bi_pdata; /// /// A word containing the width of the array in bytes /// - public short bi_wb; + public ushort bi_wb; /// /// A word containing the height of the bit block in scan lines (pixels) /// - public short bi_hl; + public ushort bi_hl; /// /// A word containing the source X in bit form, relative to the array /// - public short bi_x; + public ushort bi_x; /// /// A word containing the source Y in bit form, relative to the array /// - public short bi_y; + public ushort bi_y; /// /// A word containing the color GEM AES uses when displaying the bit image. /// - public short bi_color; + public ushort bi_color; /// /// Zeros /// - public short empty; + public ushort empty; } /// @@ -523,11 +523,11 @@ namespace libexeinfo /// /// A pointer to the routine for drawing and/or changing the object /// - public int ab_code; + public uint ab_code; /// /// A pointer to a /// - public int ab_parm; + public uint ab_parm; } /// @@ -539,67 +539,67 @@ namespace libexeinfo /// /// A pointer to the object tree that contains the application defined object /// - public int pb_tree; + public uint pb_tree; /// /// A word containing the object index of the application defined object /// - public short pb_obj; + public ushort pb_obj; /// /// A word containing the old state of an object to be changed /// - public short pb_prevstate; + public ushort pb_prevstate; /// /// A word containing the changed (new) state of an object /// - public short pb_currstate; + public ushort pb_currstate; /// /// A word containing the X-coordinate of a rectangle defining the location of the object on the physical screen /// - public short pb_x; + public ushort pb_x; /// /// A word containing the Y-coordinate of a rectangle defining the location of the object on the physical screen /// - public short pb_y; + public ushort pb_y; /// /// A word containing the width in pixels of a rectanble defining the size of the object on the physical screen /// - public short pb_w; + public ushort pb_w; /// /// A word containing the height in pixels of a rectanble defining the size of the object on the physical screen /// - public short pb_h; + public ushort pb_h; /// /// A word containing the X-coordinate of the current clip rectangle on the physical screen /// - public short pb_xc; + public ushort pb_xc; /// /// A word containing the Y-coordinate of the current clip rectangle on the physical screen /// - public short pb_yc; + public ushort pb_yc; /// /// A word containing the width in pixels of the current clip rectnagle on the physical screen /// - public short pb_wc; + public ushort pb_wc; /// /// A word containing the heigth in pixels of the current clip rectnagle on the physical screen /// - public short pb_hc; + public ushort pb_hc; /// /// A long value, identical to , that is passed to the application when it is /// time for /// the application to draw or change the object. Low word. /// - public short pb_parm_low; + public ushort pb_parm_low; /// /// A long value, identical to , that is passed to the application when it is /// time for /// the application to draw or change the object. High word. /// - public short pb_parm_high; + public ushort pb_parm_high; /// /// Zeros /// - public short empty; + public ushort empty; } [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -608,27 +608,27 @@ namespace libexeinfo /// /// Number of planes in the following data /// - public short num_planes; + public ushort num_planes; /// /// Pointer to color bitmap in standard form /// - public int col_data; + public uint col_data; /// /// Pointer to single plane mask of /// - public int col_mask; + public uint col_mask; /// /// Pointer to color bitmap of selected icon /// - public int sel_data; + public uint sel_data; /// /// Pointer to single plane mask of /// - public int sel_mask; + public uint sel_mask; /// /// Pointer to next icon /// - public int next_res; + public uint next_res; } [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -637,11 +637,11 @@ namespace libexeinfo /// /// Points to the start of an object tree that corresponds to the popup menu /// - public int tree; + public uint tree; /// /// Current object of /// - public short obnum; + public ushort obnum; } [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -650,15 +650,15 @@ namespace libexeinfo /// /// Points to the string /// - public int str; + public uint str; /// /// Index of the current character string /// - public short num; + public ushort num; /// /// Maximum permitted number /// - public short maxnum; + public ushort maxnum; } } } \ No newline at end of file