int wipe_doMelt(int width, int height, int ticks) { int i; int j; int dy; int idx; short *s; short *d; boolean done = true; #ifndef SNDSERV // Sound mixing for the buffer is snychronous. I_UpdateSound(); // Synchronous sound output is explicitly called. #ifndef SNDINTR // Update sound output. I_SubmitSound(); #endif #endif width /= 2; while (ticks--) { for (i = 0; i < width; i++) { if (y[i] < 0) { y[i]++; done = false; } else if (y[i] < height) { dy = (y[i] < 16) ? y[i] + 1 : 8; if (y[i] + dy >= height) dy = height - y[i]; s = &((short *)wipe_scr_end)[i * height + y[i]]; d = &((short *)wipe_scr)[y[i] * width + i]; idx = 0; for (j = dy; j; j--) { d[idx] = *(s++); idx += width; } y[i] += dy; s = &((short *)wipe_scr_start)[i * height]; d = &((short *)wipe_scr)[y[i] * width + i]; idx = 0; for (j = height - y[i]; j; j--) { d[idx] = *(s++); idx += width; } done = false; } } } return done; }
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 } }
void retro_run(void) { bool updated = false; if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE_UPDATE, &updated) && updated) update_variables(false); if (quit_pressed) { environ_cb(RETRO_ENVIRONMENT_SHUTDOWN, NULL); I_SafeExit(1); } D_DoomLoop(); I_UpdateSound(); }
void sound_callback(void) { disable_interrupts(); if (should_sound) { I_UpdateSound(); // Sound mixing for the buffer is snychronous. // Synchronous sound output is explicitly called. // Update sound output. I_SubmitSound(); } enable_interrupts(); }
// 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 I_UpdateAudio(void *unused, Uint8 *stream, int len) { I_UpdateMusic(unused, stream, len); I_UpdateSound(unused, stream, len); }