mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-21 03:01:36 +00:00
- AddFlow API cleanup.
This commit is contained in:
parent
6bf6ac5b34
commit
73d415369d
3 changed files with 8 additions and 10 deletions
|
@ -183,7 +183,7 @@ void AddFlash(short nSector, int x, int y, int z, int val);
|
|||
void SetTorch(int nPlayer, int bTorchOnOff);
|
||||
void UndoFlashes();
|
||||
void DoLights();
|
||||
void AddFlow(int nSprite, int nSpeed, int b);
|
||||
void AddFlow(int nSprite, int nSpeed, int b, int ang = -1);
|
||||
void BuildFlash(short nPlayer, short nSector, int nVal);
|
||||
void AddGlow(short nSector, int nVal);
|
||||
void AddFlicker(short nSector, int nVal);
|
||||
|
|
|
@ -708,7 +708,7 @@ void ProcessSpriteTag(short nSprite, short nLotag, short nHitag)
|
|||
}
|
||||
case 88:
|
||||
{
|
||||
AddFlow(nSprite, nSpeed, 0);
|
||||
AddFlow(pSprite->sectnum, nSpeed, 0, pSprite->ang);
|
||||
|
||||
DeleteActor(pActor);
|
||||
return;
|
||||
|
@ -723,7 +723,7 @@ void ProcessSpriteTag(short nSprite, short nLotag, short nHitag)
|
|||
}
|
||||
case 78:
|
||||
{
|
||||
AddFlow(nSprite, nSpeed, 1);
|
||||
AddFlow(pSprite->sectnum, nSpeed, 1, pSprite->ang);
|
||||
|
||||
short nSector = pSprite->sectnum;
|
||||
SectFlag[nSector] |= 0x8000;
|
||||
|
|
|
@ -661,7 +661,7 @@ void DoFlickers()
|
|||
}
|
||||
|
||||
// nWall can also be passed in here via nSprite parameter - TODO - rename nSprite parameter :)
|
||||
void AddFlow(int nIndex, int nSpeed, int b)
|
||||
void AddFlow(int nIndex, int nSpeed, int b, int nAngle)
|
||||
{
|
||||
if (nFlowCount >= kMaxFlows)
|
||||
return;
|
||||
|
@ -672,18 +672,16 @@ void AddFlow(int nIndex, int nSpeed, int b)
|
|||
|
||||
if (b < 2)
|
||||
{
|
||||
int sectnum = sprite[nIndex].sectnum;
|
||||
short nPic = sector[sectnum].floorpicnum;
|
||||
short nAngle = sprite[nIndex].ang;
|
||||
short nPic = sector[nIndex].floorpicnum;
|
||||
|
||||
sFlowInfo[nFlow].xacc = (tileWidth(nPic) << 14) - 1;
|
||||
sFlowInfo[nFlow].yacc = (tileHeight(nPic) << 14) - 1;
|
||||
sFlowInfo[nFlow].angcos = -bcos(nAngle) * nSpeed;
|
||||
sFlowInfo[nFlow].angsin = bsin(nAngle) * nSpeed;
|
||||
sFlowInfo[nFlow].objindex = sectnum;
|
||||
sFlowInfo[nFlow].objindex = nIndex;
|
||||
|
||||
StartInterpolation(sectnum, b ? Interp_Sect_CeilingPanX : Interp_Sect_FloorPanX);
|
||||
StartInterpolation(sectnum, b ? Interp_Sect_CeilingPanY : Interp_Sect_FloorPanY);
|
||||
StartInterpolation(nIndex, b ? Interp_Sect_CeilingPanX : Interp_Sect_FloorPanX);
|
||||
StartInterpolation(nIndex, b ? Interp_Sect_CeilingPanY : Interp_Sect_FloorPanY);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue