mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Modified priority system to use 6 priority levels instead of 3, added proper def syntax "specular" and "normal" which work identically to "detail" and "glow" for defining normals and specular maps (defining these with pals 100 and 101 will no longer work)
git-svn-id: https://svn.eduke32.com/eduke32@1350 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
096b5dda42
commit
ec0a8f2033
9 changed files with 100 additions and 77 deletions
|
@ -43,6 +43,8 @@ extern "C" {
|
|||
#define RESERVEDPALS 2 // don't forget to increment this when adding reserved pals
|
||||
#define DETAILPAL (MAXPALOOKUPS - 1)
|
||||
#define GLOWPAL (MAXPALOOKUPS - 2)
|
||||
#define SPECULARPAL (MAXPALOOKUPS - 3)
|
||||
#define NORMALPAL (MAXPALOOKUPS - 4)
|
||||
|
||||
#define TSPR_TEMP 99
|
||||
#define TSPR_MIRROR 100
|
||||
|
|
|
@ -148,12 +148,19 @@ typedef struct s_prprogrambit {
|
|||
// LIGHTS
|
||||
#define PR_MAXLIGHTS 128
|
||||
#define SHADOW_DEPTH_OFFSET 30
|
||||
#define PR_MAXLIGHTPRIORITY 3
|
||||
#define PR_MAXLIGHTPRIORITY 6
|
||||
|
||||
#define PR_LIGHT_PRIO_MAX 0
|
||||
#define PR_LIGHT_PRIO_MAX_GAME 1
|
||||
#define PR_LIGHT_PRIO_HIGH 2
|
||||
#define PR_LIGHT_PRIO_HIGH_GAME 3
|
||||
#define PR_LIGHT_PRIO_LOW 4
|
||||
#define PR_LIGHT_PRIO_LOW_GAME 5
|
||||
|
||||
typedef struct s_prlight {
|
||||
int32_t x, y, z, horiz, range;
|
||||
int16_t angle, faderadius, radius, sector;
|
||||
char color[3], priority;
|
||||
uint8_t color[3], priority;
|
||||
int8_t minshade, maxshade;
|
||||
GLfloat proj[16];
|
||||
GLfloat transform[16];
|
||||
|
|
|
@ -47,6 +47,8 @@ enum
|
|||
T_PAL,
|
||||
T_DETAIL,
|
||||
T_GLOW,
|
||||
T_SPECULAR,
|
||||
T_NORMAL,
|
||||
T_PARAM,
|
||||
T_HUD,
|
||||
T_XADD,
|
||||
|
@ -131,16 +133,18 @@ static tokenlist basetokens[] =
|
|||
|
||||
static tokenlist modeltokens[] =
|
||||
{
|
||||
{ "scale", T_SCALE },
|
||||
{ "shade", T_SHADE },
|
||||
{ "zadd", T_ZADD },
|
||||
{ "frame", T_FRAME },
|
||||
{ "anim", T_ANIM },
|
||||
{ "skin", T_SKIN },
|
||||
{ "glow", T_GLOW },
|
||||
{ "detail", T_DETAIL },
|
||||
{ "hud", T_HUD },
|
||||
{ "flags", T_FLAGS },
|
||||
{ "scale", T_SCALE },
|
||||
{ "shade", T_SHADE },
|
||||
{ "zadd", T_ZADD },
|
||||
{ "frame", T_FRAME },
|
||||
{ "anim", T_ANIM },
|
||||
{ "skin", T_SKIN },
|
||||
{ "detail", T_DETAIL },
|
||||
{ "glow", T_GLOW },
|
||||
{ "specular", T_SPECULAR },
|
||||
{ "normal", T_NORMAL },
|
||||
{ "hud", T_HUD },
|
||||
{ "flags", T_FLAGS },
|
||||
};
|
||||
|
||||
static tokenlist modelframetokens[] =
|
||||
|
@ -224,6 +228,8 @@ static tokenlist texturetokens[] =
|
|||
{ "pal", T_PAL },
|
||||
{ "detail", T_DETAIL },
|
||||
{ "glow", T_GLOW },
|
||||
{ "specular",T_SPECULAR },
|
||||
{ "normal", T_NORMAL },
|
||||
};
|
||||
|
||||
static tokenlist texturetokens_pal[] =
|
||||
|
@ -1178,7 +1184,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
#endif
|
||||
}
|
||||
break;
|
||||
case T_SKIN: case T_DETAIL: case T_GLOW:
|
||||
case T_SKIN: case T_DETAIL: case T_GLOW: case T_SPECULAR: case T_NORMAL:
|
||||
{
|
||||
char *skintokptr = script->ltextptr;
|
||||
char *skinend, *skinfn = 0;
|
||||
|
@ -1223,6 +1229,12 @@ static int32_t defsparser(scriptfile *script)
|
|||
case T_GLOW:
|
||||
palnum = GLOWPAL;
|
||||
break;
|
||||
case T_SPECULAR:
|
||||
palnum = SPECULARPAL;
|
||||
break;
|
||||
case T_NORMAL:
|
||||
palnum = NORMALPAL;
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
|
@ -1488,9 +1500,6 @@ static int32_t defsparser(scriptfile *script)
|
|||
char *texturetokptr = script->ltextptr, *textureend;
|
||||
int32_t tile=-1, token;
|
||||
|
||||
char *fnB=0; double alphacutB=0, xscaleB=0, yscaleB=0; char flagsB=0;
|
||||
int32_t palbits=0;
|
||||
|
||||
if (scriptfile_getsymbol(script,&tile)) break;
|
||||
if (scriptfile_getbraces(script,&textureend)) break;
|
||||
while (script->textptr < textureend)
|
||||
|
@ -1503,7 +1512,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
char *paltokptr = script->ltextptr, *palend;
|
||||
int32_t pal=-1, i;
|
||||
char *fn = NULL, *tfn = NULL;
|
||||
double alphacut = -1.0, xscale = 1.0, yscale = 1.0, specpower = 1.0, specfactor = 1.0;
|
||||
double alphacut = -1.0, xscale = 1.0, yscale = 1.0;
|
||||
char flags = 0;
|
||||
|
||||
if (scriptfile_getsymbol(script,&pal)) break;
|
||||
|
@ -1520,10 +1529,6 @@ static int32_t defsparser(scriptfile *script)
|
|||
scriptfile_getdouble(script,&xscale); break;
|
||||
case T_YSCALE:
|
||||
scriptfile_getdouble(script,&yscale); break;
|
||||
case T_SPECPOWER:
|
||||
scriptfile_getdouble(script,&specpower); break;
|
||||
case T_SPECFACTOR:
|
||||
scriptfile_getdouble(script,&specfactor); break;
|
||||
case T_NOCOMPRESS:
|
||||
flags |= 1; break;
|
||||
case T_NODOWNSIZE:
|
||||
|
@ -1567,17 +1572,15 @@ static int32_t defsparser(scriptfile *script)
|
|||
xscale = 1.0f / xscale;
|
||||
yscale = 1.0f / yscale;
|
||||
|
||||
hicsetsubsttex(tile,pal,fn,alphacut,xscale,yscale, specpower, specfactor,flags);
|
||||
fnB=fn; alphacutB=alphacut; xscaleB=xscale; yscaleB=yscale; flagsB=flags;
|
||||
if (pal<30)palbits|=1<<pal;
|
||||
hicsetsubsttex(tile,pal,fn,alphacut,xscale,yscale, 1.0f, 1.0f,flags);
|
||||
}
|
||||
break;
|
||||
case T_DETAIL: case T_GLOW:
|
||||
case T_DETAIL: case T_GLOW: case T_SPECULAR: case T_NORMAL:
|
||||
{
|
||||
char *detailtokptr = script->ltextptr, *detailend;
|
||||
int32_t pal = 0, i;
|
||||
char *fn = NULL, *tfn = NULL;
|
||||
double xscale = 1.0, yscale = 1.0;
|
||||
double xscale = 1.0, yscale = 1.0, specpower = 1.0, specfactor = 1.0;
|
||||
char flags = 0;
|
||||
|
||||
if (scriptfile_getbraces(script,&detailend)) break;
|
||||
|
@ -1591,6 +1594,10 @@ static int32_t defsparser(scriptfile *script)
|
|||
scriptfile_getdouble(script,&xscale); break;
|
||||
case T_YSCALE:
|
||||
scriptfile_getdouble(script,&yscale); break;
|
||||
case T_SPECPOWER:
|
||||
scriptfile_getdouble(script,&specpower); break;
|
||||
case T_SPECFACTOR:
|
||||
scriptfile_getdouble(script,&specfactor); break;
|
||||
case T_NOCOMPRESS:
|
||||
flags |= 1; break;
|
||||
case T_NODOWNSIZE:
|
||||
|
@ -1636,8 +1643,14 @@ static int32_t defsparser(scriptfile *script)
|
|||
case T_GLOW:
|
||||
pal = GLOWPAL;
|
||||
break;
|
||||
case T_SPECULAR:
|
||||
pal = SPECULARPAL;
|
||||
break;
|
||||
case T_NORMAL:
|
||||
pal = NORMALPAL;
|
||||
break;
|
||||
}
|
||||
hicsetsubsttex(tile,pal,fn,-1.0,xscale,yscale,1.0,1.0,flags);
|
||||
hicsetsubsttex(tile,pal,fn,-1.0f,xscale,yscale, specpower, specfactor,flags);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -11,7 +11,7 @@ int32_t pr_normalmapping = 1;
|
|||
int32_t pr_specularmapping = 1;
|
||||
int32_t pr_shadows = 1;
|
||||
int32_t pr_shadowcount = 5;
|
||||
int32_t pr_shadowdetail = 2;
|
||||
int32_t pr_shadowdetail = 4;
|
||||
int32_t pr_maxlightpasses = 5;
|
||||
int32_t pr_maxlightpriority = PR_MAXLIGHTPRIORITY;
|
||||
int32_t pr_fov = 426; // appears to be the classic setting.
|
||||
|
@ -3294,12 +3294,12 @@ static void polymer_getbuildmaterial(_prmaterial* material, int16_t tile
|
|||
polymer_getscratchmaterial(material);
|
||||
|
||||
// PR_BIT_NORMAL_MAP
|
||||
if (hicfindsubst(tilenum, 100, 0))
|
||||
if (hicfindsubst(tilenum, NORMALPAL, 0))
|
||||
{
|
||||
glowpth = NULL;
|
||||
glowpth = gltexcache(tilenum, 100, 0);
|
||||
glowpth = gltexcache(tilenum, NORMALPAL, 0);
|
||||
|
||||
if (glowpth && glowpth->hicr && (glowpth->hicr->palnum == 100)) {
|
||||
if (glowpth && glowpth->hicr && (glowpth->hicr->palnum == NORMALPAL)) {
|
||||
material->normalmap = glowpth->glpic;
|
||||
material->normalbias[0] = glowpth->hicr->specpower;
|
||||
material->normalbias[1] = glowpth->hicr->specfactor;
|
||||
|
@ -3362,12 +3362,12 @@ static void polymer_getbuildmaterial(_prmaterial* material, int16_t tile
|
|||
|
||||
|
||||
// PR_BIT_SPECULAR_MAP
|
||||
if (hicfindsubst(tilenum, 101, 0))
|
||||
if (hicfindsubst(tilenum, SPECULARPAL, 0))
|
||||
{
|
||||
glowpth = NULL;
|
||||
glowpth = gltexcache(tilenum, 101, 0);
|
||||
glowpth = gltexcache(tilenum, SPECULARPAL, 0);
|
||||
|
||||
if (glowpth && glowpth->hicr && (glowpth->hicr->palnum == 101))
|
||||
if (glowpth && glowpth->hicr && (glowpth->hicr->palnum == SPECULARPAL))
|
||||
material->specmap = glowpth->glpic;
|
||||
}
|
||||
|
||||
|
|
|
@ -598,10 +598,10 @@ static void G_MoveZombieActors(void)
|
|||
case FLOORFLAME__STATIC:
|
||||
case FIREBARREL__STATIC:
|
||||
case FIREVASE__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),0);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME);
|
||||
break;
|
||||
case ATOMICHEALTH__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(128<<8)+(255<<16),1);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(128<<8)+(255<<16),PR_LIGHT_PRIO_HIGH_GAME);
|
||||
break;
|
||||
|
||||
case FIRE__STATIC:
|
||||
|
@ -610,7 +610,7 @@ static void G_MoveZombieActors(void)
|
|||
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
|
||||
if (s->z > ActorExtra[i].floorz+2048) break;
|
||||
*/
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),0);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME);
|
||||
break;
|
||||
case BURNING__STATIC:
|
||||
case BURNING2__STATIC:
|
||||
|
@ -618,19 +618,19 @@ static void G_MoveZombieActors(void)
|
|||
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
|
||||
if (s->z > ActorExtra[i].floorz + 2048) break;
|
||||
*/
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),0);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME);
|
||||
break;
|
||||
|
||||
case EXPLOSION2__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),1);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),PR_LIGHT_PRIO_HIGH_GAME);
|
||||
break;
|
||||
case FORCERIPPLE__STATIC:
|
||||
// case TRANSPORTERSTAR__STATIC:
|
||||
case TRANSPORTERBEAM__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 80+(80<<8)+(255<<16),2);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 80+(80<<8)+(255<<16),PR_LIGHT_PRIO_LOW_GAME);
|
||||
break;
|
||||
case SHRINKEREXPLOSION__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),1);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),PR_LIGHT_PRIO_HIGH_GAME);
|
||||
break;
|
||||
|
||||
}
|
||||
|
@ -2181,7 +2181,7 @@ CLEAR_THE_BOLT:
|
|||
case FLOORFLAME__STATIC:
|
||||
case FIREBARREL__STATIC:
|
||||
case FIREVASE__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),0);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME);
|
||||
case EXPLODINGBARREL__STATIC:
|
||||
case WOODENHORSE__STATIC:
|
||||
case HORSEONSIDE__STATIC:
|
||||
|
@ -2284,7 +2284,7 @@ static void G_MoveWeapons(void)
|
|||
// A_PlaySound(WIERDSHOT_FLY,i);
|
||||
|
||||
if (ActorExtra[i].projectile.flashcolor)
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, ActorExtra[i].projectile.flashcolor,2);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, ActorExtra[i].projectile.flashcolor,PR_LIGHT_PRIO_LOW_GAME);
|
||||
|
||||
if (ActorExtra[i].projectile.workslike & PROJECTILE_BOUNCESOFFWALLS)
|
||||
{
|
||||
|
@ -2731,21 +2731,21 @@ static void G_MoveWeapons(void)
|
|||
switch (DynamicTileMap[s->picnum])
|
||||
{
|
||||
case FREEZEBLAST__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(128<<8)+(255<<16),1);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(128<<8)+(255<<16),PR_LIGHT_PRIO_HIGH_GAME);
|
||||
break;
|
||||
|
||||
case COOLEXPLOSION1__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 128+(0<<8)+(255<<16),1);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 4096, 128+(0<<8)+(255<<16),PR_LIGHT_PRIO_HIGH_GAME);
|
||||
break;
|
||||
|
||||
case SHRINKSPARK__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),1);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),PR_LIGHT_PRIO_HIGH_GAME);
|
||||
break;
|
||||
case FIRELASER__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),2);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),PR_LIGHT_PRIO_LOW_GAME);
|
||||
break;
|
||||
case RPG__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),2);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),PR_LIGHT_PRIO_LOW_GAME);
|
||||
|
||||
if (DynamicTileMap[s->picnum] == RPG__STATIC && ActorExtra[i].picnum != BOSS2 &&
|
||||
s->xrepeat >= 10 && sector[s->sectnum].lotag != 2)
|
||||
|
@ -3391,7 +3391,7 @@ static void G_MoveActors(void)
|
|||
switch (DynamicTileMap[switchpicnum])
|
||||
{
|
||||
case ATOMICHEALTH__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(128<<8)+(255<<16),1);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(128<<8)+(255<<16),PR_LIGHT_PRIO_HIGH_GAME);
|
||||
break;
|
||||
|
||||
case FIRE__STATIC:
|
||||
|
@ -3400,7 +3400,7 @@ static void G_MoveActors(void)
|
|||
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
|
||||
if (s->z > ActorExtra[i].floorz+2048) break;
|
||||
*/
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),0);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->xrepeat, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME);
|
||||
break;
|
||||
|
||||
case DUCK__STATIC:
|
||||
|
@ -3664,7 +3664,7 @@ static void G_MoveActors(void)
|
|||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = 255;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = 255;
|
||||
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 0;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX_GAME;
|
||||
|
||||
if (gamelightcount < PR_MAXLIGHTS)
|
||||
gamelightcount++;
|
||||
|
@ -5155,19 +5155,20 @@ static void G_MoveMisc(void) // STATNUM 5
|
|||
if (ActorExtra[i].floorz - ActorExtra[i].ceilingz < 128) break;
|
||||
if (s->z > ActorExtra[i].floorz + 2048) break;
|
||||
*/
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),0);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 64 * s->yrepeat, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME);
|
||||
break;
|
||||
|
||||
case EXPLOSION2__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), (512 * s->yrepeat) / (ActorExtra[i].temp_data[2]+1), 255+(80<<8),1);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1),
|
||||
(512 * s->yrepeat) / (ActorExtra[i].temp_data[2]+1), 255+(80<<8),PR_LIGHT_PRIO_HIGH_GAME);
|
||||
break;
|
||||
case FORCERIPPLE__STATIC:
|
||||
// case TRANSPORTERSTAR__STATIC:
|
||||
case TRANSPORTERBEAM__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 80+(80<<8)+(255<<16),2);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 80+(80<<8)+(255<<16),PR_LIGHT_PRIO_LOW_GAME);
|
||||
break;
|
||||
case SHRINKEREXPLOSION__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),1);
|
||||
G_AddGameLight(0, s->sectnum, s->x, s->y, s->z-((s->yrepeat*tilesizy[s->picnum])<<1), 2048, 128+(255<<8)+(128<<16),PR_LIGHT_PRIO_HIGH_GAME);
|
||||
break;
|
||||
}
|
||||
if (!actorscrptr[sprite[i].picnum])
|
||||
|
@ -7547,11 +7548,11 @@ static void G_MoveEffectors(void) //STATNUM 3
|
|||
if (CS & 2)
|
||||
{
|
||||
if (CS & 512)
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 2;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_LOW;
|
||||
else
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_HIGH;
|
||||
} else
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 0;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX;
|
||||
|
||||
if (gamelightcount < PR_MAXLIGHTS)
|
||||
gamelightcount++;
|
||||
|
@ -7586,11 +7587,11 @@ static void G_MoveEffectors(void) //STATNUM 3
|
|||
if (CS & 2)
|
||||
{
|
||||
if (CS & 512)
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 2;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_LOW;
|
||||
else
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_HIGH;
|
||||
} else
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 0;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX;
|
||||
|
||||
if (gamelightcount < PR_MAXLIGHTS)
|
||||
gamelightcount++;
|
||||
|
|
|
@ -9813,11 +9813,11 @@ void ExtAnalyzeSprites(void)
|
|||
if (CS & 2)
|
||||
{
|
||||
if (CS & 512)
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 2;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_LOW;
|
||||
else
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_HIGH;
|
||||
} else
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 0;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX;
|
||||
|
||||
gamelightcount++;
|
||||
}
|
||||
|
@ -9850,11 +9850,11 @@ void ExtAnalyzeSprites(void)
|
|||
if (CS & 2)
|
||||
{
|
||||
if (CS & 512)
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 2;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_LOW;
|
||||
else
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_HIGH;
|
||||
} else
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 0;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX;
|
||||
|
||||
gamelightcount++;
|
||||
}
|
||||
|
|
|
@ -5535,7 +5535,7 @@ int32_t A_Spawn(int32_t j, int32_t pn)
|
|||
break;
|
||||
|
||||
case EXPLOSION2__STATIC:
|
||||
G_AddGameLight(0, sp->sectnum, sp->x, sp->y, sp->z-((sp->yrepeat*tilesizy[sp->picnum])<<1), 8192, 255+(80<<8),0);
|
||||
G_AddGameLight(0, sp->sectnum, sp->x, sp->y, sp->z-((sp->yrepeat*tilesizy[sp->picnum])<<1), 8192, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME);
|
||||
case EXPLOSION2BOT__STATIC:
|
||||
case BURNING__STATIC:
|
||||
case BURNING2__STATIC:
|
||||
|
@ -7447,7 +7447,7 @@ PALONLY:
|
|||
framelights[framelightcount & (PR_MAXLIGHTS-1)].color[1] = 255;
|
||||
framelights[framelightcount & (PR_MAXLIGHTS-1)].color[2] = 48;
|
||||
|
||||
framelights[framelightcount & (PR_MAXLIGHTS-1)].priority = 2;
|
||||
framelights[framelightcount & (PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_LOW_GAME;
|
||||
|
||||
if (framelightcount < PR_MAXLIGHTS)
|
||||
framelightcount++;
|
||||
|
@ -7488,7 +7488,7 @@ PALONLY:
|
|||
framelights[framelightcount & (PR_MAXLIGHTS-1)].color[1] = 48;
|
||||
framelights[framelightcount & (PR_MAXLIGHTS-1)].color[2] = 48;
|
||||
|
||||
framelights[framelightcount & (PR_MAXLIGHTS-1)].priority = 2;
|
||||
framelights[framelightcount & (PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_LOW_GAME;
|
||||
|
||||
if (framelightcount < PR_MAXLIGHTS)
|
||||
framelightcount++;
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
//-------------------------------------------------------------------------
|
||||
#include "duke3d.h"
|
||||
|
||||
const char *s_buildDate = "20090426";
|
||||
const char *s_buildDate = "20090428";
|
||||
char *MusicPtr = NULL;
|
||||
int32_t g_musicSize;
|
||||
|
||||
|
|
|
@ -355,7 +355,7 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
|
|||
case RPG__STATIC:
|
||||
case MORTER__STATIC:
|
||||
G_AddGameLight(0, s->sectnum, s->x+((sintable[(s->ang+512)&2047])>>7),
|
||||
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 8192, 255+(80<<8),1);
|
||||
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 8192, 255+(80<<8),PR_LIGHT_PRIO_MAX_GAME);
|
||||
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4);
|
||||
|
@ -373,7 +373,7 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
|
|||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = 80;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = 0;
|
||||
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX_GAME;
|
||||
|
||||
if (gamelightcount < PR_MAXLIGHTS)
|
||||
gamelightcount++;
|
||||
|
@ -390,7 +390,7 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
|
|||
if (ProjectileData[atwith].flashcolor)
|
||||
{
|
||||
G_AddGameLight(0, s->sectnum, s->x+((sintable[(s->ang+512)&2047])>>7),
|
||||
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 8192, ProjectileData[atwith].flashcolor,1);
|
||||
s->y+((sintable[(s->ang)&2047])>>7), s->z-PHEIGHT, 8192, ProjectileData[atwith].flashcolor,PR_LIGHT_PRIO_MAX_GAME);
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(s->ang+512)&2047])>>4);
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = s->y+((sintable[(s->ang)&2047])>>4);
|
||||
|
@ -407,7 +407,7 @@ int32_t A_Shoot(int32_t i,int32_t atwith)
|
|||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = (ProjectileData[atwith].flashcolor>>8)&255;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = (ProjectileData[atwith].flashcolor>>16)&255;
|
||||
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX_GAME;
|
||||
|
||||
if (gamelightcount < PR_MAXLIGHTS)
|
||||
gamelightcount++;
|
||||
|
@ -2185,7 +2185,7 @@ void P_FireWeapon(DukePlayer_t *p)
|
|||
|
||||
#ifdef POLYMER
|
||||
G_AddGameLight(0, s->sectnum, s->x+((sintable[(p->ang+512)&2047])>>7), s->y+((sintable[(p->ang)&2047])>>7),
|
||||
s->z-PHEIGHT, 8192, aplWeaponFlashColor[p->curr_weapon][snum],1);
|
||||
s->z-PHEIGHT, 8192, aplWeaponFlashColor[p->curr_weapon][snum],PR_LIGHT_PRIO_MAX_GAME);
|
||||
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = s->sectnum;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = s->x+((sintable[(p->ang+512)&2047])>>4);
|
||||
|
@ -2203,7 +2203,7 @@ void P_FireWeapon(DukePlayer_t *p)
|
|||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = (aplWeaponFlashColor[p->curr_weapon][snum]>>8)&255;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = (aplWeaponFlashColor[p->curr_weapon][snum]>>16)&255;;
|
||||
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
|
||||
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = PR_LIGHT_PRIO_MAX_GAME;
|
||||
|
||||
if (gamelightcount < PR_MAXLIGHTS)
|
||||
gamelightcount++;
|
||||
|
|
Loading…
Reference in a new issue