当前位置: 首页>>代码示例>>C++>>正文


C++ LTexture::free方法代码示例

本文整理汇总了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();
}
开发者ID:Stephen-Lamb,项目名称:Work,代码行数:26,代码来源:39_tiling.cpp

示例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();
}
开发者ID:NASD-Bulgaria,项目名称:egt-training,代码行数:26,代码来源:main.cpp

示例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();
}
开发者ID:LXiong,项目名称:blog_tmp,代码行数:28,代码来源:timing.cpp

示例4:

	~SimLedBar()
	{
		//Free loaded images
		offTexture_.free();
		greenTexture_.free();
		orangeTexture_.free();
		redTexture_.free();
	}
开发者ID:pmrobotix,项目名称:DemoFusion,代码行数:8,代码来源:SimLedBar.hpp

示例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();
}
开发者ID:kaprikawn,项目名称:sdl-starter,代码行数:15,代码来源:30.cpp

示例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();
}
开发者ID:xysun,项目名称:batman1,代码行数:25,代码来源:main.cpp

示例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();
}
开发者ID:mariontan,项目名称:LazyFooTrials,代码行数:30,代码来源:21_sound_effects_and_music.cpp

示例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();
}
开发者ID:kaprikawn,项目名称:sdl-starter,代码行数:18,代码来源:18.cpp

示例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();
}
开发者ID:JerelynCo,项目名称:CS179.14,代码行数:19,代码来源:bouncingBall.cpp

示例10: close

void close()
{
	gFontTexture.free();

	SDL_DestroyRenderer(gRenderer);
	SDL_DestroyWindow(gWindow);
	gWindow = NULL;
	gRenderer = NULL;

	IMG_Quit();
	SDL_Quit();
}
开发者ID:ohsnapitscolin,项目名称:handwritten,代码行数:12,代码来源:dataCollection.cpp

示例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();
}
开发者ID:kaprikawn,项目名称:sdl-starter,代码行数:21,代码来源:23.cpp

示例12: close

void close()
{
    //Free loaded images
    gSceneTexture.free();

    //Destroy window
    SDL_DestroyRenderer( gRenderer );
    gWindow.free();

    //Quit SDL subsystems
    IMG_Quit();
    SDL_Quit();
}
开发者ID:pmrobotix,项目名称:DemoFusion,代码行数:13,代码来源:35_window_events.cpp

示例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();
}
开发者ID:wedemalm,项目名称:lazyfoo,代码行数:13,代码来源:WindowEvents.cpp

示例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();
}
开发者ID:ben-albrecht,项目名称:hjkl,代码行数:23,代码来源:driver.cpp

示例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();
}
开发者ID:wedemalm,项目名称:lazyfoo,代码行数:15,代码来源:camera.cpp


注:本文中的LTexture::free方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。