1 /* $Id: desw.h,v 1.2 2003-10-10 09:36:34 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
25 #define DESCENT_VIEWPORT_WIDTH 640
26 #define DESCENT_VIEWPORT_HEIGHT 480
27 #define DESCENT_RENDER_WIDTH 320
28 #define DESCENT_RENDER_HEIGHT 200
33 #define WIN32_LEAN_AND_MEAN
37 #include "win/winapp.h"
42 #undef DEFAULT_PALETTE
45 #define WINAPP_NAME "Descent II"
47 typedef struct GAME_CONTEXT {
52 typedef struct SCREEN_CONTEXT {
57 typedef struct PALETTE {
60 PALETTEENTRY entries[256];
63 typedef struct RGBBITMAPINFO {
64 BITMAPINFOHEADER bmiHeader;
73 #define MSG_SHUTDOWN 1
77 typedef struct WinJoystickDesc {
92 extern HWND _hAppWnd; // Descent Window
93 extern HINSTANCE _hAppInstance;
94 extern int _DDraw; // Direct X Implementation
95 extern BOOL _AppActive;
96 extern BOOL SOS_DLLInit;
97 extern BOOL _RedrawScreen;
98 extern SCREEN_CONTEXT _SCRContext;
101 extern dd_grs_canvas *dd_VR_offscreen_buffer;
102 extern dd_grs_canvas dd_VR_screen_pages[2];
103 extern dd_grs_canvas dd_VR_render_buffer[2];
104 extern dd_grs_canvas dd_VR_render_sub_buffer[2];
110 extern HPALETTE _hAppPalette; // Application Palette
115 extern RECT ViewportRect; // Viewport rect for window
116 extern char *_OffscreenCanvasBits; // Pointer to DIB Bits.
117 extern fix WinFrameTime; // Time per frame
118 extern int Platform_system; // Tells us the platform
123 extern void WinDelay(int msecs);
126 extern void WErrorPrint(char *msg);
127 extern dd_grs_canvas *get_current_game_screen();
128 extern BOOL SOSInit();
129 extern void SOSUnInit();
132 #define MOUSE_DEFAULT_CURSOR 1
133 #define MOUSE_WAIT_CURSOR 2
135 extern void LoadCursorWin(int cursor);
136 extern void ShowCursorW();
137 extern void HideCursorW();
141 #define CanvasWidth(C) ((C).bmiHeader.biWidth)
142 #define CanvasHeight(C) (((C).bmiHeader.biHeight > 0) ? \
143 (C).bmiHeader.biHeight : -(C).bmiHeader.biHeight)
145 #define DebugMessageBox(c) (MessageBox(NULL,c,"Message",MB_OK))
147 #define DEFINE_SCREEN(fn) (_SCRContext.bkg_filename = fn)
149 #define WINNT_PLATFORM 1
150 #define WIN95_PLATFORM 0