| 2000 | theApp.resume(); |
| 2001 | } |
| 2002 | |
| 2003 | void CMainFrame::OnImportBitmap() { |
| 2004 | char filename[200]; |
| 2005 | int bm_handle, anim = 0; |
| 2006 | |
| 2007 | CString filter = |
| 2008 | "Descent III files (*.tga,*.bbm,*.lbm,*.ogf,*.oaf,*.ilf,*.pcx)|*.pcx;*.tga;*.bbm;*.lbm;*.ogf;*.oaf;*.ifl||"; |
| 2009 | |
| 2010 | if (!OpenFileDialog(this, (LPCSTR)filter, filename, Current_bitmap_dir, sizeof(Current_bitmap_dir))) |
| 2011 | return; |
| 2012 | |
| 2013 | // Okay, we selected a file. Lets do what needs to be done here. |
| 2014 | bm_handle = LoadTextureImage(filename, &anim, NOT_TEXTURE, 0); |
| 2015 | |
| 2016 | if (bm_handle < 0) { |
| 2017 | OutrageMessageBox("Couldn't open that bitmap/anim file."); |
| 2018 | return; |
| 2019 | } |
| 2020 | |
| 2021 | mprintf(0, "Making a copy of this bitmap/anim locally...\n"); |
| 2022 | |
| 2023 | if (!anim) { |
| 2024 | sprintf(filename, "%s\\%s", LocalManageGraphicsDir.u8string().c_str(), GameBitmaps[bm_handle].name); |
| 2025 | bm_SaveFileBitmap(filename, bm_handle); |
| 2026 | bm_FreeBitmap(bm_handle); |
| 2027 | } else { |
| 2028 | sprintf(filename, "%s\\%s", LocalManageGraphicsDir.u8string().c_str(), GameVClips[bm_handle].name); |
| 2029 | SaveVClip(filename, bm_handle); |
| 2030 | FreeVClip(bm_handle); |
| 2031 | } |
| 2032 | |
| 2033 | OutrageMessageBox("Image(s) imported!"); |
| 2034 | } |
| 2035 | |
| 2036 | void CMainFrame::OnSubeditorsHogmaker() { |
nothing calls this directly
no test coverage detected