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

Method DestroyWindow

editor/ProceduralDialog.cpp:273–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273BOOL CProceduralDialog::DestroyWindow() {
274 CWnd::KillTimer(1);
275 int n = D3EditState.texdlg_texture;
276
277 int save_num = 0;
278
279 // Restore our static proc elements
280 save_num = GameTextures[n].procedural->num_static_elements;
281
282 if (save_num > 0)
283 memcpy(save_elements, GameTextures[n].procedural->static_proc_elements, save_num * sizeof(static_proc_element));
284
285 FreeStaticProceduralsForTexture(n);
286 Sleep(2000);
287
288 if (save_num > 0) {
289 AllocateStaticProceduralsForTexture(n, save_num);
290 memcpy(GameTextures[n].procedural->static_proc_elements, save_elements, save_num * sizeof(static_proc_element));
291 GameTextures[n].procedural->num_static_elements = save_num;
292 } else
293 GameTextures[n].flags &= ~(TF_PROCEDURAL | TF_WATER_PROCEDURAL);
294
295 bm_FreeBitmap(m_palette_bitmap);
296 m_PaletteSurf.free();
297
298 bm_FreeBitmap(m_window_bitmap);
299 m_TextureSurf.free();
300
301 return CDialog::DestroyWindow();
302}
303
304void CProceduralDialog::OnLButtonDown(UINT nFlags, CPoint point) {
305 // TODO: Add your message handler code here and/or call default

Callers

nothing calls this directly

Calls 5

bm_FreeBitmapFunction · 0.85
SleepFunction · 0.50
freeMethod · 0.45

Tested by

no test coverage detected