void FinishSignon (void) { #ifndef SPEAR VW_Bar (0,189,300,11,VL_GetPixel(0,0)); WindowX = 0; WindowW = 320; PrintY = 190; #ifndef JAPAN SETFONTCOLOR(14,4); #ifdef SPANISH US_CPrint ("Oprima una tecla"); #else US_CPrint ("Press a key"); #endif #endif VH_UpdateScreen(); if (!param_nowait) IN_Ack (); #ifndef JAPAN VW_Bar (0,189,300,11,VL_GetPixel(0,0)); PrintY = 190; SETFONTCOLOR(10,4); #ifdef SPANISH US_CPrint ("pensando..."); #else US_CPrint ("Working..."); #endif VH_UpdateScreen(); #endif SETFONTCOLOR(0,15); #else VH_UpdateScreen(); if (!param_nowait) VW_WaitVBL(3*70); #endif }
static bool R_CastZoomer(const Frame *frame, CastIntermissionAction *cast) { // This may appear to animate faster than vanilla, but I'm fairly sure // that's because while the time on screen is adaptive, the frame durations // were decremented by one each frame. TObjPtr<SpriteZoomer> zoomer = new SpriteZoomer(frame, 224); do { for(unsigned int t = tics;zoomer && t-- > 0;) zoomer->Tick(); if(!zoomer) break; if(intermissionMapLoaded) ThreeDRefresh(); else { // Unlike a 3D view, we will overwrite the whole screen here ShowImage(cast, true); DrawCastName(cast); } zoomer->Draw(); VH_UpdateScreen(); IN_ProcessEvents(); if(Keyboard[sc_Space] || Keyboard[sc_Escape] || Keyboard[sc_Enter]) { bool done = Keyboard[sc_Escape] || Keyboard[sc_Enter]; Keyboard[sc_Space] = Keyboard[sc_Escape] = Keyboard[sc_Enter] = false; zoomer->Destroy(); if(done) return true; break; } CalcTics(); } while(true); return false; }
void CheckKeys (void) { ScanCode scan; if (screenfaded || demoplayback) // don't do anything with a faded screen return; scan = LastScan; #ifdef SPEAR // // SECRET CHEAT CODE: TAB-G-F10 // if (Keyboard[sc_Tab] && Keyboard[sc_G] && Keyboard[sc_F10]) { WindowH = 160; if (godmode) { Message ("God mode OFF"); SD_PlaySound (NOBONUSSND); } else { Message ("God mode ON"); SD_PlaySound (ENDBONUS2SND); } IN_Ack (); godmode ^= 1; DrawPlayBorderSides (); IN_ClearKeysDown (); return; } #endif // // SECRET CHEAT CODE: 'MLI' // if (Keyboard[sc_M] && Keyboard[sc_L] && Keyboard[sc_I]) { gamestate.health = 100; gamestate.ammo = 99; gamestate.keys = 3; gamestate.score = 0; gamestate.TimeCount += 42000L; GiveWeapon (wp_chaingun); DrawWeapon (); DrawHealth (); DrawKeys (); DrawAmmo (); DrawScore (); ClearMemory (); CA_CacheGrChunk (STARTFONT + 1); ClearSplitVWB (); Message (STR_CHEATER1 "\n" STR_CHEATER2 "\n\n" STR_CHEATER3 "\n" STR_CHEATER4 "\n" STR_CHEATER5); UNCACHEGRCHUNK (STARTFONT + 1); IN_ClearKeysDown (); IN_Ack (); if (viewsize < 17) DrawPlayBorder (); } // // OPEN UP DEBUG KEYS // #ifdef DEBUGKEYS if (Keyboard[sc_BackSpace] && Keyboard[sc_LShift] && Keyboard[sc_Alt] && param_debugmode) { ClearMemory (); CA_CacheGrChunk (STARTFONT + 1); ClearSplitVWB (); Message ("Debugging keys are\nnow available!"); UNCACHEGRCHUNK (STARTFONT + 1); IN_ClearKeysDown (); IN_Ack (); DrawPlayBorderSides (); DebugOk = 1; } #endif // // TRYING THE KEEN CHEAT CODE! // if (Keyboard[sc_B] && Keyboard[sc_A] && Keyboard[sc_T]) { ClearMemory (); CA_CacheGrChunk (STARTFONT + 1); ClearSplitVWB (); Message ("Commander Keen is also\n" "available from Apogee, but\n" "then, you already know\n" "that - right, Cheatmeister?!"); UNCACHEGRCHUNK (STARTFONT + 1); IN_ClearKeysDown (); IN_Ack (); if (viewsize < 18) DrawPlayBorder (); } // // pause key weirdness can't be checked as a scan code // if(buttonstate[bt_pause]) Paused = true; if(Paused) { int lastoffs = StopMusic(); LatchDrawPic (20 - 4, 80 - 2 * 8, PAUSEDPIC); VH_UpdateScreen(); IN_Ack (); Paused = false; ContinueMusic(lastoffs); if (MousePresent && IN_IsInputGrabbed()) IN_CenterMouse(); // Clear accumulated mouse movement lasttimecount = GetTimeCount(); return; } // // F1-F7/ESC to enter control panel // if ( #ifndef DEBCHECK scan == sc_F10 || #endif scan == sc_F9 || scan == sc_F7 || scan == sc_F8) // pop up quit dialog { short oldmapon = gamestate.mapon; short oldepisode = gamestate.episode; ClearMemory (); ClearSplitVWB (); US_ControlPanel (scan); DrawPlayBorderSides (); SETFONTCOLOR (0, 15); IN_ClearKeysDown (); return; } if ((scan >= sc_F1 && scan <= sc_F9) || scan == sc_Escape || buttonstate[bt_esc]) { int lastoffs = StopMusic (); ClearMemory (); VW_FadeOut (); US_ControlPanel (buttonstate[bt_esc] ? sc_Escape : scan); SETFONTCOLOR (0, 15); IN_ClearKeysDown (); VW_FadeOut(); if(viewsize != 21) DrawPlayScreen (); if (!startgame && !loadedgame) ContinueMusic (lastoffs); if (loadedgame) playstate = ex_abort; lasttimecount = GetTimeCount(); if (MousePresent && IN_IsInputGrabbed()) IN_CenterMouse(); // Clear accumulated mouse movement return; } // // TAB-? debug keys // #ifdef DEBUGKEYS if (Keyboard[sc_Tab] && DebugOk) { CA_CacheGrChunk (STARTFONT); fontnumber = 0; SETFONTCOLOR (0, 15); if (DebugKeys () && viewsize < 20) DrawPlayBorder (); // dont let the blue borders flash if (MousePresent && IN_IsInputGrabbed()) IN_CenterMouse(); // Clear accumulated mouse movement lasttimecount = GetTimeCount(); return; } #endif }