summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioManager.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-16 20:00:27 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-16 20:00:27 +0200
commit4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e (patch)
tree25d706e50fb112b64c9d8004d9dbc0dd87304d69 /src/audio/AudioManager.cpp
parentMove sound processors to AudioLogic.cpp, plus small fixes (diff)
downloadre3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar.gz
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar.bz2
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar.lz
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar.xz
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.tar.zst
re3-4ff0697b4d29144e6dfad4ca14a98aa1bce5bf5e.zip
Diffstat (limited to 'src/audio/AudioManager.cpp')
-rw-r--r--src/audio/AudioManager.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index eecc8e7d..458341b9 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -32,7 +32,7 @@ cAudioManager::cAudioManager()
ClearActiveSamples();
GenerateIntegerRandomNumberTable();
field_4 = 0;
- m_bDynamicAcousticModelingStatus = 1;
+ m_bDynamicAcousticModelingStatus = true;
for (int i = 0; i < NUM_AUDIOENTITIES; i++) {
m_asAudioEntities[i].m_bIsUsed = false;
@@ -514,19 +514,19 @@ cAudioManager::RandomDisplacement(uint32 seed) const
{
int32 value;
- static bool bIsEven = true;
- static uint32 base = 0;
+ static bool bPos = true;
+ static uint32 Adjustment = 0;
if (!seed)
return 0;
- value = m_anRandomTable[(base + seed) % 5] % seed;
- base += value;
+ value = m_anRandomTable[(Adjustment + seed) % 5] % seed;
+ Adjustment += value;
if (value % 2) {
- bIsEven = !bIsEven;
+ bPos = !bPos;
}
- if (!bIsEven)
+ if (!bPos)
value = -value;
return value;
}