mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-27 22:00:52 +00:00
- QueueWallBlood.
This commit is contained in:
parent
deddd7d514
commit
01d2967378
2 changed files with 19 additions and 30 deletions
source/games/sw/src
|
@ -78,7 +78,7 @@ DSWActor* StarQueue[MAX_STAR_QUEUE];
|
||||||
short HoleQueueHead=0;
|
short HoleQueueHead=0;
|
||||||
short HoleQueue[MAX_HOLE_QUEUE];
|
short HoleQueue[MAX_HOLE_QUEUE];
|
||||||
short WallBloodQueueHead=0;
|
short WallBloodQueueHead=0;
|
||||||
short WallBloodQueue[MAX_WALLBLOOD_QUEUE];
|
DSWActor* WallBloodQueue[MAX_WALLBLOOD_QUEUE];
|
||||||
short FloorBloodQueueHead=0;
|
short FloorBloodQueueHead=0;
|
||||||
short FloorBloodQueue[MAX_FLOORBLOOD_QUEUE];
|
short FloorBloodQueue[MAX_FLOORBLOOD_QUEUE];
|
||||||
short GenericQueueHead=0;
|
short GenericQueueHead=0;
|
||||||
|
@ -11660,7 +11660,6 @@ SpawnSectorExp(int16_t Weapon)
|
||||||
eu = User[explosion].Data();
|
eu = User[explosion].Data();
|
||||||
|
|
||||||
exp->hitag = LUMINOUS; //Always full brightness
|
exp->hitag = LUMINOUS; //Always full brightness
|
||||||
ClearOwner(expActor);
|
|
||||||
exp->shade = -40;
|
exp->shade = -40;
|
||||||
exp->xrepeat = 90; // was 40,40
|
exp->xrepeat = 90; // was 40,40
|
||||||
exp->yrepeat = 90;
|
exp->yrepeat = 90;
|
||||||
|
@ -11693,7 +11692,6 @@ SpawnLargeExp(int16_t Weapon)
|
||||||
eu = User[explosion].Data();
|
eu = User[explosion].Data();
|
||||||
|
|
||||||
exp->hitag = LUMINOUS; //Always full brightness
|
exp->hitag = LUMINOUS; //Always full brightness
|
||||||
ClearOwner(expActor);
|
|
||||||
exp->shade = -40;
|
exp->shade = -40;
|
||||||
exp->xrepeat = 90; // was 40,40
|
exp->xrepeat = 90; // was 40,40
|
||||||
exp->yrepeat = 90;
|
exp->yrepeat = 90;
|
||||||
|
@ -11741,7 +11739,6 @@ SpawnMeteorExp(int16_t Weapon)
|
||||||
eu = User[explosion].Data();
|
eu = User[explosion].Data();
|
||||||
|
|
||||||
exp->hitag = LUMINOUS; //Always full brightness
|
exp->hitag = LUMINOUS; //Always full brightness
|
||||||
ClearOwner(expActor);
|
|
||||||
exp->shade = -40;
|
exp->shade = -40;
|
||||||
if (sp->yrepeat < 64)
|
if (sp->yrepeat < 64)
|
||||||
{
|
{
|
||||||
|
@ -11779,7 +11776,6 @@ SpawnLittleExp(int16_t Weapon)
|
||||||
eu = User[explosion].Data();
|
eu = User[explosion].Data();
|
||||||
|
|
||||||
exp->hitag = LUMINOUS; //Always full brightness
|
exp->hitag = LUMINOUS; //Always full brightness
|
||||||
ClearOwner(expActor);
|
|
||||||
exp->shade = -127;
|
exp->shade = -127;
|
||||||
|
|
||||||
SET(exp->cstat, CSTAT_SPRITE_YCENTER);
|
SET(exp->cstat, CSTAT_SPRITE_YCENTER);
|
||||||
|
@ -15973,7 +15969,6 @@ SpawnDemonFist(int16_t Weapon)
|
||||||
eu = User[explosion].Data();
|
eu = User[explosion].Data();
|
||||||
|
|
||||||
exp->hitag = LUMINOUS; //Always full brightness
|
exp->hitag = LUMINOUS; //Always full brightness
|
||||||
ClearOwner(expActor);
|
|
||||||
exp->shade = -40;
|
exp->shade = -40;
|
||||||
exp->xrepeat = 32;
|
exp->xrepeat = 32;
|
||||||
exp->yrepeat = 32;
|
exp->yrepeat = 32;
|
||||||
|
@ -17235,7 +17230,6 @@ int SpawnWallHole(short hit_sect, short hit_wall, int hit_x, int hit_y, int hit_
|
||||||
|
|
||||||
SpriteNum = COVERinsertsprite(hit_sect, STAT_DEFAULT);
|
SpriteNum = COVERinsertsprite(hit_sect, STAT_DEFAULT);
|
||||||
sp = &sprite[SpriteNum];
|
sp = &sprite[SpriteNum];
|
||||||
sp->owner = -1;
|
|
||||||
sp->xrepeat = sp->yrepeat = 16;
|
sp->xrepeat = sp->yrepeat = 16;
|
||||||
sp->cstat = 0;
|
sp->cstat = 0;
|
||||||
sp->pal = 0;
|
sp->pal = 0;
|
||||||
|
@ -19956,8 +19950,8 @@ void SpriteQueueDelete(DSWActor* actor)
|
||||||
HoleQueue[i] = -1;
|
HoleQueue[i] = -1;
|
||||||
|
|
||||||
for (i = 0; i < MAX_WALLBLOOD_QUEUE; i++)
|
for (i = 0; i < MAX_WALLBLOOD_QUEUE; i++)
|
||||||
if (WallBloodQueue[i] == SpriteNum)
|
if (WallBloodQueue[i] == actor)
|
||||||
WallBloodQueue[i] = -1;
|
WallBloodQueue[i] = nullptr;
|
||||||
|
|
||||||
for (i = 0; i < MAX_FLOORBLOOD_QUEUE; i++)
|
for (i = 0; i < MAX_FLOORBLOOD_QUEUE; i++)
|
||||||
if (FloorBloodQueue[i] == SpriteNum)
|
if (FloorBloodQueue[i] == SpriteNum)
|
||||||
|
@ -19991,7 +19985,7 @@ void QueueReset(void)
|
||||||
HoleQueue[i] = -1;
|
HoleQueue[i] = -1;
|
||||||
|
|
||||||
for (i = 0; i < MAX_WALLBLOOD_QUEUE; i++)
|
for (i = 0; i < MAX_WALLBLOOD_QUEUE; i++)
|
||||||
WallBloodQueue[i] = -1;
|
WallBloodQueue[i] = nullptr;
|
||||||
|
|
||||||
for (i = 0; i < MAX_FLOORBLOOD_QUEUE; i++)
|
for (i = 0; i < MAX_FLOORBLOOD_QUEUE; i++)
|
||||||
FloorBloodQueue[i] = -1;
|
FloorBloodQueue[i] = -1;
|
||||||
|
@ -20089,7 +20083,6 @@ int QueueHole(short hit_sect, short hit_wall, int hit_x, int hit_y, int hit_z)
|
||||||
HoleQueueHead = (HoleQueueHead+1) & (MAX_HOLE_QUEUE-1);
|
HoleQueueHead = (HoleQueueHead+1) & (MAX_HOLE_QUEUE-1);
|
||||||
|
|
||||||
sp = &sprite[SpriteNum];
|
sp = &sprite[SpriteNum];
|
||||||
sp->owner = -1;
|
|
||||||
sp->xrepeat = sp->yrepeat = 16;
|
sp->xrepeat = sp->yrepeat = 16;
|
||||||
sp->cstat = 0;
|
sp->cstat = 0;
|
||||||
sp->pal = 0;
|
sp->pal = 0;
|
||||||
|
@ -20170,7 +20163,6 @@ int QueueFloorBlood(DSWActor* actor)
|
||||||
FloorBloodQueueHead = (FloorBloodQueueHead+1) & (MAX_FLOORBLOOD_QUEUE-1);
|
FloorBloodQueueHead = (FloorBloodQueueHead+1) & (MAX_FLOORBLOOD_QUEUE-1);
|
||||||
|
|
||||||
sp = &sprite[SpriteNum];
|
sp = &sprite[SpriteNum];
|
||||||
sp->owner = -1;
|
|
||||||
// Stupid hack to fix the blood under the skull to not show through
|
// Stupid hack to fix the blood under the skull to not show through
|
||||||
// x,y repeat of floor blood MUST be smaller than the sprite above it or clipping probs.
|
// x,y repeat of floor blood MUST be smaller than the sprite above it or clipping probs.
|
||||||
if (u->ID == GORE_Head)
|
if (u->ID == GORE_Head)
|
||||||
|
@ -20281,7 +20273,6 @@ int QueueFootPrint(short hit_sprite)
|
||||||
sp = &sprite[SpriteNum];
|
sp = &sprite[SpriteNum];
|
||||||
nu = User[SpriteNum].Data();
|
nu = User[SpriteNum].Data();
|
||||||
sp->hitag = 0;
|
sp->hitag = 0;
|
||||||
sp->owner = -1;
|
|
||||||
sp->xrepeat = 48;
|
sp->xrepeat = 48;
|
||||||
sp->yrepeat = 54;
|
sp->yrepeat = 54;
|
||||||
sp->cstat = 0;
|
sp->cstat = 0;
|
||||||
|
@ -20349,7 +20340,7 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
||||||
{
|
{
|
||||||
SPRITEp hsp = &actor->s();
|
SPRITEp hsp = &actor->s();
|
||||||
short w,nw,wall_ang,dang;
|
short w,nw,wall_ang,dang;
|
||||||
short SpriteNum;
|
DSWActor* spawnedActor;
|
||||||
int nx,ny;
|
int nx,ny;
|
||||||
SPRITEp sp;
|
SPRITEp sp;
|
||||||
int sectnum;
|
int sectnum;
|
||||||
|
@ -20392,36 +20383,35 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
|
||||||
if (WallBloodQueue[WallBloodQueueHead] != -1)
|
if (WallBloodQueue[WallBloodQueueHead] != nullptr)
|
||||||
KillSprite(WallBloodQueue[WallBloodQueueHead]);
|
KillActor(WallBloodQueue[WallBloodQueueHead]);
|
||||||
|
|
||||||
// Randomly choose a wall blood sprite
|
// Randomly choose a wall blood sprite
|
||||||
rndnum = RandomRange(1024);
|
rndnum = RandomRange(1024);
|
||||||
if (rndnum > 768)
|
if (rndnum > 768)
|
||||||
{
|
{
|
||||||
WallBloodQueue[WallBloodQueueHead] = SpriteNum =
|
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||||
SpawnSprite(STAT_WALLBLOOD_QUEUE, WALLBLOOD1, s_WallBlood1, hitinfo.sect, hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z, ang, 0);
|
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD1, s_WallBlood1, hitinfo.sect, hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z, ang, 0);
|
||||||
}
|
}
|
||||||
else if (rndnum > 512)
|
else if (rndnum > 512)
|
||||||
{
|
{
|
||||||
WallBloodQueue[WallBloodQueueHead] = SpriteNum =
|
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||||
SpawnSprite(STAT_WALLBLOOD_QUEUE, WALLBLOOD2, s_WallBlood2, hitinfo.sect, hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z, ang, 0);
|
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD2, s_WallBlood2, hitinfo.sect, hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z, ang, 0);
|
||||||
}
|
}
|
||||||
else if (rndnum > 128)
|
else if (rndnum > 128)
|
||||||
{
|
{
|
||||||
WallBloodQueue[WallBloodQueueHead] = SpriteNum =
|
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||||
SpawnSprite(STAT_WALLBLOOD_QUEUE, WALLBLOOD3, s_WallBlood3, hitinfo.sect, hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z, ang, 0);
|
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD3, s_WallBlood3, hitinfo.sect, hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z, ang, 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WallBloodQueue[WallBloodQueueHead] = SpriteNum =
|
WallBloodQueue[WallBloodQueueHead] = spawnedActor =
|
||||||
SpawnSprite(STAT_WALLBLOOD_QUEUE, WALLBLOOD4, s_WallBlood4, hitinfo.sect, hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z, ang, 0);
|
SpawnActor(STAT_WALLBLOOD_QUEUE, WALLBLOOD4, s_WallBlood4, hitinfo.sect, hitinfo.pos.x, hitinfo.pos.y, hitinfo.pos.z, ang, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
WallBloodQueueHead = (WallBloodQueueHead+1) & (MAX_WALLBLOOD_QUEUE-1);
|
WallBloodQueueHead = (WallBloodQueueHead+1) & (MAX_WALLBLOOD_QUEUE-1);
|
||||||
|
|
||||||
sp = &sprite[SpriteNum];
|
sp = &spawnedActor->s();
|
||||||
sp->owner = -1;
|
|
||||||
sp->xrepeat = 30;
|
sp->xrepeat = 30;
|
||||||
sp->yrepeat = 40; // yrepeat will grow towards 64, it's default size
|
sp->yrepeat = 40; // yrepeat will grow towards 64, it's default size
|
||||||
sp->cstat = 0;
|
sp->cstat = 0;
|
||||||
|
@ -20455,9 +20445,9 @@ DSWActor* QueueWallBlood(DSWActor* actor, short ang)
|
||||||
clipmove(&sp->pos, §num, nx, ny, 0L, 0L, 0L, CLIPMASK_MISSILE, 1);
|
clipmove(&sp->pos, §num, nx, ny, 0L, 0L, 0L, CLIPMASK_MISSILE, 1);
|
||||||
|
|
||||||
if (sp->sectnum != sectnum)
|
if (sp->sectnum != sectnum)
|
||||||
changespritesect(SpriteNum, sectnum);
|
ChangeActorSect(spawnedActor, sectnum);
|
||||||
|
|
||||||
return &swActors[SpriteNum];
|
return spawnedActor;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DoFloorBlood(DSWActor* actor)
|
int DoFloorBlood(DSWActor* actor)
|
||||||
|
@ -21116,7 +21106,6 @@ void QueueLoWangs(DSWActor* actor)
|
||||||
ps = sp;
|
ps = sp;
|
||||||
sp = &NewSprite->s();
|
sp = &NewSprite->s();
|
||||||
u = NewSprite->u();
|
u = NewSprite->u();
|
||||||
ClearOwner(NewSprite);
|
|
||||||
sp->cstat = 0;
|
sp->cstat = 0;
|
||||||
sp->xrepeat = ps->xrepeat;
|
sp->xrepeat = ps->xrepeat;
|
||||||
sp->yrepeat = ps->yrepeat;
|
sp->yrepeat = ps->yrepeat;
|
||||||
|
|
|
@ -63,7 +63,7 @@ extern DSWActor* StarQueue[MAX_STAR_QUEUE];
|
||||||
extern short HoleQueueHead;
|
extern short HoleQueueHead;
|
||||||
extern short HoleQueue[MAX_HOLE_QUEUE];
|
extern short HoleQueue[MAX_HOLE_QUEUE];
|
||||||
extern short WallBloodQueueHead;
|
extern short WallBloodQueueHead;
|
||||||
extern short WallBloodQueue[MAX_WALLBLOOD_QUEUE];
|
extern DSWActor* WallBloodQueue[MAX_WALLBLOOD_QUEUE];
|
||||||
extern short FloorBloodQueueHead;
|
extern short FloorBloodQueueHead;
|
||||||
extern short FloorBloodQueue[MAX_FLOORBLOOD_QUEUE];
|
extern short FloorBloodQueue[MAX_FLOORBLOOD_QUEUE];
|
||||||
extern short GenericQueueHead;
|
extern short GenericQueueHead;
|
||||||
|
|
Loading…
Reference in a new issue