]> git.xonotic.org Git - xonotic/darkplaces.git/blob - menu.h
Add qdefs.h and qstats.h to split up quakedef.h. Make a lot of headers standalone...
[xonotic/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 #include "qtypes.h"
25
26 typedef struct serverlist_entry_s serverlist_entry_t;
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[128];
57 void M_Update_Return_Reason(const 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 (int mode);
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 (int mode);
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, qbool downevent);
84 extern void (*MR_Draw) (void);
85 extern void (*MR_ToggleMenu) (int mode);
86 extern void (*MR_Shutdown) (void);
87 extern void (*MR_NewMap) (void);
88 extern int (*MR_GetServerListEntryCategory) (const serverlist_entry_t *entry);
89
90 typedef struct video_resolution_s
91 {
92         const char *type;
93         int width, height;
94         int conwidth, conheight;
95         double pixelheight; ///< pixel aspect
96 }
97 video_resolution_t;
98 extern video_resolution_t *video_resolutions;
99 extern int video_resolutions_count;
100 extern video_resolution_t video_resolutions_hardcoded[];
101 extern int video_resolutions_hardcoded_count;
102 #endif
103