ref: d35a4b7cf3a206a35ac57e279fb36bad9436ab0b
parent: 738e91cd6052ddfd12651cd2f639888cbc64b05e
author: Simon Howard <[email protected]>
date: Wed Oct 1 15:03:51 EDT 2008
Merge tinttable variable to common. Subversion-branch: /branches/raven-branch Subversion-revision: 1316
--- a/src/heretic/r_draw.c
+++ b/src/heretic/r_draw.c
@@ -39,7 +39,6 @@
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 @@
{
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);
--- a/src/hexen/r_draw.c
+++ b/src/hexen/r_draw.c
@@ -40,7 +40,6 @@
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 @@
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,
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -390,7 +390,7 @@
}
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 @@
}
}
+//
+// Load tint table from TINTTAB lump.
+//
-
-
+void V_LoadTintTable(void)
+{
+ tinttable = W_CacheLumpName("TINTTAB", PU_STATIC);
+}
//
// V_DrawBlock
--- a/src/v_video.h
+++ b/src/v_video.h
@@ -46,6 +46,8 @@
extern const byte gammatable[5][256];
+extern byte *tinttable;
+
// Allocates buffer screens, call before R_Init.
void V_Init (void);
@@ -86,6 +88,11 @@
// "DOOM%02i.pcx"
void V_ScreenShot(char *format);
+
+// Load the lookup table for translucency calculations from the TINTTAB
+// lump.
+
+void V_LoadTintTable(void);
#endif