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-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
20 #define WIN32_LEAN_AND_MEAN
42 // ----------------------------------------------------------------------------
44 static BOOL gfx_initialized=0;// GFX flag
45 static BOOL d3d_enhanced=0; // 3D enhanced?
46 static FILE *LogFile=NULL; // Log File!
49 // Function prototypes
50 // ----------------------------------------------------------------------------
57 #define WRITELOG(t) if (LogFile) { fprintf t; fflush(LogFile); }
58 #define LOGINIT(n) LogFile = fopen(n, "wt");
59 #define LOGCLOSE if (LogFile) fclose(LogFile);
66 The GFX system is a higher level abstraction that is independent of the
67 DD-DDGR interface. gfx uses the DD-DDGR interface, but not the other way
68 around. You may use GFX calls and DD-DDGR calls interchangably with older
69 functions. Any newer graphic functionality for Descent 2 will use
75 // ----------------------------------------------------------------------------
79 When called at game initialization, this will initialize the DirectDraw
80 system. Then we initialize other graphic components if called for.
84 BOOL gfxInit(int hw_acc)
86 // Initialize Direct Draw and DDGR system.
88 if (gfx_initialized) return TRUE;
90 if (!DDInit(DDGR_FULLSCREEN))
93 grd_curscreen = (grs_screen *)malloc(sizeof(grs_screen));
94 W95DisplayMode = SM95_640x480x8;
100 // Initialize 3D system if available.
104 Error("Unable to initialize 3D Hardware.");
107 else d3d_enhanced = 0;
117 if (!gfx_initialized) return;