From f9048e725745d89e8d22efa866e3d048c11756c9 Mon Sep 17 00:00:00 2001 From: Eli Gottlieb Date: Tue, 20 Jul 2010 12:42:43 -0400 Subject: [PATCH] Reapplied Win32 make-it-build patch. What's going on? Still get rendering artifacts when testing on x11, have literally no idea why. --- VisualC/SDL/SDL_VS2010.vcxproj | 449 +++++++++++++++++++++++++ VisualC/SDLmain/SDLmain_VS2010.vcxproj | 264 +++++++++++++++ src/video/SDL_shape.c | 2 +- 3 files changed, 714 insertions(+), 1 deletion(-) create mode 100644 VisualC/SDL/SDL_VS2010.vcxproj create mode 100644 VisualC/SDLmain/SDLmain_VS2010.vcxproj diff --git a/VisualC/SDL/SDL_VS2010.vcxproj b/VisualC/SDL/SDL_VS2010.vcxproj new file mode 100644 index 000000000..f368613b9 --- /dev/null +++ b/VisualC/SDL/SDL_VS2010.vcxproj @@ -0,0 +1,449 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + SDL + {81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68} + SDL + + + + DynamicLibrary + false + + + DynamicLibrary + false + + + DynamicLibrary + false + + + DynamicLibrary + false + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Debug\ + .\Debug\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + .\Release\ + .\Release\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + Making sure basic SDL headers are in place... + if exist "$(ProjectDir)\..\..\include\SDL_config.h" goto SDLCONFIGOKAY +echo Copying SDL_config_win32.h to SDL_config.h... +copy "$(ProjectDir)\..\..\include\SDL_config_win32.h" "$(ProjectDir)\..\..\include\SDL_config.h" +:SDLCONFIGOKAY + +if exist "$(ProjectDir)\..\..\include\SDL_revision.h" goto SDLREVISIONOKAY +echo Creating stub SDL_revision.h file... +echo #define SDL_REVISION 0 >"$(ProjectDir)\..\..\include\SDL_revision.h" +:SDLREVISIONOKAY + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/SDL.tlb + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + _DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__MMX__;__3dNOW__;__SSE__;__SSE2__;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + + Level3 + true + EditAndContinue + Default + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + msimg32.lib;winmm.lib;%(AdditionalDependencies) + $(IntDir)SDL.dll + true + true + Windows + false + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Debug/SDL.tlb + + + Disabled + ..\..\include;%(AdditionalIncludeDirectories) + _DEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__SSE__;__SSE2__;%(PreprocessorDefinitions) + MultiThreadedDLL + false + + + Level3 + ProgramDatabase + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + msimg32.lib;winmm.lib;%(AdditionalDependencies) + $(IntDir)SDL.dll + true + true + Windows + MachineX64 + false + + + + + Making sure basic SDL headers are in place... + if exist "$(ProjectDir)\..\..\include\SDL_config.h" goto SDLCONFIGOKAY +echo Copying SDL_config_win32.h to SDL_config.h... +copy "$(ProjectDir)\..\..\include\SDL_config_win32.h" "$(ProjectDir)\..\..\include\SDL_config.h" +:SDLCONFIGOKAY + +if exist "$(ProjectDir)\..\..\include\SDL_revision.h" goto SDLREVISIONOKAY +echo Creating stub SDL_revision.h file... +echo #define SDL_REVISION 0 >"$(ProjectDir)\..\..\include\SDL_revision.h" +:SDLREVISIONOKAY + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + ..\..\include;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__MMX__;__3dNOW__;__SSE__;__SSE2__;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + + Level3 + true + Default + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + msimg32.lib;winmm.lib;%(AdditionalDependencies) + $(IntDir)SDL.dll + true + Windows + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + X64 + .\Release/SDL.tlb + + + OnlyExplicitInline + false + ..\..\include;%(AdditionalIncludeDirectories) + NDEBUG;_WINDOWS;_WIN32_WINNT=0x0400;__SSE__;__SSE2__;%(PreprocessorDefinitions) + true + MultiThreadedDLL + false + true + + + Level3 + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + msimg32.lib;winmm.lib;%(AdditionalDependencies) + $(IntDir)SDL.dll + true + Windows + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/VisualC/SDLmain/SDLmain_VS2010.vcxproj b/VisualC/SDLmain/SDLmain_VS2010.vcxproj new file mode 100644 index 000000000..0b34730cf --- /dev/null +++ b/VisualC/SDLmain/SDLmain_VS2010.vcxproj @@ -0,0 +1,264 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release_NoSTDIO + Win32 + + + Release_NoSTDIO + x64 + + + Release + Win32 + + + Release + x64 + + + + SDLmain + {DA956FD3-E142-46F2-9DD5-C78BEBB56B7A} + + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + StaticLibrary + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + .\Release_NOSTDIO\ + .\Release_NOSTDIO\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + .\Debug\ + .\Debug\ + $(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + + Making sure basic SDL headers are in place... + if exist "$(ProjectDir)\..\..\include\SDL_config.h" goto SDLCONFIGOKAY +echo Copying SDL_config_win32.h to SDL_config.h... +copy "$(ProjectDir)\..\..\include\SDL_config_win32.h" "$(ProjectDir)\..\..\include\SDL_config.h" +:SDLCONFIGOKAY + +if exist "$(ProjectDir)\..\..\include\SDL_revision.h" goto SDLREVISIONOKAY +echo Creating stub SDL_revision.h file... +echo #define SDL_REVISION 0 >"$(ProjectDir)\..\..\include\SDL_revision.h" +:SDLREVISIONOKAY + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + true + Default + + + .\Release\SDLmain.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release/SDLmain.pch + Level3 + true + Default + + + $(IntDir)SDLmain.lib + + + + + Making sure basic SDL headers are in place... + if exist "$(ProjectDir)\..\..\include\SDL_config.h" goto SDLCONFIGOKAY +echo Copying SDL_config_win32.h to SDL_config.h... +copy "$(ProjectDir)\..\..\include\SDL_config_win32.h" "$(ProjectDir)\..\..\include\SDL_config.h" +:SDLCONFIGOKAY + +if exist "$(ProjectDir)\..\..\include\SDL_revision.h" goto SDLREVISIONOKAY +echo Creating stub SDL_revision.h file... +echo #define SDL_REVISION 0 >"$(ProjectDir)\..\..\include\SDL_revision.h" +:SDLREVISIONOKAY + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + _CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + Level3 + true + Default + + + .\Release_NOSTDIO\SDLmain.lib + true + + + + + X64 + + + OnlyExplicitInline + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;NO_STDIO_REDIRECT;%(PreprocessorDefinitions) + true + MultiThreadedDLL + true + + + .\Release_NOSTDIO/SDLmain.pch + Level3 + true + Default + + + $(IntDir)SDLmain.lib + + + + + Making sure basic SDL headers are in place... + if exist "$(ProjectDir)\..\..\include\SDL_config.h" goto SDLCONFIGOKAY +echo Copying SDL_config_win32.h to SDL_config.h... +copy "$(ProjectDir)\..\..\include\SDL_config_win32.h" "$(ProjectDir)\..\..\include\SDL_config.h" +:SDLCONFIGOKAY + +if exist "$(ProjectDir)\..\..\include\SDL_revision.h" goto SDLREVISIONOKAY +echo Creating stub SDL_revision.h file... +echo #define SDL_REVISION 0 >"$(ProjectDir)\..\..\include\SDL_revision.h" +:SDLREVISIONOKAY + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + true + OldStyle + Default + + + .\Debug\SDLmain.lib + true + + + + + X64 + + + Disabled + ..\..\include;..\..\include\SDL;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + MultiThreadedDLL + + + .\Debug/SDLmain.pch + Level3 + true + OldStyle + Default + + + $(IntDir)SDLmain.lib + + + + + + + + + \ No newline at end of file diff --git a/src/video/SDL_shape.c b/src/video/SDL_shape.c index 90e034c5e..9a6d04d9e 100644 --- a/src/video/SDL_shape.c +++ b/src/video/SDL_shape.c @@ -68,7 +68,7 @@ void SDL_CalculateShapeBitmap(Uint8 alphacutoff,SDL_Surface *shape,Uint8* bitmap for(x=0;xw;x++) { alpha = 0; pixel_value = 0; - pixel = shape->pixels + y * shape->pitch + x * shape->format->BytesPerPixel; + pixel = (Uint8 *)(shape->pixels) + (y*shape->pitch) + (x*shape->format->BytesPerPixel); switch(shape->format->BytesPerPixel) { case(1): pixel_value = *(Uint8*)pixel;