From d0dd976fdb4c9bd5e4accdd42071fa336eb1a3f0 Mon Sep 17 00:00:00 2001 From: Kp Date: Thu, 2 Oct 2014 03:02:36 +0000 Subject: [PATCH] Pass g3_point_2_vec v by & --- common/3d/points.cpp | 5 ++--- common/include/3d.h | 2 +- similar/editor/medmisc.cpp | 6 +----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/common/3d/points.cpp b/common/3d/points.cpp index 75c9b3bea..a62fc54d8 100644 --- a/common/3d/points.cpp +++ b/common/3d/points.cpp @@ -109,7 +109,7 @@ void g3_project_point(g3s_point *p) } //from a 2d point, compute the vector through that point -void g3_point_2_vec(vms_vector *v,short sx,short sy) +void g3_point_2_vec(vms_vector &v,short sx,short sy) { vms_vector tempv; vms_matrix tempm; @@ -120,8 +120,7 @@ void g3_point_2_vec(vms_vector *v,short sx,short sy) vm_vec_normalize(tempv); tempm = vm_transposed_matrix(Unscaled_matrix); - vm_vec_rotate(*v,tempv,tempm); - + vm_vec_rotate(v,tempv,tempm); } //delta rotation functions diff --git a/common/include/3d.h b/common/include/3d.h index 22d9836d4..a93c81e82 100644 --- a/common/include/3d.h +++ b/common/include/3d.h @@ -161,7 +161,7 @@ void g3_project_point(g3s_point *point); fix g3_calc_point_depth(const vms_vector *pnt); //from a 2d point, compute the vector through that point -void g3_point_2_vec(vms_vector *v,short sx,short sy); +void g3_point_2_vec(vms_vector &v,short sx,short sy); //code a point. fills in the p3_codes field of the point, and returns the codes ubyte g3_code_point(g3s_point *point); diff --git a/similar/editor/medmisc.cpp b/similar/editor/medmisc.cpp index 03208801a..0fe2323f7 100644 --- a/similar/editor/medmisc.cpp +++ b/similar/editor/medmisc.cpp @@ -319,13 +319,9 @@ void med_point_2_vec(grs_canvas *canv,vms_vector *v,short sx,short sy) g3_start_frame(); g3_set_view_matrix(&Viewer->pos,&Viewer->orient,Render_zoom); - - g3_point_2_vec(v,sx,sy); - + g3_point_2_vec(*v,sx,sy); g3_end_frame(); } - - void draw_world_from_game(void) {