Merge remote-tracking branch 'gzdoom/master' into lightmaps2
This commit is contained in:
commit
5dec391c8c
294 changed files with 1077 additions and 1031 deletions
|
|
@ -42,7 +42,7 @@
|
|||
#include "filesystem.h"
|
||||
#include "r_sky.h"
|
||||
#include "colormaps.h"
|
||||
#include "templates.h"
|
||||
|
||||
#include "c_cvars.h"
|
||||
|
||||
CUSTOM_CVAR(Bool, cl_customizeinvulmap, false, CVAR_ARCHIVE|CVAR_NOINITCALL)
|
||||
|
|
@ -156,7 +156,7 @@ void R_InitColormaps (bool allowCustomColormap)
|
|||
g /= 256;
|
||||
b /= 256;
|
||||
// The calculated average is too dark so brighten it according to the palettes's overall brightness
|
||||
int maxcol = MAX<int>(MAX<int>(palette_brightness, r), MAX<int>(g, b));
|
||||
int maxcol = max<int>(max<int>(palette_brightness, r), max<int>(g, b));
|
||||
|
||||
fakecmaps[j].blend = PalEntry (255, r * 255 / maxcol, g * 255 / maxcol, b * 255 / maxcol);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
#include <ctype.h>
|
||||
|
||||
#include "sc_man.h"
|
||||
#include "templates.h"
|
||||
|
||||
#include "filesystem.h"
|
||||
#include "gi.h"
|
||||
#include "r_state.h"
|
||||
|
|
|
|||
|
|
@ -524,6 +524,10 @@ static void ParseModelDefLump(int Lump)
|
|||
{
|
||||
smf.flags |= MDL_USEACTORROLL;
|
||||
}
|
||||
else if (sc.Compare("noperpixellighting"))
|
||||
{
|
||||
smf.flags |= MDL_NOPERPIXELLIGHTING;
|
||||
}
|
||||
else if (sc.Compare("rotating"))
|
||||
{
|
||||
smf.flags |= MDL_ROTATING;
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ enum
|
|||
MDL_BADROTATION = 128,
|
||||
MDL_DONTCULLBACKFACES = 256,
|
||||
MDL_USEROTATIONCENTER = 512,
|
||||
MDL_NOPERPIXELLIGHTING = 1024, // forces a model to not use per-pixel lighting. useful for voxel-converted-to-model objects.
|
||||
};
|
||||
|
||||
FSpriteModelFrame * FindModelFrame(const PClass * ti, int sprite, int frame, bool dropped);
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ struct BoundingRect
|
|||
double distanceTo(const BoundingRect &other) const
|
||||
{
|
||||
if (intersects(other)) return 0;
|
||||
return std::max(std::min(fabs(left - other.right), fabs(right - other.left)),
|
||||
std::min(fabs(top - other.bottom), fabs(bottom - other.top)));
|
||||
return max(min(fabs(left - other.right), fabs(right - other.left)),
|
||||
min(fabs(top - other.bottom), fabs(bottom - other.top)));
|
||||
}
|
||||
|
||||
void addVertex(double x, double y)
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "templates.h"
|
||||
|
||||
#include "r_data/r_translate.h"
|
||||
#include "v_video.h"
|
||||
#include "g_game.h"
|
||||
|
|
@ -144,7 +144,7 @@ int CreateBloodTranslation(PalEntry color)
|
|||
trans.Remap[0] = 0;
|
||||
for (i = 1; i < 256; i++)
|
||||
{
|
||||
int bright = std::max(std::max(GPalette.BaseColors[i].r, GPalette.BaseColors[i].g), GPalette.BaseColors[i].b);
|
||||
int bright = max(std::max(GPalette.BaseColors[i].r, GPalette.BaseColors[i].g), GPalette.BaseColors[i].b);
|
||||
PalEntry pe = PalEntry(255, color.r*bright/255, color.g*bright/255, color.b*bright/255);
|
||||
int entry = ColorMatcher.Pick(pe.r, pe.g, pe.b);
|
||||
|
||||
|
|
@ -484,7 +484,7 @@ static void R_CreatePlayerTranslation (float h, float s, float v, const FPlayerC
|
|||
|
||||
// Build player sprite translation
|
||||
//h = 45.f;
|
||||
v = MAX (0.1f, v);
|
||||
v = max (0.1f, v);
|
||||
|
||||
for (i = start; i <= end; i++)
|
||||
{
|
||||
|
|
@ -498,7 +498,7 @@ static void R_CreatePlayerTranslation (float h, float s, float v, const FPlayerC
|
|||
float mv[18] = { .16f, .19f, .22f, .25f, .31f, .35f, .38f, .41f, .47f, .54f, .60f, .65f, .71f, .77f, .83f, .89f, .94f, 1.f };
|
||||
|
||||
// Build player sprite translation
|
||||
v = MAX (0.1f, v);
|
||||
v = max (0.1f, v);
|
||||
|
||||
for (i = start; i <= end; i++)
|
||||
{
|
||||
|
|
@ -513,12 +513,12 @@ static void R_CreatePlayerTranslation (float h, float s, float v, const FPlayerC
|
|||
if (gameinfo.gametype == GAME_Heretic)
|
||||
{
|
||||
// Build rain/lifegem translation
|
||||
bases = MIN(bases * 1.3f, 1.f);
|
||||
basev = MIN(basev * 1.3f, 1.f);
|
||||
bases = min(bases * 1.3f, 1.f);
|
||||
basev = min(basev * 1.3f, 1.f);
|
||||
for (i = 145; i <= 168; i++)
|
||||
{
|
||||
s = MIN(bases, 0.8965f - 0.0962f * (float)(i - 161));
|
||||
v = MIN(1.f, (0.2102f + 0.0489f * (float)(i - 144)) * basev);
|
||||
s = min(bases, 0.8965f - 0.0962f * (float)(i - 161));
|
||||
v = min(1.f, (0.2102f + 0.0489f * (float)(i - 144)) * basev);
|
||||
HSVtoRGB(&r, &g, &b, h, s, v);
|
||||
SetRemap(alttable, i, r, g, b);
|
||||
SetPillarRemap(pillartable, i, h, s, v);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
**
|
||||
**/
|
||||
|
||||
#include "templates.h"
|
||||
|
||||
#include "c_cvars.h"
|
||||
#include "filesystem.h"
|
||||
#include "doomtype.h"
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ void R_InitSpriteDefs ()
|
|||
{ // voxel applies to a specific frame
|
||||
j = vh->Frame - 'A';
|
||||
sprtemp[j].Voxel = voxdef;
|
||||
maxframe = MAX<int>(maxframe, j);
|
||||
maxframe = max<int>(maxframe, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include "g_level.h"
|
||||
|
||||
#include "templates.h"
|
||||
|
||||
#include "v_video.h"
|
||||
#include "filesystem.h"
|
||||
#include "i_video.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue