summaryrefslogtreecommitdiff
path: root/src/doom/st_stuff.c
diff options
context:
space:
mode:
authorSimon Howard2008-09-20 21:11:04 +0000
committerSimon Howard2008-09-20 21:11:04 +0000
commit221a00eba5f46470e92f9259fe1202851703ac8c (patch)
treeb68740c52056c96273ae458ea7e2bf5b462f2f63 /src/doom/st_stuff.c
parent10d63425ca7ee205aa986a4aaf34affadaa0434c (diff)
downloadchocolate-doom-221a00eba5f46470e92f9259fe1202851703ac8c.tar.gz
chocolate-doom-221a00eba5f46470e92f9259fe1202851703ac8c.tar.bz2
chocolate-doom-221a00eba5f46470e92f9259fe1202851703ac8c.zip
Remove screens[] and all remaining use of it.
Subversion-branch: /branches/raven-branch Subversion-revision: 1251
Diffstat (limited to 'src/doom/st_stuff.c')
-rw-r--r--src/doom/st_stuff.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/doom/st_stuff.c b/src/doom/st_stuff.c
index 97968f2a..e6ef0828 100644
--- a/src/doom/st_stuff.c
+++ b/src/doom/st_stuff.c
@@ -269,6 +269,8 @@
#define ST_MAPTITLEY 0
#define ST_MAPHEIGHT 1
+// graphics are drawn to a backing screen and blitted to the real screen
+byte *st_backing_screen;
// main player in game
static player_t* plyr;
@@ -276,9 +278,6 @@ static player_t* plyr;
// ST_Start() has just been called
static boolean st_firsttime;
-// used to execute ST_Init() only once
-static int veryfirsttime = 1;
-
// lump number for PLAYPAL
static int lu_palette;
@@ -433,7 +432,7 @@ void ST_refreshBackground(void)
if (st_statusbaron)
{
- V_UseBuffer(screens[BG]);
+ V_UseBuffer(st_backing_screen);
V_DrawPatch(ST_X, 0, sbar);
@@ -442,7 +441,7 @@ void ST_refreshBackground(void)
V_RestoreBuffer();
- V_CopyRect(ST_X, 0, screens[BG], ST_WIDTH, ST_HEIGHT, ST_X, ST_Y);
+ V_CopyRect(ST_X, 0, st_backing_screen, ST_WIDTH, ST_HEIGHT, ST_X, ST_Y);
}
}
@@ -1407,7 +1406,7 @@ void ST_Stop (void)
void ST_Init (void)
{
- veryfirsttime = 0;
ST_loadData();
- screens[4] = (byte *) Z_Malloc(ST_WIDTH*ST_HEIGHT, PU_STATIC, 0);
+ st_backing_screen = (byte *) Z_Malloc(ST_WIDTH * ST_HEIGHT, PU_STATIC, 0);
}
+