summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2008-09-20 21:37:33 +0000
committerSimon Howard2008-09-20 21:37:33 +0000
commit71d54112ed3ffc780846a222e3dd45368acd3d88 (patch)
tree98f47a604f591ebf2919612a36291b12b64b86da
parent7c1407ea7171f83287b720ec65450940c9cbf158 (diff)
downloadchocolate-doom-71d54112ed3ffc780846a222e3dd45368acd3d88.tar.gz
chocolate-doom-71d54112ed3ffc780846a222e3dd45368acd3d88.tar.bz2
chocolate-doom-71d54112ed3ffc780846a222e3dd45368acd3d88.zip
Replace heretic "screen" variable with I_VideoBuffer.
Subversion-branch: /branches/raven-branch Subversion-revision: 1253
-rw-r--r--src/heretic/am_map.c9
-rw-r--r--src/heretic/doomdef.h2
-rw-r--r--src/heretic/f_finale.c23
-rw-r--r--src/heretic/in_lude.c3
-rw-r--r--src/heretic/m_misc.c3
-rw-r--r--src/heretic/mn_menu.c5
-rw-r--r--src/heretic/r_draw.c7
-rw-r--r--src/heretic/r_main.c2
-rw-r--r--src/heretic/sb_bar.c4
9 files changed, 30 insertions, 28 deletions
diff --git a/src/heretic/am_map.c b/src/heretic/am_map.c
index 44f9b1c9..77fa2524 100644
--- 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 @@ void AM_initVariables(void)
//static event_t st_notify = { ev_keyup, AM_MSGENTERED };
automapactive = true;
- fb = screen;
+ fb = I_VideoBuffer;
f_oldloc.x = INT_MAX;
amclock = 0;
@@ -779,16 +780,16 @@ void AM_clearFB(int color)
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)
j = 0;
}
-// memcpy(screen, maplump, finit_width*finit_height);
+// memcpy(I_VideoBuffer, maplump, finit_width*finit_height);
// memset(fb, color, f_w*f_h);
}
diff --git a/src/heretic/doomdef.h b/src/heretic/doomdef.h
index 4505abcd..ba4be1c5 100644
--- a/src/heretic/doomdef.h
+++ b/src/heretic/doomdef.h
@@ -648,8 +648,6 @@ extern int mouseSensitivity;
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;
diff --git a/src/heretic/f_finale.c b/src/heretic/f_finale.c
index e6053a60..d054459c 100644
--- 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 @@ boolean F_Responder(event_t * event)
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 @@ void F_TextWrite(void)
// 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 @@ void F_DrawPatchCol(int x, patch_t * patch, int col)
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 @@ void F_DemonScroll(void)
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 @@ void F_DrawUnderwater(void)
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 @@ void F_DrawUnderwater(void)
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.
}
}
diff --git a/src/heretic/in_lude.c b/src/heretic/in_lude.c
index 7e574570..255e5f98 100644
--- 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 @@ void IN_DrawStatBack(void)
byte *dest;
src = W_CacheLumpName("FLOOR16", PU_CACHE);
- dest = screen;
+ dest = I_VideoBuffer;
for (y = 0; y < SCREENHEIGHT; y++)
{
diff --git a/src/heretic/m_misc.c b/src/heretic/m_misc.c
index 951dce0c..fe969f4c 100644
--- 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 @@ void M_ScreenShot(void)
#ifdef _WATCOMC_
linear = pcscreen;
#else
- linear = screen;
+ linear = I_VideoBuffer;
#endif
//
// find a file name to save it to
diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c
index 5a7f2801..5c411813 100644
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -1553,9 +1553,8 @@ void MN_DeactivateMenu(void)
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));
}
diff --git a/src/heretic/r_draw.c b/src/heretic/r_draw.c
index 1266187b..a745c4f0 100644
--- 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 @@ void R_InitBuffer(int width, int height)
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 @@ void R_DrawViewBorder(void)
{
src = W_CacheLumpName("FLAT513", PU_CACHE);
}
- dest = screen;
+ dest = I_VideoBuffer;
for (y = 0; y < SCREENHEIGHT - SBARHEIGHT; y++)
{
@@ -498,7 +499,7 @@ void R_DrawTopBorder(void)
{
src = W_CacheLumpName("FLAT513", PU_CACHE);
}
- dest = screen;
+ dest = I_VideoBuffer;
for (y = 0; y < 30; y++)
{
diff --git a/src/heretic/r_main.c b/src/heretic/r_main.c
index 7137615a..ef5ec6d2 100644
--- a/src/heretic/r_main.c
+++ b/src/heretic/r_main.c
@@ -832,7 +832,7 @@ void R_SetupFrame(player_t * player)
#if 0
{
static int frame;
- memset(screen, frame, SCREENWIDTH * SCREENHEIGHT);
+ memset(I_VideoBuffer, frame, SCREENWIDTH * SCREENHEIGHT);
frame++;
}
#endif
diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c
index 57db3560..02608ae7 100644
--- 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 *PatchINVBAR;
patch_t *PatchARMCLEAR;
patch_t *PatchCHAINBACK;
//byte *ShadeTables;
-extern byte *screen;
int FontBNumBase;
int spinbooklump;
int spinflylump;
@@ -558,7 +558,7 @@ static void ShadeLine(int x, int y, int height, int shade)
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);