Made use of the common functions BuffLittle{Short,Long} in "snd_mem.c" instead of...
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 15 Mar 2004 07:56:04 +0000 (07:56 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 15 Mar 2004 07:56:04 +0000 (07:56 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4022 d7cf8633-e32d-0410-b094-e92efae38249

snd_mem.c

index f735a38..7535b38 100644 (file)
--- a/snd_mem.c
+++ b/snd_mem.c
@@ -336,30 +336,30 @@ WAV loading
 */
 
 
-qbyte *data_p;
-qbyte *iff_end;
-qbyte *last_chunk;
-qbyte *iff_data;
-int iff_chunk_len;
+static qbyte *data_p;
+static qbyte *iff_end;
+static qbyte *last_chunk;
+static qbyte *iff_data;
+static int iff_chunk_len;
 
 
 short GetLittleShort(void)
 {
-       short val = 0;
-       val = *data_p;
-       val = val + (*(data_p+1)<<8);
+       short val;
+
+       val = BuffLittleShort (data_p);
        data_p += 2;
+
        return val;
 }
 
 int GetLittleLong(void)
 {
        int val = 0;
-       val = *data_p;
-       val = val + (*(data_p+1)<<8);
-       val = val + (*(data_p+2)<<16);
-       val = val + (*(data_p+3)<<24);
+
+       val = BuffLittleLong (data_p);
        data_p += 4;
+
        return val;
 }