namespace SabreTools.Data.Models.WiseInstaller
{
///
/// Wise installer overlay data header
///
///
public class OverlayHeader
{
///
/// DLL name length, if it exists
///
public byte DllNameLen { get; set; } // 0x00
///
/// DLL name, missing if is 0
///
public string? DllName { get; set; } //
///
/// DLL size, missing if is 0
///
public uint? DllSize { get; set; } //
///
/// Packing flags
///
public OverlayHeaderFlags Flags { get; set; } // 0x01 - 0x04
///
/// Graphics data
///
///
/// 12 bytes
///
/// When the data is processed, it does the following:
///
/// ushort[] colors = new ushort[3];
/// int colorsPtr = 0;
///
/// for (int i = 0; i < 3; i++)
/// {
/// uint color = (GraphicsData[i + 3] * ) / 0x5F + GraphicsData[i];
/// colors[colorsPtr] = color;
/// if (color < 0)
/// colors[colorsPtr] = 0;
/// if (colors[colorsPtr] > 0xFF)
/// colors[colorsPtr] = 0xFF
///
/// colorsPtr++;
/// }
///
public byte[] GraphicsData { get; set; } = new byte[12]; // 0x05 - 0x10
///
/// Points to the Exit event in the script, if it exists
///
public uint WiseScriptExitEventOffset { get; set; } // 0x11 - 0x14
///
/// Points to the Cancel event in the script, if it exists
///
public uint WiseScriptCancelEventOffset { get; set; } // 0x15 - 0x18
///
/// Inflated size of the Wise installer script
///
public uint WiseScriptInflatedSize { get; set; } // 0x19 - 0x1C
///
/// Deflated size of the Wise installer script
///
public uint WiseScriptDeflatedSize { get; set; } // 0x1D - 0x20
///
/// Deflated size of WISE0001.DLL
///
public uint WiseDllDeflatedSize { get; set; } // 0x21 - 0x24
///
/// Deflated size of CTL3D32.DLL
///
public uint Ctl3d32DeflatedSize { get; set; } // 0x25 - 0x28
///
/// Deflated size of unknown data
///
public uint SomeData4DeflatedSize { get; set; } // 0x29 - 0x2C
///
/// Deflated size of Ocxreg32.EXE,
///
public uint RegToolDeflatedSize { get; set; } // 0x2D - 0x30
///
/// Deflated size of PROGRESS.DLL
///
public uint ProgressDllDeflatedSize { get; set; } // 0x31 - 0x34
///
/// Deflated size of unknown data
///
public uint SomeData7DeflatedSize { get; set; } // 0x35 - 0x38
///
/// Deflated size of unknown data
///
public uint SomeData8DeflatedSize { get; set; } // 0x39 - 0x3C
///
/// Deflated size of unknown data
///
/// Samples were MS-DOS executables
public uint SomeData9DeflatedSize { get; set; } // 0x3D - 0x40
///
/// Deflated size of unknown data
///
public uint SomeData10DeflatedSize { get; set; } // 0x41 - 0x44
///
/// Deflated size of FILE000{n}.DAT
///
public uint FinalFileDeflatedSize { get; set; } // 0x45 - 0x48
///
/// Inflated size of FILE000{n}.DAT
///
public uint FinalFileInflatedSize { get; set; } // 0x49 - 0x4C
///
/// On multi-disc installers this is set to 0x00000000, so it may
/// represent EOF instead of filesize? At least for now. Only compared
/// the two multi-disc installers listed in the README.md, need more
/// multi-disc installers to properly compare. On single file
/// installers this is this installer it's filesize.
///
public uint EOF { get; set; } // 0x4D - 0x50
///
/// Deflated size of the DIB
///
/// First file
public uint DibDeflatedSize { get; set; } // 0x51 - 0x54
///
/// Inflated size of the DIB
///
/// First file
public uint DibInflatedSize { get; set; } // 0x55 - 0x58
///
/// Deflated size of the install script
///
/// Only present in later versions
public uint? InstallScriptDeflatedSize { get; set; } // 0x59 - 0x5C
///
/// Character set for the font
///
///
/// Only present in later versions. In the overlay reading code
/// present in those later versions, it is lumped in with the
/// rest of the sizes above.
///
public CharacterSet? CharacterSet { get; set; } // 0x5D - 0x60
///
/// Endianness of the file(?)
///
public Endianness Endianness { get; set; } // 0x61 - 0x62
///
/// Init text length
///
public byte InitTextLen { get; set; } // 0x63
///
/// Init text whose length is given by
///
public string? InitText { get; set; } // 0x64 -
}
}