diff --git a/src/am_map.c b/src/am_map.c index 93230c9b..94fe74e0 100644 --- a/src/am_map.c +++ b/src/am_map.c @@ -74,8 +74,6 @@ int map_smooth_lines; // PLAYERRADIUS macro can't be used in this implementation. #define MAPPLAYERRADIUS (16*(1<= f_x && fx < f_w - w && fy >= f_y && fy < f_h - h) - V_DrawPatch((fx >> hires) - WIDESCREENDELTA, fy >> hires, FB, marknums[d]); + V_DrawPatch((fx >> hires) - WIDESCREENDELTA, fy >> hires, marknums[d]); fx -= w - (1<>hires); V_DrawPatchDirect(x + (scaledviewwidth - SHORT(patch->width)) / 2 - WIDESCREENDELTA, - y, 0, patch); + y, patch); } // menus go directly to the screen @@ -413,12 +413,12 @@ void D_PageDrawer(void) unsigned c = 0; while (s--) c = c*3 + t[s]; - V_DrawPatchFullScreen(0, (patch_t *) t); + V_DrawPatchFullScreen((patch_t *) t); if (c==2119826587u || c==2391756584u) // [FG] removed the embedded DOGOVRLY title pic overlay graphic lump if (W_CheckNumForName("DOGOVRLY") > 0) { - V_DrawPatch(0, 0, 0, W_CacheLumpName("DOGOVRLY", PU_CACHE)); + V_DrawPatch(0, 0, W_CacheLumpName("DOGOVRLY", PU_CACHE)); } } else diff --git a/src/doomtype.h b/src/doomtype.h index 2cc5bdb9..4d356c61 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -26,16 +26,10 @@ #include "config.h" -#ifndef __BYTEBOOL__ -#define __BYTEBOOL__ -// Fixed to use builtin bool type with C++. -#ifdef __cplusplus -typedef bool boolean; -#else typedef enum {false, true} boolean; -#endif -typedef unsigned char byte; -#endif + +typedef uint8_t byte; +typedef uint8_t pixel_t; // haleyjd: resolve platform-specific range symbol issues diff --git a/src/f_finale.c b/src/f_finale.c index 2ad3867f..b99c0d06 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -378,14 +378,14 @@ void F_TextWrite (void) if (gamemapinfo && W_CheckNumForName(finaleflat) != -1 && (W_CheckNumForName)(finaleflat, ns_flats) == -1) { - V_DrawPatchFullScreen(0, W_CacheLumpName(finaleflat, PU_LEVEL)); + V_DrawPatchFullScreen(W_CacheLumpName(finaleflat, PU_LEVEL)); } else { - // erase the entire screen to a tiled background + // erase the entire screen to a tiled background - // killough 11/98: the background-filling code was already in m_menu.c - R_DrawBackground(finaleflat, screens[0]); + // killough 11/98: the background-filling code was already in m_menu.c + V_DrawBackground(finaleflat); } // draw some of the text onto the screen @@ -428,7 +428,7 @@ void F_TextWrite (void) // [cispy] prevent text from being drawn off-screen vertically if (cy + SHORT(hu_font[c]->height) > SCREENHEIGHT) break; - V_DrawPatch(cx, cy, 0, hu_font[c]); + V_DrawPatch(cx, cy, hu_font[c]); cx+=w; } } @@ -669,7 +669,7 @@ void F_CastPrint (char* text) } w = SHORT (hu_font[c]->width); - V_DrawPatch(cx, 180, 0, hu_font[c]); + V_DrawPatch(cx, 180, hu_font[c]); cx+=w; } } @@ -688,8 +688,7 @@ void F_CastDrawer (void) patch_t* patch; // erase the entire screen to a background - //V_DrawPatch (0,0,0, W_CacheLumpName (bgcastcall, PU_CACHE)); // Ty 03/30/98 bg texture extern - V_DrawPatchFullScreen(0, W_CacheLumpName (bgcastcall, PU_CACHE)); + V_DrawPatchFullScreen (W_CacheLumpName (bgcastcall, PU_CACHE)); // Ty 03/30/98 bg texture extern F_CastPrint (castorder[castnum].name); @@ -701,9 +700,9 @@ void F_CastDrawer (void) patch = W_CacheLumpNum (lump+firstspritelump, PU_CACHE); if (flip) - V_DrawPatchFlipped (160,170,0,patch); + V_DrawPatchFlipped (160, 170, patch); else - V_DrawPatch (160,170,0,patch); + V_DrawPatch (160, 170, patch); } @@ -721,7 +720,7 @@ static void F_DrawPatchCol(int x, patch_t *patch, int col) if (hires) while (column->topdelta != 0xff) { - byte *desttop = screens[0] + x*2; + byte *desttop = I_VideoBuffer + x*2; const byte *source = (byte *) column + 3; byte *dest = desttop + column->topdelta*SCREENWIDTH*4; int count = column->length; @@ -733,7 +732,7 @@ static void F_DrawPatchCol(int x, patch_t *patch, int col) else while (column->topdelta != 0xff) { - byte *desttop = screens[0] + x; + byte *desttop = I_VideoBuffer + x; const byte *source = (byte *) column + 3; byte *dest = desttop + column->topdelta*SCREENWIDTH; int count = column->length; @@ -772,7 +771,7 @@ void F_BunnyScroll (void) if (pillar_width > 0) { // [crispy] fill pillarboxes in widescreen mode - memset(screens[0], 0, (SCREENWIDTH<endpic, PU_CACHE)); + V_DrawPatchFullScreen(W_CacheLumpName(gamemapinfo->endpic, PU_CACHE)); } return; } @@ -868,22 +867,18 @@ void F_Drawer (void) { case 1: if ( gamemode == retail || gamemode == commercial ) - V_DrawPatchFullScreen (0, - W_CacheLumpName("CREDIT",PU_CACHE)); + V_DrawPatchFullScreen (W_CacheLumpName("CREDIT",PU_CACHE)); else - V_DrawPatchFullScreen (0, - W_CacheLumpName("HELP2",PU_CACHE)); + V_DrawPatchFullScreen (W_CacheLumpName("HELP2",PU_CACHE)); break; case 2: - V_DrawPatchFullScreen (0, - W_CacheLumpName("VICTORY2",PU_CACHE)); + V_DrawPatchFullScreen (W_CacheLumpName("VICTORY2",PU_CACHE)); break; case 3: F_BunnyScroll (); break; case 4: - V_DrawPatchFullScreen (0, - W_CacheLumpName("ENDPIC",PU_CACHE)); + V_DrawPatchFullScreen (W_CacheLumpName("ENDPIC",PU_CACHE)); break; } } diff --git a/src/f_wipe.c b/src/f_wipe.c index d5d7abae..641a5379 100644 --- a/src/f_wipe.c +++ b/src/f_wipe.c @@ -152,19 +152,25 @@ static int wipe_doMelt(int width, int height, int ticks) static int wipe_exitMelt(int width, int height, int ticks) { Z_Free(y); + Z_Free(wipe_scr_start); + Z_Free(wipe_scr_end); return 0; } int wipe_StartScreen(int x, int y, int width, int height) { - I_ReadScreen(wipe_scr_start = screens[2]); + int size = (hires ? SCREENWIDTH * SCREENHEIGHT * 4 : SCREENWIDTH * SCREENHEIGHT); + wipe_scr_start = Z_Malloc(size * sizeof(*wipe_scr_start), PU_STATIC, NULL); + I_ReadScreen(wipe_scr_start); return 0; } int wipe_EndScreen(int x, int y, int width, int height) { - I_ReadScreen(wipe_scr_end = screens[3]); - V_DrawBlock(x, y, 0, width, height, wipe_scr_start); // restore start scr. + int size = (hires ? SCREENWIDTH * SCREENHEIGHT * 4 : SCREENWIDTH * SCREENHEIGHT); + wipe_scr_end = Z_Malloc(size * sizeof(*wipe_scr_end), PU_STATIC, NULL); + I_ReadScreen(wipe_scr_end); + V_DrawBlock(x, y, width, height, wipe_scr_start); // restore start scr. return 0; } @@ -188,7 +194,7 @@ int wipe_ScreenWipe(int wipeno, int x, int y, int width, int height, int ticks) if (!go) // initial stuff { go = 1; - wipe_scr = screens[0]; + wipe_scr = I_VideoBuffer; wipes[wipeno*3](width, height, ticks); } if (wipes[wipeno*3+1](width, height, ticks)) // final stuff diff --git a/src/hu_lib.c b/src/hu_lib.c index 25d3b307..5e55b117 100644 --- a/src/hu_lib.c +++ b/src/hu_lib.c @@ -335,7 +335,7 @@ static void draw_line_aligned (const hu_multiline_t *m, const hu_line_t *l, cons break; // killough 1/18/98 -- support multiple lines: - V_DrawPatchTranslated(x, y, 0, p[c-HU_FONTSTART], cr); + V_DrawPatchTranslated(x, y, p[c-HU_FONTSTART], cr); x += w; } else if ((x += f->space_width) >= right_margin) @@ -349,7 +349,7 @@ static void draw_line_aligned (const hu_multiline_t *m, const hu_line_t *l, cons leveltime & 16) { cr = m->cr; //jff 2/17/98 restore original color - V_DrawPatchTranslated(x, y, 0, p['_' - HU_FONTSTART], cr); + V_DrawPatchTranslated(x, y, p['_' - HU_FONTSTART], cr); } } diff --git a/src/hu_stuff.c b/src/hu_stuff.c index c3625943..f4628de8 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1375,7 +1375,7 @@ void HU_DrawCrosshair(void) if (crosshair.patch) V_DrawPatchTranslated(crosshair.x - crosshair.w, crosshair.y - crosshair.h, - 0, crosshair.patch, crosshair.cr); + crosshair.patch, crosshair.cr); } // [crispy] print a bar indicating demo progress at the bottom of the screen @@ -1393,8 +1393,8 @@ boolean HU_DemoProgressBar(boolean force) return false; } - V_DrawHorizLine(0, SCREENHEIGHT - 2, 0, progress, darkest_color); - V_DrawHorizLine(0, SCREENHEIGHT - 1, 0, progress, lightest_color); + V_DrawHorizLine(0, SCREENHEIGHT - 2, progress, darkest_color); + V_DrawHorizLine(0, SCREENHEIGHT - 1, progress, lightest_color); return true; } diff --git a/src/i_video.c b/src/i_video.c index 6061467f..f02d3721 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -460,7 +460,7 @@ void I_FinishUpdate(void) if (devparm) { static int lasttic; - byte *s = screens[0]; + byte *s = I_VideoBuffer; int i = I_GetTime(); int tics = i - lasttic; @@ -559,18 +559,18 @@ void I_ReadScreen(byte *scr) int size = hires ? SCREENWIDTH*SCREENHEIGHT*4 : SCREENWIDTH*SCREENHEIGHT; // haleyjd - memcpy(scr, *screens, size); + memcpy(scr, I_VideoBuffer, size); } // // killough 10/98: init disk icon // -static byte *diskflash, *old_data; +static pixel_t *diskflash, *old_data; static void I_InitDiskFlash(void) { - byte temp[32*32]; + pixel_t temp[32*32]; if (diskflash) { @@ -581,10 +581,10 @@ static void I_InitDiskFlash(void) diskflash = Z_Malloc((16<= DISK_ICON_THRESHOLD) { - V_GetBlock(SCREENWIDTH-16, SCREENHEIGHT-16, 0, 16, 16, old_data); - V_PutBlock(SCREENWIDTH-16, SCREENHEIGHT-16, 0, 16, 16, diskflash); + V_GetBlock(SCREENWIDTH-16, SCREENHEIGHT-16, 16, 16, old_data); + V_PutBlock(SCREENWIDTH-16, SCREENHEIGHT-16, 16, 16, diskflash); disk_to_restore = 1; } @@ -626,7 +626,7 @@ static void I_RestoreDiskBackground(void) if (disk_to_restore) { - V_PutBlock(SCREENWIDTH-16, SCREENHEIGHT-16, 0, 16, 16, old_data); + V_PutBlock(SCREENWIDTH-16, SCREENHEIGHT-16, 16, 16, old_data); disk_to_restore = 0; } @@ -1138,8 +1138,13 @@ static void I_ResetGraphicsMode(void) SDL_FillRect(sdlscreen, NULL, 0); // [FG] screen buffer - screens[0] = sdlscreen->pixels; - memset(screens[0], 0, w * h * sizeof(*screens[0])); + + I_VideoBuffer = sdlscreen->pixels; + V_RestoreBuffer(); + + // Clear the screen to black. + + memset(I_VideoBuffer, 0, w * h * sizeof(*I_VideoBuffer)); pixel_format = SDL_GetWindowPixelFormat(screen); @@ -1405,8 +1410,7 @@ void I_ResetScreen(void) if (gamestate == GS_INTERMISSION) { - WI_DrawBackground(); - V_CopyRect(0, 0, 1, SCREENWIDTH, SCREENHEIGHT, 0, 0, 0); + WI_slamBackground(); } M_ResetSetupMenuVideo(); diff --git a/src/m_menu.c b/src/m_menu.c index f0637ac1..5141d874 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -405,7 +405,7 @@ void M_DrawMainMenu(void) // [crispy] force status bar refresh inhelpscreens = true; - V_DrawPatchDirect (94,2,0,W_CacheLumpName("M_DOOM",PU_CACHE)); + V_DrawPatchDirect (94,2,W_CacheLumpName("M_DOOM",PU_CACHE)); } ///////////////////////////// @@ -517,7 +517,7 @@ void M_DrawReadThis1(void) { inhelpscreens = true; if (gamemode == shareware) - V_DrawPatchFullScreen (0,W_CacheLumpName("HELP2",PU_CACHE)); + V_DrawPatchFullScreen (W_CacheLumpName("HELP2",PU_CACHE)); else M_DrawCredits(); } @@ -533,7 +533,7 @@ void M_DrawReadThis2(void) if (gamemode == shareware) M_DrawCredits(); else - V_DrawPatchFullScreen (0,W_CacheLumpName("CREDIT",PU_CACHE)); + V_DrawPatchFullScreen (W_CacheLumpName("CREDIT",PU_CACHE)); } ///////////////////////////// @@ -705,8 +705,8 @@ void M_DrawNewGame(void) // [crispy] force status bar refresh inhelpscreens = true; - V_DrawPatchDirect (96,14,0,W_CacheLumpName("M_NEWG",PU_CACHE)); - V_DrawPatchDirect (54,38,0,W_CacheLumpName("M_SKILL",PU_CACHE)); + V_DrawPatchDirect (96,14,W_CacheLumpName("M_NEWG",PU_CACHE)); + V_DrawPatchDirect (54,38,W_CacheLumpName("M_SKILL",PU_CACHE)); } void M_NewGame(int choice) @@ -833,7 +833,7 @@ static void M_DrawBorderedSnapshot (int n) CR_GOLD, txt); // [FG] draw the view border around the snapshot - R_DrawBorder(snapshot_x, snapshot_y, snapshot_width, snapshot_height, 0); + R_DrawBorder(snapshot_x, snapshot_y, snapshot_width, snapshot_height); } // [FG] delete a savegame @@ -884,7 +884,7 @@ void M_DrawLoad(void) int i; //jff 3/15/98 use symbolic load position - V_DrawPatchDirect (72,LOADGRAPHIC_Y,0,W_CacheLumpName("M_LOADG",PU_CACHE)); + V_DrawPatchDirect (72,LOADGRAPHIC_Y,W_CacheLumpName("M_LOADG",PU_CACHE)); for (i = 0 ; i < load_end ; i++) { M_DrawSaveLoadBorder(LoadDef.x,LoadDef.y+LINEHEIGHT*i); @@ -904,15 +904,15 @@ void M_DrawSaveLoadBorder(int x,int y) { int i; - V_DrawPatchDirect (x-8,y+7,0,W_CacheLumpName("M_LSLEFT",PU_CACHE)); + V_DrawPatchDirect (x-8,y+7,W_CacheLumpName("M_LSLEFT",PU_CACHE)); for (i = 0 ; i < 24 ; i++) { - V_DrawPatchDirect (x,y+7,0,W_CacheLumpName("M_LSCNTR",PU_CACHE)); + V_DrawPatchDirect (x,y+7,W_CacheLumpName("M_LSCNTR",PU_CACHE)); x += 8; } - V_DrawPatchDirect (x,y+7,0,W_CacheLumpName("M_LSRGHT",PU_CACHE)); + V_DrawPatchDirect (x,y+7,W_CacheLumpName("M_LSRGHT",PU_CACHE)); } // @@ -1079,7 +1079,7 @@ void M_DrawSave(void) int i; //jff 3/15/98 use symbolic load position - V_DrawPatchDirect (72,LOADGRAPHIC_Y,0,W_CacheLumpName("M_SAVEG",PU_CACHE)); + V_DrawPatchDirect (72,LOADGRAPHIC_Y,W_CacheLumpName("M_SAVEG",PU_CACHE)); for (i = 0 ; i < load_end ; i++) { M_DrawSaveLoadBorder(LoadDef.x,LoadDef.y+LINEHEIGHT*i); @@ -1269,7 +1269,7 @@ char msgNames[2][9] = {"M_MSGOFF","M_MSGON"}; void M_DrawOptions(void) { - V_DrawPatchDirect (108,15,0,W_CacheLumpName("M_OPTTTL",PU_CACHE)); + V_DrawPatchDirect (108, 15, W_CacheLumpName("M_OPTTTL", PU_CACHE)); /* obsolete -- killough V_DrawPatchDirect (OptionsDef.x + 175,OptionsDef.y+LINEHEIGHT*detail,0, @@ -1283,8 +1283,8 @@ void M_DrawOptions(void) showMessages ? "ON" : "OFF"); else if (OptionsDef.lumps_missing == -1) - V_DrawPatchDirect (OptionsDef.x + 120,OptionsDef.y+LINEHEIGHT*messages,0, - W_CacheLumpName(msgNames[showMessages],PU_CACHE)); + V_DrawPatchDirect (OptionsDef.x + 120, OptionsDef.y + LINEHEIGHT * messages, + W_CacheLumpName(msgNames[showMessages], PU_CACHE)); /* M_DrawThermo(OptionsDef.x,OptionsDef.y+LINEHEIGHT*(mousesens+1), 10,mouseSensitivity); killough */ @@ -1401,7 +1401,7 @@ menu_t SoundDef = void M_DrawSound(void) { - V_DrawPatchDirect (60,38,0,W_CacheLumpName("M_SVOL",PU_CACHE)); + V_DrawPatchDirect (60, 38, W_CacheLumpName("M_SVOL", PU_CACHE)); M_DrawThermo(SoundDef.x,SoundDef.y+LINEHEIGHT*(sfx_vol+1),16,snd_SfxVolume); @@ -1508,7 +1508,7 @@ void M_DrawMouse(void) { int mhmx,mvmx,mhmx2,mvmx2; //jff 4/3/98 clamp drawn position to 23 max - V_DrawPatchDirect (60,LOADGRAPHIC_Y,0,W_CacheLumpName("M_MSENS",PU_CACHE)); + V_DrawPatchDirect (60,LOADGRAPHIC_Y,W_CacheLumpName("M_MSENS",PU_CACHE)); //jff 4/3/98 clamp horizontal sensitivity display mhmx = mouseSensitivity_horiz; // >23? 23 : mouseSensitivity_horiz; @@ -2059,12 +2059,12 @@ menu_t CompatDef = // killough 10/98 // // killough 11/98: rewritten to support hires -void M_DrawBackground(char *patchname, byte *back_dest) +void M_DrawBackground(char *patchname) { if (setup_active && menu_background != background_on) return; - R_DrawBackground(patchname, back_dest); + V_DrawBackground(patchname); } ///////////////////////////// @@ -2190,7 +2190,7 @@ void M_DrawItem(setup_menu_t* s) // Draw the 'off' version if this isn't the current menu item // Draw the blinking version in tune with the blinking skull otherwise - V_DrawPatchDirect(x,y,0,W_CacheLumpName(ResetButtonName + V_DrawPatchDirect(x, y, W_CacheLumpName(ResetButtonName [flags & (S_HILITE|S_SELECT) ? whichSkull : 0], PU_CACHE)); else // Draw the item string @@ -2256,20 +2256,20 @@ static void M_DrawMiniThermo(int x, int y, int size, int dot, char *color) const int step = M_THRM_STEP * M_THRM_SIZE * FRACUNIT / size; xx = x; - V_DrawPatch(xx, y, 0, W_CacheLumpName("M_MTHRML", PU_CACHE)); + V_DrawPatch(xx, y, W_CacheLumpName("M_MTHRML", PU_CACHE)); xx += M_THRM_STEP; for (i = 0; i < M_THRM_SIZE; i++) { - V_DrawPatch(xx, y, 0, W_CacheLumpName("M_MTHRMM", PU_CACHE)); + V_DrawPatch(xx, y, W_CacheLumpName("M_MTHRMM", PU_CACHE)); xx += M_THRM_STEP; } - V_DrawPatch(xx, y, 0, W_CacheLumpName("M_MTHRMR", PU_CACHE)); + V_DrawPatch(xx, y, W_CacheLumpName("M_MTHRMR", PU_CACHE)); // [FG] do not crash anymore if value exceeds thermometer range if (dot > size) dot = size; - V_DrawPatchTranslated(x + M_THRM_STEP / 2 + dot * step / FRACUNIT, y, 0, + V_DrawPatchTranslated(x + M_THRM_STEP / 2 + dot * step / FRACUNIT, y, W_CacheLumpName("M_MTHRMO", PU_CACHE), color); } @@ -2393,19 +2393,19 @@ void M_DrawSetting(setup_menu_t* s) for (i = 0 ; i < (CHIP_SIZE+2)*(CHIP_SIZE+2) ; i++) *ptr++ = PAL_BLACK; - V_DrawBlock(x+WIDESCREENDELTA,y-1,0,CHIP_SIZE+2,CHIP_SIZE+2,colorblock); + V_DrawBlock(x+WIDESCREENDELTA,y-1,CHIP_SIZE+2,CHIP_SIZE+2,colorblock); // draw the paint chip ch = s->var.def->location->i; if (!ch) // don't show this item in automap mode - V_DrawPatchDirect (x+1,y,0,W_CacheLumpName("M_PALNO",PU_CACHE)); + V_DrawPatchDirect (x+1,y,W_CacheLumpName("M_PALNO",PU_CACHE)); else { ptr = colorblock; for (i = 0 ; i < CHIP_SIZE*CHIP_SIZE ; i++) *ptr++ = ch; - V_DrawBlock(x+1+WIDESCREENDELTA,y,0,CHIP_SIZE,CHIP_SIZE,colorblock); + V_DrawBlock(x+1+WIDESCREENDELTA,y,CHIP_SIZE,CHIP_SIZE,colorblock); } // [FG] print a blinking "arrow" next to the currently highlighted menu item if (!setup_select && ItemSelected(s)) @@ -2458,7 +2458,7 @@ void M_DrawSetting(setup_menu_t* s) for (i = 0 ; i < char_width ; i++) colorblock[i] = PAL_WHITE; if (x+cursor_start-1+WIDESCREENDELTA+char_width < SCREENWIDTH) - V_DrawBlock(x+cursor_start-1+WIDESCREENDELTA,y+7,0,char_width,1,colorblock); + V_DrawBlock(x+cursor_start-1+WIDESCREENDELTA,y+7,char_width,1,colorblock); } // Draw the setting for the item @@ -2609,7 +2609,7 @@ void M_DrawScreenItems(setup_menu_t* src) void M_DrawDefVerify() { - V_DrawPatch(VERIFYBOXXORG, VERIFYBOXYORG, 0, W_CacheLumpName("M_VBOX", PU_CACHE)); + V_DrawPatch(VERIFYBOXXORG, VERIFYBOXYORG, W_CacheLumpName("M_VBOX", PU_CACHE)); // The blinking messages is keyed off of the blinking of the // cursor skull. @@ -2625,7 +2625,7 @@ void M_DrawDefVerify() static void M_DrawDelVerify(void) { - V_DrawPatch(VERIFYBOXXORG, VERIFYBOXYORG, 0, W_CacheLumpName("M_VBOX", PU_CACHE)); + V_DrawPatch(VERIFYBOXXORG, VERIFYBOXYORG, W_CacheLumpName("M_VBOX", PU_CACHE)); if (whichSkull) { strcpy(menu_buffer,"Delete savegame? (Y or N)"); @@ -3167,7 +3167,7 @@ void M_DrawKeybnd(void) // Set up the Key Binding screen - M_DrawBackground("FLOOR4_6", screens[0]); // Draw background + M_DrawBackground("FLOOR4_6"); // Draw background M_DrawTitle(84,2,"M_KEYBND","KEY BINDINGS"); M_DrawInstructions(); M_DrawScreenItems(current_setup_menu); @@ -3323,7 +3323,7 @@ void M_DrawWeapons(void) { inhelpscreens = true; // killough 4/6/98: Force status bar redraw - M_DrawBackground("FLOOR4_6", screens[0]); // Draw background + M_DrawBackground("FLOOR4_6"); // Draw background M_DrawTitle(109,2,"M_WEAP","WEAPONS"); M_DrawInstructions(); M_DrawScreenItems(current_setup_menu); @@ -3521,7 +3521,7 @@ void M_DrawStatusHUD(void) { inhelpscreens = true; // killough 4/6/98: Force status bar redraw - M_DrawBackground("FLOOR4_6", screens[0]); // Draw background + M_DrawBackground("FLOOR4_6"); // Draw background M_DrawTitle(59,2,"M_STAT","STATUS BAR / HUD"); M_DrawInstructions(); M_DrawScreenItems(current_setup_menu); @@ -3741,14 +3741,15 @@ void M_DrawColPal() // Draw a background, border, and paint chips - V_DrawPatchDirect (COLORPALXORIG-5,COLORPALYORIG-5,0,W_CacheLumpName("M_COLORS",PU_CACHE)); + V_DrawPatchDirect(COLORPALXORIG-5, COLORPALYORIG-5, + W_CacheLumpName("M_COLORS", PU_CACHE)); // Draw the cursor around the paint chip // (cpx,cpy) is the upper left-hand corner of the paint chip cpx = COLORPALXORIG + color_palette_x * (CHIP_SIZE + 1) - 1; cpy = COLORPALYORIG + color_palette_y * (CHIP_SIZE + 1) - 1; - V_DrawPatch(cpx, cpy, 0, W_CacheLumpName("M_PALSEL", PU_CACHE)); + V_DrawPatch(cpx, cpy, W_CacheLumpName("M_PALSEL", PU_CACHE)); } // The drawing part of the Automap Setup initialization. Draw the @@ -3759,7 +3760,7 @@ void M_DrawAutoMap(void) { inhelpscreens = true; // killough 4/6/98: Force status bar redraw - M_DrawBackground("FLOOR4_6", screens[0]); // Draw background + M_DrawBackground("FLOOR4_6"); // Draw background M_DrawTitle(109,2,"M_AUTO","AUTOMAP"); M_DrawInstructions(); M_DrawScreenItems(current_setup_menu); @@ -3899,7 +3900,7 @@ void M_DrawEnemy(void) { inhelpscreens = true; - M_DrawBackground("FLOOR4_6", screens[0]); // Draw background + M_DrawBackground("FLOOR4_6"); // Draw background M_DrawTitle(114,2,"M_ENEM","ENEMIES"); M_DrawInstructions(); M_DrawScreenItems(current_setup_menu); @@ -4497,7 +4498,7 @@ void M_DrawGeneral(void) { inhelpscreens = true; - M_DrawBackground("FLOOR4_6", screens[0]); // Draw background + M_DrawBackground("FLOOR4_6"); // Draw background M_DrawTitle(114,2,"M_GENERL","GENERAL"); M_DrawInstructions(); M_DrawScreenItems(current_setup_menu); @@ -4711,7 +4712,7 @@ void M_DrawCompat(void) { inhelpscreens = true; - M_DrawBackground("FLOOR4_6", screens[0]); // Draw background + M_DrawBackground("FLOOR4_6"); // Draw background M_DrawTitle(52,2,"M_COMPAT","DOOM COMPATIBILITY"); M_DrawInstructions(); M_DrawScreenItems(current_setup_menu); @@ -4843,7 +4844,7 @@ void M_DrawMessages(void) { inhelpscreens = true; - M_DrawBackground("FLOOR4_6", screens[0]); // Draw background + M_DrawBackground("FLOOR4_6"); // Draw background M_DrawTitle(103,2,"M_MESS","MESSAGES"); M_DrawInstructions(); M_DrawScreenItems(current_setup_menu); @@ -4914,7 +4915,7 @@ void M_DrawChatStrings(void) { inhelpscreens = true; - M_DrawBackground("FLOOR4_6", screens[0]); // Draw background + M_DrawBackground("FLOOR4_6"); // Draw background M_DrawTitle(83,2,"M_CHAT","CHAT STRINGS"); M_DrawInstructions(); M_DrawScreenItems(current_setup_menu); @@ -5165,7 +5166,7 @@ void M_DrawExtHelp(void) inhelpscreens = true; // killough 5/1/98 namebfr[4] = extended_help_index/10 + 0x30; namebfr[5] = extended_help_index%10 + 0x30; - V_DrawPatchFullScreen(0,W_CacheLumpName(namebfr,PU_CACHE)); + V_DrawPatchFullScreen(W_CacheLumpName(namebfr, PU_CACHE)); } // @@ -5308,7 +5309,7 @@ void M_DrawStringCR(int cx, int cy, char *color, const char *ch) // V_DrawpatchTranslated() will draw the string in the // desired color, colrngs[color] - V_DrawPatchTranslated(cx,cy,0,hu_font[c],color); + V_DrawPatchTranslated(cx, cy, hu_font[c],color); // The screen is cramped, so trim one unit from each // character so they butt up against each other. @@ -5377,12 +5378,12 @@ void M_DrawHelp (void) inhelpscreens = true; // killough 10/98 if (helplump < 0 || W_IsIWADLump(helplump)) { - M_DrawBackground("FLOOR4_6", screens[0]); - M_DrawScreenItems(helpstrings); + M_DrawBackground("FLOOR4_6"); + M_DrawScreenItems(helpstrings); } else { - V_DrawPatchFullScreen(0, W_CacheLumpNum(helplump, PU_CACHE)); + V_DrawPatchFullScreen(W_CacheLumpNum(helplump, PU_CACHE)); } } @@ -5459,7 +5460,7 @@ void M_DrawCredits(void) // killough 10/98: credit screen char mbftext_s[32]; sprintf(mbftext_s, PROJECT_STRING); inhelpscreens = true; - M_DrawBackground(gamemode==shareware ? "CEIL5_1" : "MFLR8_4", screens[0]); + M_DrawBackground(gamemode==shareware ? "CEIL5_1" : "MFLR8_4"); M_DrawTitle(42,9,"MBFTEXT",mbftext_s); M_DrawScreenItems(cred_settings); } @@ -7007,17 +7008,16 @@ void M_Drawer (void) for (i=0;imenuitems[i].name[0]) - V_DrawPatchTranslated(x,y,0, - W_CacheLumpName(currentMenu->menuitems[i].name,PU_CACHE), - currentMenu->menuitems[i].status == 0 ? cr_dark : NULL); + V_DrawPatchTranslated(x, y, W_CacheLumpName(currentMenu->menuitems[i].name,PU_CACHE), + currentMenu->menuitems[i].status == 0 ? cr_dark : NULL); y += LINEHEIGHT; } // DRAW SKULL V_DrawPatchDirect(x + SKULLXOFF, - currentMenu->y - 5 + itemOn*LINEHEIGHT,0, - W_CacheLumpName(skullName[whichSkull],PU_CACHE)); + currentMenu->y - 5 + itemOn*LINEHEIGHT, + W_CacheLumpName(skullName[whichSkull], PU_CACHE)); if (delete_verify) M_DrawDelVerify(); @@ -7099,14 +7099,14 @@ void M_DrawThermo(int x,int y,int thermWidth,int thermDot ) char num[4]; xx = x; - V_DrawPatchDirect (xx,y,0,W_CacheLumpName("M_THERML",PU_CACHE)); + V_DrawPatchDirect (xx,y,W_CacheLumpName("M_THERML",PU_CACHE)); xx += 8; for (i=0;ix - 10,menu->y+item*LINEHEIGHT - 1, 0, + V_DrawPatchDirect (menu->x - 10,menu->y+item*LINEHEIGHT - 1, W_CacheLumpName("M_CELL1",PU_CACHE)); } @@ -7136,7 +7136,7 @@ void M_DrawEmptyCell (menu_t* menu,int item) void M_DrawSelCell (menu_t* menu,int item) { - V_DrawPatchDirect (menu->x - 10,menu->y+item*LINEHEIGHT - 1, 0, + V_DrawPatchDirect (menu->x - 10,menu->y+item*LINEHEIGHT - 1, W_CacheLumpName("M_CELL2",PU_CACHE)); } @@ -7224,7 +7224,7 @@ void M_WriteText (int x,int y,const char *string) w = SHORT (hu_font[c]->width); if (cx+w > SCREENWIDTH) break; - V_DrawPatchDirect(cx, cy, 0, hu_font[c]); + V_DrawPatchDirect(cx, cy, hu_font[c]); cx+=w; } } @@ -7234,7 +7234,7 @@ void M_WriteText (int x,int y,const char *string) void M_DrawTitle(int x, int y, const char *patch, const char *alttext) { if (W_CheckNumForName(patch) >= 0) - V_DrawPatchDirect(x,y,0,W_CacheLumpName(patch,PU_CACHE)); + V_DrawPatchDirect(x,y,W_CacheLumpName(patch,PU_CACHE)); else { // patch doesn't exist, draw some text in place of it diff --git a/src/m_misc.c b/src/m_misc.c index 2e56f2b2..c2f41962 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -3315,12 +3315,7 @@ int M_DrawText(int x,int y,boolean direct,char* string) if (x+w > SCREENWIDTH) break; -// killough 11/98: makes no difference anymore: -// if (direct) -// V_DrawPatchDirect(x, y, 0, hu_font[c]); -// else - - V_DrawPatch(x, y, 0, hu_font[c]); + V_DrawPatch(x, y, hu_font[c]); x+=w; } diff --git a/src/m_snapshot.c b/src/m_snapshot.c index 48eac7fc..d107cef5 100644 --- a/src/m_snapshot.c +++ b/src/m_snapshot.c @@ -106,7 +106,7 @@ static void M_TakeSnapshot (void) const int inc = hires ? 2 : 1; int x, y; byte *p; - const byte *s = screens[0]; + const byte *s = I_VideoBuffer; int old_screenblocks = screenblocks; R_SetViewSize(11); @@ -146,7 +146,7 @@ void M_WriteSnapshot (byte *p) boolean M_DrawSnapshot (int n, int x, int y, int w, int h) { - byte *dest = screens[0] + y * (SCREENWIDTH << (2 * hires)) + (x << hires); + byte *dest = I_VideoBuffer + y * (SCREENWIDTH << (2 * hires)) + (x << hires); if (!snapshots[n]) { diff --git a/src/r_draw.c b/src/r_draw.c index d7459c75..432ff0aa 100644 --- a/src/r_draw.c +++ b/src/r_draw.c @@ -61,6 +61,11 @@ byte translations[3][256]; byte *tranmap; // translucency filter maps 256x256 // phares byte *main_tranmap; // killough 4/11/98 +// Backing buffer containing the bezel drawn around the screen and surrounding +// background. + +static pixel_t *background_buffer = NULL; + // // R_DrawColumn // Source is the top of the column to scale. @@ -823,78 +828,45 @@ void R_InitBuffer(int width, int height) // Preclaculate all row offsets. for (i = height << hires; i--; ) - ylookup[i] = screens[0] + (i+viewwindowy)*linesize; // killough 11/98 + ylookup[i] = I_VideoBuffer + (i+viewwindowy)*linesize; // killough 11/98 } -// -// R_FillBackScreen -// Fills the back screen with a pattern -// for variable screen sizes -// Also draws a beveled edge. -// - -void R_DrawBackground(char *patchname, byte *back_dest) -{ - int x, y; - byte *src = W_CacheLumpNum(firstflat + R_FlatNumForName(patchname), PU_CACHE); - - if (hires) // killough 11/98: hires support - { - for (y = 0; y < SCREENHEIGHT<<1; y++) - for (x = 0; x < SCREENWIDTH<<1; x += 2) - { - const byte dot = src[(((y>>1)&63)<<6) + ((x>>1)&63)]; - - *back_dest++ = dot; - *back_dest++ = dot; - } - } - else - { - for (y = 0; y < SCREENHEIGHT; y++) - for (x = 0; x < SCREENWIDTH; x++) - { - *back_dest++ = src[((y&63)<<6) + (x&63)]; - } - } -} - -void R_DrawBorder (int x, int y, int w, int h, int s) +void R_DrawBorder (int x, int y, int w, int h) { int i, j; patch_t *patch; patch = W_CacheLumpName("brdr_t", PU_CACHE); for (i = 0; i < w; i += 8) - V_DrawPatch(x + i - WIDESCREENDELTA, y - 8, s, patch); + V_DrawPatch(x + i - WIDESCREENDELTA, y - 8, patch); patch = W_CacheLumpName("brdr_b", PU_CACHE); for (i = 0; i < w; i += 8) - V_DrawPatch(x + i - WIDESCREENDELTA, y + h, s, patch); + V_DrawPatch(x + i - WIDESCREENDELTA, y + h, patch); patch = W_CacheLumpName("brdr_l", PU_CACHE); for (j = 0; j < h; j += 8) - V_DrawPatch(x - 8 - WIDESCREENDELTA, y + j, s, patch); + V_DrawPatch(x - 8 - WIDESCREENDELTA, y + j, patch); patch = W_CacheLumpName("brdr_r", PU_CACHE); for (j = 0; j < h; j += 8) - V_DrawPatch(x + w - WIDESCREENDELTA, y + j, s, patch); + V_DrawPatch(x + w - WIDESCREENDELTA, y + j, patch); // Draw beveled edge. V_DrawPatch(x - 8 - WIDESCREENDELTA, - y - 8, s, + y - 8, W_CacheLumpName("brdr_tl", PU_CACHE)); V_DrawPatch(x + w - WIDESCREENDELTA, - y - 8, s, + y - 8, W_CacheLumpName("brdr_tr", PU_CACHE)); V_DrawPatch(x - 8 - WIDESCREENDELTA, - y + h, s, + y + h, W_CacheLumpName("brdr_bl", PU_CACHE)); V_DrawPatch(x + w - WIDESCREENDELTA, - y + h, s, + y + h, W_CacheLumpName("brdr_br", PU_CACHE)); } @@ -903,25 +875,35 @@ void R_FillBackScreen (void) if (scaledviewwidth == SCREENWIDTH) return; - // killough 11/98: use the function in m_menu.c - R_DrawBackground(gamemode==commercial ? "GRNROCK" : "FLOOR7_2", screens[1]); + // Allocate the background buffer if necessary + if (background_buffer == NULL) + { + int size = (hires ? SCREENWIDTH * SCREENHEIGHT * 4 : SCREENWIDTH * SCREENHEIGHT); + background_buffer = Z_Malloc(size * sizeof(*background_buffer), PU_STATIC, NULL); + } - R_DrawBorder(viewwindowx >> hires, viewwindowy >> hires, scaledviewwidth, scaledviewheight, 1); + V_UseBuffer(background_buffer); + + V_DrawBackground(gamemode == commercial ? "GRNROCK" : "FLOOR7_2"); + + R_DrawBorder(viewwindowx >> hires, viewwindowy >> hires, scaledviewwidth, scaledviewheight); + + V_RestoreBuffer(); } // // Copy a screen buffer. // -void R_VideoErase(unsigned ofs, int count) +static void R_VideoErase(unsigned ofs, int count) { if (hires) // killough 11/98: hires support { ofs = ofs*4 - (ofs % SCREENWIDTH)*2; // recompose offset - memcpy(screens[0]+ofs, screens[1]+ofs, count*=2); // LFB copy. + memcpy(I_VideoBuffer + ofs, background_buffer + ofs, count *= 2); // LFB copy. ofs += SCREENWIDTH*2; } - memcpy(screens[0]+ofs, screens[1]+ofs, count); // LFB copy. + memcpy(I_VideoBuffer + ofs, background_buffer + ofs, count); // LFB copy. } // @@ -938,7 +920,7 @@ void R_DrawViewBorder(void) { int side, ofs, i; - if (scaledviewwidth == SCREENWIDTH) + if (scaledviewwidth == SCREENWIDTH || background_buffer == NULL) return; // copy top diff --git a/src/r_draw.h b/src/r_draw.h index 433bd36e..d3dc9575 100644 --- a/src/r_draw.h +++ b/src/r_draw.h @@ -58,8 +58,6 @@ void R_DrawSkyColumn(void); void R_DrawTranslatedColumn(void); -void R_VideoErase(unsigned ofs, int count); - extern lighttable_t *ds_colormap[2]; extern int ds_y; @@ -86,8 +84,7 @@ void R_InitTranslationTables(void); // Rendering function. void R_FillBackScreen(void); -void R_DrawBackground(char *patch, byte *back_dest); -void R_DrawBorder(int x, int y, int w, int h, int s); +void R_DrawBorder(int x, int y, int w, int h); // If the view size is not full screen, draws a border around it. void R_DrawViewBorder(void); diff --git a/src/r_main.c b/src/r_main.c index 94532e72..44fa6483 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -749,10 +749,10 @@ void R_RenderPlayerView (player_t* player) if (autodetect_hom) { // killough 2/10/98: add flashing red HOM indicators - byte c[47*47]; + pixel_t c[47*47]; extern int lastshottic; int i , color = !flashing_hom || (gametic % 20) < 9 ? 0xb0 : 0; - memset(*screens+viewwindowy*linesize,color,viewheight*linesize); + memset(I_VideoBuffer+viewwindowy*linesize,color,viewheight*linesize); for (i=0;i<47*47;i++) { char t = @@ -814,7 +814,7 @@ void R_RenderPlayerView (player_t* player) } if (gametic-lastshottic < TICRATE*2 && gametic-lastshottic > TICRATE/8) V_DrawBlock((viewwindowx + viewwidth/2 - 24)>>hires, - (viewwindowy + viewheight/2 - 24)>>hires, 0, 47, 47, c); + (viewwindowy + viewheight/2 - 24)>>hires, 47, 47, c); R_DrawViewBorder(); } diff --git a/src/r_voxel.c b/src/r_voxel.c index 90159657..78a7f82f 100644 --- a/src/r_voxel.c +++ b/src/r_voxel.c @@ -743,7 +743,7 @@ static void VX_DrawColumn (vissprite_t * spr, int x, int y) boolean shadow = ((spr->mobjflags & MF_SHADOW) != 0); - byte * dest = screens[0] + viewwindowy * linesize + viewwindowx; + byte * dest = I_VideoBuffer + viewwindowy * linesize + viewwindowx; // iterate over screen columns uint32_t ux = ((Ax - 1) | (FRACUNIT - 1)) + 1; diff --git a/src/st_lib.c b/src/st_lib.c index 609782d1..24ffc5cb 100644 --- a/src/st_lib.c +++ b/src/st_lib.c @@ -121,9 +121,9 @@ void STlib_drawNum if (!num) { if (outrng && !sts_always_red) - V_DrawPatchTranslated(x - w, n->y, FG, n->p[ 0 ],outrng); + V_DrawPatchTranslated(x - w, n->y, n->p[ 0 ],outrng); else //jff 2/18/98 allow use of faster draw routine from config - V_DrawPatch(x - w, n->y, FG, n->p[ 0 ]); + V_DrawPatch(x - w, n->y, n->p[ 0 ]); } // draw the new number @@ -132,9 +132,9 @@ void STlib_drawNum { x -= w; if (outrng && !sts_always_red) - V_DrawPatchTranslated(x, n->y, FG, n->p[ num % 10 ],outrng); + V_DrawPatchTranslated(x, n->y, n->p[ num % 10 ],outrng); else //jff 2/18/98 allow use of faster draw routine from config - V_DrawPatch(x, n->y, FG, n->p[ num % 10 ]); + V_DrawPatch(x, n->y, n->p[ num % 10 ]); num /= 10; } @@ -144,9 +144,9 @@ void STlib_drawNum { w = SHORT(sttminus->width); if (outrng && !sts_always_red) - V_DrawPatchTranslated(x - w, n->y, FG, sttminus,outrng); + V_DrawPatchTranslated(x - w, n->y, sttminus,outrng); else //jff 2/18/98 allow use of faster draw routine from config - V_DrawPatch(x - w, n->y, FG, sttminus); + V_DrawPatch(x - w, n->y, sttminus); } } @@ -208,7 +208,6 @@ void STlib_updatePercent ( per->n.x, per->n.y, - FG, per->p, // [FG] fix always gray percent / always red mismatch sts_pct_always_gray ? cr_gray : @@ -262,7 +261,7 @@ void STlib_updateMultIcon if (*mi->on) { if (*mi->inum != -1) // killough 2/16/98: redraw only if != -1 - V_DrawPatch(mi->x, mi->y, FG, mi->p[*mi->inum]); + V_DrawPatch(mi->x, mi->y, mi->p[*mi->inum]); } } diff --git a/src/st_lib.h b/src/st_lib.h index 4561f541..a7ef2142 100644 --- a/src/st_lib.h +++ b/src/st_lib.h @@ -24,12 +24,6 @@ #include "r_defs.h" #include "v_video.h" // color ranges -// -// Background and foreground screen numbers -// -#define BG 4 -#define FG 0 - // // Typedefs of widgets // diff --git a/src/st_stuff.c b/src/st_stuff.c index 51101c83..d3384d3c 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -181,6 +181,9 @@ extern boolean inhelpscreens; // killough 2/8/98: weapon info position macros UNUSED, removed here +// graphics are drawn to a backing screen and blitted to the real screen +pixel_t *st_backing_screen = NULL; + // main player in game static player_t *plyr; @@ -322,10 +325,12 @@ void ST_refreshBackground(boolean force) ST_X + (ORIGWIDTH - SHORT(sbar->width)) / 2 : ST_X; + V_UseBuffer(st_backing_screen); + if (SCREENWIDTH != ST_WIDTH) { int x, y; - byte *dest = screens[BG]; + byte *dest = st_backing_screen; if (st_solidbackground) { @@ -339,7 +344,7 @@ void ST_refreshBackground(boolean force) int v; // [FG] temporarily draw status bar to background buffer - V_DrawPatch(st_x, 0, BG, sbar); + V_DrawPatch(st_x, 0, sbar); // [FG] separate colors for the top rows for (v = 0; v < arrlen(vstep); v++) @@ -417,39 +422,42 @@ void ST_refreshBackground(boolean force) for (x = 0; x < WIDESCREENDELTA; x += 8) { - V_DrawPatch(x - WIDESCREENDELTA, 0, BG, patch); - V_DrawPatch(ORIGWIDTH + WIDESCREENDELTA - x - 8, 0, BG, patch); + V_DrawPatch(x - WIDESCREENDELTA, 0, patch); + V_DrawPatch(ORIGWIDTH + WIDESCREENDELTA - x - 8, 0, patch); } } } } // [crispy] center unity rerelease wide status bar - V_DrawPatch(st_x, 0, BG, sbar); + V_DrawPatch(st_x, 0, sbar); // draw right side of bar if needed (Doom 1.0) if (sbarr) - V_DrawPatch(ST_ARMSBGX, 0, BG, sbarr); + V_DrawPatch(ST_ARMSBGX, 0, sbarr); if (st_notdeathmatch) - V_DrawPatch(ST_ARMSBGX, 0, BG, armsbg); + V_DrawPatch(ST_ARMSBGX, 0, armsbg); // killough 3/7/98: make face background change with displayplayer if (netgame) - V_DrawPatch(ST_FX, 0, BG, faceback[displayplayer]); + V_DrawPatch(ST_FX, 0, faceback[displayplayer]); + + V_RestoreBuffer(); // [crispy] copy entire SCREENWIDTH, to preserve the pattern // to the left and right of the status bar in widescren mode if (!force) { - V_CopyRect(ST_X, 0, BG, SCREENWIDTH, ST_HEIGHT, ST_X, ST_Y, FG); + V_CopyRect(ST_X, 0, st_backing_screen, SCREENWIDTH, ST_HEIGHT, ST_X, ST_Y); } else { if (WIDESCREENDELTA > 0 && !st_firsttime) { - V_CopyRect(0, 0, BG, WIDESCREENDELTA, ST_HEIGHT, 0, ST_Y, FG); - V_CopyRect(ORIGWIDTH + WIDESCREENDELTA, 0, BG, WIDESCREENDELTA, ST_HEIGHT, ORIGWIDTH + WIDESCREENDELTA, ST_Y, FG); + V_CopyRect(0, 0, st_backing_screen, WIDESCREENDELTA, ST_HEIGHT, 0, ST_Y); + V_CopyRect(ORIGWIDTH + WIDESCREENDELTA, 0, st_backing_screen, + WIDESCREENDELTA, ST_HEIGHT, ORIGWIDTH + WIDESCREENDELTA, ST_Y); } } @@ -873,7 +881,8 @@ void ST_drawWidgets(void) // clear area if (!st_crispyhud && st_statusbaron) { - V_CopyRect(WIDESCREENDELTA, 0, BG, ST_WIDTH, ST_HEIGHT, WIDESCREENDELTA, ST_Y, FG); + V_CopyRect(WIDESCREENDELTA, 0, st_backing_screen, ST_WIDTH, ST_HEIGHT, + WIDESCREENDELTA, ST_Y); } // used by w_arms[] widgets @@ -1331,13 +1340,13 @@ void ST_Init(void) st_height = StatusBarBufferHeight(); size = SCREENWIDTH * (st_height << (2 * hires)); - if (screens[4]) + if (st_backing_screen) { - Z_Free(screens[4]); + Z_Free(st_backing_screen); } // killough 11/98: allocate enough for hires - screens[4] = Z_Malloc(size, PU_STATIC, 0); + st_backing_screen = Z_Malloc(size, PU_STATIC, 0); } void ST_Warnings(void) diff --git a/src/v_video.c b/src/v_video.c index da419994..45085dfb 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -32,8 +32,11 @@ #include "m_swap.h" #include "m_misc2.h" -// Each screen is [SCREENWIDTH*SCREENHEIGHT]; -byte *screens[5]; +pixel_t *I_VideoBuffer; + +// The screen buffer that the v_video.c code draws to. + +static pixel_t *dest_screen = NULL; //jff 2/18/98 palette color ranges for translation //jff 4/24/98 now pointers set to predefined lumps to allow overloading @@ -287,8 +290,9 @@ void WriteGeneratedLumpWad(const char *filename) // // No return value. -void V_CopyRect(int srcx, int srcy, int srcscrn, int width, - int height, int destx, int desty, int destscrn ) +void V_CopyRect(int srcx, int srcy, pixel_t *source, + int width, int height, + int destx, int desty ) { byte *src; byte *dest; @@ -300,9 +304,7 @@ void V_CopyRect(int srcx, int srcy, int srcscrn, int width, || srcy+height>SCREENHEIGHT ||destx<0||destx/*+width*/>SCREENWIDTH || desty<0 - || desty/*+height*/>SCREENHEIGHT - || (unsigned)srcscrn>4 - || (unsigned)destscrn>4) + || desty/*+height*/>SCREENHEIGHT) I_Error ("Bad V_CopyRect"); #endif @@ -316,8 +318,8 @@ void V_CopyRect(int srcx, int srcy, int srcscrn, int width, { width<<=1; height<<=1; - src = screens[srcscrn]+SCREENWIDTH*4*srcy+srcx*2; - dest = screens[destscrn]+SCREENWIDTH*4*desty+destx*2; + src = source+SCREENWIDTH*4*srcy+srcx*2; + dest = dest_screen+SCREENWIDTH*4*desty+destx*2; for ( ; height>0 ; height--) { @@ -328,8 +330,8 @@ void V_CopyRect(int srcx, int srcy, int srcscrn, int width, } else { - src = screens[srcscrn]+SCREENWIDTH*srcy+srcx; - dest = screens[destscrn]+SCREENWIDTH*desty+destx; + src = source+SCREENWIDTH*srcy+srcx; + dest = dest_screen+SCREENWIDTH*desty+destx; for ( ; height>0 ; height--) { @@ -359,7 +361,7 @@ void V_CopyRect(int srcx, int srcy, int srcscrn, int width, // killough 11/98: Consolidated V_DrawPatch and V_DrawPatchFlipped into one // -void V_DrawPatchGeneral(int x, int y, int scrn, patch_t *patch, +void V_DrawPatchGeneral(int x, int y, patch_t *patch, boolean flipped) { int w = SHORT(patch->width), col = w-1, colstop = -1, colstep = -1; @@ -383,7 +385,7 @@ void V_DrawPatchGeneral(int x, int y, int scrn, patch_t *patch, if (hires) // killough 11/98: hires support (well, sorta :) { - byte *desttop = screens[scrn]+y*SCREENWIDTH*4+x*2; + byte *desttop = dest_screen+y*SCREENWIDTH*4+x*2; for ( ; col != colstop ; col += colstep, desttop+=2, x++) { @@ -465,7 +467,7 @@ void V_DrawPatchGeneral(int x, int y, int scrn, patch_t *patch, } else { - byte *desttop = screens[scrn]+y*SCREENWIDTH+x; + byte *desttop = dest_screen+y*SCREENWIDTH+x; for ( ; col != colstop ; col += colstep, desttop++, x++) { @@ -547,14 +549,14 @@ void V_DrawPatchGeneral(int x, int y, int scrn, patch_t *patch, // jff 1/15/98 new routine to translate patch colors // -void V_DrawPatchTranslated(int x, int y, int scrn, patch_t *patch, char *outr) +void V_DrawPatchTranslated(int x, int y, patch_t *patch, char *outr) { int col, w; //jff 2/18/98 if translation not needed, just use the old routine if (outr == NULL) { - V_DrawPatch(x,y,scrn,patch); + V_DrawPatch(x, y, patch); return; // killough 2/21/98: add return } @@ -577,7 +579,7 @@ void V_DrawPatchTranslated(int x, int y, int scrn, patch_t *patch, char *outr) if (hires) // killough 11/98: hires support (well, sorta :) { - byte *desttop = screens[scrn]+y*SCREENWIDTH*4+x*2; + byte *desttop = dest_screen+y*SCREENWIDTH*4+x*2; for ( ; colwidth)) / 2 - WIDESCREENDELTA; @@ -751,10 +753,10 @@ void V_DrawPatchFullScreen(int scrn, patch_t *patch) // [crispy] fill pillarboxes in widescreen mode if (SCREENWIDTH != NONWIDEWIDTH) { - memset(screens[scrn], 0, (SCREENWIDTH<SCREENWIDTH || y<0 - || y+height>SCREENHEIGHT - || (unsigned)scrn>4 ) + || y+height>SCREENHEIGHT) I_Error ("Bad V_DrawBlock"); #endif if (hires) // killough 11/98: hires support { - byte *dest = screens[scrn] + y*SCREENWIDTH*4+x*2; + byte *dest = dest_screen + y*SCREENWIDTH*4+x*2; if (width) while (height--) @@ -798,7 +799,7 @@ void V_DrawBlock(int x, int y, int scrn, int width, int height, byte *src) } else { - byte *dest = screens[scrn] + y*SCREENWIDTH+x; + byte *dest = dest_screen + y*SCREENWIDTH+x; while (height--) { @@ -819,7 +820,7 @@ void V_DrawBlock(int x, int y, int scrn, int width, int height, byte *src) // No return value // -void V_GetBlock(int x, int y, int scrn, int width, int height, byte *dest) +void V_GetBlock(int x, int y, int width, int height, byte *dest) { byte *src; @@ -827,15 +828,14 @@ void V_GetBlock(int x, int y, int scrn, int width, int height, byte *dest) if (x<0 ||x+width >SCREENWIDTH || y<0 - || y+height>SCREENHEIGHT - || (unsigned)scrn>4 ) + || y+height>SCREENHEIGHT ) I_Error ("Bad V_GetBlock"); #endif if (hires) // killough 11/98: hires support y<<=2, x<<=1, width<<=1, height<<=1; - src = screens[scrn] + y*SCREENWIDTH+x; + src = dest_screen + y*SCREENWIDTH+x; while (height--) { memcpy (dest, src, width); @@ -846,7 +846,7 @@ void V_GetBlock(int x, int y, int scrn, int width, int height, byte *dest) // [FG] non hires-scaling variant of V_DrawBlock, used in disk icon drawing -void V_PutBlock(int x, int y, int scrn, int width, int height, byte *src) +void V_PutBlock(int x, int y, int width, int height, byte *src) { byte *dest; @@ -854,15 +854,14 @@ void V_PutBlock(int x, int y, int scrn, int width, int height, byte *src) if (x<0 ||x+width >SCREENWIDTH || y<0 - || y+height>SCREENHEIGHT - || (unsigned)scrn>4 ) + || y+height>SCREENHEIGHT ) I_Error ("Bad V_PutBlock"); #endif if (hires) y<<=2, x<<=1, width<<=1, height<<=1; - dest = screens[scrn] + y*SCREENWIDTH+x; + dest = dest_screen + y*SCREENWIDTH+x; while (height--) { @@ -872,7 +871,7 @@ void V_PutBlock(int x, int y, int scrn, int width, int height, byte *src) } } -void V_DrawHorizLine(int x, int y, int scrn, int width, byte color) +void V_DrawHorizLine(int x, int y, int width, byte color) { byte *dest; int height = 1; @@ -884,7 +883,7 @@ void V_DrawHorizLine(int x, int y, int scrn, int width, byte color) if (hires) y<<=2, x<<=1, width<<=1, height<<=1; - dest = screens[scrn] + y * SCREENWIDTH + x; + dest = dest_screen + y * SCREENWIDTH + x; while (height--) { @@ -896,7 +895,7 @@ void V_DrawHorizLine(int x, int y, int scrn, int width, byte color) void V_ShadeScreen(void) { int y; - byte *dest = screens[0]; + byte *dest = dest_screen; const int targshade = 20, step = 2; static int oldtic = -1; static int screenshade; @@ -923,26 +922,60 @@ void V_ShadeScreen(void) oldtic = gametic; } +// +// V_DrawBackground +// Fills the back screen with a pattern +// for variable screen sizes +// + +void V_DrawBackground(const char *patchname) +{ + int x, y; + pixel_t *dest = dest_screen; + byte *src = W_CacheLumpNum(firstflat + R_FlatNumForName(patchname), PU_CACHE); + + if (hires) // killough 11/98: hires support + { + for (y = 0; y < SCREENHEIGHT<<1; y++) + for (x = 0; x < SCREENWIDTH<<1; x += 2) + { + const byte dot = src[(((y>>1)&63)<<6) + ((x>>1)&63)]; + + *dest++ = dot; + *dest++ = dot; + } + } + else + { + for (y = 0; y < SCREENHEIGHT; y++) + for (x = 0; x < SCREENWIDTH; x++) + { + *dest++ = src[((y&63)<<6) + (x&63)]; + } + } +} + // // V_Init // -// Allocates the 4 full screen buffers in low DOS memory -// No return value -// -// killough 11/98: rewritten to support hires void V_Init(void) { - // haleyjd - int size = hires ? SCREENWIDTH*SCREENHEIGHT*4 : SCREENWIDTH*SCREENHEIGHT; - static byte *s; - - if(s) - { - Z_Free(s); - } - - screens[3] = (screens[2] = (screens[1] = s = Z_Calloc(size,3,PU_STATIC,0)) + size) + size; + +} + +// Set the buffer that the code draws to. + +void V_UseBuffer(pixel_t *buffer) +{ + dest_screen = buffer; +} + +// Restore screen buffer to the i_video screen buffer. + +void V_RestoreBuffer(void) +{ + dest_screen = I_VideoBuffer; } //---------------------------------------------------------------------------- diff --git a/src/v_video.h b/src/v_video.h index 1fe1dff0..afb1aac6 100644 --- a/src/v_video.h +++ b/src/v_video.h @@ -84,7 +84,8 @@ typedef enum } crange_idx_e; //jff 1/16/98 end palette color range additions -extern byte *screens[5]; +extern pixel_t *I_VideoBuffer; + extern byte gammatable[5][256]; //jff 4/24/98 loads color translation lumps @@ -93,38 +94,46 @@ void V_InitColorTranslation(void); // Allocates buffer screens, call before R_Init. void V_Init (void); -void V_CopyRect(int srcx, int srcy, int srcscrn, int width, int height, - int destx, int desty, int destscrn); +void V_UseBuffer(pixel_t *buffer); + +void V_RestoreBuffer(void); + +void V_CopyRect(int srcx, int srcy, pixel_t *source, + int width, int height, + int destx, int desty); // killough 11/98: Consolidated V_DrawPatch and V_DrawPatchFlipped -void V_DrawPatchGeneral(int x,int y,int scrn,patch_t *patch, boolean flipped); +void V_DrawPatchGeneral(int x, int y, patch_t *patch, boolean flipped); -#define V_DrawPatch(x,y,s,p) V_DrawPatchGeneral(x,y,s,p,false) -#define V_DrawPatchFlipped(x,y,s,p) V_DrawPatchGeneral(x,y,s,p,true) +#define V_DrawPatch(x, y, p) V_DrawPatchGeneral(x, y, p, false) + +#define V_DrawPatchFlipped(x, y, p) V_DrawPatchGeneral(x, y, p, true) #define V_DrawPatchDirect V_DrawPatch /* killough 5/2/98 */ -void V_DrawPatchTranslated(int x, int y, int scrn, patch_t *patch, char *outr); +void V_DrawPatchTranslated(int x, int y, patch_t *patch, char *outr); -void V_DrawPatchFullScreen(int scrn, patch_t *patch); +void V_DrawPatchFullScreen(patch_t *patch); // Draw a linear block of pixels into the view buffer. -void V_DrawBlock(int x, int y, int scrn, int width, int height, byte *src); +void V_DrawBlock(int x, int y, int width, int height, pixel_t *src); // Reads a linear block of pixels into the view buffer. -void V_GetBlock(int x, int y, int scrn, int width, int height, byte *dest); +void V_GetBlock(int x, int y, int width, int height, pixel_t *dest); // [FG] non hires-scaling variant of V_DrawBlock, used in disk icon drawing -void V_PutBlock(int x, int y, int scrn, int width, int height, byte *src); +void V_PutBlock(int x, int y, int width, int height, pixel_t *src); -void V_DrawHorizLine(int x, int y, int scrn, int width, byte color); +void V_DrawHorizLine(int x, int y, int width, byte color); void V_ShadeScreen(void); +void V_DrawBackground(const char *patchname); + // [FG] colored blood and gibs int V_BloodColor(int blood); diff --git a/src/wi_stuff.c b/src/wi_stuff.c index 183d747a..d24cbd8e 100644 --- a/src/wi_stuff.c +++ b/src/wi_stuff.c @@ -263,12 +263,6 @@ static anim_t *anims[NUMEPISODES] = // GENERAL DATA // -// -// Locally used stuff. -// -#define FB 0 - - // States for single-player #define SP_KILLS 0 #define SP_ITEMS 2 @@ -393,10 +387,21 @@ static const char *exitpic, *enterpic; // Args: none // Returns: void // -static void WI_slamBackground(void) +void WI_slamBackground(void) { - WI_DrawBackground(); - V_CopyRect(0, 0, 1, SCREENWIDTH, SCREENHEIGHT, 0, 0, 0); // killough 11/98 + char name[32]; + + if (state != StatCount && enterpic) + strcpy(name, enterpic); + else if (exitpic) + strcpy(name, exitpic); + // with UMAPINFO it is possible that wbs->epsd > 3 + else if (gamemode == commercial || wbs->epsd >= 3) + strcpy(name, "INTERPIC"); + else + M_snprintf(name, sizeof(name), "WIMAP%d", wbs->epsd); + + V_DrawPatchFullScreen(W_CacheLumpName(name, PU_CACHE)); } // ==================================================================== @@ -450,7 +455,7 @@ static void WI_drawLF(void) patch_t* lpic = W_CacheLumpName(wbs->lastmapinfo->levelpic, PU_CACHE); V_DrawPatch((ORIGWIDTH - SHORT(lpic->width))/2, - y, FB, lpic); + y, lpic); y += (5 * SHORT(lpic->height)) / 4; } @@ -460,14 +465,14 @@ static void WI_drawLF(void) { // draw V_DrawPatch((ORIGWIDTH - SHORT(lnames[wbs->last]->width))/2, - y, FB, lnames[wbs->last]); + y, lnames[wbs->last]); // draw "Finished!" y += (5*SHORT(lnames[wbs->last]->height))/4; } V_DrawPatch((ORIGWIDTH - SHORT(finished->width))/2, - y, FB, finished); + y, finished); } @@ -483,7 +488,7 @@ static void WI_drawEL(void) // draw "Entering" V_DrawPatch((ORIGWIDTH - SHORT(entering->width))/2, - y, FB, entering); + y, entering); // The level defines a new name but no texture for the name if (wbs->nextmapinfo && wbs->nextmapinfo->levelname && wbs->nextmapinfo->levelpic[0] == 0) @@ -506,7 +511,7 @@ static void WI_drawEL(void) y += (5 * SHORT(lpic->height)) / 4; V_DrawPatch((ORIGWIDTH - SHORT(lpic->width))/2, - y, FB, lpic); + y, lpic); } else // [FG] prevent crashes for levels without name graphics @@ -517,7 +522,7 @@ static void WI_drawEL(void) y += (5 * SHORT(entering->height)) / 4; V_DrawPatch((ORIGWIDTH - SHORT(lnames[wbs->next]->width))/2, - y, FB, lnames[wbs->next]); + y, lnames[wbs->next]); } } @@ -564,8 +569,7 @@ WI_drawOnLnode // draw stuff at a location by episode/map# if (fits && i<2) { - V_DrawPatch(lnodes[wbs->epsd][n].x, lnodes[wbs->epsd][n].y, - FB, c[i]); + V_DrawPatch(lnodes[wbs->epsd][n].x, lnodes[wbs->epsd][n].y, c[i]); } else { @@ -706,7 +710,7 @@ static void WI_drawAnimatedBack(void) a = &anims[wbs->epsd][i]; if (a->ctr >= 0) - V_DrawPatch(a->loc.x, a->loc.y, FB, a->p[a->ctr]); + V_DrawPatch(a->loc.x, a->loc.y, a->p[a->ctr]); } } @@ -764,13 +768,13 @@ WI_drawNum while (digits--) { x -= fontwidth; - V_DrawPatch(x, y, FB, num[ n % 10 ]); + V_DrawPatch(x, y, num[ n % 10 ]); n /= 10; } // draw a minus sign if necessary if (neg && wiminus) - V_DrawPatch(x-=8, y, FB, wiminus); + V_DrawPatch(x-=8, y, wiminus); return x; } @@ -793,7 +797,7 @@ WI_drawPercent if (p < 0) return; - V_DrawPatch(x, y, FB, percent); + V_DrawPatch(x, y, percent); WI_drawNum(x, y, p, -1); } @@ -833,7 +837,7 @@ WI_drawTime // draw if (div==60 || t / div) - V_DrawPatch(x, y, FB, colon); + V_DrawPatch(x, y, colon); } while (t / div && div < 3600); @@ -847,7 +851,7 @@ WI_drawTime else { // "sucks" - V_DrawPatch(x - SHORT(sucks->width), y, FB, sucks); + V_DrawPatch(x - SHORT(sucks->width), y, sucks); } } @@ -1294,11 +1298,10 @@ static void WI_drawDeathmatchStats(void) // draw stat titles (top line) V_DrawPatch(DM_TOTALSX-SHORT(total->width)/2, DM_MATRIXY-WI_SPACINGY+10, - FB, total); - V_DrawPatch(DM_KILLERSX, DM_KILLERSY, FB, killers); - V_DrawPatch(DM_VICTIMSX, DM_VICTIMSY, FB, victims); + V_DrawPatch(DM_KILLERSX, DM_KILLERSY, killers); + V_DrawPatch(DM_VICTIMSX, DM_VICTIMSY, victims); // draw P? x = DM_MATRIXX + DM_SPACINGX; @@ -1310,33 +1313,29 @@ static void WI_drawDeathmatchStats(void) { V_DrawPatch(x-SHORT(p[i]->width)/2, DM_MATRIXY - WI_SPACINGY, - FB, p[i]); V_DrawPatch(DM_MATRIXX-SHORT(p[i]->width)/2, y, - FB, p[i]); if (i == me) { V_DrawPatch(x-SHORT(p[i]->width)/2, DM_MATRIXY - WI_SPACINGY, - FB, bstar); V_DrawPatch(DM_MATRIXX-SHORT(p[i]->width)/2, y, - FB, star); } } else { // V_DrawPatch(x-SHORT(bp[i]->width)/2, - // DM_MATRIXY - WI_SPACINGY, FB, bp[i]); + // DM_MATRIXY - WI_SPACINGY, bp[i]); // V_DrawPatch(DM_MATRIXX-SHORT(bp[i]->width)/2, - // y, FB, bp[i]); + // y, bp[i]); } x += DM_SPACINGX; y += WI_SPACINGY; @@ -1601,17 +1600,17 @@ static void WI_drawNetgameStats(void) // draw stat titles (top line) V_DrawPatch(NG_STATSX+NG_SPACINGX-SHORT(kills->width), - NG_STATSY, FB, kills); + NG_STATSY, kills); V_DrawPatch(NG_STATSX+2*NG_SPACINGX-SHORT(items->width), - NG_STATSY, FB, items); + NG_STATSY, items); V_DrawPatch(NG_STATSX+3*NG_SPACINGX-SHORT(secret->width), - NG_STATSY, FB, secret); + NG_STATSY, secret); if (dofrags) V_DrawPatch(NG_STATSX+4*NG_SPACINGX-SHORT(frags->width), - NG_STATSY, FB, frags); + NG_STATSY, frags); // draw stats y = NG_STATSY + SHORT(kills->height); @@ -1622,10 +1621,10 @@ static void WI_drawNetgameStats(void) continue; x = NG_STATSX; - V_DrawPatch(x-SHORT(p[i]->width), y, FB, p[i]); + V_DrawPatch(x-SHORT(p[i]->width), y, p[i]); if (i == me) - V_DrawPatch(x-SHORT(p[i]->width), y, FB, star); + V_DrawPatch(x-SHORT(p[i]->width), y, star); x += NG_SPACINGX; WI_drawPercent(x-pwidth, y+10, cnt_kills[i]); x += NG_SPACINGX; @@ -1817,16 +1816,16 @@ static void WI_drawStats(void) WI_drawLF(); - V_DrawPatch(SP_STATSX, SP_STATSY, FB, kills); + V_DrawPatch(SP_STATSX, SP_STATSY, kills); WI_drawPercent(ORIGWIDTH - SP_STATSX, SP_STATSY, cnt_kills[0]); - V_DrawPatch(SP_STATSX, SP_STATSY+lh, FB, items); + V_DrawPatch(SP_STATSX, SP_STATSY+lh, items); WI_drawPercent(ORIGWIDTH - SP_STATSX, SP_STATSY+lh, cnt_items[0]); - V_DrawPatch(SP_STATSX, SP_STATSY+2*lh, FB, sp_secret); + V_DrawPatch(SP_STATSX, SP_STATSY+2*lh, sp_secret); WI_drawPercent(ORIGWIDTH - SP_STATSX, SP_STATSY+2*lh, cnt_secret[0]); - V_DrawPatch(SP_TIMEX, SP_TIMEY, FB, witime); + V_DrawPatch(SP_TIMEX, SP_TIMEY, witime); WI_drawTime(ORIGWIDTH/2 - SP_TIMEX, SP_TIMEY, cnt_time, true); // Ty 04/11/98: redid logic: should skip only if with pwad but @@ -1837,7 +1836,7 @@ static void WI_drawStats(void) if (W_IsIWADLump(maplump) || deh_pars || um_pars) if (wbs->epsd < 3 || um_pars) { - V_DrawPatch(ORIGWIDTH/2 + SP_TIMEX, SP_TIMEY, FB, par); + V_DrawPatch(ORIGWIDTH/2 + SP_TIMEX, SP_TIMEY, par); WI_drawTime(ORIGWIDTH - SP_TIMEX, SP_TIMEY, cnt_par, true); } @@ -1845,7 +1844,7 @@ static void WI_drawStats(void) { const boolean wide = (wbs->totaltimes / TICRATE > 61*59) || (SP_TIMEX + SHORT(total->width) >= ORIGWIDTH/4); - V_DrawPatch(SP_TIMEX, SP_TIMEY + 16, FB, total); + V_DrawPatch(SP_TIMEX, SP_TIMEY + 16, total); // [FG] choose x-position depending on width of time string WI_drawTime((wide ? ORIGWIDTH : ORIGWIDTH/2) - SP_TIMEX, SP_TIMEY + 16, cnt_total_time, false); } @@ -1932,27 +1931,6 @@ void WI_Ticker(void) } } -// killough 11/98: -// Moved to separate function so that i_video.c could call it - -void WI_DrawBackground(void) -{ - char name[32]; - - if (state != StatCount && enterpic) - strcpy(name, enterpic); - else if (exitpic) - strcpy(name, exitpic); - // with UMAPINFO it is possible that wbs->epsd > 3 - else if (gamemode == commercial || wbs->epsd >= 3) - strcpy(name, "INTERPIC"); - else - sprintf(name, "WIMAP%d", wbs->epsd); - - // background - V_DrawPatchFullScreen(1, W_CacheLumpName(name, PU_CACHE)); -} - // ==================================================================== // WI_loadData // Purpose: Initialize intermission data such as background graphics, diff --git a/src/wi_stuff.h b/src/wi_stuff.h index bb765390..2d68cae5 100644 --- a/src/wi_stuff.h +++ b/src/wi_stuff.h @@ -46,7 +46,7 @@ void WI_Start(wbstartstruct_t* wbstartstruct); void WI_checkForAccelerate(void); // killough 11/98 -void WI_DrawBackground(void); // killough 11/98 +void WI_slamBackground(void); // killough 11/98 #endif