Updated for Visual Studio Express 2005
authorSam Lantinga
Fri, 24 Feb 2006 08:17:28 +0000
changeset 14234ed717f9e509
parent 1422 d2ee8da60262
child 1424 7a610f25c12f
Updated for Visual Studio Express 2005
VisualC.zip
include/SDL.h
include/SDL_config_amiga.h
include/SDL_config_dreamcast.h
include/SDL_config_macos.h
include/SDL_config_macosx.h
include/SDL_config_win32.h
include/SDL_endian.h
include/SDL_windows.h
src/main/win32/SDL_win32_main.c
     1.1 Binary file VisualC.zip has changed
     2.1 --- a/include/SDL.h	Fri Feb 24 07:26:31 2006 +0000
     2.2 +++ b/include/SDL.h	Fri Feb 24 08:17:28 2006 +0000
     2.3 @@ -25,6 +25,7 @@
     2.4  #ifndef _SDL_H
     2.5  #define _SDL_H
     2.6  
     2.7 +#include "SDL_main.h"
     2.8  #include "SDL_stdinc.h"
     2.9  #include "SDL_audio.h"
    2.10  #include "SDL_cdrom.h"
     3.1 --- a/include/SDL_config_amiga.h	Fri Feb 24 07:26:31 2006 +0000
     3.2 +++ b/include/SDL_config_amiga.h	Fri Feb 24 08:17:28 2006 +0000
     3.3 @@ -50,7 +50,6 @@
     3.4  
     3.5  /* Enable various audio drivers */
     3.6  #define SDL_AUDIO_DRIVER_AHI	1
     3.7 -#define SDL_AUDIO_DRIVER_DISK	1
     3.8  
     3.9  /* Enable various cdrom drivers */
    3.10  #define SDL_CDROM_DUMMY	1
    3.11 @@ -69,7 +68,6 @@
    3.12  
    3.13  /* Enable various video drivers */
    3.14  #define SDL_VIDEO_DRIVER_CYBERGRAPHICS	1
    3.15 -#define SDL_VIDEO_DRIVER_DUMMY	1
    3.16  
    3.17  /* Enable OpenGL support */
    3.18  #define SDL_VIDEO_OPENGL	1
     4.1 --- a/include/SDL_config_dreamcast.h	Fri Feb 24 07:26:31 2006 +0000
     4.2 +++ b/include/SDL_config_dreamcast.h	Fri Feb 24 08:17:28 2006 +0000
     4.3 @@ -52,7 +52,6 @@
     4.4  
     4.5  /* Enable various audio drivers */
     4.6  #define SDL_AUDIO_DRIVER_DC	1
     4.7 -#define SDL_AUDIO_DRIVER_DISK	1
     4.8  
     4.9  /* Enable various cdrom drivers */
    4.10  #define SDL_CDROM_DC	1
    4.11 @@ -71,6 +70,5 @@
    4.12  
    4.13  /* Enable various video drivers */
    4.14  #define SDL_VIDEO_DRIVER_DC	1
    4.15 -#define SDL_VIDEO_DRIVER_DUMMY	1
    4.16  
    4.17  #endif /* _SDL_config_dreamcast_h */
     5.1 --- a/include/SDL_config_macos.h	Fri Feb 24 07:26:31 2006 +0000
     5.2 +++ b/include/SDL_config_macos.h	Fri Feb 24 08:17:28 2006 +0000
     5.3 @@ -51,7 +51,6 @@
     5.4  #define HAVE_MEMCMP	1
     5.5  
     5.6  /* Enable various audio drivers */
     5.7 -#define SDL_AUDIO_DRIVER_DISK	1
     5.8  #define SDL_AUDIO_DRIVER_SNDMGR	1
     5.9  
    5.10  /* Enable various cdrom drivers */
    5.11 @@ -71,7 +70,6 @@
    5.12  
    5.13  /* Enable various video drivers */
    5.14  #define SDL_VIDEO_DRIVER_DRAWSPROCKET	1
    5.15 -#define SDL_VIDEO_DRIVER_DUMMY	1
    5.16  #define SDL_VIDEO_DRIVER_TOOLBOX	1
    5.17  
    5.18  /* Enable OpenGL support */
     6.1 --- a/include/SDL_config_macosx.h	Fri Feb 24 07:26:31 2006 +0000
     6.2 +++ b/include/SDL_config_macosx.h	Fri Feb 24 08:17:28 2006 +0000
     6.3 @@ -52,7 +52,6 @@
     6.4  
     6.5  /* Enable various audio drivers */
     6.6  #define SDL_AUDIO_DRIVER_COREAUDIO	1
     6.7 -#define SDL_AUDIO_DRIVER_DISK	1
     6.8  #define SDL_AUDIO_DRIVER_SNDMGR	1
     6.9  
    6.10  /* Enable various cdrom drivers */
     7.1 --- a/include/SDL_config_win32.h	Fri Feb 24 07:26:31 2006 +0000
     7.2 +++ b/include/SDL_config_win32.h	Fri Feb 24 08:17:28 2006 +0000
     7.3 @@ -25,15 +25,23 @@
     7.4  
     7.5  /* This is a set of defines to configure the SDL features */
     7.6  
     7.7 +#ifdef _MSC_VER
     7.8 +typedef __int8			int8_t;
     7.9 +typedef unsigned __int8		uint8_t;
    7.10 +typedef __int16			int16_t;
    7.11 +typedef unsigned __int16	uint16_t;
    7.12 +typedef __int32			int32_t;
    7.13 +typedef unsigned __int32	uint32_t;
    7.14 +typedef __int64			int64_t;
    7.15 +typedef unsigned __int64	uint64_t;
    7.16 +#endif
    7.17  #define SDL_HAS_64BIT_TYPE	1
    7.18  
    7.19  /* Useful headers */
    7.20  #define HAVE_STDARG_H	1
    7.21  #define HAVE_STDDEF_H	1
    7.22 -#define HAVE_INTTYPES_H	1
    7.23  
    7.24  /* Enable various audio drivers */
    7.25 -#define SDL_AUDIO_DRIVER_DISK	1
    7.26  #ifndef _WIN32_WCE
    7.27  #define SDL_AUDIO_DRIVER_DSOUND	1
    7.28  #endif
    7.29 @@ -62,7 +70,6 @@
    7.30  #ifndef _WIN32_WCE
    7.31  #define SDL_VIDEO_DRIVER_DDRAW	1
    7.32  #endif
    7.33 -#define SDL_VIDEO_DRIVER_DUMMY	1
    7.34  #ifdef _WIN32_WCE
    7.35  #define SDL_VIDEO_DRIVER_GAPI	1
    7.36  #endif
     8.1 --- a/include/SDL_endian.h	Fri Feb 24 07:26:31 2006 +0000
     8.2 +++ b/include/SDL_endian.h	Fri Feb 24 08:17:28 2006 +0000
     8.3 @@ -33,6 +33,7 @@
     8.4  
     8.5  #ifndef SDL_BYTEORDER	/* Not defined in SDL_config.h? */
     8.6  #if (defined(__i386__) || defined(__i386)) || \
     8.7 +     defined(_M_IX86) || \
     8.8       defined(__ia64__) || defined(__x86_64__) || \
     8.9      (defined(__alpha__) || defined(__alpha)) || \
    8.10      (defined(__arm__) || defined(__thumb__)) || \
     9.1 --- a/include/SDL_windows.h	Fri Feb 24 07:26:31 2006 +0000
     9.2 +++ b/include/SDL_windows.h	Fri Feb 24 08:17:28 2006 +0000
     9.3 @@ -37,9 +37,6 @@
     9.4  	   __declspec(selectany) int _fltused=1;
     9.5  #endif
     9.6  #endif /* _MSC_VER */
     9.7 -#define _INC_STDLIB
     9.8 -#define _INC_STRING
     9.9 -#define __STRALIGN_H_
    9.10  #endif/* !HAVE_LIBC */
    9.11  #include <windows.h>
    9.12  
    10.1 --- a/src/main/win32/SDL_win32_main.c	Fri Feb 24 07:26:31 2006 +0000
    10.2 +++ b/src/main/win32/SDL_win32_main.c	Fri Feb 24 08:17:28 2006 +0000
    10.3 @@ -188,6 +188,7 @@
    10.4  {
    10.5  	int n;
    10.6  	char *bufp, *appname;
    10.7 +	int status;
    10.8  
    10.9  	/* Get the class name from argv[0] */
   10.10  	appname = argv[0];
   10.11 @@ -203,7 +204,7 @@
   10.12  	else
   10.13  		n = (bufp-appname);
   10.14  
   10.15 -	bufp = (char *)alloca(n+1);
   10.16 +	bufp = SDL_stack_alloc(char, n+1);
   10.17  	if ( bufp == NULL ) {
   10.18  		return OutOfMemory();
   10.19  	}
   10.20 @@ -226,13 +227,13 @@
   10.21  	SDL_SetModuleHandle(GetModuleHandle(NULL));
   10.22  
   10.23  	/* Run the application main() code */
   10.24 -	SDL_main(argc, argv);
   10.25 +	status = SDL_main(argc, argv);
   10.26  
   10.27  	/* Exit cleanly, calling atexit() functions */
   10.28 -	exit(0);
   10.29 +	exit(status);
   10.30  
   10.31  	/* Hush little compiler, don't you cry... */
   10.32 -	return(0);
   10.33 +	return 0;
   10.34  }
   10.35  
   10.36  /* This is where execution begins [windowed apps] */
   10.37 @@ -262,7 +263,6 @@
   10.38  #ifndef NO_STDIO_REDIRECT
   10.39  	FILE *newfp;
   10.40  #endif
   10.41 -	int retval;
   10.42  
   10.43  	/* Start up DDHELP.EXE before opening any files, so DDHELP doesn't
   10.44  	   keep them open.  This is a hack.. hopefully it will be fixed 
   10.45 @@ -322,7 +322,7 @@
   10.46  
   10.47  #ifdef _WIN32_WCE
   10.48  	nLen = wcslen(szCmdLine)+128+1;
   10.49 -	bufp = (wchar_t *)alloca(nLen*2);
   10.50 +	bufp = SDL_stack_alloc(wchar_t, nLen*2);
   10.51  	wcscpy (bufp, TEXT("\""));
   10.52  	GetModuleFileName(NULL, bufp+1, 128-3);
   10.53  	wcscpy (bufp+wcslen(bufp), TEXT("\" "));
   10.54 @@ -334,7 +334,7 @@
   10.55  	}
   10.56  	WideCharToMultiByte(CP_ACP, 0, bufp, -1, cmdline, nLen, NULL, NULL);
   10.57  #else
   10.58 -	/* Grab the command line (use alloca() on Windows) */
   10.59 +	/* Grab the command line */
   10.60  	bufp = GetCommandLine();
   10.61  	nLen = SDL_strlen(bufp)+1;
   10.62  	cmdline = SDL_stack_alloc(char, nLen);
   10.63 @@ -353,9 +353,8 @@
   10.64  	ParseCommandLine(cmdline, argv);
   10.65  
   10.66  	/* Run the main program (after a little SDL initialization) */
   10.67 -	retval = console_main(argc, argv);
   10.68 +	console_main(argc, argv);
   10.69  
   10.70 -	SDL_stack_free(cmdline);
   10.71 -	SDL_stack_free(argv);
   10.72 -	return retval;
   10.73 +	/* Hush little compiler, don't you cry... */
   10.74 +	return 0;
   10.75  }