using System.Collections.Generic;
namespace SabreTools.Data.Models.WiseInstaller
{
public static class Constants
{
///
/// Count of per-language strings for an Action
///
/// Derived from WISE0001.DLL
public static readonly byte[] CountOfLanguageActionStrings =
[
0x01, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00,
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
];
///
/// Count of non-language strings for an Action
///
///
/// Derived from WISE0001.DLL
/// One variant of the DLL has action 0x06 have a
/// value of `0x01` instead of `0x00`.
/// One variant of the DLL has action 0x18 have a
/// value of `0x01` instead of `0x00`.
///
public static readonly byte[] CountOfStaticActionStrings =
[
0x02, 0x00, 0x01, 0x00, 0x00, 0x03, 0x00, 0x03,
0x00, 0x04, 0x03, 0x01, 0x02, 0x00, 0x00, 0x00,
0x00, 0x01, 0x03, 0x00, 0x02, 0x02, 0x01, 0x01,
0x00, 0x03, 0x02, 0x00, 0x01, 0x02, 0x01, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
];
///
/// Size of the invariant data for an Action
///
///
/// One variant of the DLL has action 0x18 have a
/// value of `0x06` instead of `0x01`.
///
public static readonly byte[] SizeOfStaticActionData =
[
0x2B, 0x00, 0x02, 0x02, 0x02, 0x01, 0x13, 0x02,
0x02, 0x02, 0x03, 0x02, 0x02, 0x01, 0x00, 0x01,
0x01, 0x01, 0x2B, 0x00, 0x0D, 0x02, 0x01, 0x06,
0x01, 0x02, 0x02, 0x01, 0x01, 0x01, 0x02, 0x00,
0x00, 0x00, 0x00, 0x02, 0x01, 0x01, 0x00, 0x00,
];
///
/// "WIS" string for WiseSection 57, 49, 53
///
public static readonly byte[] WisString =
[0x57, 0x49, 0x53];
///
/// List of currently observed offsets for the "WIS" string in WiseSection
///
public static readonly int[] WisOffsets =
[32, 33, 41, 77, 78, 82];
///
/// Size of the header for a WiseSection
///
public static readonly Dictionary WiseSectionHeaderLengthDictionary = new()
{
{32, 6},
{33, 6},
{41, 8},
{77, 17},
{78, 17},
{82, 18},
};
///
/// Offset from "WIS" string to be used as length of version field.
///
public static readonly Dictionary WiseSectionVersionOffsetDictionary = new()
{
{32, 4},
{33, 5},
{41, 5},
{77, 5},
{78, 6},
{82, 6},
};
///
/// Size of pre-string byte array, guessed to be correlated with "WIS" string offset.
///
public static readonly Dictionary WiseSectionPreStringBytesSize = new()
{
{32, 8},
{33, 16},
{41, 18},
{77, 19},
{78, 19},
{82, 19},
};
}
}