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.
14 * $Source: /cvs/cvsroot/d2x/3d/setup.c,v $
15 * $Revision: 1.1.1.1 $
17 * $Date: 2001-01-19 03:29:58 $
19 * Setup for 3d library
21 * $Log: not supported by cvs2svn $
22 * Revision 1.3 1999/10/07 02:27:14 donut
23 * OGL includes to remove warnings
25 * Revision 1.2 1999/09/21 04:05:55 donut
26 * mostly complete OGL implementation (still needs bitmap handling (reticle), and door/fan textures are corrupt)
28 * Revision 1.1.1.1 1999/06/14 21:57:50 donut
29 * Import of d1x 1.37 source.
31 * Revision 1.4 1995/10/11 00:27:04 allender
32 * bash free_num_points to 0
34 * Revision 1.3 1995/09/13 11:31:58 allender
35 * calc for fCanv_w2 and fCanv_h2
37 * Revision 1.2 1995/06/25 21:57:57 allender
38 * *** empty log message ***
40 * Revision 1.1 1995/05/05 08:52:54 allender
43 * Revision 1.1 1995/04/17 03:59:01 matt
51 static char rcsid[] = "$Id: setup.c,v 1.1.1.1 2001-01-19 03:29:58 bradleyb Exp $";
70 //initialize the 3d system
73 // div0_init(DM_ERROR);
77 //close down the 3d system
78 void g3_close(void) {}
80 extern void init_interface_vars_to_assembler(void);
83 void g3_start_frame(void)
87 //set int w,h & fixed-point w,h/2
88 Canv_w2 = (Canvas_width = grd_curcanv->cv_bitmap.bm_w)<<15;
89 Canv_h2 = (Canvas_height = grd_curcanv->cv_bitmap.bm_h)<<15;
91 fCanv_w2 = f2fl((Canvas_width = grd_curcanv->cv_bitmap.bm_w)<<15);
92 fCanv_h2 = f2fl((Canvas_height = grd_curcanv->cv_bitmap.bm_h)<<15);
95 //compute aspect ratio for this canvas
97 s = fixmuldiv(grd_curscreen->sc_aspect,Canvas_height,Canvas_width);
99 if (s <= f1_0) { //scale x
101 Window_scale.y = f1_0;
104 Window_scale.y = fixdiv(f1_0,s);
105 Window_scale.x = f1_0;
108 Window_scale.z = f1_0; //always 1
113 Win32_start_frame ();
118 init_interface_vars_to_assembler(); //for the texture-mapper
124 //this doesn't do anything, but is here for completeness
125 void g3_end_frame(void)
134 // Assert(free_point_num==0);