inline void clearLocal(void) /* * Clear the local map (intelligently rather than just simply wiping * the map). */ { if (W_FastClear) { W_ClearWindow(w); clearcount = 0; clearlcount = 0; } else { #ifndef WIN32 while (clearcount) { clearcount--; /* XFIX */ W_CacheClearArea(w, clearzone[0][clearcount], clearzone[1][clearcount], clearzone[2][clearcount], clearzone[3][clearcount]); /* W_ClearArea(w, clearzone[0][clearcount], * * * clearzone[1][clearcount], clearzone[2][clearcount], * * * clearzone[3][clearcount]); */ } while (clearlcount) { clearlcount--; /* XFIX */ W_CacheLine(w, clearline[0][clearlcount], clearline[1][clearlcount], clearline[2][clearlcount], clearline[3][clearlcount], backColor); /* W_MakeLine(w, clearline[0][clearlcount], * * * clearline[1][clearlcount], clearline[2][clearlcount], * * * clearline[3][clearlcount], backColor); */ } /* XFIX */ W_FlushClearAreaCache(w); W_FlushLineCaches(w); #else // Much more efficient way of clearing -- X programmers take note! W_ClearAreas(w, clearzone[0], clearzone[1], clearzone[2], clearzone[3], clearcount); clearcount = 0; if (tpline != -1) { /* Fixup for SAC's integer linedraw */ W_MakeTractLine(w, clearline[0][tpline], clearline[1][tpline], clearline[2][tpline], clearline[3][tpline], backColor); W_MakeTractLine(w, clearline[0][tpline + 1], clearline[1][tpline + 1], clearline[2][tpline + 1], clearline[3][tpline + 1], backColor); tpline = -1; } W_MakeLines(w, clearline[0], clearline[1], clearline[2], clearline[3], clearlcount, backColor); clearlcount = 0; #endif } }
void redraw(void) { /* erase warning line if necessary */ if ((warntimer <= udcounter && hwarncount <= udcounter) && (warncount || hwarncount)) { W_ClearWindow(warnw); } if (warntimer <= udcounter && warncount) { W_MaskText(w, center - (warncount / 2) * W_Textwidth, winside - W_Textheight - HUD_Y, backColor, warningbuf, warncount, W_RegularFont); warncount = 0; } if (hwarntimer <= udcounter && hwarncount) { W_MaskText(w, center - (hwarncount / 2) * W_Textwidth, HUD_Y, backColor, hwarningbuf, hwarncount, W_BoldFont); hwarncount = 0; } if(W_IsBuffered(w)) { /* buffered, clear the entire buffer [BDyess] */ W_ClearBuffer(w); clearcount = 0; clearlcount = 0; tractcurrent = tracthead; } else { if (W_FastClear) { W_ClearWindow(w); clearcount = 0; clearlcount = 0; tractcurrent = tracthead; } else { while (clearcount) { clearcount--; /* XFIX */ W_CacheClearArea(w, clearzone[clearcount].x, clearzone[clearcount].y, clearzone[clearcount].width, clearzone[clearcount].height); } while (clearlcount) { clearlcount--; /* XFIX */ W_CacheLine(w, clearline[0][clearlcount], clearline[1][clearlcount], clearline[2][clearlcount], clearline[3][clearlcount], backColor); } /* XFIX */ W_FlushClearAreaCache(w); W_FlushLineCaches(w); /* erase the tractor lines [BDyess] */ for (tractrunner = tracthead; tractrunner != tractcurrent; tractrunner = tractrunner->next) { W_MakeTractLine(w, tractrunner->sx, tractrunner->sy, tractrunner->d1x, tractrunner->d1y, backColor); W_MakeTractLine(w, tractrunner->sx, tractrunner->sy, tractrunner->d2x, tractrunner->d2y, backColor); } tractcurrent = tracthead; } } local(); /* redraw local window */ /* XFIX */ W_FlushLineCaches(w); stline(0); /* draw dashboard [BDyess] */ /* flush buffers [BDyess] */ W_DisplayBuffer(tstatw); /* dashboard [BDyess] */ W_DisplayBuffer(w); /* local [BDyess] */ /* would do it in W_EventsPending, just have it here so the display is updated sooner. */ W_Flush(); if (W_IsMapped(statwin)) { updateStats(); } if (W_IsMapped(newstatwin)) { updateNewStats(); } updateInform(); /* check and update info window [BDyess] */ /* XFIX: last since its least accurate information */ if (mapmode) { map(); /* write the buffered data, if any [BDyess] */ W_DisplayBuffer(mapw); } }
redraw() { /* erase warning line if necessary */ if ((warntimer <= udcounter) && (warncount > 0)) { W_ClearArea(warnw, 5, 5, W_Textwidth * warncount, W_Textheight, backColor); warncount = 0; } if (W_FastClear) { W_ClearWindow(w); clearcount=0; clearlcount=0; } else { /* TSH 2/10/93 */ while (clearcount) { clearcount--; W_CacheClearArea(w, clearzone[0][clearcount], clearzone[1][clearcount], clearzone[2][clearcount], clearzone[3][clearcount]); } while (clearlcount) { clearlcount--; W_CacheLine(w, clearline[0][clearlcount], clearline[1][clearlcount], clearline[2][clearlcount], clearline[3][clearlcount], backColor); } W_FlushClearAreaCache(w); W_FlushLineCaches(w); while (mclearlcount){ mclearlcount--; W_CacheLine(mapw, mclearline[0][mclearlcount], mclearline[1][mclearlcount], mclearline[2][mclearlcount], mclearline[3][mclearlcount], backColor); } while (mclearpcount){ mclearpcount--; W_CachePoint(mapw, mclearpoint[0][mclearpcount], mclearpoint[1][mclearpcount], backColor); } W_FlushLineCaches(mapw); W_FlushPointCaches(mapw); } local(); /* redraw local window */ if (mapmode) map(); if (W_IsMapped(statwin)){ updateStats(); } /* need a status line but we'll make do with the bottom of the local display for now */ if(runclock) run_clock(1); /* isae */ if(record) show_record(1); if(playback) show_playback(1); if(playback && extracting) show_extracting(extracting); /* 7/27/93 BM */ /* W_Flush(); */ }