mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-11 03:01:12 +00:00
- Exhumed: Wrap all access to FrameSound[]
array and make static.
This commit is contained in:
parent
86c559ff1c
commit
8a0d09ce8b
1 changed files with 14 additions and 3 deletions
|
@ -55,7 +55,7 @@ static int16_t SeqBase[kMaxSequences];
|
|||
static int16_t SeqSize[kMaxSequences];
|
||||
static int16_t SeqFlag[kMaxSequences]; // not used at all.
|
||||
|
||||
int16_t FrameSound[kMaxSEQFrames];
|
||||
static int16_t FrameSound[kMaxSEQFrames];
|
||||
static int16_t FrameSize[kMaxSEQFrames];
|
||||
static int16_t FrameBase[kMaxSEQFrames];
|
||||
static int16_t FrameFlag[kMaxSEQFrames];
|
||||
|
@ -212,6 +212,17 @@ int getSeqFrameFlags(const int nFrame)
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int getSeqFrameSound(const int nFrame)
|
||||
{
|
||||
return FrameSound[nFrame];
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
int getSeqFrameChunkCount(const int nFrame)
|
||||
{
|
||||
return FrameSize[nFrame];
|
||||
|
@ -562,7 +573,7 @@ int seq_DrawGunSequence(int nSeqOffset, int16_t dx, double xOffs, double yOffs,
|
|||
|
||||
int seq_GetFrameSound(int val, int edx)
|
||||
{
|
||||
return FrameSound[getSeqFrame(val, edx)];
|
||||
return getSeqFrameSound(getSeqFrame(val, edx));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -575,7 +586,7 @@ void seq_MoveSequence(DExhumedActor* actor, int16_t nSeq, int16_t nFrame)
|
|||
{
|
||||
assert(nSeq >= 0); // TEMP
|
||||
|
||||
int nSound = FrameSound[getSeqFrame(nSeq, nFrame)];
|
||||
int nSound = getSeqFrameSound(getSeqFrame(nSeq, nFrame));
|
||||
if (nSound == -1) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue