mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 20:40:47 +00:00
- renamed team variables to something meaningful.
This commit is contained in:
parent
4950a5e963
commit
0c6318aed9
4 changed files with 25 additions and 25 deletions
|
@ -342,9 +342,9 @@ void GameInterface::Ticker()
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
{
|
{
|
||||||
dword_21EFD0[i] = dword_21EFD0[i] -= 4;
|
team_ticker[i] = team_ticker[i] -= 4;
|
||||||
if (dword_21EFD0[i] < 0)
|
if (team_ticker[i] < 0)
|
||||||
dword_21EFD0[i] = 0;
|
team_ticker[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gGameOptions.uGameFlags & GF_AdvanceLevel) != 0)
|
if ((gGameOptions.uGameFlags & GF_AdvanceLevel) != 0)
|
||||||
|
|
|
@ -864,8 +864,8 @@ void playerReset(PLAYER *pPlayer)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int dword_21EFB0[8];
|
int team_score[8];
|
||||||
int dword_21EFD0[8];
|
int team_ticker[8];
|
||||||
|
|
||||||
void playerInit(int nPlayer, unsigned int a2)
|
void playerInit(int nPlayer, unsigned int a2)
|
||||||
{
|
{
|
||||||
|
@ -877,8 +877,8 @@ void playerInit(int nPlayer, unsigned int a2)
|
||||||
if (gGameOptions.nGameType == 3)
|
if (gGameOptions.nGameType == 3)
|
||||||
pPlayer->teamId = nPlayer&1;
|
pPlayer->teamId = nPlayer&1;
|
||||||
pPlayer->fragCount = 0;
|
pPlayer->fragCount = 0;
|
||||||
memset(dword_21EFB0, 0, sizeof(dword_21EFB0));
|
memset(team_score, 0, sizeof(team_score));
|
||||||
memset(dword_21EFD0, 0, sizeof(dword_21EFD0));
|
memset(team_ticker, 0, sizeof(team_ticker));
|
||||||
memset(pPlayer->fragInfo, 0, sizeof(pPlayer->fragInfo));
|
memset(pPlayer->fragInfo, 0, sizeof(pPlayer->fragInfo));
|
||||||
|
|
||||||
if (!(a2&1))
|
if (!(a2&1))
|
||||||
|
@ -962,8 +962,8 @@ char PickupItem(PLAYER *pPlayer, spritetype *pItem) {
|
||||||
if ((pPlayer->hasFlag & 2) != 0 && pXItem->state) {
|
if ((pPlayer->hasFlag & 2) != 0 && pXItem->state) {
|
||||||
pPlayer->hasFlag &= ~2;
|
pPlayer->hasFlag &= ~2;
|
||||||
pPlayer->used2[1] = -1;
|
pPlayer->used2[1] = -1;
|
||||||
dword_21EFB0[pPlayer->teamId] += 10;
|
team_score[pPlayer->teamId] += 10;
|
||||||
dword_21EFD0[pPlayer->teamId] += 240;
|
team_ticker[pPlayer->teamId] += 240;
|
||||||
evSend(0, 0, 81, kCmdOn);
|
evSend(0, 0, 81, kCmdOn);
|
||||||
sprintf(buffer, "%s captured Red Flag!", gProfile[pPlayer->nPlayer].name);
|
sprintf(buffer, "%s captured Red Flag!", gProfile[pPlayer->nPlayer].name);
|
||||||
sndStartSample(8001, 255, 2, 0);
|
sndStartSample(8001, 255, 2, 0);
|
||||||
|
@ -999,8 +999,8 @@ char PickupItem(PLAYER *pPlayer, spritetype *pItem) {
|
||||||
{
|
{
|
||||||
pPlayer->hasFlag &= ~1;
|
pPlayer->hasFlag &= ~1;
|
||||||
pPlayer->used2[0] = -1;
|
pPlayer->used2[0] = -1;
|
||||||
dword_21EFB0[pPlayer->teamId] += 10;
|
team_score[pPlayer->teamId] += 10;
|
||||||
dword_21EFD0[pPlayer->teamId] += 240;
|
team_ticker[pPlayer->teamId] += 240;
|
||||||
evSend(0, 0, 80, kCmdOn);
|
evSend(0, 0, 80, kCmdOn);
|
||||||
sprintf(buffer, "%s captured Blue Flag!", gProfile[pPlayer->nPlayer].name);
|
sprintf(buffer, "%s captured Blue Flag!", gProfile[pPlayer->nPlayer].name);
|
||||||
sndStartSample(8000, 255, 2, 0);
|
sndStartSample(8000, 255, 2, 0);
|
||||||
|
@ -1803,7 +1803,7 @@ void playerFrag(PLAYER *pKiller, PLAYER *pVictim)
|
||||||
pVictim->fragInfo[nVictim]--;
|
pVictim->fragInfo[nVictim]--;
|
||||||
}
|
}
|
||||||
if (gGameOptions.nGameType == 3)
|
if (gGameOptions.nGameType == 3)
|
||||||
dword_21EFB0[pVictim->teamId]--;
|
team_score[pVictim->teamId]--;
|
||||||
int nMessage = Random(5);
|
int nMessage = Random(5);
|
||||||
int nSound = gSuicide[nMessage].Kills;
|
int nSound = gSuicide[nMessage].Kills;
|
||||||
if (pVictim == gMe && gMe->handTime <= 0)
|
if (pVictim == gMe && gMe->handTime <= 0)
|
||||||
|
@ -1827,11 +1827,11 @@ void playerFrag(PLAYER *pKiller, PLAYER *pVictim)
|
||||||
if (gGameOptions.nGameType == 3)
|
if (gGameOptions.nGameType == 3)
|
||||||
{
|
{
|
||||||
if (pKiller->teamId == pVictim->teamId)
|
if (pKiller->teamId == pVictim->teamId)
|
||||||
dword_21EFB0[pKiller->teamId]--;
|
team_score[pKiller->teamId]--;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dword_21EFB0[pKiller->teamId]++;
|
team_score[pKiller->teamId]++;
|
||||||
dword_21EFD0[pKiller->teamId]+=120;
|
team_ticker[pKiller->teamId]+=120;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int nMessage = Random(25);
|
int nMessage = Random(25);
|
||||||
|
@ -2173,7 +2173,7 @@ public:
|
||||||
void PlayerLoadSave::Load(void)
|
void PlayerLoadSave::Load(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
Read(dword_21EFB0, sizeof(dword_21EFB0));
|
Read(team_score, sizeof(team_score));
|
||||||
Read(&gNetPlayers, sizeof(gNetPlayers));
|
Read(&gNetPlayers, sizeof(gNetPlayers));
|
||||||
Read(&gProfile, sizeof(gProfile));
|
Read(&gProfile, sizeof(gProfile));
|
||||||
Read(&gPlayer, sizeof(gPlayer));
|
Read(&gPlayer, sizeof(gPlayer));
|
||||||
|
@ -2207,7 +2207,7 @@ void PlayerLoadSave::Load(void)
|
||||||
|
|
||||||
void PlayerLoadSave::Save(void)
|
void PlayerLoadSave::Save(void)
|
||||||
{
|
{
|
||||||
Write(dword_21EFB0, sizeof(dword_21EFB0));
|
Write(team_score, sizeof(team_score));
|
||||||
Write(&gNetPlayers, sizeof(gNetPlayers));
|
Write(&gNetPlayers, sizeof(gNetPlayers));
|
||||||
Write(&gProfile, sizeof(gProfile));
|
Write(&gProfile, sizeof(gProfile));
|
||||||
Write(&gPlayer, sizeof(gPlayer));
|
Write(&gPlayer, sizeof(gPlayer));
|
||||||
|
|
|
@ -215,8 +215,8 @@ extern bool gRedFlagDropped;
|
||||||
|
|
||||||
extern PROFILE gProfile[kMaxPlayers];
|
extern PROFILE gProfile[kMaxPlayers];
|
||||||
|
|
||||||
extern int dword_21EFB0[kMaxPlayers];
|
extern int team_score[kMaxPlayers];
|
||||||
extern int dword_21EFD0[kMaxPlayers];
|
extern int team_ticker[kMaxPlayers];
|
||||||
extern AMMOINFO gAmmoInfo[];
|
extern AMMOINFO gAmmoInfo[];
|
||||||
extern POWERUPINFO gPowerUpInfo[kMaxPowerUps];
|
extern POWERUPINFO gPowerUpInfo[kMaxPowerUps];
|
||||||
|
|
||||||
|
|
|
@ -488,17 +488,17 @@ private:
|
||||||
{
|
{
|
||||||
FString gTempStr;
|
FString gTempStr;
|
||||||
int x = 1, y = 1;
|
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);
|
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);
|
SBar_DrawString(this, smallf, gTempStr, x, y + 10, 0, CR_LIGHTBLUE, 1., -1, -1, 1, 1);
|
||||||
}
|
}
|
||||||
x = -2;
|
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);
|
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);
|
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
|
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)
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue