当前位置: 首页>>代码示例>>C++>>正文


C++ Key_ClearStates函数代码示例

本文整理汇总了C++中Key_ClearStates函数的典型用法代码示例。如果您正苦于以下问题:C++ Key_ClearStates函数的具体用法?C++ Key_ClearStates怎么用?C++ Key_ClearStates使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Key_ClearStates函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CIN_PlayAllFrames

/*********
CIN_PlayAllFrames

arg				- bink video filename
x				- x origin for movie
y				- y origin for movie
w				- width of the movie
h				- height of the movie
systemBits		- bit rate for movie
keyBreakAllowed	- if true, button press will end playback

Plays the target movie in full
*********/
bool CIN_PlayAllFrames( const char *arg, int x, int y, int w, int h, int systemBits, bool keyBreakAllowed )
{
	bool retval;
	Key_ClearStates();

	// PC hack
	qbInGameCinematicOnStandBy = qfalse;

#ifdef XBOX_DEMO
	// When run from CDX, we can pause the timer during cutscenes:
	extern void Demo_TimerPause( bool bPaused );
	Demo_TimerPause( true );
#endif

	int Handle = CIN_PlayCinematic(arg, x, y, w, h, systemBits, NULL);
	if (Handle != -1)
	{
		while (CIN_RunCinematic(Handle) == FMV_PLAY && !(keyBreakAllowed && kg.anykeydown))
		{
			SCR_UpdateScreen	();
			IN_Frame			();
			Com_EventLoop		();
		}
#ifdef _XBOX
//		while (CIN_RunCinematic(Handle) == FMV_PLAY && !(keyBreakAllowed && !kg.anykeydown))
//		{
//			SCR_UpdateScreen	();
//			IN_Frame			();
//			Com_EventLoop		();
//		}
#endif
		CIN_StopCinematic(Handle);
	}

#ifdef XBOX_DEMO
	Demo_TimerPause( false );
#endif

	retval =(keyBreakAllowed && kg.anykeydown);
	Key_ClearStates();

	// Soooper hack! Game ends up running for a couple frames after this cutscene. We don't want it to!
	if( Q_stricmp(arg, "ja08") == 0 )
	{
		// Filth. Don't call Present until this gets cleared.
		extern bool connectSwapOverride;
		connectSwapOverride = true;
	}

	return retval;
}
开发者ID:3ddy,项目名称:Jedi-Academy,代码行数:64,代码来源:cl_cin_console.cpp

示例2: Key_SetCatcher

/*
====================
Key_SetCatcher
====================
*/
void Key_SetCatcher( int catcher ) {
	// If the catcher state is changing, clear all key states
	if( catcher != keyCatchers )
		Key_ClearStates( );

	keyCatchers = catcher;
}
开发者ID:BigJohnJD,项目名称:Quake-III-132,代码行数:12,代码来源:cl_keys.c

示例3: AppActivate

void AppActivate(BOOL fActive, BOOL minimize)
{
	Minimized = minimize;

	Key_ClearStates();

	// we don't want to act like we're active if we're minimized
	if (fActive && !Minimized)
		ActiveApp = true;
	else
		ActiveApp = false;

	// minimize/restore mouse-capture on demand
	if (!ActiveApp)
	{
		IN_Activate (false);
		CDAudio_Activate (false);
		S_Activate (false);

		if ( win_noalttab->value )
		{
			WIN_EnableAltTab();
		}
	}
	else
	{
		IN_Activate (true);
		CDAudio_Activate (true);
		S_Activate (true);
		if ( win_noalttab->value )
		{
			WIN_DisableAltTab();
		}
	}
}
开发者ID:mattx86,项目名称:myq2,代码行数:35,代码来源:vid_dll.c

示例4: VID_Shutdown

