static void intCleanUpIntelMap(void) { MESSAGE *psMessage, *psNext; //remove any research messages that have been read for (psMessage = apsMessages[selectedPlayer]; psMessage != NULL; psMessage = psNext) { psNext = psMessage->psNext; if (psMessage->type == MSG_RESEARCH && psMessage->read) { removeMessage(psMessage, selectedPlayer); } } resetIntelligencePauseState(); immediateMessage = false; cdAudio_Resume(); if (interpProcessorActive()) { debug(LOG_SCRIPT, "intCleanUpIntelMap: interpreter running, storing CALL_VIDEO_QUIT"); if(!msgStackPush(CALL_VIDEO_QUIT,-1,-1,"\0",-1,-1,NULL)) { debug(LOG_ERROR, "intCleanUpIntelMap() - msgStackPush - stack failed"); return; } } else { debug(LOG_SCRIPT, "intCleanUpIntelMap: not running"); eventFireCallbackTrigger((TRIGGER_TYPE)CALL_VIDEO_QUIT); } }
void loop_ClearVideoPlaybackMode(void) { videoMode -=1; paused = false; video = false; gameTimeStart(); pie_SetFogStatus(true); cdAudio_Resume(); wzShowMouse(true); ASSERT( videoMode == 0, "loop_ClearVideoPlaybackMode: out of sync." ); }
/*! * Activation (focus change) eventhandler */ static void handleActiveEvent(SDL_ActiveEvent * activeEvent) { // Ignore focus loss through SDL_APPMOUSEFOCUS, since it mostly happens accidentialy // active.state is a bitflag! Mixed events (eg. APPACTIVE|APPMOUSEFOCUS) will thus not be ignored. if ( activeEvent->state == SDL_APPMOUSEFOCUS ) { setMouseScroll(activeEvent->gain); return; } if ( activeEvent->gain == 1 ) { debug( LOG_NEVER, "WM_SETFOCUS"); if (focusState != FOCUS_IN) { focusState = FOCUS_IN; // Don't pause in multiplayer! if (war_GetPauseOnFocusLoss() && !NetPlay.bComms) { gameTimeStart(); audio_ResumeAll(); cdAudio_Resume(); } // enable scrolling setScrollPause(false); resetScroll(); } } else { debug( LOG_NEVER, "WM_KILLFOCUS"); if (focusState != FOCUS_OUT) { focusState = FOCUS_OUT; // Don't pause in multiplayer! if (war_GetPauseOnFocusLoss() && !NetPlay.bComms) { gameTimeStop(); audio_PauseAll(); cdAudio_Pause(); } /* Have to tell the input system that we've lost focus */ inputLooseFocus(); // stop scrolling setScrollPause(true); } } }