mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- Exhumed: split up the message word for event messages.
This commit is contained in:
parent
2ee7be0382
commit
b725adc426
26 changed files with 154 additions and 234 deletions
|
@ -45,7 +45,7 @@ void DestroyAnim(int nAnim);
|
|||
int BuildAnim(int nSprite, int val, int val2, int x, int y, int z, int nSector, int nRepeat, int nFlag);
|
||||
short GetAnimSprite(short nAnim);
|
||||
|
||||
void FuncAnim(int, int, int);
|
||||
void FuncAnim(int, int, int, int);
|
||||
void BuildExplosion(short nSprite);
|
||||
int BuildSplash(int nSprite, int nSector);
|
||||
|
||||
|
@ -53,7 +53,7 @@ int BuildSplash(int nSprite, int nSector);
|
|||
|
||||
void InitAnubis();
|
||||
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);
|
||||
void FuncAnubis(int, int a, int b, int c);
|
||||
|
||||
// bubbles
|
||||
|
||||
|
@ -61,7 +61,7 @@ void InitBubbles();
|
|||
void BuildBubbleMachine(int nSprite);
|
||||
void DoBubbleMachines();
|
||||
void DoBubbles(int nPlayer);
|
||||
void FuncBubble(int, int, int);
|
||||
void FuncBubble(int, int, int, int);
|
||||
|
||||
// bullet
|
||||
|
||||
|
@ -94,14 +94,14 @@ int MoveBullet(short nBullet);
|
|||
void SetBulletEnemy(short nBullet, short nEnemy);
|
||||
int BuildBullet(short nSprite, int nType, int ebx, int ecx, int val1, int nAngle, int val2, int val3);
|
||||
void IgniteSprite(int nSprite);
|
||||
void FuncBullet(int, int, int);
|
||||
void FuncBullet(int, int, int, int);
|
||||
void BackUpBullet(int *x, int *y, short nAngle);
|
||||
|
||||
// fish
|
||||
|
||||
void InitFishes();
|
||||
void BuildFish(int nSprite, int x, int y, int z, int nSector, int nAngle);
|
||||
void FuncFish(int, int, int);
|
||||
void FuncFish(int, int, int, int);
|
||||
void FuncFishLimb(int a, int b, int c);
|
||||
|
||||
// grenade
|
||||
|
@ -112,7 +112,7 @@ void InitGrenades();
|
|||
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);
|
||||
void FuncGrenade(int, int, int, int);
|
||||
|
||||
// gun
|
||||
|
||||
|
@ -189,8 +189,8 @@ void DoRegenerates();
|
|||
void InitLava();
|
||||
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);
|
||||
void FuncLavaLimb(int, int, int, int);
|
||||
void FuncLava(int, int, int, int);
|
||||
|
||||
// lighting
|
||||
|
||||
|
@ -212,7 +212,7 @@ extern short bTorch;
|
|||
|
||||
void InitLion();
|
||||
void BuildLion(short nSprite, int x, int y, int z, short nSector, short nAngle);
|
||||
void FuncLion(int, int, int);
|
||||
void FuncLion(int, int, int, int);
|
||||
|
||||
// move
|
||||
|
||||
|
@ -291,13 +291,13 @@ void DoMovingSects();
|
|||
void DoFinale();
|
||||
void PostProcess();
|
||||
|
||||
void FuncElev(int, int, int);
|
||||
void FuncWallFace(int, int, int);
|
||||
void FuncSlide(int, int, int);
|
||||
void FuncObject(int, int, int);
|
||||
void FuncTrap(int, int, int);
|
||||
void FuncEnergyBlock(int, int, int);
|
||||
void FuncSpark(int, int, int);
|
||||
void FuncElev(int, int, int, int);
|
||||
void FuncWallFace(int, int, int, int);
|
||||
void FuncSlide(int, int, int, int);
|
||||
void FuncObject(int, int, int, int);
|
||||
void FuncTrap(int, int, int, int);
|
||||
void FuncEnergyBlock(int, int, int, int);
|
||||
void FuncSpark(int, int, int, int);
|
||||
void SnapBobs(short nSectorA, short nSectorB);
|
||||
short FindWallSprites(short nSector);
|
||||
void AddMovingSector(int nSector, int edx, int ebx, int ecx);
|
||||
|
@ -318,9 +318,9 @@ int BuildSlide(int nChannel, int edx, int ebx, int ecx, int arg1, int arg2, int
|
|||
|
||||
void InitQueens();
|
||||
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);
|
||||
void FuncQueenEgg(int, int, int, int);
|
||||
void FuncQueenHead(int, int, int, int);
|
||||
void FuncQueen(int, int, int, int);
|
||||
|
||||
// ra
|
||||
|
||||
|
@ -343,7 +343,7 @@ void FreeRa(short nPlayer);
|
|||
void BuildRa(short nPlayer);
|
||||
void InitRa();
|
||||
void MoveRaToEnemy(short nPlayer);
|
||||
void FuncRa(int, int, int);
|
||||
void FuncRa(int, int, int, int);
|
||||
|
||||
// rat
|
||||
|
||||
|
@ -351,19 +351,19 @@ void InitRats();
|
|||
void SetRatVel(short nSprite);
|
||||
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);
|
||||
void FuncRat(int a, int, int b, int nRun);
|
||||
|
||||
// rex
|
||||
|
||||
void InitRexs();
|
||||
void BuildRex(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel);
|
||||
void FuncRex(int, int, int);
|
||||
void FuncRex(int, int, int, int);
|
||||
|
||||
// roach
|
||||
|
||||
void InitRoachs();
|
||||
void BuildRoach(int nType, int nSprite, int x, int y, int z, short nSector, int angle);
|
||||
void FuncRoach(int a, int nDamage, int nRun);
|
||||
void FuncRoach(int a, int, int nDamage, int nRun);
|
||||
|
||||
// runlist
|
||||
|
||||
|
@ -389,7 +389,7 @@ struct RunChannel
|
|||
short d;
|
||||
};
|
||||
|
||||
typedef void(*AiFunc)(int, int, int nRun);
|
||||
typedef void(*AiFunc)(int, int, int, int nRun);
|
||||
|
||||
extern FreeListArray<RunStruct, kMaxRuns> RunData;
|
||||
extern RunChannel sRunChannels[kMaxChannels];
|
||||
|
@ -423,14 +423,14 @@ void runlist_ExecObjects();
|
|||
|
||||
void InitScorp();
|
||||
void BuildScorp(short nSprite, int x, int y, int z, short nSector, short nAngle, int nChannel);
|
||||
void FuncScorp(int, int, int);
|
||||
void FuncScorp(int, int, int, int);
|
||||
|
||||
// set
|
||||
|
||||
void InitSets();
|
||||
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);
|
||||
void FuncSoul(int, int, int, int);
|
||||
void FuncSet(int, int, int, int);
|
||||
|
||||
// snake
|
||||
|
||||
|
@ -457,25 +457,25 @@ extern FreeListArray<Snake, kMaxSnakes> SnakeList;
|
|||
void InitSnakes();
|
||||
short GrabSnake();
|
||||
void BuildSnake(short nPlayer, short zVal);
|
||||
void FuncSnake(int, int, int);
|
||||
void FuncSnake(int, int, int, int);
|
||||
|
||||
// spider
|
||||
|
||||
void InitSpider();
|
||||
int BuildSpider(int nSprite, int x, int y, int z, short nSector, int nAngle);
|
||||
void FuncSpider(int a, int b, int nRun);
|
||||
void FuncSpider(int a, int, int b, int nRun);
|
||||
|
||||
// switch
|
||||
|
||||
void InitLink();
|
||||
void InitSwitch();
|
||||
|
||||
void FuncSwReady(int, int, int);
|
||||
void FuncSwPause(int, int, int);
|
||||
void FuncSwStepOn(int, int, int);
|
||||
void FuncSwNotOnPause(int, int, int);
|
||||
void FuncSwPressSector(int, int, int);
|
||||
void FuncSwPressWall(int, int, int);
|
||||
void FuncSwReady(int, int, int, int);
|
||||
void FuncSwPause(int, int, int, int);
|
||||
void FuncSwStepOn(int, int, int, int);
|
||||
void FuncSwNotOnPause(int, int, int, int);
|
||||
void FuncSwPressSector(int, int, int, int);
|
||||
void FuncSwPressWall(int, int, int, int);
|
||||
|
||||
std::pair<int, int> BuildSwPause(int nChannel, int nLink, int ebx);
|
||||
std::pair<int, int> BuildSwNotOnPause(int nChannel, int nLink, int nSector, int ecx);
|
||||
|
@ -492,7 +492,7 @@ int WaspCount();
|
|||
|
||||
void InitWasps();
|
||||
int BuildWasp(short nSprite, int x, int y, int z, short nSector, short nAngle);
|
||||
void FuncWasp(int eax, int edx, int nRun);
|
||||
void FuncWasp(int eax, int, int edx, int nRun);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ short GetAnimSprite(short nAnim)
|
|||
return AnimList[nAnim].nSprite;
|
||||
}
|
||||
|
||||
void FuncAnim(int a, int, int nRun)
|
||||
void FuncAnim(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nAnim = RunData[nRun].nVal;
|
||||
assert(nAnim >= 0 && nAnim < kMaxAnims);
|
||||
|
@ -161,8 +161,6 @@ void FuncAnim(int a, int, int nRun)
|
|||
|
||||
assert(nSprite != -1);
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x20000:
|
||||
|
@ -273,8 +271,8 @@ void FuncAnim(int a, int, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, nSeq, AnimList[nAnim].field_2, 0x101);
|
||||
mytsprite[a & 0xFFFF].owner = -1;
|
||||
seq_PlotSequence(nObject, nSeq, AnimList[nAnim].field_2, 0x101);
|
||||
mytsprite[nObject].owner = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -285,7 +283,7 @@ void FuncAnim(int a, int, int nRun)
|
|||
|
||||
default:
|
||||
{
|
||||
Printf("unknown msg %x for anim\n", a & 0x7F0000);
|
||||
Printf("unknown msg %x for anim\n", nMessage);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ void BuildAnubis(int nSprite, int x, int y, int z, int nSector, int nAngle, uint
|
|||
nCreaturesTotal++;
|
||||
}
|
||||
|
||||
void FuncAnubis(int a, int nDamage, int nRun)
|
||||
void FuncAnubis(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
int nAnubis = RunData[nRun].nVal;
|
||||
auto ap = &AnubisList[nAnubis];
|
||||
|
@ -167,8 +167,6 @@ void FuncAnubis(int a, int nDamage, int nRun)
|
|||
|
||||
bool bVal = false;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -413,7 +411,7 @@ void FuncAnubis(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqAnubis] + AnubisSeq[nAction].a, ap->nFrame, AnubisSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqAnubis] + AnubisSeq[nAction].a, ap->nFrame, AnubisSeq[nAction].b);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -437,7 +435,7 @@ void FuncAnubis(int a, int nDamage, int nRun)
|
|||
|
||||
if (ap->nHealth > 0)
|
||||
{
|
||||
short nTarget = a & 0xFFFF;
|
||||
int nTarget = nObject;
|
||||
|
||||
// loc_258D6:
|
||||
if (nTarget < 0) {
|
||||
|
|
|
@ -162,7 +162,7 @@ int BuildBubble(int x, int y, int z, short nSector)
|
|||
return nBubble | 0x140000;
|
||||
}
|
||||
|
||||
void FuncBubble(int a, int, int nRun)
|
||||
void FuncBubble(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nBubble = RunData[nRun].nVal;
|
||||
assert(nBubble >= 0 && nBubble < kMaxBubbles);
|
||||
|
@ -171,8 +171,6 @@ void FuncBubble(int a, int, int nRun)
|
|||
short nSeq = BubbleList[nBubble].nSeq;
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x20000:
|
||||
|
@ -205,8 +203,8 @@ void FuncBubble(int a, int, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, nSeq, BubbleList[nBubble].nFrame, 1);
|
||||
mytsprite[a & 0xFFFF].owner = -1;
|
||||
seq_PlotSequence(nObject, nSeq, BubbleList[nBubble].nFrame, 1);
|
||||
mytsprite[nObject].owner = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -811,7 +811,7 @@ int BuildBullet(short nSprite, int nType, int, int, int val1, int nAngle, int va
|
|||
return nBulletSprite | (nBullet << 16);
|
||||
}
|
||||
|
||||
void FuncBullet(int a, int, int nRun)
|
||||
void FuncBullet(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nBullet = RunData[nRun].nVal;
|
||||
assert(nBullet >= 0 && nBullet < kMaxBullets);
|
||||
|
@ -820,8 +820,6 @@ void FuncBullet(int a, int, int nRun)
|
|||
short nSprite = BulletList[nBullet].nSprite;
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x20000:
|
||||
|
@ -860,7 +858,7 @@ void FuncBullet(int a, int, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
short nSprite2 = a & 0xFFFF;
|
||||
short nSprite2 = nObject;
|
||||
mytsprite[nSprite2].statnum = 1000;
|
||||
|
||||
if (BulletList[nBullet].nType == 15)
|
||||
|
|
|
@ -147,7 +147,7 @@ void BuildBlood(int x, int y, int z, short nSector)
|
|||
BuildAnim(-1, kSeqFish, 36, x, y, z, nSector, 75, 128);
|
||||
}
|
||||
|
||||
void FuncFishLimb(int a, int, int nRun)
|
||||
void FuncFishLimb(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nFish = RunData[nRun].nVal;
|
||||
short nSprite = FishChunk[nFish].nSprite;
|
||||
|
@ -156,8 +156,6 @@ void FuncFishLimb(int a, int, int nRun)
|
|||
|
||||
int nSeq = SeqOffsets[kSeqFish] + FishChunk[nFish].nSeqIndex;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x20000:
|
||||
|
@ -211,7 +209,7 @@ void FuncFishLimb(int a, int, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, nSeq, FishChunk[nFish].nIndex, 1);
|
||||
seq_PlotSequence(nObject, nSeq, FishChunk[nFish].nIndex, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -312,7 +310,7 @@ void DestroyFish(short nFish)
|
|||
mydeletesprite(nSprite);
|
||||
}
|
||||
|
||||
void FuncFish(int a, int nDamage, int nRun)
|
||||
void FuncFish(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nFish = RunData[nRun].nVal;
|
||||
assert(nFish >= 0 && nFish < (int)FishList.Size());
|
||||
|
@ -321,8 +319,6 @@ void FuncFish(int a, int nDamage, int nRun)
|
|||
short nAction = FishList[nFish].nAction;
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -333,8 +329,8 @@ void FuncFish(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqFish] + FishSeq[nAction].a, FishList[nFish].nFrame, FishSeq[nAction].b);
|
||||
mytsprite[a & 0xFFFF].owner = -1;
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqFish] + FishSeq[nAction].a, FishList[nFish].nFrame, FishSeq[nAction].b);
|
||||
mytsprite[nObject].owner = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -389,7 +385,7 @@ void FuncFish(int a, int nDamage, int nRun)
|
|||
}
|
||||
else
|
||||
{
|
||||
short nTarget = a & 0xFFFF;
|
||||
short nTarget = nObject;
|
||||
if (nTarget >= 0 && sprite[nTarget].statnum < 199)
|
||||
{
|
||||
FishList[nFish].nTarget = nTarget;
|
||||
|
|
|
@ -276,7 +276,7 @@ void ExplodeGrenade(short nGrenade)
|
|||
DestroyGrenade(nGrenade);
|
||||
}
|
||||
|
||||
void FuncGrenade(int a, int, int nRun)
|
||||
void FuncGrenade(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nGrenade = RunData[nRun].nVal;
|
||||
assert(nGrenade >= 0 && nGrenade < kMaxGrenades);
|
||||
|
@ -294,13 +294,11 @@ void FuncGrenade(int a, int, int nRun)
|
|||
nSeq = SeqOffsets[kSeqGrenRoll] + GrenadeList[nGrenade].field_A;
|
||||
}
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, nSeq, GrenadeList[nGrenade].field_2 >> 8, 1);
|
||||
seq_PlotSequence(nObject, nSeq, GrenadeList[nGrenade].field_2 >> 8, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -113,14 +113,12 @@ int BuildLavaLimb(int nSprite, int edx, int ebx)
|
|||
return nLimbSprite;
|
||||
}
|
||||
|
||||
void FuncLavaLimb(int a, int, int nRun)
|
||||
void FuncLavaLimb(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nSprite = RunData[nRun].nVal;
|
||||
assert(nSprite >= 0 && nSprite < kMaxSprites);
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x20000:
|
||||
|
@ -146,7 +144,7 @@ void FuncLavaLimb(int a, int, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, (SeqOffsets[kSeqLavag] + 30) + pSprite->picnum, 0, 1);
|
||||
seq_PlotSequence(nObject, (SeqOffsets[kSeqLavag] + 30) + pSprite->picnum, 0, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -213,7 +211,7 @@ void BuildLava(short nSprite, int x, int y, int, short nSector, short nAngle, in
|
|||
nCreaturesTotal++;
|
||||
}
|
||||
|
||||
void FuncLava(int a, int nDamage, int nRun)
|
||||
void FuncLava(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
unsigned nLava = RunData[nRun].nVal;
|
||||
assert(nLava < LavaList.Size());
|
||||
|
@ -223,8 +221,6 @@ void FuncLava(int a, int nDamage, int nRun)
|
|||
short nSprite = LavaList[nLava].nSprite;
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -235,8 +231,8 @@ void FuncLava(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, nSeq, LavaList[nLava].nFrame, LavadudeSeq[nAction].b);
|
||||
mytsprite[a & 0xFFFF].owner = -1;
|
||||
seq_PlotSequence(nObject, nSeq, LavaList[nLava].nFrame, LavadudeSeq[nAction].b);
|
||||
mytsprite[nObject].owner = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -265,7 +261,7 @@ void FuncLava(int a, int nDamage, int nRun)
|
|||
}
|
||||
else
|
||||
{
|
||||
short nTarget = a & 0xFFFF;
|
||||
short nTarget = nObject;
|
||||
|
||||
if (nTarget >= 0)
|
||||
{
|
||||
|
|
|
@ -139,7 +139,7 @@ void BuildLion(short nSprite, int x, int y, int z, short nSector, short nAngle)
|
|||
nCreaturesTotal++;
|
||||
}
|
||||
|
||||
void FuncLion(int a, int nDamage, int nRun)
|
||||
void FuncLion(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nLion = RunData[nRun].nVal;
|
||||
assert(nLion >= 0 && nLion < (int)LionList.Size());
|
||||
|
@ -150,8 +150,6 @@ void FuncLion(int a, int nDamage, int nRun)
|
|||
|
||||
bool bVal = false;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -162,7 +160,7 @@ void FuncLion(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a, SeqOffsets[kSeqLion] + LionSeq[nAction].a, LionList[nLion].nFrame, LionSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqLion] + LionSeq[nAction].a, LionList[nLion].nFrame, LionSeq[nAction].b);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -207,7 +205,7 @@ void FuncLion(int a, int nDamage, int nRun)
|
|||
}
|
||||
else
|
||||
{
|
||||
short nTarget = a & 0xFFFF;
|
||||
short nTarget = nObject;
|
||||
|
||||
if (nTarget > -1)
|
||||
{
|
||||
|
|
|
@ -1491,14 +1491,12 @@ int BuildCreatureChunk(int nVal, int nPic)
|
|||
return nSprite | 0xD0000;
|
||||
}
|
||||
|
||||
void FuncCreatureChunk(int a, int, int nRun)
|
||||
void FuncCreatureChunk(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
int nSprite = RunData[nRun].nVal;
|
||||
assert(nSprite >= 0 && nSprite < kMaxSprites);
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
if (nMessage != 0x20000)
|
||||
return;
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ void CheckMummyRevive(short nMummy)
|
|||
}
|
||||
}
|
||||
|
||||
void FuncMummy(int a, int nDamage, int nRun)
|
||||
void FuncMummy(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nMummy = RunData[nRun].nVal;
|
||||
assert(nMummy >= 0 && nMummy < kMaxMummies);
|
||||
|
@ -184,8 +184,6 @@ void FuncMummy(int a, int nDamage, int nRun)
|
|||
auto pSprite = &sprite[nSprite];
|
||||
short nAction = MummyList[nMummy].nAction;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -478,7 +476,7 @@ void FuncMummy(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqMummy] + MummySeq[nAction].a, MummyList[nMummy].nFrame, MummySeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqMummy] + MummySeq[nAction].a, MummyList[nMummy].nFrame, MummySeq[nAction].b);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -717,7 +717,7 @@ void StartElevSound(short nSprite, int nVal)
|
|||
D3PlayFX(StaticSound[nSound], nSprite);
|
||||
}
|
||||
|
||||
void FuncElev(int a, int, int nRun)
|
||||
void FuncElev(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nElev = RunData[nRun].nVal;
|
||||
assert(nElev >= 0 && nElev < (int)Elevator.Size());
|
||||
|
@ -727,8 +727,6 @@ void FuncElev(int a, int, int nRun)
|
|||
|
||||
assert(nChannel >= 0 && nChannel < kMaxChannels);
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
if (nMessage < 0x10000) {
|
||||
return;
|
||||
}
|
||||
|
@ -972,14 +970,14 @@ int BuildWallFace(short nChannel, short nWall, int nCount, ...)
|
|||
return WallFaceCount;
|
||||
}
|
||||
|
||||
void FuncWallFace(int a, int, int nRun)
|
||||
void FuncWallFace(int, int nMessage, int, int nRun)
|
||||
{
|
||||
int nWallFace = RunData[nRun].nVal;
|
||||
assert(nWallFace >= 0 && nWallFace < (int)WallFace.Size());
|
||||
|
||||
short nChannel = WallFace[nWallFace].nChannel;
|
||||
|
||||
if ((a & 0x7F0000) != 0x10000)
|
||||
if (nMessage != 0x10000)
|
||||
return;
|
||||
|
||||
short si = sRunChannels[nChannel].c;
|
||||
|
@ -1129,15 +1127,13 @@ int BuildSlide(int nChannel, int nStartWall, int nWall1, int ecx, int nWall2, in
|
|||
return nSlide;
|
||||
}
|
||||
|
||||
void FuncSlide(int a, int, int nRun)
|
||||
void FuncSlide(int, int nMessage , int, int nRun)
|
||||
{
|
||||
int nSlide = RunData[nRun].nVal;
|
||||
assert(nSlide >= 0 && nSlide < (int)SlideData.Size());
|
||||
|
||||
short nChannel = SlideData[nSlide].nChannel;
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
int ebp = 0;
|
||||
|
||||
short cx = sRunChannels[nChannel].c;
|
||||
|
@ -1374,19 +1370,17 @@ int BuildTrap(int nSprite, int edx, int ebx, int ecx)
|
|||
|
||||
}
|
||||
|
||||
void FuncTrap(int a, int, int nRun)
|
||||
void FuncTrap(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nTrap = RunData[nRun].nVal;
|
||||
short nSprite = sTrap[nTrap].nSprite;
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x10000:
|
||||
{
|
||||
short nChannel = a & 0x3FFF;
|
||||
short nChannel = nObject & 0x3FFF;
|
||||
|
||||
if (sRunChannels[nChannel].c > 0)
|
||||
{
|
||||
|
@ -1480,7 +1474,7 @@ void FuncTrap(int a, int, int nRun)
|
|||
return;
|
||||
|
||||
default:
|
||||
DebugOut("unknown msg %d for trap\n", a & 0x7F0000);
|
||||
DebugOut("unknown msg %d for trap\n", nMessage);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -1567,15 +1561,13 @@ int BuildSpark(int nSprite, int nVal)
|
|||
return var_14;
|
||||
}
|
||||
|
||||
void FuncSpark(int a, int, int nRun)
|
||||
void FuncSpark(int, int nMessage, int, int nRun)
|
||||
{
|
||||
int nSprite = RunData[nRun].nVal;
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
||||
assert(nSprite >= 0 && nSprite < kMaxSprites);
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
if (nMessage != 0x20000) {
|
||||
return;
|
||||
}
|
||||
|
@ -1906,13 +1898,11 @@ void ExplodeEnergyBlock(int nSprite)
|
|||
changespritestat(nSprite, 0);
|
||||
}
|
||||
|
||||
void FuncEnergyBlock(int a, int nDamage, int nRun)
|
||||
void FuncEnergyBlock(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
int const nSprite = RunData[nRun].nVal;
|
||||
auto spr = &sprite[nSprite];
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x20000:
|
||||
|
@ -1963,7 +1953,7 @@ void FuncEnergyBlock(int a, int nDamage, int nRun)
|
|||
int nSprite2 = insertsprite(lasthitsect, 0);
|
||||
auto pSprite2 = &sprite[nSprite2];
|
||||
|
||||
pSprite2->ang = a & 0xFFFF;
|
||||
pSprite2->ang = nObject;
|
||||
pSprite2->x = lasthitx;
|
||||
pSprite2->y = lasthity;
|
||||
pSprite2->z = lasthitz;
|
||||
|
@ -2063,22 +2053,21 @@ void ExplodeScreen(short nSprite)
|
|||
PlayFX2(StaticSound[kSound78], nSprite);
|
||||
}
|
||||
|
||||
void FuncObject(int a, int b, int nRun)
|
||||
void FuncObject(int nMessageParm, int nMessage, int b, int nRun)
|
||||
{
|
||||
short nObject = RunData[nRun].nVal;
|
||||
auto pObject = &ObjectList[nObject];
|
||||
|
||||
short nSprite = ObjectList[nObject].nSprite;
|
||||
short nSprite = pObject->nSprite;
|
||||
auto pSprite = &sprite[nSprite];
|
||||
short nStat = pSprite->statnum;
|
||||
short bx = ObjectList[nObject].field_8;
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
short bx = pObject->field_8;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
{
|
||||
DebugOut("unknown msg %d for Object\n", a & 0x7F0000);
|
||||
DebugOut("unknown msg %d for Object\n", nMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2087,7 +2076,7 @@ void FuncObject(int a, int b, int nRun)
|
|||
|
||||
case 0x80000:
|
||||
{
|
||||
if (nStat >= 150 || ObjectList[nObject].nHealth <= 0) {
|
||||
if (nStat >= 150 || pObject->nHealth <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2097,8 +2086,8 @@ void FuncObject(int a, int b, int nRun)
|
|||
return;
|
||||
}
|
||||
|
||||
ObjectList[nObject].nHealth -= (short)b;
|
||||
if (ObjectList[nObject].nHealth > 0) {
|
||||
pObject->nHealth -= (short)b;
|
||||
if (pObject->nHealth > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2108,7 +2097,7 @@ void FuncObject(int a, int b, int nRun)
|
|||
}
|
||||
else
|
||||
{
|
||||
ObjectList[nObject].nHealth = -(RandomSize(3) + 1);
|
||||
pObject->nHealth = -(RandomSize(3) + 1);
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -2118,14 +2107,14 @@ void FuncObject(int a, int b, int nRun)
|
|||
{
|
||||
if (bx > -1)
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, bx, ObjectList[nObject].field_0, 1);
|
||||
seq_PlotSequence(nMessageParm, bx, pObject->field_0, 1);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
case 0xA0000:
|
||||
{
|
||||
if (ObjectList[nObject].nHealth > 0 && pSprite->cstat & 0x101
|
||||
if (pObject->nHealth > 0 && pSprite->cstat & 0x101
|
||||
&& (nStat != kStatExplodeTarget
|
||||
|| sprite[nRadialSpr].statnum == 201
|
||||
|| (nRadialBullet != 3 && nRadialBullet > -1)
|
||||
|
@ -2137,7 +2126,7 @@ void FuncObject(int a, int b, int nRun)
|
|||
}
|
||||
|
||||
if (pSprite->statnum != kStatAnubisDrum) {
|
||||
ObjectList[nObject].nHealth -= nDamage;
|
||||
pObject->nHealth -= nDamage;
|
||||
}
|
||||
|
||||
if (pSprite->statnum == kStatExplodeTarget)
|
||||
|
@ -2153,14 +2142,14 @@ void FuncObject(int a, int b, int nRun)
|
|||
pSprite->zvel >>= 1;
|
||||
}
|
||||
|
||||
if (ObjectList[nObject].nHealth > 0) {
|
||||
if (pObject->nHealth > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pSprite->statnum == kStatExplodeTarget)
|
||||
{
|
||||
ObjectList[nObject].nHealth = -1;
|
||||
short ax = ObjectList[nObject].field_10;
|
||||
pObject->nHealth = -1;
|
||||
short ax = pObject->field_10;
|
||||
|
||||
if (ax < 0 || ObjectList[ax].nHealth <= 0) {
|
||||
return;
|
||||
|
@ -2170,13 +2159,13 @@ void FuncObject(int a, int b, int nRun)
|
|||
}
|
||||
else if (pSprite->statnum == kStatDestructibleSprite)
|
||||
{
|
||||
ObjectList[nObject].nHealth = 0;
|
||||
pObject->nHealth = 0;
|
||||
|
||||
ExplodeScreen(nSprite);
|
||||
}
|
||||
else
|
||||
{
|
||||
ObjectList[nObject].nHealth = -(RandomSize(4) + 1);
|
||||
pObject->nHealth = -(RandomSize(4) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2196,21 +2185,21 @@ void FuncObject(int a, int b, int nRun)
|
|||
// do animation
|
||||
if (bx != -1)
|
||||
{
|
||||
ObjectList[nObject].field_0++;
|
||||
if (ObjectList[nObject].field_0 >= SeqSize[bx]) {
|
||||
ObjectList[nObject].field_0 = 0;
|
||||
pObject->field_0++;
|
||||
if (pObject->field_0 >= SeqSize[bx]) {
|
||||
pObject->field_0 = 0;
|
||||
}
|
||||
|
||||
pSprite->picnum = seq_GetSeqPicnum2(bx, ObjectList[nObject].field_0);
|
||||
pSprite->picnum = seq_GetSeqPicnum2(bx, pObject->field_0);
|
||||
}
|
||||
|
||||
if (ObjectList[nObject].nHealth >= 0) {
|
||||
if (pObject->nHealth >= 0) {
|
||||
goto FUNCOBJECT_GOTO;
|
||||
}
|
||||
|
||||
ObjectList[nObject].nHealth++;
|
||||
pObject->nHealth++;
|
||||
|
||||
if (ObjectList[nObject].nHealth)
|
||||
if (pObject->nHealth)
|
||||
{
|
||||
FUNCOBJECT_GOTO:
|
||||
if (nStat != kStatExplodeTarget)
|
||||
|
@ -2273,7 +2262,7 @@ FUNCOBJECT_GOTO:
|
|||
if (!(currentLevel->gameflags & LEVEL_EX_MULTI) || nStat != kStatExplodeTrigger)
|
||||
{
|
||||
runlist_SubRunRec(pSprite->owner);
|
||||
runlist_SubRunRec(ObjectList[nObject].field_4);
|
||||
runlist_SubRunRec(pObject->field_4);
|
||||
|
||||
mydeletesprite(nSprite);
|
||||
return;
|
||||
|
@ -2281,13 +2270,13 @@ FUNCOBJECT_GOTO:
|
|||
else
|
||||
{
|
||||
StartRegenerate(nSprite);
|
||||
ObjectList[nObject].nHealth = 120;
|
||||
pObject->nHealth = 120;
|
||||
|
||||
pSprite->x = sprite[ObjectList[nObject].field_10].x;
|
||||
pSprite->y = sprite[ObjectList[nObject].field_10].y;
|
||||
pSprite->z = sprite[ObjectList[nObject].field_10].z;
|
||||
pSprite->x = sprite[pObject->field_10].x;
|
||||
pSprite->y = sprite[pObject->field_10].y;
|
||||
pSprite->z = sprite[pObject->field_10].z;
|
||||
|
||||
mychangespritesect(nSprite, sprite[ObjectList[nObject].field_10].sectnum);
|
||||
mychangespritesect(nSprite, sprite[pObject->field_10].sectnum);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -652,7 +652,7 @@ void UpdatePlayerSpriteAngle(Player* pPlayer)
|
|||
inita = sprite[pPlayer->nSprite].ang = pPlayer->angle.ang.asbuild();
|
||||
}
|
||||
|
||||
void FuncPlayer(int a, int nDamage, int nRun)
|
||||
void FuncPlayer(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
int var_48 = 0;
|
||||
int var_40;
|
||||
|
@ -669,8 +669,6 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
|||
short nAction = PlayerList[nPlayer].nAction;
|
||||
short nActionB = PlayerList[nPlayer].nAction;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
short nSprite2;
|
||||
|
||||
PlayerList[nPlayer].angle.backup();
|
||||
|
@ -683,7 +681,7 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
|||
{
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[PlayerList[nPlayer].nSeq] + PlayerSeq[nAction].a, PlayerList[nPlayer].field_2, PlayerSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[PlayerList[nPlayer].nSeq] + PlayerSeq[nAction].a, PlayerList[nPlayer].field_2, PlayerSeq[nAction].b);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -712,7 +710,7 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
|||
return;
|
||||
}
|
||||
|
||||
nSprite2 = a & 0xFFFF;
|
||||
nSprite2 = nObject;
|
||||
}
|
||||
|
||||
// ok continue case 0x80000 as normal, loc_1C57C
|
||||
|
|
|
@ -32,7 +32,7 @@ int GrabPlayer();
|
|||
void InitPlayerInventory(short nPlayer);
|
||||
void RestartPlayer(short nPlayer);
|
||||
|
||||
void FuncPlayer(int nSector, int nSprite, int nRun);
|
||||
void FuncPlayer(int, int nSector, int nSprite, int nRun);
|
||||
|
||||
enum
|
||||
{
|
||||
|
|
|
@ -509,7 +509,7 @@ void BuildQueenEgg(short nQueen, int nVal)
|
|||
QueenEgg[nEgg].nRunPtr = runlist_AddRunRec(NewRun, nEgg, 0x1D0000);
|
||||
}
|
||||
|
||||
void FuncQueenEgg(int a, int nDamage, int nRun)
|
||||
void FuncQueenEgg(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nEgg = RunData[nRun].nVal;
|
||||
|
||||
|
@ -522,8 +522,6 @@ void FuncQueenEgg(int a, int nDamage, int nRun)
|
|||
|
||||
bool bVal = false;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -706,7 +704,7 @@ void FuncQueenEgg(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqQueenEgg] + EggSeq[nAction].a, pEgg->nFrame, EggSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqQueenEgg] + EggSeq[nAction].a, pEgg->nFrame, EggSeq[nAction].b);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -764,7 +762,7 @@ void BuildQueenHead(short nQueen)
|
|||
QueenHead.tails = 0;
|
||||
}
|
||||
|
||||
void FuncQueenHead(int a, int nDamage, int nRun)
|
||||
void FuncQueenHead(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nHead = RunData[nRun].nVal;
|
||||
|
||||
|
@ -780,8 +778,6 @@ void FuncQueenHead(int a, int nDamage, int nRun)
|
|||
|
||||
int var_14 = 0;
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x20000:
|
||||
|
@ -1090,7 +1086,7 @@ __MOVEQS:
|
|||
|
||||
if (!RandomSize(4))
|
||||
{
|
||||
QueenHead.nTarget = a & 0xFFFF;
|
||||
QueenHead.nTarget = nObject;
|
||||
QueenHead.nAction = 7;
|
||||
QueenHead.nFrame = 0;
|
||||
}
|
||||
|
@ -1131,13 +1127,13 @@ __MOVEQS:
|
|||
nSeq += 73;
|
||||
}
|
||||
|
||||
seq_PlotSequence(a & 0xFFFF, nSeq, QueenHead.nFrame, edx);
|
||||
seq_PlotSequence(nObject, nSeq, QueenHead.nFrame, edx);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
DebugOut("unknown msg %d for Queenhead\n", a & 0x7F0000);
|
||||
DebugOut("unknown msg %d for Queenhead\n", nMessage);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1220,7 +1216,7 @@ void SetQueenSpeed(short nSprite, int nSpeed)
|
|||
pSprite->yvel = bsin(pSprite->ang, -(2 - nSpeed));
|
||||
}
|
||||
|
||||
void FuncQueen(int a, int nDamage, int nRun)
|
||||
void FuncQueen(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nQueen = RunData[nRun].nVal;
|
||||
assert(nQueen >= 0 && nQueen < kMaxQueens);
|
||||
|
@ -1233,8 +1229,6 @@ void FuncQueen(int a, int nDamage, int nRun)
|
|||
|
||||
bool bVal = false;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
|
||||
|
@ -1564,7 +1558,7 @@ void FuncQueen(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqQueen] + QueenSeq[nAction].a, QueenList[nQueen].nFrame, QueenSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqQueen] + QueenSeq[nAction].a, QueenList[nQueen].nFrame, QueenSeq[nAction].b);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,7 +165,7 @@ void MoveRaToEnemy(short nPlayer)
|
|||
}
|
||||
}
|
||||
|
||||
void FuncRa(int a, int, int nRun)
|
||||
void FuncRa(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nPlayer = RunData[nRun].nVal;
|
||||
short nCurrentWeapon = PlayerList[nPlayer].nCurrentWeapon;
|
||||
|
@ -176,8 +176,6 @@ void FuncRa(int a, int, int nRun)
|
|||
|
||||
bool bVal = false;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -306,7 +304,7 @@ void FuncRa(int a, int, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
short nSprite2 = a & 0xFFFF;
|
||||
short nSprite2 = nObject;
|
||||
seq_PlotSequence(nSprite2, nSeq, Ra[nPlayer].nFrame, 1);
|
||||
mytsprite[nSprite2].owner = -1;
|
||||
return;
|
||||
|
|
|
@ -204,7 +204,7 @@ int FindFood(short nSprite)
|
|||
return -1;
|
||||
}
|
||||
|
||||
void FuncRat(int a, int nDamage, int nRun)
|
||||
void FuncRat(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nRat = RunData[nRun].nVal;
|
||||
short nSprite = RatList[nRat].nSprite;
|
||||
|
@ -213,8 +213,6 @@ void FuncRat(int a, int nDamage, int nRun)
|
|||
|
||||
bool bVal = false;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -244,7 +242,7 @@ void FuncRat(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqRat] + RatSeq[nAction].a, RatList[nRat].nFrame, RatSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqRat] + RatSeq[nAction].a, RatList[nRat].nFrame, RatSeq[nAction].b);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ void BuildRex(short nSprite, int x, int y, int z, short nSector, short nAngle, i
|
|||
nCreaturesTotal++;
|
||||
}
|
||||
|
||||
void FuncRex(int a, int nDamage, int nRun)
|
||||
void FuncRex(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nRex = RunData[nRun].nVal;
|
||||
assert(nRex >= 0 && nRex < (int)RexList.Size());
|
||||
|
@ -148,8 +148,6 @@ void FuncRex(int a, int nDamage, int nRun)
|
|||
|
||||
bool bVal = false;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -172,7 +170,7 @@ void FuncRex(int a, int nDamage, int nRun)
|
|||
{
|
||||
if (nDamage)
|
||||
{
|
||||
short nTarget = a & 0xFFFF;
|
||||
short nTarget = nObject;
|
||||
if (nTarget >= 0 && sprite[nTarget].statnum == 100)
|
||||
{
|
||||
RexList[nRex].nTarget = nTarget;
|
||||
|
@ -206,7 +204,7 @@ void FuncRex(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqRex] + RexSeq[nAction].a, RexList[nRex].nFrame, RexSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqRex] + RexSeq[nAction].a, RexList[nRex].nFrame, RexSeq[nAction].b);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ void GoRoach(short nSprite)
|
|||
pSprite->yvel = bsin(pSprite->ang, -1) - bsin(pSprite->ang, -3);
|
||||
}
|
||||
|
||||
void FuncRoach(int a, int nDamage, int nRun)
|
||||
void FuncRoach(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nRoach = RunData[nRun].nVal;
|
||||
assert(nRoach >= 0 && nRoach < (int)RoachList.Size());
|
||||
|
@ -162,8 +162,6 @@ void FuncRoach(int a, int nDamage, int nRun)
|
|||
|
||||
bool bVal = false;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -174,7 +172,7 @@ void FuncRoach(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, RoachSeq[nAction].a + SeqOffsets[kSeqRoach], RoachList[nRoach].nFrame, RoachSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, RoachSeq[nAction].a + SeqOffsets[kSeqRoach], RoachList[nRoach].nFrame, RoachSeq[nAction].b);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -212,7 +210,7 @@ void FuncRoach(int a, int nDamage, int nRun)
|
|||
}
|
||||
else
|
||||
{
|
||||
short nSprite2 = a & 0xFFFF;
|
||||
short nSprite2 = nObject;
|
||||
if (nSprite2 >= 0)
|
||||
{
|
||||
if (sprite[nSprite2].statnum < 199) {
|
||||
|
|
|
@ -266,7 +266,7 @@ void runlist_SubRunRec(int RunPtr)
|
|||
RunData[RunPtr].nRef = -totalmoves;
|
||||
}
|
||||
|
||||
void runlist_SendMessageToRunRec(int nRun, int nMessage, int nDamage)
|
||||
void runlist_SendMessageToRunRec(int nRun, int nObject, int nMessage, int nDamage)
|
||||
{
|
||||
int nFunc = RunData[nRun].nRef >> 16;
|
||||
|
||||
|
@ -283,7 +283,7 @@ void runlist_SendMessageToRunRec(int nRun, int nMessage, int nDamage)
|
|||
assert(nFunc < kFuncMax); // REMOVE
|
||||
|
||||
// do function pointer call here.
|
||||
aiFunctions[nFunc](nMessage, nDamage, nRun);
|
||||
aiFunctions[nFunc](nObject, nMessage, nDamage, nRun);
|
||||
}
|
||||
|
||||
void runlist_ExplodeSignalRun()
|
||||
|
@ -307,7 +307,7 @@ void runlist_ExplodeSignalRun()
|
|||
|
||||
if (val >= 0)
|
||||
{
|
||||
runlist_SendMessageToRunRec(runPtr, 0xA0000, 0);
|
||||
runlist_SendMessageToRunRec(runPtr, 0, 0xA0000, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ void runlist_SignalRun(int NxtPtr, int edx)
|
|||
NxtPtr = RunData[RunPtr].next;
|
||||
|
||||
if (val >= 0) {
|
||||
runlist_SendMessageToRunRec(RunPtr, edx, 0);
|
||||
runlist_SendMessageToRunRec(RunPtr, edx & 0xffff, edx & ~0xffff, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1664,7 +1664,7 @@ void runlist_DamageEnemy(int nSprite, int nSprite2, short nDamage)
|
|||
|
||||
short nPreCreaturesKilled = nCreaturesKilled;
|
||||
|
||||
runlist_SendMessageToRunRec(nRun, (nSprite2 & 0xFFFF) | 0x80000, nDamage * 4);
|
||||
runlist_SendMessageToRunRec(nRun, nSprite2, 0x80000, nDamage * 4);
|
||||
|
||||
// is there now one less creature? (has one died)
|
||||
if (nPreCreaturesKilled < nCreaturesKilled && nSprite2 > -1)
|
||||
|
|
|
@ -148,7 +148,7 @@ void BuildScorp(short nSprite, int x, int y, int z, short nSector, short nAngle,
|
|||
nCreaturesTotal++;
|
||||
}
|
||||
|
||||
void FuncScorp(int a, int nDamage, int nRun)
|
||||
void FuncScorp(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nScorp = RunData[nRun].nVal;
|
||||
assert(nScorp >= 0 && nScorp < (int)scorpion.Size());
|
||||
|
@ -161,8 +161,6 @@ void FuncScorp(int a, int nDamage, int nRun)
|
|||
|
||||
short nTarget = -1;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -173,7 +171,7 @@ void FuncScorp(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqScorp] + ScorpSeq[nAction].a, scorpion[nScorp].nFrame, ScorpSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqScorp] + ScorpSeq[nAction].a, scorpion[nScorp].nFrame, ScorpSeq[nAction].b);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -212,7 +210,7 @@ void FuncScorp(int a, int nDamage, int nRun)
|
|||
}
|
||||
else
|
||||
{
|
||||
nTarget = a & 0xFFFF;
|
||||
nTarget = nObject;
|
||||
|
||||
if (nTarget >= 0)
|
||||
{
|
||||
|
|
|
@ -183,13 +183,11 @@ void BuildSoul(int nSet)
|
|||
pSprite->owner = runlist_AddRunRec(NewRun, nSprite, 0x230000);
|
||||
}
|
||||
|
||||
void FuncSoul(int a, int, int nRun)
|
||||
void FuncSoul(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nSprite = RunData[nRun].nVal;
|
||||
auto pSprite = &sprite[nSprite];
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x20000:
|
||||
|
@ -233,7 +231,7 @@ void FuncSoul(int a, int, int nRun)
|
|||
}
|
||||
}
|
||||
|
||||
void FuncSet(int a, int nDamage, int nRun)
|
||||
void FuncSet(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nSet = RunData[nRun].nVal;
|
||||
assert(nSet >= 0 && nSet < (int)SetList.Size());
|
||||
|
@ -244,8 +242,6 @@ void FuncSet(int a, int nDamage, int nRun)
|
|||
|
||||
bool bVal = false;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -301,7 +297,7 @@ void FuncSet(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a, SeqOffsets[kSeqSet] + SetSeq[nAction].a, SetList[nSet].nFrame, SetSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqSet] + SetSeq[nAction].a, SetList[nSet].nFrame, SetSeq[nAction].b);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -311,10 +311,8 @@ int FindSnakeEnemy(short nSnake)
|
|||
return nEnemy;
|
||||
}
|
||||
|
||||
void FuncSnake(int a, int, int nRun)
|
||||
void FuncSnake(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x20000:
|
||||
|
@ -412,7 +410,7 @@ SEARCH_ENEMY:
|
|||
case 0x90000:
|
||||
{
|
||||
short nSnake = RunData[nRun].nVal;
|
||||
short nSprite = a & 0xFFFF;
|
||||
short nSprite = nObject;
|
||||
|
||||
if ((nSnake & 0xFF) == 0) {
|
||||
seq_PlotSequence(nSprite, SeqOffsets[kSeqSnakehed], 0, 0);
|
||||
|
|
|
@ -133,7 +133,7 @@ int BuildSpider(int nSprite, int x, int y, int z, short nSector, int nAngle)
|
|||
return nSprite;
|
||||
}
|
||||
|
||||
void FuncSpider(int a, int nDamage, int nRun)
|
||||
void FuncSpider(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
int nSpider = RunData[nRun].nVal;
|
||||
auto spp = &SpiderList[nSpider];
|
||||
|
@ -145,8 +145,6 @@ void FuncSpider(int a, int nDamage, int nRun)
|
|||
auto sp = &sprite[nSprite];
|
||||
short nAction = spp->nAction;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -399,7 +397,7 @@ void FuncSpider(int a, int nDamage, int nRun)
|
|||
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqSpider] + SpiderSeq[nAction].a, spp->nFrame, SpiderSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqSpider] + SpiderSeq[nAction].a, spp->nFrame, SpiderSeq[nAction].b);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -418,7 +416,7 @@ void FuncSpider(int a, int nDamage, int nRun)
|
|||
if (!nDamage)
|
||||
return;
|
||||
|
||||
short nTarget = a & 0xFFFF;
|
||||
short nTarget = nObject;
|
||||
|
||||
spp->nHealth -= dmgAdjust(nDamage);
|
||||
if (spp->nHealth > 0)
|
||||
|
|
|
@ -135,13 +135,11 @@ std::pair<int, int> BuildSwReady(int nChannel, short nLink)
|
|||
return { SwitchCount, 0x10000 };
|
||||
}
|
||||
|
||||
void FuncSwReady(int a, int, int nRun)
|
||||
void FuncSwReady(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nSwitch = RunData[nRun].nVal;
|
||||
assert(nSwitch >= 0 && nSwitch < kMaxSwitches);
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
short nChannel = SwitchData[nSwitch].nChannel;
|
||||
short nLink = SwitchData[nSwitch].nLink;
|
||||
|
||||
|
@ -189,13 +187,11 @@ std::pair<int, int> BuildSwPause(int nChannel, int nLink, int ebx)
|
|||
return { SwitchCount, 0x20000 };
|
||||
}
|
||||
|
||||
void FuncSwPause(int a, int, int nRun)
|
||||
void FuncSwPause(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nSwitch = RunData[nRun].nVal;
|
||||
assert(nSwitch >= 0 && nSwitch < kMaxSwitches);
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
short nChannel = SwitchData[nSwitch].nChannel;
|
||||
short nLink = SwitchData[nSwitch].nLink;
|
||||
|
||||
|
@ -278,7 +274,7 @@ std::pair<int, int> BuildSwStepOn(int nChannel, int nLink, int nSector)
|
|||
return { nSwitch , 0x30000 };
|
||||
}
|
||||
|
||||
void FuncSwStepOn(int a, int, int nRun)
|
||||
void FuncSwStepOn(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nSwitch = RunData[nRun].nVal;
|
||||
assert(nSwitch >= 0 && nSwitch < kMaxSwitches);
|
||||
|
@ -291,8 +287,6 @@ void FuncSwStepOn(int a, int, int nRun)
|
|||
|
||||
int8_t var_14 = LinkMap[nLink].v[sRunChannels[nChannel].c];
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
@ -349,13 +343,11 @@ std::pair<int, int> BuildSwNotOnPause(int nChannel, int nLink, int nSector, int
|
|||
return { nSwitch, 0x40000 };
|
||||
}
|
||||
|
||||
void FuncSwNotOnPause(int a, int, int nRun)
|
||||
void FuncSwNotOnPause(int nObject, int nMessage, int, int nRun)
|
||||
{
|
||||
short nSwitch = RunData[nRun].nVal;
|
||||
assert(nSwitch >= 0 && nSwitch < kMaxSwitches);
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
short nChannel = SwitchData[nSwitch].nChannel;
|
||||
short nLink = SwitchData[nSwitch].nLink;
|
||||
|
||||
|
@ -438,16 +430,13 @@ std::pair<int, int> BuildSwPressSector(int nChannel, int nLink, int nSector, int
|
|||
return { nSwitch, 0x50000 };
|
||||
}
|
||||
|
||||
void FuncSwPressSector(int a, int, int nRun)
|
||||
void FuncSwPressSector(int nPlayer, int nMessage, int, int nRun)
|
||||
{
|
||||
short nSwitch = RunData[nRun].nVal;
|
||||
assert(nSwitch >= 0 && nSwitch < kMaxSwitches);
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
short nChannel = SwitchData[nSwitch].nChannel;
|
||||
short nLink = SwitchData[nSwitch].nLink;
|
||||
short nPlayer = a & 0xFFFF;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
|
@ -510,7 +499,7 @@ std::pair<int, int> BuildSwPressWall(short nChannel, short nLink, short nWall)
|
|||
return { SwitchCount, 0x60000 };
|
||||
}
|
||||
|
||||
void FuncSwPressWall(int a, int, int nRun)
|
||||
void FuncSwPressWall(int, int nMessage, int, int nRun)
|
||||
{
|
||||
short nSwitch = RunData[nRun].nVal;
|
||||
assert(nSwitch >= 0 && nSwitch < kMaxSwitches);
|
||||
|
@ -518,12 +507,6 @@ void FuncSwPressWall(int a, int, int nRun)
|
|||
short nChannel = SwitchData[nSwitch].nChannel;
|
||||
short nLink = SwitchData[nSwitch].nLink;
|
||||
|
||||
// TEMP
|
||||
// assert(nLink < 1024);
|
||||
// assert(nChannel < 8);
|
||||
|
||||
int nMessage = a & 0x7F0000;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
default:
|
||||
|
|
|
@ -177,7 +177,7 @@ int BuildWasp(short nSprite, int x, int y, int z, short nSector, short nAngle)
|
|||
return nSprite;
|
||||
}
|
||||
|
||||
void FuncWasp(int a, int nDamage, int nRun)
|
||||
void FuncWasp(int nObject, int nMessage, int nDamage, int nRun)
|
||||
{
|
||||
short nWasp = RunData[nRun].nVal;
|
||||
short nSprite = WaspList[nWasp].nSprite;
|
||||
|
@ -188,13 +188,11 @@ void FuncWasp(int a, int nDamage, int nRun)
|
|||
|
||||
bool bVal = false;
|
||||
|
||||
int nMessage = a & kMessageMask;
|
||||
|
||||
switch (nMessage)
|
||||
{
|
||||
case 0x90000:
|
||||
{
|
||||
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqWasp] + WaspSeq[nAction].a, WaspList[nWasp].nFrame, WaspSeq[nAction].b);
|
||||
seq_PlotSequence(nObject, SeqOffsets[kSeqWasp] + WaspSeq[nAction].a, WaspList[nWasp].nFrame, WaspSeq[nAction].b);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue