Adapt setup of colormap linedefs

This commit is contained in:
MascaraSnake 2020-03-20 11:19:30 +01:00
parent c2443b8e8c
commit 7cf9ad2f2b
4 changed files with 197 additions and 87 deletions

View File

@ -1131,8 +1131,11 @@ static void P_LoadSidedefs(UINT8 *data)
case 455: // Fade colormaps! mazmazz 9/12/2018 (:flag_us:) case 455: // Fade colormaps! mazmazz 9/12/2018 (:flag_us:)
// SoM: R_CreateColormap will only create a colormap in software mode... // SoM: R_CreateColormap will only create a colormap in software mode...
// Perhaps we should just call it instead of doing the calculations here. // Perhaps we should just call it instead of doing the calculations here.
sd->colormap_data = R_CreateColormapFromLinedef(msd->toptexture, msd->midtexture, msd->bottomtexture); if (!udmf)
sd->toptexture = sd->midtexture = sd->bottomtexture = 0; {
sd->colormap_data = R_CreateColormapFromLinedef(msd->toptexture, msd->midtexture, msd->bottomtexture);
sd->toptexture = sd->midtexture = sd->bottomtexture = 0;
}
break; break;
case 413: // Change music case 413: // Change music
@ -1713,7 +1716,7 @@ static void P_LoadTextmap(void)
{ {
INT32 rgba = P_ColorToRGBA(textmap_colormap.lightcolor, textmap_colormap.lightalpha); INT32 rgba = P_ColorToRGBA(textmap_colormap.lightcolor, textmap_colormap.lightalpha);
INT32 fadergba = P_ColorToRGBA(textmap_colormap.fadecolor, textmap_colormap.fadealpha); INT32 fadergba = P_ColorToRGBA(textmap_colormap.fadecolor, textmap_colormap.fadealpha);
sc->extra_colormap = R_CreateColormap(rgba, fadergba, textmap_colormap.fadestart, textmap_colormap.fadeend, textmap_colormap.flags); sc->extra_colormap = sc->spawn_extra_colormap = R_CreateColormap(rgba, fadergba, textmap_colormap.fadestart, textmap_colormap.fadeend, textmap_colormap.flags);
} }
TextmapFixFlatOffsets(sc); TextmapFixFlatOffsets(sc);
} }
@ -1787,9 +1790,9 @@ static void P_ProcessLinedefsAfterSidedefs(void)
ld->frontsector = sides[ld->sidenum[0]].sector; //e6y: Can't be -1 here ld->frontsector = sides[ld->sidenum[0]].sector; //e6y: Can't be -1 here
ld->backsector = ld->sidenum[1] != 0xffff ? sides[ld->sidenum[1]].sector : 0; ld->backsector = ld->sidenum[1] != 0xffff ? sides[ld->sidenum[1]].sector : 0;
// Compile linedef 'text' from both sidedefs 'text' for appropriate specials.
switch (ld->special) switch (ld->special)
{ {
// Compile linedef 'text' from both sidedefs 'text' for appropriate specials.
case 331: // Trigger linedef executor: Skin - Continuous case 331: // Trigger linedef executor: Skin - Continuous
case 332: // Trigger linedef executor: Skin - Each time case 332: // Trigger linedef executor: Skin - Each time
case 333: // Trigger linedef executor: Skin - Once case 333: // Trigger linedef executor: Skin - Once
@ -1805,6 +1808,41 @@ static void P_ProcessLinedefsAfterSidedefs(void)
M_Memcpy(ld->text + strlen(ld->text) + 1, sides[ld->sidenum[1]].text, strlen(sides[ld->sidenum[1]].text) + 1); M_Memcpy(ld->text + strlen(ld->text) + 1, sides[ld->sidenum[1]].text, strlen(sides[ld->sidenum[1]].text) + 1);
} }
break; break;
case 447: // Change colormap
case 455: // Fade colormap
if (udmf)
break;
if (ld->flags & ML_DONTPEGBOTTOM) // alternate alpha (by texture offsets)
{
extracolormap_t *exc = R_CopyColormap(sides[ld->sidenum[0]].colormap_data, false);
INT16 alpha = max(min(sides[ld->sidenum[0]].textureoffset >> FRACBITS, 25), -25);
INT16 fadealpha = max(min(sides[ld->sidenum[0]].rowoffset >> FRACBITS, 25), -25);
// If alpha is negative, set "subtract alpha" flag and store absolute value
if (alpha < 0)
{
alpha *= -1;
ld->args[2] |= 16;
}
if (fadealpha < 0)
{
fadealpha *= -1;
ld->args[2] |= 256;
}
exc->rgba = R_GetRgbaRGB(exc->rgba) + R_PutRgbaA(alpha);
exc->fadergba = R_GetRgbaRGB(exc->fadergba) + R_PutRgbaA(fadealpha);
if (!(sides[ld->sidenum[0]].colormap_data = R_GetColormapFromList(exc)))
{
exc->colormap = R_CreateLightTable(exc);
R_AddColormapToList(exc);
sides[ld->sidenum[0]].colormap_data = exc;
}
else
Z_Free(exc);
}
break;
} }
} }
} }
@ -2768,6 +2806,48 @@ static void P_ConvertBinaryMap(void)
else else
CONS_Alert(CONS_WARNING, "Linedef %s is missing the hook name of the Lua function to call! (This should be given in the front texture fields)\n", sizeu1(i)); CONS_Alert(CONS_WARNING, "Linedef %s is missing the hook name of the Lua function to call! (This should be given in the front texture fields)\n", sizeu1(i));
break; break;
case 447: //Change colormap
lines[i].args[0] = lines[i].tag;
if (lines[i].flags & ML_EFFECT3)
lines[i].args[2] |= 1;
if (lines[i].flags & ML_EFFECT1)
lines[i].args[2] |= 34;
if (lines[i].flags & ML_NOCLIMB)
lines[i].args[2] |= 68;
if (lines[i].flags & ML_EFFECT2)
lines[i].args[2] |= 136;
break;
case 455: //Fade colormap
{
INT32 speed = (INT32)((((lines[i].flags & ML_DONTPEGBOTTOM) || !sides[lines[i].sidenum[0]].rowoffset) && lines[i].sidenum[1] != 0xFFFF) ?
abs(sides[lines[i].sidenum[1]].rowoffset >> FRACBITS)
: abs(sides[lines[i].sidenum[0]].rowoffset >> FRACBITS));
lines[i].args[0] = lines[i].tag;
if (lines[i].flags & ML_EFFECT4)
lines[i].args[2] = speed;
else
lines[i].args[2] = (256 + speed - 1)/speed;
if (lines[i].flags & ML_EFFECT3)
lines[i].args[3] |= 1;
if (lines[i].flags & ML_EFFECT1)
lines[i].args[3] |= 34;
if (lines[i].flags & ML_NOCLIMB)
lines[i].args[3] |= 68;
if (lines[i].flags & ML_EFFECT2)
lines[i].args[3] |= 136;
if (lines[i].flags & ML_BOUNCY)
lines[i].args[3] |= 4096;
if (lines[i].flags & ML_EFFECT5)
lines[i].args[3] |= 8192;
break;
}
case 456: //Stop fading colormap
lines[i].args[0] = lines[i].tag;
break;
case 606: //Colormap
lines[i].args[0] = lines[i].tag;
break;
case 700: //Slope front sector floor case 700: //Slope front sector floor
case 701: //Slope front sector ceiling case 701: //Slope front sector ceiling
case 702: //Slope front sector floor and ceiling case 702: //Slope front sector floor and ceiling

View File

@ -3496,46 +3496,50 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
// Except it is activated by linedef executor, not level load // Except it is activated by linedef executor, not level load
// This could even override existing colormaps I believe // This could even override existing colormaps I believe
// -- Monster Iestyn 14/06/18 // -- Monster Iestyn 14/06/18
for (secnum = -1; (secnum = P_FindSectorFromLineTag(line, secnum)) >= 0 ;) {
extracolormap_t *source;
if (!udmf)
source = sides[line->sidenum[0]].colormap_data;
else
{
if (!line->args[1])
source = line->frontsector->extra_colormap;
else
{
INT32 sourcesec = P_FindSectorFromTag(line->args[1], -1);
if (sourcesec == -1)
{
CONS_Debug(DBG_GAMELOGIC, "Line type 447 Executor: Can't find sector with source colormap (tag %d)!\n", line->args[1]);
return;
}
source = sectors[sourcesec].extra_colormap;
}
}
for (secnum = -1; (secnum = P_FindSectorFromTag(line->args[0], secnum)) >= 0;)
{ {
P_ResetColormapFader(&sectors[secnum]); P_ResetColormapFader(&sectors[secnum]);
if (line->flags & ML_EFFECT3) // relative calc if (line->args[2] & 1) // relative calc
{ {
extracolormap_t *exc = R_AddColormaps( extracolormap_t *target = (!udmf && (line->flags & ML_TFERLINE) && line->sidenum[1] != 0xFFFF) ?
(line->flags & ML_TFERLINE) && line->sidenum[1] != 0xFFFF ? sides[line->sidenum[1]].colormap_data : sectors[secnum].extra_colormap; // use back colormap instead of target sector
sides[line->sidenum[1]].colormap_data : sectors[secnum].extra_colormap, // use back colormap instead of target sector
sides[line->sidenum[0]].colormap_data,
line->flags & ML_EFFECT1, // subtract R
line->flags & ML_NOCLIMB, // subtract G
line->flags & ML_EFFECT2, // subtract B
false, // subtract A (no flag for this, just pass negative alpha)
line->flags & ML_EFFECT1, // subtract FadeR
line->flags & ML_NOCLIMB, // subtract FadeG
line->flags & ML_EFFECT2, // subtract FadeB
false, // subtract FadeA (no flag for this, just pass negative alpha)
false, // subtract FadeStart (we ran out of flags)
false, // subtract FadeEnd (we ran out of flags)
false, // ignore Flags (we ran out of flags)
line->flags & ML_DONTPEGBOTTOM,
(line->flags & ML_DONTPEGBOTTOM) ? (sides[line->sidenum[0]].textureoffset >> FRACBITS) : 0,
(line->flags & ML_DONTPEGBOTTOM) ? (sides[line->sidenum[0]].rowoffset >> FRACBITS) : 0,
false);
if (!(sectors[secnum].extra_colormap = R_GetColormapFromList(exc))) extracolormap_t *exc = R_AddColormaps(
{ target,
exc->colormap = R_CreateLightTable(exc); source,
R_AddColormapToList(exc); line->args[2] & 2, // subtract R
sectors[secnum].extra_colormap = exc; line->args[2] & 4, // subtract G
} line->args[2] & 8, // subtract B
else line->args[2] & 16, // subtract A
Z_Free(exc); line->args[2] & 32, // subtract FadeR
} line->args[2] & 64, // subtract FadeG
else if (line->flags & ML_DONTPEGBOTTOM) // alternate alpha (by texture offsets) line->args[2] & 128, // subtract FadeB
{ line->args[2] & 256, // subtract FadeA
extracolormap_t *exc = R_CopyColormap(sides[line->sidenum[0]].colormap_data, false); line->args[2] & 512, // subtract FadeStart
exc->rgba = R_GetRgbaRGB(exc->rgba) + R_PutRgbaA(max(min(sides[line->sidenum[0]].textureoffset >> FRACBITS, 25), 0)); line->args[2] & 1024, // subtract FadeEnd
exc->fadergba = R_GetRgbaRGB(exc->fadergba) + R_PutRgbaA(max(min(sides[line->sidenum[0]].rowoffset >> FRACBITS, 25), 0)); line->args[2] & 2048, // ignore Flags
false);
if (!(sectors[secnum].extra_colormap = R_GetColormapFromList(exc))) if (!(sectors[secnum].extra_colormap = R_GetColormapFromList(exc)))
{ {
@ -3547,10 +3551,10 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
Z_Free(exc); Z_Free(exc);
} }
else else
sectors[secnum].extra_colormap = sides[line->sidenum[0]].colormap_data; sectors[secnum].extra_colormap = source;
} }
break; break;
}
case 448: // Change skybox viewpoint/centerpoint case 448: // Change skybox viewpoint/centerpoint
if ((mo && mo->player && P_IsLocalPlayer(mo->player)) || (line->flags & ML_NOCLIMB)) if ((mo && mo->player && P_IsLocalPlayer(mo->player)) || (line->flags & ML_NOCLIMB))
{ {
@ -3824,15 +3828,32 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
} }
case 455: // Fade colormap case 455: // Fade colormap
for (secnum = -1; (secnum = P_FindSectorFromLineTag(line, secnum)) >= 0 ;) {
extracolormap_t *dest;
if (!udmf)
dest = sides[line->sidenum[0]].colormap_data;
else
{
if (!line->args[1])
dest = line->frontsector->extra_colormap;
else
{
INT32 destsec = P_FindSectorFromTag(line->args[1], -1);
if (destsec == -1)
{
CONS_Debug(DBG_GAMELOGIC, "Line type 455 Executor: Can't find sector with destination colormap (tag %d)!\n", line->args[1]);
return;
}
dest = sectors[destsec].extra_colormap;
}
}
for (secnum = -1; (secnum = P_FindSectorFromTag(line->args[0], secnum)) >= 0;)
{ {
extracolormap_t *source_exc, *dest_exc, *exc; extracolormap_t *source_exc, *dest_exc, *exc;
INT32 speed = (INT32)((line->flags & ML_DONTPEGBOTTOM) || !sides[line->sidenum[0]].rowoffset) && line->sidenum[1] != 0xFFFF ?
abs(sides[line->sidenum[1]].rowoffset >> FRACBITS)
: abs(sides[line->sidenum[0]].rowoffset >> FRACBITS);
// Prevent continuous execs from interfering on an existing fade // Don't interrupt ongoing fade
if (!(line->flags & ML_EFFECT5) if (!(line->args[3] & 8192)
&& sectors[secnum].fadecolormapdata) && sectors[secnum].fadecolormapdata)
//&& ((fadecolormap_t*)sectors[secnum].fadecolormapdata)->timer > (ticbased ? 2 : speed*2)) //&& ((fadecolormap_t*)sectors[secnum].fadecolormapdata)->timer > (ticbased ? 2 : speed*2))
{ {
@ -3840,19 +3861,19 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
continue; continue;
} }
if (line->flags & ML_TFERLINE) // use back colormap instead of target sector if (!udmf && (line->flags & ML_TFERLINE)) // use back colormap instead of target sector
sectors[secnum].extra_colormap = (line->sidenum[1] != 0xFFFF) ? sectors[secnum].extra_colormap = (line->sidenum[1] != 0xFFFF) ?
sides[line->sidenum[1]].colormap_data : NULL; sides[line->sidenum[1]].colormap_data : NULL;
exc = sectors[secnum].extra_colormap; exc = sectors[secnum].extra_colormap;
if (!(line->flags & ML_BOUNCY) // BOUNCY: Do not override fade from default rgba if (!(line->args[3] & 4096) // Override fade from default rgba
&& !R_CheckDefaultColormap(sides[line->sidenum[0]].colormap_data, true, false, false) && !R_CheckDefaultColormap(dest, true, false, false)
&& R_CheckDefaultColormap(exc, true, false, false)) && R_CheckDefaultColormap(exc, true, false, false))
{ {
exc = R_CopyColormap(exc, false); exc = R_CopyColormap(exc, false);
exc->rgba = R_GetRgbaRGB(sides[line->sidenum[0]].colormap_data->rgba) + R_PutRgbaA(R_GetRgbaA(exc->rgba)); exc->rgba = R_GetRgbaRGB(dest->rgba) + R_PutRgbaA(R_GetRgbaA(exc->rgba));
//exc->fadergba = R_GetRgbaRGB(sides[line->sidenum[0]].colormap_data->rgba) + R_PutRgbaA(R_GetRgbaA(exc->fadergba)); //exc->fadergba = R_GetRgbaRGB(dest->rgba) + R_PutRgbaA(R_GetRgbaA(exc->fadergba));
if (!(source_exc = R_GetColormapFromList(exc))) if (!(source_exc = R_GetColormapFromList(exc)))
{ {
@ -3868,35 +3889,26 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
else else
source_exc = exc ? exc : R_GetDefaultColormap(); source_exc = exc ? exc : R_GetDefaultColormap();
if (line->flags & ML_EFFECT3) // relative calc if (line->args[3] & 1) // relative calc
{ {
exc = R_AddColormaps( exc = R_AddColormaps(
source_exc, source_exc,
sides[line->sidenum[0]].colormap_data, dest,
line->flags & ML_EFFECT1, // subtract R line->args[3] & 2, // subtract R
line->flags & ML_NOCLIMB, // subtract G line->args[3] & 4, // subtract G
line->flags & ML_EFFECT2, // subtract B line->args[3] & 8, // subtract B
false, // subtract A (no flag for this, just pass negative alpha) line->args[3] & 16, // subtract A
line->flags & ML_EFFECT1, // subtract FadeR line->args[3] & 32, // subtract FadeR
line->flags & ML_NOCLIMB, // subtract FadeG line->args[3] & 64, // subtract FadeG
line->flags & ML_EFFECT2, // subtract FadeB line->args[3] & 128, // subtract FadeB
false, // subtract FadeA (no flag for this, just pass negative alpha) line->args[3] & 256, // subtract FadeA
false, // subtract FadeStart (we ran out of flags) line->args[3] & 512, // subtract FadeStart
false, // subtract FadeEnd (we ran out of flags) line->args[3] & 1024, // subtract FadeEnd
false, // ignore Flags (we ran out of flags) line->args[3] & 2048, // ignore Flags
line->flags & ML_DONTPEGBOTTOM,
(line->flags & ML_DONTPEGBOTTOM) ? (sides[line->sidenum[0]].textureoffset >> FRACBITS) : 0,
(line->flags & ML_DONTPEGBOTTOM) ? (sides[line->sidenum[0]].rowoffset >> FRACBITS) : 0,
false); false);
} }
else if (line->flags & ML_DONTPEGBOTTOM) // alternate alpha (by texture offsets)
{
exc = R_CopyColormap(sides[line->sidenum[0]].colormap_data, false);
exc->rgba = R_GetRgbaRGB(exc->rgba) + R_PutRgbaA(max(min(sides[line->sidenum[0]].textureoffset >> FRACBITS, 25), 0));
exc->fadergba = R_GetRgbaRGB(exc->fadergba) + R_PutRgbaA(max(min(sides[line->sidenum[0]].rowoffset >> FRACBITS, 25), 0));
}
else else
exc = R_CopyColormap(sides[line->sidenum[0]].colormap_data, false); exc = R_CopyColormap(dest, false);
if (!(dest_exc = R_GetColormapFromList(exc))) if (!(dest_exc = R_GetColormapFromList(exc)))
{ {
@ -3907,13 +3919,13 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
else else
Z_Free(exc); Z_Free(exc);
Add_ColormapFader(&sectors[secnum], source_exc, dest_exc, (line->flags & ML_EFFECT4), // tic-based timing Add_ColormapFader(&sectors[secnum], source_exc, dest_exc, true, // tic-based timing
speed); line->args[2]);
} }
break; break;
}
case 456: // Stop fade colormap case 456: // Stop fade colormap
for (secnum = -1; (secnum = P_FindSectorFromLineTag(line, secnum)) >= 0 ;) for (secnum = -1; (secnum = P_FindSectorFromTag(line->args[0], secnum)) >= 0 ;)
P_ResetColormapFader(&sectors[secnum]); P_ResetColormapFader(&sectors[secnum]);
break; break;
@ -7398,8 +7410,28 @@ void P_SpawnSpecials(boolean fromnetsave)
break; break;
case 606: // HACK! Copy colormaps. Just plain colormaps. case 606: // HACK! Copy colormaps. Just plain colormaps.
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;) for (s = -1; (s = P_FindSectorFromTag(lines[i].args[0], s)) >= 0;)
sectors[s].extra_colormap = sectors[s].spawn_extra_colormap = sides[lines[i].sidenum[0]].colormap_data; {
extracolormap_t *exc;
if (!udmf)
exc = sides[lines[i].sidenum[0]].colormap_data;
else
{
if (!lines[i].args[1])
exc = lines[i].frontsector->extra_colormap;
else
{
INT32 sourcesec = P_FindSectorFromTag(lines[i].args[1], -1);
if (sourcesec == -1)
{
CONS_Debug(DBG_GAMELOGIC, "Line type 606: Can't find sector with source colormap (tag %d)!\n", lines[i].args[1]);
return;
}
exc = sectors[sourcesec].extra_colormap;
}
}
sectors[s].extra_colormap = sectors[s].spawn_extra_colormap = exc;
}
break; break;
default: default:

View File

@ -2373,7 +2373,6 @@ extracolormap_t *R_AddColormaps(extracolormap_t *exc_augend, extracolormap_t *ex
boolean subR, boolean subG, boolean subB, boolean subA, boolean subR, boolean subG, boolean subB, boolean subA,
boolean subFadeR, boolean subFadeG, boolean subFadeB, boolean subFadeA, boolean subFadeR, boolean subFadeG, boolean subFadeB, boolean subFadeA,
boolean subFadeStart, boolean subFadeEnd, boolean ignoreFlags, boolean subFadeStart, boolean subFadeEnd, boolean ignoreFlags,
boolean useAltAlpha, INT16 altAlpha, INT16 altFadeAlpha,
boolean lighttable) boolean lighttable)
{ {
INT16 red, green, blue, alpha; INT16 red, green, blue, alpha;
@ -2409,7 +2408,7 @@ extracolormap_t *R_AddColormaps(extracolormap_t *exc_augend, extracolormap_t *ex
* R_GetRgbaB(exc_addend->rgba) * R_GetRgbaB(exc_addend->rgba)
, 255), 0); , 255), 0);
alpha = useAltAlpha ? altAlpha : R_GetRgbaA(exc_addend->rgba); alpha = R_GetRgbaA(exc_addend->rgba);
alpha = max(min(R_GetRgbaA(exc_augend->rgba) + (subA ? -1 : 1) * alpha, 25), 0); alpha = max(min(R_GetRgbaA(exc_augend->rgba) + (subA ? -1 : 1) * alpha, 25), 0);
exc_augend->rgba = R_PutRgbaRGBA(red, green, blue, alpha); exc_augend->rgba = R_PutRgbaRGBA(red, green, blue, alpha);
@ -2436,8 +2435,8 @@ extracolormap_t *R_AddColormaps(extracolormap_t *exc_augend, extracolormap_t *ex
* R_GetRgbaB(exc_addend->fadergba) * R_GetRgbaB(exc_addend->fadergba)
, 255), 0); , 255), 0);
alpha = useAltAlpha ? altFadeAlpha : R_GetRgbaA(exc_addend->fadergba); alpha = R_GetRgbaA(exc_addend->fadergba);
if (alpha == 25 && !useAltAlpha && !R_GetRgbaRGB(exc_addend->fadergba)) if (alpha == 25 && !R_GetRgbaRGB(exc_addend->fadergba))
alpha = 0; // HACK: fadergba A defaults at 25, so don't add anything in this case alpha = 0; // HACK: fadergba A defaults at 25, so don't add anything in this case
alpha = max(min(R_GetRgbaA(exc_augend->fadergba) + (subFadeA ? -1 : 1) * alpha, 25), 0); alpha = max(min(R_GetRgbaA(exc_augend->fadergba) + (subFadeA ? -1 : 1) * alpha, 25), 0);

View File

@ -153,7 +153,6 @@ extracolormap_t *R_AddColormaps(extracolormap_t *exc_augend, extracolormap_t *ex
boolean subR, boolean subG, boolean subB, boolean subA, boolean subR, boolean subG, boolean subB, boolean subA,
boolean subFadeR, boolean subFadeG, boolean subFadeB, boolean subFadeA, boolean subFadeR, boolean subFadeG, boolean subFadeB, boolean subFadeA,
boolean subFadeStart, boolean subFadeEnd, boolean ignoreFlags, boolean subFadeStart, boolean subFadeEnd, boolean ignoreFlags,
boolean useAltAlpha, INT16 altAlpha, INT16 altFadeAlpha,
boolean lighttable); boolean lighttable);
#ifdef EXTRACOLORMAPLUMPS #ifdef EXTRACOLORMAPLUMPS
extracolormap_t *R_ColormapForName(char *name); extracolormap_t *R_ColormapForName(char *name);