rename the modestate_t enum items

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@805 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Sander van Dijk 2013-02-13 19:07:19 +00:00
parent 103f041614
commit 64f3091f05
6 changed files with 47 additions and 47 deletions

View file

@ -122,7 +122,7 @@ void Con_ToggleConsole_f (void)
}
else
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_console;
}
@ -1229,7 +1229,7 @@ void Con_NotifyBox (const char *text)
Con_Printf ("%s", Con_Quakebar(40)); //johnfitz
key_count = -2; // wait for a key down and up
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_console;
do

View file

@ -67,8 +67,8 @@ static SDL_Surface *draw_context;
static qboolean vid_locked = false; //johnfitz
static qboolean vid_changed = false;
static int vid_modenum = NO_MODE;
static int vid_default = MODE_WINDOWED;
static int vid_modenum = MS_UNINIT;
static int vid_default = MS_WINDOWED;
static qboolean fullsbardraw = false;
static void VID_Menu_Init (void); //johnfitz
@ -81,7 +81,7 @@ static void GL_Init (void);
static void GL_SetupState (void); //johnfitz
viddef_t vid; // global video state
modestate_t modestate = MODE_WINDOWED;
modestate_t modestate = MS_WINDOWED;
qboolean scr_skipupdate;
qboolean isIntelVideo = false; //johnfitz -- intel video workarounds from Baker
@ -232,14 +232,14 @@ static int VID_SetMode (int modenum)
gl_swap_control = false;
}
if (modelist[modenum].type == MODE_WINDOWED)
if (modelist[modenum].type == MS_WINDOWED)
{
modestate = MODE_WINDOWED;
modestate = MS_WINDOWED;
}
else if (modelist[modenum].type == MODE_FULLSCREEN_DEFAULT)
else if (modelist[modenum].type == MS_FULLSCREEN)
{
flags |= SDL_FULLSCREEN;
modestate = MODE_FULLSCREEN_DEFAULT;
modestate = MS_FULLSCREEN;
}
else
{
@ -384,7 +384,7 @@ static void VID_Restart (void)
if (vid_fullscreen.value)
IN_Activate();
else if (key_dest == key_console || key_dest == key_menu)
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
}
/*
@ -413,7 +413,7 @@ static void VID_Test (void)
Cvar_SetValueQuick (&vid_width, oldmode.width);
Cvar_SetValueQuick (&vid_height, oldmode.height);
Cvar_SetValueQuick (&vid_bpp, oldmode.bpp);
Cvar_SetQuick (&vid_fullscreen, (oldmode.type == MODE_WINDOWED) ? "0" : "1");
Cvar_SetQuick (&vid_fullscreen, (oldmode.type == MS_WINDOWED) ? "0" : "1");
VID_Restart ();
}
}
@ -801,7 +801,7 @@ static void VID_DescribeCurrentMode_f (void)
modelist[vid_modenum].width,
modelist[vid_modenum].height,
modelist[vid_modenum].bpp,
(modelist[vid_modenum].type == MODE_FULLSCREEN_DEFAULT) ? "fullscreen" : "windowed");
(modelist[vid_modenum].type == MS_FULLSCREEN) ? "fullscreen" : "windowed");
}
}
@ -849,7 +849,7 @@ static void VID_InitDIB (void)
const SDL_VideoInfo *info;
int i;
modelist[0].type = MODE_WINDOWED;
modelist[0].type = MS_WINDOWED;
modelist[0].width = vid_width.value;
modelist[0].height = vid_height.value;
@ -921,7 +921,7 @@ static void VID_InitFullDIB (void)
if (modes[j]->w > MAXWIDTH || modes[j]->h > MAXHEIGHT || nummodes >= MAX_MODE_LIST)
continue;
modelist[nummodes].type = MODE_FULLSCREEN_DEFAULT;
modelist[nummodes].type = MS_FULLSCREEN;
modelist[nummodes].width = modes[j]->w;
modelist[nummodes].height = modes[j]->h;
modelist[nummodes].fullscreen = 1;
@ -1014,12 +1014,12 @@ void VID_Init (void)
if (!vid_fullscreen.value)
{
windowed = true;
vid_default = MODE_WINDOWED;
vid_default = MS_WINDOWED;
}
else
{
windowed = false;
vid_default = NO_MODE;
vid_default = MS_UNINIT;
width = vid_width.value;
height = vid_height.value;
@ -1060,7 +1060,7 @@ void VID_Init (void)
// if they want to force it, add the specified mode to the list
if (COM_CheckParm("-force") && (nummodes < MAX_MODE_LIST))
{
modelist[nummodes].type = MODE_FULLSCREEN_DEFAULT;
modelist[nummodes].type = MS_FULLSCREEN;
modelist[nummodes].width = width;
modelist[nummodes].height = height;
modelist[nummodes].fullscreen = 1;
@ -1084,7 +1084,7 @@ void VID_Init (void)
}
// Try to find a mode with matching width, height and bpp
if (vid_default == NO_MODE)
if (vid_default == MS_UNINIT)
{
for (i = 1; i < nummodes; i++)
{
@ -1099,7 +1099,7 @@ void VID_Init (void)
}
// Try to find a mode with matching width and height
if (vid_default == NO_MODE)
if (vid_default == MS_UNINIT)
{
for (i = 1; i < nummodes; i++)
{
@ -1113,7 +1113,7 @@ void VID_Init (void)
}
// Try to find a mode with matching width
if (vid_default == NO_MODE)
if (vid_default == MS_UNINIT)
{
for (i = 1; i < nummodes; i++)
{
@ -1126,11 +1126,11 @@ void VID_Init (void)
}
// Still no luck? Default to windowed mode
if (vid_default == NO_MODE)
if (vid_default == MS_UNINIT)
{
Cvar_SetQuick (&vid_fullscreen, "0");
windowed = true;
vid_default = MODE_WINDOWED;
vid_default = MS_WINDOWED;
}
}
@ -1180,10 +1180,10 @@ void VID_Toggle (void)
Sbar_Changed (); // Sbar seems to need refreshing
windowed = !windowed;
if (modestate == MODE_FULLSCREEN_DEFAULT)
modestate = MODE_WINDOWED;
if (modestate == MS_FULLSCREEN)
modestate = MS_WINDOWED;
else
modestate = MODE_FULLSCREEN_DEFAULT;
modestate = MS_FULLSCREEN;
// since we succeeded, ignore the vid_fullscreen
// callback function setting vid_changed to true.
@ -1195,7 +1195,7 @@ void VID_Toggle (void)
if (vid_fullscreen.value)
IN_Activate();
else if (key_dest == key_console || key_dest == key_menu)
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
}
else
{
@ -1576,7 +1576,7 @@ VID_Menu_f
*/
static void VID_Menu_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_video;
m_entersound = true;

View file

@ -1068,7 +1068,7 @@ void Key_UpdateForDest (void)
if (cls.state != ca_connected)
{
forced = true;
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_console;
break;
}

View file

@ -247,7 +247,7 @@ void M_Menu_Main_f (void)
m_save_demonum = cls.demonum;
cls.demonum = -1;
}
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_main;
m_entersound = true;
@ -334,7 +334,7 @@ int m_singleplayer_cursor;
void M_Menu_SinglePlayer_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_singleplayer;
m_entersound = true;
@ -451,7 +451,7 @@ void M_Menu_Load_f (void)
m_entersound = true;
m_state = m_load;
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
M_ScanSaves ();
}
@ -468,7 +468,7 @@ void M_Menu_Save_f (void)
m_entersound = true;
m_state = m_save;
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
M_ScanSaves ();
}
@ -591,7 +591,7 @@ int m_multiplayer_cursor;
void M_Menu_MultiPlayer_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_multiplayer;
m_entersound = true;
@ -676,7 +676,7 @@ int setup_bottom;
void M_Menu_Setup_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_setup;
m_entersound = true;
@ -855,7 +855,7 @@ const char *net_helpMessage [] =
void M_Menu_Net_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_net;
m_entersound = true;
@ -972,7 +972,7 @@ int options_cursor;
void M_Menu_Options_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_options;
m_entersound = true;
@ -1292,7 +1292,7 @@ static int keys_top;
void M_Menu_Keys_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_keys;
m_entersound = true;
@ -1416,7 +1416,7 @@ void M_Keys_Key (int k)
}
m_keys_bind_grab = false;
IN_Deactivate(modestate == MODE_WINDOWED); // deactivate because we're returning to the menu
IN_Deactivate(modestate == MS_WINDOWED); // deactivate because we're returning to the menu
return;
}
@ -1493,7 +1493,7 @@ int help_page;
void M_Menu_Help_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_help;
m_entersound = true;
@ -1545,7 +1545,7 @@ void M_Menu_Quit_f (void)
if (m_state == m_quit)
return;
wasInMenus = (key_dest == key_menu);
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_quit_prevstate = m_state;
m_state = m_quit;
@ -1576,7 +1576,7 @@ void M_Quit_Key (int key)
case 'Y':
case 'y':
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_console;
Host_Quit_f ();
break;
@ -1630,7 +1630,7 @@ char lanConfig_joinname[22];
void M_Menu_LanConfig_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_lanconfig;
m_entersound = true;
@ -1978,7 +1978,7 @@ double m_serverInfoMessageTime;
void M_Menu_GameOptions_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_gameoptions;
m_entersound = true;
@ -2282,7 +2282,7 @@ double searchCompleteTime;
void M_Menu_Search_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_search;
m_entersound = false;
@ -2343,7 +2343,7 @@ qboolean slist_sorted;
void M_Menu_ServerList_f (void)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_slist;
m_entersound = true;

View file

@ -1399,7 +1399,7 @@ ErrorReturn2:
dfunc.Close_Socket(newsock);
if (m_return_onerror)
{
IN_Deactivate(modestate == MODE_WINDOWED);
IN_Deactivate(modestate == MS_WINDOWED);
key_dest = key_menu;
m_state = m_return_state;
m_return_onerror = false;

View file

@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define VID_GRADES (1 << VID_CBITS)
// moved here for global use -- kristian
typedef enum { NO_MODE, MODE_WINDOWED, MODE_FULLSCREEN_DEFAULT } modestate_t;
typedef enum { MS_UNINIT, MS_WINDOWED, MS_FULLSCREEN } modestate_t;
extern modestate_t modestate;