static void HUlib_eraseMBg(hu_mtext_t* m) { // killough 11/98: trick to shadow variables int x = viewwindowx, y = viewwindowy; int viewwindowx = x >> hires, viewwindowy = y >> hires; // killough 11/98 // Only erases when NOT in automap and the screen is reduced, // and the text must either need updating or refreshing // (because of a recent change back from the automap) if (!automapactive && viewwindowx) { int yoffset, lh = SwapShort(m->l[0].f[0]->height) + 1; for (y = m->y, yoffset = y * SCREENWIDTH; y < m->y + lh * (hud_msg_lines + 2); y++, yoffset += SCREENWIDTH) if (y < viewwindowy || y >= viewwindowy + scaledviewheight) // killough 11/98 R_VideoErase(yoffset, SCREENWIDTH); // erase entire line else { // erase left border R_VideoErase(yoffset, viewwindowx); // erase right border R_VideoErase(yoffset + viewwindowx + scaledviewwidth, viewwindowx); // killough 11/98 } } }
// sorta called by HU_Erase and just better darn get things straight void HUlib_eraseTextLine(hu_textline_t* l) { int lh; int y; int yoffset; // Only erases when NOT in automap and the screen is reduced, // and the text must either need updating or refreshing // (because of a recent change back from the automap) if (!automapactive && viewwindowx && l->needsupdate) { lh = SHORT(l->f[0]->height) + 1; for (y=l->y,yoffset=y*SCREENWIDTH ; y<l->y+lh ; y++,yoffset+=SCREENWIDTH) { if (y < viewwindowy || y >= viewwindowy + viewheight) R_VideoErase(yoffset, SCREENWIDTH); // erase entire line else { R_VideoErase(yoffset, viewwindowx); // erase left border R_VideoErase(yoffset + viewwindowx + viewwidth, viewwindowx); // erase right border } } } if (l->needsupdate) l->needsupdate--; }
void HUlib_eraseTextLine(hu_textline_t* l) { // killough 11/98: trick to shadow variables int x = viewwindowx, y = viewwindowy; int viewwindowx = x >> hires, viewwindowy = y >> hires; // killough 11/98 // Only erases when NOT in automap and the screen is reduced, // and the text must either need updating or refreshing // (because of a recent change back from the automap) if (!automapactive && viewwindowx && l->needsupdate) { int yoffset, lh = SwapShort(l->f[0]->height) + 1; for (y = l->y, yoffset = y * SCREENWIDTH ; y < l->y + lh ; y++, yoffset += SCREENWIDTH) if (y < viewwindowy || y >= viewwindowy + scaledviewheight) // killough 11/98: R_VideoErase(yoffset, SCREENWIDTH); // erase entire line else { // erase left border R_VideoErase(yoffset, viewwindowx); // erase right border R_VideoErase(yoffset + viewwindowx + scaledviewwidth, viewwindowx); // killough 11/98 } } if (l->needsupdate) l->needsupdate--; }
// // HUlib_eraseMBg() // // Erases background behind hu_mtext_t widget, when the screen is not fullsize // // Passed a hu_mtext_t // Returns nothing // static void HUlib_eraseMBg(hu_mtext_t* m) { int lh; int y; // Only erases when NOT in automap and the screen is reduced, // and the text must either need updating or refreshing // (because of a recent change back from the automap) if (!(automapmode & am_active) && viewwindowx) { lh = m->l[0].f[0].height + 1; for (y=m->y; y<m->y+lh*(hud_msg_lines+2) ; y++) { if (y < viewwindowy || y >= viewwindowy + viewheight) R_VideoErase(0, y, SCREENWIDTH); // erase entire line else { // erase left border R_VideoErase(0, y, viewwindowx); // erase right border R_VideoErase(viewwindowx + viewwidth, y, viewwindowx); } } } }
// // HUlib_eraseTextLine() // // Erases a hu_textline_t widget when screen border is behind text // Sorta called by HU_Erase and just better darn get things straight // // Passed the hu_textline_t // Returns nothing // void HUlib_eraseTextLine(hu_textline_t* l) { int lh; int y; // Only erases when NOT in automap and the screen is reduced, // and the text must either need updating or refreshing // (because of a recent change back from the automap) if (!(automapmode & am_active) && viewwindowx && l->needsupdate) { lh = l->f[0].height + 1; for (y=l->y; y<l->y+lh ; y++) { if (y < viewwindowy || y >= viewwindowy + viewheight) R_VideoErase(0, y, SCREENWIDTH); // erase entire line else { // erase left border R_VideoErase(0, y, viewwindowx); // erase right border R_VideoErase(viewwindowx + viewwidth, y, viewwindowx); } } } if (l->needsupdate) l->needsupdate--; }
void HU_FragsErase() { int i; if(!deathmatch) return; for(i=FRAGSY; i<SCREENHEIGHT-ST_HEIGHT; i++) R_VideoErase(i*SCREENWIDTH, SCREENWIDTH); }
// sorta called by HU_Erase and just better darn get things straight void HUlib_eraseTextLine(hu_textline_t* l) { int lh; int y; int yoffset; // Only erases when NOT in automap and the screen is reduced, // and the text must either need updating or refreshing // (because of a recent change back from the automap) if (!automapactive && viewwindowx && l->needsupdate) { /* lh = SHORT(l->f[0]->height) + 1; // CHANGED FOR HIRES for (y=l->y,yoffset=y*SCREENWIDTH ; y<l->y+lh ; y++,yoffset+=SCREENWIDTH) // CHANGED FOR HIRES for (y=l->y,yoffset=y*(SCREENWIDTH << hires) ; y<l->y+lh ; y++,yoffset+=SCREENWIDTH) // CHANGED FOR HIRES */ lh = (SHORT(l->f[0]->height) + 1) << hires; // CHANGED FOR HIRES for (y=(l->y << hires),yoffset=y*SCREENWIDTH ; y<(l->y << hires)+lh ; y++,yoffset+=SCREENWIDTH) // CHANGED FOR HIRES { /* if (y < viewwindowy || y >= viewwindowy + viewheight) // CHANGED FOR HIRES if (y < (viewwindowy >> hires) || y >= (viewwindowy >> hires) + (scaledviewheight >> hires)) // CHANGED FOR HIRES */ if (y < viewwindowy || y >= viewwindowy + scaledviewheight) // CHANGED FOR HIRES R_VideoErase(yoffset, SCREENWIDTH); // erase entire line else { R_VideoErase(yoffset, viewwindowx); // erase left border // R_VideoErase(yoffset + viewwindowx + viewwidth, viewwindowx); // CHANGED FOR HIRES R_VideoErase(yoffset + viewwindowx + scaledviewwidth, viewwindowx); // CHANGED FOR HIRES // erase right border } } } if (l->needsupdate) l->needsupdate--; }
void R_DrawViewBorder(void) { int top, side, i; if (V_GetMode() == VID_MODEGL) { // proff 11/99: we don't have a backscreen in OpenGL from where we can copy this R_FillBackScreen(); return; } // e6y: wide-res if ((wide_ratio || wide_offsety) && ((SCREENHEIGHT != viewheight) || ((automapmode & am_active) && ! (automapmode & am_overlay)))) { for (i = (SCREENHEIGHT - ST_SCALED_HEIGHT); i < SCREENHEIGHT; i++) { R_VideoErase (0, i, wide_offsetx); R_VideoErase (SCREENWIDTH - wide_offsetx, i, wide_offsetx); } } if ( viewheight >= ( SCREENHEIGHT - ST_SCALED_HEIGHT )) return; // if high-res, don´t go any further! top = ((SCREENHEIGHT-ST_SCALED_HEIGHT)-viewheight)/2; side = (SCREENWIDTH-scaledviewwidth)/2; // copy top for (i = 0; i < top; i++) R_VideoErase (0, i, SCREENWIDTH); // copy sides for (i = top; i < (top+viewheight); i++) { R_VideoErase (0, i, side); R_VideoErase (viewwidth+side, i, side); } // copy bottom for (i = top+viewheight; i < (SCREENHEIGHT - ST_SCALED_HEIGHT); i++) R_VideoErase (0, i, SCREENWIDTH); }