Fixed compiling with Visual Studio
authorSam Lantinga <slouken@libsdl.org>
Tue, 19 Jun 2012 13:50:14 -0400
changeset 6332019660f4cc2b
parent 6331 5732e1a80bde
child 6333 8d541aa4e1da
Fixed compiling with Visual Studio
VisualC/SDL/SDL_VS2008.vcproj
VisualC/SDL/SDL_VS2010.vcxproj
src/render/direct3d/SDL_render_d3d.c
src/render/software/SDL_render_sw.c
     1.1 --- a/VisualC/SDL/SDL_VS2008.vcproj	Tue Jun 19 14:19:05 2012 -0300
     1.2 +++ b/VisualC/SDL/SDL_VS2008.vcproj	Tue Jun 19 13:50:14 2012 -0400
     1.3 @@ -1001,6 +1001,14 @@
     1.4  			>
     1.5  		</File>
     1.6  		<File
     1.7 +			RelativePath="..\..\src\render\software\SDL_rotate.c"
     1.8 +			>
     1.9 +		</File>
    1.10 +		<File
    1.11 +			RelativePath="..\..\src\render\software\SDL_rotate.h"
    1.12 +			>
    1.13 +		</File>
    1.14 +		<File
    1.15  			RelativePath="..\..\src\file\SDL_rwops.c"
    1.16  			>
    1.17  		</File>
     2.1 --- a/VisualC/SDL/SDL_VS2010.vcxproj	Tue Jun 19 14:19:05 2012 -0300
     2.2 +++ b/VisualC/SDL/SDL_VS2010.vcxproj	Tue Jun 19 13:50:14 2012 -0400
     2.3 @@ -273,6 +273,7 @@
     2.4      <ClInclude Include="..\..\src\render\software\SDL_drawline.h" />
     2.5      <ClInclude Include="..\..\src\render\software\SDL_drawpoint.h" />
     2.6      <ClInclude Include="..\..\src\render\software\SDL_render_sw_c.h" />
     2.7 +    <ClInclude Include="..\..\src\render\software\SDL_rotate.h" />
     2.8      <ClInclude Include="..\..\src\video\dummy\SDL_nullframebuffer_c.h" />
     2.9      <ClInclude Include="..\..\src\video\SDL_blit.h" />
    2.10      <ClInclude Include="..\..\src\video\SDL_blit_auto.h" />
    2.11 @@ -356,6 +357,7 @@
    2.12      <ClCompile Include="..\..\src\render\software\SDL_drawline.c" />
    2.13      <ClCompile Include="..\..\src\render\software\SDL_drawpoint.c" />
    2.14      <ClCompile Include="..\..\src\render\software\SDL_render_sw.c" />
    2.15 +    <ClCompile Include="..\..\src\render\software\SDL_rotate.c" />
    2.16      <ClCompile Include="..\..\src\SDL.c" />
    2.17      <ClCompile Include="..\..\src\SDL_assert.c" />
    2.18      <ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
    2.19 @@ -441,4 +443,4 @@
    2.20    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    2.21    <ImportGroup Label="ExtensionTargets">
    2.22    </ImportGroup>
    2.23 -</Project>
    2.24 +</Project>
    2.25 \ No newline at end of file
     3.1 --- a/src/render/direct3d/SDL_render_d3d.c	Tue Jun 19 14:19:05 2012 -0300
     3.2 +++ b/src/render/direct3d/SDL_render_d3d.c	Tue Jun 19 13:50:14 2012 -0400
     3.3 @@ -1320,7 +1320,7 @@
     3.4      // Rotate and translate
     3.5      ID3DXMatrixStack_Push(data->matrixStack);
     3.6      ID3DXMatrixStack_LoadIdentity(data->matrixStack);
     3.7 -    ID3DXMatrixStack_RotateYawPitchRoll(data->matrixStack, 0.0, 0.0, M_PI * (float) angle / 180.0f);
     3.8 +    ID3DXMatrixStack_RotateYawPitchRoll(data->matrixStack, 0.0, 0.0, (float)(M_PI * (float) angle / 180.0f));
     3.9      ID3DXMatrixStack_Translate(data->matrixStack, (float)dstrect->x + centerx, (float)dstrect->y + centery, (float)0.0);
    3.10      IDirect3DDevice9_SetTransform(data->device, D3DTS_VIEW, (D3DMATRIX*)ID3DXMatrixStack_GetTop(data->matrixStack));
    3.11  
     4.1 --- a/src/render/software/SDL_render_sw.c	Tue Jun 19 14:19:05 2012 -0300
     4.2 +++ b/src/render/software/SDL_render_sw.c	Tue Jun 19 13:50:14 2012 -0400
     4.3 @@ -521,7 +521,6 @@
     4.4      SDL_Surface *src = (SDL_Surface *) texture->driverdata;
     4.5      SDL_Rect final_rect = *dstrect, tmp_rect;
     4.6      SDL_Surface *surface_rotated, *surface_scaled;
     4.7 -    SDL_Point final_rect_center;
     4.8      Uint32 colorkey;
     4.9      int retval, dstwidth, dstheight, abscenterx, abscentery;
    4.10      double cangle, sangle, px, py, p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y;