MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnSaveAsTga

Method OnSaveAsTga

editor/WorldTexturesDialog.cpp:2112–2131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2110}
2111
2112void 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
2133void CWorldTexturesDialog::DrawSwatch(int handle, float r, float g, float b) {
2134 CWnd *texwnd;

Callers

nothing calls this directly

Calls 2

OutrageMessageBoxFunction · 0.85
SaveFileDialogFunction · 0.85

Tested by

no test coverage detected