mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Fix top/bottom colors for the SW renderers.
This commit is contained in:
parent
6437a77021
commit
9a4b065eaf
4 changed files with 20 additions and 11 deletions
|
@ -63,9 +63,6 @@ extern lightstyle_t r_lightstyle[MAX_LIGHTSTYLES];
|
|||
|
||||
//===============
|
||||
|
||||
#define TOP_RANGE 16 // soldier uniform colors
|
||||
#define BOTTOM_RANGE 96
|
||||
|
||||
typedef struct entity_s {
|
||||
struct entity_s *next;
|
||||
struct entity_s *unext; //FIXME this shouldn't be here. for qw demos
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
#define MAX_CACHED_SKINS 128
|
||||
#define MAX_SKIN_LENGTH 32
|
||||
|
||||
#define TOP_RANGE 16 // soldier uniform colors
|
||||
#define BOTTOM_RANGE 96
|
||||
|
||||
#define RSSHOT_WIDTH 320
|
||||
#define RSSHOT_HEIGHT 200
|
||||
|
||||
|
|
|
@ -63,29 +63,37 @@ new_skin (void)
|
|||
VISIBLE void
|
||||
Skin_SetTranslation (int cmap, int top, int bottom)
|
||||
{
|
||||
#if 0
|
||||
int i, j;
|
||||
byte *source;
|
||||
byte *dest;
|
||||
|
||||
if (!cmap) // 0 is meant for no custom mapping. this just makes
|
||||
return; // other code simpler
|
||||
top = bound (0, top, 13) * 16;
|
||||
bottom = bound (0, bottom, 13) * 16;
|
||||
|
||||
source = vid.colormap8;
|
||||
if (cmap < 0 || cmap > MAX_TRANSLATIONS) {
|
||||
Sys_MaskPrintf (SYS_SKIN, "invalid skin slot: %d\n", cmap);
|
||||
cmap = 1;
|
||||
}
|
||||
|
||||
for (i = 0; i < VID_GRADES; i++, source += 256) {
|
||||
dest = translations[cmap - 1];
|
||||
source = vid.colormap8;
|
||||
memcpy (dest, source, VID_GRADES * 256);
|
||||
|
||||
for (i = 0; i < VID_GRADES; i++, dest += 256, source += 256) {
|
||||
if (top < 128) // the artists made some backwards ranges.
|
||||
memcpy (trans->top[i], source + top, 16);
|
||||
memcpy (dest + TOP_RANGE, source + top, 16);
|
||||
else
|
||||
for (j = 0; j < 16; j++)
|
||||
trans->top[i][j] = source[top + 15 - j];
|
||||
dest[TOP_RANGE + j] = source[top + 15 - j];
|
||||
|
||||
if (bottom < 128)
|
||||
memcpy (trans->bottom[i], source + bottom, 16);
|
||||
memcpy (dest + BOTTOM_RANGE, source + bottom, 16);
|
||||
else
|
||||
for (j = 0; j < 16; j++)
|
||||
trans->bottom[i][j] = source[bottom + 15 - j];
|
||||
dest[BOTTOM_RANGE + j] = source[bottom + 15 - j];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
skin_t *
|
||||
|
|
|
@ -1115,6 +1115,7 @@ CL_ProcessUserInfo (int slot, player_info_t *player)
|
|||
else
|
||||
player->spectator = false;
|
||||
|
||||
Skin_SetTranslation (slot + 1, player->topcolor, player->bottomcolor);
|
||||
//XXX if (cls.state == ca_active)
|
||||
//XXX Skin_Find (player);
|
||||
|
||||
|
|
Loading…
Reference in a new issue