mirror of
https://github.com/SabreTools/SabreTools.Models.git
synced 2026-02-08 05:44:30 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b0c4c3024 | ||
|
|
4b54d0f4dc | ||
|
|
2bc1cfc5d0 | ||
|
|
362abfdc64 |
@@ -5,7 +5,6 @@ namespace SabreTools.Models.AACS
|
||||
/// <summary>
|
||||
/// This record type is undocumented but found in real media key blocks
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class CopyrightRecord : Record
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.BDPlus
|
||||
{
|
||||
/// <see href="https://github.com/mwgoldsmith/bdplus/blob/master/src/libbdplus/bdsvm/loader.c"/>
|
||||
@@ -6,40 +8,39 @@ namespace SabreTools.Models.BDPlus
|
||||
/// <summary>
|
||||
/// "BDSVM_CC"
|
||||
/// </summary>
|
||||
/// <remarks>8 bytes</remarks>
|
||||
public string? Signature { get; set; }
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 8)]
|
||||
public string? Signature;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown data
|
||||
/// </summary>
|
||||
/// <remarks>5 bytes</remarks>
|
||||
public byte[]? Unknown1 { get; set; }
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)]
|
||||
public byte[]? Unknown1 = new byte[5];
|
||||
|
||||
/// <summary>
|
||||
/// Version year
|
||||
/// </summary>
|
||||
public ushort Year { get; set; }
|
||||
public ushort Year;
|
||||
|
||||
/// <summary>
|
||||
/// Version month
|
||||
/// </summary>
|
||||
public byte Month { get; set; }
|
||||
public byte Month;
|
||||
|
||||
/// <summary>
|
||||
/// Version day
|
||||
/// </summary>
|
||||
public byte Day { get; set; }
|
||||
public byte Day;
|
||||
|
||||
/// <summary>
|
||||
/// Unknown data
|
||||
/// </summary>
|
||||
/// <remarks>4 bytes</remarks>
|
||||
public byte[]? Unknown2 { get; set; }
|
||||
public uint Unknown2;
|
||||
|
||||
/// <summary>
|
||||
/// Length
|
||||
/// </summary>
|
||||
public uint Length { get; set; }
|
||||
public uint Length;
|
||||
|
||||
/// <summary>
|
||||
/// Length bytes of data
|
||||
|
||||
@@ -27,17 +27,17 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Defines bounding box
|
||||
/// </summary>
|
||||
public Vector3D Mins;
|
||||
public Vector3D? Mins;
|
||||
|
||||
/// <summary>
|
||||
/// Defines bounding box
|
||||
/// </summary>
|
||||
public Vector3D Maxs;
|
||||
public Vector3D? Maxs;
|
||||
|
||||
/// <summary>
|
||||
/// Coordinates to move the coordinate system
|
||||
/// </summary>
|
||||
public Vector3D OriginVector;
|
||||
public Vector3D? OriginVector;
|
||||
|
||||
/// <summary>
|
||||
/// Index into nodes array
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// S-vector
|
||||
/// </summary>
|
||||
public Vector3D SVector;
|
||||
public Vector3D? SVector;
|
||||
|
||||
/// <summary>
|
||||
/// Texture shift in the S direction
|
||||
@@ -32,7 +32,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// T-vector
|
||||
/// </summary>
|
||||
public Vector3D TVector;
|
||||
public Vector3D? TVector;
|
||||
|
||||
/// <summary>
|
||||
/// Texture shift in the T direction
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace SabreTools.Models.BSP
|
||||
/// </summary>
|
||||
/// <see href="https://developer.valvesoftware.com/wiki/BSP_(Source)"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct ColorRGBExp32
|
||||
public class ColorRGBExp32
|
||||
{
|
||||
public byte Red;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace SabreTools.Models.BSP
|
||||
/// </summary>
|
||||
/// <see href="https://developer.valvesoftware.com/wiki/BSP_(Source)"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct CompressedLightCube
|
||||
public class CompressedLightCube
|
||||
{
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
public ColorRGBExp32[]? Colors;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Start position used for orientation
|
||||
/// </summary>
|
||||
public Vector3D StartPosition;
|
||||
public Vector3D? StartPosition;
|
||||
|
||||
/// <summary>
|
||||
/// Index into LUMP_DISP_VERTS.
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Vector field defining displacement volume.
|
||||
/// </summary>
|
||||
public Vector3D Vec;
|
||||
public Vector3D? Vec;
|
||||
|
||||
/// <summary>
|
||||
/// Displacement distances.
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace SabreTools.Models.BSP
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class LeafAmbientLighting
|
||||
{
|
||||
public CompressedLightCube Cube;
|
||||
public CompressedLightCube? Cube;
|
||||
|
||||
/// <summary>
|
||||
/// Fixed point fraction of leaf bounds
|
||||
|
||||
@@ -27,12 +27,12 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Minima of all vertices
|
||||
/// </summary>
|
||||
public Vector3D Mins;
|
||||
public Vector3D? Mins;
|
||||
|
||||
/// <summary>
|
||||
/// Maxima of all vertices
|
||||
/// </summary>
|
||||
public Vector3D Maxs;
|
||||
public Vector3D? Maxs;
|
||||
|
||||
/// <remarks>Since v1</remarks>
|
||||
public int Area;
|
||||
|
||||
@@ -41,8 +41,8 @@ namespace SabreTools.Models.BSP
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
|
||||
public Vector3D[]? UVPoints = new Vector3D[4];
|
||||
|
||||
public Vector3D Origin;
|
||||
public Vector3D? Origin;
|
||||
|
||||
public Vector3D BasisNormal;
|
||||
public Vector3D? BasisNormal;
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// The planes normal vector
|
||||
/// </summary>
|
||||
public Vector3D NormalVector;
|
||||
public Vector3D? NormalVector;
|
||||
|
||||
/// <summary>
|
||||
/// Plane equation is: vNormal * X = fDist
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace SabreTools.Models.BSP
|
||||
/// from the cardinal Z axis.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct QAngle
|
||||
public class QAngle
|
||||
{
|
||||
public float X { get; set; }
|
||||
public float Y { get; set; }
|
||||
|
||||
@@ -39,12 +39,12 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Origin
|
||||
/// </summary>
|
||||
public Vector3D Origin;
|
||||
public Vector3D? Origin;
|
||||
|
||||
/// <summary>
|
||||
/// Orientation (pitch yaw roll)
|
||||
/// </summary>
|
||||
public QAngle Angles;
|
||||
public QAngle? Angles;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// For lighting
|
||||
/// </summary>
|
||||
public Vector3D LightingOrigin;
|
||||
public Vector3D? LightingOrigin;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Per instance color and alpha modulation
|
||||
/// </summary>
|
||||
public ColorRGBExp32 DiffuseModulation;
|
||||
public ColorRGBExp32? DiffuseModulation;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// RGB reflectivity
|
||||
/// </summary>
|
||||
public Vector3D Reflectivity;
|
||||
public Vector3D? Reflectivity;
|
||||
|
||||
/// <summary>
|
||||
/// Index into TexdataStringTable
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Precaculated light info for entities.
|
||||
/// </summary>
|
||||
public CompressedLightCube AmbientLighting;
|
||||
public CompressedLightCube? AmbientLighting;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -15,17 +15,17 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Bounding box
|
||||
/// </summary>
|
||||
public Vector3D Mins;
|
||||
public Vector3D? Mins;
|
||||
|
||||
/// <summary>
|
||||
/// Bounding box
|
||||
/// </summary>
|
||||
public Vector3D Maxs;
|
||||
public Vector3D? Maxs;
|
||||
|
||||
/// <summary>
|
||||
/// For sounds or lights
|
||||
/// </summary>
|
||||
public Vector3D OriginVector;
|
||||
public Vector3D? OriginVector;
|
||||
|
||||
/// <summary>
|
||||
/// Index into nodes
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Texture S-vector
|
||||
/// </summary>
|
||||
public Vector3D TextureSVector;
|
||||
public Vector3D? TextureSVector;
|
||||
|
||||
/// <summary>
|
||||
/// Texture shift in the S direction
|
||||
@@ -32,7 +32,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Texture T-vector
|
||||
/// </summary>
|
||||
public Vector3D TextureTVector;
|
||||
public Vector3D? TextureTVector;
|
||||
|
||||
/// <summary>
|
||||
/// Texture shift in the T direction
|
||||
@@ -42,7 +42,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Lightmap S-vector
|
||||
/// </summary>
|
||||
public Vector3D LightmapSVector;
|
||||
public Vector3D? LightmapSVector;
|
||||
|
||||
/// <summary>
|
||||
/// Lightmap shift in the S direction
|
||||
@@ -52,7 +52,7 @@ namespace SabreTools.Models.BSP
|
||||
/// <summary>
|
||||
/// Lightmap T-vector
|
||||
/// </summary>
|
||||
public Vector3D LightmapTVector;
|
||||
public Vector3D? LightmapTVector;
|
||||
|
||||
/// <summary>
|
||||
/// Lightmap shift in the T direction
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace SabreTools.Models.BSP
|
||||
/// spec and the code of the hlbsp project.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct Vector3D
|
||||
public class Vector3D
|
||||
{
|
||||
public float X { get; set; }
|
||||
public float Y { get; set; }
|
||||
|
||||
@@ -14,14 +14,14 @@ namespace SabreTools.Models.BSP
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class WorldLight
|
||||
{
|
||||
public Vector3D Origin;
|
||||
public Vector3D? Origin;
|
||||
|
||||
public Vector3D Intensity;
|
||||
public Vector3D? Intensity;
|
||||
|
||||
/// <summary>
|
||||
/// For surfaces and spotlights
|
||||
/// </summary>
|
||||
public Vector3D Normal;
|
||||
public Vector3D? Normal;
|
||||
|
||||
public int Cluster;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace SabreTools.Models.LinearExecutable
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace SabreTools.Models.LinearExecutable
|
||||
{
|
||||
/// <summary>
|
||||
/// The resident and non-resident name tables define the ASCII names and ordinal
|
||||
@@ -25,6 +27,7 @@
|
||||
/// </summary>
|
||||
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
|
||||
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public sealed class NonResidentNamesTableEntry
|
||||
{
|
||||
/// <summary>
|
||||
@@ -39,7 +42,7 @@
|
||||
/// signifies that additional information is contained in the linear EXE module and
|
||||
/// will be used in the future for parameter type checking.
|
||||
/// </remarks>
|
||||
public byte Length { get; set; } // TODO: Remove in lieu of AnsiBStr
|
||||
public byte Length { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ASCII String.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<NoWarn>CS0618</NoWarn>
|
||||
<Nullable>enable</Nullable>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
<Version>1.5.3</Version>
|
||||
<Version>1.5.4</Version>
|
||||
|
||||
<!-- Package Properties -->
|
||||
<Authors>Matt Nadareski</Authors>
|
||||
|
||||
Reference in New Issue
Block a user