/// cleans up game memory and SDL at exit void cleanup() { extern void clear_command(); extern void clear_console(); extern void clear_mdls(); extern void clear_sound(); recorder::stop(); cleanupserver(); /// "Use this function to set a window's input grab mode." /// https://wiki.libsdl.org/SDL_SetWindowGrab if(screen) SDL_SetWindowGrab(screen, SDL_FALSE); /// "Use this function to set relative mouse mode." /// https://wiki.libsdl.org/SDL_SetRelativeMouseMode SDL_SetRelativeMouseMode(SDL_FALSE); /// "Use this function to toggle whether or not the cursor is shown." /// https://wiki.libsdl.org/SDL_ShowCursor SDL_ShowCursor(SDL_TRUE); cleargamma(); /// free octree memory freeocta(worldroot); clear_command(); clear_console(); clear_mdls(); clear_sound(); closelogfile(); /// "Use this function to clean up all initialized subsystems. You should call it upon all exit conditions." /// https://wiki.libsdl.org/SDL_Quit SDL_Quit(); }
void cleanup() { recorder::stop(); cleanupserver(); SDL_ShowCursor(1); SDL_WM_GrabInput(SDL_GRAB_OFF); SDL_SetGamma(1, 1, 1); freeocta(worldroot); extern void clear_command(); clear_command(); extern void clear_console(); clear_console(); extern void clear_mdls(); clear_mdls(); extern void clear_sound(); clear_sound(); SDL_Quit(); }
void cleanup() { recorder::stop(); cleanupserver(); SDL_ShowCursor(1); SDL_WM_GrabInput(SDL_GRAB_OFF); cleargamma(); freeocta(worldroot); varsys::clear(); extern void clear_console(); clear_console(); extern void clear_mdls(); clear_mdls(); extern void clear_sound(); clear_sound(); closelogfile(); SDL_Quit(); }
void cleanup() { holdscreenlock; recorder::stop(); cleanupserver(); if(screen) SDL_SetWindowGrab(screen, SDL_FALSE); SDL_SetRelativeMouseMode(SDL_FALSE); SDL_ShowCursor(SDL_TRUE); cleargamma(); freeocta(worldroot); extern void clear_command(); clear_command(); extern void clear_console(); clear_console(); extern void clear_mdls(); clear_mdls(); extern void clear_sound(); clear_sound(); closelogfile(); SDL_Quit(); }
void cleanup() { recorder::stop(); cleanupserver(); showcursor(true); //#ifdef FAKESHOWCURSOR // if(scursor) SDL_FreeCursor(scursor); // scursor = ncursor = NULL; //#endif SDL_WM_GrabInput(SDL_GRAB_OFF); cleargamma(); freeocta(worldroot); extern void clear_command(); clear_command(); extern void clear_console(); clear_console(); extern void clear_mdls(); clear_mdls(); stopsound(); closelogfile(); SDL_Quit(); }