X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=menu.h;h=d0b3189ebab49e3d43a462a9d4eb939594df8304;hb=6515c5ab8f17319ca8c48ae47c930f67749ef4d2;hp=4e3d334625abbd65d205c688093162641fad5172;hpb=7305ab0695a23466c3554c8670c3b8a38bbc54a9;p=xonotic%2Fdarkplaces.git diff --git a/menu.h b/menu.h index 4e3d3346..d0b3189e 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,46 +18,85 @@ 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 + +#include "qtypes.h" +struct serverlist_entry_s; 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_net, m_options, m_video, m_keys, m_help, + m_credits, m_quit, m_lanconfig, m_gameoptions, - m_search, - m_slist + m_slist, + m_options_effects, + m_options_graphics, + m_options_colorcontrol, + m_reset, + m_modlist }; -extern int m_activenet; -extern int m_return_state; extern enum m_state_e m_state; -extern qboolean m_return_onerror; -extern char m_return_reason[32]; +extern char m_return_reason[128]; +void M_Update_Return_Reason(const char *s); -// -// menus +/* +// 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); +void M_ToggleMenu (int mode); + +// +// menu prog menu +// +void MP_Init (void); +void MP_KeyEvent (int key); +void MP_Draw (void); +void MP_ToggleMenu (int mode); +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, int ascii, qbool downevent); +extern void (*MR_Draw) (void); +extern void (*MR_ToggleMenu) (int mode); +extern void (*MR_Shutdown) (void); +extern void (*MR_NewMap) (void); +extern int (*MR_GetServerListEntryCategory) (const struct serverlist_entry_s *entry); +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; +extern int video_resolutions_count; +extern video_resolution_t video_resolutions_hardcoded[]; +extern int video_resolutions_hardcoded_count; +#endif