aboutsummaryrefslogtreecommitdiffstats
path: root/code/SDL12
diff options
context:
space:
mode:
authortjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-05-22 03:46:11 +0000
committertjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-05-22 03:46:11 +0000
commitd28ebff56e669b04b2591f3e5b19f054d5fd955e (patch)
tree761c2cfc58c6af9019d7175573a597ce076db5a7 /code/SDL12
parent33f302fec8eb69bc45451b1fb376b6a0b8ce0273 (diff)
downloadioquake3-aero-d28ebff56e669b04b2591f3e5b19f054d5fd955e.tar.gz
ioquake3-aero-d28ebff56e669b04b2591f3e5b19f054d5fd955e.zip
* updated the included libSDL header files and Mac OS X lib to SDL 1.2.11
git-svn-id: svn://svn.icculus.org/quake3/trunk@1089 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/SDL12')
-rw-r--r--code/SDL12/include/SDL.h35
-rw-r--r--code/SDL12/include/SDL_active.h22
-rw-r--r--code/SDL12/include/SDL_audio.h28
-rw-r--r--code/SDL12/include/SDL_byteorder.h62
-rw-r--r--code/SDL12/include/SDL_cdrom.h22
-rw-r--r--code/SDL12/include/SDL_config.h45
-rw-r--r--code/SDL12/include/SDL_config_amiga.h80
-rw-r--r--code/SDL12/include/SDL_config_dreamcast.h106
-rw-r--r--code/SDL12/include/SDL_config_macos.h112
-rw-r--r--code/SDL12/include/SDL_config_macosx.h132
-rw-r--r--code/SDL12/include/SDL_config_minimal.h62
-rw-r--r--code/SDL12/include/SDL_config_os2.h141
-rw-r--r--code/SDL12/include/SDL_config_win32.h173
-rw-r--r--code/SDL12/include/SDL_copying.h19
-rw-r--r--code/SDL12/include/SDL_cpuinfo.h37
-rw-r--r--code/SDL12/include/SDL_endian.h68
-rw-r--r--code/SDL12/include/SDL_error.h23
-rw-r--r--code/SDL12/include/SDL_events.h39
-rw-r--r--code/SDL12/include/SDL_getenv.h54
-rw-r--r--code/SDL12/include/SDL_joystick.h22
-rw-r--r--code/SDL12/include/SDL_keyboard.h23
-rw-r--r--code/SDL12/include/SDL_keysym.h19
-rw-r--r--code/SDL12/include/SDL_loadso.h22
-rw-r--r--code/SDL12/include/SDL_main.h36
-rw-r--r--code/SDL12/include/SDL_mouse.h24
-rw-r--r--code/SDL12/include/SDL_mutex.h24
-rw-r--r--code/SDL12/include/SDL_opengl.h629
-rw-r--r--code/SDL12/include/SDL_platform.h104
-rw-r--r--code/SDL12/include/SDL_quit.h22
-rw-r--r--code/SDL12/include/SDL_rwops.h63
-rw-r--r--code/SDL12/include/SDL_stdinc.h586
-rw-r--r--code/SDL12/include/SDL_syswm.h44
-rw-r--r--code/SDL12/include/SDL_thread.h68
-rw-r--r--code/SDL12/include/SDL_timer.h23
-rw-r--r--code/SDL12/include/SDL_types.h114
-rw-r--r--code/SDL12/include/SDL_version.h23
-rw-r--r--code/SDL12/include/SDL_video.h41
-rw-r--r--code/SDL12/include/begin_code.h41
-rw-r--r--code/SDL12/include/close_code.h2
39 files changed, 2576 insertions, 614 deletions
diff --git a/code/SDL12/include/SDL.h b/code/SDL12/include/SDL.h
index 7642588..60ac26c 100644
--- a/code/SDL12/include/SDL.h
+++ b/code/SDL12/include/SDL.h
@@ -1,47 +1,44 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL.h,v 1.8 2004/01/04 16:49:07 slouken Exp $";
-#endif
-
/* Main include header for the SDL library */
#ifndef _SDL_H
#define _SDL_H
#include "SDL_main.h"
-#include "SDL_types.h"
-#include "SDL_getenv.h"
-#include "SDL_error.h"
-#include "SDL_rwops.h"
-#include "SDL_timer.h"
+#include "SDL_stdinc.h"
#include "SDL_audio.h"
#include "SDL_cdrom.h"
-#include "SDL_joystick.h"
+#include "SDL_cpuinfo.h"
+#include "SDL_endian.h"
+#include "SDL_error.h"
#include "SDL_events.h"
+#include "SDL_loadso.h"
+#include "SDL_mutex.h"
+#include "SDL_rwops.h"
+#include "SDL_thread.h"
+#include "SDL_timer.h"
#include "SDL_video.h"
-#include "SDL_byteorder.h"
#include "SDL_version.h"
#include "begin_code.h"
diff --git a/code/SDL12/include/SDL_active.h b/code/SDL12/include/SDL_active.h
index bbb306b..2cf474c 100644
--- a/code/SDL12/include/SDL_active.h
+++ b/code/SDL12/include/SDL_active.h
@@ -1,35 +1,33 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_active.h,v 1.6 2004/01/04 16:49:07 slouken Exp $";
-#endif
-
/* Include file for SDL application focus event handling */
#ifndef _SDL_active_h
#define _SDL_active_h
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
diff --git a/code/SDL12/include/SDL_audio.h b/code/SDL12/include/SDL_audio.h
index f03d59e..68ec475 100644
--- a/code/SDL12/include/SDL_audio.h
+++ b/code/SDL12/include/SDL_audio.h
@@ -1,42 +1,36 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_audio.h,v 1.9 2004/08/20 18:57:01 slouken Exp $";
-#endif
-
/* Access to the raw audio mixing buffer for the SDL library */
#ifndef _SDL_audio_h
#define _SDL_audio_h
-#include <stdio.h>
-
-#include "SDL_main.h"
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
#include "SDL_error.h"
+#include "SDL_endian.h"
+#include "SDL_mutex.h"
+#include "SDL_thread.h"
#include "SDL_rwops.h"
-#include "SDL_byteorder.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
diff --git a/code/SDL12/include/SDL_byteorder.h b/code/SDL12/include/SDL_byteorder.h
index 85b40b5..3871cfe 100644
--- a/code/SDL12/include/SDL_byteorder.h
+++ b/code/SDL12/include/SDL_byteorder.h
@@ -1,68 +1,24 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_byteorder.h,v 1.10 2005/09/08 06:49:20 icculus Exp $";
-#endif
-
-/* Macros for determining the byte-order of this platform */
-
-#ifndef _SDL_byteorder_h
-#define _SDL_byteorder_h
-
-/* The two types of endianness */
-#define SDL_LIL_ENDIAN 1234
-#define SDL_BIG_ENDIAN 4321
-
-#ifdef __linux__
-# include <endian.h>
-# if BYTE_ORDER == LITTLE_ENDIAN
-# define SDL_BYTEORDER SDL_LIL_ENDIAN
-# else
-# define SDL_BYTEORDER SDL_BIG_ENDIAN
-# endif
-
-#else
-
-/* Pardon the mess, I'm trying to determine the endianness of this host.
- I'm doing it by preprocessor defines rather than some sort of configure
- script so that application code can use this too. The "right" way would
- be to dynamically generate this file on install, but that's a lot of work.
- */
-#if (defined(__i386__) || defined(__i386)) || \
- defined(__ia64__) || defined(WIN32) || \
- (defined(__alpha__) || defined(__alpha)) || \
- (defined(__arm__) || defined(__thumb__)) || \
- (defined(__sh__) || defined(__sh64__)) || \
- (defined(__mips__) && defined(__MIPSEL__)) || \
- defined(__SYMBIAN32__) || \
- defined(__x86_64__) || \
- defined(__LITTLE_ENDIAN__)
-#define SDL_BYTEORDER SDL_LIL_ENDIAN
-#else
-#define SDL_BYTEORDER SDL_BIG_ENDIAN
-#endif
-
-#endif /* __linux__ */
-
-#endif /* _SDL_byteorder_h */
+/* DEPRECATED */
+#include "SDL_endian.h"
diff --git a/code/SDL12/include/SDL_cdrom.h b/code/SDL12/include/SDL_cdrom.h
index b8d3783..5f8f0c6 100644
--- a/code/SDL12/include/SDL_cdrom.h
+++ b/code/SDL12/include/SDL_cdrom.h
@@ -1,36 +1,32 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_cdrom.h,v 1.8 2005/04/17 10:16:30 icculus Exp $";
-#endif
-
/* This is the CD-audio control API for Simple DirectMedia Layer */
#ifndef _SDL_cdrom_h
#define _SDL_cdrom_h
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
diff --git a/code/SDL12/include/SDL_config.h b/code/SDL12/include/SDL_config.h
new file mode 100644
index 0000000..8970ec3
--- /dev/null
+++ b/code/SDL12/include/SDL_config.h
@@ -0,0 +1,45 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_h
+#define _SDL_config_h
+
+#include "SDL_platform.h"
+
+/* Add any platform that doesn't build using the configure system */
+#if defined(__AMIGA__)
+#include "SDL_config_amiga.h"
+#elif defined(__DREAMCAST__)
+#include "SDL_config_dreamcast.h"
+#elif defined(__MACOS__)
+#include "SDL_config_macos.h"
+#elif defined(__MACOSX__)
+#include "SDL_config_macosx.h"
+#elif defined(__WIN32__)
+#include "SDL_config_win32.h"
+#elif defined(__OS2__)
+#include "SDL_config_os2.h"
+#else
+#include "SDL_config_minimal.h"
+#endif /* platform config */
+
+#endif /* _SDL_config_h */
diff --git a/code/SDL12/include/SDL_config_amiga.h b/code/SDL12/include/SDL_config_amiga.h
new file mode 100644
index 0000000..23e0861
--- /dev/null
+++ b/code/SDL12/include/SDL_config_amiga.h
@@ -0,0 +1,80 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_amiga_h
+#define _SDL_config_amiga_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Useful headers */
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_SIGNAL_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_GETENV 1
+#define HAVE_PUTENV 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_AHI 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#define SDL_CDROM_DUMMY 1
+
+/* Enable various input drivers */
+#define SDL_JOYSTICK_AMIGA 1
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_DUMMY 1
+
+/* Enable various threading systems */
+#define SDL_THREAD_AMIGA 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_AMIGA 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_CYBERGRAPHICS 1
+#define SDL_VIDEO_DRIVER_DUMMY 1
+
+/* Enable OpenGL support */
+#define SDL_VIDEO_OPENGL 1
+
+#endif /* _SDL_config_amiga_h */
diff --git a/code/SDL12/include/SDL_config_dreamcast.h b/code/SDL12/include/SDL_config_dreamcast.h
new file mode 100644
index 0000000..9cbeea3
--- /dev/null
+++ b/code/SDL12/include/SDL_config_dreamcast.h
@@ -0,0 +1,106 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_dreamcast_h
+#define _SDL_config_dreamcast_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef signed long long int64_t;
+typedef unsigned long long uint64_t;
+typedef unsigned long uintptr_t;
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Useful headers */
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_CTYPE_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_GETENV 1
+#define HAVE_PUTENV 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_BCOPY 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE_STRDUP 1
+#define HAVE_INDEX 1
+#define HAVE_RINDEX 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE_STRICMP 1
+#define HAVE_STRCASECMP 1
+#define HAVE_SSCANF 1
+#define HAVE_SNPRINTF 1
+#define HAVE_VSNPRINTF 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_DC 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#define SDL_CDROM_DC 1
+
+/* Enable various input drivers */
+#define SDL_JOYSTICK_DC 1
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_DUMMY 1
+
+/* Enable various threading systems */
+#define SDL_THREAD_DC 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_DC 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_DC 1
+#define SDL_VIDEO_DRIVER_DUMMY 1
+
+#endif /* _SDL_config_dreamcast_h */
diff --git a/code/SDL12/include/SDL_config_macos.h b/code/SDL12/include/SDL_config_macos.h
new file mode 100644
index 0000000..c4a1c59
--- /dev/null
+++ b/code/SDL12/include/SDL_config_macos.h
@@ -0,0 +1,112 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_macos_h
+#define _SDL_config_macos_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+#include <MacTypes.h>
+
+typedef SInt8 int8_t;
+typedef UInt8 uint8_t;
+typedef SInt16 int16_t;
+typedef UInt16 uint16_t;
+typedef SInt32 int32_t;
+typedef UInt32 uint32_t;
+typedef SInt64 int64_t;
+typedef UInt64 uint64_t;
+typedef unsigned long uintptr_t;
+
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Useful headers */
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#define HAVE_SIGNAL_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_ABS 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_ITOA 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE_SSCANF 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_SNDMGR 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#if TARGET_API_MAC_CARBON
+#define SDL_CDROM_DUMMY 1
+#else
+#define SDL_CDROM_MACOS 1
+#endif
+
+/* Enable various input drivers */
+#if TARGET_API_MAC_CARBON
+#define SDL_JOYSTICK_DUMMY 1
+#else
+#define SDL_JOYSTICK_MACOS 1
+#endif
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_MACOS 1
+
+/* Enable various threading systems */
+#define SDL_THREADS_DISABLED 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_MACOS 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_DRAWSPROCKET 1
+#define SDL_VIDEO_DRIVER_TOOLBOX 1
+
+/* Enable OpenGL support */
+#define SDL_VIDEO_OPENGL 1
+
+#endif /* _SDL_config_macos_h */
diff --git a/code/SDL12/include/SDL_config_macosx.h b/code/SDL12/include/SDL_config_macosx.h
new file mode 100644
index 0000000..8f04930
--- /dev/null
+++ b/code/SDL12/include/SDL_config_macosx.h
@@ -0,0 +1,132 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_macosx_h
+#define _SDL_config_macosx_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Useful headers */
+/* If we specified an SDK or have a post-PowerPC chip, then alloca.h exists. */
+#if ( (MAC_OS_X_VERSION_MIN_REQUIRED >= 1030) || (!defined(__POWERPC__)) )
+#define HAVE_ALLOCA_H 1
+#endif
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#define HAVE_SIGNAL_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_GETENV 1
+#define HAVE_PUTENV 1
+#define HAVE_UNSETENV 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_BCOPY 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE_STRLCPY 1
+#define HAVE_STRLCAT 1
+#define HAVE_STRDUP 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOULL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE_STRCASECMP 1
+#define HAVE_STRNCASECMP 1
+#define HAVE_SSCANF 1
+#define HAVE_SNPRINTF 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_SIGACTION 1
+#define HAVE_SETJMP 1
+#define HAVE_NANOSLEEP 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_COREAUDIO 1
+#define SDL_AUDIO_DRIVER_SNDMGR 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#define SDL_CDROM_MACOSX 1
+
+/* Enable various input drivers */
+#define SDL_JOYSTICK_IOKIT 1
+
+/* Enable various shared object loading systems */
+#ifdef __ppc__
+/* For Mac OS X 10.2 compatibility */
+#define SDL_LOADSO_DLCOMPAT 1
+#else
+#define SDL_LOADSO_DLOPEN 1
+#endif
+
+/* Enable various threading systems */
+#define SDL_THREAD_PTHREAD 1
+#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_UNIX 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#if TARGET_API_MAC_CARBON
+#define SDL_VIDEO_DRIVER_TOOLBOX 1
+#else
+#define SDL_VIDEO_DRIVER_QUARTZ 1
+#endif
+
+/* Enable OpenGL support */
+#define SDL_VIDEO_OPENGL 1
+
+/* Enable assembly routines */
+#define SDL_ASSEMBLY_ROUTINES 1
+#ifdef __ppc__
+#define SDL_ALTIVEC_BLITTERS 1
+#endif
+
+#endif /* _SDL_config_macosx_h */
diff --git a/code/SDL12/include/SDL_config_minimal.h b/code/SDL12/include/SDL_config_minimal.h
new file mode 100644
index 0000000..78b6148
--- /dev/null
+++ b/code/SDL12/include/SDL_config_minimal.h
@@ -0,0 +1,62 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_minimal_h
+#define _SDL_config_minimal_h
+
+#include "SDL_platform.h"
+
+/* This is the minimal configuration that can be used to build SDL */
+
+#include <stdarg.h>
+
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef unsigned int size_t;
+typedef unsigned long uintptr_t;
+
+/* Enable the dummy audio driver (src/audio/dummy/\*.c) */
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable the stub cdrom driver (src/cdrom/dummy/\*.c) */
+#define SDL_CDROM_DISABLED 1
+
+/* Enable the stub joystick driver (src/joystick/dummy/\*.c) */
+#define SDL_JOYSTICK_DISABLED 1
+
+/* Enable the stub shared object loader (src/loadso/dummy/\*.c) */
+#define SDL_LOADSO_DISABLED 1
+
+/* Enable the stub thread support (src/thread/generic/\*.c) */
+#define SDL_THREADS_DISABLED 1
+
+/* Enable the stub timer support (src/timer/dummy/\*.c) */
+#define SDL_TIMERS_DISABLED 1
+
+/* Enable the dummy video driver (src/video/dummy/\*.c) */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+
+#endif /* _SDL_config_minimal_h */
diff --git a/code/SDL12/include/SDL_config_os2.h b/code/SDL12/include/SDL_config_os2.h
new file mode 100644
index 0000000..8cdea9f
--- /dev/null
+++ b/code/SDL12/include/SDL_config_os2.h
@@ -0,0 +1,141 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_os2_h
+#define _SDL_config_os2_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef unsigned int size_t;
+typedef unsigned long uintptr_t;
+typedef signed long long int64_t;
+typedef unsigned long long uint64_t;
+
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Use Watcom's LIBC */
+#define HAVE_LIBC 1
+
+/* Useful headers */
+#define HAVE_SYS_TYPES_H 1
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STDARG_H 1
+#define HAVE_MALLOC_H 1
+#define HAVE_MEMORY_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_STDINT_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#define HAVE_SIGNAL_H 1
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_GETENV 1
+#define HAVE_PUTENV 1
+#define HAVE_UNSETENV 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_BCOPY 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE_STRLCPY 1
+#define HAVE_STRLCAT 1
+#define HAVE_STRDUP 1
+#define HAVE__STRREV 1
+#define HAVE__STRUPR 1
+#define HAVE__STRLWR 1
+#define HAVE_INDEX 1
+#define HAVE_RINDEX 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_ITOA 1
+#define HAVE__LTOA 1
+#define HAVE__UITOA 1
+#define HAVE__ULTOA 1
+#define HAVE_STRTOL 1
+#define HAVE__I64TOA 1
+#define HAVE__UI64TOA 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE_STRICMP 1
+#define HAVE_STRCASECMP 1
+#define HAVE_SSCANF 1
+#define HAVE_SNPRINTF 1
+#define HAVE_VSNPRINTF 1
+#define HAVE_SETJMP 1
+#define HAVE_CLOCK_GETTIME 1
+
+/* Enable various audio drivers */
+#define SDL_AUDIO_DRIVER_DART 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#define SDL_CDROM_OS2 1
+
+/* Enable various input drivers */
+#define SDL_JOYSTICK_OS2 1
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_OS2 1
+
+/* Enable various threading systems */
+#define SDL_THREAD_OS2 1
+
+/* Enable various timer systems */
+#define SDL_TIMER_OS2 1
+
+/* Enable various video drivers */
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_OS2FS 1
+
+/* Enable OpenGL support */
+/* Nothing here yet for OS/2... :( */
+
+/* Enable assembly routines where available */
+#define SDL_ASSEMBLY_ROUTINES 1
+
+#endif /* _SDL_config_os2_h */
diff --git a/code/SDL12/include/SDL_config_win32.h b/code/SDL12/include/SDL_config_win32.h
new file mode 100644
index 0000000..23e4868
--- /dev/null
+++ b/code/SDL12/include/SDL_config_win32.h
@@ -0,0 +1,173 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+#ifndef _SDL_config_win32_h
+#define _SDL_config_win32_h
+
+#include "SDL_platform.h"
+
+/* This is a set of defines to configure the SDL features */
+
+#ifdef __GNUC__
+#define HAVE_STDINT_H 1
+#elif defined(_MSC_VER)
+typedef signed __int8 int8_t;
+typedef unsigned __int8 uint8_t;
+typedef signed __int16 int16_t;
+typedef unsigned __int16 uint16_t;
+typedef signed __int32 int32_t;
+typedef unsigned __int32 uint32_t;
+typedef signed __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#ifndef _UINTPTR_T_DEFINED
+#ifdef _WIN64
+typedef unsigned __int64 uintptr_t;
+#else
+typedef unsigned int uintptr_t;
+#endif
+#define _UINTPTR_T_DEFINED
+#endif
+#else /* !__GNUC__ && !_MSC_VER */
+typedef signed char int8_t;
+typedef unsigned char uint8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef signed int int32_t;
+typedef unsigned int uint32_t;
+typedef signed long long int64_t;
+typedef unsigned long long uint64_t;
+#ifndef _SIZE_T_DEFINED_
+#define _SIZE_T_DEFINED_
+typedef unsigned int size_t;
+#endif
+typedef unsigned int uintptr_t;
+#endif /* __GNUC__ || _MSC_VER */
+#define SDL_HAS_64BIT_TYPE 1
+
+/* Enabled for SDL 1.2 (binary compatibility) */
+#define HAVE_LIBC 1
+#ifdef HAVE_LIBC
+/* Useful headers */
+#define HAVE_STDIO_H 1
+#define STDC_HEADERS 1
+#define HAVE_STRING_H 1
+#define HAVE_CTYPE_H 1
+#define HAVE_MATH_H 1
+#ifndef _WIN32_WCE
+#define HAVE_SIGNAL_H 1
+#endif
+
+/* C library functions */
+#define HAVE_MALLOC 1
+#define HAVE_CALLOC 1
+#define HAVE_REALLOC 1
+#define HAVE_FREE 1
+#define HAVE_ALLOCA 1
+#define HAVE_QSORT 1
+#define HAVE_ABS 1
+#define HAVE_MEMSET 1
+#define HAVE_MEMCPY 1
+#define HAVE_MEMMOVE 1
+#define HAVE_MEMCMP 1
+#define HAVE_STRLEN 1
+#define HAVE__STRREV 1
+#define HAVE__STRUPR 1
+#define HAVE__STRLWR 1
+#define HAVE_STRCHR 1
+#define HAVE_STRRCHR 1
+#define HAVE_STRSTR 1
+#define HAVE_ITOA 1
+#define HAVE__LTOA 1
+#define HAVE__ULTOA 1
+#define HAVE_STRTOL 1
+#define HAVE_STRTOUL 1
+#define HAVE_STRTOLL 1
+#define HAVE_STRTOD 1
+#define HAVE_ATOI 1
+#define HAVE_ATOF 1
+#define HAVE_STRCMP 1
+#define HAVE_STRNCMP 1
+#define HAVE__STRICMP 1
+#define HAVE__STRNICMP 1
+#define HAVE_SSCANF 1
+#else
+#define HAVE_STDARG_H 1
+#define HAVE_STDDEF_H 1
+#endif
+
+/* Enable various audio drivers */
+#ifndef _WIN32_WCE
+#define SDL_AUDIO_DRIVER_DSOUND 1
+#endif
+#define SDL_AUDIO_DRIVER_WAVEOUT 1
+#define SDL_AUDIO_DRIVER_DISK 1
+#define SDL_AUDIO_DRIVER_DUMMY 1
+
+/* Enable various cdrom drivers */
+#ifdef _WIN32_WCE
+#define SDL_CDROM_DISABLED 1
+#else
+#define SDL_CDROM_WIN32 1
+#endif
+
+/* Enable various input drivers */
+#ifdef _WIN32_WCE
+#define SDL_JOYSTICK_DISABLED 1
+#else
+#define SDL_JOYSTICK_WINMM 1
+#endif
+
+/* Enable various shared object loading systems */
+#define SDL_LOADSO_WIN32 1
+
+/* Enable various threading systems */
+#define SDL_THREAD_WIN32 1
+
+/* Enable various timer systems */
+#ifdef _WIN32_WCE
+#define SDL_TIMER_WINCE 1
+#else
+#define SDL_TIMER_WIN32 1
+#endif
+
+/* Enable various video drivers */
+#ifdef _WIN32_WCE
+#define SDL_VIDEO_DRIVER_GAPI 1
+#endif
+#ifndef _WIN32_WCE
+#define SDL_VIDEO_DRIVER_DDRAW 1
+#endif
+#define SDL_VIDEO_DRIVER_DUMMY 1
+#define SDL_VIDEO_DRIVER_WINDIB 1
+
+/* Enable OpenGL support */
+#ifndef _WIN32_WCE
+#define SDL_VIDEO_OPENGL 1
+#define SDL_VIDEO_OPENGL_WGL 1
+#endif
+
+/* Enable assembly routines (Win64 doesn't have inline asm) */
+#ifndef _WIN64
+#define SDL_ASSEMBLY_ROUTINES 1
+#endif
+
+#endif /* _SDL_config_win32_h */
diff --git a/code/SDL12/include/SDL_copying.h b/code/SDL12/include/SDL_copying.h
index 14bb101..39e122d 100644
--- a/code/SDL12/include/SDL_copying.h
+++ b/code/SDL12/include/SDL_copying.h
@@ -1,27 +1,22 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_copying.h,v 1.5 2004/01/04 16:49:07 slouken Exp $";
-#endif
-
diff --git a/code/SDL12/include/SDL_cpuinfo.h b/code/SDL12/include/SDL_cpuinfo.h
index f9332b4..72acbdd 100644
--- a/code/SDL12/include/SDL_cpuinfo.h
+++ b/code/SDL12/include/SDL_cpuinfo.h
@@ -1,36 +1,33 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_cpuinfo.h,v 1.5 2004/01/24 05:47:18 slouken Exp $";
-#endif
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* CPU feature detection for SDL */
#ifndef _SDL_cpuinfo_h
#define _SDL_cpuinfo_h
+#include "SDL_stdinc.h"
+
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
@@ -39,35 +36,35 @@ extern "C" {
/* This function returns true if the CPU has the RDTSC instruction
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC();
+extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
/* This function returns true if the CPU has MMX features
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX();
+extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
/* This function returns true if the CPU has MMX Ext. features
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt();
+extern DECLSPEC SDL_bool SDLCALL SDL_HasMMXExt(void);
/* This function returns true if the CPU has 3DNow features
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow();
+extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
/* This function returns true if the CPU has 3DNow! Ext. features
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt();
+extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNowExt(void);
/* This function returns true if the CPU has SSE features
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE();
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
/* This function returns true if the CPU has SSE2 features
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2();
+extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
/* This function returns true if the CPU has AltiVec features
*/
-extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec();
+extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
diff --git a/code/SDL12/include/SDL_endian.h b/code/SDL12/include/SDL_endian.h
index 4fc2cf1..6257a64 100644
--- a/code/SDL12/include/SDL_endian.h
+++ b/code/SDL12/include/SDL_endian.h
@@ -1,52 +1,48 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_endian.h,v 1.15 2005/03/30 12:38:03 pmandin Exp $";
-#endif
-
/* Functions for reading and writing endian-specific values */
#ifndef _SDL_endian_h
#define _SDL_endian_h
-/* These functions read and write data of the specified endianness,
- dynamically translating to the host machine endianness.
+#include "SDL_stdinc.h"
- e.g.: If you want to read a 16 bit value on big-endian machine from
- an open file containing little endian values, you would use:
- value = SDL_ReadLE16(rp);
- Note that the read/write functions use SDL_RWops pointers
- instead of FILE pointers. This allows you to read and write
- endian values from large chunks of memory as well as files
- and other data sources.
-*/
+/* The two types of endianness */
+#define SDL_LIL_ENDIAN 1234
+#define SDL_BIG_ENDIAN 4321
-#include <stdio.h>
+#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
+#if defined(__hppa__) || \
+ defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
+ (defined(__MIPS__) && defined(__MISPEB__)) || \
+ defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
+ defined(__sparc__)
+#define SDL_BYTEORDER SDL_BIG_ENDIAN
+#else
+#define SDL_BYTEORDER SDL_LIL_ENDIAN
+#endif
+#endif /* !SDL_BYTEORDER */
-#include "SDL_types.h"
-#include "SDL_rwops.h"
-#include "SDL_byteorder.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -59,7 +55,8 @@ extern "C" {
static for compilers that do not support inline functions, this
header should only be included in files that actually use them.
*/
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(__GNUC__) && defined(__i386__) && \
+ !(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
static __inline__ Uint16 SDL_Swap16(Uint16 x)
{
__asm__("xchgb %b0,%h0" : "=q" (x) : "0" (x));
@@ -186,23 +183,6 @@ static __inline__ Uint64 SDL_Swap64(Uint64 x)
#define SDL_SwapBE64(X) (X)
#endif
-/* Read an item of the specified endianness and return in native format */
-extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops *src);
-extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops *src);
-extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops *src);
-extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops *src);
-extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops *src);
-extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops *src);
-
-/* Write an item of native format to the specified endianness */
-extern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops *dst, Uint16 value);
-extern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops *dst, Uint16 value);
-extern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops *dst, Uint32 value);
-extern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops *dst, Uint32 value);
-extern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops *dst, Uint64 value);
-extern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops *dst, Uint64 value);
-
-
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
diff --git a/code/SDL12/include/SDL_error.h b/code/SDL12/include/SDL_error.h
index 74e2174..26d6bfa 100644
--- a/code/SDL12/include/SDL_error.h
+++ b/code/SDL12/include/SDL_error.h
@@ -1,35 +1,32 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_error.h,v 1.8 2004/11/15 23:30:07 slouken Exp $";
-#endif
-
/* Simple error message routines for SDL */
#ifndef _SDL_error_h
#define _SDL_error_h
+#include "SDL_stdinc.h"
+
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
@@ -43,11 +40,13 @@ extern DECLSPEC void SDLCALL SDL_ClearError(void);
/* Private error message function - used internally */
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
+#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
typedef enum {
SDL_ENOMEM,
SDL_EFREAD,
SDL_EFWRITE,
SDL_EFSEEK,
+ SDL_UNSUPPORTED,
SDL_LASTERROR
} SDL_errorcode;
extern DECLSPEC void SDLCALL SDL_Error(SDL_errorcode code);
diff --git a/code/SDL12/include/SDL_events.h b/code/SDL12/include/SDL_events.h
index bdcf9a8..9fe918c 100644
--- a/code/SDL12/include/SDL_events.h
+++ b/code/SDL12/include/SDL_events.h
@@ -1,36 +1,32 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_events.h,v 1.11 2004/08/20 18:57:01 slouken Exp $";
-#endif
-
/* Include file for SDL event handling */
#ifndef _SDL_events_h
#define _SDL_events_h
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
#include "SDL_active.h"
#include "SDL_keyboard.h"
#include "SDL_mouse.h"
@@ -43,8 +39,13 @@ static char rcsid =
extern "C" {
#endif
+/* General keyboard/mouse state definitions */
+#define SDL_RELEASED 0
+#define SDL_PRESSED 1
+
/* Event enumerations */
-enum { SDL_NOEVENT = 0, /* Unused (do not remove) */
+typedef enum {
+ SDL_NOEVENT = 0, /* Unused (do not remove) */
SDL_ACTIVEEVENT, /* Application loses/gains visibility */
SDL_KEYDOWN, /* Keys pressed */
SDL_KEYUP, /* Keys released */
@@ -74,14 +75,16 @@ enum { SDL_NOEVENT = 0, /* Unused (do not remove) */
It is the number of bits in the event mask datatype -- Uint32
*/
SDL_NUMEVENTS = 32
-};
+} SDL_EventType;
/* Predefined event masks */
#define SDL_EVENTMASK(X) (1<<(X))
-enum {
+typedef enum {
SDL_ACTIVEEVENTMASK = SDL_EVENTMASK(SDL_ACTIVEEVENT),
SDL_KEYDOWNMASK = SDL_EVENTMASK(SDL_KEYDOWN),
SDL_KEYUPMASK = SDL_EVENTMASK(SDL_KEYUP),
+ SDL_KEYEVENTMASK = SDL_EVENTMASK(SDL_KEYDOWN)|
+ SDL_EVENTMASK(SDL_KEYUP),
SDL_MOUSEMOTIONMASK = SDL_EVENTMASK(SDL_MOUSEMOTION),
SDL_MOUSEBUTTONDOWNMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONDOWN),
SDL_MOUSEBUTTONUPMASK = SDL_EVENTMASK(SDL_MOUSEBUTTONUP),
@@ -102,7 +105,7 @@ enum {
SDL_VIDEOEXPOSEMASK = SDL_EVENTMASK(SDL_VIDEOEXPOSE),
SDL_QUITMASK = SDL_EVENTMASK(SDL_QUIT),
SDL_SYSWMEVENTMASK = SDL_EVENTMASK(SDL_SYSWMEVENT)
-};
+} SDL_EventMask ;
#define SDL_ALLEVENTS 0xFFFFFFFF
/* Application visibility event structure */
@@ -214,7 +217,7 @@ typedef struct SDL_SysWMEvent {
} SDL_SysWMEvent;
/* General event structure */
-typedef union {
+typedef union SDL_Event {
Uint8 type;
SDL_ActiveEvent active;
SDL_KeyboardEvent key;
diff --git a/code/SDL12/include/SDL_getenv.h b/code/SDL12/include/SDL_getenv.h
index 42037dd..853b9ce 100644
--- a/code/SDL12/include/SDL_getenv.h
+++ b/code/SDL12/include/SDL_getenv.h
@@ -1,30 +1,24 @@
-
-/* Not all environments have a working getenv()/putenv() */
-
-#if defined(macintosh) || defined(_WIN32_WCE)
-#define NEED_SDL_GETENV
-#endif
-
-#ifdef NEED_SDL_GETENV
-
-#include "begin_code.h"
-/* Set up for C function definitions, even when using C++ */
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Put a variable of the form "name=value" into the environment */
-extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
-#define putenv(X) SDL_putenv(X)
-
-/* Retrieve a variable named "name" from the environment */
-extern DECLSPEC char * SDLCALL SDL_getenv(const char *name);
-#define getenv(X) SDL_getenv(X)
-
-/* Ends C function definitions when using C++ */
-#ifdef __cplusplus
-}
-#endif
-#include "close_code.h"
-
-#endif /* NEED_GETENV */
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/* DEPRECATED */
+#include "SDL_stdinc.h"
diff --git a/code/SDL12/include/SDL_joystick.h b/code/SDL12/include/SDL_joystick.h
index 1fa2d07..e4f72f1 100644
--- a/code/SDL12/include/SDL_joystick.h
+++ b/code/SDL12/include/SDL_joystick.h
@@ -1,36 +1,32 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_joystick.h,v 1.7 2004/07/18 19:05:06 slouken Exp $";
-#endif
-
/* Include file for SDL joystick event handling */
#ifndef _SDL_joystick_h
#define _SDL_joystick_h
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
diff --git a/code/SDL12/include/SDL_keyboard.h b/code/SDL12/include/SDL_keyboard.h
index 99e2a12..1ad7dca 100644
--- a/code/SDL12/include/SDL_keyboard.h
+++ b/code/SDL12/include/SDL_keyboard.h
@@ -1,36 +1,32 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_keyboard.h,v 1.7 2004/07/18 22:57:40 slouken Exp $";
-#endif
-
/* Include file for SDL keyboard event handling */
#ifndef _SDL_keyboard_h
#define _SDL_keyboard_h
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
#include "SDL_keysym.h"
#include "begin_code.h"
@@ -88,6 +84,7 @@ extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
* If 'delay' is set to 0, keyboard repeat is disabled.
*/
extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
+extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
/*
* Get a snapshot of the current state of the keyboard.
diff --git a/code/SDL12/include/SDL_keysym.h b/code/SDL12/include/SDL_keysym.h
index 0e46ab9..ff44a03 100644
--- a/code/SDL12/include/SDL_keysym.h
+++ b/code/SDL12/include/SDL_keysym.h
@@ -1,30 +1,25 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_keysym.h,v 1.6 2004/01/04 16:49:07 slouken Exp $";
-#endif
-
#ifndef _SDL_keysym_h
#define _SDL_keysym_h
diff --git a/code/SDL12/include/SDL_loadso.h b/code/SDL12/include/SDL_loadso.h
index 6045a99..ce96449 100644
--- a/code/SDL12/include/SDL_loadso.h
+++ b/code/SDL12/include/SDL_loadso.h
@@ -1,30 +1,25 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_loadso.h,v 1.5 2004/01/04 16:49:07 slouken Exp $";
-#endif
-
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* System dependent library loading routines */
@@ -46,6 +41,9 @@ static char rcsid =
#ifndef _SDL_loadso_h
#define _SDL_loadso_h
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
diff --git a/code/SDL12/include/SDL_main.h b/code/SDL12/include/SDL_main.h
index eacaca0..cf8b728 100644
--- a/code/SDL12/include/SDL_main.h
+++ b/code/SDL12/include/SDL_main.h
@@ -1,38 +1,35 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_main.h,v 1.13 2005/09/27 09:00:42 icculus Exp $";
-#endif
-
#ifndef _SDL_main_h
#define _SDL_main_h
+#include "SDL_stdinc.h"
+
/* Redefine main() on Win32 and MacOS so that it is called by winmain.c */
-#if defined(WIN32) || defined(_WIN32) || \
+#if defined(__WIN32__) || \
(defined(__MWERKS__) && !defined(__BEOS__)) || \
- defined(macintosh) || defined(__APPLE__) || \
+ defined(__MACOS__) || defined(__MACOSX__) || \
defined(__SYMBIAN32__) || defined(QWS)
#ifdef __cplusplus
@@ -57,10 +54,9 @@ extern C_LINKAGE int SDL_main(int argc, char *argv[]);
/* From the SDL library code -- needed for registering the app on Win32 */
-#if defined(WIN32)
-#include "SDL_types.h"
-#include "begin_code.h"
+#ifdef __WIN32__
+#include "begin_code.h"
#ifdef __cplusplus
extern "C" {
#endif
@@ -70,7 +66,7 @@ extern DECLSPEC void SDLCALL SDL_SetModuleHandle(void *hInst);
/* This can also be called, but is no longer necessary */
extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);
/* This can also be called, but is no longer necessary (SDL_Quit calls it) */
-extern DECLSPEC void SDLCALL SDL_UnregisterApp();
+extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
#ifdef __cplusplus
}
#endif
@@ -78,9 +74,9 @@ extern DECLSPEC void SDLCALL SDL_UnregisterApp();
#endif
/* From the SDL library code -- needed for registering QuickDraw on MacOS */
-#if defined(macintosh)
-#include "begin_code.h"
+#if defined(__MACOS__)
+#include "begin_code.h"
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/code/SDL12/include/SDL_mouse.h b/code/SDL12/include/SDL_mouse.h
index e250293..c2364d8 100644
--- a/code/SDL12/include/SDL_mouse.h
+++ b/code/SDL12/include/SDL_mouse.h
@@ -1,36 +1,32 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_mouse.h,v 1.9 2005/04/17 10:16:30 icculus Exp $";
-#endif
-
/* Include file for SDL mouse event handling */
#ifndef _SDL_mouse_h
#define _SDL_mouse_h
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
#include "SDL_video.h"
#include "begin_code.h"
@@ -120,7 +116,7 @@ extern DECLSPEC int SDLCALL SDL_ShowCursor(int toggle);
Button 4: Mouse wheel up (may also be a real button)
Button 5: Mouse wheel down (may also be a real button)
*/
-#define SDL_BUTTON(X) (SDL_PRESSED << ((X)-1))
+#define SDL_BUTTON(X) (1 << ((X)-1))
#define SDL_BUTTON_LEFT 1
#define SDL_BUTTON_MIDDLE 2
#define SDL_BUTTON_RIGHT 3
diff --git a/code/SDL12/include/SDL_mutex.h b/code/SDL12/include/SDL_mutex.h
index 37e5c9c..0016528 100644
--- a/code/SDL12/include/SDL_mutex.h
+++ b/code/SDL12/include/SDL_mutex.h
@@ -1,30 +1,25 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_mutex.h,v 1.7 2004/01/04 16:49:07 slouken Exp $";
-#endif
-
#ifndef _SDL_mutex_h
#define _SDL_mutex_h
@@ -33,8 +28,8 @@ static char rcsid =
These are independent of the other SDL routines.
*/
-#include "SDL_main.h"
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -145,6 +140,7 @@ extern DECLSPEC int SDLCALL SDL_CondBroadcast(SDL_cond *cond);
/* Wait on the condition variable, unlocking the provided mutex.
The mutex must be locked before entering this function!
+ The mutex is re-locked once the condition variable is signaled.
Returns 0 when it is signaled, or -1 on error.
*/
extern DECLSPEC int SDLCALL SDL_CondWait(SDL_cond *cond, SDL_mutex *mut);
diff --git a/code/SDL12/include/SDL_opengl.h b/code/SDL12/include/SDL_opengl.h
index a7e6625..36c0a30 100644
--- a/code/SDL12/include/SDL_opengl.h
+++ b/code/SDL12/include/SDL_opengl.h
@@ -1,33 +1,30 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_opengl.h,v 1.10 2004/08/20 22:32:05 slouken Exp $";
-#endif
-
/* This is a simple file to encapsulate the OpenGL API headers */
-#ifdef WIN32
+#include "SDL_config.h"
+
+#ifdef __WIN32__
#define WIN32_LEAN_AND_MEAN
#ifndef NOMINMAX
#define NOMINMAX /* Don't defined min() and max() */
@@ -37,9 +34,12 @@ static char rcsid =
#ifndef NO_SDL_GLEXT
#define __glext_h_ /* Don't let gl.h include glext.h */
#endif
-#if defined(__APPLE__) && defined(__MACH__)
+#if defined(__MACOSX__)
#include <OpenGL/gl.h> /* Header File For The OpenGL Library */
#include <OpenGL/glu.h> /* Header File For The GLU Library */
+#elif defined(__MACOS__)
+#include <gl.h> /* Header File For The OpenGL Library */
+#include <glu.h> /* Header File For The GLU Library */
#else
#include <GL/gl.h> /* Header File For The OpenGL Library */
#include <GL/glu.h> /* Header File For The GLU Library */
@@ -79,7 +79,7 @@ extern "C" {
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
-** Inc. The Original Code is Copyright (c) 1991-2002 Silicon Graphics, Inc.
+** Inc. The Original Code is Copyright (c) 1991-2004 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
@@ -107,9 +107,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
-/* glext.h last updated 2003/1/12 */
+/* glext.h last updated 2005/06/20 */
/* Current version at http://oss.sgi.com/projects/ogl-sample/registry/ */
-#define GL_GLEXT_VERSION 21
+#define GL_GLEXT_VERSION 29
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -306,7 +306,6 @@ extern "C" {
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
#define GL_CLAMP_TO_BORDER 0x812D
-#define GL_CLAMP_TO_BORDER_SGIS 0x812D
#define GL_COMBINE 0x8570
#define GL_COMBINE_RGB 0x8571
#define GL_COMBINE_ALPHA 0x8572
@@ -412,7 +411,7 @@ extern "C" {
#define GL_DYNAMIC_READ 0x88E9
#define GL_DYNAMIC_COPY 0x88EA
#define GL_SAMPLES_PASSED 0x8914
-#define GL_FOG_COORD_SOURCE GL_FOG_COORDINATE_SOURCE
+#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE
#define GL_FOG_COORD GL_FOG_COORDINATE
#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE
#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE
@@ -428,6 +427,93 @@ extern "C" {
#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA
#endif
+#ifndef GL_VERSION_2_0
+#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define GL_STENCIL_BACK_FUNC 0x8800
+#define GL_STENCIL_BACK_FAIL 0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define GL_MAX_DRAW_BUFFERS 0x8824
+#define GL_DRAW_BUFFER0 0x8825
+#define GL_DRAW_BUFFER1 0x8826
+#define GL_DRAW_BUFFER2 0x8827
+#define GL_DRAW_BUFFER3 0x8828
+#define GL_DRAW_BUFFER4 0x8829
+#define GL_DRAW_BUFFER5 0x882A
+#define GL_DRAW_BUFFER6 0x882B
+#define GL_DRAW_BUFFER7 0x882C
+#define GL_DRAW_BUFFER8 0x882D
+#define GL_DRAW_BUFFER9 0x882E
+#define GL_DRAW_BUFFER10 0x882F
+#define GL_DRAW_BUFFER11 0x8830
+#define GL_DRAW_BUFFER12 0x8831
+#define GL_DRAW_BUFFER13 0x8832
+#define GL_DRAW_BUFFER14 0x8833
+#define GL_DRAW_BUFFER15 0x8834
+#define GL_BLEND_EQUATION_ALPHA 0x883D
+#define GL_POINT_SPRITE 0x8861
+#define GL_COORD_REPLACE 0x8862
+#define GL_MAX_VERTEX_ATTRIBS 0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_MAX_TEXTURE_COORDS 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_FRAGMENT_SHADER 0x8B30
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
+#define GL_MAX_VARYING_FLOATS 0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_SHADER_TYPE 0x8B4F
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_SAMPLER_1D 0x8B5D
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_3D 0x8B5F
+#define GL_SAMPLER_CUBE 0x8B60
+#define GL_SAMPLER_1D_SHADOW 0x8B61
+#define GL_SAMPLER_2D_SHADOW 0x8B62
+#define GL_DELETE_STATUS 0x8B80
+#define GL_COMPILE_STATUS 0x8B81
+#define GL_LINK_STATUS 0x8B82
+#define GL_VALIDATE_STATUS 0x8B83
+#define GL_INFO_LOG_LENGTH 0x8B84
+#define GL_ATTACHED_SHADERS 0x8B85
+#define GL_ACTIVE_UNIFORMS 0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define GL_SHADER_SOURCE_LENGTH 0x8B88
+#define GL_ACTIVE_ATTRIBUTES 0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define GL_CURRENT_PROGRAM 0x8B8D
+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
+#define GL_LOWER_LEFT 0x8CA1
+#define GL_UPPER_LEFT 0x8CA2
+#define GL_STENCIL_BACK_REF 0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
+#endif
+
#ifndef GL_ARB_multitexture
#define GL_TEXTURE0_ARB 0x84C0
#define GL_TEXTURE1_ARB 0x84C1
@@ -804,6 +890,14 @@ extern "C" {
#define GL_FLOAT_MAT2_ARB 0x8B5A
#define GL_FLOAT_MAT3_ARB 0x8B5B
#define GL_FLOAT_MAT4_ARB 0x8B5C
+#define GL_SAMPLER_1D_ARB 0x8B5D
+#define GL_SAMPLER_2D_ARB 0x8B5E
+#define GL_SAMPLER_3D_ARB 0x8B5F
+#define GL_SAMPLER_CUBE_ARB 0x8B60
+#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61
+#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62
+#define GL_SAMPLER_2D_RECT_ARB 0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80
#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81
#define GL_OBJECT_LINK_STATUS_ARB 0x8B82
@@ -828,9 +922,11 @@ extern "C" {
#ifndef GL_ARB_fragment_shader
#define GL_FRAGMENT_SHADER_ARB 0x8B30
#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B
#endif
#ifndef GL_ARB_shading_language_100
+#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C
#endif
#ifndef GL_ARB_texture_non_power_of_two
@@ -841,6 +937,78 @@ extern "C" {
#define GL_COORD_REPLACE_ARB 0x8862
#endif
+#ifndef GL_ARB_fragment_program_shadow
+#endif
+
+#ifndef GL_ARB_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_ARB 0x8824
+#define GL_DRAW_BUFFER0_ARB 0x8825
+#define GL_DRAW_BUFFER1_ARB 0x8826
+#define GL_DRAW_BUFFER2_ARB 0x8827
+#define GL_DRAW_BUFFER3_ARB 0x8828
+#define GL_DRAW_BUFFER4_ARB 0x8829
+#define GL_DRAW_BUFFER5_ARB 0x882A
+#define GL_DRAW_BUFFER6_ARB 0x882B
+#define GL_DRAW_BUFFER7_ARB 0x882C
+#define GL_DRAW_BUFFER8_ARB 0x882D
+#define GL_DRAW_BUFFER9_ARB 0x882E
+#define GL_DRAW_BUFFER10_ARB 0x882F
+#define GL_DRAW_BUFFER11_ARB 0x8830
+#define GL_DRAW_BUFFER12_ARB 0x8831
+#define GL_DRAW_BUFFER13_ARB 0x8832
+#define GL_DRAW_BUFFER14_ARB 0x8833
+#define GL_DRAW_BUFFER15_ARB 0x8834
+#endif
+
+#ifndef GL_ARB_texture_rectangle
+#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
+#endif
+
+#ifndef GL_ARB_color_buffer_float
+#define GL_RGBA_FLOAT_MODE_ARB 0x8820
+#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A
+#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B
+#define GL_CLAMP_READ_COLOR_ARB 0x891C
+#define GL_FIXED_ONLY_ARB 0x891D
+#endif
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_HALF_FLOAT_ARB 0x140B
+#endif
+
+#ifndef GL_ARB_texture_float
+#define GL_TEXTURE_RED_TYPE_ARB 0x8C10
+#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11
+#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12
+#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13
+#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14
+#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15
+#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16
+#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17
+#define GL_RGBA32F_ARB 0x8814
+#define GL_RGB32F_ARB 0x8815
+#define GL_ALPHA32F_ARB 0x8816
+#define GL_INTENSITY32F_ARB 0x8817
+#define GL_LUMINANCE32F_ARB 0x8818
+#define GL_LUMINANCE_ALPHA32F_ARB 0x8819
+#define GL_RGBA16F_ARB 0x881A
+#define GL_RGB16F_ARB 0x881B
+#define GL_ALPHA16F_ARB 0x881C
+#define GL_INTENSITY16F_ARB 0x881D
+#define GL_LUMINANCE16F_ARB 0x881E
+#define GL_LUMINANCE_ALPHA16F_ARB 0x881F
+#endif
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF
+#endif
+
#ifndef GL_EXT_abgr
#define GL_ABGR_EXT 0x8000
#endif
@@ -1171,6 +1339,10 @@ extern "C" {
#define GL_CLAMP_TO_EDGE_SGIS 0x812F
#endif
+#ifndef GL_SGIS_texture_border_clamp
+#define GL_CLAMP_TO_BORDER_SGIS 0x812D
+#endif
+
#ifndef GL_EXT_blend_minmax
#define GL_FUNC_ADD_EXT 0x8006
#define GL_MIN_EXT 0x8007
@@ -2714,6 +2886,11 @@ extern "C" {
#define GL_DRAW_BUFFER15_ATI 0x8834
#endif
+#ifndef GL_ATI_pixel_format_float
+#define GL_TYPE_RGBA_FLOAT_ATI 0x8820
+#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835
+#endif
+
#ifndef GL_ATI_texture_env_combine3
#define GL_MODULATE_ADD_ATI 0x8744
#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
@@ -2800,6 +2977,11 @@ extern "C" {
#ifndef GL_ATI_vertex_attrib_array_object
#endif
+#ifndef GL_OES_read_format
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B
+#endif
+
#ifndef GL_EXT_depth_bounds_test
#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890
#define GL_DEPTH_BOUNDS_EXT 0x8891
@@ -2826,10 +3008,100 @@ extern "C" {
#define GL_YCBCR_MESA 0x8757
#endif
+#ifndef GL_EXT_pixel_buffer_object
+#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB
+#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF
+#endif
+
+#ifndef GL_NV_fragment_program_option
+#endif
+
+#ifndef GL_NV_fragment_program2
+#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4
+#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5
+#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6
+#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7
+#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8
+#endif
+
+#ifndef GL_NV_vertex_program2_option
+/* reuse GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+/* reuse GL_MAX_PROGRAM_CALL_DEPTH_NV */
+#endif
+
+#ifndef GL_NV_vertex_program3
+/* reuse GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+#endif
+
+#ifndef GL_EXT_framebuffer_object
+#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506
+#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8
+#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6
+#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4
+#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9
+#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD
+#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF
+#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0
+#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1
+#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2
+#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3
+#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4
+#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5
+#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6
+#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7
+#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8
+#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9
+#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA
+#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB
+#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC
+#define GL_COLOR_ATTACHMENT13_EXT 0x8CED
+#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE
+#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF
+#define GL_DEPTH_ATTACHMENT_EXT 0x8D00
+#define GL_STENCIL_ATTACHMENT_EXT 0x8D20
+#define GL_FRAMEBUFFER_EXT 0x8D40
+#define GL_RENDERBUFFER_EXT 0x8D41
+#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42
+#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44
+#define GL_STENCIL_INDEX1_EXT 0x8D46
+#define GL_STENCIL_INDEX4_EXT 0x8D47
+#define GL_STENCIL_INDEX8_EXT 0x8D48
+#define GL_STENCIL_INDEX16_EXT 0x8D49
+#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#endif
+
/*************************************************************/
#include <stddef.h>
+#ifndef GL_VERSION_2_0
+/* GL type for program/shader text */
+typedef char GLchar; /* native character */
+#endif
+
#ifndef GL_VERSION_1_5
/* GL types for handling large vertex buffer objects */
typedef ptrdiff_t GLintptr;
@@ -2843,13 +3115,17 @@ typedef ptrdiff_t GLsizeiptrARB;
#endif
#ifndef GL_ARB_shader_objects
-/* GL types for handling shader object handles and characters */
+/* GL types for handling shader object handles and program/shader text */
typedef char GLcharARB; /* native character */
typedef unsigned int GLhandleARB; /* shader object handle */
#endif
+/* GL types for "half" precision (s10e5) float data in host memory */
+#ifndef GL_ARB_half_float_pixel
+typedef unsigned short GLhalfARB;
+#endif
+
#ifndef GL_NV_half_float
-/* GL type for representing NVIDIA "half" floating point type in host memory */
typedef unsigned short GLhalfNV;
#endif
@@ -3173,6 +3449,198 @@ typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pn
typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
#endif
+#ifndef GL_VERSION_2_0
+#define GL_VERSION_2_0 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationSeparate (GLenum, GLenum);
+GLAPI void APIENTRY glDrawBuffers (GLsizei, const GLenum *);
+GLAPI void APIENTRY glStencilOpSeparate (GLenum, GLenum, GLenum, GLenum);
+GLAPI void APIENTRY glStencilFuncSeparate (GLenum, GLenum, GLint, GLuint);
+GLAPI void APIENTRY glStencilMaskSeparate (GLenum, GLuint);
+GLAPI void APIENTRY glAttachShader (GLuint, GLuint);
+GLAPI void APIENTRY glBindAttribLocation (GLuint, GLuint, const GLchar *);
+GLAPI void APIENTRY glCompileShader (GLuint);
+GLAPI GLuint APIENTRY glCreateProgram (void);
+GLAPI GLuint APIENTRY glCreateShader (GLenum);
+GLAPI void APIENTRY glDeleteProgram (GLuint);
+GLAPI void APIENTRY glDeleteShader (GLuint);
+GLAPI void APIENTRY glDetachShader (GLuint, GLuint);
+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint);
+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint);
+GLAPI void APIENTRY glGetActiveAttrib (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
+GLAPI void APIENTRY glGetActiveUniform (GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
+GLAPI void APIENTRY glGetAttachedShaders (GLuint, GLsizei, GLsizei *, GLuint *);
+GLAPI GLint APIENTRY glGetAttribLocation (GLuint, const GLchar *);
+GLAPI void APIENTRY glGetProgramiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetProgramInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI void APIENTRY glGetShaderiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetShaderInfoLog (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI void APIENTRY glGetShaderSource (GLuint, GLsizei, GLsizei *, GLchar *);
+GLAPI GLint APIENTRY glGetUniformLocation (GLuint, const GLchar *);
+GLAPI void APIENTRY glGetUniformfv (GLuint, GLint, GLfloat *);
+GLAPI void APIENTRY glGetUniformiv (GLuint, GLint, GLint *);
+GLAPI void APIENTRY glGetVertexAttribdv (GLuint, GLenum, GLdouble *);
+GLAPI void APIENTRY glGetVertexAttribfv (GLuint, GLenum, GLfloat *);
+GLAPI void APIENTRY glGetVertexAttribiv (GLuint, GLenum, GLint *);
+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint, GLenum, GLvoid* *);
+GLAPI GLboolean APIENTRY glIsProgram (GLuint);
+GLAPI GLboolean APIENTRY glIsShader (GLuint);
+GLAPI void APIENTRY glLinkProgram (GLuint);
+GLAPI void APIENTRY glShaderSource (GLuint, GLsizei, const GLchar* *, const GLint *);
+GLAPI void APIENTRY glUseProgram (GLuint);
+GLAPI void APIENTRY glUniform1f (GLint, GLfloat);
+GLAPI void APIENTRY glUniform2f (GLint, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform3f (GLint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform4f (GLint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glUniform1i (GLint, GLint);
+GLAPI void APIENTRY glUniform2i (GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform3i (GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform4i (GLint, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glUniform1fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform2fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform3fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform4fv (GLint, GLsizei, const GLfloat *);
+GLAPI void APIENTRY glUniform1iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform2iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform3iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniform4iv (GLint, GLsizei, const GLint *);
+GLAPI void APIENTRY glUniformMatrix2fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix3fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glUniformMatrix4fv (GLint, GLsizei, GLboolean, const GLfloat *);
+GLAPI void APIENTRY glValidateProgram (GLuint);
+GLAPI void APIENTRY glVertexAttrib1d (GLuint, GLdouble);
+GLAPI void APIENTRY glVertexAttrib1dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib1f (GLuint, GLfloat);
+GLAPI void APIENTRY glVertexAttrib1fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib1s (GLuint, GLshort);
+GLAPI void APIENTRY glVertexAttrib1sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib2d (GLuint, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib2dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib2f (GLuint, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib2fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib2s (GLuint, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib2sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib3d (GLuint, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib3dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib3f (GLuint, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib3fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib3s (GLuint, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib3sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttrib4bv (GLuint, const GLbyte *);
+GLAPI void APIENTRY glVertexAttrib4d (GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertexAttrib4dv (GLuint, const GLdouble *);
+GLAPI void APIENTRY glVertexAttrib4f (GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertexAttrib4fv (GLuint, const GLfloat *);
+GLAPI void APIENTRY glVertexAttrib4iv (GLuint, const GLint *);
+GLAPI void APIENTRY glVertexAttrib4s (GLuint, GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertexAttrib4sv (GLuint, const GLshort *);
+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint, const GLubyte *);
+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint, const GLuint *);
+GLAPI void APIENTRY glVertexAttrib4usv (GLuint, const GLushort *);
+GLAPI void APIENTRY glVertexAttribPointer (GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask);
+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+#endif
+
#ifndef GL_ARB_multitexture
#define GL_ARB_multitexture 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -3365,8 +3833,8 @@ typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type
#define GL_ARB_texture_env_dot3 1
#endif
-#ifndef GL_ARB_texture_mirror_repeat
-#define GL_ARB_texture_mirror_repeat 1
+#ifndef GL_ARB_texture_mirrored_repeat
+#define GL_ARB_texture_mirrored_repeat 1
#endif
#ifndef GL_ARB_depth_texture
@@ -3716,6 +4184,42 @@ typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj,
#define GL_ARB_point_sprite 1
#endif
+#ifndef GL_ARB_fragment_program_shadow
+#define GL_ARB_fragment_program_shadow 1
+#endif
+
+#ifndef GL_ARB_draw_buffers
+#define GL_ARB_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glDrawBuffersARB (GLsizei, const GLenum *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+#ifndef GL_ARB_texture_rectangle
+#define GL_ARB_texture_rectangle 1
+#endif
+
+#ifndef GL_ARB_color_buffer_float
+#define GL_ARB_color_buffer_float 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glClampColorARB (GLenum, GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp);
+#endif
+
+#ifndef GL_ARB_half_float_pixel
+#define GL_ARB_half_float_pixel 1
+#endif
+
+#ifndef GL_ARB_texture_float
+#define GL_ARB_texture_float 1
+#endif
+
+#ifndef GL_ARB_pixel_buffer_object
+#define GL_ARB_pixel_buffer_object 1
+#endif
+
#ifndef GL_EXT_abgr
#define GL_EXT_abgr 1
#endif
@@ -5742,6 +6246,13 @@ GLAPI void APIENTRY glDrawBuffersATI (GLsizei, const GLenum *);
typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum *bufs);
#endif
+#ifndef GL_ATI_pixel_format_float
+#define GL_ATI_pixel_format_float 1
+/* This is really a WGL extension, but defines some associated GL enums.
+ * ATI does not export "GL_ATI_pixel_format_float" in the GL_EXTENSIONS string.
+ */
+#endif
+
#ifndef GL_ATI_texture_env_combine3
#define GL_ATI_texture_env_combine3 1
#endif
@@ -5931,6 +6442,10 @@ typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index,
typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint *params);
#endif
+#ifndef GL_OES_read_format
+#define GL_OES_read_format 1
+#endif
+
#ifndef GL_EXT_depth_bounds_test
#define GL_EXT_depth_bounds_test 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -5959,6 +6474,74 @@ typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLen
#define GL_MESA_ycbcr_texture 1
#endif
+#ifndef GL_EXT_pixel_buffer_object
+#define GL_EXT_pixel_buffer_object 1
+#endif
+
+#ifndef GL_NV_fragment_program_option
+#define GL_NV_fragment_program_option 1
+#endif
+
+#ifndef GL_NV_fragment_program2
+#define GL_NV_fragment_program2 1
+#endif
+
+#ifndef GL_NV_vertex_program2_option
+#define GL_NV_vertex_program2_option 1
+#endif
+
+#ifndef GL_NV_vertex_program3
+#define GL_NV_vertex_program3 1
+#endif
+
+#ifndef GL_EXT_framebuffer_object
+#define GL_EXT_framebuffer_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI GLboolean APIENTRY glIsRenderbufferEXT (GLuint);
+GLAPI void APIENTRY glBindRenderbufferEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteRenderbuffersEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenRenderbuffersEXT (GLsizei, GLuint *);
+GLAPI void APIENTRY glRenderbufferStorageEXT (GLenum, GLenum, GLsizei, GLsizei);
+GLAPI void APIENTRY glGetRenderbufferParameterivEXT (GLenum, GLenum, GLint *);
+GLAPI GLboolean APIENTRY glIsFramebufferEXT (GLuint);
+GLAPI void APIENTRY glBindFramebufferEXT (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteFramebuffersEXT (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenFramebuffersEXT (GLsizei, GLuint *);
+GLAPI GLenum APIENTRY glCheckFramebufferStatusEXT (GLenum);
+GLAPI void APIENTRY glFramebufferTexture1DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTexture2DEXT (GLenum, GLenum, GLenum, GLuint, GLint);
+GLAPI void APIENTRY glFramebufferTexture3DEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLint);
+GLAPI void APIENTRY glFramebufferRenderbufferEXT (GLenum, GLenum, GLenum, GLuint);
+GLAPI void APIENTRY glGetFramebufferAttachmentParameterivEXT (GLenum, GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGenerateMipmapEXT (GLenum);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer);
+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer);
+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint *framebuffers);
+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint *framebuffers);
+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target);
+#endif
+
+#ifndef GL_GREMEDY_string_marker
+#define GL_GREMEDY_string_marker 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glStringMarkerGREMEDY (GLsizei, const GLvoid *);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid *string);
+#endif
+
#ifdef __cplusplus
}
diff --git a/code/SDL12/include/SDL_platform.h b/code/SDL12/include/SDL_platform.h
new file mode 100644
index 0000000..80274bc
--- /dev/null
+++ b/code/SDL12/include/SDL_platform.h
@@ -0,0 +1,104 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/* Try to get a standard set of platform defines */
+
+#ifndef _SDL_platform_h
+#define _SDL_platform_h
+
+#if defined(_AIX)
+#undef __AIX__
+#define __AIX__ 1
+#endif
+#if defined(AMIGA) || defined(__AMIGA) || defined(__amigados__)
+#undef __AMIGA__
+#define __AMIGA__ 1
+#endif
+#if defined(__BEOS__)
+#undef __BEOS__
+#define __BEOS__ 1
+#endif
+#if defined(bsdi) || defined(__bsdi) || defined(__bsdi__)
+#undef __BSDI__
+#define __BSDI__ 1
+#endif
+#if defined(_arch_dreamcast)
+#undef __DREAMCAST__
+#define __DREAMCAST__ 1
+#endif
+#if defined(__FreeBSD__) || defined(__DragonFly__)
+#undef __FREEBSD__
+#define __FREEBSD__ 1
+#endif
+#if defined(hpux) || defined(__hpux) || defined(__hpux__)
+#undef __HPUX__
+#define __HPUX__ 1
+#endif
+#if defined(sgi) || defined(__sgi) || defined(__sgi__) || defined(_SGI_SOURCE)
+#undef __IRIX__
+#define __IRIX__ 1
+#endif
+#if defined(linux) || defined(__linux) || defined(__linux__)
+#undef __LINUX__
+#define __LINUX__ 1
+#endif
+#if defined(__APPLE__)
+#undef __MACOSX__
+#define __MACOSX__ 1
+#elif defined(macintosh)
+#undef __MACOS__
+#define __MACOS__ 1
+#endif
+#if defined(__NetBSD__)
+#undef __NETBSD__
+#define __NETBSD__ 1
+#endif
+#if defined(__OpenBSD__)
+#undef __OPENBSD__
+#define __OPENBSD__ 1
+#endif
+#if defined(__OS2__)
+#undef __OS2__
+#define __OS2__ 1
+#endif
+#if defined(osf) || defined(__osf) || defined(__osf__) || defined(_OSF_SOURCE)
+#undef __OSF__
+#define __OSF__ 1
+#endif
+#if defined(__QNXNTO__)
+#undef __QNXNTO__
+#define __QNXNTO__ 1
+#endif
+#if defined(riscos) || defined(__riscos) || defined(__riscos__)
+#undef __RISCOS__
+#define __RISCOS__ 1
+#endif
+#if defined(__SVR4)
+#undef __SOLARIS__
+#define __SOLARIS__ 1
+#endif
+#if defined(WIN32) || defined(_WIN32)
+#undef __WIN32__
+#define __WIN32__ 1
+#endif
+
+#endif /* _SDL_platform_h */
diff --git a/code/SDL12/include/SDL_quit.h b/code/SDL12/include/SDL_quit.h
index a4e2d08..fcf40fb 100644
--- a/code/SDL12/include/SDL_quit.h
+++ b/code/SDL12/include/SDL_quit.h
@@ -1,35 +1,33 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_quit.h,v 1.5 2004/01/04 16:49:07 slouken Exp $";
-#endif
-
/* Include file for SDL quit event handling */
#ifndef _SDL_quit_h
#define _SDL_quit_h
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
+
/*
An SDL_QUITEVENT is generated when the user tries to close the application
window. If it is ignored or filtered out, the window will remain open.
diff --git a/code/SDL12/include/SDL_rwops.h b/code/SDL12/include/SDL_rwops.h
index 43aa678..d7e01d8 100644
--- a/code/SDL12/include/SDL_rwops.h
+++ b/code/SDL12/include/SDL_rwops.h
@@ -1,40 +1,34 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_rwops.h,v 1.8 2004/08/20 18:57:01 slouken Exp $";
-#endif
-
/* This file provides a general interface for SDL to read and write
data sources. It can easily be extended to files, memory, etc.
*/
-#ifndef _SDL_RWops_h
-#define _SDL_RWops_h
-
-#include <stdio.h>
+#ifndef _SDL_rwops_h
+#define _SDL_rwops_h
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -68,10 +62,18 @@ typedef struct SDL_RWops {
Uint32 type;
union {
+#ifdef __WIN32__
+ struct {
+ int append;
+ void* h;
+ } win32io;
+#endif
+#ifdef HAVE_STDIO_H
struct {
int autoclose;
FILE *fp;
} stdio;
+#endif
struct {
Uint8 *base;
Uint8 *here;
@@ -89,7 +91,9 @@ typedef struct SDL_RWops {
extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromFile(const char *file, const char *mode);
+#ifdef HAVE_STDIO_H
extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromFP(FILE *fp, int autoclose);
+#endif
extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromMem(void *mem, int size);
extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromConstMem(const void *mem, int size);
@@ -97,18 +101,39 @@ extern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromConstMem(const void *mem, int size
extern DECLSPEC SDL_RWops * SDLCALL SDL_AllocRW(void);
extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops *area);
+#define RW_SEEK_SET 0 /* Seek from the beginning of data */
+#define RW_SEEK_CUR 1 /* Seek relative to current read point */
+#define RW_SEEK_END 2 /* Seek relative to the end of data */
+
/* Macros to easily read and write from an SDL_RWops structure */
#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
-#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, SEEK_CUR)
+#define SDL_RWtell(ctx) (ctx)->seek(ctx, 0, RW_SEEK_CUR)
#define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
#define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
#define SDL_RWclose(ctx) (ctx)->close(ctx)
+/* Read an item of the specified endianness and return in native format */
+extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops *src);
+extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops *src);
+extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops *src);
+extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops *src);
+extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops *src);
+extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops *src);
+
+/* Write an item of native format to the specified endianness */
+extern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops *dst, Uint16 value);
+extern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops *dst, Uint16 value);
+extern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops *dst, Uint32 value);
+extern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops *dst, Uint32 value);
+extern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops *dst, Uint64 value);
+extern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops *dst, Uint64 value);
+
+
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include "close_code.h"
-#endif /* _SDL_RWops_h */
+#endif /* _SDL_rwops_h */
diff --git a/code/SDL12/include/SDL_stdinc.h b/code/SDL12/include/SDL_stdinc.h
new file mode 100644
index 0000000..6253562
--- /dev/null
+++ b/code/SDL12/include/SDL_stdinc.h
@@ -0,0 +1,586 @@
+/*
+ SDL - Simple DirectMedia Layer
+ Copyright (C) 1997-2006 Sam Lantinga
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+ Sam Lantinga
+ slouken@libsdl.org
+*/
+
+/* This is a general header that includes C language support */
+
+#ifndef _SDL_stdinc_h
+#define _SDL_stdinc_h
+
+#include "SDL_config.h"
+
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_STDIO_H
+#include <stdio.h>
+#endif
+#if defined(STDC_HEADERS)
+# include <stdlib.h>
+# include <stddef.h>
+# include <stdarg.h>
+#else
+# if defined(HAVE_STDLIB_H)
+# include <stdlib.h>
+# elif defined(HAVE_MALLOC_H)
+# include <malloc.h>
+# endif
+# if defined(HAVE_STDDEF_H)
+# include <stddef.h>
+# endif
+# if defined(HAVE_STDARG_H)
+# include <stdarg.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if defined(HAVE_INTTYPES_H)
+# include <inttypes.h>
+#elif defined(HAVE_STDINT_H)
+# include <stdint.h>
+#endif
+#ifdef HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+#ifdef HAVE_ICONV_H
+# include <iconv.h>
+#endif
+
+/* The number of elements in an array */
+#define SDL_arraysize(array) (sizeof(array)/sizeof(array[0]))
+#define SDL_TABLESIZE(table) SDL_arraysize(table)
+
+/* Basic data types */
+typedef enum SDL_bool {
+ SDL_FALSE = 0,
+ SDL_TRUE = 1
+} SDL_bool;
+
+typedef int8_t Sint8;
+typedef uint8_t Uint8;
+typedef int16_t Sint16;
+typedef uint16_t Uint16;
+typedef int32_t Sint32;
+typedef uint32_t Uint32;
+
+#ifdef SDL_HAS_64BIT_TYPE
+typedef int64_t Sint64;
+typedef uint64_t Uint64;
+#else
+/* This is really just a hack to prevent the compiler from complaining */
+typedef struct {
+ Uint32 hi;
+ Uint32 lo;
+} Uint64, Sint64;
+#endif
+
+/* Make sure the types really have the right sizes */
+#define SDL_COMPILE_TIME_ASSERT(name, x) \
+ typedef int SDL_dummy_ ## name[(x) * 2 - 1]
+
+SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
+SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
+SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
+SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
+SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
+SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
+SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
+SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
+
+/* Check to make sure enums are the size of ints, for structure packing.
+ For both Watcom C/C++ and Borland C/C++ the compiler option that makes
+ enums having the size of an int must be enabled.
+ This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
+*/
+/* Enable enums always int in CodeWarrior (for MPW use "-enum int") */
+#ifdef __MWERKS__
+#pragma enumsalwaysint on
+#endif
+
+typedef enum {
+ DUMMY_ENUM_VALUE
+} SDL_DUMMY_ENUM;
+
+SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
+
+
+#include "begin_code.h"
+/* Set up for C function definitions, even when using C++ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef HAVE_MALLOC
+#define SDL_malloc malloc
+#else
+extern DECLSPEC void * SDLCALL SDL_malloc(size_t size);
+#endif
+
+#ifdef HAVE_CALLOC
+#define SDL_calloc calloc
+#else
+extern DECLSPEC void * SDLCALL SDL_calloc(size_t nmemb, size_t size);
+#endif
+
+#ifdef HAVE_REALLOC
+#define SDL_realloc realloc
+#else
+extern DECLSPEC void * SDLCALL SDL_realloc(void *mem, size_t size);
+#endif
+
+#ifdef HAVE_FREE
+#define SDL_free free
+#else
+extern DECLSPEC void SDLCALL SDL_free(void *mem);
+#endif
+
+#if defined(HAVE_ALLOCA) && !defined(alloca)
+# if defined(HAVE_ALLOCA_H)
+# include <alloca.h>
+# elif defined(__GNUC__)
+# define alloca __builtin_alloca
+# elif defined(_MSC_VER)
+# include <malloc.h>
+# define alloca _alloca
+# elif defined(__WATCOMC__)
+# include <malloc.h>
+# elif defined(__DMC__)
+# include <stdlib.h>
+# elif defined(__AIX__)
+ #pragma alloca
+# elif defined(__MRC__)
+ void *alloca (unsigned);
+# else
+ char *alloca ();
+# endif
+#endif
+#ifdef HAVE_ALLOCA
+#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*count)
+#define SDL_stack_free(data)
+#else
+#define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*count)
+#define SDL_stack_free(data) SDL_free(data)
+#endif
+
+#ifdef HAVE_GETENV
+#define SDL_getenv getenv
+#else
+extern DECLSPEC char * SDLCALL SDL_getenv(const char *name);
+#endif
+
+#ifdef HAVE_PUTENV
+#define SDL_putenv putenv
+#else
+extern DECLSPEC int SDLCALL SDL_putenv(const char *variable);
+#endif
+
+#ifdef HAVE_QSORT
+#define SDL_qsort qsort
+#else
+extern DECLSPEC void SDLCALL SDL_qsort(void *base, size_t nmemb, size_t size,
+ int (*compare)(const void *, const void *));
+#endif
+
+#ifdef HAVE_ABS
+#define SDL_abs abs
+#else
+#define SDL_abs(X) ((X) < 0 ? -(X) : (X))
+#endif
+
+#define SDL_min(x, y) (((x) < (y)) ? (x) : (y))
+#define SDL_max(x, y) (((x) > (y)) ? (x) : (y))
+
+#ifdef HAVE_CTYPE_H
+#define SDL_isdigit(X) isdigit(X)
+#define SDL_isspace(X) isspace(X)
+#define SDL_toupper(X) toupper(X)
+#define SDL_tolower(X) tolower(X)
+#else
+#define SDL_isdigit(X) (((X) >= '0') && ((X) <= '9'))
+#define SDL_isspace(X) (((X) == ' ') || ((X) == '\t') || ((X) == '\r') || ((X) == '\n'))
+#define SDL_toupper(X) (((X) >= 'a') && ((X) <= 'z') ? ('A'+((X)-'a')) : (X))
+#define SDL_tolower(X) (((X) >= 'A') && ((X) <= 'Z') ? ('a'+((X)-'A')) : (X))
+#endif
+
+#ifdef HAVE_MEMSET
+#define SDL_memset memset
+#else
+extern DECLSPEC void * SDLCALL SDL_memset(void *dst, int c, size_t len);
+#endif
+
+#if defined(__GNUC__) && defined(i386)
+#define SDL_memset4(dst, val, len) \
+do { \
+ int u0, u1, u2; \
+ __asm__ __volatile__ ( \
+ "cld\n\t" \
+ "rep ; stosl\n\t" \
+ : "=&D" (u0), "=&a" (u1), "=&c" (u2) \
+ : "0" (dst), "1" (val), "2" ((Uint32)(len)) \
+ : "memory" ); \
+} while(0)
+#endif
+#ifndef SDL_memset4
+#define SDL_memset4(dst, val, len) \
+do { \
+ unsigned _count = (len); \
+ unsigned _n = (_count + 3) / 4; \
+ Uint32 *_p = (Uint32 *)(dst); \
+ Uint32 _val = (val); \
+ switch (_count % 4) { \
+ case 0: do { *_p++ = _val; \
+ case 3: *_p++ = _val; \
+ case 2: *_p++ = _val; \
+ case 1: *_p++ = _val; \
+ } while ( --_n ); \
+ } \
+} while(0)
+#endif
+
+#if defined(__GNUC__) && defined(i386)
+#define SDL_memcpy(dst, src, len) \
+do { \
+ int u0, u1, u2; \
+ __asm__ __volatile__ ( \
+ "cld\n\t" \
+ "rep ; movsl\n\t" \
+ "testb $2,%b4\n\t" \
+ "je 1f\n\t" \
+ "movsw\n" \
+ "1:\ttestb $1,%b4\n\t" \
+ "je 2f\n\t" \
+ "movsb\n" \
+ "2:" \
+ : "=&c" (u0), "=&D" (u1), "=&S" (u2) \
+ : "0" ((unsigned)(len)/4), "q" (len), "1" (dst),"2" (src) \
+ : "memory" ); \
+} while(0)
+#endif
+#ifndef SDL_memcpy
+#ifdef HAVE_MEMCPY
+#define SDL_memcpy memcpy
+#elif defined(HAVE_BCOPY)
+#define SDL_memcpy(d, s, n) bcopy((s), (d), (n))
+#else
+extern DECLSPEC void * SDLCALL SDL_memcpy(void *dst, const void *src, size_t len);
+#endif
+#endif
+
+#if defined(__GNUC__) && defined(i386)
+#define SDL_memcpy4(dst, src, len) \
+do { \
+ int ecx, edi, esi; \
+ __asm__ __volatile__ ( \
+ "cld\n\t" \
+ "rep ; movsl" \
+ : "=&c" (ecx), "=&D" (edi), "=&S" (esi) \
+ : "0" ((unsigned)(len)), "1" (dst), "2" (src) \
+ : "memory" ); \
+} while(0)
+#endif
+#ifndef SDL_memcpy4
+#define SDL_memcpy4(dst, src, len) SDL_memcpy(dst, src, (len) << 2)
+#endif
+
+#if defined(__GNUC__) && defined(i386)
+#define SDL_revcpy(dst, src, len) \
+do { \
+ int u0, u1, u2; \
+ char *dstp = (char *)(dst); \
+ char *srcp = (char *)(src); \
+ int n = (len); \
+ if ( n >= 4 ) { \
+ __asm__ __volatile__ ( \
+ "std\n\t" \
+ "rep ; movsl\n\t" \
+ : "=&c" (u0), "=&D" (u1), "=&S" (u2) \
+ : "0" (n >> 2), \
+ "1" (dstp+(n-4)), "2" (srcp+(n-4)) \
+ : "memory" ); \
+ } \
+ switch (n & 3) { \
+ case 3: dstp[2] = srcp[2]; \
+ case 2: dstp[1] = srcp[1]; \
+ case 1: dstp[0] = srcp[0]; \
+ break; \
+ default: \
+ break; \
+ } \
+} while(0)
+#endif
+#ifndef SDL_revcpy
+extern DECLSPEC void * SDLCALL SDL_revcpy(void *dst, const void *src, size_t len);
+#endif
+
+#ifdef HAVE_MEMMOVE
+#define SDL_memmove memmove
+#elif defined(HAVE_BCOPY)
+#define SDL_memmove(d, s, n) bcopy((s), (d), (n))
+#else
+#define SDL_memmove(dst, src, len) \
+do { \
+ if ( dst < src ) { \
+ SDL_memcpy(dst, src, len); \
+ } else { \
+ SDL_revcpy(dst, src, len); \
+ } \
+} while(0)
+#endif
+
+#ifdef HAVE_MEMCMP
+#define SDL_memcmp memcmp
+#else
+extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
+#endif
+
+#ifdef HAVE_STRLEN
+#define SDL_strlen strlen
+#else
+extern DECLSPEC size_t SDLCALL SDL_strlen(const char *string);
+#endif
+
+#ifdef HAVE_STRLCPY
+#define SDL_strlcpy strlcpy
+#else
+extern DECLSPEC size_t SDLCALL SDL_strlcpy(char *dst, const char *src, size_t maxlen);
+#endif
+
+#ifdef HAVE_STRLCAT
+#define SDL_strlcat strlcat
+#else
+extern DECLSPEC size_t SDLCALL SDL_strlcat(char *dst, const char *src, size_t maxlen);
+#endif
+
+#ifdef HAVE_STRDUP
+#define SDL_strdup strdup
+#else
+extern DECLSPEC char * SDLCALL SDL_strdup(const char *string);
+#endif
+
+#ifdef HAVE__STRREV
+#define SDL_strrev _strrev
+#else
+extern DECLSPEC char * SDLCALL SDL_strrev(char *string);
+#endif
+
+#ifdef HAVE__STRUPR
+#define SDL_strupr _strupr
+#else
+extern DECLSPEC char * SDLCALL SDL_strupr(char *string);
+#endif
+
+#ifdef HAVE__STRLWR
+#define SDL_strlwr _strlwr
+#else
+extern DECLSPEC char * SDLCALL SDL_strlwr(char *string);
+#endif
+
+#ifdef HAVE_STRCHR
+#define SDL_strchr strchr
+#elif defined(HAVE_INDEX)
+#define SDL_strchr index
+#else
+extern DECLSPEC char * SDLCALL SDL_strchr(const char *string, int c);
+#endif
+
+#ifdef HAVE_STRRCHR
+#define SDL_strrchr strrchr
+#elif defined(HAVE_RINDEX)
+#define SDL_strrchr rindex
+#else
+extern DECLSPEC char * SDLCALL SDL_strrchr(const char *string, int c);
+#endif
+
+#ifdef HAVE_STRSTR
+#define SDL_strstr strstr
+#else
+extern DECLSPEC char * SDLCALL SDL_strstr(const char *haystack, const char *needle);
+#endif
+
+#ifdef HAVE_ITOA
+#define SDL_itoa itoa
+#else
+#define SDL_itoa(value, string, radix) SDL_ltoa((long)value, string, radix)
+#endif
+
+#ifdef HAVE__LTOA
+#define SDL_ltoa _ltoa
+#else
+extern DECLSPEC char * SDLCALL SDL_ltoa(long value, char *string, int radix);
+#endif
+
+#ifdef HAVE__UITOA
+#define SDL_uitoa _uitoa
+#else
+#define SDL_uitoa(value, string, radix) SDL_ultoa((long)value, string, radix)
+#endif
+
+#ifdef HAVE__ULTOA
+#define SDL_ultoa _ultoa
+#else
+extern DECLSPEC char * SDLCALL SDL_ultoa(unsigned long value, char *string, int radix);
+#endif
+
+#ifdef HAVE_STRTOL
+#define SDL_strtol strtol
+#else
+extern DECLSPEC long SDLCALL SDL_strtol(const char *string, char **endp, int base);
+#endif
+
+#ifdef HAVE_STRTOUL
+#define SDL_strtoul strtoul
+#else
+extern DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *string, char **endp, int base);
+#endif
+
+#ifdef SDL_HAS_64BIT_TYPE
+
+#ifdef HAVE__I64TOA
+#define SDL_lltoa _i64toa
+#else
+extern DECLSPEC char* SDLCALL SDL_lltoa(Sint64 value, char *string, int radix);
+#endif
+
+#ifdef HAVE__UI64TOA
+#define SDL_ulltoa _ui64toa
+#else
+extern DECLSPEC char* SDLCALL SDL_ulltoa(Uint64 value, char *string, int radix);
+#endif
+
+#ifdef HAVE_STRTOLL
+#define SDL_strtoll strtoll
+#else
+extern DECLSPEC Sint64 SDLCALL SDL_strtoll(const char *string, char **endp, int base);
+#endif
+
+#ifdef HAVE_STRTOULL
+#define SDL_strtoull strtoull
+#else
+extern DECLSPEC Uint64 SDLCALL SDL_strtoull(const char *string, char **endp, int base);
+#endif
+
+#endif /* SDL_HAS_64BIT_TYPE */
+
+#ifdef HAVE_STRTOD
+#define SDL_strtod strtod
+#else
+extern DECLSPEC double SDLCALL SDL_strtod(const char *string, char **endp);
+#endif
+
+#ifdef HAVE_ATOI
+#define SDL_atoi atoi
+#else
+#define SDL_atoi(X) SDL_strtol(X, NULL, 0)
+#endif
+
+#ifdef HAVE_ATOF
+#define SDL_atof atof
+#else
+#define SDL_atof(X) SDL_strtod(X, NULL)
+#endif
+
+#ifdef HAVE_STRCMP
+#define SDL_strcmp strcmp
+#else
+extern DECLSPEC int SDLCALL SDL_strcmp(const char *str1, const char *str2);
+#endif
+
+#ifdef HAVE_STRNCMP
+#define SDL_strncmp strncmp
+#else
+extern DECLSPEC int SDLCALL SDL_strncmp(const char *str1, const char *str2, size_t maxlen);
+#endif
+
+#ifdef HAVE_STRCASECMP
+#define SDL_strcasecmp strcasecmp
+#elif defined(HAVE__STRICMP)
+#define SDL_strcasecmp _stricmp
+#else
+extern DECLSPEC int SDLCALL SDL_strcasecmp(const char *str1, const char *str2);
+#endif
+
+#ifdef HAVE_STRNCASECMP
+#define SDL_strncasecmp strncasecmp
+#elif defined(HAVE__STRNICMP)
+#define SDL_strncasecmp _strnicmp
+#else
+extern DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *str2, size_t maxlen);
+#endif
+
+#ifdef HAVE_SSCANF
+#define SDL_sscanf sscanf
+#else
+extern DECLSPEC int SDLCALL SDL_sscanf(const char *text, const char *fmt, ...);
+#endif
+
+#ifdef HAVE_SNPRINTF
+#define SDL_snprintf snprintf
+#else
+extern DECLSPEC int SDLCALL SDL_snprintf(char *text, size_t maxlen, const char *fmt, ...);
+#endif
+
+#ifdef HAVE_VSNPRINTF
+#define SDL_vsnprintf vsnprintf
+#else
+extern DECLSPEC int SDLCALL SDL_vsnprintf(char *text, size_t maxlen, const char *fmt, va_list ap);
+#endif
+
+/* The SDL implementation of iconv() returns these error codes */
+#define SDL_ICONV_ERROR (size_t)-1
+#define SDL_ICONV_E2BIG (size_t)-2
+#define SDL_ICONV_EILSEQ (size_t)-3
+#define SDL_ICONV_EINVAL (size_t)-4
+
+#ifdef HAVE_ICONV
+#define SDL_iconv_t iconv_t
+#define SDL_iconv_open iconv_open
+#define SDL_iconv_close iconv_close
+extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
+#else
+typedef struct _SDL_iconv_t *SDL_iconv_t;
+extern DECLSPEC SDL_iconv_t SDLCALL SDL_iconv_open(const char *tocode, const char *fromcode);
+extern DECLSPEC int SDLCALL SDL_iconv_close(SDL_iconv_t cd);
+extern DECLSPEC size_t SDLCALL SDL_iconv(SDL_iconv_t cd, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
+#endif
+/* This function converts a string between encodings in one pass, returning a
+ string that must be freed with SDL_free() or NULL on error.
+*/
+extern DECLSPEC char * SDLCALL SDL_iconv_string(const char *tocode, const char *fromcode, char *inbuf, size_t inbytesleft);
+#define SDL_iconv_utf8_ascii(S) SDL_iconv_string("ASCII", "UTF-8", S, SDL_strlen(S)+1)
+#define SDL_iconv_utf8_latin1(S) SDL_iconv_string("LATIN1", "UTF-8", S, SDL_strlen(S)+1)
+#define SDL_iconv_utf8_ucs2(S) (Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)
+#define SDL_iconv_utf8_ucs4(S) (Uint32 *)SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1)
+
+/* Ends C function definitions when using C++ */
+#ifdef __cplusplus
+}
+#endif
+#include "close_code.h"
+
+#endif /* _SDL_stdinc_h */
diff --git a/code/SDL12/include/SDL_syswm.h b/code/SDL12/include/SDL_syswm.h
index 0322976..e7f3513 100644
--- a/code/SDL12/include/SDL_syswm.h
+++ b/code/SDL12/include/SDL_syswm.h
@@ -1,35 +1,32 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_syswm.h,v 1.18 2005/09/08 06:16:13 icculus Exp $";
-#endif
-
/* Include file for SDL custom system window manager hooks */
#ifndef _SDL_syswm_h
#define _SDL_syswm_h
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
#include "SDL_version.h"
#include "begin_code.h"
@@ -48,23 +45,18 @@ struct SDL_SysWMinfo;
typedef struct SDL_SysWMinfo SDL_SysWMinfo;
#else
+/* This is the structure for custom window manager events */
+#if defined(SDL_VIDEO_DRIVER_X11)
#if defined(__APPLE__) && defined(__MACH__)
-// conflicts with Quickdraw.h
+/* conflicts with Quickdraw.h */
#define Cursor X11Cursor
#endif
-/* This is the structure for custom window manager events */
-#if (defined(unix) || defined(__unix__) || defined(_AIX) || \
- defined(__OpenBSD__) || defined(__NetBSD__) || \
- (defined(__APPLE__) && defined(__MACH__))) && \
- (!defined(DISABLE_X11) && !defined(__CYGWIN32__) && !defined(ENABLE_NANOX) && \
- !defined(__QNXNTO__))
- /* AIX is unix, of course, but the native compiler CSet doesn't define unix */
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#if defined(__APPLE__) && defined(__MACH__)
-// matches the re-define above
+/* matches the re-define above */
#undef Cursor
#endif
@@ -108,7 +100,7 @@ typedef struct SDL_SysWMinfo {
} info;
} SDL_SysWMinfo;
-#elif defined(ENABLE_NANOX)
+#elif defined(SDL_VIDEO_DRIVER_NANOX)
#include <microwin/nano-X.h>
/* The generic custom event structure */
@@ -123,7 +115,7 @@ typedef struct SDL_SysWMinfo {
GR_WINDOW_ID window ; /* The display window */
} SDL_SysWMinfo;
-#elif defined(WIN32)
+#elif defined(SDL_VIDEO_DRIVER_WINDIB) || defined(SDL_VIDEO_DRIVER_DDRAW) || defined(SDL_VIDEO_DRIVER_GAPI)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -143,7 +135,7 @@ typedef struct SDL_SysWMinfo {
HGLRC hglrc; /* The OpenGL context, if any */
} SDL_SysWMinfo;
-#elif defined(__riscos__)
+#elif defined(SDL_VIDEO_DRIVER_RISCOS)
/* RISC OS custom event structure */
struct SDL_SysWMmsg {
@@ -160,7 +152,7 @@ typedef struct SDL_SysWMinfo {
int window; /* The RISC OS display window */
} SDL_SysWMinfo;
-#elif defined(__QNXNTO__)
+#elif defined(SDL_VIDEO_DRIVER_PHOTON)
#include <sys/neutrino.h>
#include <Ph.h>
@@ -190,7 +182,7 @@ typedef struct SDL_SysWMinfo {
int data;
} SDL_SysWMinfo;
-#endif /* OS type */
+#endif /* video driver type */
#endif /* SDL_PROTOTYPES_ONLY */
diff --git a/code/SDL12/include/SDL_thread.h b/code/SDL12/include/SDL_thread.h
index d826f97..e0a35b1 100644
--- a/code/SDL12/include/SDL_thread.h
+++ b/code/SDL12/include/SDL_thread.h
@@ -1,30 +1,25 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_thread.h,v 1.7 2004/08/20 18:57:01 slouken Exp $";
-#endif
-
#ifndef _SDL_thread_h
#define _SDL_thread_h
@@ -33,8 +28,8 @@ static char rcsid =
These are independent of the other SDL routines.
*/
-#include "SDL_main.h"
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
/* Thread synchronization primitives */
#include "SDL_mutex.h"
@@ -50,7 +45,52 @@ struct SDL_Thread;
typedef struct SDL_Thread SDL_Thread;
/* Create a thread */
+#if (defined(__WIN32__) && !defined(HAVE_LIBC)) || defined(__OS2__)
+/*
+ We compile SDL into a DLL on OS/2. This means, that it's the DLL which
+ creates a new thread for the calling process with the SDL_CreateThread()
+ API. There is a problem with this, that only the RTL of the SDL.DLL will
+ be initialized for those threads, and not the RTL of the calling application!
+ To solve this, we make a little hack here.
+ We'll always use the caller's _beginthread() and _endthread() APIs to
+ start a new thread. This way, if it's the SDL.DLL which uses this API,
+ then the RTL of SDL.DLL will be used to create the new thread, and if it's
+ the application, then the RTL of the application will be used.
+ So, in short:
+ Always use the _beginthread() and _endthread() of the calling runtime library!
+*/
+#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
+#ifndef _WIN32_WCE
+#include <process.h> /* This has _beginthread() and _endthread() defined! */
+#endif
+
+#ifdef __OS2__
+typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void *arg);
+typedef void (*pfnSDL_CurrentEndThread)(void);
+#elif __GNUC__
+typedef unsigned long (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
+ unsigned (__stdcall *func)(void *), void *arg,
+ unsigned, unsigned *threadID);
+typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code);
+#else
+typedef uintptr_t (__cdecl *pfnSDL_CurrentBeginThread) (void *, unsigned,
+ unsigned (__stdcall *func)(void *), void *arg,
+ unsigned, unsigned *threadID);
+typedef void (__cdecl *pfnSDL_CurrentEndThread)(unsigned code);
+#endif
+
+extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (SDLCALL *fn)(void *), void *data, pfnSDL_CurrentBeginThread pfnBeginThread, pfnSDL_CurrentEndThread pfnEndThread);
+
+#ifdef __OS2__
+#define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthread, _endthread)
+#elif defined(_WIN32_WCE)
+#define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, NULL, NULL)
+#else
+#define SDL_CreateThread(fn, data) SDL_CreateThread(fn, data, _beginthreadex, _endthreadex)
+#endif
+#else
extern DECLSPEC SDL_Thread * SDLCALL SDL_CreateThread(int (SDLCALL *fn)(void *), void *data);
+#endif
/* Get the 32-bit thread identifier for the current thread */
extern DECLSPEC Uint32 SDLCALL SDL_ThreadID(void);
diff --git a/code/SDL12/include/SDL_timer.h b/code/SDL12/include/SDL_timer.h
index d28c170..d21159f 100644
--- a/code/SDL12/include/SDL_timer.h
+++ b/code/SDL12/include/SDL_timer.h
@@ -1,37 +1,32 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_timer.h,v 1.7 2005/01/13 23:24:56 slouken Exp $";
-#endif
-
#ifndef _SDL_timer_h
#define _SDL_timer_h
/* Header for the SDL time management routines */
-#include "SDL_main.h"
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
diff --git a/code/SDL12/include/SDL_types.h b/code/SDL12/include/SDL_types.h
index 8f65b42..853b9ce 100644
--- a/code/SDL12/include/SDL_types.h
+++ b/code/SDL12/include/SDL_types.h
@@ -1,120 +1,24 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_types.h,v 1.13 2004/07/21 04:53:26 slouken Exp $";
-#endif
-
-/* General data types used by the SDL library */
-
-#ifndef _SDL_types_h
-#define _SDL_types_h
-
-/* The number of elements in a table */
-#define SDL_TABLESIZE(table) (sizeof(table)/sizeof(table[0]))
-
-/* Basic data types */
-typedef enum {
- SDL_FALSE = 0,
- SDL_TRUE = 1
-} SDL_bool;
-
-#ifdef H_MMBASIC /* mmbasic.h (Tru64 MME) */
-/* Some of the basic types are already defined in mmbasic.h */
-typedef signed char Sint8;
-typedef signed short Sint16;
-typedef signed int Sint32;
-#else
-typedef unsigned char Uint8;
-typedef signed char Sint8;
-typedef unsigned short Uint16;
-typedef signed short Sint16;
-typedef unsigned int Uint32;
-typedef signed int Sint32;
-#endif
-
-/* Figure out how to support 64-bit datatypes */
-#if !defined(__STRICT_ANSI__)
-#ifdef __osf__ /* Tru64 */
-#define SDL_HAS_64BIT_TYPE long
-#elif defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_C) || defined(__DECC)
-#define SDL_HAS_64BIT_TYPE long long
-#elif defined(_MSC_VER) /* VC++ */
-#define SDL_HAS_64BIT_TYPE __int64
-#endif
-#endif /* !__STRICT_ANSI__ */
-
-/* The 64-bit type isn't available on EPOC/Symbian OS */
-#ifdef __SYMBIAN32__
-#undef SDL_HAS_64BIT_TYPE
-#endif
-
-/* The 64-bit datatype isn't supported on all platforms */
-#ifdef SDL_HAS_64BIT_TYPE
-#ifndef H_MMBASIC
-typedef unsigned SDL_HAS_64BIT_TYPE Uint64;
-#endif
-typedef SDL_HAS_64BIT_TYPE Sint64;
-#else
-/* This is really just a hack to prevent the compiler from complaining */
-typedef struct {
- Uint32 hi;
- Uint32 lo;
-} Uint64, Sint64;
-#endif
-
-/* Make sure the types really have the right sizes */
-#define SDL_COMPILE_TIME_ASSERT(name, x) \
- typedef int SDL_dummy_ ## name[(x) * 2 - 1]
-
-SDL_COMPILE_TIME_ASSERT(uint8, sizeof(Uint8) == 1);
-SDL_COMPILE_TIME_ASSERT(sint8, sizeof(Sint8) == 1);
-SDL_COMPILE_TIME_ASSERT(uint16, sizeof(Uint16) == 2);
-SDL_COMPILE_TIME_ASSERT(sint16, sizeof(Sint16) == 2);
-SDL_COMPILE_TIME_ASSERT(uint32, sizeof(Uint32) == 4);
-SDL_COMPILE_TIME_ASSERT(sint32, sizeof(Sint32) == 4);
-SDL_COMPILE_TIME_ASSERT(uint64, sizeof(Uint64) == 8);
-SDL_COMPILE_TIME_ASSERT(sint64, sizeof(Sint64) == 8);
-
-/* Check to make sure enums are the size of ints, for structure packing.
- For both Watcom C/C++ and Borland C/C++ the compiler option that makes
- enums having the size of an int must be enabled.
- This is "-b" for Borland C/C++ and "-ei" for Watcom C/C++ (v11).
-*/
-/* Enable enums always int in CodeWarrior (for MPW use "-enum int") */
-#ifdef __MWERKS__
-#pragma enumsalwaysint on
-#endif
-
-typedef enum {
- DUMMY_ENUM_VALUE
-} SDL_DUMMY_ENUM;
-
-SDL_COMPILE_TIME_ASSERT(enum, sizeof(SDL_DUMMY_ENUM) == sizeof(int));
-
-#undef SDL_COMPILE_TIME_ASSERT
-
-/* General keyboard/mouse state definitions */
-enum { SDL_PRESSED = 0x01, SDL_RELEASED = 0x00 };
-
-#endif
+/* DEPRECATED */
+#include "SDL_stdinc.h"
diff --git a/code/SDL12/include/SDL_version.h b/code/SDL12/include/SDL_version.h
index 8483d49..262aa7b 100644
--- a/code/SDL12/include/SDL_version.h
+++ b/code/SDL12/include/SDL_version.h
@@ -1,36 +1,31 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_version.h,v 1.16 2005/04/17 10:16:30 icculus Exp $";
-#endif
-
/* This header defines the current SDL version */
#ifndef _SDL_version_h
#define _SDL_version_h
-#include "SDL_types.h"
+#include "SDL_stdinc.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -42,7 +37,7 @@ extern "C" {
*/
#define SDL_MAJOR_VERSION 1
#define SDL_MINOR_VERSION 2
-#define SDL_PATCHLEVEL 9
+#define SDL_PATCHLEVEL 11
typedef struct SDL_version {
Uint8 major;
diff --git a/code/SDL12/include/SDL_video.h b/code/SDL12/include/SDL_video.h
index d79701a..720022e 100644
--- a/code/SDL12/include/SDL_video.h
+++ b/code/SDL12/include/SDL_video.h
@@ -1,39 +1,32 @@
/*
SDL - Simple DirectMedia Layer
- Copyright (C) 1997-2004 Sam Lantinga
+ Copyright (C) 1997-2006 Sam Lantinga
This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
+ modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Sam Lantinga
slouken@libsdl.org
*/
-#ifdef SAVE_RCSID
-static char rcsid =
- "@(#) $Id: SDL_video.h,v 1.19 2005/01/02 05:11:16 slouken Exp $";
-#endif
-
/* Header file for access to the SDL raw framebuffer window */
#ifndef _SDL_video_h
#define _SDL_video_h
-#include <stdio.h>
-
-#include "SDL_types.h"
-#include "SDL_mutex.h"
+#include "SDL_stdinc.h"
+#include "SDL_error.h"
#include "SDL_rwops.h"
#include "begin_code.h"
@@ -168,6 +161,8 @@ typedef struct SDL_VideoInfo {
Uint32 UnusedBits3 :16;
Uint32 video_mem; /* The total amount of video memory (in K) */
SDL_PixelFormat *vfmt; /* Value: The format of the video surface */
+ int current_w; /* Value: The current video mode width */
+ int current_h; /* Value: The current video mode height */
} SDL_VideoInfo;
@@ -218,7 +213,9 @@ typedef enum {
SDL_GL_ACCUM_ALPHA_SIZE,
SDL_GL_STEREO,
SDL_GL_MULTISAMPLEBUFFERS,
- SDL_GL_MULTISAMPLESAMPLES
+ SDL_GL_MULTISAMPLESAMPLES,
+ SDL_GL_ACCELERATED_VISUAL,
+ SDL_GL_SWAP_CONTROL
} SDL_GLattr;
/* flags for SDL_SetPalette() */
@@ -779,19 +776,15 @@ extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay *overlay);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Dynamically load a GL driver, if SDL is built with dynamic GL.
+ * Dynamically load an OpenGL library, or the default one if path is NULL
*
- * SDL links normally with the OpenGL library on your system by default,
- * but you can compile it to dynamically load the GL driver at runtime.
* If you do this, you need to retrieve all of the GL functions used in
* your program from the dynamic library using SDL_GL_GetProcAddress().
- *
- * This is disabled in default builds of SDL.
*/
extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
/*
- * Get the address of a GL function (for extension functions)
+ * Get the address of a GL function
*/
extern DECLSPEC void * SDLCALL SDL_GL_GetProcAddress(const char* proc);
@@ -829,7 +822,7 @@ extern DECLSPEC void SDLCALL SDL_GL_Unlock(void);
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Sets/Gets the title and icon text of the display window
+ * Sets/Gets the title and icon text of the display window (UTF-8 encoded)
*/
extern DECLSPEC void SDLCALL SDL_WM_SetCaption(const char *title, const char *icon);
extern DECLSPEC void SDLCALL SDL_WM_GetCaption(char **title, char **icon);
diff --git a/code/SDL12/include/begin_code.h b/code/SDL12/include/begin_code.h
index 925d379..4027933 100644
--- a/code/SDL12/include/begin_code.h
+++ b/code/SDL12/include/begin_code.h
@@ -31,43 +31,56 @@
#endif
#define _begin_code_h
-/* Make sure the correct platform symbols are defined */
-#if !defined(WIN32) && defined(_WIN32)
-#define WIN32
-#endif /* Windows */
-
/* Some compilers use a special export keyword */
#ifndef DECLSPEC
-# ifdef __BEOS__
+# if defined(__BEOS__)
# if defined(__GNUC__)
# define DECLSPEC __declspec(dllexport)
# else
# define DECLSPEC __declspec(export)
# endif
-# else
-# ifdef WIN32
+# elif defined(__WIN32__)
# ifdef __BORLANDC__
# ifdef BUILD_SDL
# define DECLSPEC
# else
-# define DECLSPEC __declspec(dllimport)
+# define DECLSPEC __declspec(dllimport)
# endif
# else
# define DECLSPEC __declspec(dllexport)
# endif
+# elif defined(__OS2__)
+# ifdef __WATCOMC__
+# ifdef BUILD_SDL
+# define DECLSPEC __declspec(dllexport)
+# else
+# define DECLSPEC
+# endif
+# else
+# define DECLSPEC
+# endif
# else
-# define DECLSPEC
-# endif
+# if defined(__GNUC__) && __GNUC__ >= 4
+# define DECLSPEC __attribute__ ((visibility("default")))
+# else
+# define DECLSPEC
+# endif
# endif
#endif
/* By default SDL uses the C calling convention */
#ifndef SDLCALL
-#if defined(WIN32) && !defined(__GNUC__)
+#if defined(__WIN32__) && !defined(__GNUC__)
#define SDLCALL __cdecl
#else
+#ifdef __OS2__
+/* But on OS/2, we use the _System calling convention */
+/* to be compatible with every compiler */
+#define SDLCALL _System
+#else
#define SDLCALL
#endif
+#endif
#endif /* SDLCALL */
/* Removed DECLSPEC on Symbian OS because SDL cannot be a DLL in EPOC */
@@ -89,7 +102,7 @@
#pragma nopackwarning
#endif
#pragma pack(push,4)
-#elif (defined(__MWERKS__) && defined(macintosh))
+#elif (defined(__MWERKS__) && defined(__MACOS__))
#pragma options align=mac68k4byte
#pragma enumsalwaysint on
#endif /* Compiler needs structure packing set */
@@ -134,4 +147,4 @@
#define NULL ((void *)0)
#endif
#endif /* NULL */
-#endif /* ! MacOS X - breaks precompiled headers */
+#endif /* ! Mac OS X - breaks precompiled headers */
diff --git a/code/SDL12/include/close_code.h b/code/SDL12/include/close_code.h
index ca6da95..afbb650 100644
--- a/code/SDL12/include/close_code.h
+++ b/code/SDL12/include/close_code.h
@@ -31,7 +31,7 @@
#ifdef __BORLANDC__
#pragma nopackwarning
#endif
-#if (defined(__MWERKS__) && defined(macintosh))
+#if (defined(__MWERKS__) && defined(__MACOS__))
#pragma options align=reset
#pragma enumsalwaysint reset
#else