2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-06-03 07:12:33 +00:00

chore: disable type alignment on x64 for x86 games

This commit is contained in:
Jan Laupetin
2025-04-26 18:59:18 +02:00
parent 3b00c1d45b
commit a6107e24a2
6 changed files with 204 additions and 188 deletions
+27 -27
View File
@@ -155,10 +155,10 @@ namespace IW4
void* data;
};
typedef tdef_align(16) char raw_byte16;
typedef tdef_align(16) float raw_float16;
typedef tdef_align32(16) char raw_byte16;
typedef tdef_align32(16) float raw_float16;
typedef unsigned int raw_uint;
typedef tdef_align(128) unsigned int raw_uint128;
typedef tdef_align32(128) unsigned int raw_uint128;
typedef unsigned char cbrushedge_t;
typedef unsigned short r_index_t;
typedef float vec2_t[2];
@@ -289,7 +289,7 @@ namespace IW4
};
typedef unsigned char ByteVec[3];
typedef tdef_align(4) unsigned short UShortVec[3];
typedef tdef_align32(4) unsigned short UShortVec[3];
union XAnimDynamicFrames
{
@@ -303,7 +303,7 @@ namespace IW4
uint16_t _2[1];
};
struct type_align(4) XAnimPartTransFrames
struct type_align32(4) XAnimPartTransFrames
{
float mins[3];
float size[3];
@@ -330,9 +330,9 @@ namespace IW4
uint16_t _2[1];
};
typedef tdef_align(4) short XQuat2[2];
typedef tdef_align32(4) short XQuat2[2];
struct type_align(4) XAnimDeltaPartQuatDataFrames2
struct type_align32(4) XAnimDeltaPartQuatDataFrames2
{
XQuat2* frames;
XAnimDynamicIndicesQuat2 indices;
@@ -356,7 +356,7 @@ namespace IW4
uint16_t _2[1];
};
typedef tdef_align(4) short XQuat[4];
typedef tdef_align32(4) short XQuat[4];
struct XAnimDeltaPartQuatDataFrames
{
@@ -442,7 +442,7 @@ namespace IW4
char array[4];
};
struct type_align(16) GfxPackedVertex
struct type_align32(16) GfxPackedVertex
{
float xyz[3];
float binormalSign;
@@ -458,7 +458,7 @@ namespace IW4
uint16_t maxs[3];
};
struct type_align(16) XSurfaceCollisionNode
struct type_align32(16) XSurfaceCollisionNode
{
XSurfaceCollisionAabb aabb;
uint16_t childBeginIndex;
@@ -489,7 +489,7 @@ namespace IW4
XSurfaceCollisionTree* collisionTree;
};
typedef tdef_align(16) uint16_t r_index16_t;
typedef tdef_align32(16) uint16_t r_index16_t;
struct XSurface
{
@@ -673,7 +673,7 @@ namespace IW4
MaterialTextureDefInfo u;
};
struct type_align(16) MaterialConstantDef
struct type_align32(16) MaterialConstantDef
{
unsigned int nameHash;
char name[12];
@@ -843,7 +843,7 @@ namespace IW4
unsigned int toolFlags;
};
struct gcc_align(8) GfxDrawSurfFields
struct gcc_align32(8) GfxDrawSurfFields
{
uint64_t objectId : 16;
uint64_t reflectionProbeIndex : 8;
@@ -860,8 +860,8 @@ namespace IW4
union GfxDrawSurf
{
gcc_align(8) GfxDrawSurfFields fields;
gcc_align(8) uint64_t packed;
gcc_align32(8) GfxDrawSurfFields fields;
gcc_align32(8) uint64_t packed;
};
// The sort key is translated to a numeric value inside the material templates
@@ -993,7 +993,7 @@ namespace IW4
GfxStateBits* stateBitsTable;
};
struct type_align(4) GfxImageLoadDef
struct type_align32(4) GfxImageLoadDef
{
char levelCount;
char pad[3];
@@ -2824,7 +2824,7 @@ namespace IW4
int partitionIndex;
};
struct type_align(16) CollisionAabbTree
struct type_align32(16) CollisionAabbTree
{
float midPoint[3];
uint16_t materialIndex;
@@ -2918,8 +2918,8 @@ namespace IW4
float linkMaxs[2];
};
typedef tdef_align(128) cbrush_t cbrush_array_t;
typedef tdef_align(128) Bounds BoundsArray;
typedef tdef_align32(128) cbrush_t cbrush_array_t;
typedef tdef_align32(128) Bounds BoundsArray;
struct clipMap_t
{
@@ -3116,7 +3116,7 @@ namespace IW4
pathnode_transient_t transient;
};
struct type_align(16) pathbasenode_t
struct type_align32(16) pathbasenode_t
{
float vOrigin[3];
unsigned int type;
@@ -3313,7 +3313,7 @@ namespace IW4
char endVertIndex;
};
union type_align(4) FxGlassGeometryData
union type_align32(4) FxGlassGeometryData
{
FxGlassVertex vert;
FxGlassHoleHeader hole;
@@ -3505,14 +3505,14 @@ namespace IW4
r_index_t* indices;
};
struct type_align(4) GfxLightGridEntry
struct type_align32(4) GfxLightGridEntry
{
uint16_t colorsIndex;
char primaryLightIndex;
char needsTrace;
};
struct type_align(4) GfxLightGridColors
struct type_align32(4) GfxLightGridColors
{
char rgb[56][3];
};
@@ -3539,7 +3539,7 @@ namespace IW4
Bounds bounds;
};
struct type_align(4) GfxBrushModel
struct type_align32(4) GfxBrushModel
{
GfxBrushModelWritable writable;
Bounds bounds;
@@ -3599,7 +3599,7 @@ namespace IW4
uint16_t surfId;
};
struct type_align(4) GfxSceneDynBrush
struct type_align32(4) GfxSceneDynBrush
{
BModelDrawInfo info;
uint16_t dynEntId;
@@ -3744,8 +3744,8 @@ namespace IW4
int exponent;
};
typedef tdef_align(128) GfxCellTree GfxCellTree128;
typedef tdef_align(4) GfxSceneDynModel GfxSceneDynModel4;
typedef tdef_align32(128) GfxCellTree GfxCellTree128;
typedef tdef_align32(4) GfxSceneDynModel GfxSceneDynModel4;
struct GfxWorld
{