Reduce nesting of vms_vector::{x,y,z}
This commit is contained in:
parent
af0759af59
commit
eefdce5b04
|
@ -35,21 +35,13 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
//The basic fixed-point vector. Access elements by name or position
|
||||
struct vms_vector
|
||||
{
|
||||
union {
|
||||
struct
|
||||
{
|
||||
fix x, y, z;
|
||||
};
|
||||
};
|
||||
fix x, y, z;
|
||||
};
|
||||
|
||||
#define DEFINE_SERIAL_VMS_VECTOR_TO_MESSAGE() \
|
||||
DEFINE_SERIAL_UDT_TO_MESSAGE(vms_vector, v, (v.x, v.y, v.z)); \
|
||||
ASSERT_SERIAL_UDT_MESSAGE_SIZE(vms_vector, 12)
|
||||
|
||||
typedef struct vms_vector vms_vector_array;
|
||||
|
||||
|
||||
//Angle vector. Used to store orientations
|
||||
struct vms_angvec
|
||||
{
|
||||
|
@ -97,10 +89,10 @@ extern const vms_matrix vmd_identity_matrix;
|
|||
|
||||
//Here's a handy constant
|
||||
|
||||
#define ZERO_VECTOR {{{0,0,0}}}
|
||||
#define IDENTITY_MATRIX { {{{f1_0,0,0}}}, {{{0,f1_0,0}}}, {{{0,0,f1_0}}} }
|
||||
#define ZERO_VECTOR {0,0,0}
|
||||
#define IDENTITY_MATRIX { {f1_0,0,0}, {0,f1_0,0}, {0,0,f1_0} }
|
||||
|
||||
const vms_vector vmd_zero_vector = ZERO_VECTOR;
|
||||
const vms_vector vmd_zero_vector ZERO_VECTOR;
|
||||
|
||||
//negate a vector
|
||||
static inline void vm_vec_negate(vms_vector *v)
|
||||
|
|
|
@ -59,7 +59,7 @@ int Show_axes_flag = 0; // 0 = don't show, !0 = do show coordinate axes in *Curs
|
|||
uint Update_flags = UF_ALL; //force total redraw
|
||||
int Funky_chase_mode = 0;
|
||||
vms_angvec Seg_orientation = {0,0,0};
|
||||
vms_vector Seg_scale = {{{F1_0*20,F1_0*20,F1_0*20}}};
|
||||
vms_vector Seg_scale{F1_0*20,F1_0*20,F1_0*20};
|
||||
int mine_changed = 0;
|
||||
int ModeFlag;
|
||||
editor_view *current_view;
|
||||
|
|
|
@ -158,7 +158,7 @@ vms_vector satellite_pos,satellite_upvec;
|
|||
//!!grs_bitmap **exit_bitmap_list[1];
|
||||
int station_modelnum,exit_modelnum,destroyed_exit_modelnum;
|
||||
|
||||
static vms_vector station_pos = {{{0xf8c4<<10,0x3c1c<<12,0x372<<10}}};
|
||||
static vms_vector station_pos{0xf8c4<<10,0x3c1c<<12,0x372<<10};
|
||||
|
||||
#ifdef STATION_ENABLED
|
||||
static grs_bitmap *station_bitmap;
|
||||
|
|
|
@ -261,7 +261,7 @@ void do_morph_frame(object *obj)
|
|||
|
||||
}
|
||||
|
||||
static const vms_vector morph_rotvel = {{{0x4000,0x2000,0x1000}}};
|
||||
static const vms_vector morph_rotvel{0x4000,0x2000,0x1000};
|
||||
|
||||
void init_morphs()
|
||||
{
|
||||
|
|
|
@ -398,7 +398,7 @@ static void get_pnt(vms_vector *p,int i,int j)
|
|||
p->y = HEIGHT(i,j)*HEIGHT_SCALE;
|
||||
}
|
||||
|
||||
static const vms_vector light = {{{0x2e14,0xe8f5,0x5eb8}}};
|
||||
static const vms_vector light{0x2e14,0xe8f5,0x5eb8};
|
||||
|
||||
static fix get_face_light(vms_vector *p0,vms_vector *p1,vms_vector *p2)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue