mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 09:20:51 +00:00
- Exhumed: Avoid masking sound flags into the sprite index.
This put a hard 4096 sprites limit into the engine. It's also a blocker for refactoring.
This commit is contained in:
parent
d82b7ff51c
commit
9991e6665c
4 changed files with 8 additions and 9 deletions
|
@ -1101,7 +1101,7 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
||||||
short nBlock = sector[nPlayerPushSect[nPlayer]].extra;
|
short nBlock = sector[nPlayerPushSect[nPlayer]].extra;
|
||||||
int nBlockSprite = sBlockInfo[nBlock].nSprite;
|
int nBlockSprite = sBlockInfo[nBlock].nSprite;
|
||||||
|
|
||||||
D3PlayFX(StaticSound[kSound23], nBlockSprite | 0x4000);
|
D3PlayFX(StaticSound[kSound23], nBlockSprite, 0x4000);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1681,7 +1681,7 @@ void runlist_DamageEnemy(int nSprite, int nSprite2, short nDamage)
|
||||||
}
|
}
|
||||||
|
|
||||||
int nDopSprite = nDoppleSprite[nPlayer];
|
int nDopSprite = nDoppleSprite[nPlayer];
|
||||||
D3PlayFX(StaticSound[kSoundTauntStart + (RandomSize(3) % 5)], nDopSprite | ebx);
|
D3PlayFX(StaticSound[kSoundTauntStart + (RandomSize(3) % 5)], nDopSprite, ebx);
|
||||||
}
|
}
|
||||||
|
|
||||||
nTauntTimer[nPlayer] = RandomSize(3) + 3;
|
nTauntTimer[nPlayer] = RandomSize(3) + 3;
|
||||||
|
|
|
@ -557,7 +557,7 @@ void GameInterface::UpdateSounds()
|
||||||
int soundx, soundy, soundz;
|
int soundx, soundy, soundz;
|
||||||
short soundsect;
|
short soundsect;
|
||||||
|
|
||||||
void PlayFX2(unsigned short nSound, short nSprite, int sectf, EChanFlags chanflags)
|
void PlayFX2(unsigned short nSound, short nSprite, int sectf, EChanFlags chanflags, int sprflags)
|
||||||
{
|
{
|
||||||
if (!SoundEnabled()) return;
|
if (!SoundEnabled()) return;
|
||||||
if ((nSound&0x1ff) >= kMaxSounds || !soundEngine->isValidSoundId((nSound & 0x1ff)+1))
|
if ((nSound&0x1ff) >= kMaxSounds || !soundEngine->isValidSoundId((nSound & 0x1ff)+1))
|
||||||
|
@ -569,9 +569,8 @@ void PlayFX2(unsigned short nSound, short nSprite, int sectf, EChanFlags chanfla
|
||||||
bool fullvol = false, hiprio = false;
|
bool fullvol = false, hiprio = false;
|
||||||
if (nSprite >= 0)
|
if (nSprite >= 0)
|
||||||
{
|
{
|
||||||
fullvol = (nSprite & 0x2000) != 0;
|
fullvol = (sprflags & 0x2000) != 0;
|
||||||
hiprio = (nSprite & 0x4000) != 0;
|
hiprio = (sprflags & 0x4000) != 0;
|
||||||
nSprite &= 0xfff;
|
|
||||||
soundx = sprite[nSprite].x;
|
soundx = sprite[nSprite].x;
|
||||||
soundy = sprite[nSprite].y;
|
soundy = sprite[nSprite].y;
|
||||||
soundz = sprite[nSprite].z;
|
soundz = sprite[nSprite].z;
|
||||||
|
|
|
@ -131,11 +131,11 @@ int LoadSound(const char* sound);
|
||||||
void BendAmbientSound();
|
void BendAmbientSound();
|
||||||
void CheckAmbience(short nSector);
|
void CheckAmbience(short nSector);
|
||||||
|
|
||||||
void PlayFX2(unsigned short nSound, short nSprite, int sectf = 0, EChanFlags chanflags = CHANF_NONE);
|
void PlayFX2(unsigned short nSound, short nSprite, int sectf = 0, EChanFlags chanflags = CHANF_NONE, int sprflags = 0);
|
||||||
void PlayFXAtXYZ(unsigned short nSound, int x, int y, int z, int nSector, EChanFlags chanflags = CHANF_NONE);
|
void PlayFXAtXYZ(unsigned short nSound, int x, int y, int z, int nSector, EChanFlags chanflags = CHANF_NONE);
|
||||||
inline void D3PlayFX(unsigned short nSound, short nVal)
|
inline void D3PlayFX(unsigned short nSound, short nVal, short flags = 0)
|
||||||
{
|
{
|
||||||
PlayFX2(nSound, nVal);
|
PlayFX2(nSound, nVal, 0, CHANF_NONE, flags);
|
||||||
}
|
}
|
||||||
void StopSpriteSound(short nSprite);
|
void StopSpriteSound(short nSprite);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue