X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=menu.h;h=858333412f08d2e43102adb19724548105a2506c;hp=616de3f84813436c3022f89de8836eb9e024f395;hb=8ebb89488cfbf28c6d0234dbb6fec83c59e29e1e;hpb=8dcce44300385b12c46d494c06aadcfa35a8bc14 diff --git a/menu.h b/menu.h index 616de3f8..85833341 100644 --- a/menu.h +++ b/menu.h @@ -8,7 +8,7 @@ of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -18,21 +18,80 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// -// the net drivers should just set the apropriate bits in m_activenet, -// instead of having the menu code look through their internal tables -// -#define MNET_IPX 1 -#define MNET_TCP 2 +#ifndef MENU_H +#define MENU_H -extern int m_activenet; +#define M_PROG_FILENAME "menu.dat" +#define M_NAME "menu" +#define M_MAX_EDICTS 32768 // hopefully won't have to increase this again anytime soon... -// -// menus +enum m_state_e { + m_none, + m_main, + m_demo, + m_singleplayer, + m_transfusion_episode, + m_transfusion_skill, + m_load, + m_save, + m_multiplayer, + m_setup, + m_options, + m_video, + m_keys, + m_help, + m_credits, + m_quit, + m_lanconfig, + m_gameoptions, + m_slist, + m_options_effects, + m_options_graphics, + m_options_colorcontrol, + m_reset, + m_modlist +}; + +extern enum m_state_e m_state; +extern char m_return_reason[32]; +void M_Update_Return_Reason(char *s); + +/* +// hard-coded menus // void M_Init (void); -void M_Keydown (int key); +void M_KeyEvent (int key); void M_Draw (void); void M_ToggleMenu_f (void); +// +// menu prog menu +// +void MP_Init (void); +void MP_KeyEvent (int key); +void MP_Draw (void); +void MP_ToggleMenu_f (void); +void MP_Shutdown (void);*/ + +// +// menu router +// +void MR_Init_Commands (void); +void MR_Init (void); +void MR_Restart (void); +extern void (*MR_KeyEvent) (int key, char ascii, qboolean downevent); +extern void (*MR_Draw) (void); +extern void (*MR_ToggleMenu_f) (void); +extern void (*MR_Shutdown) (void); + +typedef struct video_resolution_s +{ + const char *type; + int width, height; + int conwidth, conheight; + double pixelheight; // pixel aspect +} +video_resolution_t; +extern video_resolution_t video_resolutions[]; +#endif