summaryrefslogtreecommitdiff
path: root/source/r_images.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2010-06-13 17:26:28 +0000
committerAndrey Nazarov <skuller@skuller.net>2010-06-13 17:26:28 +0000
commita4c98a614298d56fae192528323dcc74c5465e75 (patch)
treea29b39c0c35f2aa2ff831db5a0b9258bc15970ec /source/r_images.c
parentb4778982f31e6465cd7a61a16cc57add05c2eb46 (diff)
Fixed endianess issues in *.wav and *.tga loading code.
Renamed MakeLong/MakeShort macros into MakeRawLong/MakeRawShort to prevent further confusion. Introduced LittleLongMem/LittleShortMem and RawLongMem/RawShortMem macros. Use more efficient versions of ShortSwap/LongSwap functions.
Diffstat (limited to 'source/r_images.c')
-rw-r--r--source/r_images.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/r_images.c b/source/r_images.c
index e082629..8468c61 100644
--- a/source/r_images.c
+++ b/source/r_images.c
@@ -472,8 +472,8 @@ void IMG_LoadTGA( const char *filename, byte **pic, int *width, int *height ) {
id_length = buffer[0];
image_type = buffer[2];
- w = MakeShort( buffer[12], buffer[13] );
- h = MakeShort( buffer[14], buffer[15] );
+ w = LittleShortMem( &buffer[12] );
+ h = LittleShortMem( &buffer[14] );
pixel_size = buffer[16];
attributes = buffer[17];
@@ -1310,7 +1310,7 @@ image_t *IMG_Find( const char *name, imagetype_t type ) {
ext = buffer + length;
Q_strlwr( ext + 1 );
- extHash = MakeLong( '.', ext[1], ext[2], ext[3] );
+ extHash = MakeRawLong( '.', ext[1], ext[2], ext[3] );
//
// create the pic from disk