本文整理汇总了C++中IN_ClearKeysDown函数的典型用法代码示例。如果您正苦于以下问题:C++ IN_ClearKeysDown函数的具体用法?C++ IN_ClearKeysDown怎么用?C++ IN_ClearKeysDown使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IN_ClearKeysDown函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: US_FinishTextScreen
///////////////////////////////////////////////////////////////////////////
//
// US_FinishTextScreen() - After the main program has finished its initial
// loading, this routine waits for a keypress and then clears the screen
//
///////////////////////////////////////////////////////////////////////////
void
US_FinishTextScreen(void)
{
static byte colors[] = {4,6,13,15,15,15,15,15,15};
boolean up;
int i,c;
// Change Loading... to Press a Key
if (!(tedlevel || NoWait))
{
IN_ClearKeysDown();
for (i = 0,up = true;!IN_UserInput(4,true);)
{
c = colors[i];
if (up)
{
if (++i == 9)
i = 8,up = false;
}
else
{
if (--i < 0)
i = 1,up = true;
}
USL_ScreenDraw(29,22," Ready - Press a Key ",0x00 + c);
}
}
else
USL_ScreenDraw(29,22," Ready - Press a Key ",0x9a);
IN_ClearKeysDown();
USL_ClearTextScreen();
}
开发者ID:FlatRockSoft,项目名称:CatacombApocalypse,代码行数:41,代码来源:ID_US_1.C
示例2: EndText
//
// END ARTICLES
//
void EndText (void)
{
int artnum;
char *text;
memptr layout;
ClearMemory ();
CA_UpLevel ();
MM_SortMem ();
#ifdef JAPAN
ShowArticle(gamestate.episode + 1);
VW_FadeOut();
SETFONTCOLOR(0,15);
IN_ClearKeysDown();
if (MousePresent)
Mouse(MDelta); // Clear accumulated mouse movement
FreeMusic ();
CA_DownLevel ();
MM_SortMem ();
#else
#ifdef ARTSEXTERN
artnum = endextern+gamestate.episode;
CA_CacheGrChunk (artnum);
text = (char *)grsegs[artnum];
MM_SetLock (&grsegs[artnum], True);
#else
endfilename[6] = '1'+gamestate.episode;
CA_LoadFile (endfilename,&layout);
text = (char *)layout;
MM_SetLock (&layout, True);
#endif
ShowArticle (text);
#ifdef ARTSEXTERN
MM_FreePtr (&grsegs[artnum]);
#else
MM_FreePtr (&layout);
#endif
VW_FadeOut();
SETFONTCOLOR(0,15);
IN_ClearKeysDown();
//if (MousePresent) // PORT
// Mouse(MDelta); // Clear accumulated mouse movement
//FreeMusic ();
CA_DownLevel ();
MM_SortMem ();
#endif
}
开发者ID:brycekahle,项目名称:wolf3d,代码行数:63,代码来源:WL_TEXT.C
示例3: ShowText
static bool ShowText(const FString exitText, const FString flat, const FString music, ClusterInfo::ExitType type)
{
// Use cluster background if set.
if(!flat.IsEmpty())
backgroundFlat = TexMan(flat);
if(!backgroundFlat) // Get default if needed
backgroundFlat = TexMan(gameinfo.FinaleFlat);
switch(type)
{
case ClusterInfo::EXIT_MESSAGE:
SD_PlaySound ("misc/1up");
Message (exitText);
IN_ClearKeysDown ();
IN_Ack ();
return false;
case ClusterInfo::EXIT_LUMP:
{
int lumpNum = Wads.CheckNumForName(exitText, ns_global);
if(lumpNum != -1)
{
FWadLump lump = Wads.OpenLumpNum(lumpNum);
char* text = new char[Wads.LumpLength(lumpNum)];
lump.Read(text, Wads.LumpLength(lumpNum));
if(!music.IsEmpty())
StartCPMusic(music);
ShowArticle(text, !!(IWad::GetGame().Flags & IWad::HELPHACK));
delete[] text;
}
break;
}
default:
if(!music.IsEmpty())
StartCPMusic(music);
ShowArticle(exitText, !!(IWad::GetGame().Flags & IWad::HELPHACK));
break;
}
IN_ClearKeysDown();
if (MousePresent && IN_IsInputGrabbed())
IN_CenterMouse(); // Clear accumulated mouse movement
return true;
}
开发者ID:JohnnyonFlame,项目名称:ecwolf,代码行数:50,代码来源:wl_text.cpp
示例4: EndText
//
// END ARTICLES
//
void EndText()
{
int artnum;
const char *text;
ClearMemory();
artnum = endextern+gamestate.episode;
CA_CacheGrChunk(artnum);
if (w0 == true){
text = (const char *)grsegsWL1[artnum];
} else if (w1 == true){
text = (const char *)grsegsWL6[artnum];
} else if (s0 == true){
text = (const char *)grsegsSDM[artnum];
} else {
text = (const char *)grsegsSOD[artnum];
}
ShowArticle(text);
CA_UnCacheGrChunk(artnum);
VW_FadeOut();
SETFONTCOLOR(0,15);
IN_ClearKeysDown();
IN_GetMouseDelta(NULL, NULL); // Clear accumulated mouse movement
FreeMusic();
}
开发者ID:RxLoaron,项目名称:NDKCookbook,代码行数:34,代码来源:wl_text.c
示例5: PopupAutoMap
//--------------------------------------------------------------------------
// PopupAutoMap()
//--------------------------------------------------------------------------
void PopupAutoMap()
{
#define BASE_X 64
#define BASE_Y 44
ThreeDRefresh();
ThreeDRefresh();
SD_StopSound();
ClearMemory();
CacheDrawPic(BASE_X,BASE_Y,AUTOMAPPIC);
ShowStats(BASE_X+101,BASE_Y+22,ss_quick,&gamestuff.level[gamestate.mapon].stats);
while (Keyboard[sc_back_quote])
CalcTics();
#if GAME_VERSION != SHAREWARE_VERSION && IN_DEVELOPMENT
// if (DebugOk && PP_step)
// PicturePause();
#endif
IN_StartAck ();
while (!IN_CheckAck ())
CalcTics();
CleanDrawPlayBorder();
IN_ClearKeysDown();
}
开发者ID:drhelius,项目名称:bstone-ios,代码行数:32,代码来源:3d_play.cpp
示例6: ViewMap
void ViewMap (void)
{
id0_boolean_t button0held;
viewtype = actoratview;
button0held = false;
maporgx = player->tilex - VIEWTILEX/2;
if (maporgx<0)
maporgx = 0;
maporgy = player->tiley - VIEWTILEY/2;
if (maporgy<0)
maporgy = 0;
do
{
//
// let user pan around
//
IN_ReadControl(0,&control);
if (control.xaxis == -1 && maporgx>0)
maporgx--;
if (control.xaxis == 1 && maporgx<mapwidth-VIEWTILEX)
maporgx++;
if (control.yaxis == -1 && maporgy>0)
maporgy--;
if (control.yaxis == 1 && maporgy<mapheight-VIEWTILEY)
maporgy++;
if (control.button0 && !button0held)
{
button0held = true;
// REFKEEN - Make this C++ friendly
if (viewtype == lastview-1)
viewtype = mapview;
else
viewtype = (viewtypeenum)(viewtype + 1);
#if 0
viewtype++;
if (viewtype==lastview)
viewtype = mapview;
#endif
}
if (!control.button0)
button0held = false;
OverheadRefresh ();
BE_ST_ShortSleep();
} while (!Keyboard[sc_Escape]);
IN_ClearKeysDown ();
DrawPlayScreen ();
}
开发者ID:BSzili,项目名称:refkeen,代码行数:57,代码来源:c4_debug.c
示例7: EndScreen
void EndScreen (int palette, int screen)
{
CA_CacheScreen (screen);
VW_UpdateScreen ();
CA_CacheGrChunk (palette);
VL_FadeIn(0,255,grsegs[palette],30);
UNCACHEGRCHUNK (palette);
IN_ClearKeysDown ();
IN_Ack ();
VW_FadeOut ();
}
开发者ID:svagionitis,项目名称:wolf3d,代码行数:11,代码来源:wl_inter.c
示例8: ViewMap
void ViewMap (void)
{
boolean button0held;
viewtype = actoratview;
// button0held = false;
maporgx = player->tilex - VIEWTILEX/2;
if (maporgx<0)
maporgx = 0;
if (maporgx>MAPSIZE-VIEWTILEX)
maporgx=MAPSIZE-VIEWTILEX;
maporgy = player->tiley - VIEWTILEY/2;
if (maporgy<0)
maporgy = 0;
if (maporgy>MAPSIZE-VIEWTILEY)
maporgy=MAPSIZE-VIEWTILEY;
do
{
//
// let user pan around
//
PollControls ();
if (controlx < 0 && maporgx>0)
maporgx--;
if (controlx > 0 && maporgx<mapwidth-VIEWTILEX)
maporgx++;
if (controly < 0 && maporgy>0)
maporgy--;
if (controly > 0 && maporgy<mapheight-VIEWTILEY)
maporgy++;
#if 0
if (c.button0 && !button0held)
{
button0held = true;
viewtype++;
if (viewtype>visview)
viewtype = mapview;
}
if (!c.button0)
button0held = false;
#endif
OverheadRefresh ();
} while (!Keyboard[sc_Escape]);
IN_ClearKeysDown ();
}
开发者ID:vbt1,项目名称:wolf4sdl,代码行数:52,代码来源:wl_debug.cpp
示例9: WaitIntermission
static bool WaitIntermission(unsigned int time)
{
if(time)
{
return IN_UserInput(time);
}
else
{
IN_ClearKeysDown ();
IN_Ack ();
return true;
}
}
开发者ID:JohnnyonFlame,项目名称:ecwolf,代码行数:13,代码来源:g_intermission.cpp
示例10: GameOver
void
GameOver (void)
{
VW_InitDoubleBuffer ();
US_CenterWindow (16,3);
US_PrintCentered("Game Over!");
VW_UpdateScreen ();
IN_ClearKeysDown ();
IN_Ack ();
}
开发者ID:NY00123,项目名称:refkeen,代码行数:13,代码来源:kd_demo.c
示例11: EndScreen
void
EndScreen (int palette, int screen)
{
SDL_Color pal[256];
CA_CacheScreen (screen);
VW_UpdateScreen ();
CA_CacheGrChunk (palette);
VL_ConvertPalette(grsegs[palette], pal, 256);
VL_FadeIn (0, 255, pal, 30);
UNCACHEGRCHUNK (palette);
IN_ClearKeysDown ();
IN_Ack ();
VW_FadeOut ();
}
开发者ID:gameblabla,项目名称:wolf4sdl_nspire,代码行数:14,代码来源:wl_inter.cpp
示例12: WaitOrKey
id0_int_t WaitOrKey (id0_int_t vbls)
{
while (vbls--)
{
IN_ReadControl(0,&c); // get player input
if (LastScan || c.button0 || c.button1)
{
IN_ClearKeysDown ();
return 1;
}
VW_WaitVBL(1);
}
return 0;
}
开发者ID:NY00123,项目名称:refkeen,代码行数:14,代码来源:kd_demo.c
示例13: ViewMap
void ViewMap (void)
{
boolean button0held;
viewtype = actoratview;
button0held = false;
maporgx = player->tilex - VIEWTILEX/2;
if (maporgx<0)
maporgx = 0;
maporgy = player->tiley - VIEWTILEY/2;
if (maporgy<0)
maporgy = 0;
do
{
//
// let user pan around
//
IN_ReadControl(0,&control);
if (control.xaxis == -1 && maporgx>0)
maporgx--;
if (control.xaxis == 1 && maporgx<mapwidth-VIEWTILEX)
maporgx++;
if (control.yaxis == -1 && maporgy>0)
maporgy--;
if (control.yaxis == 1 && maporgy<mapheight-VIEWTILEY)
maporgy++;
if (control.button0 && !button0held)
{
button0held = true;
viewtype++;
if (viewtype==lastview)
viewtype = mapview;
}
if (!control.button0)
button0held = false;
OverheadRefresh ();
} while (!Keyboard[sc_Escape]);
IN_ClearKeysDown ();
DrawPlayScreen ();
}
开发者ID:FlatRockSoft,项目名称:CatacombApocalypse,代码行数:48,代码来源:C6_DEBUG.C
示例14: T_Gate
void T_Gate (objtype *ob)
{
id0_int_t spot;
objtype *check;
id0_unsigned_t temp;
if (CheckHandAttack (ob) && !playstate)
{
//
// warp
//
temp = bufferofs;
bufferofs = 0;
VW_Bar (26,4,232,9,STATUSCOLOR); // clear text description
bufferofs = temp;
IN_ClearKeysDown ();
if (ob->temp1)
{
//
// teleport inside level
//
for (check=player->next;check;check=check->next)
if (check->obclass==gateobj && check->temp1==ob->temp1 &&
check != ob)
{
player->x = check->x;
player->y = check->y;
Thrust (player->angle,TILEGLOBAL/2); // move forwards
Thrust (player->angle,TILEGLOBAL/2); // move forwards
Thrust (player->angle,TILEGLOBAL/2); // move forwards
fizzlein=true;
}
}
else
{
//
// teleport out of level
//
playstate = ex_warped;
spot = *(mapsegs[0]+farmapylookup[ob->tiley]+ob->tilex)-NAMESTART;
if (spot<1)
gamestate.mapon++;
else
gamestate.mapon=spot-1;
SD_PlaySound(WARPUPSND);
}
}
}
开发者ID:BSzili,项目名称:refkeen,代码行数:48,代码来源:c3_act1.c
示例15: ShowQuickInstructions
//--------------------------------------------------------------------------
// ShowQuickInstructions()
//--------------------------------------------------------------------------
void ShowQuickInstructions()
{
ShowQuickMsg=false;
if ((demoplayback) || (gamestate.mapon) || (gamestate.flags & GS_QUICKRUN))
return;
ThreeDRefresh();
ThreeDRefresh();
ClearMemory();
WindowX=0; WindowY=16; WindowW=320; WindowH=168;
CacheMessage(QUICK_INFO1_TEXT);
VW_WaitVBL(120);
CacheMessage(QUICK_INFO2_TEXT);
IN_Ack();
IN_ClearKeysDown();
CleanDrawPlayBorder();
}
开发者ID:drhelius,项目名称:bstone-ios,代码行数:21,代码来源:3d_play.cpp
示例16: IN_StartAck
void IN_StartAck(void)
{
IN_ProcessEvents();
//
// get initial state of everything
//
IN_ClearKeysDown();
memset(btnstate, 0, sizeof(btnstate));
int buttons = IN_JoyButtons() << 4;
if(MousePresent)
buttons |= IN_MouseButtons();
for(int i = 0; i < NUMBUTTONS; i++, buttons >>= 1)
if(buttons & 1)
btnstate[i] = true;
}
开发者ID:Rinnegatamante,项目名称:vitaWolfen,代码行数:18,代码来源:id_in.cpp
示例17: IN_StartAck
void IN_StartAck(void)
{
unsigned i,buttons;
//
// get initial state of everything
//
IN_ClearKeysDown();
memset (btnstate,0,sizeof(btnstate));
buttons = IN_JoyButtons () << 4;
if (MousePresent)
buttons |= IN_MouseButtons ();
for (i=0;i<8;i++,buttons>>=1)
if (buttons&1)
btnstate[i] = true;
}
开发者ID:AliSayed,项目名称:MoSync,代码行数:18,代码来源:vi_comm.c
示例18: IN_Startup
///////////////////////////////////////////////////////////////////////////
//
// IN_Startup() - Starts up the Input Mgr
//
///////////////////////////////////////////////////////////////////////////
void
IN_Startup(void)
{
if (IN_Started)
return;
IN_ClearKeysDown();
if(param_joystickindex >= 0 && param_joystickindex < SDL_NumJoysticks())
{
Joystick = SDL_JoystickOpen(param_joystickindex);
if(Joystick)
{
JoyNumButtons = SDL_JoystickNumButtons(Joystick);
if(JoyNumButtons > 32) JoyNumButtons = 32; // only up to 32 buttons are supported
JoyNumHats = SDL_JoystickNumHats(Joystick);
if(param_joystickhat < -1 || param_joystickhat >= JoyNumHats)
Quit("The joystickhat param must be between 0 and %i!", JoyNumHats - 1);
}
}
SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE);
if(fullscreen || forcegrabmouse)
{
GrabInput = true;
SDL_WM_GrabInput(SDL_GRAB_ON);
}
// I didn't find a way to ask libSDL whether a mouse is present, yet...
#if defined(GP2X)
MousePresent = false;
#elif defined(_arch_dreamcast)
MousePresent = DC_MousePresent();
#else
MousePresent = true;
#endif
IN_Started = true;
}
开发者ID:Rinnegatamante,项目名称:vitaWolfen,代码行数:45,代码来源:id_in.cpp
示例19: CK6_ShowGetSandwich
void CK6_ShowGetSandwich()
{
SD_WaitSoundDone();
SD_PlaySound(SOUND_STORYITEM);
CA_UpLevel();
CA_CacheGrChunk(0x23);
US_CenterWindow(26, 8);
VH_DrawBitmap(US_GetWindowX() + US_GetWindowW() - 0x30, US_GetWindowY(), 0x23);
US_SetWindowW(US_GetWindowW() - 0x30);
US_SetPrintY(US_GetPrintY() + 12);
US_CPrint("This is the second\n"
"biggest sandwich\n"
"I ever saw!\n");
VL_Present();
VL_DelayTics(30); // VW_WaitVBL(30);
IN_ClearKeysDown();
IN_WaitButton();
CA_DownLevel();
ck_gameState.ep.ck6.sandwich = true;
}
开发者ID:sulix,项目名称:omnispeak,代码行数:22,代码来源:ck6_misc.c
示例20: CK6_ShowGetRope
void CK6_ShowGetRope()
{
SD_WaitSoundDone();
SD_PlaySound(SOUND_STORYITEM);
CA_UpLevel();
CA_CacheGrChunk(0x23);
US_CenterWindow(26, 8);
VH_DrawBitmap(US_GetWindowX() + US_GetWindowW() - 0x30, US_GetWindowY(), 0x23);
US_SetWindowW(US_GetWindowW() - 0x30);
US_SetPrintY(US_GetPrintY() + 12);
US_CPrint("Wow! A rope and\n"
"grappling hook!\n"
"They look useful!\n");
VL_Present();
VL_DelayTics(30); // VW_WaitVBL(30);
IN_ClearKeysDown();
IN_WaitButton();
CA_DownLevel();
ck_gameState.ep.ck6.rope = true;
}
开发者ID:sulix,项目名称:omnispeak,代码行数:22,代码来源:ck6_misc.c
注:本文中的IN_ClearKeysDown函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论