- Exhumed: Give all savegame handlers and action sequences unique names.

This commit is contained in:
Christoph Oelckers 2020-10-11 11:33:28 +02:00
parent c87185a337
commit fc54d98100
35 changed files with 101 additions and 101 deletions

View file

@ -37,7 +37,7 @@ short AnimsFree[kMaxAnims];
Anim AnimList[kMaxAnims];
uint8_t AnimFlags[kMaxAnims];
static SavegameHelper sgh("anims",
static SavegameHelper sghanims("anims",
SV(nMagicSeq),
SV(nPreMagicSeq),
SV(nSavePointSeq),

View file

@ -43,7 +43,7 @@ Anubis AnubisList[kMaxAnubis];
short AnubisCount = -1;
static actionSeq ActionSeq[] = {
static actionSeq AnubisSeq[] = {
{ 0, 0 },
{ 8, 0 },
{ 16, 0 },
@ -63,7 +63,7 @@ static actionSeq ActionSeq[] = {
short nAnubisDrum = 0;
static SavegameHelper sgh("anubis",
static SavegameHelper sghanubis("anubis",
SA(AnubisList),
SV(AnubisCount),
SV(nAnubisDrum),
@ -177,7 +177,7 @@ void FuncAnubis(int a, int nDamage, int nRun)
Gravity(nSprite);
}
short nSeq = SeqOffsets[kSeqAnubis] + ActionSeq[nAction].a;
short nSeq = SeqOffsets[kSeqAnubis] + AnubisSeq[nAction].a;
seq_MoveSequence(nSprite, nSeq, AnubisList[nAnubis].nFrame);
@ -406,7 +406,7 @@ void FuncAnubis(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqAnubis] + ActionSeq[nAction].a, AnubisList[nAnubis].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqAnubis] + AnubisSeq[nAction].a, AnubisList[nAnubis].nFrame, AnubisSeq[nAction].b);
break;
}

View file

@ -53,7 +53,7 @@ uint8_t nBubblesFree[kMaxBubbles];
machine Machine[kMaxMachines];
Bubble BubbleList[kMaxBubbles];
static SavegameHelper sgh("bubbles",
static SavegameHelper sghbubbles("bubbles",
SV(BubbleCount),
SV(nFreeCount),
SV(nMachineCount),

View file

@ -66,7 +66,7 @@ short lasthitsect, lasthitsprite, lasthitwall;
int nBulletCount = 0;
short nRadialBullet = 0;
static SavegameHelper sgh("bullet",
static SavegameHelper sghbullet("bullet",
SV(BulletFree),
SA(BulletList),
SA(nBulletEnemy),

View file

@ -620,7 +620,7 @@ bool GameInterface::CanSave()
// This is only the static global data.
static SavegameHelper sgh("exhumed",
static SavegameHelper sghexhumed("exhumed",
SV(besttarget),
SV(nCreaturesTotal),
SV(nCreaturesKilled),

View file

@ -30,7 +30,7 @@ BEGIN_PS_NS
short FishCount = 0;
static actionSeq ActionSeq[] = {
static actionSeq FishSeq[] = {
{8, 0},
{8, 0},
{0, 0},
@ -70,7 +70,7 @@ struct Chunk
Fish FishList[kMaxFishes];
Chunk FishChunk[kMaxChunks];
static SavegameHelper sgh("fish",
static SavegameHelper sghfish("fish",
SV(FishCount),
SV(nChunksFree),
SA(nFreeChunk),
@ -246,7 +246,7 @@ int BuildFish(int nSprite, int x, int y, int z, int nSector, int nAngle)
sprite[nSprite].pal = sector[sprite[nSprite].sectnum].ceilingpal;
sprite[nSprite].xoffset = 0;
sprite[nSprite].yoffset = 0;
sprite[nSprite].picnum = seq_GetSeqPicnum(kSeqFish, ActionSeq[0].a, 0);
sprite[nSprite].picnum = seq_GetSeqPicnum(kSeqFish, FishSeq[0].a, 0);
sprite[nSprite].xvel = 0;
sprite[nSprite].yvel = 0;
sprite[nSprite].zvel = 0;
@ -329,7 +329,7 @@ void FuncFish(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqFish] + ActionSeq[nAction].a, FishList[nFish].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqFish] + FishSeq[nAction].a, FishList[nFish].nFrame, FishSeq[nAction].b);
tsprite[a & 0xFFFF].owner = -1;
return;
}
@ -406,7 +406,7 @@ void FuncFish(int a, int nDamage, int nRun)
Gravity(nSprite);
}
short nSeq = SeqOffsets[kSeqFish] + ActionSeq[nAction].a;
short nSeq = SeqOffsets[kSeqFish] + FishSeq[nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, FishList[nFish].nFrame);

View file

@ -48,7 +48,7 @@ struct Grenade
Grenade GrenadeList[kMaxGrenades];
static SavegameHelper sgh("grenade",
static SavegameHelper sghgrenade("grenade",
SV(nGrenadeCount),
SV(nGrenadesFree),
SA(GrenadeFree),

View file

@ -61,7 +61,7 @@ short nTemperature[kMaxPlayers];
short nMinAmmo[] = { 0, 24, 51, 50, 1, 0, 0 };
short word_96E26 = 0;
static SavegameHelper sgh("gun",
static SavegameHelper sghgun("gun",
SA(nTemperature),
SV(word_96E26),
nullptr);

View file

@ -910,7 +910,7 @@ void LoadObjects()
}
static SavegameHelper sgh("init",
static SavegameHelper sghinit("init",
SV(initx),
SV(inity),
SV(initz),

View file

@ -109,7 +109,7 @@ short nRegenerates;
short nFirstRegenerate;
short nMagicCount;
static SavegameHelper sgh("items",
static SavegameHelper sghitems("items",
SV(nRegenerates),
SV(nFirstRegenerate),
SV(nMagicCount),

View file

@ -42,7 +42,7 @@ Lava LavaList[kMaxLavas];
short LavaCount = 0;
static actionSeq ActionSeq[] = {
static actionSeq LavadudeSeq[] = {
{0, 1},
{0, 1},
{1, 0},
@ -54,7 +54,7 @@ static actionSeq ActionSeq[] = {
{42, 1}
};
static SavegameHelper sgh("lavadude",
static SavegameHelper sghlava("lavadude",
SA(LavaList),
SV(LavaCount),
nullptr);
@ -176,7 +176,7 @@ int BuildLava(short nSprite, int x, int y, int, short nSector, short nAngle, int
sprite[nSprite].clipdist = 127;
sprite[nSprite].xoffset = 0;
sprite[nSprite].yoffset = 0;
sprite[nSprite].picnum = seq_GetSeqPicnum(kSeqLavag, ActionSeq[3].a, 0);
sprite[nSprite].picnum = seq_GetSeqPicnum(kSeqLavag, LavadudeSeq[3].a, 0);
sprite[nSprite].xvel = 0;
sprite[nSprite].yvel = 0;
sprite[nSprite].zvel = 0;
@ -209,7 +209,7 @@ void FuncLava(int a, int nDamage, int nRun)
assert(nLava >= 0 && nLava < kMaxLavas);
short nAction = LavaList[nLava].nAction;
short nSeq = ActionSeq[nAction].a + SeqOffsets[kSeqLavag];
short nSeq = LavadudeSeq[nAction].a + SeqOffsets[kSeqLavag];
short nSprite = LavaList[nLava].nSprite;
int nMessage = a & kMessageMask;
@ -224,7 +224,7 @@ void FuncLava(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, nSeq, LavaList[nLava].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, nSeq, LavaList[nLava].nFrame, LavadudeSeq[nAction].b);
tsprite[a & 0xFFFF].owner = -1;
return;
}

View file

@ -88,7 +88,7 @@ int bDoFlicks = 0;
int bDoGlows = 0;
static SavegameHelper sgh("lightning",
static SavegameHelper sghlighnting("lightning",
SA(sFlash),
SA(sGlow),
SA(nNextFlash),

View file

@ -30,7 +30,7 @@ BEGIN_PS_NS
short LionCount = -1;
short MoveHook[kMaxLions];
static actionSeq ActionSeq[] = {
static actionSeq LionSeq[] = {
{54, 1},
{18, 0},
{0, 0},
@ -58,7 +58,7 @@ struct Lion
Lion LionList[kMaxLions];
static SavegameHelper sgh("lion",
static SavegameHelper sghlion("lion",
SV(LionCount),
SA(MoveHook),
SA(LionList),
@ -155,7 +155,7 @@ void FuncLion(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a, SeqOffsets[kSeqLion] + ActionSeq[nAction].a, LionList[nLion].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a, SeqOffsets[kSeqLion] + LionSeq[nAction].a, LionList[nLion].nFrame, LionSeq[nAction].b);
return;
}
@ -245,7 +245,7 @@ void FuncLion(int a, int nDamage, int nRun)
Gravity(nSprite);
}
short nSeq = SeqOffsets[kSeqLion] + ActionSeq[nAction].a;
short nSeq = SeqOffsets[kSeqLion] + LionSeq[nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, LionList[nLion].nFrame);

View file

@ -238,7 +238,7 @@ void DoEnergyTile()
}
}
static SavegameHelper sgh("menu",
static SavegameHelper sghmenu("menu",
SA(nCinemaSeen),
SA(energytile),
SV(nButtonColor),

View file

@ -43,15 +43,15 @@ short nBodySprite[50];
int hihit, sprceiling, sprfloor, lohit;
#define kMaxPushBlocks 100
#define kMaxChunks 75
#define kMaxMoveChunks 75
// think this belongs in init.c?
BlockInfo sBlockInfo[kMaxPushBlocks];
short nChunkSprite[kMaxChunks];
short nChunkSprite[kMaxMoveChunks];
static SavegameHelper sgh("move",
static SavegameHelper sghmove("move",
SV(nPushBlocks),
SV(overridesect),
SV(NearCount),
@ -1371,10 +1371,10 @@ int GrabChunkSprite()
changespritestat(nSprite, 899);
nCurChunkNum++;
if (nCurChunkNum >= kMaxChunks)
if (nCurChunkNum >= kMaxMoveChunks)
nCurChunkNum = 0;
if (nChunkTotal < kMaxChunks)
if (nChunkTotal < kMaxMoveChunks)
nChunkTotal++;
sprite[nSprite].cstat = 0x80;

View file

@ -41,7 +41,7 @@ struct Mummy
Mummy MummyList[kMaxMummies];
static actionSeq ActionSeq[] = {
static actionSeq MummySeq[] = {
{8, 0},
{0, 0},
{16, 0},
@ -53,7 +53,7 @@ static actionSeq ActionSeq[] = {
};
static SavegameHelper sgh("mummy",
static SavegameHelper sghmummy("mummy",
SV(nMummies),
SA(MummyList),
nullptr);
@ -185,7 +185,7 @@ void FuncMummy(int a, int nDamage, int nRun)
{
Gravity(nSprite);
int nSeq = SeqOffsets[kSeqMummy] + ActionSeq[nAction].a;
int nSeq = SeqOffsets[kSeqMummy] + MummySeq[nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, MummyList[nMummy].B);
@ -465,7 +465,7 @@ void FuncMummy(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqMummy] + ActionSeq[nAction].a, MummyList[nMummy].B, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqMummy] + MummySeq[nAction].a, MummyList[nMummy].B, MummySeq[nAction].b);
return;
}

View file

@ -2665,7 +2665,7 @@ void PostProcess()
}
static SavegameHelper sgh("objects",
static SavegameHelper sghobj("objects",
SA(sTrap),
SA(sBob),
SA(sTrail),

View file

@ -53,7 +53,7 @@ int lPlayerXVel = 0;
int lPlayerYVel = 0;
short obobangle = 0, bobangle = 0;
static actionSeq ActionSeq[] = {
static actionSeq PlayerSeq[] = {
{18, 0}, {0, 0}, {9, 0}, {27, 0}, {63, 0},
{72, 0}, {54, 0}, {45, 0}, {54, 0}, {81, 0},
{90, 0}, {99, 0}, {108, 0}, {8, 0}, {0, 0},
@ -738,7 +738,7 @@ void FuncPlayer(int a, int nDamage, int nRun)
{
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, SeqOffsets[PlayerList[nPlayer].nSeq] + ActionSeq[nAction].a, PlayerList[nPlayer].field_2, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, SeqOffsets[PlayerList[nPlayer].nSeq] + PlayerSeq[nAction].a, PlayerList[nPlayer].field_2, PlayerSeq[nAction].b);
return;
}
@ -876,7 +876,7 @@ void FuncPlayer(int a, int nDamage, int nRun)
int var_EC = PlayerList[nPlayer].field_2;
sprite[nPlayerSprite].picnum = seq_GetSeqPicnum(PlayerList[nPlayer].nSeq, ActionSeq[nHeightTemplate[nAction]].a, var_EC);
sprite[nPlayerSprite].picnum = seq_GetSeqPicnum(PlayerList[nPlayer].nSeq, PlayerSeq[nHeightTemplate[nAction]].a, var_EC);
sprite[nDopple].picnum = sprite[nPlayerSprite].picnum;
if (nPlayerTorch[nPlayer] > 0)
@ -2721,7 +2721,7 @@ loc_1BD2E:
CheckAmbience(nLocalEyeSect);
}
int var_AC = SeqOffsets[PlayerList[nPlayer].nSeq] + ActionSeq[nAction].a;
int var_AC = SeqOffsets[PlayerList[nPlayer].nSeq] + PlayerSeq[nAction].a;
seq_MoveSequence(nPlayerSprite, var_AC, PlayerList[nPlayer].field_2);
PlayerList[nPlayer].field_2++;
@ -2838,7 +2838,7 @@ loc_1BD2E:
}
}
static SavegameHelper sgh("player",
static SavegameHelper sghplayer("player",
SV(lPlayerXVel),
SV(lPlayerYVel),
SV(obobangle),

View file

@ -33,7 +33,7 @@ BEGIN_PS_NS
short QueenCount = 0;
static actionSeq ActionSeq[] = {
static actionSeq QueenSeq[] = {
{0, 0},
{0, 0},
{9, 0},
@ -130,7 +130,7 @@ short MoveQA[25];
static SavegameHelper sgh("queen",
static SavegameHelper sghqueen("queen",
SV(QueenCount),
SV(nQHead),
SV(nEggsFree),
@ -1197,7 +1197,7 @@ void FuncQueen(int a, int nDamage, int nRun)
Gravity(nSprite);
}
short nSeq = SeqOffsets[kSeqQueen] + ActionSeq[nAction].a;
short nSeq = SeqOffsets[kSeqQueen] + QueenSeq[nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, QueenList[nQueen].nFrame);
@ -1511,7 +1511,7 @@ void FuncQueen(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqQueen] + ActionSeq[nAction].a, QueenList[nQueen].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqQueen] + QueenSeq[nAction].a, QueenList[nQueen].nFrame, QueenSeq[nAction].b);
break;
}
}

View file

@ -31,14 +31,14 @@ BEGIN_PS_NS
RA Ra[kMaxPlayers]; // one Ra for each player
short RaCount;
static actionSeq ActionSeq[] = {
static actionSeq RaSeq[] = {
{2, 1},
{0, 0},
{1, 0},
{2, 0}
};
static SavegameHelper sgh("ra",
static SavegameHelper sghra("ra",
SA(Ra),
SV(RaCount),
nullptr);
@ -154,7 +154,7 @@ void FuncRa(int a, int, int nRun)
short nPlayer = RunData[nRun].nVal;
short nCurrentWeapon = PlayerList[nPlayer].nCurrentWeapon;
short nSeq = SeqOffsets[kSeqEyeHit] + ActionSeq[Ra[nPlayer].nAction].a;
short nSeq = SeqOffsets[kSeqEyeHit] + RaSeq[Ra[nPlayer].nAction].a;
short nSprite = Ra[nPlayer].nSprite;
bool bVal = false;

View file

@ -452,7 +452,7 @@ void DoSpiritHead()
}
// This is only the static global data.
static SavegameHelper sgh("ramses",
static SavegameHelper sghramses("ramses",
SA(cPupData),
SV(nPupData),
SV(nPixels),

View file

@ -25,7 +25,7 @@ int randA = 0;
int randB = 0x11111111;
int randC = 0x1010101;
static SavegameHelper sgh("rand",
static SavegameHelper sghrandom("rand",
SV(randA),
SV(randB),
SV(randC),

View file

@ -45,7 +45,7 @@ struct Rat
Rat RatList[kMaxRats];
static actionSeq ActionSeq[] = {
static actionSeq RatSeq[] = {
{0, 1},
{1, 0},
{1, 0},
@ -224,13 +224,13 @@ void FuncRat(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqRat] + ActionSeq[nAction].a, RatList[nRat].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqRat] + RatSeq[nAction].a, RatList[nRat].nFrame, RatSeq[nAction].b);
return;
}
case 0x20000:
{
int nSeq = SeqOffsets[kSeqRat] + ActionSeq[nAction].a;
int nSeq = SeqOffsets[kSeqRat] + RatSeq[nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, RatList[nRat].nFrame);
seq_MoveSequence(nSprite, nSeq, RatList[nRat].nFrame);

View file

@ -43,7 +43,7 @@ struct Rex
Rex RexList[kMaxRex];
static actionSeq ActionSeq[] = {
static actionSeq RexSeq[] = {
{29, 0},
{0, 0},
{0, 0},
@ -55,7 +55,7 @@ static actionSeq ActionSeq[] = {
};
static SavegameHelper sgh("rex",
static SavegameHelper sghrex("rex",
SV(RexCount),
SA(RexChan),
SA(RexList),
@ -200,7 +200,7 @@ void FuncRex(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqRex] + ActionSeq[nAction].a, RexList[nRex].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqRex] + RexSeq[nAction].a, RexList[nRex].nFrame, RexSeq[nAction].b);
return;
}
@ -208,7 +208,7 @@ void FuncRex(int a, int nDamage, int nRun)
{
Gravity(nSprite);
int nSeq = SeqOffsets[kSeqRex] + ActionSeq[nAction].a;
int nSeq = SeqOffsets[kSeqRex] + RexSeq[nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, RexList[nRex].nFrame);

View file

@ -28,7 +28,7 @@ BEGIN_PS_NS
int16_t RoachCount = -1;
static actionSeq ActionSeq[] = {
static actionSeq RoachSeq[] = {
{24, 0},
{0, 0},
{0, 0},
@ -52,7 +52,7 @@ struct Roach
Roach RoachList[kMaxRoach];
static SavegameHelper sgh("roach",
static SavegameHelper sghroach("roach",
SV(RoachCount),
SA(RoachList),
nullptr);
@ -161,7 +161,7 @@ void FuncRoach(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, ActionSeq[nAction].a + SeqOffsets[kSeqRoach], RoachList[nRoach].field_2, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, RoachSeq[nAction].a + SeqOffsets[kSeqRoach], RoachList[nRoach].field_2, RoachSeq[nAction].b);
return;
}
@ -231,7 +231,7 @@ void FuncRoach(int a, int nDamage, int nRun)
{
Gravity(nSprite);
int nSeq = SeqOffsets[kSeqRoach] + ActionSeq[RoachList[nRoach].nAction].a;
int nSeq = SeqOffsets[kSeqRoach] + RoachSeq[RoachList[nRoach].nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, RoachList[nRoach].field_2);
seq_MoveSequence(nSprite, nSeq, RoachList[nRoach].field_2);

View file

@ -1667,7 +1667,7 @@ void runlist_DamageEnemy(int nSprite, int nSprite2, short nDamage)
}
}
static SavegameHelper sgh("runlist",
static SavegameHelper sghrunlist("runlist",
SV(RunCount),
SV(nRadialSpr),
SV(nStackCount),

View file

@ -49,7 +49,7 @@ struct Scorpion
Scorpion scorpion[kMaxScorpions];
short ScorpChan[kMaxScorpions];
static actionSeq ActionSeq[] = {
static actionSeq ScorpSeq[] = {
{0, 0},
{8, 0},
{29, 0},
@ -62,7 +62,7 @@ static actionSeq ActionSeq[] = {
{53, 1}
};
static SavegameHelper sgh("scorp",
static SavegameHelper sghscorp("scorp",
SV(ScorpCount),
SA(scorpion),
SA(ScorpChan),
@ -162,7 +162,7 @@ void FuncScorp(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqScorp] + ActionSeq[nAction].a, scorpion[nScorp].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqScorp] + ScorpSeq[nAction].a, scorpion[nScorp].nFrame, ScorpSeq[nAction].b);
return;
}
@ -234,7 +234,7 @@ void FuncScorp(int a, int nDamage, int nRun)
Gravity(nSprite);
}
int nSeq = SeqOffsets[kSeqScorp] + ActionSeq[nAction].a;
int nSeq = SeqOffsets[kSeqScorp] + ScorpSeq[nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, scorpion[nScorp].nFrame);
seq_MoveSequence(nSprite, nSeq, scorpion[nScorp].nFrame);

View file

@ -632,7 +632,7 @@ int seq_PlotSequence(short nSprite, short edx, short nFrame, short ecx)
return nPict;
}
static SavegameHelper sgh("sequence",
static SavegameHelper sghseq("sequence",
SV(nPilotLightFrame),
SV(nPilotLightCount),
SV(nPilotLightBase),

View file

@ -28,7 +28,7 @@ BEGIN_PS_NS
short SetCount = 0;
static actionSeq ActionSeq[] = {
static actionSeq SetSeq[] = {
{0, 0},
{77, 1},
{78, 1},
@ -59,7 +59,7 @@ struct Set
Set SetList[kMaxSets];
short SetChan[kMaxSets];
static SavegameHelper sgh("set",
static SavegameHelper sghset("set",
SV(SetCount),
SA(SetList),
SA(SetChan),
@ -291,7 +291,7 @@ void FuncSet(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a, SeqOffsets[kSeqSet] + ActionSeq[nAction].a, SetList[nSet].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a, SeqOffsets[kSeqSet] + SetSeq[nAction].a, SetList[nSet].nFrame, SetSeq[nAction].b);
return;
}
@ -299,7 +299,7 @@ void FuncSet(int a, int nDamage, int nRun)
{
Gravity(nSprite);
short nSeq = SeqOffsets[kSeqSet] + ActionSeq[SetList[nSet].nAction].a;
short nSeq = SeqOffsets[kSeqSet] + SetSeq[SetList[nSet].nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, SetList[nSet].nFrame);
seq_MoveSequence(nSprite, nSeq, SetList[nSet].nFrame);

View file

@ -40,7 +40,7 @@ short nPlayerSnake[kMaxPlayers];
Snake SnakeList[kMaxSnakes];
short nSnakePlayer[kMaxSnakes];
static SavegameHelper sgh("snake",
static SavegameHelper sghsnake("snake",
SV(nSnakeCount),
SV(nSnakesFree),
SA(SnakeFree),

View file

@ -41,7 +41,7 @@ struct Spider
Spider SpiderList[kMaxSpiders];
static actionSeq ActionSeq[] = {
static actionSeq SpiderSeq[] = {
{16, 0},
{8, 0},
{32, 0},
@ -51,7 +51,7 @@ static actionSeq ActionSeq[] = {
{41, 1}
};
static SavegameHelper sgh("spider",
static SavegameHelper sghspider("spider",
SV(SpiderCount),
SA(SpiderList),
nullptr);
@ -156,7 +156,7 @@ void FuncSpider(int a, int nDamage, int nRun)
}
}
int nSeq = SeqOffsets[kSeqSpider] + ActionSeq[nAction].a;
int nSeq = SeqOffsets[kSeqSpider] + SpiderSeq[nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, SpiderList[nSpider].nFrame);
@ -384,7 +384,7 @@ void FuncSpider(int a, int nDamage, int nRun)
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqSpider] + ActionSeq[nAction].a, SpiderList[nSpider].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqSpider] + SpiderSeq[nAction].a, SpiderList[nSpider].nFrame, SpiderSeq[nAction].b);
break;
}

View file

@ -55,7 +55,7 @@ short nHealthFrame;
short nMagicFrame;
short nMaskY;
static short nAnimsFree = 0;
static short nStatusFree = 0;
short statusmask[MAXXDIM];
@ -145,7 +145,7 @@ void InitStatus()
nLastAnim = -1;
nFirstAnim = -1;
nItemSeq = -1;
nAnimsFree = kMaxStatusAnims;
nStatusFree = kMaxStatusAnims;
statusx = xdim - 320;
statusy = ydim - 200;
}
@ -162,13 +162,13 @@ int BuildStatusAnim(int val, int nFlags)
}
}
if (nAnimsFree <= 0) {
if (nStatusFree <= 0) {
return -1;
}
nAnimsFree--;
nStatusFree--;
uint8_t nStatusAnim = StatusAnimsFree[nAnimsFree];
uint8_t nStatusAnim = StatusAnimsFree[nStatusFree];
StatusAnim[nStatusAnim].nPrevAnim = -1;
StatusAnim[nStatusAnim].nNextAnim = nLastAnim;
@ -262,8 +262,8 @@ void DestroyStatusAnim(short nAnim)
nLastAnim = nNext;
}
StatusAnimsFree[nAnimsFree] = (uint8_t)nAnim;
nAnimsFree++;
StatusAnimsFree[nStatusFree] = (uint8_t)nAnim;
nStatusFree++;
}
void SetMagicFrame()
@ -1004,9 +1004,9 @@ void DrawStatusBar()
// I'm not sure this really needs to be saved.
static SavegameHelper sgh("status",
static SavegameHelper sghstatus("status",
SV(nMaskY),
SV(nAnimsFree),
SV(nStatusFree),
SV(magicperline),
SV(airperline),
SV(healthperline),

View file

@ -49,7 +49,7 @@ struct Switch
Switch SwitchData[kMaxSwitches];
static SavegameHelper sgh("switch",
static SavegameHelper sghswitch("switch",
SV(LinkCount),
SV(SwitchCount),
SA(LinkMap),

View file

@ -516,7 +516,7 @@ void Clip()
}
static SavegameHelper sgh("view",
static SavegameHelper sghview("view",
SV(nCamerax),
SV(nCameray),
SV(nCameraz),

View file

@ -26,7 +26,7 @@ BEGIN_PS_NS
#define kMaxWasps 100
static short nVelShift = 0;
static short nWaspVelShift = 0;
short nWaspCount;
struct Wasp
@ -47,7 +47,7 @@ struct Wasp
Wasp WaspList[kMaxWasps];
static actionSeq ActionSeq[] = {
static actionSeq WaspSeq[] = {
{0, 0},
{0, 0},
{9, 0},
@ -57,8 +57,8 @@ static actionSeq ActionSeq[] = {
{29, 1}
};
static SavegameHelper sgh("wasp",
SV(nVelShift),
static SavegameHelper sghwasp("wasp",
SV(nWaspVelShift),
SV(nWaspCount),
SA(WaspList),
nullptr);
@ -71,15 +71,15 @@ void InitWasps()
void SetWaspVel(short nSprite)
{
if (nVelShift < 0)
if (nWaspVelShift < 0)
{
sprite[nSprite].xvel = Cos(sprite[nSprite].ang) << -nVelShift;
sprite[nSprite].yvel = Sin(sprite[nSprite].ang) << -nVelShift;
sprite[nSprite].xvel = Cos(sprite[nSprite].ang) << -nWaspVelShift;
sprite[nSprite].yvel = Sin(sprite[nSprite].ang) << -nWaspVelShift;
}
else
{
sprite[nSprite].xvel = Cos(sprite[nSprite].ang) >> nVelShift;
sprite[nSprite].yvel = Sin(sprite[nSprite].ang) >> nVelShift;
sprite[nSprite].xvel = Cos(sprite[nSprite].ang) >> nWaspVelShift;
sprite[nSprite].yvel = Sin(sprite[nSprite].ang) >> nWaspVelShift;
}
}
@ -187,7 +187,7 @@ void FuncWasp(int a, int nDamage, int nRun)
{
case 0x90000:
{
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqWasp] + ActionSeq[nAction].a, WaspList[nWasp].nFrame, ActionSeq[nAction].b);
seq_PlotSequence(a & 0xFFFF, SeqOffsets[kSeqWasp] + WaspSeq[nAction].a, WaspList[nWasp].nFrame, WaspSeq[nAction].b);
return;
}
@ -230,7 +230,7 @@ void FuncWasp(int a, int nDamage, int nRun)
else
{
// Wasp is dead
nVelShift = 0;
nWaspVelShift = 0;
WaspList[nWasp].nAction = 4;
WaspList[nWasp].nFrame = 0;
@ -250,7 +250,7 @@ void FuncWasp(int a, int nDamage, int nRun)
case 0x20000:
{
short nSeq = SeqOffsets[kSeqWasp] + ActionSeq[nAction].a;
short nSeq = SeqOffsets[kSeqWasp] + WaspSeq[nAction].a;
sprite[nSprite].picnum = seq_GetSeqPicnum2(nSeq, WaspList[nWasp].nFrame);