quakespasm/Quake/menu.h

77 lines
1.7 KiB
C
Raw Normal View History

/*
Copyright (C) 1996-2001 Id Software, Inc.
Copyright (C) 2002-2009 John Fitzgibbons and others
Copyright (C) 2010-2014 QuakeSpasm developers
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
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.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _QUAKE_MENU_H
#define _QUAKE_MENU_H
make the code to compile with -fno-common flag: glquake.h (dev_stats): Add extern. (dev_peakstats): Likewise. (dev_overflows): Likewise. (lightmap_textures): Likewise. (gl_warpimagesize): Likewise. (r_drawflat_cheatsafe): Likewise. (r_fullbright_cheatsafe): Likewise. (r_lightmap_cheatsafe): Likewise. (r_drawworld_cheatsafe): Likewise. gl_texmgr.h (notexture): Likewise. (nulltexture): Likewise. (d_8to24table): Likewise. (d_8to24table_fbright): Likewise. (d_8to24table_nobright): Likewise. (d_8to24table_conchars): Likewise. (d_8to24table_shirt): Likewise. (d_8to24table_pants): Likewise. gl_screen.c (sb_lines): Remove and make it live only in sbar.c. (vid): Remove and make it live only in gl_vid*.c gl_vidsdl.c (m_state): Remove and make it live only in menu.c. gl_vidnt.c (m_state): Likewise. net_dgrm.c (m_state): Remove extern declaration. menu.c (m_state): Tagged the m_state enum as m_state_e and moved it to menu.h. Declared m_state as enum m_state_e. menu.h (enum m_state_e): Moved from menu.c to here. (m_state): Added extern declaration. gl_rmain.c (r_drawflat_cheatsafe): Made the global to live here. (r_fullbright_cheatsafe): Likewise. (r_lightmap_cheatsafe): Likewise. (r_drawworld_cheatsafe): Likewise. gl_warp.c (gl_warpimagesize): Likewise. host.c (dev_stats): Likewise. (dev_peakstats): Likewise. (dev_overflows): Likewise. gl_texmgr.c (notexture): Likewise. (nulltexture): Likewise. (d_8to24table): Likewise. (d_8to24table_fbright): Likewise. (d_8to24table_nobright): Likewise. (d_8to24table_conchars): Likewise. (d_8to24table_shirt): Likewise. (d_8to24table_pants[): Likewise. r_brush.c (lightmap_textures): Likewise. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@117 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 19:02:29 +00:00
enum m_state_e {
m_none,
m_main,
m_singleplayer,
m_load,
m_save,
m_multiplayer,
m_setup,
m_net,
m_options,
m_video,
m_keys,
m_help,
m_quit,
m_lanconfig,
m_gameoptions,
m_search,
m_slist
};
extern enum m_state_e m_state;
extern enum m_state_e m_return_state;
make the code to compile with -fno-common flag: glquake.h (dev_stats): Add extern. (dev_peakstats): Likewise. (dev_overflows): Likewise. (lightmap_textures): Likewise. (gl_warpimagesize): Likewise. (r_drawflat_cheatsafe): Likewise. (r_fullbright_cheatsafe): Likewise. (r_lightmap_cheatsafe): Likewise. (r_drawworld_cheatsafe): Likewise. gl_texmgr.h (notexture): Likewise. (nulltexture): Likewise. (d_8to24table): Likewise. (d_8to24table_fbright): Likewise. (d_8to24table_nobright): Likewise. (d_8to24table_conchars): Likewise. (d_8to24table_shirt): Likewise. (d_8to24table_pants): Likewise. gl_screen.c (sb_lines): Remove and make it live only in sbar.c. (vid): Remove and make it live only in gl_vid*.c gl_vidsdl.c (m_state): Remove and make it live only in menu.c. gl_vidnt.c (m_state): Likewise. net_dgrm.c (m_state): Remove extern declaration. menu.c (m_state): Tagged the m_state enum as m_state_e and moved it to menu.h. Declared m_state as enum m_state_e. menu.h (enum m_state_e): Moved from menu.c to here. (m_state): Added extern declaration. gl_rmain.c (r_drawflat_cheatsafe): Made the global to live here. (r_fullbright_cheatsafe): Likewise. (r_lightmap_cheatsafe): Likewise. (r_drawworld_cheatsafe): Likewise. gl_warp.c (gl_warpimagesize): Likewise. host.c (dev_stats): Likewise. (dev_peakstats): Likewise. (dev_overflows): Likewise. gl_texmgr.c (notexture): Likewise. (nulltexture): Likewise. (d_8to24table): Likewise. (d_8to24table_fbright): Likewise. (d_8to24table_nobright): Likewise. (d_8to24table_conchars): Likewise. (d_8to24table_shirt): Likewise. (d_8to24table_pants[): Likewise. r_brush.c (lightmap_textures): Likewise. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@117 af15c1b1-3010-417e-b628-4374ebc0bcbd
2010-04-22 19:02:29 +00:00
extern qboolean m_entersound;
//
// menus
//
void M_Init (void);
void M_Keydown (int key);
void M_Charinput (int key);
qboolean M_TextEntry (void);
void M_ToggleMenu (int mode);
void MQC_Shutdown(void);
void M_Menu_Main_f (void);
void M_Menu_Options_f (void);
void M_Menu_Quit_f (void);
void M_Print (int cx, int cy, const char *str);
void M_PrintWhite (int cx, int cy, const char *str);
void M_Draw (void);
void M_DrawCharacter (int cx, int line, int num);
void M_DrawPic (int x, int y, qpic_t *pic);
void M_DrawTransPic (int x, int y, qpic_t *pic);
void M_DrawCheckbox (int x, int y, int on);
#endif /* _QUAKE_MENU_H */