| 2110 | } |
| 2111 | |
| 2112 | void CWorldTexturesDialog::OnSaveAsTga() { |
| 2113 | int n = D3EditState.texdlg_texture; |
| 2114 | |
| 2115 | if (GameTextures[n].flags & TF_ANIMATED) { |
| 2116 | OutrageMessageBox("You cannot save an animated texture!"); |
| 2117 | return; |
| 2118 | } |
| 2119 | |
| 2120 | CString filter = "TGA files (*.tga)|*.tga||"; |
| 2121 | char filename[255]; |
| 2122 | if (!SaveFileDialog(this, (LPCSTR)filter, filename, Current_bitmap_dir, sizeof(Current_bitmap_dir))) |
| 2123 | return; |
| 2124 | |
| 2125 | if (!strchr(filename, '.')) |
| 2126 | strcat(filename, ".tga"); |
| 2127 | |
| 2128 | // FIXME: Save as PNG |
| 2129 | // bm_SaveBitmapTGA (filename,GameTextures[n].bm_handle); |
| 2130 | OutrageMessageBox("TGA saved!"); |
| 2131 | } |
| 2132 | |
| 2133 | void CWorldTexturesDialog::DrawSwatch(int handle, float r, float g, float b) { |
| 2134 | CWnd *texwnd; |
nothing calls this directly
no test coverage detected