本文整理汇总了C++中LTexture::free方法的典型用法代码示例。如果您正苦于以下问题:C++ LTexture::free方法的具体用法?C++ LTexture::free怎么用?C++ LTexture::free使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LTexture
的用法示例。
在下文中一共展示了LTexture::free方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: close
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();
}
示例2: close
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();
}
示例3:
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();
}
示例4:
~SimLedBar()
{
//Free loaded images
offTexture_.free();
greenTexture_.free();
orangeTexture_.free();
redTexture_.free();
}
示例5: close
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();
}
示例6: close
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();
}
示例7: close
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();
}
示例8: close
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();
}
示例9: close
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();
}
示例10: close
void close()
{
gFontTexture.free();
SDL_DestroyRenderer(gRenderer);
SDL_DestroyWindow(gWindow);
gWindow = NULL;
gRenderer = NULL;
IMG_Quit();
SDL_Quit();
}
示例11: close
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();
}
示例12: close
void close()
{
//Free loaded images
gSceneTexture.free();
//Destroy window
SDL_DestroyRenderer( gRenderer );
gWindow.free();
//Quit SDL subsystems
IMG_Quit();
SDL_Quit();
}
示例13: close
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();
}
示例14: close
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();
}
示例15: close
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();
}