void VID_Shutdown(void)
{
	if (context == NULL && window == NULL)
		return;

	VID_EnableJoystick(false);
	VID_SetMouse(false, false, false);
	VID_RestoreSystemGamma();

	if (context != NULL)
	{
		qaglDestroyContext(context);
		context = NULL;
	}

	if (vid_isfullscreen)
		CGReleaseAllDisplays();

	if (window != NULL)
	{
		DisposeWindow(window);
		window = NULL;
	}

	vid_hidden = true;
	vid_isfullscreen = false;

	GL_CloseLibrary();
	Key_ClearStates ();
}
开发者ID:CyberSys,项目名称:darkplaces,代码行数:30,代码来源:vid_agl.c

示例5: Con_Close

/*
* Con_Close
*/
void Con_Close( void )
{
    scr_con_current = 0;

    Con_ClearTyping();
    Con_ClearNotify();
    Key_ClearStates();
}
开发者ID:Turupawn,项目名称:DogeWarsow,代码行数:11,代码来源:console.c

示例6: Key_SetDest

void Key_SetDest (keydest_t dest)
{
	key_dest = dest;
	if ((key_gamekey = Key_IsGameKey()) != prev_gamekey)
	{
		prev_gamekey = key_gamekey;
		Key_ClearStates();
	}
}
开发者ID:svn2github,项目名称:uhexen2,代码行数:9,代码来源:keys.c

示例7: M_ForceMenuOff

void M_ForceMenuOff (void)
{
	cls.key_dest = key_game;
	m_menudepth = 0;
	m_active = NULL;
	Key_ClearStates ();
	if(cl_paused->integer)
		Cvar_Set ("paused", "0");
}
开发者ID:chrisnew,项目名称:quake2,代码行数:9,代码来源:ui_atoms.c

示例8: UI_ForceMenuOff

/*
=================
UI_ForceMenuOff
=================
*/
void UI_ForceMenuOff (void)
{
	// Knightmare- added Psychospaz's mouse support
	UI_RefreshCursorLink();
	m_drawfunc = 0;
	m_keyfunc = 0;
	cls.key_dest = key_game;
	m_menudepth = 0;
	Key_ClearStates ();
	if (!cls.consoleActive && Cvar_VariableValue ("maxclients") == 1 && Com_ServerState()) // Knightmare added
		Cvar_Set ("paused", "0");
}
开发者ID:Kiln707,项目名称:KMQuake2,代码行数:17,代码来源:ui_subsystem.c

示例9: ClearAllStates

void ClearAllStates (void) {
	int i;

	// send an up event for each key, to make sure the server clears them all
	for (i = 0; i < sizeof(keydown) / sizeof(*keydown); i++) {
		if (keydown[i])
			Key_Event (i, false);
	}

	Key_ClearStates ();
	IN_ClearStates ();
}
开发者ID:jogi1,项目名称:camquake,代码行数:12,代码来源:win_wndproc.c

示例10: ClearAllStates

/*
================
ClearAllStates
================
*/
static void ClearAllStates (void)
{
	int		i;
	
// send an up event for each key, to make sure the server clears them all
	for (i = 0; i < 256; i++)
	{
		Key_Event (i, false);
	}

	Key_ClearStates ();
	IN_ClearStates ();
}
开发者ID:crutchwalkfactory,项目名称:motocakerteam,代码行数:18,代码来源:vid_sdl.c

示例11: AppActivate

static void AppActivate( bool fActive, bool minimize ) {
	Minimized = minimize;

	common->DPrintf( "AppActivate: %i\n", fActive );

	Key_ClearStates();	// FIXME!!!

	// we don't want to act like we're active if we're minimized
	ActiveApp = fActive && !Minimized;

	// minimize/restore mouse-capture on demand
	IN_Activate( ActiveApp );
	CDAudio_Activate( ActiveApp );
	SNDDMA_Activate();
}
开发者ID:janisl,项目名称:jlquake,代码行数:15,代码来源:driver_wgl.cpp

示例12: ClearAllStates

