Light SE changes... helixhorned's idea

git-svn-id: https://svn.eduke32.com/eduke32@1349 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2009-04-28 05:31:32 +00:00
parent c6ed542a98
commit 096b5dda42
5 changed files with 86 additions and 40 deletions

View file

@ -7541,7 +7541,18 @@ static void G_MoveEffectors(void) //STATNUM 3
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 0; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 0;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = SA; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = SA;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = SH; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = SH;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = SS; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].minshade = sprite[i].xoffset;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].maxshade = sprite[i].yoffset;
if (CS & 2)
{
if (CS & 512)
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 2;
else
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
} else
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 0;
if (gamelightcount < PR_MAXLIGHTS) if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++; gamelightcount++;
break; break;
@ -7565,11 +7576,22 @@ static void G_MoveEffectors(void) //STATNUM 3
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = hictinting[PL].g; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = hictinting[PL].g;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = hictinting[PL].b; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = hictinting[PL].b;
} }
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 256; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = (256-(SS+128))<<1;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = 200; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius * 0.75;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = SA; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = SA;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = SH; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = SH;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = SS; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].minshade = sprite[i].xoffset;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].maxshade = sprite[i].yoffset;
if (CS & 2)
{
if (CS & 512)
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 2;
else
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
} else
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 0;
if (gamelightcount < PR_MAXLIGHTS) if (gamelightcount < PR_MAXLIGHTS)
gamelightcount++; gamelightcount++;
break; break;

View file

@ -49,7 +49,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <shellapi.h> #include <shellapi.h>
#endif #endif
#define BUILDDATE " 20090313" #define BUILDDATE " 20090426"
#define VERSION " 1.2.0devel" #define VERSION " 1.2.0devel"
static int32_t floor_over_floor; static int32_t floor_over_floor;
@ -9786,53 +9786,76 @@ void ExtAnalyzeSprites(void)
{ {
if (sprite[i].picnum == SECTOREFFECTOR && sprite[i].lotag == 49) if (sprite[i].picnum == SECTOREFFECTOR && sprite[i].lotag == 49)
{ {
gamelights[gamelightcount].sector = SECT; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = SECT;
gamelights[gamelightcount].x = SX; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = SX;
gamelights[gamelightcount].y = SY; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = SY;
gamelights[gamelightcount].z = SZ; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = SZ;
gamelights[gamelightcount].range = SHT; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = SHT;
if ((sprite[i].xvel | sprite[i].yvel | sprite[i].zvel) != 0) if ((sprite[i].xvel | sprite[i].yvel | sprite[i].zvel) != 0)
{ {
gamelights[gamelightcount].color[0] = sprite[i].xvel; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = sprite[i].xvel;
gamelights[gamelightcount].color[1] = sprite[i].yvel; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = sprite[i].yvel;
gamelights[gamelightcount].color[2] = sprite[i].zvel; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = sprite[i].zvel;
} }
else else
{ {
gamelights[gamelightcount].color[0] = hictinting[PL].r; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = hictinting[PL].r;
gamelights[gamelightcount].color[1] = hictinting[PL].g; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = hictinting[PL].g;
gamelights[gamelightcount].color[2] = hictinting[PL].b; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = hictinting[PL].b;
} }
gamelights[gamelightcount].radius = 0; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = 0;
gamelights[gamelightcount].angle = SA; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = SA;
gamelights[gamelightcount].horiz = SH; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = SH;
gamelights[gamelightcount].priority = SS; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].minshade = sprite[i].xoffset;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].maxshade = sprite[i].yoffset;
// gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = SS;
if (CS & 2)
{
if (CS & 512)
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 2;
else
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
} else
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 0;
gamelightcount++; gamelightcount++;
} }
if (sprite[i].picnum == SECTOREFFECTOR && sprite[i].lotag == 50) if (sprite[i].picnum == SECTOREFFECTOR && sprite[i].lotag == 50)
{ {
gamelights[gamelightcount].sector = SECT; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].sector = SECT;
gamelights[gamelightcount].x = SX; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].x = SX;
gamelights[gamelightcount].y = SY; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].y = SY;
gamelights[gamelightcount].z = SZ; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].z = SZ;
gamelights[gamelightcount].range = SHT; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].range = SHT;
if ((sprite[i].xvel | sprite[i].yvel | sprite[i].zvel) != 0) if ((sprite[i].xvel | sprite[i].yvel | sprite[i].zvel) != 0)
{ {
gamelights[gamelightcount].color[0] = sprite[i].xvel; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = sprite[i].xvel;
gamelights[gamelightcount].color[1] = sprite[i].yvel; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = sprite[i].yvel;
gamelights[gamelightcount].color[2] = sprite[i].zvel; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = sprite[i].zvel;
} }
else else
{ {
gamelights[gamelightcount].color[0] = hictinting[PL].r; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[0] = hictinting[PL].r;
gamelights[gamelightcount].color[1] = hictinting[PL].g; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[1] = hictinting[PL].g;
gamelights[gamelightcount].color[2] = hictinting[PL].b; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].color[2] = hictinting[PL].b;
} }
gamelights[gamelightcount].radius = 256; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius = (256-(SS+128))<<1;
gamelights[gamelightcount].faderadius = 200; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].faderadius = gamelights[gamelightcount&(PR_MAXLIGHTS-1)].radius * 0.75;
gamelights[gamelightcount].angle = SA; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].angle = SA;
gamelights[gamelightcount].horiz = SH; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].horiz = SH;
gamelights[gamelightcount].priority = SS; gamelights[gamelightcount&(PR_MAXLIGHTS-1)].minshade = sprite[i].xoffset;
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].maxshade = sprite[i].yoffset;
if (CS & 2)
{
if (CS & 512)
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 2;
else
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 1;
} else
gamelights[gamelightcount&(PR_MAXLIGHTS-1)].priority = 0;
gamelightcount++; gamelightcount++;
} }
} }

View file

@ -6086,6 +6086,9 @@ int32_t A_Spawn(int32_t j, int32_t pn)
break; break;
case SECTOREFFECTOR__STATIC: case SECTOREFFECTOR__STATIC:
sp->cstat |= 32768;
sp->xrepeat = sp->yrepeat = 0;
switch (sp->lotag) switch (sp->lotag)
{ {
@ -6097,8 +6100,6 @@ int32_t A_Spawn(int32_t j, int32_t pn)
} }
sp->yvel = sector[sect].extra; sp->yvel = sector[sect].extra;
sp->cstat |= 32768;
sp->xrepeat = sp->yrepeat = 0;
switch (sp->lotag) switch (sp->lotag)
{ {

View file

@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#include "duke3d.h" #include "duke3d.h"
const char *s_buildDate = "20090424"; const char *s_buildDate = "20090426";
char *MusicPtr = NULL; char *MusicPtr = NULL;
int32_t g_musicSize; int32_t g_musicSize;

View file

@ -975,7 +975,7 @@ static inline void prelevel(char g)
case LOCATORS__STATIC: case LOCATORS__STATIC:
case MASTERSWITCH__STATIC: case MASTERSWITCH__STATIC:
case RESPAWN__STATIC: case RESPAWN__STATIC:
sprite[i].cstat = 0; sprite[i].cstat &= ~(1|256);
break; break;
} }
i = nexti; i = nexti;