mirror of
https://github.com/ioquake/ioq3.git
synced 2025-06-02 09:51:21 +00:00
updating SDL includes to 1.2.15
Listen to this if this doesn't work out properly: http://timedoctor.org/fun/swf/starwars/tauntaun-soundboard.swf
This commit is contained in:
parent
3a98b67e01
commit
a07b8587f1
39 changed files with 76 additions and 56 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
SDL - Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2009 Sam Lantinga
|
||||
Copyright (C) 1997-2012 Sam Lantinga
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -39,6 +39,10 @@
|
|||
/*@}*/
|
||||
|
||||
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
|
||||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER __BYTE_ORDER
|
||||
#else /* __linux __ */
|
||||
#if defined(__hppa__) || \
|
||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||
(defined(__MIPS__) && defined(__MISPEB__)) || \
|
||||
|
@ -48,6 +52,7 @@
|
|||
#else
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#endif
|
||||
#endif /* __linux __ */
|
||||
#endif /* !SDL_BYTEORDER */
|
||||
|
||||
|
||||
|
@ -81,12 +86,12 @@ static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
|||
#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
||||
{
|
||||
Uint16 result;
|
||||
int result;
|
||||
|
||||
__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
|
||||
return result;
|
||||
return (Uint16)result;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
|
||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("rorw #8,%0" : "=d" (x) : "0" (x) : "cc");
|
||||
|
@ -94,7 +99,7 @@ static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
|||
}
|
||||
#else
|
||||
static __inline__ Uint16 SDL_Swap16(Uint16 x) {
|
||||
return((x<<8)|(x>>8));
|
||||
return SDL_static_cast(Uint16, ((x<<8)|(x>>8)));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -121,7 +126,7 @@ static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
|||
__asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x));
|
||||
return result;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
|
||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0" : "=d" (x) : "0" (x) : "cc");
|
||||
|
@ -129,7 +134,7 @@ static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
|||
}
|
||||
#else
|
||||
static __inline__ Uint32 SDL_Swap32(Uint32 x) {
|
||||
return((x<<24)|((x<<8)&0x00FF0000)|((x>>8)&0x0000FF00)|(x>>24));
|
||||
return SDL_static_cast(Uint32, ((x<<24)|((x<<8)&0x00FF0000)|((x>>8)&0x0000FF00)|(x>>24)));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -166,7 +171,7 @@ static __inline__ Uint64 SDL_Swap64(Uint64 x)
|
|||
x = SDL_Swap32(lo);
|
||||
x <<= 32;
|
||||
x |= SDL_Swap32(hi);
|
||||
return(x);
|
||||
return (x);
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue