|
|
@ -39,7 +39,7 @@ public class QModel |
|
|
public IntPtr leafs; // Array of mleaf_t
|
|
|
public IntPtr leafs; // Array of mleaf_t
|
|
|
|
|
|
|
|
|
public int numVertices; |
|
|
public int numVertices; |
|
|
public IntPtr vertices; // Array of mvertex_t
|
|
|
|
|
|
|
|
|
public IntPtr vertices; // Array of mvertex_t (which is just a single vec3_t)
|
|
|
|
|
|
|
|
|
public int numEdges; |
|
|
public int numEdges; |
|
|
public IntPtr edges; // Array of medge_t
|
|
|
public IntPtr edges; // Array of medge_t
|
|
|
@ -220,3 +220,77 @@ public struct QSTVert |
|
|
public int onSeam; |
|
|
public int onSeam; |
|
|
public int s, t; |
|
|
public int s, t; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Managed equivalent of dmodel_t
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 0)] |
|
|
|
|
|
public struct QDModel |
|
|
|
|
|
{ |
|
|
|
|
|
public QVec3 mins, maxs; |
|
|
|
|
|
public QVec3 origin; |
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = QConstants.MaxMapHulls)] public int[] headNode; |
|
|
|
|
|
public int visLeafs; |
|
|
|
|
|
public int firstFace, numFaces; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Managed equivalent of mplane_t
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 0)] |
|
|
|
|
|
public struct QPlane |
|
|
|
|
|
{ |
|
|
|
|
|
public QVec3 normal; |
|
|
|
|
|
public float dist; |
|
|
|
|
|
public byte type; |
|
|
|
|
|
public byte signBits; |
|
|
|
|
|
public byte pad0, pad1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Managed equivalent of medge_t
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 0)] |
|
|
|
|
|
public struct QEdge |
|
|
|
|
|
{ |
|
|
|
|
|
public uint v0, v1; |
|
|
|
|
|
public uint cachedEdgeOffset; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Managed equivalent of msurface_t
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[StructLayout(LayoutKind.Sequential, Pack = 0)] |
|
|
|
|
|
public struct QSurface |
|
|
|
|
|
{ |
|
|
|
|
|
public int visFrame; |
|
|
|
|
|
public bool culled; |
|
|
|
|
|
public QVec3 mins, maxs; |
|
|
|
|
|
|
|
|
|
|
|
public IntPtr plane; // Pointer to mplane_t
|
|
|
|
|
|
public int flags; |
|
|
|
|
|
|
|
|
|
|
|
public int firstEdge; |
|
|
|
|
|
public int numEdges; |
|
|
|
|
|
|
|
|
|
|
|
public QVec2s textureMins; |
|
|
|
|
|
public QVec2s extents; |
|
|
|
|
|
|
|
|
|
|
|
public QVec2i lightST; |
|
|
|
|
|
|
|
|
|
|
|
public IntPtr polys; // Pointer to glpoly_t
|
|
|
|
|
|
public IntPtr textureChain; // Pointer to msurface_t
|
|
|
|
|
|
|
|
|
|
|
|
public IntPtr texInfo; // Pointer to mtexinfo_t
|
|
|
|
|
|
|
|
|
|
|
|
public int vboFirstVert; // QuakeSpasm VBO stuff
|
|
|
|
|
|
|
|
|
|
|
|
public int dLightFrame; |
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = (QConstants.MaxDLights + 31) >> 5)] public uint[] dLightBits; |
|
|
|
|
|
|
|
|
|
|
|
public int lightmapTextureNum; |
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = QConstants.MaxLightmaps)] public byte[] styles; |
|
|
|
|
|
[MarshalAs(UnmanagedType.ByValArray, SizeConst = QConstants.MaxLightmaps)] public int[] cachedLight; |
|
|
|
|
|
public bool cachedDLight; |
|
|
|
|
|
public IntPtr samples; // Pointer to byte
|
|
|
|
|
|
} |