| 83 | |
| 84 | static static_proc_element save_elements[8000]; |
| 85 | BOOL CWaterProceduralDialog::DestroyWindow() { |
| 86 | // TODO: Add your specialized code here and/or call the base class |
| 87 | CWnd::KillTimer(1); |
| 88 | |
| 89 | int n = D3EditState.texdlg_texture; |
| 90 | |
| 91 | int save_num = 0; |
| 92 | |
| 93 | // Restore our static proc elements |
| 94 | save_num = GameTextures[n].procedural->num_static_elements; |
| 95 | |
| 96 | if (save_num > 0) |
| 97 | memcpy(save_elements, GameTextures[n].procedural->static_proc_elements, save_num * sizeof(static_proc_element)); |
| 98 | |
| 99 | FreeStaticProceduralsForTexture(n); |
| 100 | Sleep(2000); |
| 101 | |
| 102 | if (save_num > 0) { |
| 103 | AllocateStaticProceduralsForTexture(n, save_num); |
| 104 | memcpy(GameTextures[n].procedural->static_proc_elements, save_elements, save_num * sizeof(static_proc_element)); |
| 105 | GameTextures[n].procedural->num_static_elements = save_num; |
| 106 | } else { |
| 107 | GameTextures[n].flags &= ~(TF_PROCEDURAL | TF_WATER_PROCEDURAL); |
| 108 | } |
| 109 | |
| 110 | bm_FreeBitmap(m_window_bitmap); |
| 111 | m_TextureSurf.free(); |
| 112 | |
| 113 | return CDialog::DestroyWindow(); |
| 114 | } |
| 115 | |
| 116 | void CWaterProceduralDialog::PrintValue(int whichbox, uint8_t val) { |
| 117 | CEdit *ebox; |
nothing calls this directly
no test coverage detected