]> icculus.org git repositories - btb/d2x.git/blob - main/screens.h
Fix mismatched arg types in the win32 code (d1x r1.2)
[btb/d2x.git] / main / screens.h
1 /* $Id: screens.h,v 1.2 2003-10-10 09:36:35 btb Exp $ */
2 /*
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.
13 */
14
15 /*
16  *
17  * Info on canvases, screens, etc.
18  *
19  * Old Log:
20  * Revision 1.1  1995/05/16  16:02:15  allender
21  * Initial revision
22  *
23  * Revision 2.2  1995/03/14  12:14:00  john
24  * Made VR helmets have 4 resolutions to choose from.
25  *
26  * Revision 2.1  1995/03/06  15:24:09  john
27  * New screen techniques.
28  *
29  * Revision 2.0  1995/02/27  11:31:40  john
30  * New version 2.0, which has no anonymous unions, builds with
31  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
32  *
33  * Revision 1.15  1994/08/10  19:56:45  john
34  * Changed font stuff; Took out old menu; messed up lots of
35  * other stuff like game sequencing messages, etc.
36  *
37  * Revision 1.14  1994/07/20  21:04:26  john
38  * Add VictorMax VR helment support.
39  *
40  * Revision 1.13  1994/06/24  17:01:28  john
41  * Add VFX support; Took Game Sequencing, like EndGame and stuff and
42  * took it out of game.c and into gameseq.c
43  *
44  * Revision 1.12  1994/04/20  20:30:03  john
45  * *** empty log message ***
46  *
47  * Revision 1.11  1994/03/30  21:12:05  yuan
48  * Use only 119 lines (saves 3 scanlines)
49  *
50  * Revision 1.10  1994/03/17  16:49:37  john
51  * *** empty log message ***
52  *
53  * Revision 1.9  1994/02/11  15:07:44  matt
54  * Added extern of Canv_game_offscrn
55  *
56  * Revision 1.8  1994/01/31  16:52:43  john
57  * redid cockpit bounds.
58  *
59  * Revision 1.7  1994/01/26  18:13:53  john
60  * Changed 3d constants..
61  *
62  * Revision 1.6  1994/01/25  17:11:46  john
63  * *** empty log message ***
64  *
65  * Revision 1.5  1994/01/25  11:43:25  john
66  * Changed game window size.
67  *
68  * Revision 1.4  1993/12/13  16:32:39  yuan
69  * Fixed menu system memory errors, and other bugs.
70  *
71  * Revision 1.3  1993/12/10  16:07:23  yuan
72  * Working on menu system.  Updated the title screen.
73  *
74  * Revision 1.2  1993/12/09  21:27:46  matt
75  * Added 3d window sizing constants
76  *
77  * Revision 1.1  1993/12/06  09:50:33  matt
78  * Initial revision
79  *
80  *
81  *
82  */
83
84
85 #ifndef _SCREEN_H
86 #define _SCREEN_H
87
88 #include "gr.h"
89
90 // What graphics modes the game & editor open
91
92 // for Screen_mode variable
93 #define SCREEN_MENU             0       // viewing the menu screen
94 #define SCREEN_GAME             1       // viewing the menu screen
95 #define SCREEN_EDITOR   2       // viewing the editor screen
96
97 //from editor.c
98 extern grs_canvas *Canv_editor;                 // the full on-scrren editor canvas
99 extern grs_canvas *Canv_editor_game;    // the game window on the editor screen
100
101 //from game.c
102 extern int set_screen_mode(int sm);             // True = editor screen
103
104 //About the screen
105 extern ubyte            VR_screen_flags;
106 extern ubyte            VR_current_page;
107 extern fix                      VR_eye_width;
108 extern int                      VR_eye_switch;
109
110 //NEWVR (Add a bunch off lines)
111 #define VR_SEPARATION F1_0*7/10
112 #define VR_PIXEL_SHIFT -6
113 #define VR_WHITE_INDEX 255
114 #define VR_BLACK_INDEX 0
115 extern int                      VR_eye_offset;
116 extern int                      VR_eye_offset_changed;
117 extern void             VR_reset_params();
118 extern int                      VR_use_reg_code;
119
120
121 extern int                      VR_screen_mode;
122 extern int                      VR_render_mode;
123 extern int                      VR_low_res;
124 extern int                      VR_show_hud;
125 extern int                      VR_sensitivity;
126
127 extern grs_canvas       *VR_offscreen_buffer;           // The offscreen data buffer
128 extern grs_canvas       VR_render_buffer[2];            // Two offscreen buffers for left/right eyes.
129 extern grs_canvas       VR_render_sub_buffer[2];        // Two sub buffers for left/right eyes.
130 extern grs_canvas       VR_screen_pages[2];                     // Two pages of VRAM if paging is available
131 extern grs_canvas       VR_screen_sub_pages[2];         // Two sub pages of VRAM if paging is available
132
133 //values for VR_screen_flags
134
135 #define VRF_USE_PAGING                  1               // means page flips
136 #define VRF_SWITCH_EYES                 2
137 #define VRF_COMPATIBLE_MENUS    4
138 #define VRF_ALLOW_COCKPIT               8
139
140 //values for VR_render_mode
141
142 #define VR_NONE                 0       // viewing the game screen
143 #define VR_AREA_DET             1       // viewing with the stereo area determined method
144 #define VR_INTERLACED   2       // viewing with the stereo interlaced method
145
146 void game_init_render_buffers(int screen_mode, int render_max_w, int render_max_h, int render_method, int flags);
147 void game_init_render_sub_buffers(int x, int y, int w, int h);
148
149 void set_display_mode(int mode);
150 extern int Default_display_mode;                // cannot be -1
151 // values are:
152 // -1: some special VR mode.
153 //  0: 320 x 200
154 //  1: 640 x 480
155 //  2: 320 x 400
156 //  3: 640 x 400
157 //  4: 800 x 600
158 //  5: 102 x 768
159
160 // called to get the screen in a mode compatible with popup menus.
161 // if we can't have popups over the game screen, switch to menu mode.
162 void set_popup_screen(void);
163
164 #endif /* _SCREENS_H */