Move View_zoom out of global scope
It is only used briefly, so it can be local.
This commit is contained in:
parent
f047629051
commit
079ab168a4
|
@ -17,7 +17,6 @@
|
|||
namespace dcx {
|
||||
|
||||
vms_vector View_position;
|
||||
fix View_zoom;
|
||||
|
||||
vms_matrix Unscaled_matrix; //before scaling
|
||||
vms_matrix View_matrix;
|
||||
|
|
|
@ -27,7 +27,6 @@ extern double fCanv_w2, fCanv_h2;
|
|||
|
||||
extern vms_vector Window_scale;
|
||||
|
||||
extern fix View_zoom;
|
||||
extern vms_vector View_position,Matrix_scale;
|
||||
extern vms_matrix View_matrix,Unscaled_matrix;
|
||||
|
||||
|
|
|
@ -16,19 +16,18 @@
|
|||
|
||||
namespace dcx {
|
||||
|
||||
static void scale_matrix(void);
|
||||
static void scale_matrix(fix);
|
||||
|
||||
//set view from x,y,z, viewer matrix, and zoom. Must call one of g3_set_view_*()
|
||||
void g3_set_view_matrix(const vms_vector &view_pos,const vms_matrix &view_matrix,fix zoom)
|
||||
{
|
||||
View_zoom = zoom;
|
||||
View_position = view_pos;
|
||||
View_matrix = view_matrix;
|
||||
scale_matrix();
|
||||
scale_matrix(zoom);
|
||||
}
|
||||
|
||||
//performs aspect scaling on global view matrix
|
||||
static void scale_matrix(void)
|
||||
static void scale_matrix(const fix View_zoom)
|
||||
{
|
||||
Unscaled_matrix = View_matrix; //so we can use unscaled if we want
|
||||
|
||||
|
|
Loading…
Reference in a new issue