/*
================
ClearAllStates
================
*/
void ClearAllStates (void)
{
	extern void IN_ClearStates (void);
	extern qbool keydown[256];
	int		i;
	
// send an up event for each key, to make sure the server clears them all
	for (i=0 ; i<256 ; i++)
	{
		if (keydown[i])
			Key_Event (i, false);
	}

	Key_ClearStates ();
	IN_ClearStates ();
}
开发者ID:matatk,项目名称:agrip,代码行数:21,代码来源:vid_ddraw.c

示例13: VID_Restart_f

static void VID_Restart_f(void)
{
	extern void GFX_Init(void);
	extern void ReloadPaletteAndColormap(void);
	qbool old_con_suppress;

	if (!host_initialized) { // sanity
		Com_Printf("Can't do %s yet\n", Cmd_Argv(0));
		return;
	}

	VID_Shutdown();

	ReloadPaletteAndColormap();

	// keys can get stuck because SDL2 doesn't send keyup event when the video system is down
	Key_ClearStates();

	VID_Init(host_basepal);

	// force models to reload (just flush, no actual loading code here)
	Cache_Flush();

	// shut up warnings during GFX_Init();
	old_con_suppress = con_suppress;
	con_suppress = (developer.value ? false : true);
	// reload 2D textures, particles textures, some other textures and gfx.wad
	GFX_Init();

	// reload skins
	Skin_Skins_f();

	con_suppress = old_con_suppress;

	// we need done something like for map reloading, for example reload textures for brush models
	R_NewMap(true);

	// force all cached models to be loaded, so no short HDD lag then u walk over level and discover new model
	Mod_TouchModels();

	// window may be re-created, so caption need to be forced to update
	CL_UpdateCaption(true);
}
开发者ID:kostya7,项目名称:ezquake-source,代码行数:43,代码来源:vid_sdl2.c

示例14: M_ForceMenuOff

/**
 * \brief Close the menu
 */
PUBLIC void M_ForceMenuOff( void )
{
	m_drawfunc = 0;
	m_keyfunc = 0;

	if( r_world == NULL )
	{
		ClientStatic.key_dest = key_console;
	}
	else
	{
		ClientStatic.key_dest = key_game;	
        ClientStatic.menuState = IPM_GAME;
	}
   

	m_menudepth = 0;
	Key_ClearStates();
	Cvar_Set( "paused", "0" );
}
开发者ID:Oppen,项目名称:Wolf3DRedux,代码行数:23,代码来源:wolf_menu.c

示例15: VID_Shutdown

void VID_Shutdown(void)
{
	if (!vidx11_display)
		return;

	VID_EnableJoystick(false);
	VID_SetMouse(false, false, false);
	VID_RestoreSystemGamma();

	// FIXME: glXDestroyContext here?
	if (vid_isvidmodefullscreen)
		XF86VidModeSwitchToMode(vidx11_display, vidx11_screen, &init_vidmode);

	if(vidx11_gc)
		XFreeGC(vidx11_display, vidx11_gc);
	vidx11_gc = NULL;

	DestroyXImages();
	vidx11_shmevent = -1;
	vid.softpixels = NULL;

	if (vid.softdepthpixels)
		free(vid.softdepthpixels);
	vid.softdepthpixels = NULL;

	if (win)
		XDestroyWindow(vidx11_display, win);
	XCloseDisplay(vidx11_display);

	vid_hidden = true;
	vid_isfullscreen = false;
	vid_isnetwmfullscreen = false;
	vid_isvidmodefullscreen = false;
	vid_isoverrideredirect = false;
	vidx11_display = NULL;
	win = 0;
	ctx = NULL;

	GL_CloseLibrary();
	Key_ClearStates ();
}
开发者ID:Hanzo-nex,项目名称:DarkPlacesRM,代码行数:41,代码来源:vid_glx.c


注:本文中的Key_ClearStates函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。