| 2045 | } |
| 2046 | |
| 2047 | void CBriefEdit::UpdateView(void) { |
| 2048 | CWnd *objwnd; |
| 2049 | RECT rect; |
| 2050 | int x, y, w, h; |
| 2051 | |
| 2052 | objwnd = GetDlgItem(IDC_BRIEF_PICTURE); |
| 2053 | objwnd->GetWindowRect(&rect); |
| 2054 | ScreenToClient(&rect); |
| 2055 | |
| 2056 | if (layout_bmp > BAD_BITMAP_HANDLE) { |
| 2057 | bmw = bm_w(layout_bmp, 0); |
| 2058 | bmh = bm_h(layout_bmp, 0); |
| 2059 | } else { |
| 2060 | bmw = 640; |
| 2061 | bmh = 480; |
| 2062 | } |
| 2063 | |
| 2064 | static float age = 0; |
| 2065 | static bool on = false; |
| 2066 | static float last_time = 0; |
| 2067 | |
| 2068 | float t = timer_GetTime(); |
| 2069 | float frametime = t - last_time; |
| 2070 | last_time = t; |
| 2071 | |
| 2072 | age += frametime; |
| 2073 | |
| 2074 | if (age > 0.5) { |
| 2075 | on = !on; |
| 2076 | age = 0; |
| 2077 | } |
| 2078 | |
| 2079 | rend_StartFrame(0, 0, bmw, bmh); |
| 2080 | |
| 2081 | Desktop_surf->attach_to_window((unsigned)m_hWnd); |
| 2082 | |
| 2083 | w = rect.right - rect.left; |
| 2084 | h = rect.bottom - rect.top; |
| 2085 | |
| 2086 | static bool first_call = true; |
| 2087 | |
| 2088 | if (first_call) |
| 2089 | Desktop_surf->clear(rect.left, rect.top, w, h); |
| 2090 | |
| 2091 | m_ObjectSurf.create(bmw, bmh, BPP_16); |
| 2092 | |
| 2093 | if (layout_bmp > BAD_BITMAP_HANDLE) { |
| 2094 | m_ObjectSurf.load(layout_bmp); |
| 2095 | } else |
| 2096 | Desktop_surf->clear(rect.left, rect.top, w, h); |
| 2097 | |
| 2098 | grViewport *vport = new grViewport(&m_ObjectSurf); |
| 2099 | vport->lock(); |
| 2100 | |
| 2101 | // now we need to go through all the effects in the screen and draw a rep of em |
| 2102 | int curr_screen, curr_effect; |
| 2103 | int node; |
| 2104 | tBriefEffect *effects; |
nothing calls this directly
no test coverage detected