chore: adjust game structs to have custom alignment when they are

platform independent
This commit is contained in:
Jan Laupetin 2025-04-27 21:05:22 +02:00
parent 4e9599aabf
commit 4ccd0a55cf
No known key found for this signature in database
GPG Key ID: 44B581F78FF5C57C
5 changed files with 48 additions and 48 deletions

View File

@ -296,7 +296,7 @@ namespace IW3
uint16_t maxs[3]; uint16_t maxs[3];
}; };
struct type_align32(16) XSurfaceCollisionNode struct type_align(16) XSurfaceCollisionNode
{ {
XSurfaceCollisionAabb aabb; XSurfaceCollisionAabb aabb;
uint16_t childBeginIndex; uint16_t childBeginIndex;
@ -344,7 +344,7 @@ namespace IW3
char array[4]; char array[4];
}; };
struct type_align32(16) GfxPackedVertex struct type_align(16) GfxPackedVertex
{ {
float xyz[3]; float xyz[3];
float binormalSign; float binormalSign;
@ -633,7 +633,7 @@ namespace IW3
unsigned int loadBits[2]; unsigned int loadBits[2];
}; };
struct type_align32(16) MaterialConstantDef struct type_align(16) MaterialConstantDef
{ {
unsigned int nameHash; unsigned int nameHash;
char name[12]; char name[12];
@ -1775,7 +1775,7 @@ namespace IW3
pathnode_tree_info_t u; pathnode_tree_info_t u;
}; };
struct type_align32(16) pathbasenode_t struct type_align(16) pathbasenode_t
{ {
float vOrigin[3]; float vOrigin[3];
unsigned int type; unsigned int type;
@ -2044,14 +2044,14 @@ namespace IW3
GfxImage* secondary; GfxImage* secondary;
}; };
struct type_align32(4) GfxLightGridEntry struct type_align(4) GfxLightGridEntry
{ {
uint16_t colorsIndex; uint16_t colorsIndex;
char primaryLightIndex; char primaryLightIndex;
char needsTrace; char needsTrace;
}; };
struct type_align32(4) GfxLightGridColors struct type_align(4) GfxLightGridColors
{ {
char rgb[56][3]; char rgb[56][3];
}; };
@ -2137,7 +2137,7 @@ namespace IW3
uint16_t surfId; uint16_t surfId;
}; };
struct type_align32(4) GfxSceneDynBrush struct type_align(4) GfxSceneDynBrush
{ {
BModelDrawInfo info; BModelDrawInfo info;
uint16_t dynEntId; uint16_t dynEntId;

View File

@ -442,7 +442,7 @@ namespace IW4
char array[4]; char array[4];
}; };
struct type_align32(16) GfxPackedVertex struct type_align(16) GfxPackedVertex
{ {
float xyz[3]; float xyz[3];
float binormalSign; float binormalSign;
@ -458,7 +458,7 @@ namespace IW4
uint16_t maxs[3]; uint16_t maxs[3];
}; };
struct type_align32(16) XSurfaceCollisionNode struct type_align(16) XSurfaceCollisionNode
{ {
XSurfaceCollisionAabb aabb; XSurfaceCollisionAabb aabb;
uint16_t childBeginIndex; uint16_t childBeginIndex;
@ -673,7 +673,7 @@ namespace IW4
MaterialTextureDefInfo u; MaterialTextureDefInfo u;
}; };
struct type_align32(16) MaterialConstantDef struct type_align(16) MaterialConstantDef
{ {
unsigned int nameHash; unsigned int nameHash;
char name[12]; char name[12];
@ -2824,7 +2824,7 @@ namespace IW4
int partitionIndex; int partitionIndex;
}; };
struct type_align32(16) CollisionAabbTree struct type_align(16) CollisionAabbTree
{ {
float midPoint[3]; float midPoint[3];
uint16_t materialIndex; uint16_t materialIndex;
@ -3116,7 +3116,7 @@ namespace IW4
pathnode_transient_t transient; pathnode_transient_t transient;
}; };
struct type_align32(16) pathbasenode_t struct type_align(16) pathbasenode_t
{ {
float vOrigin[3]; float vOrigin[3];
unsigned int type; unsigned int type;
@ -3313,7 +3313,7 @@ namespace IW4
char endVertIndex; char endVertIndex;
}; };
union type_align32(4) FxGlassGeometryData union type_align(4) FxGlassGeometryData
{ {
FxGlassVertex vert; FxGlassVertex vert;
FxGlassHoleHeader hole; FxGlassHoleHeader hole;
@ -3505,14 +3505,14 @@ namespace IW4
r_index_t* indices; r_index_t* indices;
}; };
struct type_align32(4) GfxLightGridEntry struct type_align(4) GfxLightGridEntry
{ {
uint16_t colorsIndex; uint16_t colorsIndex;
char primaryLightIndex; char primaryLightIndex;
char needsTrace; char needsTrace;
}; };
struct type_align32(4) GfxLightGridColors struct type_align(4) GfxLightGridColors
{ {
char rgb[56][3]; char rgb[56][3];
}; };
@ -3599,7 +3599,7 @@ namespace IW4
uint16_t surfId; uint16_t surfId;
}; };
struct type_align32(4) GfxSceneDynBrush struct type_align(4) GfxSceneDynBrush
{ {
BModelDrawInfo info; BModelDrawInfo info;
uint16_t dynEntId; uint16_t dynEntId;

View File

@ -491,7 +491,7 @@ namespace IW5
unsigned char array[4]; unsigned char array[4];
}; };
struct type_align32(16) GfxPackedVertex struct type_align(16) GfxPackedVertex
{ {
vec3_t xyz; vec3_t xyz;
float binormalSign; float binormalSign;
@ -507,7 +507,7 @@ namespace IW5
unsigned short maxs[3]; unsigned short maxs[3];
}; };
struct type_align32(16) XSurfaceCollisionNode struct type_align(16) XSurfaceCollisionNode
{ {
XSurfaceCollisionAabb aabb; XSurfaceCollisionAabb aabb;
unsigned short childBeginIndex; unsigned short childBeginIndex;
@ -822,7 +822,7 @@ namespace IW5
MaterialTextureDefInfo u; MaterialTextureDefInfo u;
}; };
struct type_align32(16) MaterialConstantDef struct type_align(16) MaterialConstantDef
{ {
unsigned int nameHash; unsigned int nameHash;
char name[12]; char name[12];
@ -1410,7 +1410,7 @@ namespace IW5
int partitionIndex; int partitionIndex;
}; };
struct type_align32(16) CollisionAabbTree struct type_align(16) CollisionAabbTree
{ {
float midPoint[3]; float midPoint[3];
unsigned short materialIndex; unsigned short materialIndex;
@ -1761,7 +1761,7 @@ namespace IW5
pathnode_transient_t transient; pathnode_transient_t transient;
}; };
struct type_align32(16) pathbasenode_t struct type_align(16) pathbasenode_t
{ {
float vOrigin[3]; float vOrigin[3];
unsigned int type; unsigned int type;
@ -1948,7 +1948,7 @@ namespace IW5
unsigned char endVertIndex; unsigned char endVertIndex;
}; };
union type_align32(4) FxGlassGeometryData union type_align(4) FxGlassGeometryData
{ {
FxGlassVertex vert; FxGlassVertex vert;
FxGlassHoleHeader hole; FxGlassHoleHeader hole;
@ -2155,14 +2155,14 @@ namespace IW5
r_index_t* indices; r_index_t* indices;
}; };
struct type_align32(4) GfxLightGridEntry struct type_align(4) GfxLightGridEntry
{ {
unsigned short colorsIndex; unsigned short colorsIndex;
unsigned char primaryLightIndex; unsigned char primaryLightIndex;
unsigned char needsTrace; unsigned char needsTrace;
}; };
struct type_align32(4) GfxLightGridColors struct type_align(4) GfxLightGridColors
{ {
unsigned char rgb[56][3]; unsigned char rgb[56][3];
}; };
@ -2250,7 +2250,7 @@ namespace IW5
unsigned short surfId; unsigned short surfId;
}; };
struct type_align32(4) GfxSceneDynBrush struct type_align(4) GfxSceneDynBrush
{ {
BModelDrawInfo info; BModelDrawInfo info;
unsigned short dynEntId; unsigned short dynEntId;

View File

@ -490,7 +490,7 @@ namespace T5
char array[4]; char array[4];
}; };
struct type_align32(16) GfxPackedVertex struct type_align(16) GfxPackedVertex
{ {
vec3_t xyz; vec3_t xyz;
float binormalSign; float binormalSign;
@ -511,7 +511,7 @@ namespace T5
uint16_t maxs[3]; uint16_t maxs[3];
}; };
struct type_align32(16) XSurfaceCollisionNode struct type_align(16) XSurfaceCollisionNode
{ {
XSurfaceCollisionAabb aabb; XSurfaceCollisionAabb aabb;
uint16_t childBeginIndex; uint16_t childBeginIndex;
@ -796,7 +796,7 @@ namespace T5
MaterialTextureDefInfo u; MaterialTextureDefInfo u;
}; };
struct type_align32(16) MaterialConstantDef struct type_align(16) MaterialConstantDef
{ {
unsigned int nameHash; unsigned int nameHash;
char name[12]; char name[12];
@ -1254,7 +1254,7 @@ namespace T5
int sequence; int sequence;
}; };
struct type_align32(4) SndIndexEntry struct type_align(4) SndIndexEntry
{ {
uint16_t value; uint16_t value;
uint16_t next; uint16_t next;
@ -1409,7 +1409,7 @@ namespace T5
int partitionIndex; int partitionIndex;
}; };
struct type_align32(16) CollisionAabbTree struct type_align(16) CollisionAabbTree
{ {
float origin[3]; float origin[3];
uint16_t materialIndex; uint16_t materialIndex;
@ -1687,7 +1687,7 @@ namespace T5
int maxy; int maxy;
}; };
struct type_align32(4) ComWaterCell struct type_align(4) ComWaterCell
{ {
int16_t waterheight; int16_t waterheight;
char flooroffset; char flooroffset;
@ -1826,7 +1826,7 @@ namespace T5
pathnode_transient_t transient; pathnode_transient_t transient;
}; };
struct type_align32(16) pathbasenode_t struct type_align(16) pathbasenode_t
{ {
float vOrigin[3]; float vOrigin[3];
unsigned int type; unsigned int type;
@ -1926,7 +1926,7 @@ namespace T5
GfxWorldSunColor sunSettings[1]; GfxWorldSunColor sunSettings[1];
}; };
struct type_align32(16) float44 struct type_align(16) float44
{ {
union union
{ {
@ -2130,14 +2130,14 @@ namespace T5
uint16_t* indices; uint16_t* indices;
}; };
struct type_align32(4) GfxLightGridEntry struct type_align(4) GfxLightGridEntry
{ {
uint16_t colorsIndex; uint16_t colorsIndex;
char primaryLightIndex; char primaryLightIndex;
char needsTrace; char needsTrace;
}; };
struct type_align32(4) GfxCompressedLightGridColors struct type_align(4) GfxCompressedLightGridColors
{ {
char rgb[56][3]; char rgb[56][3];
}; };
@ -2227,7 +2227,7 @@ namespace T5
uint16_t surfId; uint16_t surfId;
}; };
struct type_align32(4) GfxSceneDynBrush struct type_align(4) GfxSceneDynBrush
{ {
BModelDrawInfo info; BModelDrawInfo info;
uint16_t dynEntId; uint16_t dynEntId;

View File

@ -2883,7 +2883,7 @@ namespace T6
GfxImage* image; GfxImage* image;
}; };
struct type_align32(16) MaterialConstantDef struct type_align(16) MaterialConstantDef
{ {
unsigned int nameHash; unsigned int nameHash;
char name[12]; char name[12];
@ -3076,7 +3076,7 @@ namespace T6
int sequence; int sequence;
}; };
struct type_align32(4) SndIndexEntry struct type_align(4) SndIndexEntry
{ {
uint16_t value; uint16_t value;
uint16_t next; uint16_t next;
@ -3261,7 +3261,7 @@ namespace T6
int partitionIndex; int partitionIndex;
}; };
struct type_align32(16) CollisionAabbTree struct type_align(16) CollisionAabbTree
{ {
vec3_t origin; vec3_t origin;
uint16_t materialIndex; uint16_t materialIndex;
@ -3526,7 +3526,7 @@ namespace T6
pathnode_transient_t transient; pathnode_transient_t transient;
}; };
struct type_align32(16) pathbasenode_t struct type_align(16) pathbasenode_t
{ {
vec3_t vOrigin; vec3_t vOrigin;
unsigned int type; unsigned int type;
@ -3573,7 +3573,7 @@ namespace T6
float halfSize; float halfSize;
}; };
struct type_align32(16) GfxStreamingAabbTree struct type_align(16) GfxStreamingAabbTree
{ {
vec4_t mins; vec4_t mins;
vec4_t maxs; vec4_t maxs;
@ -3586,7 +3586,7 @@ namespace T6
uint16_t surfaceCount; uint16_t surfaceCount;
}; };
struct type_align32(16) float44 struct type_align(16) float44
{ {
union union
{ {
@ -3734,14 +3734,14 @@ namespace T6
{ {
};*/ };*/
struct type_align32(4) GfxLightGridEntry struct type_align(4) GfxLightGridEntry
{ {
uint16_t colorsIndex; uint16_t colorsIndex;
char primaryLightIndex; char primaryLightIndex;
char visibility; char visibility;
}; };
struct type_align32(4) GfxCompressedLightGridColors struct type_align(4) GfxCompressedLightGridColors
{ {
char rgb[56][3]; char rgb[56][3];
}; };
@ -3769,7 +3769,7 @@ namespace T6
float padding2; float padding2;
}; };
struct type_align32(16) GfxBrushModel struct type_align(16) GfxBrushModel
{ {
GfxBrushModelWritable writable; GfxBrushModelWritable writable;
vec3_t bounds[2]; vec3_t bounds[2];
@ -3808,7 +3808,7 @@ namespace T6
uint16_t surfId; uint16_t surfId;
}; };
struct type_align32(4) GfxSceneDynBrush struct type_align(4) GfxSceneDynBrush
{ {
BModelDrawInfo info; BModelDrawInfo info;
uint16_t dynEntId; uint16_t dynEntId;
@ -5712,7 +5712,7 @@ namespace T6
unsigned int packed; unsigned int packed;
}; };
struct type_align32(16) GfxPackedVertex struct type_align(16) GfxPackedVertex
{ {
vec3_t xyz; vec3_t xyz;
float binormalSign; float binormalSign;
@ -6994,7 +6994,7 @@ namespace T6
uint16_t maxs[3]; uint16_t maxs[3];
}; };
struct type_align32(16) XSurfaceCollisionNode struct type_align(16) XSurfaceCollisionNode
{ {
XSurfaceCollisionAabb aabb; XSurfaceCollisionAabb aabb;
uint16_t childBeginIndex; uint16_t childBeginIndex;