mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-20 18:52:43 +00:00
- Exhumed: split up the value parameter of the run list.
This commit is contained in:
parent
719081824a
commit
2ee7be0382
27 changed files with 294 additions and 340 deletions
|
@ -52,7 +52,7 @@ int BuildSplash(int nSprite, int nSector);
|
|||
// anubis
|
||||
|
||||
void InitAnubis();
|
||||
int BuildAnubis(int nSprite, int x, int y, int z, int nSector, int nAngle, uint8_t bIsDrummer);
|
||||
void BuildAnubis(int nSprite, int x, int y, int z, int nSector, int nAngle, uint8_t bIsDrummer);
|
||||
void FuncAnubis(int a, int b, int c);
|
||||
|
||||
// bubbles
|
||||
|
@ -100,7 +100,7 @@ void BackUpBullet(int *x, int *y, short nAngle);
|
|||
// fish
|
||||
|
||||
void InitFishes();
|
||||
int BuildFish(int nSprite, int x, int y, int z, int nSector, int nAngle);
|
||||
void BuildFish(int nSprite, int x, int y, int z, int nSector, int nAngle);
|
||||
void FuncFish(int, int, int);
|
||||
void FuncFishLimb(int a, int b, int c);
|
||||
|
||||
|
@ -109,7 +109,7 @@ void FuncFishLimb(int a, int b, int c);
|
|||
enum { kMaxGrenades = 50 };
|
||||
|
||||
void InitGrenades();
|
||||
int BuildGrenade(int nPlayer);
|
||||
void BuildGrenade(int nPlayer);
|
||||
void DestroyGrenade(short nGrenade);
|
||||
int ThrowGrenade(short nPlayer, int edx, int ebx, int ecx, int push1);
|
||||
void FuncGrenade(int, int, int);
|
||||
|
@ -187,7 +187,7 @@ void DoRegenerates();
|
|||
// lavadude
|
||||
|
||||
void InitLava();
|
||||
int BuildLava(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel);
|
||||
void BuildLava(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel);
|
||||
int BuildLavaLimb(int nSprite, int edx, int ebx);
|
||||
void FuncLavaLimb(int, int, int);
|
||||
void FuncLava(int, int, int);
|
||||
|
@ -211,7 +211,7 @@ extern short bTorch;
|
|||
// lion
|
||||
|
||||
void InitLion();
|
||||
int BuildLion(short nSprite, int x, int y, int z, short nSector, short nAngle);
|
||||
void BuildLion(short nSprite, int x, int y, int z, short nSector, short nAngle);
|
||||
void FuncLion(int, int, int);
|
||||
|
||||
// move
|
||||
|
@ -263,7 +263,7 @@ void SetQuake(short nSprite, int nVal);
|
|||
enum { kMaxMummies = 150 };
|
||||
|
||||
void InitMummy();
|
||||
int BuildMummy(int val, int x, int y, int z, int nSector, int nAngle);
|
||||
void BuildMummy(int val, int x, int y, int z, int nSector, int nAngle);
|
||||
void FuncMummy(int nSector, int edx, int nRun);
|
||||
|
||||
// object
|
||||
|
@ -317,7 +317,7 @@ int BuildSlide(int nChannel, int edx, int ebx, int ecx, int arg1, int arg2, int
|
|||
// queen
|
||||
|
||||
void InitQueens();
|
||||
int BuildQueen(int nSprite, int x, int y, int z, int nSector, int nAngle, int nVal);
|
||||
void BuildQueen(int nSprite, int x, int y, int z, int nSector, int nAngle, int nVal);
|
||||
void FuncQueenEgg(int, int, int);
|
||||
void FuncQueenHead(int, int, int);
|
||||
void FuncQueen(int, int, int);
|
||||
|
@ -340,7 +340,7 @@ struct RA
|
|||
extern RA Ra[];
|
||||
|
||||
void FreeRa(short nPlayer);
|
||||
int BuildRa(short nPlayer);
|
||||
void BuildRa(short nPlayer);
|
||||
void InitRa();
|
||||
void MoveRaToEnemy(short nPlayer);
|
||||
void FuncRa(int, int, int);
|
||||
|
@ -349,20 +349,20 @@ void FuncRa(int, int, int);
|
|||
|
||||
void InitRats();
|
||||
void SetRatVel(short nSprite);
|
||||
int BuildRat(short nSprite, int x, int y, int z, short nSector, int nAngle);
|
||||
void BuildRat(short nSprite, int x, int y, int z, short nSector, int nAngle);
|
||||
int FindFood(short nSprite);
|
||||
void FuncRat(int a, int b, int nRun);
|
||||
|
||||
// rex
|
||||
|
||||
void InitRexs();
|
||||
int BuildRex(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel);
|
||||
void BuildRex(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel);
|
||||
void FuncRex(int, int, int);
|
||||
|
||||
// roach
|
||||
|
||||
void InitRoachs();
|
||||
int BuildRoach(int nType, int nSprite, int x, int y, int z, short nSector, int angle);
|
||||
void BuildRoach(int nType, int nSprite, int x, int y, int z, short nSector, int angle);
|
||||
void FuncRoach(int a, int nDamage, int nRun);
|
||||
|
||||
// runlist
|
||||
|
@ -375,21 +375,8 @@ enum
|
|||
|
||||
struct RunStruct
|
||||
{
|
||||
union
|
||||
{
|
||||
int nMoves;
|
||||
struct
|
||||
{
|
||||
#if B_BIG_ENDIAN == 1
|
||||
short nRef;
|
||||
short nVal;
|
||||
#else
|
||||
short nVal;
|
||||
short nRef;
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
int nRef;
|
||||
int nVal;
|
||||
short next;
|
||||
short prev;
|
||||
};
|
||||
|
@ -414,7 +401,7 @@ void runlist_InitRun();
|
|||
|
||||
int runlist_GrabRun();
|
||||
int runlist_FreeRun(int nRun);
|
||||
int runlist_AddRunRec(int a, int b);
|
||||
int runlist_AddRunRec(int a, int b, int c);
|
||||
int runlist_HeadRun();
|
||||
void runlist_InitChan();
|
||||
void runlist_ChangeChannel(int eax, short dx);
|
||||
|
@ -435,13 +422,13 @@ void runlist_ExecObjects();
|
|||
// scorp
|
||||
|
||||
void InitScorp();
|
||||
int BuildScorp(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel);
|
||||
void BuildScorp(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel);
|
||||
void FuncScorp(int, int, int);
|
||||
|
||||
// set
|
||||
|
||||
void InitSets();
|
||||
int BuildSet(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel);
|
||||
void BuildSet(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel);
|
||||
void FuncSoul(int, int, int);
|
||||
void FuncSet(int, int, int);
|
||||
|
||||
|
@ -469,7 +456,7 @@ extern FreeListArray<Snake, kMaxSnakes> SnakeList;
|
|||
|
||||
void InitSnakes();
|
||||
short GrabSnake();
|
||||
int BuildSnake(short nPlayer, short zVal);
|
||||
void BuildSnake(short nPlayer, short zVal);
|
||||
void FuncSnake(int, int, int);
|
||||
|
||||
// spider
|
||||
|
@ -490,14 +477,14 @@ void FuncSwNotOnPause(int, int, int);
|
|||
void FuncSwPressSector(int, int, int);
|
||||
void FuncSwPressWall(int, int, int);
|
||||
|
||||
int BuildSwPause(int nChannel, int nLink, int ebx);
|
||||
int BuildSwNotOnPause(int nChannel, int nLink, int nSector, int ecx);
|
||||
std::pair<int, int> BuildSwPause(int nChannel, int nLink, int ebx);
|
||||
std::pair<int, int> BuildSwNotOnPause(int nChannel, int nLink, int nSector, int ecx);
|
||||
int BuildLink(int nCount, ...);
|
||||
int BuildSwPressSector(int nChannel, int nLink, int nSector, int ecx);
|
||||
int BuildSwStepOn(int nChannel, int nLink, int nSector);
|
||||
int BuildSwReady(int nChannel, short nLink);
|
||||
std::pair<int, int> BuildSwPressSector(int nChannel, int nLink, int nSector, int ecx);
|
||||
std::pair<int, int> BuildSwStepOn(int nChannel, int nLink, int nSector);
|
||||
std::pair<int, int> BuildSwReady(int nChannel, short nLink);
|
||||
|
||||
int BuildSwPressWall(short nChannel, short nLink, short nWall);
|
||||
std::pair<int, int> BuildSwPressWall(short nChannel, short nLink, short nWall);
|
||||
|
||||
// wasp
|
||||
|
||||
|
|
|
@ -129,9 +129,9 @@ int BuildAnim(int nSprite, int val, int val2, int x, int y, int z, int nSector,
|
|||
|
||||
pSprite->lotag = runlist_HeadRun() + 1;
|
||||
pSprite->owner = -1;
|
||||
pSprite->extra = runlist_AddRunRec(pSprite->lotag - 1, nAnim | 0x100000);
|
||||
pSprite->extra = runlist_AddRunRec(pSprite->lotag - 1, nAnim, 0x100000);
|
||||
|
||||
AnimList[nAnim].AnimRunRec = runlist_AddRunRec(NewRun, nAnim | 0x100000);
|
||||
AnimList[nAnim].AnimRunRec = runlist_AddRunRec(NewRun, nAnim, 0x100000);
|
||||
AnimList[nAnim].nSprite = nSprite;
|
||||
AnimList[nAnim].AnimFlags = nFlag;
|
||||
AnimList[nAnim].field_2 = 0;
|
||||
|
|
|
@ -83,7 +83,7 @@ void InitAnubis()
|
|||
nAnubisDrum = 1;
|
||||
}
|
||||
|
||||
int BuildAnubis(int nSprite, int x, int y, int z, int nSector, int nAngle, uint8_t bIsDrummer)
|
||||
void BuildAnubis(int nSprite, int x, int y, int z, int nSector, int nAngle, uint8_t bIsDrummer)
|
||||
{
|
||||
auto nAnubis = AnubisList.Reserve(1);
|
||||
auto ap = &AnubisList[nAnubis];
|
||||
|
@ -149,12 +149,10 @@ int BuildAnubis(int nSprite, int x, int y, int z, int nSector, int nAngle, uint8
|
|||
ap->nTarget = -1;
|
||||
ap->nCount = 0;
|
||||
|
||||
sp->owner = runlist_AddRunRec(sp->lotag - 1, nAnubis | 0x90000);
|
||||
sp->owner = runlist_AddRunRec(sp->lotag - 1, nAnubis, 0x90000);
|
||||
|
||||
runlist_AddRunRec(NewRun, nAnubis | 0x90000);
|
||||
runlist_AddRunRec(NewRun, nAnubis, 0x90000);
|
||||
nCreaturesTotal++;
|
||||
|
||||
return nAnubis | 0x90000;
|
||||
}
|
||||
|
||||
void FuncAnubis(int a, int nDamage, int nRun)
|
||||
|
|
|
@ -156,9 +156,9 @@ int BuildBubble(int x, int y, int z, short nSector)
|
|||
BubbleList[nBubble].nFrame = 0;
|
||||
BubbleList[nBubble].nSeq = SeqOffsets[kSeqBubble] + nSize;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nBubble | 0x140000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nBubble, 0x140000);
|
||||
|
||||
BubbleList[nBubble].nRun = runlist_AddRunRec(NewRun, nBubble | 0x140000);
|
||||
BubbleList[nBubble].nRun = runlist_AddRunRec(NewRun, nBubble, 0x140000);
|
||||
return nBubble | 0x140000;
|
||||
}
|
||||
|
||||
|
|
|
@ -692,8 +692,8 @@ int BuildBullet(short nSprite, int nType, int, int, int val1, int nAngle, int va
|
|||
pBullet->field_C = val2;
|
||||
pBullet->nType = nType;
|
||||
pBullet->nSprite = nBulletSprite;
|
||||
pBullet->field_6 = runlist_AddRunRec(pBulletSprite->lotag - 1, nBullet | 0xB0000);
|
||||
pBullet->field_8 = runlist_AddRunRec(NewRun, nBullet | 0xB0000);
|
||||
pBullet->field_6 = runlist_AddRunRec(pBulletSprite->lotag - 1, nBullet, 0xB0000);
|
||||
pBullet->field_8 = runlist_AddRunRec(NewRun, nBullet, 0xB0000);
|
||||
pBullet->field_13 = val3;
|
||||
pBulletSprite->z += val1;
|
||||
pBulletSprite->backuppos();
|
||||
|
@ -808,7 +808,7 @@ int BuildBullet(short nSprite, int nType, int, int, int val1, int nAngle, int va
|
|||
pBullet->z = var_18 >> 3;
|
||||
}
|
||||
|
||||
return nBulletSprite | IntToFixed(nBullet);
|
||||
return nBulletSprite | (nBullet << 16);
|
||||
}
|
||||
|
||||
void FuncBullet(int a, int, int nRun)
|
||||
|
|
|
@ -53,6 +53,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
|
||||
BEGIN_PS_NS
|
||||
|
||||
DExhumedActor exhumedActors[MAXSPRITES];
|
||||
|
||||
static MapRecord* NextMap;
|
||||
|
||||
void uploadCinemaPalettes();
|
||||
|
|
|
@ -100,7 +100,7 @@ void InitFishes()
|
|||
FishChunk.Clear();
|
||||
}
|
||||
|
||||
int BuildFishLimb(short nFish, short edx)
|
||||
void BuildFishLimb(short nFish, short edx)
|
||||
{
|
||||
short nSprite = FishList[nFish].nSprite;
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
@ -138,10 +138,8 @@ int BuildFishLimb(short nFish, short edx)
|
|||
// GrabTimeSlot(3);
|
||||
|
||||
pSprite2->extra = -1;
|
||||
pSprite2->owner = runlist_AddRunRec(pSprite2->lotag - 1, nFree | 0x200000);
|
||||
pSprite2->hitag = runlist_AddRunRec(NewRun, nFree | 0x200000);
|
||||
|
||||
return nFree | 0x200000;
|
||||
pSprite2->owner = runlist_AddRunRec(pSprite2->lotag - 1, nFree, 0x200000);
|
||||
pSprite2->hitag = runlist_AddRunRec(NewRun, nFree, 0x200000);
|
||||
}
|
||||
|
||||
void BuildBlood(int x, int y, int z, short nSector)
|
||||
|
@ -219,7 +217,7 @@ void FuncFishLimb(int a, int, int nRun)
|
|||
}
|
||||
}
|
||||
|
||||
int BuildFish(int nSprite, int x, int y, int z, int nSector, int nAngle)
|
||||
void BuildFish(int nSprite, int x, int y, int z, int nSector, int nAngle)
|
||||
{
|
||||
int nFish = FishList.Reserve(1);
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
@ -269,12 +267,10 @@ int BuildFish(int nSprite, int x, int y, int z, int nSector, int nAngle)
|
|||
FishList[nFish].nCount = 60;
|
||||
FishList[nFish].nFrame = 0;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nFish | 0x120000);
|
||||
FishList[nFish].nRun = runlist_AddRunRec(NewRun, nFish | 0x120000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nFish, 0x120000);
|
||||
FishList[nFish].nRun = runlist_AddRunRec(NewRun, nFish, 0x120000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
||||
return nFish | 0x120000;
|
||||
}
|
||||
|
||||
void IdleFish(short nFish, short edx)
|
||||
|
|
|
@ -160,10 +160,10 @@ int ThrowGrenade(short nPlayer, int, int, int ecx, int push1)
|
|||
return nGrenadeSprite;
|
||||
}
|
||||
|
||||
int BuildGrenade(int nPlayer)
|
||||
void BuildGrenade(int nPlayer)
|
||||
{
|
||||
int nGrenade = GrabGrenade();
|
||||
if (nGrenade < 0) return -1;
|
||||
if (nGrenade < 0) return;
|
||||
|
||||
int nSprite = insertsprite(nPlayerViewSect[nPlayer], 201);
|
||||
assert(nSprite >= 0 && nSprite < kMaxSprites);
|
||||
|
@ -203,13 +203,11 @@ int BuildGrenade(int nPlayer)
|
|||
GrenadeList[nGrenade].nSprite = nSprite;
|
||||
GrenadeList[nGrenade].field_A = 0;
|
||||
GrenadeList[nGrenade].field_C = 0;
|
||||
GrenadeList[nGrenade].field_6 = runlist_AddRunRec(pSprite->lotag - 1, nGrenade | 0x0F0000);
|
||||
GrenadeList[nGrenade].field_8 = runlist_AddRunRec(NewRun, nGrenade | 0x0F0000);
|
||||
GrenadeList[nGrenade].field_6 = runlist_AddRunRec(pSprite->lotag - 1, nGrenade, 0x0F0000);
|
||||
GrenadeList[nGrenade].field_8 = runlist_AddRunRec(NewRun, nGrenade, 0x0F0000);
|
||||
|
||||
nGrenadePlayer[nGrenade] = nPlayer;
|
||||
nPlayerGrenade[nPlayer] = nGrenade;
|
||||
|
||||
return nSprite;
|
||||
}
|
||||
|
||||
void ExplodeGrenade(short nGrenade)
|
||||
|
|
|
@ -744,7 +744,7 @@ void ProcessSpriteTag(short nSprite, short nLotag, short nHitag)
|
|||
{
|
||||
int nArrow = BuildArrow(nSprite, nSpeed);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nArrow);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nArrow, 0x1F0000);
|
||||
return;
|
||||
}
|
||||
case 76: // Explosion Trigger (Exploding Fire Cauldron)
|
||||
|
@ -761,7 +761,7 @@ void ProcessSpriteTag(short nSprite, short nLotag, short nHitag)
|
|||
{
|
||||
int nFireball = BuildFireBall(nSprite, nHitag, nSpeed);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nFireball);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nFireball, 0x1F0000);
|
||||
return;
|
||||
}
|
||||
case 70:
|
||||
|
|
|
@ -107,8 +107,8 @@ int BuildLavaLimb(int nSprite, int edx, int ebx)
|
|||
// GrabTimeSlot(3);
|
||||
|
||||
pLimbSprite->extra = -1;
|
||||
pLimbSprite->owner = runlist_AddRunRec(pLimbSprite->lotag - 1, nLimbSprite | 0x160000);
|
||||
pLimbSprite->hitag = runlist_AddRunRec(NewRun, nLimbSprite | 0x160000);
|
||||
pLimbSprite->owner = runlist_AddRunRec(pLimbSprite->lotag - 1, nLimbSprite, 0x160000);
|
||||
pLimbSprite->hitag = runlist_AddRunRec(NewRun, nLimbSprite, 0x160000);
|
||||
|
||||
return nLimbSprite;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ void FuncLavaLimb(int a, int, int nRun)
|
|||
}
|
||||
}
|
||||
|
||||
int BuildLava(short nSprite, int x, int y, int, short nSector, short nAngle, int nChannel)
|
||||
void BuildLava(short nSprite, int x, int y, int, short nSector, short nAngle, int nChannel)
|
||||
{
|
||||
auto nLava = LavaList.Reserve(1);
|
||||
|
||||
|
@ -207,12 +207,10 @@ int BuildLava(short nSprite, int x, int y, int, short nSector, short nAngle, int
|
|||
LavaList[nLava].nIndex = nChannel;
|
||||
LavaList[nLava].nFrame = 0;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nLava | 0x150000);
|
||||
LavaList[nLava].nRun = runlist_AddRunRec(NewRun, nLava | 0x150000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nLava, 0x150000);
|
||||
LavaList[nLava].nRun = runlist_AddRunRec(NewRun, nLava, 0x150000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
||||
return nLava | 0x150000;
|
||||
}
|
||||
|
||||
void FuncLava(int a, int nDamage, int nRun)
|
||||
|
|
|
@ -81,7 +81,7 @@ void InitLion()
|
|||
LionList.Clear();
|
||||
}
|
||||
|
||||
int BuildLion(short nSprite, int x, int y, int z, short nSector, short nAngle)
|
||||
void BuildLion(short nSprite, int x, int y, int z, short nSector, short nAngle)
|
||||
{
|
||||
auto nLion = LionList.Reserve(1);
|
||||
|
||||
|
@ -132,13 +132,11 @@ int BuildLion(short nSprite, int x, int y, int z, short nSector, short nAngle)
|
|||
LionList[nLion].nCount = 0;
|
||||
LionList[nLion].nIndex = nLion;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nLion | 0x130000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nLion, 0x130000);
|
||||
|
||||
LionList[nLion].nRun = runlist_AddRunRec(NewRun, nLion | 0x130000);
|
||||
LionList[nLion].nRun = runlist_AddRunRec(NewRun, nLion, 0x130000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
||||
return nLion | 0x130000;
|
||||
}
|
||||
|
||||
void FuncLion(int a, int nDamage, int nRun)
|
||||
|
|
|
@ -1485,8 +1485,8 @@ int BuildCreatureChunk(int nVal, int nPic)
|
|||
// GrabTimeSlot(3);
|
||||
|
||||
pSprite->extra = -1;
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nSprite | 0xD0000);
|
||||
pSprite->hitag = runlist_AddRunRec(NewRun, nSprite | 0xD0000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nSprite, 0xD0000);
|
||||
pSprite->hitag = runlist_AddRunRec(NewRun, nSprite, 0xD0000);
|
||||
|
||||
return nSprite | 0xD0000;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ void InitMummy()
|
|||
MummyList.Clear();
|
||||
}
|
||||
|
||||
int BuildMummy(int nSprite, int x, int y, int z, int nSector, int nAngle)
|
||||
void BuildMummy(int nSprite, int x, int y, int z, int nSector, int nAngle)
|
||||
{
|
||||
auto nMummy = MummyList.Reserve(1);
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
@ -131,13 +131,11 @@ int BuildMummy(int nSprite, int x, int y, int z, int nSector, int nAngle)
|
|||
MummyList[nMummy].nIndex = nMummy;
|
||||
MummyList[nMummy].nCount = 0;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nMummy | 0xE0000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nMummy, 0xE0000);
|
||||
|
||||
MummyList[nMummy].nRun = runlist_AddRunRec(NewRun, nMummy | 0xE0000);
|
||||
MummyList[nMummy].nRun = runlist_AddRunRec(NewRun, nMummy, 0xE0000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
||||
return (nMummy | 0xE0000);
|
||||
}
|
||||
|
||||
void CheckMummyRevive(short nMummy)
|
||||
|
|
|
@ -765,7 +765,7 @@ void FuncElev(int a, int, int nRun)
|
|||
{
|
||||
if (Elevator[nElev].field_32 < 0)
|
||||
{
|
||||
Elevator[nElev].field_32 = runlist_AddRunRec(NewRun, RunData[nRun].nMoves);
|
||||
Elevator[nElev].field_32 = runlist_AddRunRec(NewRun, RunData[nRun].nVal, RunData[nRun].nRef);
|
||||
StartElevSound(Elevator[nElev].nSprite, var_18);
|
||||
|
||||
edi = 1;
|
||||
|
@ -799,7 +799,7 @@ void FuncElev(int a, int, int nRun)
|
|||
{
|
||||
if (Elevator[nElev].field_32 < 0)
|
||||
{
|
||||
Elevator[nElev].field_32 = runlist_AddRunRec(NewRun, RunData[nRun].nMoves);
|
||||
Elevator[nElev].field_32 = runlist_AddRunRec(NewRun, RunData[nRun].nVal, RunData[nRun].nRef);
|
||||
|
||||
StartElevSound(Elevator[nElev].nSprite, var_18);
|
||||
}
|
||||
|
@ -969,7 +969,7 @@ int BuildWallFace(short nChannel, short nWall, int nCount, ...)
|
|||
}
|
||||
va_end(piclist);
|
||||
|
||||
return WallFaceCount | 0x70000;
|
||||
return WallFaceCount;
|
||||
}
|
||||
|
||||
void FuncWallFace(int a, int, int nRun)
|
||||
|
@ -1126,7 +1126,7 @@ int BuildSlide(int nChannel, int nStartWall, int nWall1, int ecx, int nWall2, in
|
|||
|
||||
SlideData[nSlide].field_8a = 0;
|
||||
|
||||
return nSlide | 0x80000;
|
||||
return nSlide;
|
||||
}
|
||||
|
||||
void FuncSlide(int a, int, int nRun)
|
||||
|
@ -1156,7 +1156,7 @@ void FuncSlide(int a, int, int nRun)
|
|||
return;
|
||||
}
|
||||
|
||||
SlideData[nSlide].field_4a = runlist_AddRunRec(NewRun, RunData[nRun].nMoves);
|
||||
SlideData[nSlide].field_4a = runlist_AddRunRec(NewRun, RunData[nRun].nVal, RunData[nRun].nRef);
|
||||
|
||||
if (SlideData[nSlide].field_8a != sRunChannels[nChannel].c)
|
||||
{
|
||||
|
@ -1317,8 +1317,8 @@ int BuildTrap(int nSprite, int edx, int ebx, int ecx)
|
|||
pSprite->extra = -1;
|
||||
|
||||
pSprite->lotag = runlist_HeadRun() + 1;
|
||||
pSprite->hitag = runlist_AddRunRec(NewRun, nTrap | 0x1F0000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nTrap | 0x1F0000);
|
||||
pSprite->hitag = runlist_AddRunRec(NewRun, nTrap, 0x1F0000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nTrap, 0x1F0000);
|
||||
|
||||
// GrabTimeSlot(3);
|
||||
|
||||
|
@ -1440,7 +1440,7 @@ void FuncTrap(int a, int, int nRun)
|
|||
int nBullet = BuildBullet(nSprite, nType, 0, 0, 0, pSprite->ang, 0, 1);
|
||||
if (nBullet > -1)
|
||||
{
|
||||
short nBulletSprite = nBullet & 0xFFFF; // isolate the sprite index (disregard top 16 bits)
|
||||
int nBulletSprite = nBullet & 0xFFFF; // isolate the sprite index (disregard top 16 bits)
|
||||
assert(nBulletSprite >= 0);
|
||||
|
||||
if (nType == 15)
|
||||
|
@ -1561,8 +1561,8 @@ int BuildSpark(int nSprite, int nVal)
|
|||
// GrabTimeSlot(3);
|
||||
|
||||
spr->extra = -1;
|
||||
spr->owner = runlist_AddRunRec(spr->lotag - 1, var_14 | 0x260000);
|
||||
spr->hitag = runlist_AddRunRec(NewRun, var_14 | 0x260000);
|
||||
spr->owner = runlist_AddRunRec(spr->lotag - 1, var_14, 0x260000);
|
||||
spr->hitag = runlist_AddRunRec(NewRun, var_14, 0x260000);
|
||||
|
||||
return var_14;
|
||||
}
|
||||
|
@ -1767,7 +1767,7 @@ int BuildEnergyBlock(short nSector)
|
|||
spr->extra = -1;
|
||||
spr->lotag = runlist_HeadRun() + 1;
|
||||
spr->hitag = 0;
|
||||
spr->owner = runlist_AddRunRec(spr->lotag - 1, nSprite | 0x250000);
|
||||
spr->owner = runlist_AddRunRec(spr->lotag - 1, nSprite, 0x250000);
|
||||
spr->backuppos();
|
||||
|
||||
nEnergyBlocks++;
|
||||
|
@ -1998,7 +1998,7 @@ int BuildObject(int const nSprite, int nOjectType, int nHitag)
|
|||
spr->extra = -1;
|
||||
spr->lotag = runlist_HeadRun() + 1;
|
||||
spr->hitag = 0;
|
||||
spr->owner = runlist_AddRunRec(spr->lotag - 1, nObject | 0x170000);
|
||||
spr->owner = runlist_AddRunRec(spr->lotag - 1, nObject, 0x170000);
|
||||
|
||||
// GrabTimeSlot(3);
|
||||
|
||||
|
@ -2010,7 +2010,7 @@ int BuildObject(int const nSprite, int nOjectType, int nHitag)
|
|||
}
|
||||
|
||||
ObjectList[nObject].nSprite = nSprite;
|
||||
ObjectList[nObject].field_4 = runlist_AddRunRec(NewRun, nObject | 0x170000);
|
||||
ObjectList[nObject].field_4 = runlist_AddRunRec(NewRun, nObject, 0x170000);
|
||||
|
||||
short nSeq = ObjectSeq[nOjectType];
|
||||
|
||||
|
|
|
@ -438,11 +438,11 @@ void RestartPlayer(short nPlayer)
|
|||
|
||||
nTauntTimer[nPlayer] = RandomSize(3) + 3;
|
||||
|
||||
nDSpr->owner = runlist_AddRunRec(nDSpr->lotag - 1, nPlayer | 0xA0000);
|
||||
nSpr->owner = runlist_AddRunRec(nSpr->lotag - 1, nPlayer | 0xA0000);
|
||||
nDSpr->owner = runlist_AddRunRec(nDSpr->lotag - 1, nPlayer, 0xA0000);
|
||||
nSpr->owner = runlist_AddRunRec(nSpr->lotag - 1, nPlayer, 0xA0000);
|
||||
|
||||
if (plr->nRun < 0) {
|
||||
plr->nRun = runlist_AddRunRec(NewRun, nPlayer | 0xA0000);
|
||||
plr->nRun = runlist_AddRunRec(NewRun, nPlayer, 0xA0000);
|
||||
}
|
||||
|
||||
BuildRa(nPlayer);
|
||||
|
|
|
@ -404,7 +404,7 @@ void BuildTail()
|
|||
}
|
||||
|
||||
pTailSprite->lotag = runlist_HeadRun() + 1;
|
||||
pTailSprite->owner = runlist_AddRunRec(sprite[nTailSprite].lotag - 1, (i + 1) | 0x1B0000);
|
||||
pTailSprite->owner = runlist_AddRunRec(sprite[nTailSprite].lotag - 1, (i + 1), 0x1B0000);
|
||||
pTailSprite->shade = -12;
|
||||
pTailSprite->x = x;
|
||||
pTailSprite->y = y;
|
||||
|
@ -434,11 +434,11 @@ void BuildTail()
|
|||
QueenHead.tails = 7;
|
||||
}
|
||||
|
||||
int BuildQueenEgg(short nQueen, int nVal)
|
||||
void BuildQueenEgg(short nQueen, int nVal)
|
||||
{
|
||||
int nEgg = GrabEgg();
|
||||
if (nEgg < 0) {
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
|
||||
short nSprite = QueenList[nQueen].nSprite;
|
||||
|
@ -505,10 +505,8 @@ int BuildQueenEgg(short nQueen, int nVal)
|
|||
|
||||
QueenEgg[nEgg].nAction = nVal;
|
||||
|
||||
pSprite2->owner = runlist_AddRunRec(pSprite2->lotag - 1, nEgg | 0x1D0000);
|
||||
QueenEgg[nEgg].nRunPtr = runlist_AddRunRec(NewRun, nEgg | 0x1D0000);
|
||||
|
||||
return 0;
|
||||
pSprite2->owner = runlist_AddRunRec(pSprite2->lotag - 1, nEgg, 0x1D0000);
|
||||
QueenEgg[nEgg].nRunPtr = runlist_AddRunRec(NewRun, nEgg, 0x1D0000);
|
||||
}
|
||||
|
||||
void FuncQueenEgg(int a, int nDamage, int nRun)
|
||||
|
@ -714,7 +712,7 @@ void FuncQueenEgg(int a, int nDamage, int nRun)
|
|||
}
|
||||
}
|
||||
|
||||
int BuildQueenHead(short nQueen)
|
||||
void BuildQueenHead(short nQueen)
|
||||
{
|
||||
short nSprite = QueenList[nQueen].nSprite;
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
@ -760,12 +758,10 @@ int BuildQueenHead(short nQueen)
|
|||
QueenHead.nSprite = nSprite2;
|
||||
QueenHead.field_C = 0;
|
||||
|
||||
pSprite2->owner = runlist_AddRunRec(pSprite2->lotag - 1, 0x1B0000);
|
||||
pSprite2->owner = runlist_AddRunRec(pSprite2->lotag - 1, 0, 0x1B0000);
|
||||
|
||||
QueenHead.field_8 = runlist_AddRunRec(NewRun, 0x1B0000);
|
||||
QueenHead.field_8 = runlist_AddRunRec(NewRun, 0, 0x1B0000);
|
||||
QueenHead.tails = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void FuncQueenHead(int a, int nDamage, int nRun)
|
||||
|
@ -1147,13 +1143,13 @@ __MOVEQS:
|
|||
}
|
||||
}
|
||||
|
||||
int BuildQueen(int nSprite, int x, int y, int z, int nSector, int nAngle, int nChannel)
|
||||
void BuildQueen(int nSprite, int x, int y, int z, int nSector, int nAngle, int nChannel)
|
||||
{
|
||||
QueenCount--;
|
||||
|
||||
short nQueen = QueenCount;
|
||||
if (nQueen < 0) {
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
||||
|
@ -1209,13 +1205,11 @@ int BuildQueen(int nSprite, int x, int y, int z, int nSector, int nAngle, int nC
|
|||
|
||||
nHeadVel = 800;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nQueen | 0x1A0000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nQueen, 0x1A0000);
|
||||
|
||||
runlist_AddRunRec(NewRun, nQueen | 0x1A0000);
|
||||
runlist_AddRunRec(NewRun, nQueen, 0x1A0000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
||||
return nQueen | 0x1A0000;
|
||||
}
|
||||
|
||||
void SetQueenSpeed(short nSprite, int nSpeed)
|
||||
|
|
|
@ -73,7 +73,7 @@ void FreeRa(short nPlayer)
|
|||
mydeletesprite(nSprite);
|
||||
}
|
||||
|
||||
int BuildRa(short nPlayer)
|
||||
void BuildRa(short nPlayer)
|
||||
{
|
||||
short nPlayerSprite = PlayerList[nPlayer].nSprite;
|
||||
|
||||
|
@ -87,7 +87,7 @@ int BuildRa(short nPlayer)
|
|||
pSprite->extra = -1;
|
||||
pSprite->lotag = runlist_HeadRun() + 1;
|
||||
pSprite->hitag = 0;
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nPlayer | 0x210000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nPlayer, 0x210000);
|
||||
pSprite->pal = 1;
|
||||
pSprite->xrepeat = 64;
|
||||
pSprite->yrepeat = 64;
|
||||
|
@ -99,14 +99,12 @@ int BuildRa(short nPlayer)
|
|||
|
||||
Ra[nPlayer].nSprite = nSprite;
|
||||
|
||||
Ra[nPlayer].nRun = runlist_AddRunRec(NewRun, nPlayer | 0x210000);
|
||||
Ra[nPlayer].nRun = runlist_AddRunRec(NewRun, nPlayer, 0x210000);
|
||||
Ra[nPlayer].nTarget = -1;
|
||||
Ra[nPlayer].nFrame = 0;
|
||||
Ra[nPlayer].nAction = 0;
|
||||
Ra[nPlayer].field_C = 0;
|
||||
Ra[nPlayer].nPlayer = nPlayer;
|
||||
|
||||
return nPlayer | 0x210000;
|
||||
}
|
||||
|
||||
void InitRa()
|
||||
|
|
|
@ -107,7 +107,7 @@ void SetRatVel(short nSprite)
|
|||
pSprite->yvel = bsin(pSprite->ang, -2);
|
||||
}
|
||||
|
||||
int BuildRat(short nSprite, int x, int y, int z, short nSector, int nAngle)
|
||||
void BuildRat(short nSprite, int x, int y, int z, short nSector, int nAngle)
|
||||
{
|
||||
auto nRat = RatList.Reserve(1);
|
||||
|
||||
|
@ -159,10 +159,9 @@ int BuildRat(short nSprite, int x, int y, int z, short nSector, int nAngle)
|
|||
RatList[nRat].nCount = RandomSize(5);
|
||||
RatList[nRat].nIndex = RandomSize(3);
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nRat | 0x240000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nRat, 0x240000);
|
||||
|
||||
RatList[nRat].nRun = runlist_AddRunRec(NewRun, nRat | 0x240000);
|
||||
return 0;
|
||||
RatList[nRat].nRun = runlist_AddRunRec(NewRun, nRat, 0x240000);
|
||||
}
|
||||
|
||||
int FindFood(short nSprite)
|
||||
|
|
|
@ -77,7 +77,7 @@ void InitRexs()
|
|||
RexList.Clear();
|
||||
}
|
||||
|
||||
int BuildRex(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel)
|
||||
void BuildRex(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel)
|
||||
{
|
||||
int nRex = RexList.Reserve(1);
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
@ -129,14 +129,12 @@ int BuildRex(short nSprite, int x, int y, int z, short nSector, short nAngle, in
|
|||
|
||||
RexList[nRex].nChannel = nChannel;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nRex | 0x180000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nRex, 0x180000);
|
||||
|
||||
// this isn't stored anywhere.
|
||||
runlist_AddRunRec(NewRun, nRex | 0x180000);
|
||||
runlist_AddRunRec(NewRun, nRex, 0x180000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
||||
return nRex | 0x180000;
|
||||
}
|
||||
|
||||
void FuncRex(int a, int nDamage, int nRun)
|
||||
|
|
|
@ -80,7 +80,7 @@ void InitRoachs()
|
|||
}
|
||||
|
||||
// TODO - make nType a bool?
|
||||
int BuildRoach(int nType, int nSprite, int x, int y, int z, short nSector, int angle)
|
||||
void BuildRoach(int nType, int nSprite, int x, int y, int z, short nSector, int angle)
|
||||
{
|
||||
auto RoachCount = RoachList.Reserve(1);
|
||||
|
||||
|
@ -138,12 +138,10 @@ int BuildRoach(int nType, int nSprite, int x, int y, int z, short nSector, int a
|
|||
RoachList[RoachCount].nTarget = -1;
|
||||
RoachList[RoachCount].nHealth = 600;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, RoachCount | 0x1C0000);
|
||||
RoachList[RoachCount].nRun = runlist_AddRunRec(NewRun, RoachCount | 0x1C0000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, RoachCount, 0x1C0000);
|
||||
RoachList[RoachCount].nRun = runlist_AddRunRec(NewRun, RoachCount, 0x1C0000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
||||
return RoachCount | 0x1C0000;
|
||||
}
|
||||
|
||||
void GoRoach(short nSprite)
|
||||
|
|
|
@ -53,7 +53,8 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, RunStruct& w, RunS
|
|||
{
|
||||
if (arc.BeginObject(keyname))
|
||||
{
|
||||
arc("moves", w.nMoves)
|
||||
arc("ref", w.nRef)
|
||||
("val", w.nVal)
|
||||
("_4", w.next)
|
||||
("_6", w.prev)
|
||||
.EndObject();
|
||||
|
@ -135,7 +136,8 @@ int runlist_FreeRun(int nRun)
|
|||
assert(nRun >= 0 && nRun < kMaxRuns);
|
||||
|
||||
RunData[nRun].prev = -1;
|
||||
RunData[nRun].nMoves = -1;
|
||||
RunData[nRun].nRef = -1;
|
||||
RunData[nRun].nVal = -1;
|
||||
RunData[nRun].next = RunData[nRun].prev;
|
||||
RunData.Release(nRun);
|
||||
return 1;
|
||||
|
@ -160,7 +162,8 @@ void runlist_InitRun()
|
|||
|
||||
for (i = 0; i < kMaxRuns; i++)
|
||||
{
|
||||
RunData[i].nMoves = -1;
|
||||
RunData[i].nRef = -1;
|
||||
RunData[i].nVal = -1;
|
||||
RunData[i].prev = -1;
|
||||
RunData[i].next = -1;
|
||||
}
|
||||
|
@ -213,11 +216,12 @@ void runlist_InsertRun(int RunLst, int RunNum)
|
|||
RunData[RunLst].next = RunNum;
|
||||
}
|
||||
|
||||
int runlist_AddRunRec(int a, int b)
|
||||
int runlist_AddRunRec(int a, int b, int c)
|
||||
{
|
||||
int nRun = runlist_GrabRun();
|
||||
|
||||
RunData[nRun].nMoves = b; // TODO - split this into the two shorts?
|
||||
RunData[nRun].nRef = c;
|
||||
RunData[nRun].nVal = b;
|
||||
|
||||
runlist_InsertRun(a, nRun);
|
||||
return nRun;
|
||||
|
@ -259,12 +263,12 @@ void runlist_SubRunRec(int RunPtr)
|
|||
{
|
||||
if (!(RunPtr >= 0 && RunPtr < kMaxRuns)) return;
|
||||
|
||||
RunData[RunPtr].nMoves = -totalmoves;
|
||||
RunData[RunPtr].nRef = -totalmoves;
|
||||
}
|
||||
|
||||
void runlist_SendMessageToRunRec(int nRun, int nMessage, int nDamage)
|
||||
{
|
||||
int nFunc = RunData[nRun].nRef;// >> 16;
|
||||
int nFunc = RunData[nRun].nRef >> 16;
|
||||
|
||||
if (nFunc < 0) {
|
||||
return;
|
||||
|
@ -298,7 +302,7 @@ void runlist_ExplodeSignalRun()
|
|||
int runPtr = nextPtr;
|
||||
assert(runPtr < kMaxRuns);
|
||||
|
||||
int val = RunData[runPtr].nMoves;
|
||||
int val = RunData[runPtr].nVal;
|
||||
nextPtr = RunData[runPtr].next;
|
||||
|
||||
if (val >= 0)
|
||||
|
@ -352,7 +356,7 @@ void runlist_SignalRun(int NxtPtr, int edx)
|
|||
if (RunPtr >= 0)
|
||||
{
|
||||
assert(RunPtr < kMaxRuns);
|
||||
int val = RunData[RunPtr].nMoves;
|
||||
int val = RunData[RunPtr].nVal;
|
||||
NxtPtr = RunData[RunPtr].next;
|
||||
|
||||
if (val >= 0) {
|
||||
|
@ -590,15 +594,15 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwPress = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
auto nSwPress = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwPress);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwPress.first, nSwPress.second);
|
||||
|
||||
int nSwPause = BuildSwPause(nChannel, BuildLink(2, -1, 0), 60);
|
||||
auto nSwPause = BuildSwPause(nChannel, BuildLink(2, -1, 0), 60);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwPause);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwPause.first, nSwPause.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -609,15 +613,15 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].ceilingz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwPress = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
auto nSwPress = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwPress);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwPress.first, nSwPress.second);
|
||||
|
||||
int nSwPause = BuildSwPause(nChannel, BuildLink(2, -1, 0), 60);
|
||||
auto nSwPause = BuildSwPause(nChannel, BuildLink(2, -1, 0), 60);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwPause);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwPause.first, nSwPause.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -658,7 +662,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -669,11 +673,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 400, 400, 2, sector[nextSector].floorz, sector[nSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwStepOn(nChannel, BuildLink(2, 1, 1), nSector);
|
||||
auto nSwitch = BuildSwStepOn(nChannel, BuildLink(2, 1, 1), nSector);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
|
||||
sector[nSector].floorz = sector[nextSector].floorz;
|
||||
return;
|
||||
|
@ -686,15 +690,15 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
auto nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
|
||||
int nSwitch2 = BuildSwNotOnPause(nChannel, BuildLink(2, -1, 0), nSector, 8);
|
||||
auto nSwitch2 = BuildSwNotOnPause(nChannel, BuildLink(2, -1, 0), nSector, 8);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch2);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch2.first, nSwitch2.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -705,7 +709,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -716,11 +720,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 150);
|
||||
auto nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 150);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -731,15 +735,15 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
auto nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
|
||||
int nSwitch2 = BuildSwNotOnPause(nChannel, BuildLink(2, -1, 0), nSector, 8);
|
||||
auto nSwitch2 = BuildSwNotOnPause(nChannel, BuildLink(2, -1, 0), nSector, 8);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch2);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch2.first, nSwitch2.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -761,7 +765,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, zVal);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -781,11 +785,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, zVal);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 150);
|
||||
auto nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 150);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -805,11 +809,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, zVal);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwReady(nChannel, BuildLink(2, 1, 0));
|
||||
auto nSwitch = BuildSwReady(nChannel, BuildLink(2, 1, 0));
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -820,7 +824,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -828,15 +832,15 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
{
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sector[nSector].ceilingz, sector[nSector].floorz - 8);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
auto nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
|
||||
int nSwitch2 = BuildSwReady(nChannel, BuildLink(2, -1, 0));
|
||||
auto nSwitch2 = BuildSwReady(nChannel, BuildLink(2, -1, 0));
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch2);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch2.first, nSwitch2.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -844,11 +848,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
{
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sector[nSector].ceilingz, sector[nSector].floorz - 8);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwReady(nChannel, BuildLink(2, -1, 0));
|
||||
auto nSwitch = BuildSwReady(nChannel, BuildLink(2, -1, 0));
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -858,25 +862,25 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sector[nSector].floorz, ebx);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int ebx2 = (((sector[nSector].floorz - sector[nSector].ceilingz) / 2) + sector[nSector].ceilingz) - 8;
|
||||
|
||||
int nElev2 = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sector[nSector].ceilingz, ebx2);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev2);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev2, 0);
|
||||
|
||||
int nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
auto nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
case 21: // Touchplate
|
||||
{
|
||||
int nSwitch = BuildSwStepOn(nChannel, BuildLink(2, 1, 1), nSector);
|
||||
auto nSwitch = BuildSwStepOn(nChannel, BuildLink(2, 1, 1), nSector);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -896,11 +900,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 32767, 200, 2, sector[nSector].floorz, zVal);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), nSpeed * 60);
|
||||
auto nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), nSpeed * 60);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -911,11 +915,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 60);
|
||||
auto nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 60);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -926,11 +930,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 300);
|
||||
auto nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 300);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -941,11 +945,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 450);
|
||||
auto nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 450);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -956,11 +960,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 600);
|
||||
auto nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 600);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -971,11 +975,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 900);
|
||||
auto nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 900);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -986,11 +990,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 0x7FFF, 0x7FFF, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
auto nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1001,7 +1005,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 0x7FFF, 0x7FFF, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1012,7 +1016,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(20, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nextSector].ceilingz, sector[nSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1023,7 +1027,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(28, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nextSector].ceilingz, sector[nSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1048,7 +1052,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1059,15 +1063,15 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 0x7FFF, 0x7FFF, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
auto nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
|
||||
int nSwitch2 = BuildSwNotOnPause(nChannel, BuildLink(2, -1, 0), nSector, 8);
|
||||
auto nSwitch2 = BuildSwNotOnPause(nChannel, BuildLink(2, -1, 0), nSector, 8);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch2);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch2.first, nSwitch2.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1123,7 +1127,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sector[nSector].ceilingz, zVal);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1134,7 +1138,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sector[nSector].ceilingz, sector[nextSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1145,7 +1149,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 0x7FFF, 200, 2, sector[nextSector].floorz, sector[nSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1155,17 +1159,17 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sector[nSector].floorz, edx);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int eax = (((sector[nSector].floorz - sector[nSector].ceilingz) / 2) + sector[nSector].ceilingz) - 8;
|
||||
|
||||
nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), 200, nSpeed * 100, 2, sector[nSector].ceilingz, eax);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwReady(nChannel, BuildLink(2, 1, 0));
|
||||
auto nSwitch = BuildSwReady(nChannel, BuildLink(2, 1, 0));
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1175,21 +1179,21 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sector[nSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
eax = ((sector[nSector].floorz - sector[nSector].ceilingz) / 2) + sector[nSector].ceilingz;
|
||||
|
||||
nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sector[nSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
auto nSwitch = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
|
||||
nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 60);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1199,17 +1203,17 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sector[nSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
eax = ((sector[nSector].floorz - sector[nSector].ceilingz) / 2) + sector[nSector].ceilingz;
|
||||
|
||||
nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, eax, sector[nSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 150);
|
||||
auto nSwitch = BuildSwPause(nChannel, BuildLink(2, -1, 0), 150);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1220,11 +1224,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
auto nSwitch = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1235,11 +1239,11 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
auto nSwitch = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1250,7 +1254,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1261,15 +1265,15 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].ceilingz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
case 58:
|
||||
{
|
||||
int nSwitch = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
auto nSwitch = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
|
||||
// Fall through to case 62
|
||||
fallthrough__;
|
||||
|
@ -1285,7 +1289,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1296,15 +1300,15 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
auto nSwitch = BuildSwStepOn(nChannel, BuildLink(1, 1), nSector);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
|
||||
int nSwitch2 = BuildSwNotOnPause(nChannel, BuildLink(1, 1), nSector, 60);
|
||||
auto nSwitch2 = BuildSwNotOnPause(nChannel, BuildLink(1, 1), nSector, 60);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch2);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch2.first, nSwitch2.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1328,7 +1332,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, var_1C,
|
||||
zListB[0], zListB[1], zListB[2], zListB[3], zListB[4], zListB[5], zListB[6], zListB[7]);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1352,14 +1356,14 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, var_20,
|
||||
zListA[0], zListA[1], zListA[2], zListA[3], zListA[4], zListA[5], zListA[6], zListA[7]);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
case 64:
|
||||
{
|
||||
int nSwitch = BuildSwStepOn(nChannel, BuildLink(2, 0, 0), nSector);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
auto nSwitch = BuildSwStepOn(nChannel, BuildLink(2, 0, 0), nSector);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1370,7 +1374,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevF(nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, sector[nSector].floorz, sector[nextSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1382,15 +1386,15 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, (int)sector[nSector].floorz, (int)sector[nextSector].ceilingz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
|
||||
int nSwitch = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
auto nSwitch = BuildSwPressSector(nChannel, BuildLink(1, 1), nSector, keyMask);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
|
||||
int nSwitch2 = BuildSwPause(nChannel, BuildLink(2, -1, 0), 60);
|
||||
auto nSwitch2 = BuildSwPause(nChannel, BuildLink(2, -1, 0), 60);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch2);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch2.first, nSwitch2.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1398,7 +1402,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
|
|||
{
|
||||
int nElev = BuildElevC(0, nChannel, nSector, FindWallSprites(nSector), nSpeed * 100, nSpeed * 100, 2, (int)sector[nSector].ceilingz, (int)sector[nSector].floorz);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nElev, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1432,53 +1436,53 @@ void runlist_ProcessWallTag(int nWall, short nLotag, short nHitag)
|
|||
case 1:
|
||||
{
|
||||
int nWallFace = BuildWallFace(nChannel, nWall, 2, wall[nWall].picnum, wall[nWall].picnum + 1);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nWallFace);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nWallFace, 0x70000);
|
||||
|
||||
int nSwitch = BuildSwPressWall(nChannel, BuildLink(2, nEffectTag, 0), nWall);
|
||||
auto nSwitch = BuildSwPressWall(nChannel, BuildLink(2, nEffectTag, 0), nWall);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
case 6:
|
||||
{
|
||||
int nSwitch = BuildSwPressWall(nChannel, BuildLink(2, 1, 0), nWall);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
auto nSwitch = BuildSwPressWall(nChannel, BuildLink(2, 1, 0), nWall);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
case 7: // Regular switch
|
||||
{
|
||||
int nWallFace = BuildWallFace(nChannel, nWall, 2, wall[nWall].picnum, wall[nWall].picnum + 1);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nWallFace);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nWallFace, 0x70000);
|
||||
|
||||
int nSwitch = BuildSwPressWall(nChannel, BuildLink(1, 1), nWall);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
auto nSwitch = BuildSwPressWall(nChannel, BuildLink(1, 1), nWall);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
case 8: // Reverse switch
|
||||
{
|
||||
int nWallFace = BuildWallFace(nChannel, nWall, 2, wall[nWall].picnum, wall[nWall].picnum + 1);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nWallFace);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nWallFace, 0x70000);
|
||||
|
||||
int nSwitch = BuildSwPressWall(nChannel, BuildLink(2, -1, 0), nWall);
|
||||
auto nSwitch = BuildSwPressWall(nChannel, BuildLink(2, -1, 0), nWall);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
case 9: // Invisible switch
|
||||
{
|
||||
int nSwitch = BuildSwPressWall(nChannel, BuildLink(2, 1, 1), nWall);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
auto nSwitch = BuildSwPressWall(nChannel, BuildLink(2, 1, 1), nWall);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
case 10:
|
||||
{
|
||||
int nSwitch = BuildSwPressWall(nChannel, BuildLink(2, -1, 0), nWall);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSwitch);
|
||||
auto nSwitch = BuildSwPressWall(nChannel, BuildLink(2, -1, 0), nWall);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a,nSwitch.first, nSwitch.second);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1511,7 +1515,7 @@ void runlist_ProcessWallTag(int nWall, short nLotag, short nHitag)
|
|||
|
||||
int nSlide = BuildSlide(nChannel, nStart, nLastWall, n2ndLastWall, nWall2, nWall3, nWall4);
|
||||
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSlide);
|
||||
runlist_AddRunRec(sRunChannels[nChannel].a, nSlide, 0x80000);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ void InitScorp()
|
|||
scorpion.Clear();
|
||||
}
|
||||
|
||||
int BuildScorp(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel)
|
||||
void BuildScorp(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel)
|
||||
{
|
||||
auto nScorp = scorpion.Reserve(1);
|
||||
|
||||
|
@ -142,12 +142,10 @@ int BuildScorp(short nSprite, int x, int y, int z, short nSector, short nAngle,
|
|||
|
||||
scorpion[nScorp].nChannel = nChannel;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nScorp | 0x220000);
|
||||
scorpion[nScorp].nRun = runlist_AddRunRec(NewRun, nScorp | 0x220000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nScorp, 0x220000);
|
||||
scorpion[nScorp].nRun = runlist_AddRunRec(NewRun, nScorp, 0x220000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
||||
return nScorp | 0x220000;
|
||||
}
|
||||
|
||||
void FuncScorp(int a, int nDamage, int nRun)
|
||||
|
@ -384,10 +382,10 @@ void FuncScorp(int a, int nDamage, int nRun)
|
|||
return;
|
||||
}
|
||||
|
||||
short nBulletSprite = BuildBullet(nSprite, 16, 0, 0, -1, pSprite->ang, nTarget + 10000, 1) & 0xFFFF;
|
||||
int nBulletSprite = BuildBullet(nSprite, 16, 0, 0, -1, pSprite->ang, nTarget + 10000, 1);
|
||||
if (nBulletSprite > -1)
|
||||
{
|
||||
PlotCourseToSprite(nBulletSprite, nTarget);
|
||||
PlotCourseToSprite(nBulletSprite & 0xffff, nTarget);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -434,11 +432,9 @@ void FuncScorp(int a, int nDamage, int nRun)
|
|||
return;
|
||||
}
|
||||
|
||||
int nSpider = BuildSpider(-1, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, pSprite->ang);
|
||||
if (nSpider != -1)
|
||||
int nSpiderSprite = BuildSpider(-1, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, pSprite->ang);
|
||||
if (nSpiderSprite != -1)
|
||||
{
|
||||
short nSpiderSprite = nSpider & 0xFFFF;
|
||||
|
||||
sprite[nSpiderSprite].ang = RandomSize(11);
|
||||
|
||||
int nVel = RandomSize(5) + 1;
|
||||
|
|
|
@ -86,7 +86,7 @@ void InitSets()
|
|||
SetList.Clear();
|
||||
}
|
||||
|
||||
int BuildSet(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel)
|
||||
void BuildSet(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel)
|
||||
{
|
||||
auto nSet = SetList.Reserve(1);
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
@ -139,17 +139,15 @@ int BuildSet(short nSprite, int x, int y, int z, short nSector, short nAngle, in
|
|||
|
||||
SetList[nSet].nChannel = nChannel;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nSet | 0x190000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nSet, 0x190000);
|
||||
|
||||
// this isn't stored anywhere.
|
||||
runlist_AddRunRec(NewRun, nSet | 0x190000);
|
||||
runlist_AddRunRec(NewRun, nSet, 0x190000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
||||
return nSet | 0x190000;
|
||||
}
|
||||
|
||||
int BuildSoul(int nSet)
|
||||
void BuildSoul(int nSet)
|
||||
{
|
||||
int nSetSprite = SetList[nSet].nSprite;
|
||||
int nSprite = insertsprite(sprite[nSetSprite].sectnum, 0);
|
||||
|
@ -182,9 +180,7 @@ int BuildSoul(int nSet)
|
|||
|
||||
// GrabTimeSlot(3);
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(NewRun, nSprite | 0x230000);
|
||||
|
||||
return nSprite | 0x230000;
|
||||
pSprite->owner = runlist_AddRunRec(NewRun, nSprite, 0x230000);
|
||||
}
|
||||
|
||||
void FuncSoul(int a, int, int nRun)
|
||||
|
@ -577,7 +573,7 @@ void FuncSet(int a, int nDamage, int nRun)
|
|||
{
|
||||
// low 16 bits of returned var contains the sprite index, the high 16 the bullet number
|
||||
int nBullet = BuildBullet(nSprite, 11, 0, 0, -1, pSprite->ang, nTarget + 10000, 1);
|
||||
SetBulletEnemy(FixedToInt(nBullet), nTarget); // isolate the bullet number (shift off the sprite index)
|
||||
SetBulletEnemy(nBullet >> 16, nTarget); // isolate the bullet number (shift off the sprite index)
|
||||
|
||||
SetList[nSet].nRun--;
|
||||
if (SetList[nSet].nRun <= 0 || !RandomBit())
|
||||
|
|
|
@ -115,7 +115,7 @@ void ExplodeSnakeSprite(int nSprite, short nPlayer)
|
|||
StopSpriteSound(nSprite);
|
||||
}
|
||||
|
||||
int BuildSnake(short nPlayer, short zVal)
|
||||
void BuildSnake(short nPlayer, short zVal)
|
||||
{
|
||||
|
||||
zVal -= 1280;
|
||||
|
@ -168,7 +168,7 @@ int BuildSnake(short nPlayer, short zVal)
|
|||
|
||||
ExplodeSnakeSprite(nSprite, nPlayer);
|
||||
mydeletesprite(nSprite);
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -182,7 +182,7 @@ int BuildSnake(short nPlayer, short zVal)
|
|||
}
|
||||
|
||||
short nSnake = GrabSnake();
|
||||
if (nSnake == -1) return -1;
|
||||
if (nSnake == -1) return;
|
||||
|
||||
// GrabTimeSlot(3);
|
||||
|
||||
|
@ -233,10 +233,10 @@ int BuildSnake(short nPlayer, short zVal)
|
|||
|
||||
SnakeList[nSnake].nSprites[i] = nSprite;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, ((nSnake << 8) | i) | 0x110000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, ((nSnake << 8) | i), 0x110000);
|
||||
}
|
||||
|
||||
SnakeList[nSnake].nRun = runlist_AddRunRec(NewRun, nSnake | 0x110000);
|
||||
SnakeList[nSnake].nRun = runlist_AddRunRec(NewRun, nSnake, 0x110000);
|
||||
SnakeList[nSnake].c[1] = 2;
|
||||
SnakeList[nSnake].c[5] = 5;
|
||||
SnakeList[nSnake].c[2] = 4;
|
||||
|
@ -259,8 +259,6 @@ int BuildSnake(short nPlayer, short zVal)
|
|||
|
||||
D3PlayFX(StaticSound[kSound6], var_24);
|
||||
}
|
||||
|
||||
return nSprite;
|
||||
}
|
||||
|
||||
int FindSnakeEnemy(short nSnake)
|
||||
|
|
|
@ -124,13 +124,13 @@ int BuildSpider(int nSprite, int x, int y, int z, short nSector, int nAngle)
|
|||
spp->nTarget = -1;
|
||||
spp->nHealth = 160;
|
||||
|
||||
sp->owner = runlist_AddRunRec(sp->lotag - 1, nSpider | 0xC0000);
|
||||
sp->owner = runlist_AddRunRec(sp->lotag - 1, nSpider, 0xC0000);
|
||||
|
||||
spp->nRun = runlist_AddRunRec(NewRun, nSpider | 0xC0000);
|
||||
spp->nRun = runlist_AddRunRec(NewRun, nSpider, 0xC0000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
|
||||
return nSpider | 0xC0000;
|
||||
return nSprite;
|
||||
}
|
||||
|
||||
void FuncSpider(int a, int nDamage, int nRun)
|
||||
|
|
|
@ -122,18 +122,17 @@ void InitSwitch()
|
|||
memset(SwitchData, 0, sizeof(SwitchData));
|
||||
}
|
||||
|
||||
int BuildSwReady(int nChannel, short nLink)
|
||||
std::pair<int, int> BuildSwReady(int nChannel, short nLink)
|
||||
{
|
||||
if (SwitchCount <= 0 || nLink < 0) {
|
||||
I_Error("Too many switch readys!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
SwitchCount--;
|
||||
SwitchData[SwitchCount].nChannel = nChannel;
|
||||
SwitchData[SwitchCount].nLink = nLink;
|
||||
|
||||
return SwitchCount | 0x10000;
|
||||
return { SwitchCount, 0x10000 };
|
||||
}
|
||||
|
||||
void FuncSwReady(int a, int, int nRun)
|
||||
|
@ -167,18 +166,17 @@ void FuncSwReady(int a, int, int nRun)
|
|||
}
|
||||
}
|
||||
|
||||
int BuildSwPause(int nChannel, int nLink, int ebx)
|
||||
std::pair<int, int> BuildSwPause(int nChannel, int nLink, int ebx)
|
||||
{
|
||||
for (int i = kMaxSwitches - 1; i >= SwitchCount; i--)
|
||||
{
|
||||
if (SwitchData[i].nChannel == nChannel && SwitchData[i].nWait != 0) {
|
||||
return i | 0x20000;
|
||||
return { i, 0x20000 };
|
||||
}
|
||||
}
|
||||
|
||||
if (SwitchCount <= 0 || nLink < 0) {
|
||||
I_Error("Too many switches!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
SwitchCount--;
|
||||
|
@ -188,7 +186,7 @@ int BuildSwPause(int nChannel, int nLink, int ebx)
|
|||
SwitchData[SwitchCount].nWait = ebx;
|
||||
SwitchData[SwitchCount].nRunPtr = -1;
|
||||
|
||||
return SwitchCount | 0x20000;
|
||||
return { SwitchCount, 0x20000 };
|
||||
}
|
||||
|
||||
void FuncSwPause(int a, int, int nRun)
|
||||
|
@ -246,7 +244,7 @@ void FuncSwPause(int a, int, int nRun)
|
|||
return;
|
||||
}
|
||||
|
||||
SwitchData[nSwitch].nRunPtr = runlist_AddRunRec(NewRun, RunData[nRun].nMoves);
|
||||
SwitchData[nSwitch].nRunPtr = runlist_AddRunRec(NewRun, RunData[nRun].nVal, RunData[nRun].nRef);
|
||||
|
||||
int eax;
|
||||
|
||||
|
@ -265,7 +263,7 @@ void FuncSwPause(int a, int, int nRun)
|
|||
}
|
||||
}
|
||||
|
||||
int BuildSwStepOn(int nChannel, int nLink, int nSector)
|
||||
std::pair<int, int> BuildSwStepOn(int nChannel, int nLink, int nSector)
|
||||
{
|
||||
if (SwitchCount <= 0 || nLink < 0 || nSector < 0)
|
||||
I_Error("Too many switches!\n");
|
||||
|
@ -277,7 +275,7 @@ int BuildSwStepOn(int nChannel, int nLink, int nSector)
|
|||
SwitchData[nSwitch].nSector = nSector;
|
||||
SwitchData[nSwitch].nRun2 = -1;
|
||||
|
||||
return nSwitch | 0x30000;
|
||||
return { nSwitch , 0x30000 };
|
||||
}
|
||||
|
||||
void FuncSwStepOn(int a, int, int nRun)
|
||||
|
@ -310,7 +308,7 @@ void FuncSwStepOn(int a, int, int nRun)
|
|||
|
||||
if (var_14 >= 0)
|
||||
{
|
||||
SwitchData[nSwitch].nRun2 = runlist_AddRunRec(sector[nSector].lotag - 1, RunData[nRun].nMoves);
|
||||
SwitchData[nSwitch].nRun2 = runlist_AddRunRec(sector[nSector].lotag - 1, RunData[nRun].nVal, RunData[nRun].nRef);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -334,7 +332,7 @@ void FuncSwStepOn(int a, int, int nRun)
|
|||
|
||||
}
|
||||
|
||||
int BuildSwNotOnPause(int nChannel, int nLink, int nSector, int ecx)
|
||||
std::pair<int, int> BuildSwNotOnPause(int nChannel, int nLink, int nSector, int ecx)
|
||||
{
|
||||
if (SwitchCount <= 0 || nLink < 0 || nSector < 0)
|
||||
I_Error("Too many switches!\n");
|
||||
|
@ -348,7 +346,7 @@ int BuildSwNotOnPause(int nChannel, int nLink, int nSector, int ecx)
|
|||
SwitchData[nSwitch].nRunPtr = -1;
|
||||
SwitchData[nSwitch].nRun2 = -1;
|
||||
|
||||
return nSwitch | 0x40000;
|
||||
return { nSwitch, 0x40000 };
|
||||
}
|
||||
|
||||
void FuncSwNotOnPause(int a, int, int nRun)
|
||||
|
@ -404,12 +402,12 @@ void FuncSwNotOnPause(int a, int, int nRun)
|
|||
{
|
||||
if (SwitchData[nSwitch].nRunPtr < 0)
|
||||
{
|
||||
SwitchData[nSwitch].nRunPtr = runlist_AddRunRec(NewRun, RunData[nRun].nMoves);
|
||||
SwitchData[nSwitch].nRunPtr = runlist_AddRunRec(NewRun, RunData[nRun].nVal, RunData[nRun].nRef);
|
||||
|
||||
short nSector = SwitchData[nSwitch].nSector;
|
||||
|
||||
SwitchData[nSwitch].nWaitTimer = SwitchData[nSwitch].nWait;
|
||||
SwitchData[nSwitch].nRun2 = runlist_AddRunRec(sector[nSector].lotag - 1, RunData[nRun].nMoves);
|
||||
SwitchData[nSwitch].nRun2 = runlist_AddRunRec(sector[nSector].lotag - 1, RunData[nRun].nVal, RunData[nRun].nRef);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -424,7 +422,7 @@ void FuncSwNotOnPause(int a, int, int nRun)
|
|||
}
|
||||
}
|
||||
|
||||
int BuildSwPressSector(int nChannel, int nLink, int nSector, int keyMask)
|
||||
std::pair<int, int> BuildSwPressSector(int nChannel, int nLink, int nSector, int keyMask)
|
||||
{
|
||||
if (SwitchCount <= 0 || nLink < 0 || nSector < 0)
|
||||
I_Error("Too many switches!\n");
|
||||
|
@ -437,7 +435,7 @@ int BuildSwPressSector(int nChannel, int nLink, int nSector, int keyMask)
|
|||
SwitchData[nSwitch].nKeyMask = keyMask;
|
||||
SwitchData[nSwitch].nRun2 = -1;
|
||||
|
||||
return nSwitch | 0x50000;
|
||||
return { nSwitch, 0x50000 };
|
||||
}
|
||||
|
||||
void FuncSwPressSector(int a, int, int nRun)
|
||||
|
@ -472,7 +470,7 @@ void FuncSwPressSector(int a, int, int nRun)
|
|||
|
||||
short nSector = SwitchData[nSwitch].nSector;
|
||||
|
||||
SwitchData[nSwitch].nRun2 = runlist_AddRunRec(sector[nSector].lotag - 1, RunData[nRun].nMoves);
|
||||
SwitchData[nSwitch].nRun2 = runlist_AddRunRec(sector[nSector].lotag - 1, RunData[nRun].nVal, RunData[nRun].nRef);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -496,7 +494,7 @@ void FuncSwPressSector(int a, int, int nRun)
|
|||
}
|
||||
}
|
||||
|
||||
int BuildSwPressWall(short nChannel, short nLink, short nWall)
|
||||
std::pair<int, int> BuildSwPressWall(short nChannel, short nLink, short nWall)
|
||||
{
|
||||
if (SwitchCount <= 0 || nLink < 0 || nWall < 0) {
|
||||
I_Error("Too many switches!\n");
|
||||
|
@ -509,7 +507,7 @@ int BuildSwPressWall(short nChannel, short nLink, short nWall)
|
|||
SwitchData[SwitchCount].nWall = nWall;
|
||||
SwitchData[SwitchCount].nRun3 = -1;
|
||||
|
||||
return SwitchCount | 0x60000;
|
||||
return { SwitchCount, 0x60000 };
|
||||
}
|
||||
|
||||
void FuncSwPressWall(int a, int, int nRun)
|
||||
|
@ -542,7 +540,7 @@ void FuncSwPressWall(int a, int, int nRun)
|
|||
if (LinkMap[nLink].v[sRunChannels[nChannel].c] >= 0)
|
||||
{
|
||||
short nWall = SwitchData[nSwitch].nWall;
|
||||
SwitchData[nSwitch].nRun3 = runlist_AddRunRec(wall[nWall].lotag - 1, RunData[nRun].nMoves);
|
||||
SwitchData[nSwitch].nRun3 = runlist_AddRunRec(wall[nWall].lotag - 1, RunData[nRun].nVal, RunData[nRun].nRef);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -169,9 +169,9 @@ int BuildWasp(short nSprite, int x, int y, int z, short nSector, short nAngle)
|
|||
WaspList[nWasp].nVel = 0;
|
||||
WaspList[nWasp].nAngle2 = RandomSize(7) + 127;
|
||||
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nWasp | 0x1E0000);
|
||||
pSprite->owner = runlist_AddRunRec(pSprite->lotag - 1, nWasp, 0x1E0000);
|
||||
|
||||
WaspList[nWasp].nRun = runlist_AddRunRec(NewRun, nWasp | 0x1E0000);
|
||||
WaspList[nWasp].nRun = runlist_AddRunRec(NewRun, nWasp, 0x1E0000);
|
||||
|
||||
nCreaturesTotal++;
|
||||
return nSprite;
|
||||
|
|
Loading…
Reference in a new issue