Synchronized with trunk
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1167 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
commit
1bf35973be
@ -36,9 +36,9 @@ namespace
|
|||||||
/// Helper function to read a variable from a packet
|
/// Helper function to read a variable from a packet
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T PacketRead(sfPacket* packet, T def = 0)
|
T PacketRead(sfPacket* packet)
|
||||||
{
|
{
|
||||||
CSFML_CHECK_RETURN(packet, def);
|
CSFML_CHECK_RETURN(packet, 0);
|
||||||
|
|
||||||
T value;
|
T value;
|
||||||
packet->This >> value;
|
packet->This >> value;
|
||||||
|
BIN
build/codeblocks/batch-build/ar.exe
Normal file
BIN
build/codeblocks/batch-build/ar.exe
Normal file
Binary file not shown.
90
build/codeblocks/batch-build/build.bat
Normal file
90
build/codeblocks/batch-build/build.bat
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
REM Retrieve the SFML path
|
||||||
|
set SFML="%CD%\..\..\.."
|
||||||
|
set TMP="%CD%\temp"
|
||||||
|
|
||||||
|
REM Add the Code::Blocks path to the PATH
|
||||||
|
set PATH=%PATH%;"%CD%"
|
||||||
|
|
||||||
|
REM Compile the SFML libraries
|
||||||
|
cd %SFML%\build\codeblocks
|
||||||
|
|
||||||
|
echo Compiling debug static libraries...
|
||||||
|
codeblocks -na -nd -ns --build sfml-main.cbp --target="Debug"
|
||||||
|
codeblocks -na -nd -ns --build sfml-audio.cbp --target="Debug static_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-graphics.cbp --target="Debug static_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-network.cbp --target="Debug static_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-system.cbp --target="Debug static_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-window.cbp --target="Debug static_Win32"
|
||||||
|
|
||||||
|
echo Compiling debug dynamic libraries...
|
||||||
|
codeblocks -na -nd -ns --build sfml-audio.cbp --target="Debug DLL_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-graphics.cbp --target="Debug DLL_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-network.cbp --target="Debug DLL_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-system.cbp --target="Debug DLL_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-window.cbp --target="Debug DLL_Win32"
|
||||||
|
|
||||||
|
echo Compiling release static libraries...
|
||||||
|
codeblocks -na -nd -ns --build sfml-main.cbp --target="Release"
|
||||||
|
codeblocks -na -nd -ns --build sfml-audio.cbp --target="Release static_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-graphics.cbp --target="Release static_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-network.cbp --target="Release static_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-system.cbp --target="Release static_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-window.cbp --target="Release static_Win32"
|
||||||
|
|
||||||
|
echo Compiling release dynamic libraries...
|
||||||
|
codeblocks -na -nd -ns --build sfml-audio.cbp --target="Release DLL_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-graphics.cbp --target="Release DLL_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-network.cbp --target="Release DLL_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-system.cbp --target="Release DLL_Win32"
|
||||||
|
codeblocks -na -nd -ns --build sfml-window.cbp --target="Release DLL_Win32"
|
||||||
|
|
||||||
|
REM Copy the SFML static libraries into a temporary folder
|
||||||
|
IF NOT EXIST %TMP% mkdir %TMP%
|
||||||
|
cd %SFML%\lib\mingw
|
||||||
|
xcopy libsfml-*-s-d.a %TMP%/q /y
|
||||||
|
xcopy libsfml-*-s.a %TMP%/q /y
|
||||||
|
cd %TMP%
|
||||||
|
|
||||||
|
REM Add external libraries to sfml-window
|
||||||
|
echo Adding external libraries to libsfml-window-s...
|
||||||
|
ar x %SFML%\build\codeblocks\batch-build\libgdi32.a
|
||||||
|
ar x %SFML%\build\codeblocks\batch-build\libopengl32.a
|
||||||
|
ar x %SFML%\build\codeblocks\batch-build\libwinmm.a
|
||||||
|
ar rs libsfml-window-s.a *.o
|
||||||
|
ar rs libsfml-window-s-d.a *.o
|
||||||
|
del *.o /f /q
|
||||||
|
|
||||||
|
REM Add external libraries to sfml-network
|
||||||
|
echo Adding external libraries to libsfml-network-s...
|
||||||
|
ar x %SFML%\build\codeblocks\batch-build\libws2_32.a
|
||||||
|
ar rs libsfml-network-s.a *.o
|
||||||
|
ar rs libsfml-network-s-d.a *.o
|
||||||
|
del *.o /f /q
|
||||||
|
|
||||||
|
REM Add external libraries to sfml-graphics
|
||||||
|
echo Adding external libraries to libsfml-graphics-s...
|
||||||
|
ar x %SFML%\extlibs\libs-mingw\libfreetype.a
|
||||||
|
ar rs libsfml-graphics-s.a *.o
|
||||||
|
ar rs libsfml-graphics-s-d.a *.o
|
||||||
|
del *.o /f /q
|
||||||
|
|
||||||
|
REM Add external libraries to sfml-audio
|
||||||
|
echo Adding external libraries to libsfml-audio-s...
|
||||||
|
ar x %SFML%\extlibs\libs-mingw\libopenal32.a
|
||||||
|
ar x %SFML%\extlibs\libs-mingw\libsndfile.a
|
||||||
|
ar rs libsfml-audio-s.a *.o
|
||||||
|
ar rs libsfml-audio-s-d.a *.o
|
||||||
|
del *.o /f /q
|
||||||
|
|
||||||
|
REM Copy the SFML libraries to their final location
|
||||||
|
echo Cleaning up...
|
||||||
|
xcopy *.a %SFML%\lib\mingw /q /y
|
||||||
|
del *.a /f /q
|
||||||
|
|
||||||
|
REM Remove the temporary directory we've just created
|
||||||
|
rmdir %TMP% /s /q
|
||||||
|
|
||||||
|
echo Done
|
||||||
|
pause
|
BIN
build/codeblocks/batch-build/libgdi32.a
Normal file
BIN
build/codeblocks/batch-build/libgdi32.a
Normal file
Binary file not shown.
BIN
build/codeblocks/batch-build/libopengl32.a
Normal file
BIN
build/codeblocks/batch-build/libopengl32.a
Normal file
Binary file not shown.
BIN
build/codeblocks/batch-build/libwinmm.a
Normal file
BIN
build/codeblocks/batch-build/libwinmm.a
Normal file
Binary file not shown.
BIN
build/codeblocks/batch-build/libws2_32.a
Normal file
BIN
build/codeblocks/batch-build/libws2_32.a
Normal file
Binary file not shown.
16
build/vc2008/batch-build/build.bat
Normal file
16
build/vc2008/batch-build/build.bat
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
echo Compiling debug static libraries...
|
||||||
|
msbuild ..\SFML.sln /verbosity:q /maxcpucount /target:SFML\sfml-main,SFML\sfml-system,SFML\sfml-network,SFML\sfml-window,SFML\sfml-graphics,SFML\sfml-audio /property:Configuration="Debug static"
|
||||||
|
|
||||||
|
echo Compiling debug dynamic libraries...
|
||||||
|
msbuild ..\SFML.sln /verbosity:q /maxcpucount /target:SFML\sfml-main,SFML\sfml-system,SFML\sfml-network,SFML\sfml-window,SFML\sfml-graphics,SFML\sfml-audio /property:Configuration="Debug DLL"
|
||||||
|
|
||||||
|
echo Compiling release static libraries...
|
||||||
|
msbuild ..\SFML.sln /verbosity:q /maxcpucount /target:SFML\sfml-main,SFML\sfml-system,SFML\sfml-network,SFML\sfml-window,SFML\sfml-graphics,SFML\sfml-audio /property:Configuration="Release static"
|
||||||
|
|
||||||
|
echo Compiling release dynamic libraries...
|
||||||
|
msbuild ..\SFML.sln /verbosity:q /maxcpucount /target:SFML\sfml-main,SFML\sfml-system,SFML\sfml-network,SFML\sfml-window,SFML\sfml-graphics,SFML\sfml-audio /property:Configuration="Release DLL"
|
||||||
|
|
||||||
|
echo Done
|
||||||
|
pause
|
@ -43,10 +43,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include";"$(SolutionDir)..\..\extlibs\headers""
|
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include";"$(SolutionDir)..\..\extlibs\headers""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -127,6 +128,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
@ -218,10 +220,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include";"$(SolutionDir)..\..\extlibs\headers""
|
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include";"$(SolutionDir)..\..\extlibs\headers""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -288,6 +291,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
|
@ -49,10 +49,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include";"$(SolutionDir)..\..\extlibs\headers""
|
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include";"$(SolutionDir)..\..\extlibs\headers""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC;GLEW_STATIC"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC;GLEW_STATIC"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -136,6 +137,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
@ -230,10 +232,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include";"$(SolutionDir)..\..\extlibs\headers""
|
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include";"$(SolutionDir)..\..\extlibs\headers""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;GLEW_STATIC"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;GLEW_STATIC"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -304,6 +307,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
|
@ -43,10 +43,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC;_CRT_SECURE_NO_DEPRECATE"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC;_CRT_SECURE_NO_DEPRECATE"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -126,6 +127,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
@ -216,10 +218,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -285,6 +288,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
|
@ -43,10 +43,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -125,6 +126,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
@ -214,10 +216,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -282,6 +285,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
|
@ -43,10 +43,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS;SFML_DYNAMIC"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -127,6 +128,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
@ -218,10 +220,11 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
AdditionalIncludeDirectories=""$(SolutionDir)..\..\src";"$(SolutionDir)..\..\include""
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS"
|
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;SFML_EXPORTS"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="false"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -288,6 +291,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalOptions="/MP"
|
||||||
Optimization="3"
|
Optimization="3"
|
||||||
InlineFunctionExpansion="2"
|
InlineFunctionExpansion="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
|
10
doc/SFML.htm
Normal file
10
doc/SFML.htm
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
|
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<title>SFML reference documentation</title>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
|
||||||
|
<meta http-equiv="refresh" content="0; url=./html/index.htm" />
|
||||||
|
<meta name="robots" content="noindex,follow" />
|
||||||
|
</head>
|
||||||
|
</html>
|
9
Doxyfile → doc/build/Doxyfile
vendored
9
Doxyfile → doc/build/Doxyfile
vendored
@ -38,7 +38,7 @@ PROJECT_NUMBER =
|
|||||||
# If a relative path is entered, it will be relative to the location
|
# If a relative path is entered, it will be relative to the location
|
||||||
# where doxygen was started. If left blank the current directory will be used.
|
# where doxygen was started. If left blank the current directory will be used.
|
||||||
|
|
||||||
OUTPUT_DIRECTORY = doc
|
OUTPUT_DIRECTORY = ..
|
||||||
|
|
||||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
|
||||||
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
# 4096 sub-directories (in 2 levels) under the output directory of each output
|
||||||
@ -573,9 +573,9 @@ WARN_LOGFILE =
|
|||||||
# directories like "/usr/src/myproject". Separate the files or directories
|
# directories like "/usr/src/myproject". Separate the files or directories
|
||||||
# with spaces.
|
# with spaces.
|
||||||
|
|
||||||
INPUT = include/SFML/ \
|
INPUT = ../../include/SFML/ \
|
||||||
Doxygen.hpp \
|
Doxygen.hpp \
|
||||||
src/SFML/
|
../../src/SFML/
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
|
||||||
@ -655,8 +655,7 @@ EXCLUDE_PATTERNS = .svn \
|
|||||||
Linux \
|
Linux \
|
||||||
Unix \
|
Unix \
|
||||||
Attic \
|
Attic \
|
||||||
OSX* \
|
OSX*
|
||||||
Win32
|
|
||||||
|
|
||||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
# (namespaces, classes, functions, etc.) that should be excluded from the
|
0
Doxygen.hpp → doc/build/Doxygen.hpp
vendored
0
Doxygen.hpp → doc/build/Doxygen.hpp
vendored
0
doxygen.css → doc/build/doxygen.css
vendored
0
doxygen.css → doc/build/doxygen.css
vendored
0
footer.htm → doc/build/footer.htm
vendored
0
footer.htm → doc/build/footer.htm
vendored
0
header.htm → doc/build/header.htm
vendored
0
header.htm → doc/build/header.htm
vendored
BIN
doc/html/logo-bg.jpg
Normal file
BIN
doc/html/logo-bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
BIN
doc/html/logo.jpg
Normal file
BIN
doc/html/logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 114 KiB |
@ -253,12 +253,11 @@ public :
|
|||||||
/// texture coordinates
|
/// texture coordinates
|
||||||
///
|
///
|
||||||
/// \param rectangle : Sub-rectangle of image to convert
|
/// \param rectangle : Sub-rectangle of image to convert
|
||||||
/// \param adjust : Pass true to apply the half-texel adjustment (true by default)
|
|
||||||
///
|
///
|
||||||
/// \return Texture coordinates corresponding to the sub-rectangle
|
/// \return Texture coordinates corresponding to the sub-rectangle
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
FloatRect GetTexCoords(const IntRect& rectangle, bool adjust = true) const;
|
FloatRect GetTexCoords(const IntRect& rectangle) const;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// Get a valid texture size according to hardware support
|
/// Get a valid texture size according to hardware support
|
||||||
|
@ -233,20 +233,15 @@ static PyObject *
|
|||||||
PySfImage_GetTexCoords(PySfImage* self, PyObject *args)
|
PySfImage_GetTexCoords(PySfImage* self, PyObject *args)
|
||||||
{
|
{
|
||||||
PySfIntRect *RectArg = NULL;
|
PySfIntRect *RectArg = NULL;
|
||||||
bool Adjust = false;
|
|
||||||
PyObject *AdjustObj = NULL;
|
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "O!|O:Image.GetTextCoords", &PySfIntRectType, &RectArg, &AdjustObj))
|
if (!PyArg_ParseTuple(args, "O!:Image.GetTextCoords", &PySfIntRectType, &RectArg))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (AdjustObj != NULL)
|
|
||||||
Adjust = PyBool_AsBool(AdjustObj);
|
|
||||||
|
|
||||||
PySfFloatRect *Rect;
|
PySfFloatRect *Rect;
|
||||||
|
|
||||||
Rect = GetNewPySfFloatRect();
|
Rect = GetNewPySfFloatRect();
|
||||||
Rect->Owner = true;
|
Rect->Owner = true;
|
||||||
Rect->obj = new sf::FloatRect(self->obj->GetTexCoords(*(RectArg->obj), Adjust));
|
Rect->obj = new sf::FloatRect(self->obj->GetTexCoords(*(RectArg->obj)));
|
||||||
PySfFloatRectUpdateSelf(Rect);
|
PySfFloatRectUpdateSelf(Rect);
|
||||||
|
|
||||||
return (PyObject *)Rect;
|
return (PyObject *)Rect;
|
||||||
@ -303,9 +298,8 @@ Create the image from the current contents of the given window. Return True if c
|
|||||||
{"SetSmooth", (PyCFunction)PySfImage_SetSmooth, METH_VARARGS, "SetSmooth(Smooth)\nEnable or disable image smooth filter."},
|
{"SetSmooth", (PyCFunction)PySfImage_SetSmooth, METH_VARARGS, "SetSmooth(Smooth)\nEnable or disable image smooth filter."},
|
||||||
{"GetWidth", (PyCFunction)PySfImage_GetWidth, METH_NOARGS, "GetWidth()\nReturn the width of the image."},
|
{"GetWidth", (PyCFunction)PySfImage_GetWidth, METH_NOARGS, "GetWidth()\nReturn the width of the image."},
|
||||||
{"GetHeight", (PyCFunction)PySfImage_GetHeight, METH_NOARGS, "GetHeight()\nReturn the height of the image."},
|
{"GetHeight", (PyCFunction)PySfImage_GetHeight, METH_NOARGS, "GetHeight()\nReturn the height of the image."},
|
||||||
{"GetTexCoords", (PyCFunction)PySfImage_GetTexCoords, METH_VARARGS, "GetTexCoords(Rect, Adjust=True)\nConvert a subrect expressed in pixels, into float texture coordinates. Returns texture coordinates corresponding to the sub-rectangle (sf.FloatRect instance)\n\
|
{"GetTexCoords", (PyCFunction)PySfImage_GetTexCoords, METH_VARARGS, "GetTexCoords(Rect)\nConvert a subrect expressed in pixels, into float texture coordinates. Returns texture coordinates corresponding to the sub-rectangle (sf.FloatRect instance)\n\
|
||||||
Rect : Sub-rectangle of image to convert\n\
|
Rect : Sub-rectangle of image to convert"},
|
||||||
Adjust : Pass true to apply the half-texel adjustment"},
|
|
||||||
{"GetValidTextureSize", (PyCFunction)PySfImage_GetValidTextureSize, METH_STATIC | METH_O, "GetValidTextureSize(Size)\nGet a valid texture size according to hardware support. Returns valid nearest size (greater than or equal to specified size).\n\
|
{"GetValidTextureSize", (PyCFunction)PySfImage_GetValidTextureSize, METH_STATIC | METH_O, "GetValidTextureSize(Size)\nGet a valid texture size according to hardware support. Returns valid nearest size (greater than or equal to specified size).\n\
|
||||||
Size : Size to convert"},
|
Size : Size to convert"},
|
||||||
{NULL} /* Sentinel */
|
{NULL} /* Sentinel */
|
||||||
|
@ -227,7 +227,7 @@ PySfWindow_GetSettings(PySfWindow *self)
|
|||||||
{
|
{
|
||||||
PySfWindowSettings *Settings;
|
PySfWindowSettings *Settings;
|
||||||
Settings = GetNewPySfWindowSettings();
|
Settings = GetNewPySfWindowSettings();
|
||||||
Settings->obj = (sf::WindowSettings *)&self->obj->GetSettings();
|
Settings->obj = new sf::WindowSettings(self->obj->GetSettings());
|
||||||
Settings->DepthBits = Settings->obj->DepthBits;
|
Settings->DepthBits = Settings->obj->DepthBits;
|
||||||
Settings->StencilBits = Settings->obj->StencilBits;
|
Settings->StencilBits = Settings->obj->StencilBits;
|
||||||
Settings->AntialiasingLevel = Settings->obj->AntialiasingLevel;
|
Settings->AntialiasingLevel = Settings->obj->AntialiasingLevel;
|
||||||
|
@ -210,10 +210,6 @@ FT_Error FontLoader::CreateBitmapFont(FT_Face face, unsigned int charSize, const
|
|||||||
FT_Glyph_To_Bitmap(&glyph, FT_RENDER_MODE_NORMAL, 0, 1);
|
FT_Glyph_To_Bitmap(&glyph, FT_RENDER_MODE_NORMAL, 0, 1);
|
||||||
FT_BitmapGlyph bitmapGlyph = (FT_BitmapGlyph)glyph;
|
FT_BitmapGlyph bitmapGlyph = (FT_BitmapGlyph)glyph;
|
||||||
|
|
||||||
// Should we handle other pixel modes ?
|
|
||||||
if (bitmapGlyph->bitmap.pixel_mode != FT_PIXEL_MODE_GRAY)
|
|
||||||
return FT_Err_Cannot_Render_Glyph;
|
|
||||||
|
|
||||||
// Add it to the sorted table of glyphs
|
// Add it to the sorted table of glyphs
|
||||||
glyphs.insert(std::make_pair(bitmapGlyph, charset[i]));
|
glyphs.insert(std::make_pair(bitmapGlyph, charset[i]));
|
||||||
}
|
}
|
||||||
@ -290,7 +286,7 @@ FT_Error FontLoader::CreateBitmapFont(FT_Face face, unsigned int charSize, const
|
|||||||
for (std::size_t i = 0; i < charset.size(); ++i)
|
for (std::size_t i = 0; i < charset.size(); ++i)
|
||||||
{
|
{
|
||||||
Uint32 curChar = charset[i];
|
Uint32 curChar = charset[i];
|
||||||
font.myGlyphs[curChar].TexCoords = font.myTexture.GetTexCoords(coords[curChar], false);
|
font.myGlyphs[curChar].TexCoords = font.myTexture.GetTexCoords(coords[curChar]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the character size (it may have been changed by the function)
|
// Update the character size (it may have been changed by the function)
|
||||||
|
@ -549,26 +549,16 @@ bool Image::IsSmooth() const
|
|||||||
/// Convert a subrect expressed in pixels, into float
|
/// Convert a subrect expressed in pixels, into float
|
||||||
/// texture coordinates
|
/// texture coordinates
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
FloatRect Image::GetTexCoords(const IntRect& rect, bool adjust) const
|
FloatRect Image::GetTexCoords(const IntRect& rect) const
|
||||||
{
|
{
|
||||||
float width = static_cast<float>(myTextureWidth);
|
float width = static_cast<float>(myTextureWidth);
|
||||||
float height = static_cast<float>(myTextureHeight);
|
float height = static_cast<float>(myTextureHeight);
|
||||||
|
|
||||||
FloatRect coords;
|
FloatRect coords;
|
||||||
if (adjust && myIsSmooth)
|
|
||||||
{
|
|
||||||
coords.Left = (rect.Left + 0.5f) / width;
|
|
||||||
coords.Top = (rect.Top + 0.5f) / height;
|
|
||||||
coords.Right = (rect.Right - 0.5f) / width;
|
|
||||||
coords.Bottom = (rect.Bottom - 0.5f) / height;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
coords.Left = rect.Left / width;
|
coords.Left = rect.Left / width;
|
||||||
coords.Top = rect.Top / height;
|
coords.Top = rect.Top / height;
|
||||||
coords.Right = rect.Right / width;
|
coords.Right = rect.Right / width;
|
||||||
coords.Bottom = rect.Bottom / height;
|
coords.Bottom = rect.Bottom / height;
|
||||||
}
|
|
||||||
|
|
||||||
if (myPixelsFlipped)
|
if (myPixelsFlipped)
|
||||||
std::swap(coords.Top, coords.Bottom);
|
std::swap(coords.Top, coords.Bottom);
|
||||||
|
@ -186,6 +186,10 @@ void Sprite::Render(RenderTarget&) const
|
|||||||
// Check if the image is valid
|
// Check if the image is valid
|
||||||
if (myImage && (myImage->GetWidth() > 0) && (myImage->GetHeight() > 0))
|
if (myImage && (myImage->GetWidth() > 0) && (myImage->GetHeight() > 0))
|
||||||
{
|
{
|
||||||
|
// Use the "offset trick" to get pixel-perfect rendering
|
||||||
|
// see http://www.opengl.org/resources/faq/technical/transformations.htm#tran0030
|
||||||
|
GLCheck(glTranslatef(0.375f, 0.375f, 0.f));
|
||||||
|
|
||||||
// Bind the texture
|
// Bind the texture
|
||||||
myImage->Bind();
|
myImage->Bind();
|
||||||
|
|
||||||
|
@ -50,14 +50,12 @@ namespace sf
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// Default constructor
|
/// Default constructor
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
Http::Request::Request(Method method, const std::string& URI, const std::string& body) :
|
Http::Request::Request(Method method, const std::string& URI, const std::string& body)
|
||||||
myMethod (method),
|
|
||||||
myURI (URI),
|
|
||||||
myMajorVersion(1),
|
|
||||||
myMinorVersion(0),
|
|
||||||
myBody (body)
|
|
||||||
{
|
{
|
||||||
|
SetMethod(method);
|
||||||
|
SetURI(URI);
|
||||||
|
SetHttpVersion(1, 0);
|
||||||
|
SetBody(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -179,7 +177,7 @@ myMinorVersion(0)
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
const std::string& Http::Response::GetField(const std::string& field) const
|
const std::string& Http::Response::GetField(const std::string& field) const
|
||||||
{
|
{
|
||||||
FieldTable::const_iterator it = myFields.find(field);
|
FieldTable::const_iterator it = myFields.find(ToLower(field));
|
||||||
if (it != myFields.end())
|
if (it != myFields.end())
|
||||||
{
|
{
|
||||||
return it->second;
|
return it->second;
|
||||||
|
Loading…
Reference in New Issue
Block a user