void close( Tile* tiles[] ) { //Deallocate tiles for( int i = 0; i < TOTAL_TILES; ++i ) { if( tiles[ i ] == NULL ) { delete tiles[ i ]; tiles[ i ] = NULL; } } //Free loaded images gDotTexture.free(); gTileTexture.free(); //Destroy window SDL_DestroyRenderer( gRenderer ); SDL_DestroyWindow( gWindow ); gWindow = NULL; gRenderer = NULL; //Quit SDL subsystems IMG_Quit(); SDL_Quit(); }
void close() { gSceneTexture.free(); gHelp.free(); gPtrHelp = NULL; board.freeBoard(); for (int i = 0; i < NUMBER_OF_TILE * 4; ++i) { gTile[i].freeButton(); } for (int i = 0; i < NUMBER_OF_BUTTON; ++i) { gButton[i].freeButton(); } TTF_CloseFont(gFont); gFont = NULL; SDL_DestroyRenderer(gRenderer); gRenderer = NULL; gWindow.free(); TTF_Quit(); IMG_Quit(); SDL_Quit(); }
void close_sdl(void) { printf("close_sdl()\n"); /* free loaded image */ gPromptTexture.free(); gTimeTextTexture.free(); /* free global font */ TTF_CloseFont(gFont); gFont = NULL; /* destroy window */ SDL_DestroyRenderer(gRenderer); SDL_DestroyWindow(gWindow); gWindow = NULL; gRenderer = NULL; /* Quit SDL subsystem */ #ifdef _SDL_TTF_H TTF_Quit(); #endif IMG_Quit(); SDL_Quit(); }
~SimLedBar() { //Free loaded images offTexture_.free(); greenTexture_.free(); orangeTexture_.free(); redTexture_.free(); }
void close() { //Free loaded images gDotTexture.free(); gBGTexture.free(); //Destroy window SDL_DestroyRenderer( gRenderer ); SDL_DestroyWindow( gWindow ); gWindow = NULL; gRenderer = NULL; //Quit SDL subsystems IMG_Quit(); SDL_Quit(); }
void close(){ // save game state SDL_RWops* file = SDL_RWFromFile("gamestates/01.bin", "w+b"); if (file != NULL) { SDL_RWwrite(file, &gameState, sizeof(gameState), 1); printf("game state saved! \n"); SDL_RWclose(file); } else{ printf("fail to save game state! \n"); } batman->close(); gBackGroundTexture.free(); SDL_DestroyRenderer(gRenderer); SDL_DestroyWindow(gWindow); gRenderer = NULL; gWindow = NULL; IMG_Quit(); SDL_Quit(); }
void close() { //Free loaded images gPromptTexture.free(); //Free the sound effects Mix_FreeChunk( gScratch ); Mix_FreeChunk( gHigh ); Mix_FreeChunk( gMedium ); Mix_FreeChunk( gLow ); gScratch = NULL; gHigh = NULL; gMedium = NULL; gLow = NULL; //Free the music Mix_FreeMusic( gMusic ); gMusic = NULL; //Destroy window SDL_DestroyRenderer( gRenderer ); SDL_DestroyWindow( gWindow ); gWindow = NULL; gRenderer = NULL; //Quit SDL subsystems Mix_Quit(); IMG_Quit(); SDL_Quit(); }
void close() { //Free loaded images gPressTexture.free(); gUpTexture.free(); gDownTexture.free(); gLeftTexture.free(); gRightTexture.free(); //Destroy window SDL_DestroyRenderer( gRenderer ); SDL_DestroyWindow( gWindow ); gWindow = NULL; gRenderer = NULL; //Quit SDL subsystems IMG_Quit(); SDL_Quit(); }
void close(){ //Free loaded images gBallTexture.free(); gFPSTextTexture.free(); //Free global font TTF_CloseFont( gFont ); gFont = NULL; //Destroy window SDL_DestroyRenderer(gRenderer); SDL_DestroyWindow(gWindow); gWindow = NULL; gRenderer = NULL; //Quit SDL subsystems IMG_Quit(); SDL_Quit(); }
void close() { gFontTexture.free(); SDL_DestroyRenderer(gRenderer); SDL_DestroyWindow(gWindow); gWindow = NULL; gRenderer = NULL; IMG_Quit(); SDL_Quit(); }
void close() { //Free loaded images gTimeTextTexture.free(); gStartPromptTexture.free(); gPausePromptTexture.free(); //Free global font TTF_CloseFont( gFont ); gFont = NULL; //Destroy window SDL_DestroyRenderer( gRenderer ); SDL_DestroyWindow( gWindow ); gWindow = NULL; gRenderer = NULL; //Quit SDL subsystems TTF_Quit(); IMG_Quit(); SDL_Quit(); }
void close() { //Free loaded images gSceneTexture.free(); //Destroy window SDL_DestroyRenderer( gRenderer ); gWindow.free(); //Quit SDL subsystems IMG_Quit(); SDL_Quit(); }
void close() { //Free loadded images g_sceneTexture.free(); //Destroy window SDL_DestroyRenderer(g_renderer); g_window.free(); //Quit SDL subsystem TTF_Quit(); IMG_Quit(); SDL_Quit(); }
void close() { // Free loaded image from texture gCircleTexture.free(); gBackgroundTexture.free(); SDL_DestroyTexture(gTexture); gTexture = NULL; // Free loaded image from surface SDL_FreeSurface( gCurrentSurface ); gCurrentSurface = NULL; // Destroy window SDL_DestroyRenderer(gRenderer); SDL_DestroyWindow(gWindow); gWindow = NULL; gRenderer = NULL; //Quit SDL subsystems IMG_Quit(); SDL_Quit(); }
void close() { //Free loaded images g_dotTexture.free(); //Destroy window SDL_DestroyRenderer(g_renderer); SDL_DestroyWindow(g_window); g_window = NULL; g_renderer = NULL; //Quit SDL subsystem IMG_Quit(); SDL_Quit(); Mix_Quit(); }
//Cette fonction effectue une fermeture appropriée du programme, de l'environnement SDL et libère la mémoire des différents éléments SDL créés void close() { //On détruit les LTextures créées dans le programme hommeTexture.free(); //Destroy window SDL_DestroyRenderer(rendererFenetre); SDL_DestroyWindow(fenetreProgramme); fenetreProgramme = NULL; rendererFenetre = NULL; //Quit SDL subsystems IMG_Quit(); SDL_Quit(); }
void close_sdl(void) { printf("close_sdl()\n"); /* free loaded image */ gModulatedTexture.free(); /* destroy window */ SDL_DestroyRenderer(gRenderer); SDL_DestroyWindow(gWindow); gWindow = NULL; gRenderer = NULL; /* Quit SDL subsystem */ IMG_Quit(); SDL_Quit(); }
void close() { //Free loaded images gSplashTexture.free(); //Free semaphore SDL_DestroySemaphore( gDataLock ); gDataLock = NULL; //Destroy window SDL_DestroyRenderer( gRenderer ); SDL_DestroyWindow( gWindow ); gWindow = NULL; gRenderer = NULL; //Quit SDL subsystems IMG_Quit(); SDL_Quit(); }
void close() { //Open data for writing SDL_RWops* file = SDL_RWFromFile( "33_file_reading_and_writing/nums.bin", "w+b" ); if( file != NULL ) { //Save data for( int i = 0; i < TOTAL_DATA; ++i ) { SDL_RWwrite( file, &gData[ i ], sizeof(Sint32), 1 ); } //Close file handler SDL_RWclose( file ); } else { printf( "Error: Unable to save file! %s\n", SDL_GetError() ); } //Free loaded images gPromptTextTexture.free(); for( int i = 0; i < TOTAL_DATA; ++i ) { gDataTextures[ i ].free(); } //Free global font TTF_CloseFont( gFont ); gFont = NULL; //Destroy window SDL_DestroyRenderer( gRenderer ); SDL_DestroyWindow( gWindow ); gWindow = NULL; gRenderer = NULL; //Quit SDL subsystems TTF_Quit(); IMG_Quit(); SDL_Quit(); }
void close() { //Free loaded images gSplashTexture.free(); //Close game controller with haptics SDL_HapticClose( gControllerHaptic ); SDL_JoystickClose( gGameController ); gGameController = NULL; gControllerHaptic = NULL; //Destroy window SDL_DestroyRenderer( gRenderer ); SDL_DestroyWindow( gWindow ); gWindow = NULL; gRenderer = NULL; //Quit SDL subsystems IMG_Quit(); SDL_Quit(); }
void close_sdl(void) { printf("close_sdl()\n"); /* free loaded image */ gDotTexture.free(); /* destroy window */ SDL_DestroyRenderer(gRenderer); SDL_DestroyWindow(gWindow); gWindow = NULL; gRenderer = NULL; /* Quit SDL subsystem */ #ifdef _SDL_TTF_H TTF_Quit(); #endif IMG_Quit(); SDL_Quit(); }