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

Method UpdateProcView

editor/ProceduralDialog.cpp:224–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222}
223
224void CProceduralDialog::UpdateProcView() {
225 int n = D3EditState.texdlg_texture;
226
227 FrameCount++;
228
229 CWnd *texwnd;
230 RECT rect;
231
232 texwnd = GetDlgItem(IDC_PROCEDURAL_VIEW);
233 texwnd->GetWindowRect(&rect);
234 ScreenToClient(&rect);
235
236 int w = rect.right - rect.left;
237 int h = rect.bottom - rect.top;
238
239 Desktop_surf->attach_to_window((unsigned)m_hWnd);
240
241 int bm_handle = GetTextureBitmap(n, 0, 1);
242
243 if (GameBitmaps[bm_handle].flags & BF_MIPMAPPED)
244 GameBitmaps[m_window_bitmap].flags |= BF_MIPMAPPED;
245
246 bm_ScaleBitmapToBitmap(m_window_bitmap, bm_handle);
247
248 m_TextureSurf.load(m_window_bitmap);
249
250 int x = rect.left + ((rect.right - rect.left) / 2) - m_TextureSurf.width() / 2;
251 int y = rect.top + ((rect.bottom - rect.top) / 2) - m_TextureSurf.height() / 2;
252
253 Desktop_surf->blt(x, y, &m_TextureSurf);
254
255 // Do slider values
256 m_frequency = 255 - m_freq_slider.GetPos();
257 m_speed = m_speed_slider.GetPos();
258 m_size = m_size_slider.GetPos();
259
260 GameTextures[n].procedural->heat = m_heat_slider.GetPos();
261
262 PrintValue(IDC_SPEED_TEXT, m_speed);
263 PrintValue(IDC_SIZE_TEXT2, m_size);
264 PrintValue(IDC_FREQUENCY_TEXT, 255 - m_frequency);
265 PrintValue(IDC_HEAT_TEXT, GameTextures[n].procedural->heat);
266}
267
268void CProceduralDialog::OnTimer(UINT nIDEvent) {
269 UpdateProcView();

Callers

nothing calls this directly

Calls 8

GetTextureBitmapFunction · 0.85
bm_ScaleBitmapToBitmapFunction · 0.85
attach_to_windowMethod · 0.80
loadMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45
bltMethod · 0.45
GetPosMethod · 0.45

Tested by

no test coverage detected