Fixed building under Visual Studio
authorSam Lantinga <slouken@libsdl.org>
Fri, 15 Jan 2010 20:05:49 +0000
changeset 36710d6f520c0eb9
parent 3670 62b6a5b99918
child 3672 878d8adf2fde
Fixed building under Visual Studio
VisualC/SDL/SDL.vcproj
VisualC/SDL/SDL_VS2008.vcproj
src/SDL_assert.c
src/video/SDL_drawline.c
     1.1 --- a/VisualC/SDL/SDL.vcproj	Wed Jan 13 19:29:33 2010 +0000
     1.2 +++ b/VisualC/SDL/SDL.vcproj	Fri Jan 15 20:05:49 2010 +0000
     1.3 @@ -26,7 +26,7 @@
     1.4  			<Tool
     1.5  				Name="VCPreBuildEventTool"
     1.6  				Description="Making sure basic SDL headers are in place..."
     1.7 -				CommandLine="if exist &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot; goto SDLCONFIGOKAY&#x0D;&#x0A;echo Copying SDL_config_win32.h to SDL_config.h...&#x0D;&#x0A;copy &quot;$(ProjectDir)\..\..\include\SDL_config_win32.h&quot; &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot;&#x0D;&#x0A;:SDLCONFIGOKAY&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot; goto SDLREVISIONOKAY&#x0D;&#x0A;echo Creating stub SDL_revision.h file...&#x0D;&#x0A;echo #define SDL_REVISION 0 &gt;&quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot;&#x0D;&#x0A;:SDLREVISIONOKAY"
     1.8 +				CommandLine="if exist &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot; goto SDLCONFIGOKAY&#x0D;&#x0A;echo Copying SDL_config_win32.h to SDL_config.h...&#x0D;&#x0A;copy &quot;$(ProjectDir)\..\..\include\SDL_config_win32.h&quot; &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot;&#x0D;&#x0A;:SDLCONFIGOKAY&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot; goto SDLREVISIONOKAY&#x0D;&#x0A;echo Creating stub SDL_revision.h file...&#x0D;&#x0A;echo #define SDL_REVISION 0 &gt;&quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot;&#x0D;&#x0A;:SDLREVISIONOKAY&#x0D;&#x0A;"
     1.9  			/>
    1.10  			<Tool
    1.11  				Name="VCCustomBuildTool"
    1.12 @@ -125,7 +125,7 @@
    1.13  			<Tool
    1.14  				Name="VCPreBuildEventTool"
    1.15  				Description="Making sure basic SDL headers are in place..."
    1.16 -				CommandLine="if exist &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot; goto SDLCONFIGOKAY&#x0D;&#x0A;echo Copying SDL_config_win32.h to SDL_config.h...&#x0D;&#x0A;copy &quot;$(ProjectDir)\..\..\include\SDL_config_win32.h&quot; &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot;&#x0D;&#x0A;:SDLCONFIGOKAY&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot; goto SDLREVISIONOKAY&#x0D;&#x0A;echo Creating stub SDL_revision.h file...&#x0D;&#x0A;echo #define SDL_REVISION 0 &gt;&quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot;&#x0D;&#x0A;:SDLREVISIONOKAY"
    1.17 +				CommandLine="if exist &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot; goto SDLCONFIGOKAY&#x0D;&#x0A;echo Copying SDL_config_win32.h to SDL_config.h...&#x0D;&#x0A;copy &quot;$(ProjectDir)\..\..\include\SDL_config_win32.h&quot; &quot;$(ProjectDir)\..\..\include\SDL_config.h&quot;&#x0D;&#x0A;:SDLCONFIGOKAY&#x0D;&#x0A;&#x0D;&#x0A;if exist &quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot; goto SDLREVISIONOKAY&#x0D;&#x0A;echo Creating stub SDL_revision.h file...&#x0D;&#x0A;echo #define SDL_REVISION 0 &gt;&quot;$(ProjectDir)\..\..\include\SDL_revision.h&quot;&#x0D;&#x0A;:SDLREVISIONOKAY&#x0D;&#x0A;"
    1.18  			/>
    1.19  			<Tool
    1.20  				Name="VCCustomBuildTool"
    1.21 @@ -224,6 +224,14 @@
    1.22  				>
    1.23  			</File>
    1.24  			<File
    1.25 +				RelativePath="..\..\include\SDL_assert.h"
    1.26 +				>
    1.27 +			</File>
    1.28 +			<File
    1.29 +				RelativePath="..\..\include\SDL_atomic.h"
    1.30 +				>
    1.31 +			</File>
    1.32 +			<File
    1.33  				RelativePath="..\..\include\SDL_audio.h"
    1.34  				>
    1.35  			</File>
    1.36 @@ -236,6 +244,10 @@
    1.37  				>
    1.38  			</File>
    1.39  			<File
    1.40 +				RelativePath="..\..\include\SDL_copying.h"
    1.41 +				>
    1.42 +			</File>
    1.43 +			<File
    1.44  				RelativePath="..\..\include\SDL_cpuinfo.h"
    1.45  				>
    1.46  			</File>
    1.47 @@ -252,6 +264,10 @@
    1.48  				>
    1.49  			</File>
    1.50  			<File
    1.51 +				RelativePath="..\..\include\SDL_haptic.h"
    1.52 +				>
    1.53 +			</File>
    1.54 +			<File
    1.55  				RelativePath="..\..\include\SDL_joystick.h"
    1.56  				>
    1.57  			</File>
    1.58 @@ -288,6 +304,10 @@
    1.59  				>
    1.60  			</File>
    1.61  			<File
    1.62 +				RelativePath="..\..\include\SDL_opengles.h"
    1.63 +				>
    1.64 +			</File>
    1.65 +			<File
    1.66  				RelativePath="..\..\include\SDL_pixels.h"
    1.67  				>
    1.68  			</File>
    1.69 @@ -304,14 +324,26 @@
    1.70  				>
    1.71  			</File>
    1.72  			<File
    1.73 +				RelativePath="..\..\include\SDL_rect.h"
    1.74 +				>
    1.75 +			</File>
    1.76 +			<File
    1.77  				RelativePath="..\..\include\SDL_rwops.h"
    1.78  				>
    1.79  			</File>
    1.80  			<File
    1.81 +				RelativePath="..\..\include\SDL_scancode.h"
    1.82 +				>
    1.83 +			</File>
    1.84 +			<File
    1.85  				RelativePath="..\..\include\SDL_stdinc.h"
    1.86  				>
    1.87  			</File>
    1.88  			<File
    1.89 +				RelativePath="..\..\include\SDL_surface.h"
    1.90 +				>
    1.91 +			</File>
    1.92 +			<File
    1.93  				RelativePath="..\..\include\SDL_syswm.h"
    1.94  				>
    1.95  			</File>
    1.96 @@ -425,6 +457,14 @@
    1.97  			>
    1.98  		</File>
    1.99  		<File
   1.100 +			RelativePath="..\..\src\SDL_assert.c"
   1.101 +			>
   1.102 +		</File>
   1.103 +		<File
   1.104 +			RelativePath="..\..\src\atomic\win32\SDL_atomic.c"
   1.105 +			>
   1.106 +		</File>
   1.107 +		<File
   1.108  			RelativePath="..\..\src\audio\SDL_audio.c"
   1.109  			>
   1.110  		</File>
   1.111 @@ -453,6 +493,10 @@
   1.112  			>
   1.113  		</File>
   1.114  		<File
   1.115 +			RelativePath="..\..\src\video\SDL_blendfillrect.c"
   1.116 +			>
   1.117 +		</File>
   1.118 +		<File
   1.119  			RelativePath="..\..\src\video\SDL_blendline.c"
   1.120  			>
   1.121  		</File>
   1.122 @@ -561,6 +605,10 @@
   1.123  			>
   1.124  		</File>
   1.125  		<File
   1.126 +			RelativePath="..\..\src\video\SDL_drawrect.c"
   1.127 +			>
   1.128 +		</File>
   1.129 +		<File
   1.130  			RelativePath="..\..\src\audio\dummy\SDL_dummyaudio.c"
   1.131  			>
   1.132  		</File>
   1.133 @@ -625,6 +673,10 @@
   1.134  			>
   1.135  		</File>
   1.136  		<File
   1.137 +			RelativePath="..\..\src\video\SDL_glesfuncs.h"
   1.138 +			>
   1.139 +		</File>
   1.140 +		<File
   1.141  			RelativePath="..\..\src\video\SDL_glfuncs.h"
   1.142  			>
   1.143  		</File>
     2.1 --- a/VisualC/SDL/SDL_VS2008.vcproj	Wed Jan 13 19:29:33 2010 +0000
     2.2 +++ b/VisualC/SDL/SDL_VS2008.vcproj	Fri Jan 15 20:05:49 2010 +0000
     2.3 @@ -371,6 +371,10 @@
     2.4  				>
     2.5  			</File>
     2.6  			<File
     2.7 +				RelativePath="..\..\include\SDL_assert.h"
     2.8 +				>
     2.9 +			</File>
    2.10 +			<File
    2.11  				RelativePath="..\..\include\SDL_atomic.h"
    2.12  				>
    2.13  			</File>
    2.14 @@ -608,6 +612,14 @@
    2.15  			>
    2.16  		</File>
    2.17  		<File
    2.18 +			RelativePath="..\..\src\SDL_assert.c"
    2.19 +			>
    2.20 +		</File>
    2.21 +		<File
    2.22 +			RelativePath="..\..\src\atomic\win32\SDL_atomic.c"
    2.23 +			>
    2.24 +		</File>
    2.25 +		<File
    2.26  			RelativePath="..\..\src\audio\SDL_audio.c"
    2.27  			>
    2.28  		</File>
    2.29 @@ -816,6 +828,10 @@
    2.30  			>
    2.31  		</File>
    2.32  		<File
    2.33 +			RelativePath="..\..\src\video\SDL_glesfuncs.h"
    2.34 +			>
    2.35 +		</File>
    2.36 +		<File
    2.37  			RelativePath="..\..\src\video\SDL_glfuncs.h"
    2.38  			>
    2.39  		</File>
     3.1 --- a/src/SDL_assert.c	Wed Jan 13 19:29:33 2010 +0000
     3.2 +++ b/src/SDL_assert.c	Fri Jan 15 20:05:49 2010 +0000
     3.3 @@ -22,6 +22,7 @@
     3.4  
     3.5  #include "SDL.h"
     3.6  #include "SDL_assert.h"
     3.7 +#include "video/SDL_sysvideo.h"
     3.8  
     3.9  #ifdef _WINDOWS
    3.10  #define WIN32_LEAN_AND_MEAN 1
     4.1 --- a/src/video/SDL_drawline.c	Wed Jan 13 19:29:33 2010 +0000
     4.2 +++ b/src/video/SDL_drawline.c	Fri Jan 15 20:05:49 2010 +0000
     4.3 @@ -28,7 +28,21 @@
     4.4                SDL_bool draw_end)
     4.5  {
     4.6      if (y1 == y2) {
     4.7 -        HLINE(Uint8, DRAW_FASTSETPIXEL1, draw_end);
     4.8 +        //HLINE(Uint8, DRAW_FASTSETPIXEL1, draw_end);
     4.9 +        int length;
    4.10 +        int pitch = (dst->pitch / dst->format->BytesPerPixel);
    4.11 +        Uint8 *pixel;
    4.12 +        if (x1 <= x2) {
    4.13 +            pixel = (Uint8 *)dst->pixels + y1 * pitch + x1;
    4.14 +            length = draw_end ? (x2-x1+1) : (x2-x1);
    4.15 +        } else {
    4.16 +            pixel = (Uint8 *)dst->pixels + y1 * pitch + x2;
    4.17 +            if (!draw_end) {
    4.18 +                ++pixel;
    4.19 +            }
    4.20 +            length = draw_end ? (x1-x2+1) : (x1-x2);
    4.21 +        }
    4.22 +        SDL_memset(pixel, color, length);
    4.23      } else if (x1 == x2) {
    4.24          VLINE(Uint8, DRAW_FASTSETPIXEL1, draw_end);
    4.25      } else if (ABS(x1 - x2) == ABS(y1 - y2)) {