]> icculus.org git repositories - divverent/darkplaces.git/blob - menu.h
added r_renderview cvar (similar to scr_refresh but disables only 3D
[divverent/darkplaces.git] / menu.h
1 /*
2 Copyright (C) 1996-1997 Id Software, Inc.
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13 See the GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18
19 */
20
21 #ifndef MENU_H
22 #define MENU_H
23
24 #define M_PROG_FILENAME "menu.dat"
25 #define M_NAME  "menu"
26 #define M_MAX_EDICTS    32768 // hopefully won't have to increase this again anytime soon...
27
28 enum m_state_e {
29         m_none,
30         m_main,
31         m_demo,
32         m_singleplayer,
33         m_transfusion_episode,
34         m_transfusion_skill,
35         m_load,
36         m_save,
37         m_multiplayer,
38         m_setup,
39         m_options,
40         m_video,
41         m_keys,
42         m_help,
43         m_credits,
44         m_quit,
45         m_lanconfig,
46         m_gameoptions,
47         m_slist,
48         m_options_effects,
49         m_options_graphics,
50         m_options_colorcontrol,
51         m_reset,
52         m_modlist
53 };
54
55 extern enum m_state_e m_state;
56 extern char m_return_reason[32];
57 void M_Update_Return_Reason(char *s);
58
59 /*
60 // hard-coded menus
61 //
62 void M_Init (void);
63 void M_KeyEvent (int key);
64 void M_Draw (void);
65 void M_ToggleMenu_f (void);
66
67 //
68 // menu prog menu
69 //
70 void MP_Init (void);
71 void MP_KeyEvent (int key);
72 void MP_Draw (void);
73 void MP_ToggleMenu_f (void);
74 void MP_Shutdown (void);*/
75
76 //
77 // menu router
78 //
79
80 void MR_Init_Commands (void);
81 void MR_Init (void);
82 void MR_Restart (void);
83 extern void (*MR_KeyEvent) (int key, int ascii, qboolean downevent);
84 extern void (*MR_Draw) (void);
85 extern void (*MR_ToggleMenu_f) (void);
86 extern void (*MR_Shutdown) (void);
87
88 typedef struct video_resolution_s
89 {
90         const char *type;
91         int width, height;
92         int conwidth, conheight;
93         double pixelheight; ///< pixel aspect
94 }
95 video_resolution_t;
96 extern video_resolution_t *video_resolutions;
97 extern int video_resolutions_count;
98 extern video_resolution_t video_resolutions_hardcoded[];
99 extern int video_resolutions_hardcoded_count;
100 #endif
101