From dce24d2d5c76d048a9558c4c46cea47f8866eb0c Mon Sep 17 00:00:00 2001 From: molivier Date: Mon, 15 Mar 2004 07:56:04 +0000 Subject: [PATCH] Made use of the common functions BuffLittle{Short,Long} in "snd_mem.c" instead of reinventing the wheel. Made a few variables static in the process. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4022 d7cf8633-e32d-0410-b094-e92efae38249 --- snd_mem.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/snd_mem.c b/snd_mem.c index f735a38d..7535b38c 100644 --- 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; } -- 2.39.2