| 271 | } |
| 272 | |
| 273 | BOOL 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 | |
| 304 | void CProceduralDialog::OnLButtonDown(UINT nFlags, CPoint point) { |
| 305 | // TODO: Add your message handler code here and/or call default |
nothing calls this directly
no test coverage detected