]> icculus.org git repositories - btb/d2x.git/blob - 3d/globvars.c
Makefile and conf.h fixes
[btb/d2x.git] / 3d / globvars.c
1 /*
2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
11 COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
12 */
13 /*
14  * $Source: /cvs/cvsroot/d2x/3d/globvars.c,v $
15  * $Revision: 1.2 $
16  * $Author: bradleyb $
17  * $Date: 2001-01-31 15:17:48 $
18  * 
19  * Global variables for 3d
20  * 
21  * $Log: not supported by cvs2svn $
22  * Revision 1.1.1.1  2001/01/19 03:29:58  bradleyb
23  * Import of d2x-0.0.8
24  *
25  * Revision 1.1.1.1  1999/06/14 21:57:45  donut
26  * Import of d1x 1.37 source.
27  *
28  * Revision 1.2  1995/09/13  11:30:47  allender
29  * added fCanv_w2 and vCanv_h2 for PPC implementation
30  *
31  * Revision 1.1  1995/05/05  08:50:48  allender
32  * Initial revision
33  *
34  * Revision 1.1  1995/04/17  04:24:57  matt
35  * Initial revision
36  * 
37  * 
38  */
39
40 #ifdef HAVE_CONFIG_H
41 #include <conf.h>
42 #endif
43
44 #ifdef RCS
45 static char rcsid[] = "$Id: globvars.c,v 1.2 2001-01-31 15:17:48 bradleyb Exp $";
46 #endif
47
48 #include "fix.h"
49 #include "vecmat.h"
50 #include "gr.h"
51 #include "3d.h"
52 #include "globvars.h"
53
54 vms_vector      View_position;
55 fix                     View_zoom;
56
57 vms_matrix      Unscaled_matrix;        //before scaling
58 vms_matrix      View_matrix;
59
60 vms_vector      Window_scale;           //scaling for window aspect
61 vms_vector      Matrix_scale;           //how the matrix is scaled, window_scale * zoom
62
63 int                     Canvas_width;           //the actual width
64 int                     Canvas_height;          //the actual height
65
66 fix                     Canv_w2;                                //fixed-point width/2
67 fix                     Canv_h2;                                //fixed-point height/2
68
69 #ifdef __powerc
70 double          fCanv_w2;
71 double          fCanv_h2;
72 #endif
73
74 //vertex buffers for polygon drawing and clipping
75 g3s_point * Vbuf0[MAX_POINTS_IN_POLY];
76 g3s_point *Vbuf1[MAX_POINTS_IN_POLY];
77
78 //list of 2d coords
79 fix Vertex_list[MAX_POINTS_IN_POLY*2];
80
81
82