void H2_GameLoop(void) { if (M_CheckParm("-debugfile")) { char filename[20]; M_snprintf(filename, sizeof(filename), "debug%i.txt", consoleplayer); debugfile = fopen(filename, "w"); } I_SetWindowTitle(gamedescription); I_GraphicsCheckCommandLine(); I_SetGrabMouseCallback(D_GrabMouseCallback); I_InitGraphics(); while (1) { // Frame syncronous IO operations I_StartFrame(); // Process one or more tics // Will run at least one tic TryRunTics(); // Move positional sounds S_UpdateSounds(players[displayplayer].mo); DrawAndBlit(); } }
void D_DoomLoop (void) { if (demorecording) G_BeginRecording (); if (M_CheckParm ("-debugfile")) { char filename[20]; sprintf (filename,"debug%i.txt",consoleplayer); printf ("debug output to: %s\n",filename); debugfile = fopen (filename,"w"); } I_InitGraphics (); for (;;) { // frame syncronous IO operations I_StartFrame (); // process one or more tics if (singletics) { I_StartTic (); D_ProcessEvents (); G_BuildTiccmd (&netcmds[consoleplayer][maketic%BACKUPTICS]); if (advancedemo) D_DoAdvanceDemo (); M_Ticker (); G_Ticker (); gametic++; maketic++; } else { TryRunTics (); // will run at least one tic } S_UpdateSounds (players[consoleplayer].mo);// move positional sounds // Update display, next frame, with current state. D_Display (); #ifndef OS2 #ifndef SNDSERV // Sound mixing for the buffer is snychronous. I_UpdateSound(); #endif // Synchronous sound output is explicitly called. #ifndef SNDINTR // Update sound output. I_SubmitSound(); #endif #endif } }
// // D_DoomLoop // void D_DoomLoop (void) { if (bfgedition && (demorecording || (gameaction == ga_playdemo) || netgame)) { printf(" WARNING: You are playing using one of the Doom Classic\n" " IWAD files shipped with the Doom 3: BFG Edition. These are\n" " known to be incompatible with the regular IWAD files and\n" " may cause demos and network games to get out of sync.\n"); } if (demorecording) G_BeginRecording (); main_loop_started = true; TryRunTics(); I_SetWindowTitle(gamedescription); I_GraphicsCheckCommandLine(); I_SetGrabMouseCallback(D_GrabMouseCallback); I_InitGraphics(); V_EnableLoadingDisk(SCREENWIDTH - LOADING_DISK_W, SCREENHEIGHT - LOADING_DISK_H); V_RestoreBuffer(); R_ExecuteSetViewSize(); D_StartGameLoop(); if (testcontrols) { wipegamestate = gamestate; } while (1) { // frame syncronous IO operations I_StartFrame (); TryRunTics (); // will run at least one tic S_UpdateSounds (players[consoleplayer].mo);// move positional sounds // Update display, next frame, with current state. if (screenvisible) D_Display (); } }
void D_DoomLoop (void) { if (demorecording) G_BeginRecording (); TryRunTics(); I_InitGraphics (); R_ExecuteSetViewSize(); D_StartGameLoop(); if (testcontrols) { wipegamestate = gamestate; } while (1) { // frame syncronous IO operations I_StartFrame (); // process one or more tics if (singletics) { I_StartTic (); D_ProcessEvents (); G_BuildTiccmd (&netcmds[consoleplayer][maketic%BACKUPTICS]); if (advancedemo) D_DoAdvanceDemo (); M_Ticker (); G_Ticker (); gametic++; maketic++; } else { TryRunTics (); // will run at least one tic } S_UpdateSounds (players[consoleplayer].mo);// move positional sounds // Update display, next frame, with current state. if (screenvisible) D_Display (); } }
static void D_DoomLoop(void) { for (;;) { WasRenderedInTryRunTics = false; // frame syncronous IO operations I_StartFrame (); if (ffmap == gamemap) ffmap = 0; // process one or more tics if (singletics) { I_StartTic (); G_BuildTiccmd (&netcmds[consoleplayer][maketic%BACKUPTICS]); if (advancedemo) D_DoAdvanceDemo (); M_Ticker (); G_Ticker (); P_Checksum(gametic); gametic++; maketic++; } else TryRunTics (); // will run at least one tic // killough 3/16/98: change consoleplayer to displayplayer if (players[displayplayer].mo) // cph 2002/08/10 S_UpdateSounds(players[displayplayer].mo);// move positional sounds if (V_GetMode() == VID_MODEGL ? !movement_smooth || !WasRenderedInTryRunTics : !movement_smooth || !WasRenderedInTryRunTics || gamestate != wipegamestate ) { // Update display, next frame, with current state. D_Display(); } // CPhipps - auto screenshot if (auto_shot_fname && !--auto_shot_count) { auto_shot_count = auto_shot_time; M_DoScreenShot(auto_shot_fname); } } }
// MIKE 11/08 main game loop, called every frame by Flash void D_DoomLoop (void) { // frame syncronous IO operations I_StartFrame (); if(!wipe) { // process one or more tics if (singletics) { I_StartTic (); D_ProcessEvents (); G_BuildTiccmd (&netcmds[consoleplayer][maketic%BACKUPTICS]); if (advancedemo) D_DoAdvanceDemo (); M_Ticker (); G_Ticker (); gametic++; maketic++; } else { TryRunTics (); // will run at least one tic } S_UpdateSounds (players[consoleplayer].mo);// move positional sounds // Update display, next frame, with current state. //D_Display (); } // MIKE #ifndef SNDSERV // Sound mixing for the buffer is snychronous. I_UpdateSound(); #endif // Synchronous sound output is explicitly called. #ifndef SNDINTR // Update sound output. // I_SubmitSound(); #endif gameTime++; return AS3_Null(); }
void D_DoomLoop (void) { if (demorecording) G_BeginRecording (); if (M_CheckParm ("-debugfile")) { char filename[20]; sprintf (filename,"debug%i.txt",consoleplayer); printf ("debug output to: %s\n",filename); debugfile = fopen (filename,"w"); } I_InitGraphics (); while (1) { // frame syncronous IO operations I_StartFrame (); // process one or more tics if (singletics) { I_StartTic (); D_ProcessEvents (); G_BuildTiccmd (&netcmds[consoleplayer][maketic%BACKUPTICS]); if (advancedemo) D_DoAdvanceDemo (); M_Ticker (); G_Ticker (); gametic++; maketic++; } else { TryRunTics (); // will run at least one tic } S_UpdateSounds (players[consoleplayer].mo);// move positional sounds // Update display, next frame, with current state. D_Display (); } }
// // D_DoomLoop // // haleyjd 08/23/10: [STRIFE] Verified unmodified. // void D_DoomLoop (void) { if (demorecording) G_BeginRecording (); main_loop_started = true; TryRunTics(); if (!showintro) { I_SetWindowTitle(gamedescription); I_InitGraphics(); } I_EnableLoadingDisk(); I_SetGrabMouseCallback(D_GrabMouseCallback); V_RestoreBuffer(); R_ExecuteSetViewSize(); D_StartGameLoop(); if (testcontrols) { wipegamestate = gamestate; } while (1) { // frame syncronous IO operations I_StartFrame (); // process one or more tics TryRunTics (); // will run at least one tic S_UpdateSounds (players[consoleplayer].mo);// move positional sounds // Update display, next frame, with current state. if (screenvisible) D_Display (); } }