- added directx include path to VS2008 solution
authorAndreas Schiffler <aschiffler@ferzkopp.net>
Wed, 15 Sep 2010 22:15:47 -0700
changeset 488427ab20a36eba
parent 4883 511948f4919e
child 4885 ad6d5d2402db
- added directx include path to VS2008 solution
- updated shape vcproj and add it to VS2008 solution
- minor changes (i.e. typecasting) to get rid of compiler warnings in VS
VisualC/SDL/SDL_VS2008.vcproj
VisualC/SDL_VS2008.sln
VisualC/tests/testshape/testshape.vcproj
src/audio/SDL_audio.c
test/automated/rwops/TestSupportRWops_Generic.c
test/graywin.c
test/testdraw2.c
test/testfile.c
test/testgl.c
test/testoverlay.c
test/testoverlay2.c
test/testsprite.c
test/testsprite2.c
     1.1 --- a/VisualC/SDL/SDL_VS2008.vcproj	Tue Sep 14 21:57:29 2010 -0700
     1.2 +++ b/VisualC/SDL/SDL_VS2008.vcproj	Wed Sep 15 22:15:47 2010 -0700
     1.3 @@ -52,7 +52,7 @@
     1.4  			<Tool
     1.5  				Name="VCCLCompilerTool"
     1.6  				Optimization="0"
     1.7 -				AdditionalIncludeDirectories="..\..\include"
     1.8 +				AdditionalIncludeDirectories="..\..\include;C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
     1.9  				PreprocessorDefinitions="_DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__MMX__;__3dNOW__;__SSE__;__SSE2__"
    1.10  				RuntimeLibrary="2"
    1.11  				BufferSecurityCheck="false"
     2.1 --- a/VisualC/SDL_VS2008.sln	Tue Sep 14 21:57:29 2010 -0700
     2.2 +++ b/VisualC/SDL_VS2008.sln	Wed Sep 15 22:15:47 2010 -0700
     2.3 @@ -132,6 +132,8 @@
     2.4  		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} = {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}
     2.5  	EndProjectSection
     2.6  EndProject
     2.7 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testshape", "tests\testshape\testshape.vcproj", "{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}"
     2.8 +EndProject
     2.9  Global
    2.10  	GlobalSection(SolutionConfigurationPlatforms) = preSolution
    2.11  		Debug|Win32 = Debug|Win32
    2.12 @@ -355,6 +357,15 @@
    2.13  		{6AF0724B-BAC1-4C9D-AFBF-F63B4A2FB8FB}.Release|Win32.ActiveCfg = Release|Win32
    2.14  		{6AF0724B-BAC1-4C9D-AFBF-F63B4A2FB8FB}.Release|Win32.Build.0 = Release|Win32
    2.15  		{6AF0724B-BAC1-4C9D-AFBF-F63B4A2FB8FB}.Release|x64.ActiveCfg = Release|Win32
    2.16 +		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Debug|Win32.ActiveCfg = Debug|Win32
    2.17 +		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Debug|Win32.Build.0 = Debug|Win32
    2.18 +		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Debug|x64.ActiveCfg = Debug|Win32
    2.19 +		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release_NoSTDIO|Win32.ActiveCfg = Release|Win32
    2.20 +		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release_NoSTDIO|Win32.Build.0 = Release|Win32
    2.21 +		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release_NoSTDIO|x64.ActiveCfg = Release|Win32
    2.22 +		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release|Win32.ActiveCfg = Release|Win32
    2.23 +		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release|Win32.Build.0 = Release|Win32
    2.24 +		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}.Release|x64.ActiveCfg = Release|Win32
    2.25  	EndGlobalSection
    2.26  	GlobalSection(SolutionProperties) = preSolution
    2.27  		HideSolutionNode = FALSE
    2.28 @@ -381,5 +392,6 @@
    2.29  		{575FD095-EDAB-4BD4-B733-CD4A874F6FB0} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
    2.30  		{0FFD1A21-11DB-492C-A989-E4F195B0C441} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
    2.31  		{6AF0724B-BAC1-4C9D-AFBF-F63B4A2FB8FB} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
    2.32 +		{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2} = {CE748C1F-3C21-4825-AA6A-F895A023F7E7}
    2.33  	EndGlobalSection
    2.34  EndGlobal
     3.1 --- a/VisualC/tests/testshape/testshape.vcproj	Tue Sep 14 21:57:29 2010 -0700
     3.2 +++ b/VisualC/tests/testshape/testshape.vcproj	Wed Sep 15 22:15:47 2010 -0700
     3.3 @@ -1,9 +1,10 @@
     3.4  <?xml version="1.0" encoding="Windows-1252"?>
     3.5  <VisualStudioProject
     3.6  	ProjectType="Visual C++"
     3.7 -	Version="8.00"
     3.8 +	Version="9.00"
     3.9  	Name="testshape"
    3.10 -	ProjectGUID="{5D0930C0-7C91-4ECE-9014-7B7DDE9502E5}"
    3.11 +	ProjectGUID="{31A3E4E1-AAE9-4EF3-9B23-18D0924BE4D2}"
    3.12 +	TargetFrameworkVersion="131072"
    3.13  	>
    3.14  	<Platforms>
    3.15  		<Platform
    3.16 @@ -78,6 +79,8 @@
    3.17  				SuppressStartupBanner="true"
    3.18  				ProgramDatabaseFile=".\Release/testshape.pdb"
    3.19  				SubSystem="2"
    3.20 +				RandomizedBaseAddress="1"
    3.21 +				DataExecutionPrevention="0"
    3.22  			/>
    3.23  			<Tool
    3.24  				Name="VCALinkTool"
    3.25 @@ -98,9 +101,6 @@
    3.26  				Name="VCAppVerifierTool"
    3.27  			/>
    3.28  			<Tool
    3.29 -				Name="VCWebDeploymentTool"
    3.30 -			/>
    3.31 -			<Tool
    3.32  				Name="VCPostBuildEventTool"
    3.33  			/>
    3.34  		</Configuration>
    3.35 @@ -169,6 +169,8 @@
    3.36  				GenerateDebugInformation="true"
    3.37  				ProgramDatabaseFile=".\Debug/testshape.pdb"
    3.38  				SubSystem="2"
    3.39 +				RandomizedBaseAddress="1"
    3.40 +				DataExecutionPrevention="0"
    3.41  			/>
    3.42  			<Tool
    3.43  				Name="VCALinkTool"
    3.44 @@ -189,9 +191,6 @@
    3.45  				Name="VCAppVerifierTool"
    3.46  			/>
    3.47  			<Tool
    3.48 -				Name="VCWebDeploymentTool"
    3.49 -			/>
    3.50 -			<Tool
    3.51  				Name="VCPostBuildEventTool"
    3.52  			/>
    3.53  		</Configuration>
     4.1 --- a/src/audio/SDL_audio.c	Tue Sep 14 21:57:29 2010 -0700
     4.2 +++ b/src/audio/SDL_audio.c	Wed Sep 15 22:15:47 2010 -0700
     4.3 @@ -339,7 +339,7 @@
     4.4  
     4.5      /* For streaming when the buffer sizes don't match up */
     4.6      Uint8 *istream;
     4.7 -    int istream_len;
     4.8 +    int istream_len = 0;
     4.9  
    4.10      /* Perform any thread setup */
    4.11      device->threadid = SDL_ThreadID();
     5.1 --- a/test/automated/rwops/TestSupportRWops_Generic.c	Tue Sep 14 21:57:29 2010 -0700
     5.2 +++ b/test/automated/rwops/TestSupportRWops_Generic.c	Wed Sep 15 22:15:47 2010 -0700
     5.3 @@ -1,6 +1,10 @@
     5.4  /* Generic implementation for file opening routines.
     5.5  * Customizations for specific platforms should go in alternative files.
     5.6  */
     5.7 +
     5.8 +// quiet win32 compiler warnings
     5.9 +#define _CRT_SECURE_NO_WARNINGS
    5.10 +
    5.11  #include <stdio.h>
    5.12  #include "SDL.h"
    5.13  
     6.1 --- a/test/graywin.c	Tue Sep 14 21:57:29 2010 -0700
     6.2 +++ b/test/graywin.c	Wed Sep 15 22:15:47 2010 -0700
     6.3 @@ -25,7 +25,7 @@
     6.4  
     6.5      /* Seed the random number generator */
     6.6      if (seeded == 0) {
     6.7 -        srand(time(NULL));
     6.8 +        srand((unsigned int)time(NULL));
     6.9          seeded = 1;
    6.10      }
    6.11  
     7.1 --- a/test/testdraw2.c	Tue Sep 14 21:57:29 2010 -0700
     7.2 +++ b/test/testdraw2.c	Wed Sep 15 22:15:47 2010 -0700
     7.3 @@ -234,7 +234,7 @@
     7.4          SDL_RenderClear();
     7.5      }
     7.6  
     7.7 -    srand(time(NULL));
     7.8 +    srand((unsigned int)time(NULL));
     7.9  
    7.10      /* Main render loop */
    7.11      frames = 0;
     8.1 --- a/test/testfile.c	Tue Sep 14 21:57:29 2010 -0700
     8.2 +++ b/test/testfile.c	Wed Sep 15 22:15:47 2010 -0700
     8.3 @@ -1,6 +1,9 @@
     8.4  
     8.5  /* sanity tests on SDL_rwops.c (usefull for alternative implementations of stdio rwops) */
     8.6  
     8.7 +// quiet win32 compiler warnings
     8.8 +#define _CRT_NONSTDC_NO_WARNINGS
     8.9 +
    8.10  #include <stdlib.h>
    8.11  
    8.12  #ifndef _MSC_VER
     9.1 --- a/test/testgl.c	Tue Sep 14 21:57:29 2010 -0700
     9.2 +++ b/test/testgl.c	Wed Sep 15 22:15:47 2010 -0700
     9.3 @@ -654,7 +654,7 @@
     9.4              fprintf(stderr, "testgl: OpenGL error: %d\n", gl_error);
     9.5          }
     9.6  
     9.7 -        sdl_error = SDL_GetError();
     9.8 +        sdl_error = (char *)SDL_GetError();
     9.9  
    9.10          if (sdl_error[0] != '\0') {
    9.11              fprintf(stderr, "testgl: SDL error '%s'\n", sdl_error);
    10.1 --- a/test/testoverlay.c	Tue Sep 14 21:57:29 2010 -0700
    10.2 +++ b/test/testoverlay.c	Wed Sep 15 22:15:47 2010 -0700
    10.3 @@ -38,23 +38,23 @@
    10.4  {
    10.5      if (monochrome) {
    10.6  #if 1                           /* these are the two formulas that I found on the FourCC site... */
    10.7 -        yuv[0] = 0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2];
    10.8 +        yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);
    10.9          yuv[1] = 128;
   10.10          yuv[2] = 128;
   10.11  #else
   10.12 -        yuv[0] = (0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
   10.13 +        yuv[0] = (int)((0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16);
   10.14          yuv[1] = 128;
   10.15          yuv[2] = 128;
   10.16  #endif
   10.17      } else {
   10.18  #if 1                           /* these are the two formulas that I found on the FourCC site... */
   10.19 -        yuv[0] = 0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2];
   10.20 -        yuv[1] = (rgb[2] - yuv[0]) * 0.565 + 128;
   10.21 -        yuv[2] = (rgb[0] - yuv[0]) * 0.713 + 128;
   10.22 +        yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);
   10.23 +        yuv[1] = (int)((rgb[2] - yuv[0]) * 0.565 + 128);
   10.24 +        yuv[2] = (int)((rgb[0] - yuv[0]) * 0.713 + 128);
   10.25  #else
   10.26 -        yuv[0] = (0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
   10.27 -        yuv[1] = 128 - (0.148 * rgb[0]) - (0.291 * rgb[1]) + (0.439 * rgb[2]);
   10.28 -        yuv[2] = 128 + (0.439 * rgb[0]) - (0.368 * rgb[1]) - (0.071 * rgb[2]);
   10.29 +        yuv[0] = (int)((0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16);
   10.30 +        yuv[1] = (int)(128 - (0.148 * rgb[0]) - (0.291 * rgb[1]) + (0.439 * rgb[2]));
   10.31 +        yuv[2] = (int)(128 + (0.439 * rgb[0]) - (0.368 * rgb[1]) - (0.071 * rgb[2]));
   10.32  #endif
   10.33      }
   10.34  
    11.1 --- a/test/testoverlay2.c	Tue Sep 14 21:57:29 2010 -0700
    11.2 +++ b/test/testoverlay2.c	Wed Sep 15 22:15:47 2010 -0700
    11.3 @@ -144,19 +144,19 @@
    11.4  {
    11.5      if (monochrome) {
    11.6  #if 1                           /* these are the two formulas that I found on the FourCC site... */
    11.7 -        yuv[0] = 0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2];
    11.8 +        yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);
    11.9          yuv[1] = 128;
   11.10          yuv[2] = 128;
   11.11  #else
   11.12 -        yuv[0] = (0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
   11.13 +        yuv[0] = (int)(0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
   11.14          yuv[1] = 128;
   11.15          yuv[2] = 128;
   11.16  #endif
   11.17      } else {
   11.18  #if 1                           /* these are the two formulas that I found on the FourCC site... */
   11.19 -        yuv[0] = 0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2];
   11.20 -        yuv[1] = (rgb[2] - yuv[0]) * 0.565 + 128;
   11.21 -        yuv[2] = (rgb[0] - yuv[0]) * 0.713 + 128;
   11.22 +        yuv[0] = (int)(0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]);
   11.23 +        yuv[1] = (int)((rgb[2] - yuv[0]) * 0.565 + 128);
   11.24 +        yuv[2] = (int)((rgb[0] - yuv[0]) * 0.713 + 128);
   11.25  #else
   11.26          yuv[0] = (0.257 * rgb[0]) + (0.504 * rgb[1]) + (0.098 * rgb[2]) + 16;
   11.27          yuv[1] = 128 - (0.148 * rgb[0]) - (0.291 * rgb[1]) + (0.439 * rgb[2]);
   11.28 @@ -606,7 +606,7 @@
   11.29          }
   11.30  
   11.31          if ((!paused) || (resized)) {
   11.32 -            if (((SDL_GetTicks() - lastftick) > fpsdelay) || (resized)) {
   11.33 +            if (((SDL_GetTicks() - lastftick) > (Uint32)fpsdelay) || (resized)) {
   11.34                  lastftick = SDL_GetTicks();
   11.35  
   11.36                  switch (overlay_format) {
    12.1 --- a/test/testsprite.c	Tue Sep 14 21:57:29 2010 -0700
    12.2 +++ b/test/testsprite.c	Wed Sep 15 22:15:47 2010 -0700
    12.3 @@ -100,7 +100,7 @@
    12.4              Uint32 color = SDL_MapRGB(screen->format, 255, 0, 0);
    12.5              SDL_Rect r;
    12.6              r.x =
    12.7 -                (sin((float) t * 2 * 3.1459) + 1.0) / 2.0 * (screen->w - 20);
    12.8 +                (int)((sin((float) t * 2 * 3.1459) + 1.0) / 2.0 * (screen->w - 20));
    12.9              r.y = 0;
   12.10              r.w = 20;
   12.11              r.h = screen->h;
   12.12 @@ -141,7 +141,7 @@
   12.13          /* Direct hardware blitting without double-buffering
   12.14             causes really bad flickering.
   12.15           */
   12.16 -        if (info->video_mem * 1024 > (height * width * bpp / 8)) {
   12.17 +        if (info->video_mem * 1024 > (Uint32)(height * width * bpp / 8)) {
   12.18              flags |= SDL_DOUBLEBUF;
   12.19          } else {
   12.20              flags &= ~SDL_HWSURFACE;
   12.21 @@ -236,7 +236,7 @@
   12.22      sprite_rects += numsprites;
   12.23      sprite_w = sprite->w;
   12.24      sprite_h = sprite->h;
   12.25 -    srand(time(NULL));
   12.26 +    srand((unsigned int)time(NULL));
   12.27      for (i = 0; i < numsprites; ++i) {
   12.28          positions[i].x = rand() % (screen->w - sprite_w);
   12.29          positions[i].y = rand() % (screen->h - sprite_h);
    13.1 --- a/test/testsprite2.c	Tue Sep 14 21:57:29 2010 -0700
    13.2 +++ b/test/testsprite2.c	Wed Sep 15 22:15:47 2010 -0700
    13.3 @@ -315,7 +315,7 @@
    13.4          fprintf(stderr, "Out of memory!\n");
    13.5          quit(2);
    13.6      }
    13.7 -    srand(time(NULL));
    13.8 +    srand((unsigned int)time(NULL));
    13.9      if (scaleMode != SDL_TEXTURESCALEMODE_NONE) {
   13.10          sprite_w += sprite_w / 2;
   13.11          sprite_h += sprite_h / 2;
   13.12 @@ -368,6 +368,7 @@
   13.13          printf("%2.2f frames per second\n", fps);
   13.14      }
   13.15      quit(0);
   13.16 +	return 0;
   13.17  }
   13.18  
   13.19  /* vi: set ts=4 sw=4 expandtab: */