本文整理汇总了C++中bm_release函数的典型用法代码示例。如果您正苦于以下问题:C++ bm_release函数的具体用法?C++ bm_release怎么用?C++ bm_release使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bm_release函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: techroom_unload_animation
void techroom_unload_animation()
{
int i;
//clear everything, just in case, it will get loaded when needed later
if (Weapon_list != NULL) {
for (i = 0; i < Weapon_list_size; i++) {
if (Weapon_list[i].animation.num_frames != 0) {
generic_anim_unload(&Weapon_list[i].animation);
}
if (Weapon_list[i].bitmap >= 0) {
bm_release(Weapon_list[i].bitmap);
Weapon_list[i].bitmap = -1;
}
}
}
for (i = 0; i < Intel_list_size; i++) {
if (Intel_list[i].animation.num_frames != 0) {
generic_anim_unload(&Intel_list[i].animation);
}
if (Intel_list[i].bitmap >= 0) {
bm_release(Intel_list[i].bitmap);
Intel_list[i].bitmap = -1;
}
}
}
开发者ID:RandomTiger,项目名称:fs2open.github.com,代码行数:29,代码来源:techmenu.cpp
示例2: generic_anim_unload
void generic_anim_unload(generic_anim *ga)
{
if(ga->num_frames > 0) {
if(ga->streaming) {
if(ga->type == BM_TYPE_ANI) {
anim_free(ga->ani.animation);
free_anim_instance(ga->ani.instance);
}
if(ga->type == BM_TYPE_EFF) {
if(ga->eff.next_frame >= 0)
bm_release(ga->eff.next_frame);
if(ga->bitmap_id >= 0)
bm_release(ga->bitmap_id);
}
if(ga->type == BM_TYPE_PNG) {
if(ga->bitmap_id >= 0)
bm_release(ga->bitmap_id);
if (ga->png.anim != nullptr) {
delete ga->png.anim;
ga->png.anim = nullptr;
}
}
}
else {
//trying to release the first frame will release ALL frames
bm_release(ga->first_frame);
}
if(ga->buffer) {
bm_release(ga->bitmap_id);
}
}
generic_anim_init(ga, NULL);
}
开发者ID:joshuasb,项目名称:fs2open,代码行数:33,代码来源:generic.cpp
示例3: barracks_close
// -----------------------------------------------------------------------------
void barracks_close()
{
// destroy window
Ui_window.destroy();
// release background bitmap
if (Background_bitmap >= 0) {
bm_release(Background_bitmap);
}
// release rank pip bitmaps
bm_release(Rank_pips_bitmaps);
// release pilot pic bitmaps
for (int i=0; i<Num_pilot_images; i++) {
if (Pilot_images[i] >= 0) {
bm_release(Pilot_images[i]);
}
}
if(Stat_labels != NULL)
{
delete[] Stat_labels;
Stat_labels = NULL;
}
if(Stats != NULL)
{
delete[] Stats;
Stats = NULL;
}
game_flush();
}
开发者ID:PhantomHoover,项目名称:fs2open.github.com,代码行数:34,代码来源:barracks.cpp
示例4: chatbox_close
void chatbox_close()
{
if (!Chatbox_created)
return;
// destory the UI window
Chat_window.destroy();
// unload any bitmaps
if (Chatbox_small_bitmap != -1) {
bm_release(Chatbox_small_bitmap);
Chatbox_small_bitmap = -1;
}
if (Chatbox_big_bitmap != -1) {
bm_release(Chatbox_big_bitmap);
Chatbox_big_bitmap = -1;
}
if (Chatbox_mp_bitmap != -1) {
bm_release(Chatbox_mp_bitmap);
Chatbox_mp_bitmap = -1;
}
// clear all the text lines in the
chatbox_clear();
Chatbox_created = 0;
}
开发者ID:DahBlount,项目名称:Freespace-Open-Swifty,代码行数:28,代码来源:chatbox.cpp
示例5: multi_pinfo_reset_player
// reset the player infomation for this popup
void multi_pinfo_reset_player(net_player *np)
{
// assign the player
Multi_pinfo_popup_player = np;
// unload any old image data if necessary
strcpy_s(Mp_pilot.filename, "");
if(Mp_pilot.bitmap != -1){
bm_release(Mp_pilot.bitmap);
Mp_pilot.bitmap = -1;
}
strcpy_s(Mp_squad.filename, "");
if(Mp_squad.bitmap != -1){
bm_release(Mp_squad.bitmap);
Mp_squad.bitmap = -1;
}
// try and load pilot pic/squad logo
if(np->m_player->image_filename[0] != '\0'){
strcpy_s(Mp_pilot.filename, np->m_player->image_filename);
Mp_pilot.bitmap = bm_load_duplicate(Mp_pilot.filename);
}
if(np->m_player->m_squad_filename[0] != '\0'){
strcpy_s(Mp_squad.filename, np->m_player->m_squad_filename);
Mp_squad.bitmap = bm_load_duplicate(Mp_squad.filename);
}
// build the stats value strings for this player
multi_pinfo_build_stats();
}
开发者ID:Admiral-MS,项目名称:fs2open.github.com,代码行数:31,代码来源:multi_pinfo.cpp
示例6: techroom_lists_reset
void techroom_lists_reset()
{
int i;
//unload the current animation, we load another one for the new current entry
if(Tab != SHIPS_DATA_TAB)
techroom_unload_animation();
Current_list = NULL;
Current_list_size = 0;
model_free_all();
if (Ship_list != NULL) {
delete[] Ship_list;
Ship_list = NULL;
}
Ship_list_size = 0;
Ships_loaded = 0;
if (Weapon_list != NULL) {
for (i = 0; i < Weapon_list_size; i++) {
if (Weapon_list[i].animation.num_frames != 0) {
generic_anim_unload(&Weapon_list[i].animation);
}
if (Weapon_list[i].bitmap >= 0) {
bm_release(Weapon_list[i].bitmap);
Weapon_list[i].bitmap = -1;
}
}
delete[] Weapon_list;
Weapon_list = NULL;
}
Weapon_list_size = 0;
Weapons_loaded = 0;
for (i = 0; i < Intel_list_size; i++) {
if (Intel_list[i].animation.num_frames != 0) {
generic_anim_unload(&Intel_list[i].animation);
}
if (Intel_list[i].bitmap >= 0) {
bm_release(Intel_list[i].bitmap);
Intel_list[i].bitmap = -1;
}
}
Intel_list_size = 0;
Intel_loaded = 0;
}
开发者ID:RandomTiger,项目名称:fs2open.github.com,代码行数:54,代码来源:techmenu.cpp
示例7: ML_objectives_close
// cleanup called when exiting the show goals screen
void ML_objectives_close()
{
if (Goal_complete_bitmap >= 0) {
bm_release(Goal_complete_bitmap);
}
if (Goal_incomplete_bitmap >= 0) {
bm_release(Goal_incomplete_bitmap);
}
if (Goal_failed_bitmap >= 0) {
bm_release(Goal_failed_bitmap);
}
}
开发者ID:Admiral-MS,项目名称:fs2open.github.com,代码行数:15,代码来源:missiongoals.cpp
示例8: pause_close
// close the pause screen
void pause_close()
{
// if we're not paused - do nothing
if ( !Paused ) {
return;
}
Assert( !(Game_mode & GM_MULTIPLAYER) );
// unpause all weapon sounds
weapon_unpause_sounds();
// deinit stuff
if(Pause_saved_screen != -1) {
gr_free_screen(Pause_saved_screen);
Pause_saved_screen = -1;
}
if (Pause_background_bitmap != -1){
bm_release(Pause_background_bitmap);
Pause_background_bitmap = -1;
}
Pause_win.destroy();
game_flush();
// unpause all the music
audiostream_unpause_all();
Paused = 0;
}
开发者ID:DahBlount,项目名称:Freespace-Open-Swifty,代码行数:32,代码来源:missionpause.cpp
示例9: fiction_viewer_close
// close
void fiction_viewer_close()
{
if (!Fiction_viewer_inited)
return;
// free the fiction
fiction_viewer_reset();
// destroy the window
Fiction_viewer_window.destroy();
// restore the old font
use_std_font();
// free the bitmap
if (Fiction_viewer_bitmap >= 0)
bm_release(Fiction_viewer_bitmap);
Fiction_viewer_bitmap = -1;
// maybe stop music
if (Mission_music[SCORE_FICTION_VIEWER] != Mission_music[SCORE_BRIEFING])
common_music_close();
game_flush();
Fiction_viewer_inited = 0;
}
开发者ID:DahBlount,项目名称:Freespace-Open-Swifty,代码行数:28,代码来源:fictionviewer.cpp
示例10: shockwave_level_close
// ------------------------------------------------------------------------------------
// shockwave_level_close()
//
// Call at the close of each level (mission)
//
void shockwave_level_close()
{
if ( !Shockwave_inited )
return;
shockwave_delete_all();
uint i;
// unload default shockwave, and erase all others
for (i = 0; i < Shockwave_info.size(); i++) {
if ( !i ) {
if (Shockwave_info[i].bitmap_id >= 0)
bm_unload( Shockwave_info[i].bitmap_id );
else if (Shockwave_info[i].model_id >= 0)
model_page_out_textures( Shockwave_info[i].model_id );
continue;
}
if (Shockwave_info[i].bitmap_id >= 0)
bm_release( Shockwave_info[i].bitmap_id );
if (Shockwave_info[i].model_id >= 0)
model_unload( Shockwave_info[i].model_id );
Shockwave_info.erase( Shockwave_info.begin() + i );
}
Shockwave_inited = 0;
}
开发者ID:svn2github,项目名称:FS2Open_Trunk,代码行数:36,代码来源:shockwave.cpp
示例11: neb2_level_close
// shutdown nebula stuff
void neb2_level_close()
{
int idx;
// standalone servers can bail here
if (Game_mode & GM_STANDALONE_SERVER) {
return;
}
// if the mission is not a fullneb mission, skip
if ( !((The_mission.flags[Mission::Mission_Flags::Fullneb]) || Nebula_sexp_used) ) {
return;
}
// unload all nebula bitmaps
for (idx=0; idx<Neb2_poof_count; idx++) {
if (Neb2_poofs[idx] >= 0) {
bm_release(Neb2_poofs[idx]);
Neb2_poofs[idx] = -1;
}
}
// unflag the mission as being fullneb so stuff doesn't fog in the techdata room :D
The_mission.flags.remove(Mission::Mission_Flags::Fullneb);
if (Neb2_htl_fog_data) {
delete[] Neb2_htl_fog_data;
Neb2_htl_fog_data = NULL;
}
}
开发者ID:Kobrar,项目名称:fs2open.github.com,代码行数:31,代码来源:neb.cpp
示例12: cutscenes_screen_close
void cutscenes_screen_close()
{
if (Background_bitmap)
bm_release(Background_bitmap);
Ui_window.destroy();
}
开发者ID:n-kawamt,项目名称:fs2open_snapshot,代码行数:7,代码来源:cutscenes.cpp
示例13: cmd_brief_close
void cmd_brief_close()
{
int i;
if (Cmd_brief_inited) {
cmd_brief_stop_anim();
generic_anim_unload(&Cur_Anim);
for (i=0; i<Cur_cmd_brief->num_stages; i++) {
if (Cur_cmd_brief->stage[i].wave >= 0)
audiostream_close_file(Cur_cmd_brief->stage[i].wave, 0);
}
// so that the same ani will reload properly upon return
Cur_anim_filename = "~~~~";
if (Cmd_brief_background_bitmap >= 0)
bm_release(Cmd_brief_background_bitmap);
// unload the overlay bitmap
help_overlay_unload(CMD_BRIEF_OVERLAY);
Ui_window.destroy();
game_flush();
Cmd_brief_inited = 0;
}
// Stop any speech from running over
fsspeech_stop();
}
开发者ID:achilleas-k,项目名称:fs2open.github.com,代码行数:31,代码来源:missioncmdbrief.cpp
示例14: loop_brief_close
// close
void loop_brief_close()
{
// this makes sure that we're all cool no matter how the user decides to exit
mission_campaign_mission_over();
// free the bitmap
if (Loop_brief_bitmap >= 0){
bm_release(Loop_brief_bitmap);
}
Loop_brief_bitmap = -1;
// destroy the window
Loop_brief_window.destroy();
if (Loop_anim.num_frames > 0)
{
generic_anim_unload(&Loop_anim);
}
// stop voice
if(Loop_sound != -1){
audiostream_stop(Loop_sound, 1, 0);
audiostream_close_file(Loop_sound, 1);
Loop_sound = -1;
}
fsspeech_stop();
// stop music
common_music_close();
}
开发者ID:Admiral-MS,项目名称:fs2open.github.com,代码行数:32,代码来源:missionloopbrief.cpp
示例15: bm_release
void UI_DOT_SLIDER::destroy()
{
// release ani frames for the dots.
bm_release(first_frame);
UI_GADGET::destroy();
}
开发者ID:DahBlount,项目名称:Freespace-Open-Swifty,代码行数:7,代码来源:slider.cpp
示例16: credits_close
void credits_close()
{
int i;
/*
if (CreditsWin01 != -1){
bm_unload(CreditsWin01);
CreditsWin01 = -1;
}
if (CreditsWin02 != -1){
bm_unload(CreditsWin02);
CreditsWin02 = -1;
}
if (CreditsWin03 != -1){
bm_unload(CreditsWin03);
CreditsWin03 = -1;
}
if (CreditsWin04 != -1){
bm_unload(CreditsWin04);
CreditsWin04 = -1;
}
*/
for (i=0; i<NUM_IMAGES; i++){
if (Credits_bmps[i] >= 0){
bm_release(Credits_bmps[i]);
Credits_bmps[i] = -1;
}
}
credits_stop_music();
if (Credit_text) {
if (Credit_text_malloced){
vm_free(Credit_text);
}
Credit_text = NULL;
}
if (Background_bitmap){
bm_release(Background_bitmap);
}
Ui_window.destroy();
common_free_interface_palette(); // restore game palette
}
开发者ID:svn2github,项目名称:FS2Open_Trunk,代码行数:47,代码来源:credits.cpp
示例17:
subtitle::~subtitle()
{
if (image_id != -1) {
if ( bm_release(image_id) ) {
image_id = -1;
}
}
}
开发者ID:Esarai,项目名称:fs2open.github.com,代码行数:8,代码来源:camera.cpp
示例18: mission_hotkey_close
// ---------------------------------------------------------------------
// mission_hotkey_close()
//
// Cleanup the hotkey assignment screen system. Called when GS_STATE_HOTKEY_SCREEN
// is left.
//
void mission_hotkey_close()
{
if (Background_bitmap)
bm_release(Background_bitmap);
if (Wing_bmp >= 0)
bm_release(Wing_bmp);
// unpause all weapon sounds
weapon_unpause_sounds();
// unpause all game music
audiostream_unpause_all();
Ui_window.destroy();
common_free_interface_palette(); // restore game palette
game_flush();
}
开发者ID:PhantomHoover,项目名称:fs2open.github.com,代码行数:23,代码来源:missionhotkey.cpp
示例19: mission_show_goals_close
// cleanup called when exiting the show goals screen
void mission_show_goals_close()
{
if (Goals_screen_bg_bitmap >= 0)
bm_release(Goals_screen_bg_bitmap);
if (Goal_complete_bitmap)
bm_release(Goal_complete_bitmap);
if (Goal_incomplete_bitmap)
bm_release(Goal_incomplete_bitmap);
if (Goal_failed_bitmap)
bm_release(Goal_failed_bitmap);
Goals_screen_ui_window.destroy();
common_free_interface_palette(); // restore game palette
game_flush();
}
开发者ID:Admiral-MS,项目名称:fs2open.github.com,代码行数:19,代码来源:missiongoals.cpp
示例20: techroom_close
void techroom_close()
{
fsspeech_stop();
techroom_lists_reset();
Techroom_show_all = 0;
if (Tech_background_bitmap) {
bm_release(Tech_background_bitmap);
}
Ui_window.destroy();
common_free_interface_palette(); // restore game palette
if (Palette_bmp){
bm_release(Palette_bmp);
}
}
开发者ID:RandomTiger,项目名称:fs2open.github.com,代码行数:18,代码来源:techmenu.cpp
注:本文中的bm_release函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论