mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-10 03:51:41 +00:00
rebuilt SDL-1.2 from latest mainstream code
This commit is contained in:
parent
1bb0584c34
commit
bbda7657fe
11 changed files with 50 additions and 14 deletions
|
@ -122,7 +122,7 @@
|
||||||
#define SDL_VIDEO_DRIVER_OS2FS 1
|
#define SDL_VIDEO_DRIVER_OS2FS 1
|
||||||
|
|
||||||
/* Enable OpenGL support */
|
/* Enable OpenGL support */
|
||||||
/* Nothing yet for OS/2. */
|
/* #undef SDL_VIDEO_OPENGL */ /* Nothing yet */
|
||||||
|
|
||||||
/* Enable assembly routines where available */
|
/* Enable assembly routines where available */
|
||||||
#define SDL_ASSEMBLY_ROUTINES 1
|
#define SDL_ASSEMBLY_ROUTINES 1
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "SDL_stdinc.h"
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
/** @name SDL_ENDIANs
|
/** @name SDL_ENDIANs
|
||||||
* The two types of endianness
|
* The two types of endianness
|
||||||
*/
|
*/
|
||||||
/*@{*/
|
/*@{*/
|
||||||
#define SDL_LIL_ENDIAN 1234
|
#define SDL_LIL_ENDIAN 1234
|
||||||
|
@ -94,6 +94,12 @@ static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
||||||
__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
|
__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
|
||||||
return (Uint16)result;
|
return (Uint16)result;
|
||||||
}
|
}
|
||||||
|
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||||
|
static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
__asm__("rev16 %w1, %w0" : "=r"(x) : "r"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||||
static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
||||||
{
|
{
|
||||||
|
@ -135,6 +141,12 @@ static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
||||||
__asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x));
|
__asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||||
|
static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
__asm__("rev %w1, %w0": "=r"(x):"r"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||||
static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
||||||
{
|
{
|
||||||
|
@ -174,7 +186,7 @@ static __inline__ Uint64 SDL_Swap64(Uint64 x)
|
||||||
v.u = x;
|
v.u = x;
|
||||||
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
||||||
: "=r" (v.s.a), "=r" (v.s.b)
|
: "=r" (v.s.a), "=r" (v.s.b)
|
||||||
: "0" (v.s.a), "1" (v.s.b));
|
: "0" (v.s.a), "1" (v.s.b));
|
||||||
return v.u;
|
return v.u;
|
||||||
}
|
}
|
||||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
#include "SDL_config.h"
|
#include "SDL_config.h"
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#ifndef NOMINMAX
|
#ifndef NOMINMAX
|
||||||
#define NOMINMAX /* Don't defined min() and max() */
|
#define NOMINMAX /* Don't defined min() and max() */
|
||||||
#endif
|
#endif
|
||||||
|
@ -35,6 +37,7 @@
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_SDL_GLEXT
|
#ifndef NO_SDL_GLEXT
|
||||||
#define __glext_h_ /* Don't let gl.h include glext.h */
|
#define __glext_h_ /* Don't let gl.h include glext.h */
|
||||||
|
#define __gl_glext_h_ /* Don't let gl.h include glext.h */
|
||||||
#endif
|
#endif
|
||||||
#if defined(__MACOSX__)
|
#if defined(__MACOSX__)
|
||||||
#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
|
#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
|
||||||
|
@ -48,6 +51,7 @@
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_SDL_GLEXT
|
#ifndef NO_SDL_GLEXT
|
||||||
#undef __glext_h_
|
#undef __glext_h_
|
||||||
|
#undef __gl_glext_h_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @name GLext.h
|
/** @name GLext.h
|
||||||
|
@ -57,8 +61,9 @@
|
||||||
*/
|
*/
|
||||||
/*@{*/
|
/*@{*/
|
||||||
#ifndef NO_SDL_GLEXT
|
#ifndef NO_SDL_GLEXT
|
||||||
#if !defined(__glext_h_) && !defined(GL_GLEXT_LEGACY)
|
#if !(defined(__glext_h_) || defined(__gl_glext_h_)) && !defined(GL_GLEXT_LEGACY)
|
||||||
#define __glext_h_
|
#define __glext_h_
|
||||||
|
#define __gl_glext_h_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -6227,12 +6232,12 @@ typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
|
GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
|
||||||
GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
|
GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
|
||||||
GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, const GLuint *);
|
GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
|
||||||
GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
|
GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
#endif /* GL_GLEXT_PROTOTYPES */
|
||||||
typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
|
typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
|
||||||
typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
|
typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
|
||||||
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
|
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
|
||||||
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
|
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6565,6 +6570,6 @@ typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif /* GL_GLEXT_LEGACY */
|
||||||
#endif /* NO_SDL_GLEXT */
|
#endif /* NO_SDL_GLEXT */
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
|
@ -138,6 +138,7 @@ typedef struct SDL_Surface {
|
||||||
#define SDL_ANYFORMAT 0x10000000 /**< Allow any video depth/pixel-format */
|
#define SDL_ANYFORMAT 0x10000000 /**< Allow any video depth/pixel-format */
|
||||||
#define SDL_HWPALETTE 0x20000000 /**< Surface has exclusive palette */
|
#define SDL_HWPALETTE 0x20000000 /**< Surface has exclusive palette */
|
||||||
#define SDL_DOUBLEBUF 0x40000000 /**< Set up double-buffered video mode */
|
#define SDL_DOUBLEBUF 0x40000000 /**< Set up double-buffered video mode */
|
||||||
|
#define SDL_TRIPLEBUF 0x40000100 /**< Set up triple-buffered video mode */
|
||||||
#define SDL_FULLSCREEN 0x80000000 /**< Surface is a full screen display */
|
#define SDL_FULLSCREEN 0x80000000 /**< Surface is a full screen display */
|
||||||
#define SDL_OPENGL 0x00000002 /**< Create an OpenGL rendering context */
|
#define SDL_OPENGL 0x00000002 /**< Create an OpenGL rendering context */
|
||||||
#define SDL_OPENGLBLIT 0x0000000A /**< Create an OpenGL rendering context and use it for blitting */
|
#define SDL_OPENGLBLIT 0x0000000A /**< Create an OpenGL rendering context and use it for blitting */
|
||||||
|
|
Binary file not shown.
|
@ -122,7 +122,7 @@
|
||||||
#define SDL_VIDEO_DRIVER_OS2FS 1
|
#define SDL_VIDEO_DRIVER_OS2FS 1
|
||||||
|
|
||||||
/* Enable OpenGL support */
|
/* Enable OpenGL support */
|
||||||
/* Nothing yet for OS/2. */
|
/* #undef SDL_VIDEO_OPENGL */ /* Nothing yet */
|
||||||
|
|
||||||
/* Enable assembly routines where available */
|
/* Enable assembly routines where available */
|
||||||
#define SDL_ASSEMBLY_ROUTINES 1
|
#define SDL_ASSEMBLY_ROUTINES 1
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "SDL_stdinc.h"
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
/** @name SDL_ENDIANs
|
/** @name SDL_ENDIANs
|
||||||
* The two types of endianness
|
* The two types of endianness
|
||||||
*/
|
*/
|
||||||
/*@{*/
|
/*@{*/
|
||||||
#define SDL_LIL_ENDIAN 1234
|
#define SDL_LIL_ENDIAN 1234
|
||||||
|
@ -94,6 +94,12 @@ static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
||||||
__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
|
__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
|
||||||
return (Uint16)result;
|
return (Uint16)result;
|
||||||
}
|
}
|
||||||
|
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||||
|
static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
||||||
|
{
|
||||||
|
__asm__("rev16 %w1, %w0" : "=r"(x) : "r"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||||
static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
static __inline__ Uint16 SDL_Swap16(Uint16 x)
|
||||||
{
|
{
|
||||||
|
@ -135,6 +141,12 @@ static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
||||||
__asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x));
|
__asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||||
|
static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
||||||
|
{
|
||||||
|
__asm__("rev %w1, %w0": "=r"(x):"r"(x));
|
||||||
|
return x;
|
||||||
|
}
|
||||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||||
static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
static __inline__ Uint32 SDL_Swap32(Uint32 x)
|
||||||
{
|
{
|
||||||
|
@ -174,7 +186,7 @@ static __inline__ Uint64 SDL_Swap64(Uint64 x)
|
||||||
v.u = x;
|
v.u = x;
|
||||||
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
||||||
: "=r" (v.s.a), "=r" (v.s.b)
|
: "=r" (v.s.a), "=r" (v.s.b)
|
||||||
: "0" (v.s.a), "1" (v.s.b));
|
: "0" (v.s.a), "1" (v.s.b));
|
||||||
return v.u;
|
return v.u;
|
||||||
}
|
}
|
||||||
#elif defined(__GNUC__) && defined(__x86_64__)
|
#elif defined(__GNUC__) && defined(__x86_64__)
|
||||||
|
|
|
@ -27,7 +27,9 @@
|
||||||
#include "SDL_config.h"
|
#include "SDL_config.h"
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#ifndef NOMINMAX
|
#ifndef NOMINMAX
|
||||||
#define NOMINMAX /* Don't defined min() and max() */
|
#define NOMINMAX /* Don't defined min() and max() */
|
||||||
#endif
|
#endif
|
||||||
|
@ -35,6 +37,7 @@
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_SDL_GLEXT
|
#ifndef NO_SDL_GLEXT
|
||||||
#define __glext_h_ /* Don't let gl.h include glext.h */
|
#define __glext_h_ /* Don't let gl.h include glext.h */
|
||||||
|
#define __gl_glext_h_ /* Don't let gl.h include glext.h */
|
||||||
#endif
|
#endif
|
||||||
#if defined(__MACOSX__)
|
#if defined(__MACOSX__)
|
||||||
#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
|
#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
|
||||||
|
@ -48,6 +51,7 @@
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_SDL_GLEXT
|
#ifndef NO_SDL_GLEXT
|
||||||
#undef __glext_h_
|
#undef __glext_h_
|
||||||
|
#undef __gl_glext_h_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @name GLext.h
|
/** @name GLext.h
|
||||||
|
@ -57,8 +61,9 @@
|
||||||
*/
|
*/
|
||||||
/*@{*/
|
/*@{*/
|
||||||
#ifndef NO_SDL_GLEXT
|
#ifndef NO_SDL_GLEXT
|
||||||
#if !defined(__glext_h_) && !defined(GL_GLEXT_LEGACY)
|
#if !(defined(__glext_h_) || defined(__gl_glext_h_)) && !defined(GL_GLEXT_LEGACY)
|
||||||
#define __glext_h_
|
#define __glext_h_
|
||||||
|
#define __gl_glext_h_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -6227,12 +6232,12 @@ typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name);
|
||||||
#ifdef GL_GLEXT_PROTOTYPES
|
#ifdef GL_GLEXT_PROTOTYPES
|
||||||
GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
|
GLAPI void APIENTRY glBindVertexArrayAPPLE (GLuint);
|
||||||
GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
|
GLAPI void APIENTRY glDeleteVertexArraysAPPLE (GLsizei, const GLuint *);
|
||||||
GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, const GLuint *);
|
GLAPI void APIENTRY glGenVertexArraysAPPLE (GLsizei, GLuint *);
|
||||||
GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
|
GLAPI GLboolean APIENTRY glIsVertexArrayAPPLE (GLuint);
|
||||||
#endif /* GL_GLEXT_PROTOTYPES */
|
#endif /* GL_GLEXT_PROTOTYPES */
|
||||||
typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
|
typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array);
|
||||||
typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
|
typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
|
||||||
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint *arrays);
|
typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
|
||||||
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
|
typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6565,6 +6570,6 @@ typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif /* GL_GLEXT_LEGACY */
|
||||||
#endif /* NO_SDL_GLEXT */
|
#endif /* NO_SDL_GLEXT */
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
|
@ -138,6 +138,7 @@ typedef struct SDL_Surface {
|
||||||
#define SDL_ANYFORMAT 0x10000000 /**< Allow any video depth/pixel-format */
|
#define SDL_ANYFORMAT 0x10000000 /**< Allow any video depth/pixel-format */
|
||||||
#define SDL_HWPALETTE 0x20000000 /**< Surface has exclusive palette */
|
#define SDL_HWPALETTE 0x20000000 /**< Surface has exclusive palette */
|
||||||
#define SDL_DOUBLEBUF 0x40000000 /**< Set up double-buffered video mode */
|
#define SDL_DOUBLEBUF 0x40000000 /**< Set up double-buffered video mode */
|
||||||
|
#define SDL_TRIPLEBUF 0x40000100 /**< Set up triple-buffered video mode */
|
||||||
#define SDL_FULLSCREEN 0x80000000 /**< Surface is a full screen display */
|
#define SDL_FULLSCREEN 0x80000000 /**< Surface is a full screen display */
|
||||||
#define SDL_OPENGL 0x00000002 /**< Create an OpenGL rendering context */
|
#define SDL_OPENGL 0x00000002 /**< Create an OpenGL rendering context */
|
||||||
#define SDL_OPENGLBLIT 0x0000000A /**< Create an OpenGL rendering context and use it for blitting */
|
#define SDL_OPENGLBLIT 0x0000000A /**< Create an OpenGL rendering context and use it for blitting */
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue