- renamed team variables to something meaningful.

This commit is contained in:
Christoph Oelckers 2020-11-22 13:16:58 +01:00
parent 4950a5e963
commit 0c6318aed9
4 changed files with 25 additions and 25 deletions

View file

@ -342,9 +342,9 @@ void GameInterface::Ticker()
for (int i = 0; i < 8; i++)
{
dword_21EFD0[i] = dword_21EFD0[i] -= 4;
if (dword_21EFD0[i] < 0)
dword_21EFD0[i] = 0;
team_ticker[i] = team_ticker[i] -= 4;
if (team_ticker[i] < 0)
team_ticker[i] = 0;
}
if ((gGameOptions.uGameFlags & GF_AdvanceLevel) != 0)

View file

@ -864,8 +864,8 @@ void playerReset(PLAYER *pPlayer)
}
int dword_21EFB0[8];
int dword_21EFD0[8];
int team_score[8];
int team_ticker[8];
void playerInit(int nPlayer, unsigned int a2)
{
@ -877,8 +877,8 @@ void playerInit(int nPlayer, unsigned int a2)
if (gGameOptions.nGameType == 3)
pPlayer->teamId = nPlayer&1;
pPlayer->fragCount = 0;
memset(dword_21EFB0, 0, sizeof(dword_21EFB0));
memset(dword_21EFD0, 0, sizeof(dword_21EFD0));
memset(team_score, 0, sizeof(team_score));
memset(team_ticker, 0, sizeof(team_ticker));
memset(pPlayer->fragInfo, 0, sizeof(pPlayer->fragInfo));
if (!(a2&1))
@ -962,8 +962,8 @@ char PickupItem(PLAYER *pPlayer, spritetype *pItem) {
if ((pPlayer->hasFlag & 2) != 0 && pXItem->state) {
pPlayer->hasFlag &= ~2;
pPlayer->used2[1] = -1;
dword_21EFB0[pPlayer->teamId] += 10;
dword_21EFD0[pPlayer->teamId] += 240;
team_score[pPlayer->teamId] += 10;
team_ticker[pPlayer->teamId] += 240;
evSend(0, 0, 81, kCmdOn);
sprintf(buffer, "%s captured Red Flag!", gProfile[pPlayer->nPlayer].name);
sndStartSample(8001, 255, 2, 0);
@ -999,8 +999,8 @@ char PickupItem(PLAYER *pPlayer, spritetype *pItem) {
{
pPlayer->hasFlag &= ~1;
pPlayer->used2[0] = -1;
dword_21EFB0[pPlayer->teamId] += 10;
dword_21EFD0[pPlayer->teamId] += 240;
team_score[pPlayer->teamId] += 10;
team_ticker[pPlayer->teamId] += 240;
evSend(0, 0, 80, kCmdOn);
sprintf(buffer, "%s captured Blue Flag!", gProfile[pPlayer->nPlayer].name);
sndStartSample(8000, 255, 2, 0);
@ -1803,7 +1803,7 @@ void playerFrag(PLAYER *pKiller, PLAYER *pVictim)
pVictim->fragInfo[nVictim]--;
}
if (gGameOptions.nGameType == 3)
dword_21EFB0[pVictim->teamId]--;
team_score[pVictim->teamId]--;
int nMessage = Random(5);
int nSound = gSuicide[nMessage].Kills;
if (pVictim == gMe && gMe->handTime <= 0)
@ -1827,11 +1827,11 @@ void playerFrag(PLAYER *pKiller, PLAYER *pVictim)
if (gGameOptions.nGameType == 3)
{
if (pKiller->teamId == pVictim->teamId)
dword_21EFB0[pKiller->teamId]--;
team_score[pKiller->teamId]--;
else
{
dword_21EFB0[pKiller->teamId]++;
dword_21EFD0[pKiller->teamId]+=120;
team_score[pKiller->teamId]++;
team_ticker[pKiller->teamId]+=120;
}
}
int nMessage = Random(25);
@ -2173,7 +2173,7 @@ public:
void PlayerLoadSave::Load(void)
{
Read(dword_21EFB0, sizeof(dword_21EFB0));
Read(team_score, sizeof(team_score));
Read(&gNetPlayers, sizeof(gNetPlayers));
Read(&gProfile, sizeof(gProfile));
Read(&gPlayer, sizeof(gPlayer));
@ -2207,7 +2207,7 @@ void PlayerLoadSave::Load(void)
void PlayerLoadSave::Save(void)
{
Write(dword_21EFB0, sizeof(dword_21EFB0));
Write(team_score, sizeof(team_score));
Write(&gNetPlayers, sizeof(gNetPlayers));
Write(&gProfile, sizeof(gProfile));
Write(&gPlayer, sizeof(gPlayer));

View file

@ -215,8 +215,8 @@ extern bool gRedFlagDropped;
extern PROFILE gProfile[kMaxPlayers];
extern int dword_21EFB0[kMaxPlayers];
extern int dword_21EFD0[kMaxPlayers];
extern int team_score[kMaxPlayers];
extern int team_ticker[kMaxPlayers];
extern AMMOINFO gAmmoInfo[];
extern POWERUPINFO gPowerUpInfo[kMaxPowerUps];

View file

@ -488,17 +488,17 @@ private:
{
FString gTempStr;
int x = 1, y = 1;
if (dword_21EFD0[0] == 0 || (gFrameClock & 8))
if (team_ticker[0] == 0 || (gFrameClock & 8))
{
SBar_DrawString(this, smallf, GStrings("TXT_COLOR_BLUE"), x, y, 0, CR_LIGHTBLUE, 1., -1, -1, 1, 1);
gTempStr.Format("%-3d", dword_21EFB0[0]);
gTempStr.Format("%-3d", team_score[0]);
SBar_DrawString(this, smallf, gTempStr, x, y + 10, 0, CR_LIGHTBLUE, 1., -1, -1, 1, 1);
}
x = -2;
if (dword_21EFD0[1] == 0 || (gFrameClock & 8))
if (team_ticker[1] == 0 || (gFrameClock & 8))
{
SBar_DrawString(this, smallf, GStrings("TXT_COLOR_RED"), x, y, DI_TEXT_ALIGN_RIGHT, CR_BRICK, 1., -1, -1, 1, 1);
gTempStr.Format("%3d", dword_21EFB0[1]);
gTempStr.Format("%3d", team_score[1]);
SBar_DrawString(this, smallf, gTempStr, x, y + 10, DI_TEXT_ALIGN_RIGHT, CR_BRICK, 1., -1, -1, 1, 1);
}
}
@ -513,10 +513,10 @@ private:
{
assert(0 == team || 1 == team); // 0: blue, 1: red
if (dword_21EFD0[team] == 0 || (gFrameClock & 8))
if (team_ticker[team] == 0 || (gFrameClock & 8))
{
if (show)
DrawStatNumber("%d", dword_21EFB0[team], kSBarNumberInv, -30, team ? 25 : -10, 0, team ? 2 : 10, 512, 65536 * 0.75, DI_SCREEN_RIGHT_CENTER);
DrawStatNumber("%d", team_score[team], kSBarNumberInv, -30, team ? 25 : -10, 0, team ? 2 : 10, 512, 65536 * 0.75, DI_SCREEN_RIGHT_CENTER);
}
}