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

Function RenderScreen

Descent3/TelComEffects.cpp:533–558  ·  view source on GitHub ↗

Renders a Monitor

Source from the content-addressed store, hash-verified

531
532// Renders a Monitor
533void RenderScreen(int screen, tTelComInfo *tsys, float Frametime) {
534 ASSERT(screen >= -1 && screen < MAX_TELCOM_SCREENS);
535
536 int node = Screen_roots[screen];
537 tceffect *tce;
538
539 int count = 0;
540 int x, y;
541
542 while (node != -1) {
543 tce = &TCEffects[node];
544 x = tsys->Monitor_coords[tce->monitor].left;
545 y = tsys->Monitor_coords[tce->monitor].top;
546
547 if (tce->start_time <= 0) {
548 RenderEffect(tce, Frametime, x, y, true);
549 count++;
550 } else {
551 RenderEffect(tce, Frametime, x, y, false);
552 tce->start_time -= Frametime;
553 }
554
555 node = TCEffects[node].next;
556 }
557 // mprintf(0,"Effect Count: %d effects\n",count);
558}
559
560// Renders an effect
561void RenderEffect(tceffect *tce, float frametime, int xoff, int yoff, bool ok_to_render) {

Callers 1

TelcomRenderScreenFunction · 0.85

Calls 1

RenderEffectFunction · 0.85

Tested by

no test coverage detected