summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2008-10-01 19:03:51 +0000
committerSimon Howard2008-10-01 19:03:51 +0000
commitd35a4b7cf3a206a35ac57e279fb36bad9436ab0b (patch)
tree83ac66521be9ba4b6ba83c76ce8057fde045717a
parent738e91cd6052ddfd12651cd2f639888cbc64b05e (diff)
downloadchocolate-doom-d35a4b7cf3a206a35ac57e279fb36bad9436ab0b.tar.gz
chocolate-doom-d35a4b7cf3a206a35ac57e279fb36bad9436ab0b.tar.bz2
chocolate-doom-d35a4b7cf3a206a35ac57e279fb36bad9436ab0b.zip
Merge tinttable variable to common.
Subversion-branch: /branches/raven-branch Subversion-revision: 1316
-rw-r--r--src/heretic/r_draw.c4
-rw-r--r--src/hexen/r_draw.c4
-rw-r--r--src/v_video.c11
-rw-r--r--src/v_video.h7
4 files changed, 17 insertions, 9 deletions
diff --git a/src/heretic/r_draw.c b/src/heretic/r_draw.c
index 468645f6..23726b9c 100644
--- a/src/heretic/r_draw.c
+++ b/src/heretic/r_draw.c
@@ -39,7 +39,6 @@ int viewwidth, scaledviewwidth, viewheight, viewwindowx, viewwindowy;
byte *ylookup[MAXHEIGHT];
int columnofs[MAXWIDTH];
byte translations[3][256]; // color tables for different players
-byte *tinttable; // used for translucent sprites
/*
==================
@@ -241,8 +240,7 @@ void R_InitTranslationTables(void)
{
int i;
- // Load tint table
- tinttable = W_CacheLumpName("TINTTAB", PU_STATIC);
+ V_LoadTintTable();
// Allocate translation tables
translationtables = Z_Malloc(256 * 3 + 255, PU_STATIC, 0);
diff --git a/src/hexen/r_draw.c b/src/hexen/r_draw.c
index 915d25b9..04d4009d 100644
--- a/src/hexen/r_draw.c
+++ b/src/hexen/r_draw.c
@@ -40,7 +40,6 @@ int viewwidth, scaledviewwidth, viewheight, viewwindowx, viewwindowy;
byte *ylookup[MAXHEIGHT];
int columnofs[MAXWIDTH];
//byte translations[3][256]; // color tables for different players
-byte *tinttable; // used for translucent sprites
/*
==================
@@ -332,8 +331,7 @@ void R_InitTranslationTables(void)
int i;
byte *transLump;
- // Load tint table
- tinttable = W_CacheLumpName("TINTTAB", PU_STATIC);
+ V_LoadTintTable();
// Allocate translation tables
translationtables = Z_Malloc(256 * 3 * (MAXPLAYERS - 1) + 255,
diff --git a/src/v_video.c b/src/v_video.c
index 564359a4..69da2aed 100644
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -390,7 +390,7 @@ void V_DrawAltTLPatch(int x, int y, patch_t * patch)
}
col = 0;
- desttop = screen + y * SCREENWIDTH + x;
+ desttop = dest_screen + y * SCREENWIDTH + x;
w = SHORT(patch->width);
for (; col < w; x++, col++, desttop++)
@@ -471,9 +471,14 @@ void V_DrawShadowedPatch(int x, int y, patch_t *patch)
}
}
+//
+// Load tint table from TINTTAB lump.
+//
-
-
+void V_LoadTintTable(void)
+{
+ tinttable = W_CacheLumpName("TINTTAB", PU_STATIC);
+}
//
// V_DrawBlock
diff --git a/src/v_video.h b/src/v_video.h
index 34c36f79..649e7175 100644
--- a/src/v_video.h
+++ b/src/v_video.h
@@ -46,6 +46,8 @@ extern int dirtybox[4];
extern const byte gammatable[5][256];
+extern byte *tinttable;
+
// Allocates buffer screens, call before R_Init.
void V_Init (void);
@@ -87,5 +89,10 @@ void V_RestoreBuffer(void);
void V_ScreenShot(char *format);
+// Load the lookup table for translucency calculations from the TINTTAB
+// lump.
+
+void V_LoadTintTable(void);
+
#endif