mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Add anonymous union between separate coordinate variables and vec2/3_t in basic map structs
git-svn-id: https://svn.eduke32.com/eduke32@7693 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/include/buildtypes.h
This commit is contained in:
parent
1a4afe09a8
commit
bd80cec462
2 changed files with 42 additions and 17 deletions
|
@ -70,8 +70,14 @@ typedef struct
|
||||||
|
|
||||||
//32 bytes
|
//32 bytes
|
||||||
typedef struct
|
typedef struct
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct
|
||||||
{
|
{
|
||||||
StructTracker(Wall, int32_t) x, y;
|
StructTracker(Wall, int32_t) x, y;
|
||||||
|
};
|
||||||
|
vec2_t p;
|
||||||
|
};
|
||||||
StructTracker(Wall, int16_t) point2, nextwall, nextsector;
|
StructTracker(Wall, int16_t) point2, nextwall, nextsector;
|
||||||
StructTracker(Wall, uint16_t) cstat;
|
StructTracker(Wall, uint16_t) cstat;
|
||||||
StructTracker(Wall, int16_t) picnum, overpicnum;
|
StructTracker(Wall, int16_t) picnum, overpicnum;
|
||||||
|
@ -156,8 +162,15 @@ enum
|
||||||
|
|
||||||
//44 bytes
|
//44 bytes
|
||||||
typedef struct
|
typedef struct
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct
|
||||||
{
|
{
|
||||||
StructTracker(Sprite, int32_t) x, y, z;
|
StructTracker(Sprite, int32_t) x, y, z;
|
||||||
|
};
|
||||||
|
vec3_t v;
|
||||||
|
vec2_t p;
|
||||||
|
};
|
||||||
StructTracker(Sprite, uint16_t) cstat;
|
StructTracker(Sprite, uint16_t) cstat;
|
||||||
StructTracker(Sprite, int16_t) picnum;
|
StructTracker(Sprite, int16_t) picnum;
|
||||||
StructTracker(Sprite, int8_t) shade;
|
StructTracker(Sprite, int8_t) shade;
|
||||||
|
@ -167,15 +180,13 @@ typedef struct
|
||||||
StructTracker(Sprite, int16_t) sectnum, statnum;
|
StructTracker(Sprite, int16_t) sectnum, statnum;
|
||||||
StructTracker(Sprite, int16_t) ang, owner;
|
StructTracker(Sprite, int16_t) ang, owner;
|
||||||
union {
|
union {
|
||||||
StructTracker(Sprite, int16_t) xvel;
|
struct
|
||||||
StructTracker(Sprite, int16_t) index;
|
{
|
||||||
|
StructTracker(Sprite, int16_t) xvel /*index*/, yvel, zvel;
|
||||||
};
|
};
|
||||||
StructTracker(Sprite, int16_t) yvel, zvel;
|
vec3_16_t vel;
|
||||||
union {
|
|
||||||
StructTracker(Sprite, int16_t) lotag;
|
|
||||||
StructTracker(Sprite, int16_t) type;
|
|
||||||
};
|
};
|
||||||
StructTracker(Sprite, int16_t) hitag;
|
StructTracker(Sprite, int16_t) lotag /*type*/, hitag;
|
||||||
StructTracker(Sprite, int16_t) extra;
|
StructTracker(Sprite, int16_t) extra;
|
||||||
} StructName(spritetypev7);
|
} StructName(spritetypev7);
|
||||||
|
|
||||||
|
@ -207,8 +218,14 @@ typedef struct
|
||||||
|
|
||||||
// 38 bytes
|
// 38 bytes
|
||||||
typedef struct
|
typedef struct
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct
|
||||||
{
|
{
|
||||||
StructTracker(Wall, int32_t) x, y;
|
StructTracker(Wall, int32_t) x, y;
|
||||||
|
};
|
||||||
|
vec2_t const p;
|
||||||
|
};
|
||||||
StructTracker(Wall, int16_t) point2, nextwall, nextsector;
|
StructTracker(Wall, int16_t) point2, nextwall, nextsector;
|
||||||
StructTracker(Wall, int16_t) upwall, dnwall;
|
StructTracker(Wall, int16_t) upwall, dnwall;
|
||||||
StructTracker(Wall, uint16_t) cstat;
|
StructTracker(Wall, uint16_t) cstat;
|
||||||
|
|
|
@ -812,18 +812,16 @@ typedef struct MAY_ALIAS {
|
||||||
int32_t x, y;
|
int32_t x, y;
|
||||||
} vec2_t;
|
} vec2_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct MAY_ALIAS {
|
||||||
int16_t x, y;
|
int16_t x, y;
|
||||||
} vec2s_t;
|
} vec2_16_t;
|
||||||
|
|
||||||
|
using vec2s_t = vec2_16_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t x, y;
|
uint32_t x, y;
|
||||||
} vec2u_t;
|
} vec2u_t;
|
||||||
|
|
||||||
typedef struct MAY_ALIAS {
|
|
||||||
int32_t x, y, z;
|
|
||||||
} vec3_t;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
float x, y;
|
float x, y;
|
||||||
} vec2f_t;
|
} vec2f_t;
|
||||||
|
@ -832,6 +830,16 @@ typedef struct {
|
||||||
double x, y;
|
double x, y;
|
||||||
} vec2d_t;
|
} vec2d_t;
|
||||||
|
|
||||||
|
typedef struct MAY_ALIAS {
|
||||||
|
int32_t x, y, z;
|
||||||
|
} vec3_t;
|
||||||
|
|
||||||
|
typedef struct MAY_ALIAS {
|
||||||
|
int16_t x, y, z;
|
||||||
|
} vec3_16_t;
|
||||||
|
|
||||||
|
using vec3s_t = vec3_16_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
union { float x; float d; };
|
union { float x; float d; };
|
||||||
union { float y; float u; };
|
union { float y; float u; };
|
||||||
|
|
Loading…
Reference in a new issue