summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-06-30 02:31:10 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2021-06-30 02:31:10 +0200
commit9f0daee186dc815cbf4e8a68871d375bd4752737 (patch)
treecc2ec2e0ade1a44232d97b113bbeda96aa4c8a6f /src/audio
parentfix no VALIDATE_SAVE_SIZE build (diff)
downloadre3-9f0daee186dc815cbf4e8a68871d375bd4752737.tar
re3-9f0daee186dc815cbf4e8a68871d375bd4752737.tar.gz
re3-9f0daee186dc815cbf4e8a68871d375bd4752737.tar.bz2
re3-9f0daee186dc815cbf4e8a68871d375bd4752737.tar.lz
re3-9f0daee186dc815cbf4e8a68871d375bd4752737.tar.xz
re3-9f0daee186dc815cbf4e8a68871d375bd4752737.tar.zst
re3-9f0daee186dc815cbf4e8a68871d375bd4752737.zip
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/sampman_oal.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp
index 5d6b0dc3..6740f08f 100644
--- a/src/audio/sampman_oal.cpp
+++ b/src/audio/sampman_oal.cpp
@@ -1250,14 +1250,14 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
ASSERT( nComment < TOTAL_AUDIO_SAMPLES );
- int8 slot;
-
for ( int32 i = 0; i < _TODOCONST(3); i++ )
{
- slot = nCurrentPedSlot - i - 1;
#ifdef FIX_BUGS
+ int8 slot = (int8)nCurrentPedSlot - i - 1;
if (slot < 0)
slot += ARRAY_SIZE(nPedSlotSfx);
+#else
+ uint8 slot = nCurrentPedSlot - i - 1;
#endif
if ( nComment == nPedSlotSfx[slot] )
return TRUE;
@@ -1270,14 +1270,14 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment)
int32
cSampleManager::_GetPedCommentSlot(uint32 nComment)
{
- int8 slot;
-
for (int32 i = 0; i < _TODOCONST(3); i++)
{
- slot = nCurrentPedSlot - i - 1;
#ifdef FIX_BUGS
+ int8 slot = (int8)nCurrentPedSlot - i - 1;
if (slot < 0)
slot += ARRAY_SIZE(nPedSlotSfx);
+#else
+ uint8 slot = nCurrentPedSlot - i - 1;
#endif
if (nComment == nPedSlotSfx[slot])
return slot;