diff --git a/source/exhumed/src/anims.cpp b/source/exhumed/src/anims.cpp index 63d23fe5a..cde6124eb 100644 --- a/source/exhumed/src/anims.cpp +++ b/source/exhumed/src/anims.cpp @@ -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), diff --git a/source/exhumed/src/anubis.cpp b/source/exhumed/src/anubis.cpp index 57f4fbc05..13339edc0 100644 --- a/source/exhumed/src/anubis.cpp +++ b/source/exhumed/src/anubis.cpp @@ -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; } diff --git a/source/exhumed/src/bubbles.cpp b/source/exhumed/src/bubbles.cpp index 8beff3300..2dd9c97c4 100644 --- a/source/exhumed/src/bubbles.cpp +++ b/source/exhumed/src/bubbles.cpp @@ -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), diff --git a/source/exhumed/src/bullet.cpp b/source/exhumed/src/bullet.cpp index 6f050131c..d7e1cd82f 100644 --- a/source/exhumed/src/bullet.cpp +++ b/source/exhumed/src/bullet.cpp @@ -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), diff --git a/source/exhumed/src/exhumed.cpp b/source/exhumed/src/exhumed.cpp index a7c81e1e5..7f4edd710 100644 --- a/source/exhumed/src/exhumed.cpp +++ b/source/exhumed/src/exhumed.cpp @@ -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), diff --git a/source/exhumed/src/fish.cpp b/source/exhumed/src/fish.cpp index 9323f4793..0624d8024 100644 --- a/source/exhumed/src/fish.cpp +++ b/source/exhumed/src/fish.cpp @@ -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); diff --git a/source/exhumed/src/grenade.cpp b/source/exhumed/src/grenade.cpp index a1e2f4606..8a8eca936 100644 --- a/source/exhumed/src/grenade.cpp +++ b/source/exhumed/src/grenade.cpp @@ -48,7 +48,7 @@ struct Grenade Grenade GrenadeList[kMaxGrenades]; -static SavegameHelper sgh("grenade", +static SavegameHelper sghgrenade("grenade", SV(nGrenadeCount), SV(nGrenadesFree), SA(GrenadeFree), diff --git a/source/exhumed/src/gun.cpp b/source/exhumed/src/gun.cpp index c6afa4fb8..a662b4225 100644 --- a/source/exhumed/src/gun.cpp +++ b/source/exhumed/src/gun.cpp @@ -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); diff --git a/source/exhumed/src/init.cpp b/source/exhumed/src/init.cpp index cc5f1e090..75020af58 100644 --- a/source/exhumed/src/init.cpp +++ b/source/exhumed/src/init.cpp @@ -910,7 +910,7 @@ void LoadObjects() } -static SavegameHelper sgh("init", +static SavegameHelper sghinit("init", SV(initx), SV(inity), SV(initz), diff --git a/source/exhumed/src/items.cpp b/source/exhumed/src/items.cpp index 1916ea78b..34fc84910 100644 --- a/source/exhumed/src/items.cpp +++ b/source/exhumed/src/items.cpp @@ -109,7 +109,7 @@ short nRegenerates; short nFirstRegenerate; short nMagicCount; -static SavegameHelper sgh("items", +static SavegameHelper sghitems("items", SV(nRegenerates), SV(nFirstRegenerate), SV(nMagicCount), diff --git a/source/exhumed/src/lavadude.cpp b/source/exhumed/src/lavadude.cpp index 28bcfdb47..e60e10a93 100644 --- a/source/exhumed/src/lavadude.cpp +++ b/source/exhumed/src/lavadude.cpp @@ -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; } diff --git a/source/exhumed/src/lighting.cpp b/source/exhumed/src/lighting.cpp index 608010306..45b33e4d4 100644 --- a/source/exhumed/src/lighting.cpp +++ b/source/exhumed/src/lighting.cpp @@ -88,7 +88,7 @@ int bDoFlicks = 0; int bDoGlows = 0; -static SavegameHelper sgh("lightning", +static SavegameHelper sghlighnting("lightning", SA(sFlash), SA(sGlow), SA(nNextFlash), diff --git a/source/exhumed/src/lion.cpp b/source/exhumed/src/lion.cpp index 554816fbd..ace647f38 100644 --- a/source/exhumed/src/lion.cpp +++ b/source/exhumed/src/lion.cpp @@ -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); diff --git a/source/exhumed/src/menu.cpp b/source/exhumed/src/menu.cpp index 87cf68608..140087c71 100644 --- a/source/exhumed/src/menu.cpp +++ b/source/exhumed/src/menu.cpp @@ -238,7 +238,7 @@ void DoEnergyTile() } } -static SavegameHelper sgh("menu", +static SavegameHelper sghmenu("menu", SA(nCinemaSeen), SA(energytile), SV(nButtonColor), diff --git a/source/exhumed/src/move.cpp b/source/exhumed/src/move.cpp index a25192a1a..72d36cc27 100644 --- a/source/exhumed/src/move.cpp +++ b/source/exhumed/src/move.cpp @@ -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; diff --git a/source/exhumed/src/mummy.cpp b/source/exhumed/src/mummy.cpp index 0dfd2889a..4c77a67d5 100644 --- a/source/exhumed/src/mummy.cpp +++ b/source/exhumed/src/mummy.cpp @@ -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; } diff --git a/source/exhumed/src/object.cpp b/source/exhumed/src/object.cpp index b058f1b71..264512de6 100644 --- a/source/exhumed/src/object.cpp +++ b/source/exhumed/src/object.cpp @@ -2665,7 +2665,7 @@ void PostProcess() } -static SavegameHelper sgh("objects", +static SavegameHelper sghobj("objects", SA(sTrap), SA(sBob), SA(sTrail), diff --git a/source/exhumed/src/player.cpp b/source/exhumed/src/player.cpp index 6672b12d1..2773caca1 100644 --- a/source/exhumed/src/player.cpp +++ b/source/exhumed/src/player.cpp @@ -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), diff --git a/source/exhumed/src/queen.cpp b/source/exhumed/src/queen.cpp index 1fe66da8f..c896044a2 100644 --- a/source/exhumed/src/queen.cpp +++ b/source/exhumed/src/queen.cpp @@ -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; } } diff --git a/source/exhumed/src/ra.cpp b/source/exhumed/src/ra.cpp index 9d6d2af3e..e570a2290 100644 --- a/source/exhumed/src/ra.cpp +++ b/source/exhumed/src/ra.cpp @@ -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; diff --git a/source/exhumed/src/ramses.cpp b/source/exhumed/src/ramses.cpp index 11221b87b..13fa68772 100644 --- a/source/exhumed/src/ramses.cpp +++ b/source/exhumed/src/ramses.cpp @@ -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), diff --git a/source/exhumed/src/random.cpp b/source/exhumed/src/random.cpp index a1939199c..4b0295a46 100644 --- a/source/exhumed/src/random.cpp +++ b/source/exhumed/src/random.cpp @@ -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), diff --git a/source/exhumed/src/rat.cpp b/source/exhumed/src/rat.cpp index 3bcac8886..f12737186 100644 --- a/source/exhumed/src/rat.cpp +++ b/source/exhumed/src/rat.cpp @@ -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); diff --git a/source/exhumed/src/rex.cpp b/source/exhumed/src/rex.cpp index 984835e19..ff5982f12 100644 --- a/source/exhumed/src/rex.cpp +++ b/source/exhumed/src/rex.cpp @@ -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); diff --git a/source/exhumed/src/roach.cpp b/source/exhumed/src/roach.cpp index f1210770a..5fe655683 100644 --- a/source/exhumed/src/roach.cpp +++ b/source/exhumed/src/roach.cpp @@ -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); diff --git a/source/exhumed/src/runlist.cpp b/source/exhumed/src/runlist.cpp index 0be1a8222..2fdb20557 100644 --- a/source/exhumed/src/runlist.cpp +++ b/source/exhumed/src/runlist.cpp @@ -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), diff --git a/source/exhumed/src/scorp.cpp b/source/exhumed/src/scorp.cpp index 745e9261d..e081733ee 100644 --- a/source/exhumed/src/scorp.cpp +++ b/source/exhumed/src/scorp.cpp @@ -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); diff --git a/source/exhumed/src/sequence.cpp b/source/exhumed/src/sequence.cpp index 5c795ed23..2345df6a9 100644 --- a/source/exhumed/src/sequence.cpp +++ b/source/exhumed/src/sequence.cpp @@ -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), diff --git a/source/exhumed/src/set.cpp b/source/exhumed/src/set.cpp index 2250e43fc..7d4f48a94 100644 --- a/source/exhumed/src/set.cpp +++ b/source/exhumed/src/set.cpp @@ -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); diff --git a/source/exhumed/src/snake.cpp b/source/exhumed/src/snake.cpp index d3eaae52a..2e8afceb8 100644 --- a/source/exhumed/src/snake.cpp +++ b/source/exhumed/src/snake.cpp @@ -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), diff --git a/source/exhumed/src/spider.cpp b/source/exhumed/src/spider.cpp index 44d38b7f7..a346ea7fa 100644 --- a/source/exhumed/src/spider.cpp +++ b/source/exhumed/src/spider.cpp @@ -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; } diff --git a/source/exhumed/src/status.cpp b/source/exhumed/src/status.cpp index ac09e01d2..3e145b754 100644 --- a/source/exhumed/src/status.cpp +++ b/source/exhumed/src/status.cpp @@ -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), diff --git a/source/exhumed/src/switch.cpp b/source/exhumed/src/switch.cpp index c0a2b947d..818b60880 100644 --- a/source/exhumed/src/switch.cpp +++ b/source/exhumed/src/switch.cpp @@ -49,7 +49,7 @@ struct Switch Switch SwitchData[kMaxSwitches]; -static SavegameHelper sgh("switch", +static SavegameHelper sghswitch("switch", SV(LinkCount), SV(SwitchCount), SA(LinkMap), diff --git a/source/exhumed/src/view.cpp b/source/exhumed/src/view.cpp index 0956c3b10..0c0f2da2b 100644 --- a/source/exhumed/src/view.cpp +++ b/source/exhumed/src/view.cpp @@ -516,7 +516,7 @@ void Clip() } -static SavegameHelper sgh("view", +static SavegameHelper sghview("view", SV(nCamerax), SV(nCameray), SV(nCameraz), diff --git a/source/exhumed/src/wasp.cpp b/source/exhumed/src/wasp.cpp index ab0a1ea66..0eae08078 100644 --- a/source/exhumed/src/wasp.cpp +++ b/source/exhumed/src/wasp.cpp @@ -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);