ref: 71d54112ed3ffc780846a222e3dd45368acd3d88
parent: 7c1407ea7171f83287b720ec65450940c9cbf158
author: Simon Howard <[email protected]>
date: Sat Sep 20 17:37:33 EDT 2008
Replace heretic "screen" variable with I_VideoBuffer. Subversion-branch: /branches/raven-branch Subversion-revision: 1253
--- a/src/heretic/am_map.c
+++ b/src/heretic/am_map.c
@@ -26,6 +26,7 @@
#include <stdio.h>
#include "doomdef.h"
+#include "i_video.h"
#include "p_local.h"
#include "am_map.h"
#include "am_data.h"
@@ -330,7 +331,7 @@
//static event_t st_notify = { ev_keyup, AM_MSGENTERED };
automapactive = true;
- fb = screen;
+ fb = I_VideoBuffer;
f_oldloc.x = INT_MAX;
amclock = 0;
@@ -779,9 +780,9 @@
j = mapystart * finit_width;
for (i = 0; i < finit_height; i++)
{
- memcpy(screen + i * finit_width, maplump + j + mapxstart,
+ memcpy(I_VideoBuffer + i * finit_width, maplump + j + mapxstart,
finit_width - mapxstart);
- memcpy(screen + i * finit_width + finit_width - mapxstart,
+ memcpy(I_VideoBuffer + i * finit_width + finit_width - mapxstart,
maplump + j, mapxstart);
j += finit_width;
if (j >= finit_height * finit_width)
@@ -788,7 +789,7 @@
j = 0;
}
-// memcpy(screen, maplump, finit_width*finit_height);
+// memcpy(I_VideoBuffer, maplump, finit_width*finit_height);
// memset(fb, color, f_w*f_h);
}
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -648,8 +648,6 @@
extern boolean precache; // if true, load all graphics at level load
-extern byte *screen; // off screen work buffer, from V_video.c
-
extern boolean singledemo; // quit after playing a demo from cmdline
extern FILE *debugfile;
--- a/src/heretic/f_finale.c
+++ b/src/heretic/f_finale.c
@@ -26,6 +26,7 @@
#include "doomdef.h"
#include "i_swap.h"
+#include "i_video.h"
#include "s_sound.h"
#include "v_video.h"
@@ -110,9 +111,11 @@
if (finalestage == 1 && gameepisode == 2)
{ // we're showing the water pic, make any key kick to demo mode
finalestage++;
+ /*
memset((byte *) 0xa0000, 0, SCREENWIDTH * SCREENHEIGHT);
- memset(screen, 0, SCREENWIDTH * SCREENHEIGHT);
+ memset(I_VideoBuffer, 0, SCREENWIDTH * SCREENHEIGHT);
I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE));
+ */
return true;
}
return false;
@@ -173,7 +176,7 @@
// erase the entire screen to a tiled background
//
src = W_CacheLumpName(finaleflat, PU_CACHE);
- dest = screen;
+ dest = I_VideoBuffer;
for (y = 0; y < SCREENHEIGHT; y++)
{
for (x = 0; x < SCREENWIDTH / 64; x++)
@@ -236,7 +239,7 @@
int count;
column = (column_t *) ((byte *) patch + LONG(patch->columnofs[col]));
- desttop = screen + x;
+ desttop = I_VideoBuffer + x;
// step through the posts in a column
@@ -277,20 +280,20 @@
p2 = W_CacheLumpName("FINAL2", PU_LEVEL);
if (finalecount < 70)
{
- memcpy(screen, p1, SCREENHEIGHT * SCREENWIDTH);
+ memcpy(I_VideoBuffer, p1, SCREENHEIGHT * SCREENWIDTH);
nextscroll = finalecount;
return;
}
if (yval < 64000)
{
- memcpy(screen, p2 + SCREENHEIGHT * SCREENWIDTH - yval, yval);
- memcpy(screen + yval, p1, SCREENHEIGHT * SCREENWIDTH - yval);
+ memcpy(I_VideoBuffer, p2 + SCREENHEIGHT * SCREENWIDTH - yval, yval);
+ memcpy(I_VideoBuffer + yval, p1, SCREENHEIGHT * SCREENWIDTH - yval);
yval += SCREENWIDTH;
nextscroll = finalecount + 3;
}
else
{ //else, we'll just sit here and wait, for now
- memcpy(screen, p2, SCREENWIDTH * SCREENHEIGHT);
+ memcpy(I_VideoBuffer, p2, SCREENWIDTH * SCREENHEIGHT);
}
}
@@ -316,8 +319,7 @@
underwawa = true;
memset((byte *) 0xa0000, 0, SCREENWIDTH * SCREENHEIGHT);
I_SetPalette(W_CacheLumpName("E2PAL", PU_CACHE));
- memcpy(screen, W_CacheLumpName("E2END", PU_CACHE),
- SCREENWIDTH * SCREENHEIGHT);
+ V_DrawRawScreen(W_CacheLumpName("E2END", PU_CACHE));
}
paused = false;
MenuActive = false;
@@ -325,8 +327,7 @@
break;
case 2:
- memcpy(screen, W_CacheLumpName("TITLE", PU_CACHE),
- SCREENWIDTH * SCREENHEIGHT);
+ V_DrawRawScreen(W_CacheLumpName("TITLE", PU_CACHE));
//D_StartTitle(); // go to intro/demo mode.
}
}
--- a/src/heretic/in_lude.c
+++ b/src/heretic/in_lude.c
@@ -30,6 +30,7 @@
#include "doomdef.h"
#include "s_sound.h"
+#include "i_video.h"
#include "v_video.h"
typedef enum
@@ -558,7 +559,7 @@
byte *dest;
src = W_CacheLumpName("FLOOR16", PU_CACHE);
- dest = screen;
+ dest = I_VideoBuffer;
for (y = 0; y < SCREENHEIGHT; y++)
{
--- a/src/heretic/m_misc.c
+++ b/src/heretic/m_misc.c
@@ -32,6 +32,7 @@
#include "doomdef.h"
#include "i_swap.h"
+#include "i_video.h"
#include "s_sound.h"
int myargc;
@@ -777,7 +778,7 @@
#ifdef _WATCOMC_
linear = pcscreen;
#else
- linear = screen;
+ linear = I_VideoBuffer;
#endif
//
// find a file name to save it to
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -1553,9 +1553,8 @@
void MN_DrawInfo(void)
{
I_SetPalette(W_CacheLumpName("PLAYPAL", PU_CACHE));
- memcpy(screen,
- (byte *) W_CacheLumpNum(W_GetNumForName("TITLE") + InfoType,
- PU_CACHE), SCREENWIDTH * SCREENHEIGHT);
+ V_DrawRawScreen(W_CacheLumpNum(W_GetNumForName("TITLE") + InfoType,
+ PU_CACHE));
// V_DrawPatch(0, 0, W_CacheLumpNum(W_GetNumForName("TITLE")+InfoType,
// PU_CACHE));
}
--- a/src/heretic/r_draw.c
+++ b/src/heretic/r_draw.c
@@ -24,6 +24,7 @@
#include "doomdef.h"
#include "r_local.h"
+#include "i_video.h"
#include "v_video.h"
/*
@@ -403,7 +404,7 @@
else
viewwindowy = (SCREENHEIGHT - SBARHEIGHT - height) >> 1;
for (i = 0; i < height; i++)
- ylookup[i] = screen + (i + viewwindowy) * SCREENWIDTH;
+ ylookup[i] = I_VideoBuffer + (i + viewwindowy) * SCREENWIDTH;
}
@@ -434,7 +435,7 @@
{
src = W_CacheLumpName("FLAT513", PU_CACHE);
}
- dest = screen;
+ dest = I_VideoBuffer;
for (y = 0; y < SCREENHEIGHT - SBARHEIGHT; y++)
{
@@ -498,7 +499,7 @@
{
src = W_CacheLumpName("FLAT513", PU_CACHE);
}
- dest = screen;
+ dest = I_VideoBuffer;
for (y = 0; y < 30; y++)
{
--- a/src/heretic/r_main.c
+++ b/src/heretic/r_main.c
@@ -832,7 +832,7 @@
#if 0
{
static int frame;
- memset(screen, frame, SCREENWIDTH * SCREENHEIGHT);
+ memset(I_VideoBuffer, frame, SCREENWIDTH * SCREENHEIGHT);
frame++;
}
#endif
--- a/src/heretic/sb_bar.c
+++ b/src/heretic/sb_bar.c
@@ -24,6 +24,7 @@
// SB_bar.c
#include "doomdef.h"
+#include "i_video.h"
#include "p_local.h"
#include "s_sound.h"
#include "v_video.h"
@@ -125,7 +126,6 @@
patch_t *PatchARMCLEAR;
patch_t *PatchCHAINBACK;
//byte *ShadeTables;
-extern byte *screen;
int FontBNumBase;
int spinbooklump;
int spinflylump;
@@ -558,7 +558,7 @@
byte *shades;
shades = colormaps + 9 * 256 + shade * 2 * 256;
- dest = screen + y * SCREENWIDTH + x;
+ dest = I_VideoBuffer + y * SCREENWIDTH + x;
while (height--)
{
*(dest) = *(shades + *dest);