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

Function EfxDestroyScreen

Descent3/TelComEffects.cpp:198–218  ·  view source on GitHub ↗

Destroys the screens within a monitor

Source from the content-addressed store, hash-verified

196
197// Destroys the screens within a monitor
198void EfxDestroyScreen(int screen) {
199 ASSERT(screen >= 0 && screen < MAX_TELCOM_SCREENS);
200 int node = Screen_roots[screen];
201 tceffect *tce;
202 while (node != -1) {
203 tce = &TCEffects[node];
204 node = TCEffects[node].next;
205
206 EfxFreeEffect(tce);
207 tce->type = EFX_NONE;
208 tce->monitor = -1;
209 tce->screen = -1;
210 tce->prev = tce->next = -1;
211 tce->id = INVALID_EFFECT_ID;
212 tce->text_buffer = NULL;
213 for (int j = 0; j < MAX_EFFECT_EVENTS; j++)
214 tce->event_queue[j].id = -1;
215 }
216 Screen_roots[screen] = -1;
217 Screen_has_effect_with_focus[screen] = false;
218}
219
220// Creates an instance of an Effect
221int EfxCreate(int type, int monitor, int screen, int id, bool is_tab_stop) {

Callers 2

DestroyAllScreensFunction · 0.85
TelcomStartScreenFunction · 0.85

Calls 1

EfxFreeEffectFunction · 0.85

Tested by

no test coverage detected