mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- const-ified some static arrays.
# Conflicts: # source/games/blood/src/nnexts.cpp
This commit is contained in:
parent
3ea4c94266
commit
895ecc81bc
2 changed files with 14 additions and 14 deletions
|
@ -76,7 +76,7 @@ short gTrackingCondsCount;
|
|||
|
||||
std::default_random_engine gStdRandom;
|
||||
|
||||
VECTORINFO_EXTRA gVectorInfoExtra[] = {
|
||||
const VECTORINFO_EXTRA gVectorInfoExtra[] = {
|
||||
1207,1207, 1001,1001, 4001,4002,
|
||||
431,431, 1002,1002, 359,359,
|
||||
521,521, 513,513, 499,499,
|
||||
|
@ -87,7 +87,7 @@ VECTORINFO_EXTRA gVectorInfoExtra[] = {
|
|||
0,0, 357,499
|
||||
};
|
||||
|
||||
MISSILEINFO_EXTRA gMissileInfoExtra[] = {
|
||||
const MISSILEINFO_EXTRA gMissileInfoExtra[] = {
|
||||
1207, 1207, false, false, false, false, false, true, false, true,
|
||||
420, 420, false, true, true, false, false, false, false, true,
|
||||
471, 471, false, false, false, false, false, false, true, false,
|
||||
|
@ -108,7 +108,7 @@ MISSILEINFO_EXTRA gMissileInfoExtra[] = {
|
|||
520, 520, false, false, false, false, false, true, false, true,
|
||||
};
|
||||
|
||||
THINGINFO_EXTRA gThingInfoExtra[] = {
|
||||
const THINGINFO_EXTRA gThingInfoExtra[] = {
|
||||
true, true, true, false, false,
|
||||
false, false, false, false, false,
|
||||
false, false, false, false, false,
|
||||
|
@ -119,7 +119,7 @@ THINGINFO_EXTRA gThingInfoExtra[] = {
|
|||
true,
|
||||
};
|
||||
|
||||
DUDEINFO_EXTRA gDudeInfoExtra[] = {
|
||||
const DUDEINFO_EXTRA gDudeInfoExtra[] = {
|
||||
|
||||
{ false, false, -1, -1, -1, -1, -1, -1 }, // 200
|
||||
{ false, false, 0, 9, 13, 13, 17, 14 }, // 201
|
||||
|
@ -1353,13 +1353,13 @@ void nnExtProcessSuperSprites() {
|
|||
|
||||
// this function plays sound predefined in missile info
|
||||
void sfxPlayMissileSound(spritetype* pSprite, int missileId) {
|
||||
MISSILEINFO_EXTRA* pMissType = &gMissileInfoExtra[missileId - kMissileBase];
|
||||
const MISSILEINFO_EXTRA* pMissType = &gMissileInfoExtra[missileId - kMissileBase];
|
||||
sfxPlay3DSound(pSprite, Chance(0x5000) ? pMissType->fireSound[0] : pMissType->fireSound[1], -1, 0);
|
||||
}
|
||||
|
||||
// this function plays sound predefined in vector info
|
||||
void sfxPlayVectorSound(spritetype* pSprite, int vectorId) {
|
||||
VECTORINFO_EXTRA* pVectorData = &gVectorInfoExtra[vectorId];
|
||||
const VECTORINFO_EXTRA* pVectorData = &gVectorInfoExtra[vectorId];
|
||||
sfxPlay3DSound(pSprite, Chance(0x5000) ? pVectorData->fireSound[0] : pVectorData->fireSound[1], -1, 0);
|
||||
}
|
||||
|
||||
|
@ -6553,7 +6553,7 @@ void aiPatrolState(spritetype* pSprite, int state) {
|
|||
bool nSeqOverride = false, crouch = false;
|
||||
int i, seq = -1, start = 0, end = kPatrolStateSize;
|
||||
|
||||
DUDEINFO_EXTRA* pExtra = &gDudeInfoExtra[pSprite->type - kDudeBase];
|
||||
const DUDEINFO_EXTRA* pExtra = &gDudeInfoExtra[pSprite->type - kDudeBase];
|
||||
|
||||
switch (state) {
|
||||
case kAiStatePatrolWaitL:
|
||||
|
@ -6650,7 +6650,7 @@ bool aiPatrolMarkerReached(spritetype* pSprite, XSPRITE* pXSprite) {
|
|||
assert(pSprite->type >= kDudeBase && pSprite->type < kDudeMax);
|
||||
|
||||
auto actor = &bloodActors[pSprite->index];
|
||||
DUDEINFO_EXTRA* pExtra = &gDudeInfoExtra[pSprite->type - kDudeBase];
|
||||
const DUDEINFO_EXTRA* pExtra = &gDudeInfoExtra[pSprite->type - kDudeBase];
|
||||
if (spriRangeIsFine(pXSprite->target_i) && sprite[pXSprite->target_i].type == kMarkerPath) {
|
||||
|
||||
spritetype* pMarker = &sprite[pXSprite->target_i];
|
||||
|
@ -6910,7 +6910,7 @@ void aiPatrolMove(DBloodActor* actor) {
|
|||
spritetype* pTarget = &sprite[pXSprite->target_i];
|
||||
XSPRITE* pXTarget = &xsprite[pTarget->extra];
|
||||
DUDEINFO* pDudeInfo = &dudeInfo[dudeIdx];
|
||||
DUDEINFO_EXTRA* pExtra = &gDudeInfoExtra[dudeIdx];
|
||||
const DUDEINFO_EXTRA* pExtra = &gDudeInfoExtra[dudeIdx];
|
||||
|
||||
int dx = (pTarget->x - pSprite->x);
|
||||
int dy = (pTarget->y - pSprite->y);
|
||||
|
@ -7499,7 +7499,7 @@ void aiPatrolThink(DBloodActor* actor) {
|
|||
}
|
||||
|
||||
spritetype* pMarker = &sprite[nMarker]; XSPRITE* pXMarker = &xsprite[pMarker->extra];
|
||||
DUDEINFO_EXTRA* pExtra = &gDudeInfoExtra[pSprite->type - kDudeBase];
|
||||
const DUDEINFO_EXTRA* pExtra = &gDudeInfoExtra[pSprite->type - kDudeBase];
|
||||
bool isFinal = ((!pXSprite->unused2 && pXMarker->data2 == -1) || (pXSprite->unused2 && pXMarker->data1 == -1));
|
||||
bool reached = false;
|
||||
|
||||
|
|
|
@ -268,10 +268,10 @@ extern bool gTeamsSpawnUsed;
|
|||
extern bool gEventRedirectsUsed;
|
||||
extern ZONE gStartZoneTeam1[kMaxPlayers];
|
||||
extern ZONE gStartZoneTeam2[kMaxPlayers];
|
||||
extern THINGINFO_EXTRA gThingInfoExtra[kThingMax];
|
||||
extern VECTORINFO_EXTRA gVectorInfoExtra[kVectorMax];
|
||||
extern MISSILEINFO_EXTRA gMissileInfoExtra[kMissileMax];
|
||||
extern DUDEINFO_EXTRA gDudeInfoExtra[kDudeMax];
|
||||
extern const THINGINFO_EXTRA gThingInfoExtra[kThingMax];
|
||||
extern const VECTORINFO_EXTRA gVectorInfoExtra[kVectorMax];
|
||||
extern const MISSILEINFO_EXTRA gMissileInfoExtra[kMissileMax];
|
||||
extern const DUDEINFO_EXTRA gDudeInfoExtra[kDudeMax];
|
||||
extern TRPLAYERCTRL gPlayerCtrl[kMaxPlayers];
|
||||
extern SPRITEMASS gSpriteMass[kMaxXSprites];
|
||||
extern TRCONDITION gCondition[kMaxTrackingConditions];
|
||||
|
|
Loading…
Reference in a new issue