diff --git a/CSFML/build/VC2005/csfml-audio.vcproj b/CSFML/build/VC2005/csfml-audio.vcproj
index d0da74bb9..bc7563660 100644
--- a/CSFML/build/VC2005/csfml-audio.vcproj
+++ b/CSFML/build/VC2005/csfml-audio.vcproj
@@ -216,6 +216,10 @@
RelativePath="..\..\include\SFML\Audio\Music.h"
>
+
+
@@ -240,6 +244,14 @@
RelativePath="..\..\include\SFML\Audio\SoundBufferRecorder.h"
>
+
+
+
+
@@ -248,6 +260,10 @@
RelativePath="..\..\include\SFML\Audio\SoundRecorder.h"
>
+
+
@@ -260,6 +276,14 @@
RelativePath="..\..\include\SFML\Audio\SoundStream.h"
>
+
+
+
+
diff --git a/CSFML/build/VC2005/csfml-graphics-d.def b/CSFML/build/VC2005/csfml-graphics-d.def
index 60f095bad..0734be7bc 100644
--- a/CSFML/build/VC2005/csfml-graphics-d.def
+++ b/CSFML/build/VC2005/csfml-graphics-d.def
@@ -166,6 +166,22 @@ EXPORTS
sfString_GetStyle
sfString_GetCharacterPos
sfString_GetRect
+ sfRenderImage_Create
+ sfRenderImage_Destroy
+ sfRenderImage_GetWidth
+ sfRenderImage_GetHeight
+ sfRenderImage_SetActive
+ sfRenderImage_DrawPostFX
+ sfRenderImage_DrawSprite
+ sfRenderImage_DrawShape
+ sfRenderImage_DrawString
+ sfRenderImage_Clear
+ sfRenderImage_SetView
+ sfRenderImage_GetView
+ sfRenderImage_GetDefaultView
+ sfRenderImage_PreserveOpenGLStates
+ sfRenderImage_GetImage
+ sfRenderImage_CanUseRenderImage
sfRenderWindow_Create
sfRenderWindow_CreateFromHandle
sfRenderWindow_Destroy
diff --git a/CSFML/build/VC2005/csfml-graphics.def b/CSFML/build/VC2005/csfml-graphics.def
index 06ccc200e..ad5ec2d12 100644
--- a/CSFML/build/VC2005/csfml-graphics.def
+++ b/CSFML/build/VC2005/csfml-graphics.def
@@ -166,6 +166,22 @@ EXPORTS
sfString_GetStyle
sfString_GetCharacterPos
sfString_GetRect
+ sfRenderImage_Create
+ sfRenderImage_Destroy
+ sfRenderImage_GetWidth
+ sfRenderImage_GetHeight
+ sfRenderImage_SetActive
+ sfRenderImage_DrawPostFX
+ sfRenderImage_DrawSprite
+ sfRenderImage_DrawShape
+ sfRenderImage_DrawString
+ sfRenderImage_Clear
+ sfRenderImage_SetView
+ sfRenderImage_GetView
+ sfRenderImage_GetDefaultView
+ sfRenderImage_PreserveOpenGLStates
+ sfRenderImage_GetImage
+ sfRenderImage_CanUseRenderImage
sfRenderWindow_Create
sfRenderWindow_CreateFromHandle
sfRenderWindow_Destroy
diff --git a/CSFML/build/VC2005/csfml-graphics.vcproj b/CSFML/build/VC2005/csfml-graphics.vcproj
index 43b83f458..c45711533 100644
--- a/CSFML/build/VC2005/csfml-graphics.vcproj
+++ b/CSFML/build/VC2005/csfml-graphics.vcproj
@@ -229,6 +229,10 @@
RelativePath="..\..\include\SFML\Graphics\Font.h"
>
+
+
@@ -241,6 +245,10 @@
RelativePath="..\..\include\SFML\Graphics\Image.h"
>
+
+
@@ -249,6 +257,10 @@
RelativePath="..\..\include\SFML\Graphics\PostFX.h"
>
+
+
@@ -257,6 +269,18 @@
RelativePath="..\..\include\SFML\Graphics\Rect.h"
>
+
+
+
+
+
+
@@ -265,6 +289,10 @@
RelativePath="..\..\include\SFML\Graphics\RenderWindow.h"
>
+
+
@@ -273,6 +301,10 @@
RelativePath="..\..\include\SFML\Graphics\Shape.h"
>
+
+
@@ -281,6 +313,10 @@
RelativePath="..\..\include\SFML\Graphics\Sprite.h"
>
+
+
@@ -289,6 +325,10 @@
RelativePath="..\..\include\SFML\Graphics\String.h"
>
+
+
@@ -301,6 +341,10 @@
RelativePath="..\..\include\SFML\Graphics\View.h"
>
+
+
diff --git a/CSFML/build/VC2005/csfml-network.vcproj b/CSFML/build/VC2005/csfml-network.vcproj
index 43de6fd3a..7da73efea 100644
--- a/CSFML/build/VC2005/csfml-network.vcproj
+++ b/CSFML/build/VC2005/csfml-network.vcproj
@@ -206,6 +206,10 @@
RelativePath="..\..\include\SFML\Network\Ftp.h"
>
+
+
@@ -214,6 +218,10 @@
RelativePath="..\..\include\SFML\Network\Http.h"
>
+
+
@@ -230,6 +238,10 @@
RelativePath="..\..\include\SFML\Network\Packet.h"
>
+
+
@@ -238,6 +250,10 @@
RelativePath="..\..\include\SFML\Network\Selector.h"
>
+
+
@@ -250,6 +266,10 @@
RelativePath="..\..\include\SFML\Network\SocketTCP.h"
>
+
+
@@ -258,6 +278,10 @@
RelativePath="..\..\include\SFML\Network\SocketUDP.h"
>
+
+
diff --git a/CSFML/build/VC2005/csfml-system.vcproj b/CSFML/build/VC2005/csfml-system.vcproj
index 58b85e2b0..7b4a2a42c 100644
--- a/CSFML/build/VC2005/csfml-system.vcproj
+++ b/CSFML/build/VC2005/csfml-system.vcproj
@@ -198,6 +198,10 @@
RelativePath="..\..\include\SFML\System\Clock.h"
>
+
+
@@ -214,6 +218,10 @@
RelativePath="..\..\include\SFML\System\Mutex.h"
>
+
+
@@ -238,6 +246,10 @@
RelativePath="..\..\include\SFML\System\Thread.h"
>
+
+
diff --git a/CSFML/build/VC2005/csfml-window.vcproj b/CSFML/build/VC2005/csfml-window.vcproj
index b24999732..bbb013fcd 100644
--- a/CSFML/build/VC2005/csfml-window.vcproj
+++ b/CSFML/build/VC2005/csfml-window.vcproj
@@ -200,6 +200,10 @@
RelativePath="..\..\include\SFML\Window\Context.h"
>
+
+
@@ -220,6 +224,10 @@
RelativePath="..\..\include\SFML\Window\Input.h"
>
+
+
@@ -244,6 +252,10 @@
RelativePath="..\..\include\SFML\Window\WindowHandle.h"
>
+
+
diff --git a/CSFML/build/VC2008/csfml-audio.vcproj b/CSFML/build/VC2008/csfml-audio.vcproj
index cf0292111..1c1881430 100644
--- a/CSFML/build/VC2008/csfml-audio.vcproj
+++ b/CSFML/build/VC2008/csfml-audio.vcproj
@@ -239,6 +239,14 @@
RelativePath="..\..\include\SFML\Audio\SoundBufferRecorder.h"
>
+
+
+
+
@@ -247,6 +255,10 @@
RelativePath="..\..\include\SFML\Audio\SoundRecorder.h"
>
+
+
@@ -259,6 +271,14 @@
RelativePath="..\..\include\SFML\Audio\SoundStream.h"
>
+
+
+
+
diff --git a/CSFML/build/VC2008/csfml-graphics-d.def b/CSFML/build/VC2008/csfml-graphics-d.def
index 60f095bad..0734be7bc 100644
--- a/CSFML/build/VC2008/csfml-graphics-d.def
+++ b/CSFML/build/VC2008/csfml-graphics-d.def
@@ -166,6 +166,22 @@ EXPORTS
sfString_GetStyle
sfString_GetCharacterPos
sfString_GetRect
+ sfRenderImage_Create
+ sfRenderImage_Destroy
+ sfRenderImage_GetWidth
+ sfRenderImage_GetHeight
+ sfRenderImage_SetActive
+ sfRenderImage_DrawPostFX
+ sfRenderImage_DrawSprite
+ sfRenderImage_DrawShape
+ sfRenderImage_DrawString
+ sfRenderImage_Clear
+ sfRenderImage_SetView
+ sfRenderImage_GetView
+ sfRenderImage_GetDefaultView
+ sfRenderImage_PreserveOpenGLStates
+ sfRenderImage_GetImage
+ sfRenderImage_CanUseRenderImage
sfRenderWindow_Create
sfRenderWindow_CreateFromHandle
sfRenderWindow_Destroy
diff --git a/CSFML/build/VC2008/csfml-graphics.def b/CSFML/build/VC2008/csfml-graphics.def
index 06ccc200e..ad5ec2d12 100644
--- a/CSFML/build/VC2008/csfml-graphics.def
+++ b/CSFML/build/VC2008/csfml-graphics.def
@@ -166,6 +166,22 @@ EXPORTS
sfString_GetStyle
sfString_GetCharacterPos
sfString_GetRect
+ sfRenderImage_Create
+ sfRenderImage_Destroy
+ sfRenderImage_GetWidth
+ sfRenderImage_GetHeight
+ sfRenderImage_SetActive
+ sfRenderImage_DrawPostFX
+ sfRenderImage_DrawSprite
+ sfRenderImage_DrawShape
+ sfRenderImage_DrawString
+ sfRenderImage_Clear
+ sfRenderImage_SetView
+ sfRenderImage_GetView
+ sfRenderImage_GetDefaultView
+ sfRenderImage_PreserveOpenGLStates
+ sfRenderImage_GetImage
+ sfRenderImage_CanUseRenderImage
sfRenderWindow_Create
sfRenderWindow_CreateFromHandle
sfRenderWindow_Destroy
diff --git a/CSFML/build/VC2008/csfml-graphics.vcproj b/CSFML/build/VC2008/csfml-graphics.vcproj
index ada3af4a0..22bcb1991 100644
--- a/CSFML/build/VC2008/csfml-graphics.vcproj
+++ b/CSFML/build/VC2008/csfml-graphics.vcproj
@@ -228,6 +228,10 @@
RelativePath="..\..\include\SFML\Graphics\Font.h"
>
+
+
@@ -236,6 +240,10 @@
RelativePath="..\..\include\SFML\Graphics\Image.h"
>
+
+
@@ -244,6 +252,10 @@
RelativePath="..\..\include\SFML\Graphics\PostFX.h"
>
+
+
@@ -252,6 +264,14 @@
RelativePath="..\..\include\SFML\Graphics\Rect.h"
>
+
+
+
+
@@ -260,6 +280,10 @@
RelativePath="..\..\include\SFML\Graphics\RenderWindow.h"
>
+
+
@@ -268,6 +292,10 @@
RelativePath="..\..\include\SFML\Graphics\Shape.h"
>
+
+
@@ -276,6 +304,10 @@
RelativePath="..\..\include\SFML\Graphics\Sprite.h"
>
+
+
@@ -284,6 +316,10 @@
RelativePath="..\..\include\SFML\Graphics\String.h"
>
+
+
@@ -296,6 +332,10 @@
RelativePath="..\..\include\SFML\Graphics\View.h"
>
+
+
diff --git a/CSFML/build/VC2008/csfml-network.vcproj b/CSFML/build/VC2008/csfml-network.vcproj
index 11009488c..bedc23af6 100644
--- a/CSFML/build/VC2008/csfml-network.vcproj
+++ b/CSFML/build/VC2008/csfml-network.vcproj
@@ -205,6 +205,10 @@
RelativePath="..\..\include\SFML\Network\Ftp.h"
>
+
+
@@ -213,6 +217,10 @@
RelativePath="..\..\include\SFML\Network\Http.h"
>
+
+
@@ -229,6 +237,10 @@
RelativePath="..\..\include\SFML\Network\Packet.h"
>
+
+
@@ -237,6 +249,10 @@
RelativePath="..\..\include\SFML\Network\Selector.h"
>
+
+
@@ -249,6 +265,10 @@
RelativePath="..\..\include\SFML\Network\SocketTCP.h"
>
+
+
@@ -257,6 +277,10 @@
RelativePath="..\..\include\SFML\Network\SocketUDP.h"
>
+
+
diff --git a/CSFML/build/VC2008/csfml-system.vcproj b/CSFML/build/VC2008/csfml-system.vcproj
index c1aaeb3ff..03628aea9 100644
--- a/CSFML/build/VC2008/csfml-system.vcproj
+++ b/CSFML/build/VC2008/csfml-system.vcproj
@@ -197,6 +197,10 @@
RelativePath="..\..\include\SFML\System\Clock.h"
>
+
+
@@ -213,6 +217,10 @@
RelativePath="..\..\include\SFML\System\Mutex.h"
>
+
+
@@ -237,6 +245,10 @@
RelativePath="..\..\include\SFML\System\Thread.h"
>
+
+
diff --git a/CSFML/build/VC2008/csfml-window.vcproj b/CSFML/build/VC2008/csfml-window.vcproj
index 06b582731..b0110d281 100644
--- a/CSFML/build/VC2008/csfml-window.vcproj
+++ b/CSFML/build/VC2008/csfml-window.vcproj
@@ -199,6 +199,10 @@
RelativePath="..\..\include\SFML\Window\Context.h"
>
+
+
@@ -219,6 +223,10 @@
RelativePath="..\..\include\SFML\Window\Input.h"
>
+
+
@@ -243,6 +251,10 @@
RelativePath="..\..\include\SFML\Window\WindowHandle.h"
>
+
+
diff --git a/CSFML/build/codeblocks/csfml-audio.cbp b/CSFML/build/codeblocks/csfml-audio.cbp
index 9e22afa75..395bbd41b 100644
--- a/CSFML/build/codeblocks/csfml-audio.cbp
+++ b/CSFML/build/codeblocks/csfml-audio.cbp
@@ -64,11 +64,17 @@
+
+
+
+
+
+
diff --git a/CSFML/build/codeblocks/csfml-graphics.cbp b/CSFML/build/codeblocks/csfml-graphics.cbp
index 884f3fa99..9c9220f2b 100644
--- a/CSFML/build/codeblocks/csfml-graphics.cbp
+++ b/CSFML/build/codeblocks/csfml-graphics.cbp
@@ -69,14 +69,24 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/CSFML/build/codeblocks/csfml-network.cbp b/CSFML/build/codeblocks/csfml-network.cbp
index 8c183f380..2127d08f3 100644
--- a/CSFML/build/codeblocks/csfml-network.cbp
+++ b/CSFML/build/codeblocks/csfml-network.cbp
@@ -63,12 +63,18 @@
+
+
+
+
+
+
diff --git a/CSFML/build/codeblocks/csfml-system.cbp b/CSFML/build/codeblocks/csfml-system.cbp
index f1cf47a49..d750bcf88 100644
--- a/CSFML/build/codeblocks/csfml-system.cbp
+++ b/CSFML/build/codeblocks/csfml-system.cbp
@@ -58,10 +58,13 @@
+
+
+
diff --git a/CSFML/build/codeblocks/csfml-window.cbp b/CSFML/build/codeblocks/csfml-window.cbp
index 3c603655b..328259d04 100644
--- a/CSFML/build/codeblocks/csfml-window.cbp
+++ b/CSFML/build/codeblocks/csfml-window.cbp
@@ -63,9 +63,12 @@
+
+
+
diff --git a/CSFML/include/SFML/Audio.h b/CSFML/include/SFML/Audio.h
index bfa70f4b6..64254130c 100644
--- a/CSFML/include/SFML/Audio.h
+++ b/CSFML/include/SFML/Audio.h
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007 Laurent Gomila (laurent.gom@gmail.com)
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
diff --git a/CSFML/include/SFML/Audio/Types.h b/CSFML/include/SFML/Audio/Types.h
index 3ade7fdbc..af2136069 100644
--- a/CSFML/include/SFML/Audio/Types.h
+++ b/CSFML/include/SFML/Audio/Types.h
@@ -1,8 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2009-2008 Laurent Gomila (laurent.gom@gmail.com)
-//
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
diff --git a/CSFML/include/SFML/Config.h b/CSFML/include/SFML/Config.h
index 8869d74be..bd75fa924 100644
--- a/CSFML/include/SFML/Config.h
+++ b/CSFML/include/SFML/Config.h
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007 Laurent Gomila (laurent.gom@gmail.com)
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
diff --git a/CSFML/include/SFML/Graphics.h b/CSFML/include/SFML/Graphics.h
index 2b3131c6b..35de6312a 100644
--- a/CSFML/include/SFML/Graphics.h
+++ b/CSFML/include/SFML/Graphics.h
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007 Laurent Gomila (laurent.gom@gmail.com)
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
diff --git a/CSFML/include/SFML/Graphics/RenderImage.h b/CSFML/include/SFML/Graphics/RenderImage.h
new file mode 100644
index 000000000..3e6c38f9f
--- /dev/null
+++ b/CSFML/include/SFML/Graphics/RenderImage.h
@@ -0,0 +1,169 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_RENDERIMAGE_H
+#define SFML_RENDERIMAGE_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+
+
+////////////////////////////////////////////////////////////
+/// Construct a new renderimage
+///
+/// \param Width : Width of the renderimage
+/// \param Height : Height of the renderimage
+/// \param DepthBuffer : Do you want a depth-buffer attached? (useful only if you're doing 3D OpenGL on the renderimage)
+///
+////////////////////////////////////////////////////////////
+CSFML_API sfRenderImage* sfRenderImage_Create(unsigned int Width, unsigned int Height, sfBool DepthBuffer);
+
+////////////////////////////////////////////////////////////
+/// Destroy an existing renderimage
+///
+/// \param RenderImage : renderimage to destroy
+///
+////////////////////////////////////////////////////////////
+CSFML_API void sfRenderImage_Destroy(sfRenderImage* RenderImage);
+
+////////////////////////////////////////////////////////////
+/// Get the width of the rendering region of a renderimage
+///
+/// \param RenderImage : Renderimage object
+///
+/// \return Width in pixels
+///
+////////////////////////////////////////////////////////////
+CSFML_API unsigned int sfRenderImage_GetWidth(sfRenderImage* RenderImage);
+
+////////////////////////////////////////////////////////////
+/// Get the height of the rendering region of a renderimage
+///
+/// \param RenderImage : Renderimage object
+///
+/// \return Height in pixels
+///
+////////////////////////////////////////////////////////////
+CSFML_API unsigned int sfRenderImage_GetHeight(sfRenderImage* RenderImage);
+
+////////////////////////////////////////////////////////////
+/// Activate or deactivate a renderimage as the current target for rendering
+///
+/// \param RenderImage : Renderimage object
+/// \param Active : sfTrue to activate, sfFalse to deactivate
+///
+/// \return True if operation was successful, false otherwise
+///
+////////////////////////////////////////////////////////////
+CSFML_API sfBool sfRenderImage_SetActive(sfRenderImage* RenderImage, sfBool Active);
+
+////////////////////////////////////////////////////////////
+/// Draw something on a renderimage
+///
+/// \param RenderImage : Renderimage to draw in
+/// \param PostFX / Sprite / String / shape : Object to draw
+///
+////////////////////////////////////////////////////////////
+CSFML_API void sfRenderImage_DrawPostFX(sfRenderImage* RenderImage, sfPostFX* PostFX);
+CSFML_API void sfRenderImage_DrawSprite(sfRenderImage* RenderImage, sfSprite* Sprite);
+CSFML_API void sfRenderImage_DrawShape (sfRenderImage* RenderImage, sfShape* Shape);
+CSFML_API void sfRenderImage_DrawString(sfRenderImage* RenderImage, sfString* String);
+
+////////////////////////////////////////////////////////////
+/// Clear the renderimage with the given color
+///
+/// \param RenderImage : Renderimage to modify
+/// \param Color : Fill color
+///
+////////////////////////////////////////////////////////////
+CSFML_API void sfRenderImage_Clear(sfRenderImage* RenderImage, sfColor Color);
+
+////////////////////////////////////////////////////////////
+/// Change the current active view of a renderimage
+///
+/// \param RenderImage : Renderimage to modify
+/// \param NewView : Pointer to the new view
+///
+////////////////////////////////////////////////////////////
+CSFML_API void sfRenderImage_SetView(sfRenderImage* RenderImage, sfView* View);
+
+////////////////////////////////////////////////////////////
+/// Get the current active view of a renderimage
+///
+/// \param RenderImage : Renderimage
+///
+/// \return Current active view
+///
+////////////////////////////////////////////////////////////
+CSFML_API const sfView* sfRenderImage_GetView(sfRenderImage* RenderImage);
+
+////////////////////////////////////////////////////////////
+/// Get the default view of a renderimage
+///
+/// \param RenderImage : Renderimage
+///
+/// \return Default view of the renderimage
+///
+////////////////////////////////////////////////////////////
+CSFML_API sfView* sfRenderImage_GetDefaultView(sfRenderImage* RenderImage);
+
+////////////////////////////////////////////////////////////
+/// Tell SFML to preserve external OpenGL states, at the expense of
+/// more CPU charge. Use this function if you don't want SFML
+/// to mess up your own OpenGL states (if any).
+/// Don't enable state preservation if not needed, as it will allow
+/// SFML to do internal optimizations and improve performances.
+/// This parameter is false by default
+///
+/// \param RenderImage : Target renderimage
+/// \param Preserve : True to preserve OpenGL states, false to let SFML optimize
+///
+////////////////////////////////////////////////////////////
+CSFML_API void sfRenderImage_PreserveOpenGLStates(sfRenderImage* RenderImage, sfBool Preserve);
+
+////////////////////////////////////////////////////////////
+/// Get the target image
+///
+/// \param RenderImage : Renderimage object
+///
+/// \return Pointer to the target image
+///
+////////////////////////////////////////////////////////////
+CSFML_API sfImage* sfRenderImage_GetImage(sfRenderImage* RenderImage);
+
+////////////////////////////////////////////////////////////
+/// Check whether the system supports render images or not
+///
+/// \return sfTrue if the RenderImage class can be used
+///
+////////////////////////////////////////////////////////////
+CSFML_API sfBool sfRenderImage_CanUseRenderImage();
+
+
+#endif // SFML_RENDERIMAGE_H
diff --git a/CSFML/include/SFML/Graphics/Types.h b/CSFML/include/SFML/Graphics/Types.h
index b8119a611..10b8bb181 100644
--- a/CSFML/include/SFML/Graphics/Types.h
+++ b/CSFML/include/SFML/Graphics/Types.h
@@ -29,6 +29,7 @@
typedef struct sfFont sfFont;
typedef struct sfImage sfImage;
typedef struct sfPostFX sfPostFX;
+typedef struct sfRenderImage sfRenderImage;
typedef struct sfRenderWindow sfRenderWindow;
typedef struct sfShape sfShape;
typedef struct sfSprite sfSprite;
diff --git a/CSFML/include/SFML/Network.h b/CSFML/include/SFML/Network.h
index 4a238822a..bbc87ffcd 100644
--- a/CSFML/include/SFML/Network.h
+++ b/CSFML/include/SFML/Network.h
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007 Laurent Gomila (laurent.gom@gmail.com)
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
diff --git a/CSFML/include/SFML/Network/Types.h b/CSFML/include/SFML/Network/Types.h
index bd74b2c22..5878a6262 100644
--- a/CSFML/include/SFML/Network/Types.h
+++ b/CSFML/include/SFML/Network/Types.h
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2009-2008 Laurent Gomila (laurent.gom@gmail.com)
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
diff --git a/CSFML/include/SFML/System.h b/CSFML/include/SFML/System.h
index dcc87a01d..428627e3b 100644
--- a/CSFML/include/SFML/System.h
+++ b/CSFML/include/SFML/System.h
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007 Laurent Gomila (laurent.gom@gmail.com)
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
diff --git a/CSFML/include/SFML/System/Types.h b/CSFML/include/SFML/System/Types.h
index 82feb1a52..c071b4804 100644
--- a/CSFML/include/SFML/System/Types.h
+++ b/CSFML/include/SFML/System/Types.h
@@ -1,8 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2009-2008 Laurent Gomila (laurent.gom@gmail.com)
-//
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
diff --git a/CSFML/include/SFML/Window.h b/CSFML/include/SFML/Window.h
index d989cddfa..32847b5d2 100644
--- a/CSFML/include/SFML/Window.h
+++ b/CSFML/include/SFML/Window.h
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007 Laurent Gomila (laurent.gom@gmail.com)
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
@@ -33,6 +33,7 @@
#include
#include
#include
+#include
#include
#include
diff --git a/CSFML/include/SFML/Window/Event.h b/CSFML/include/SFML/Window/Event.h
index 3cd983245..3471ccaf7 100644
--- a/CSFML/include/SFML/Window/Event.h
+++ b/CSFML/include/SFML/Window/Event.h
@@ -1,8 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2009-2008 Laurent Gomila (laurent.gom@gmail.com)
-//
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
diff --git a/CSFML/include/SFML/Window/Input.h b/CSFML/include/SFML/Window/Input.h
index 0b313bfa6..d8aacaf1a 100644
--- a/CSFML/include/SFML/Window/Input.h
+++ b/CSFML/include/SFML/Window/Input.h
@@ -1,8 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2009-2008 Laurent Gomila (laurent.gom@gmail.com)
-//
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
diff --git a/CSFML/include/SFML/Window/OpenGL.h b/CSFML/include/SFML/Window/OpenGL.h
new file mode 100644
index 000000000..d65ca1100
--- /dev/null
+++ b/CSFML/include/SFML/Window/OpenGL.h
@@ -0,0 +1,59 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_OPENGL_H
+#define SFML_OPENGL_H
+
+
+////////////////////////////////////////////////////////////
+/// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+/// This file just includes the OpenGL (GL and GLU) headers,
+/// which have actually different paths on each system
+////////////////////////////////////////////////////////////
+#if defined(CSFML_SYSTEM_WINDOWS)
+
+ #include
+ #include
+ #include
+
+#elif defined(CSFML_SYSTEM_LINUX) || defined(CSFML_SYSTEM_FREEBSD)
+
+ #include
+ #include
+
+#elif defined(CSFML_SYSTEM_MACOS)
+
+ #include
+ #include
+
+#endif
+
+
+#endif // SFML_OPENGL_H
+
diff --git a/CSFML/include/SFML/Window/Types.h b/CSFML/include/SFML/Window/Types.h
index c5695c291..f91fdabcd 100644
--- a/CSFML/include/SFML/Window/Types.h
+++ b/CSFML/include/SFML/Window/Types.h
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2009-2008 Laurent Gomila (laurent.gom@gmail.com)
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
diff --git a/CSFML/include/SFML/Window/VideoMode.h b/CSFML/include/SFML/Window/VideoMode.h
index 64f5a18a4..ea3bfda03 100644
--- a/CSFML/include/SFML/Window/VideoMode.h
+++ b/CSFML/include/SFML/Window/VideoMode.h
@@ -1,8 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2009-2008 Laurent Gomila (laurent.gom@gmail.com)
-//
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
diff --git a/CSFML/include/SFML/Window/Window.h b/CSFML/include/SFML/Window/Window.h
index 8c5748c78..cb2bfb34a 100644
--- a/CSFML/include/SFML/Window/Window.h
+++ b/CSFML/include/SFML/Window/Window.h
@@ -1,7 +1,7 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2009-2008 Laurent Gomila (laurent.gom@gmail.com)
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
diff --git a/CSFML/include/SFML/Window/WindowHandle.h b/CSFML/include/SFML/Window/WindowHandle.h
index 04722c4b3..2a1a6974d 100644
--- a/CSFML/include/SFML/Window/WindowHandle.h
+++ b/CSFML/include/SFML/Window/WindowHandle.h
@@ -1,56 +1,56 @@
-////////////////////////////////////////////////////////////
-//
-// SFML - Simple and Fast Multimedia Library
-// Copyright (C) 2007-2009-2008 Laurent Gomila (laurent.gom@gmail.com)
-//
-// This software is provided 'as-is', without any express or implied warranty.
-// In no event will the authors be held liable for any damages arising from the use of this software.
-//
-// Permission is granted to anyone to use this software for any purpose,
-// including commercial applications, and to alter it and redistribute it freely,
-// subject to the following restrictions:
-//
-// 1. The origin of this software must not be misrepresented;
-// you must not claim that you wrote the original software.
-// If you use this software in a product, an acknowledgment
-// in the product documentation would be appreciated but is not required.
-//
-// 2. Altered source versions must be plainly marked as such,
-// and must not be misrepresented as being the original software.
-//
-// 3. This notice may not be removed or altered from any source distribution.
-//
-////////////////////////////////////////////////////////////
-
-#ifndef SFML_WINDOWHANDLE_H
-#define SFML_WINDOWHANDLE_H
-
-////////////////////////////////////////////////////////////
-// Headers
-////////////////////////////////////////////////////////////
-#include
-
-
-////////////////////////////////////////////////////////////
-/// Define a low-level window handle type, specific to
-/// each platform
-////////////////////////////////////////////////////////////
-#if defined(CSFML_SYSTEM_WINDOWS)
-
- // Windows defines a void* handle (HWND)
- typedef void* sfWindowHandle;
-
-#elif defined(CSFML_SYSTEM_LINUX)
-
- // Unix - X11 defines an unsigned integer handle (Window)
- typedef unsigned long sfWindowHandle;
-
-#elif defined(CSFML_SYSTEM_MACOS)
-
- // Mac OS X defines a void* handle (NSWindow)
- typedef void * sfWindowHandle;
-
-#endif
-
-
-#endif // SFML_WINDOWHANDLE_H
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_WINDOWHANDLE_H
+#define SFML_WINDOWHANDLE_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+/// Define a low-level window handle type, specific to
+/// each platform
+////////////////////////////////////////////////////////////
+#if defined(CSFML_SYSTEM_WINDOWS)
+
+ // Windows defines a void* handle (HWND)
+ typedef void* sfWindowHandle;
+
+#elif defined(CSFML_SYSTEM_LINUX)
+
+ // Unix - X11 defines an unsigned integer handle (Window)
+ typedef unsigned long sfWindowHandle;
+
+#elif defined(CSFML_SYSTEM_MACOS)
+
+ // Mac OS X defines a void* handle (NSWindow)
+ typedef void* sfWindowHandle;
+
+#endif
+
+
+#endif // SFML_WINDOWHANDLE_H
diff --git a/CSFML/src/SFML/Audio/Music.cpp b/CSFML/src/SFML/Audio/Music.cpp
index 9c6d9a14f..e3e8ebbbf 100644
--- a/CSFML/src/SFML/Audio/Music.cpp
+++ b/CSFML/src/SFML/Audio/Music.cpp
@@ -26,16 +26,10 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
-struct sfMusic
-{
- sf::Music This;
-};
-
-
////////////////////////////////////////////////////////////
/// Create a new music and load it from a file
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Audio/MusicStruct.h b/CSFML/src/SFML/Audio/MusicStruct.h
new file mode 100644
index 000000000..8c82e893e
--- /dev/null
+++ b/CSFML/src/SFML/Audio/MusicStruct.h
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_MUSICSTRUCT_H
+#define SFML_MUSICSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfMusic
+////////////////////////////////////////////////////////////
+struct sfMusic
+{
+ sf::Music This;
+};
+
+
+#endif // SFML_MUSICSTRUCT_H
diff --git a/CSFML/src/SFML/Audio/Sound.cpp b/CSFML/src/SFML/Audio/Sound.cpp
index 176bb5b47..ae82d8a5b 100644
--- a/CSFML/src/SFML/Audio/Sound.cpp
+++ b/CSFML/src/SFML/Audio/Sound.cpp
@@ -26,23 +26,10 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
-#include
+#include
#include
-// WARNING : this structure must always be the SAME as in Audio/SoundBuffer.h
-struct sfSoundBuffer
-{
- sf::SoundBuffer This;
-};
-struct sfSound
-{
- sf::Sound This;
- sfSoundBuffer* Buffer;
-};
-
-
////////////////////////////////////////////////////////////
/// Construct a new sound
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Audio/SoundBuffer.cpp b/CSFML/src/SFML/Audio/SoundBuffer.cpp
index a7136eaef..2c28a65eb 100644
--- a/CSFML/src/SFML/Audio/SoundBuffer.cpp
+++ b/CSFML/src/SFML/Audio/SoundBuffer.cpp
@@ -26,16 +26,10 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
-struct sfSoundBuffer
-{
- sf::SoundBuffer This;
-};
-
-
////////////////////////////////////////////////////////////
/// Create a new sound buffer and load it from a file
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Audio/SoundBufferRecorder.cpp b/CSFML/src/SFML/Audio/SoundBufferRecorder.cpp
index 4beb86aee..b5d705b43 100644
--- a/CSFML/src/SFML/Audio/SoundBufferRecorder.cpp
+++ b/CSFML/src/SFML/Audio/SoundBufferRecorder.cpp
@@ -26,24 +26,10 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
-#include
+#include
#include
-// WARNING : this structure must always be the SAME as in Audio/SoundBuffer.h
-struct sfSoundBuffer
-{
- sf::SoundBuffer This;
-};
-
-struct sfSoundBufferRecorder
-{
- sf::SoundBufferRecorder This;
- sfSoundBuffer SoundBuffer;
-};
-
-
////////////////////////////////////////////////////////////
/// Construct a new sound buffer recorder
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Audio/SoundBufferRecorderStruct.h b/CSFML/src/SFML/Audio/SoundBufferRecorderStruct.h
new file mode 100644
index 000000000..71c1a8eb5
--- /dev/null
+++ b/CSFML/src/SFML/Audio/SoundBufferRecorderStruct.h
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDBUFFERRECORDERSTRUCT_H
+#define SFML_SOUNDBUFFERRECORDERSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfSoundBufferRecorder
+////////////////////////////////////////////////////////////
+struct sfSoundBufferRecorder
+{
+ sf::SoundBufferRecorder This;
+ sfSoundBuffer SoundBuffer;
+};
+
+
+#endif // SFML_SOUNDBUFFERRECORDERSTRUCT_H
diff --git a/CSFML/src/SFML/Audio/SoundBufferStruct.h b/CSFML/src/SFML/Audio/SoundBufferStruct.h
new file mode 100644
index 000000000..8cadb73eb
--- /dev/null
+++ b/CSFML/src/SFML/Audio/SoundBufferStruct.h
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDBUFFERSTRUCT_H
+#define SFML_SOUNDBUFFERSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfSoundBuffer
+////////////////////////////////////////////////////////////
+struct sfSoundBuffer
+{
+ sf::SoundBuffer This;
+};
+
+
+#endif // SFML_SOUNDBUFFERSTRUCT_H
diff --git a/CSFML/src/SFML/Audio/SoundRecorder.cpp b/CSFML/src/SFML/Audio/SoundRecorder.cpp
index 069bfb812..6013608fb 100644
--- a/CSFML/src/SFML/Audio/SoundRecorder.cpp
+++ b/CSFML/src/SFML/Audio/SoundRecorder.cpp
@@ -26,70 +26,10 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
-class sfSoundRecorderImpl : public sf::SoundRecorder
-{
-public :
-
- sfSoundRecorderImpl(sfSoundRecorderStartCallback OnStart,
- sfSoundRecorderProcessCallback OnProcess,
- sfSoundRecorderStopCallback OnStop,
- void* UserData) :
- myStartCallback (OnStart),
- myProcessCallback(OnProcess),
- myStopCallback (OnStop),
- myUserData (UserData)
- {
- }
-
-private :
-
- virtual bool OnStart()
- {
- if (myStartCallback)
- return myStartCallback(myUserData) == sfTrue;
- else
- return true;
- }
-
- virtual bool OnProcessSamples(const sf::Int16* Samples, std::size_t SamplesCount)
- {
- if (myProcessCallback)
- return myProcessCallback(Samples, SamplesCount, myUserData) == sfTrue;
- else
- return true;
- }
-
- virtual void OnStop()
- {
- if (myStopCallback)
- myStopCallback(myUserData);
- }
-
- sfSoundRecorderStartCallback myStartCallback;
- sfSoundRecorderProcessCallback myProcessCallback;
- sfSoundRecorderStopCallback myStopCallback;
- void* myUserData;
-};
-
-
-struct sfSoundRecorder
-{
- sfSoundRecorder(sfSoundRecorderStartCallback OnStart,
- sfSoundRecorderProcessCallback OnProcess,
- sfSoundRecorderStopCallback OnStop,
- void* UserData) :
- This(OnStart, OnProcess, OnStop, UserData)
- {
- }
-
- sfSoundRecorderImpl This;
-};
-
-
////////////////////////////////////////////////////////////
/// Construct a new sound recorder with callback functions
/// for processing captured samples
diff --git a/CSFML/src/SFML/Audio/SoundRecorderStruct.h b/CSFML/src/SFML/Audio/SoundRecorderStruct.h
new file mode 100644
index 000000000..7de0f1ca8
--- /dev/null
+++ b/CSFML/src/SFML/Audio/SoundRecorderStruct.h
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDRECORDERSTRUCT_H
+#define SFML_SOUNDRECORDERSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+
+
+////////////////////////////////////////////////////////////
+// Helper class implementing the callback forwarding from
+// C++ to C in sfSoundRecorder
+////////////////////////////////////////////////////////////
+class sfSoundRecorderImpl : public sf::SoundRecorder
+{
+public :
+
+ sfSoundRecorderImpl(sfSoundRecorderStartCallback OnStart,
+ sfSoundRecorderProcessCallback OnProcess,
+ sfSoundRecorderStopCallback OnStop,
+ void* UserData) :
+ myStartCallback (OnStart),
+ myProcessCallback(OnProcess),
+ myStopCallback (OnStop),
+ myUserData (UserData)
+ {
+ }
+
+private :
+
+ virtual bool OnStart()
+ {
+ if (myStartCallback)
+ return myStartCallback(myUserData) == sfTrue;
+ else
+ return true;
+ }
+
+ virtual bool OnProcessSamples(const sf::Int16* Samples, std::size_t SamplesCount)
+ {
+ if (myProcessCallback)
+ return myProcessCallback(Samples, SamplesCount, myUserData) == sfTrue;
+ else
+ return true;
+ }
+
+ virtual void OnStop()
+ {
+ if (myStopCallback)
+ myStopCallback(myUserData);
+ }
+
+ sfSoundRecorderStartCallback myStartCallback;
+ sfSoundRecorderProcessCallback myProcessCallback;
+ sfSoundRecorderStopCallback myStopCallback;
+ void* myUserData;
+};
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfPacket
+////////////////////////////////////////////////////////////
+struct sfSoundRecorder
+{
+ sfSoundRecorder(sfSoundRecorderStartCallback OnStart,
+ sfSoundRecorderProcessCallback OnProcess,
+ sfSoundRecorderStopCallback OnStop,
+ void* UserData) :
+ This(OnStart, OnProcess, OnStop, UserData)
+ {
+ }
+
+ sfSoundRecorderImpl This;
+};
+
+
+#endif // SFML_SOUNDRECORDERSTRUCT_H
diff --git a/CSFML/src/SFML/Audio/SoundStream.cpp b/CSFML/src/SFML/Audio/SoundStream.cpp
index e50cb047d..209e99437 100644
--- a/CSFML/src/SFML/Audio/SoundStream.cpp
+++ b/CSFML/src/SFML/Audio/SoundStream.cpp
@@ -26,66 +26,10 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
-class sfSoundStreamImpl : public sf::SoundStream
-{
-public :
-
- sfSoundStreamImpl(sfSoundStreamGetDataCallback OnGetData,
- sfSoundStreamSeekCallback OnSeek,
- unsigned int ChannelsCount,
- unsigned int SampleRate,
- void* UserData) :
- myGetDataCallback(OnGetData),
- mySeekCallback (OnSeek),
- myUserData (UserData)
- {
- Initialize(ChannelsCount, SampleRate);
- }
-
-private :
-
- virtual bool OnGetData(Chunk& Data)
- {
- sfSoundStreamChunk Chunk = {NULL, 0};
- bool Continue = (myGetDataCallback(&Chunk, myUserData) == sfTrue);
-
- Data.Samples = Chunk.Samples;
- Data.NbSamples = Chunk.NbSamples;
-
- return Continue;
- }
-
- virtual void OnSeek(float TimeOffset)
- {
- if (mySeekCallback)
- mySeekCallback(TimeOffset, myUserData);
- }
-
- sfSoundStreamGetDataCallback myGetDataCallback;
- sfSoundStreamSeekCallback mySeekCallback;
- void* myUserData;
-};
-
-
-struct sfSoundStream
-{
- sfSoundStream(sfSoundStreamGetDataCallback OnGetData,
- sfSoundStreamSeekCallback OnSeek,
- unsigned int ChannelsCount,
- unsigned int SampleRate,
- void* UserData) :
- This(OnGetData, OnSeek, ChannelsCount, SampleRate, UserData)
- {
- }
-
- sfSoundStreamImpl This;
-};
-
-
////////////////////////////////////////////////////////////
/// Construct a new sound stream
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Audio/SoundStreamStruct.h b/CSFML/src/SFML/Audio/SoundStreamStruct.h
new file mode 100644
index 000000000..bef7f83b4
--- /dev/null
+++ b/CSFML/src/SFML/Audio/SoundStreamStruct.h
@@ -0,0 +1,97 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDSTREAMSTRUCT_H
+#define SFML_SOUNDSTREAMSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Helper class implementing the callback forwarding from
+// C++ to C in sfSoundStream
+////////////////////////////////////////////////////////////
+class sfSoundStreamImpl : public sf::SoundStream
+{
+public :
+
+ sfSoundStreamImpl(sfSoundStreamGetDataCallback OnGetData,
+ sfSoundStreamSeekCallback OnSeek,
+ unsigned int ChannelsCount,
+ unsigned int SampleRate,
+ void* UserData) :
+ myGetDataCallback(OnGetData),
+ mySeekCallback (OnSeek),
+ myUserData (UserData)
+ {
+ Initialize(ChannelsCount, SampleRate);
+ }
+
+private :
+
+ virtual bool OnGetData(Chunk& Data)
+ {
+ sfSoundStreamChunk Chunk = {NULL, 0};
+ bool Continue = (myGetDataCallback(&Chunk, myUserData) == sfTrue);
+
+ Data.Samples = Chunk.Samples;
+ Data.NbSamples = Chunk.NbSamples;
+
+ return Continue;
+ }
+
+ virtual void OnSeek(float TimeOffset)
+ {
+ if (mySeekCallback)
+ mySeekCallback(TimeOffset, myUserData);
+ }
+
+ sfSoundStreamGetDataCallback myGetDataCallback;
+ sfSoundStreamSeekCallback mySeekCallback;
+ void* myUserData;
+};
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfSoundStream
+////////////////////////////////////////////////////////////
+struct sfSoundStream
+{
+ sfSoundStream(sfSoundStreamGetDataCallback OnGetData,
+ sfSoundStreamSeekCallback OnSeek,
+ unsigned int ChannelsCount,
+ unsigned int SampleRate,
+ void* UserData) :
+ This(OnGetData, OnSeek, ChannelsCount, SampleRate, UserData)
+ {
+ }
+
+ sfSoundStreamImpl This;
+};
+
+
+#endif // SFML_SOUNDSTREAMSTRUCT_H
diff --git a/CSFML/src/SFML/Audio/SoundStruct.h b/CSFML/src/SFML/Audio/SoundStruct.h
new file mode 100644
index 000000000..4d3176625
--- /dev/null
+++ b/CSFML/src/SFML/Audio/SoundStruct.h
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SOUNDSTRUCT_H
+#define SFML_SOUNDSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfSound
+////////////////////////////////////////////////////////////
+struct sfSound
+{
+ sf::Sound This;
+ sfSoundBuffer* Buffer;
+};
+
+
+#endif // SFML_SOUNDSTRUCT_H
diff --git a/CSFML/src/SFML/Graphics/Font.cpp b/CSFML/src/SFML/Graphics/Font.cpp
index 4bb8e5003..82dafb553 100644
--- a/CSFML/src/SFML/Graphics/Font.cpp
+++ b/CSFML/src/SFML/Graphics/Font.cpp
@@ -26,16 +26,10 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
-struct sfFont
-{
- sf::Font This;
-};
-
-
////////////////////////////////////////////////////////////
/// Create a new empty font
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Graphics/FontStruct.h b/CSFML/src/SFML/Graphics/FontStruct.h
new file mode 100644
index 000000000..08a31f17c
--- /dev/null
+++ b/CSFML/src/SFML/Graphics/FontStruct.h
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_FONTSTRUCT_H
+#define SFML_FONTSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfFont
+////////////////////////////////////////////////////////////
+struct sfFont
+{
+ sf::Font This;
+};
+
+
+#endif // SFML_FONTSTRUCT_H
diff --git a/CSFML/src/SFML/Graphics/Image.cpp b/CSFML/src/SFML/Graphics/Image.cpp
index a307bf896..9ef7a8f04 100644
--- a/CSFML/src/SFML/Graphics/Image.cpp
+++ b/CSFML/src/SFML/Graphics/Image.cpp
@@ -26,37 +26,11 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
-#include
-#include
+#include
+#include
#include
-// WARNING : this structure must always be the SAME as in Window/Input.h
-struct sfInput
-{
- const sf::Input* This;
-};
-// WARNING : this structure must always be the SAME as in Graphics/View.h
-struct sfView
-{
- sf::View* This;
-};
-// WARNING : this structure must always be the SAME as in Graphics/RenderWindow.h
-struct sfRenderWindow
-{
- sf::RenderWindow This;
- sfInput Input;
- sfView DefaultView;
- sfView* CurrentView;
-};
-
-struct sfImage
-{
- sf::Image This;
-};
-
-
////////////////////////////////////////////////////////////
/// Create a new empty image
////////////////////////////////////////////////////////////
@@ -73,7 +47,7 @@ sfImage* sfImage_CreateFromColor(unsigned int Width, unsigned int Height, sfColo
{
sfImage* Image = new sfImage;
- if (!Image->This.Create(Width, Height, sf::Color(Color.r, Color.g, Color.b, Color.a)))
+ if (!Image->This->Create(Width, Height, sf::Color(Color.r, Color.g, Color.b, Color.a)))
{
delete Image;
Image = NULL;
@@ -90,7 +64,7 @@ sfImage* sfImage_CreateFromPixels(unsigned int Width, unsigned int Height, const
{
sfImage* Image = new sfImage;
- if (!Image->This.LoadFromPixels(Width, Height, Data))
+ if (!Image->This->LoadFromPixels(Width, Height, Data))
{
delete Image;
Image = NULL;
@@ -107,7 +81,7 @@ sfImage* sfImage_CreateFromFile(const char* Filename)
{
sfImage* Image = new sfImage;
- if (!Image->This.LoadFromFile(Filename))
+ if (!Image->This->LoadFromFile(Filename))
{
delete Image;
Image = NULL;
@@ -124,7 +98,7 @@ sfImage* sfImage_CreateFromMemory(const char* Data, size_t SizeInBytes)
{
sfImage* Image = new sfImage;
- if (!Image->This.LoadFromMemory(Data, SizeInBytes))
+ if (!Image->This->LoadFromMemory(Data, SizeInBytes))
{
delete Image;
Image = NULL;
@@ -148,7 +122,7 @@ void sfImage_Destroy(sfImage* Image)
////////////////////////////////////////////////////////////
sfBool sfImage_SaveToFile(sfImage* Image, const char* Filename)
{
- CSFML_CALL_RETURN(Image, SaveToFile(Filename), sfFalse);
+ CSFML_CALL_PTR_RETURN(Image, SaveToFile(Filename), sfFalse);
}
@@ -158,7 +132,7 @@ sfBool sfImage_SaveToFile(sfImage* Image, const char* Filename)
void sfImage_CreateMaskFromColor(sfImage* Image, sfColor ColorKey, sfUint8 Alpha)
{
sf::Color SFMLColor(ColorKey.r, ColorKey.g, ColorKey.b, ColorKey.a);
- CSFML_CALL(Image, CreateMaskFromColor(SFMLColor, Alpha));
+ CSFML_CALL_PTR(Image, CreateMaskFromColor(SFMLColor, Alpha));
}
@@ -171,7 +145,7 @@ void sfImage_Copy(sfImage* Image, sfImage* Source, unsigned int DestX, unsigned
{
CSFML_CHECK(Source);
sf::IntRect SFMLRect(SourceRect.Left, SourceRect.Top, SourceRect.Right, SourceRect.Bottom);
- CSFML_CALL(Image, Copy(Source->This, DestX, DestY, SFMLRect));
+ CSFML_CALL_PTR(Image, Copy(*Source->This, DestX, DestY, SFMLRect));
}
@@ -183,7 +157,7 @@ CSFML_API sfBool sfImage_CopyScreen(sfImage* Image, sfRenderWindow* Window, sfIn
{
CSFML_CHECK_RETURN(Window, sfFalse);
sf::IntRect SFMLRect(SourceRect.Left, SourceRect.Top, SourceRect.Right, SourceRect.Bottom);
- CSFML_CALL_RETURN(Image, CopyScreen(Window->This, SFMLRect), sfFalse);
+ CSFML_CALL_PTR_RETURN(Image, CopyScreen(Window->This, SFMLRect), sfFalse);
}
@@ -194,7 +168,7 @@ CSFML_API sfBool sfImage_CopyScreen(sfImage* Image, sfRenderWindow* Window, sfIn
void sfImage_SetPixel(sfImage* Image, unsigned int X, unsigned int Y, sfColor Color)
{
sf::Color SFMLColor(Color.r, Color.g, Color.b, Color.a);
- CSFML_CALL(Image, SetPixel(X, Y, SFMLColor));
+ CSFML_CALL_PTR(Image, SetPixel(X, Y, SFMLColor));
}
@@ -206,7 +180,7 @@ sfColor sfImage_GetPixel(sfImage* Image, unsigned int X, unsigned int Y)
sfColor Color = {0, 0, 0, 0};
CSFML_CHECK_RETURN(Image, Color);
- sf::Color SFMLColor = Image->This.GetPixel(X, Y);
+ sf::Color SFMLColor = Image->This->GetPixel(X, Y);
return sfColor_FromRGBA(SFMLColor.r, SFMLColor.g, SFMLColor.b, SFMLColor.a);
}
@@ -219,7 +193,7 @@ sfColor sfImage_GetPixel(sfImage* Image, unsigned int X, unsigned int Y)
////////////////////////////////////////////////////////////
const sfUint8* sfImage_GetPixelsPtr(sfImage* Image)
{
- CSFML_CALL_RETURN(Image, GetPixelsPtr(), NULL);
+ CSFML_CALL_PTR_RETURN(Image, GetPixelsPtr(), NULL);
}
@@ -228,7 +202,7 @@ const sfUint8* sfImage_GetPixelsPtr(sfImage* Image)
////////////////////////////////////////////////////////////
void sfImage_Bind(sfImage* Image)
{
- CSFML_CALL(Image, Bind());
+ CSFML_CALL_PTR(Image, Bind());
}
@@ -237,7 +211,7 @@ void sfImage_Bind(sfImage* Image)
////////////////////////////////////////////////////////////
void sfImage_SetSmooth(sfImage* Image, sfBool Smooth)
{
- CSFML_CALL(Image, SetSmooth(Smooth == sfTrue));
+ CSFML_CALL_PTR(Image, SetSmooth(Smooth == sfTrue));
}
@@ -246,7 +220,7 @@ void sfImage_SetSmooth(sfImage* Image, sfBool Smooth)
////////////////////////////////////////////////////////////
unsigned int sfImage_GetWidth(sfImage* Image)
{
- CSFML_CALL_RETURN(Image, GetWidth(), 0);
+ CSFML_CALL_PTR_RETURN(Image, GetWidth(), 0);
}
@@ -255,7 +229,7 @@ unsigned int sfImage_GetWidth(sfImage* Image)
////////////////////////////////////////////////////////////
unsigned int sfImage_GetHeight(sfImage* Image)
{
- CSFML_CALL_RETURN(Image, GetHeight(), 0);
+ CSFML_CALL_PTR_RETURN(Image, GetHeight(), 0);
}
@@ -264,5 +238,5 @@ unsigned int sfImage_GetHeight(sfImage* Image)
////////////////////////////////////////////////////////////
sfBool sfImage_IsSmooth(sfImage* Image)
{
- CSFML_CALL_RETURN(Image, IsSmooth(), sfFalse);
+ CSFML_CALL_PTR_RETURN(Image, IsSmooth(), sfFalse);
}
diff --git a/CSFML/src/SFML/Graphics/ImageStruct.h b/CSFML/src/SFML/Graphics/ImageStruct.h
new file mode 100644
index 000000000..1edc65307
--- /dev/null
+++ b/CSFML/src/SFML/Graphics/ImageStruct.h
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_IMAGESTRUCT_H
+#define SFML_IMAGESTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfImage
+////////////////////////////////////////////////////////////
+struct sfImage
+{
+ sfImage()
+ {
+ This = new sf::Image;
+ OwnInstance = true;
+ }
+
+ sfImage(sf::Image* Image)
+ {
+ This = Image;
+ OwnInstance = false;
+ }
+
+ ~sfImage()
+ {
+ if (OwnInstance)
+ delete This;
+ }
+
+ sf::Image* This;
+ bool OwnInstance;
+};
+
+
+#endif // SFML_IMAGESTRUCT_H
diff --git a/CSFML/src/SFML/Graphics/PostFX.cpp b/CSFML/src/SFML/Graphics/PostFX.cpp
index 776946c13..0d850330a 100644
--- a/CSFML/src/SFML/Graphics/PostFX.cpp
+++ b/CSFML/src/SFML/Graphics/PostFX.cpp
@@ -26,21 +26,11 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
+#include
#include
-// WARNING : this structure must always be the SAME as in Graphics/Image.h
-struct sfImage
-{
- sf::Image This;
-};
-struct sfPostFX
-{
- sf::PostFX This;
-};
-
-
////////////////////////////////////////////////////////////
/// Create a new post-fx from a file
////////////////////////////////////////////////////////////
@@ -125,7 +115,7 @@ void sfPostFX_SetParameter4(sfPostFX* PostFX, const char* Name, float X, float Y
////////////////////////////////////////////////////////////
void sfPostFX_SetTexture(sfPostFX* PostFX, const char* Name, sfImage* Texture)
{
- CSFML_CALL(PostFX, SetTexture(Name, Texture ? &Texture->This : NULL))
+ CSFML_CALL(PostFX, SetTexture(Name, Texture ? Texture->This : NULL))
}
diff --git a/CSFML/src/SFML/Graphics/PostFXStruct.h b/CSFML/src/SFML/Graphics/PostFXStruct.h
new file mode 100644
index 000000000..584484b21
--- /dev/null
+++ b/CSFML/src/SFML/Graphics/PostFXStruct.h
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_POSTFXSTRUCT_H
+#define SFML_POSTFXSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfPostFX
+////////////////////////////////////////////////////////////
+struct sfPostFX
+{
+ sf::PostFX This;
+};
+
+
+#endif // SFML_POSTFXSTRUCT_H
diff --git a/CSFML/src/SFML/Graphics/RenderImage.cpp b/CSFML/src/SFML/Graphics/RenderImage.cpp
new file mode 100644
index 000000000..f70582c3b
--- /dev/null
+++ b/CSFML/src/SFML/Graphics/RenderImage.cpp
@@ -0,0 +1,190 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+////////////////////////////////////////////////////////////
+/// Construct a new renderimage
+////////////////////////////////////////////////////////////
+sfRenderImage* sfRenderImage_Create(unsigned int Width, unsigned int Height, sfBool DepthBuffer)
+{
+ sfRenderImage* RenderImage = new sfRenderImage;
+ RenderImage->This.Create(Width, Height, DepthBuffer == sfTrue);
+ RenderImage->Target = new sfImage(const_cast(&RenderImage->This.GetImage()));
+ RenderImage->DefaultView = new sfView(const_cast(&RenderImage->This.GetDefaultView()));
+ RenderImage->CurrentView = RenderImage->DefaultView;
+
+ return RenderImage;
+}
+
+
+////////////////////////////////////////////////////////////
+/// Destroy an existing renderimage
+////////////////////////////////////////////////////////////
+void sfRenderImage_Destroy(sfRenderImage* RenderImage)
+{
+ delete RenderImage->DefaultView;
+ delete RenderImage->Target;
+ delete RenderImage;
+}
+
+
+////////////////////////////////////////////////////////////
+/// Get the width of the rendering region of a renderimage
+////////////////////////////////////////////////////////////
+unsigned int sfRenderImage_GetWidth(sfRenderImage* RenderImage)
+{
+ CSFML_CALL_RETURN(RenderImage, GetWidth(), 0);
+}
+
+
+////////////////////////////////////////////////////////////
+/// Get the height of the rendering region of a renderimage
+////////////////////////////////////////////////////////////
+unsigned int sfRenderImage_GetHeight(sfRenderImage* RenderImage)
+{
+ CSFML_CALL_RETURN(RenderImage, GetHeight(), 0);
+}
+
+
+////////////////////////////////////////////////////////////
+/// Set a renderimage as the current target for rendering
+////////////////////////////////////////////////////////////
+sfBool sfRenderImage_SetActive(sfRenderImage* RenderImage, sfBool Active)
+{
+ CSFML_CALL_RETURN(RenderImage, SetActive(Active == sfTrue), sfFalse)
+}
+
+
+////////////////////////////////////////////////////////////
+/// Draw something on a renderimage
+////////////////////////////////////////////////////////////
+void sfRenderImage_DrawPostFX(sfRenderImage* RenderImage, sfPostFX* PostFX)
+{
+ CSFML_CHECK(PostFX);
+ CSFML_CALL(RenderImage, Draw(PostFX->This));
+}
+void sfRenderImage_DrawShape(sfRenderImage* RenderImage, sfShape* Shape)
+{
+ CSFML_CHECK(Shape);
+ CSFML_CALL(RenderImage, Draw(Shape->This));
+}
+void sfRenderImage_DrawSprite(sfRenderImage* RenderImage, sfSprite* Sprite)
+{
+ CSFML_CHECK(Sprite);
+ CSFML_CALL(RenderImage, Draw(Sprite->This));
+}
+void sfRenderImage_DrawString(sfRenderImage* RenderImage, sfString* String)
+{
+ CSFML_CHECK(String);
+ CSFML_CALL(RenderImage, Draw(String->This));
+}
+
+
+////////////////////////////////////////////////////////////
+/// Clear the renderimage with the given color
+////////////////////////////////////////////////////////////
+void sfRenderImage_Clear(sfRenderImage* RenderImage, sfColor Color)
+{
+ sf::Color SFMLColor(Color.r, Color.g, Color.b, Color.a);
+
+ CSFML_CALL(RenderImage, Clear(SFMLColor));
+}
+
+
+////////////////////////////////////////////////////////////
+/// Change the current active view of a renderimage
+////////////////////////////////////////////////////////////
+void sfRenderImage_SetView(sfRenderImage* RenderImage, sfView* View)
+{
+ CSFML_CHECK(View);
+ CSFML_CALL(RenderImage, SetView(*View->This));
+ RenderImage->CurrentView = View;
+}
+
+
+////////////////////////////////////////////////////////////
+/// Get the current active view of a renderimage
+////////////////////////////////////////////////////////////
+const sfView* sfRenderImage_GetView(sfRenderImage* RenderImage)
+{
+ CSFML_CHECK_RETURN(RenderImage, NULL);
+
+ return RenderImage->CurrentView;
+}
+
+
+////////////////////////////////////////////////////////////
+/// Get the default view of a renderimage
+////////////////////////////////////////////////////////////
+sfView* sfRenderImage_GetDefaultView(sfRenderImage* RenderImage)
+{
+ CSFML_CHECK_RETURN(RenderImage, NULL);
+
+ return RenderImage->DefaultView;
+}
+
+
+////////////////////////////////////////////////////////////
+/// Tell SFML to preserve external OpenGL states, at the expense of
+/// more CPU charge. Use this function if you don't want SFML
+/// to mess up your own OpenGL states (if any).
+/// Don't enable state preservation if not needed, as it will allow
+/// SFML to do internal optimizations and improve performances.
+/// This parameter is false by default
+////////////////////////////////////////////////////////////
+void sfRenderImage_PreserveOpenGLStates(sfRenderImage* RenderImage, sfBool Preserve)
+{
+ CSFML_CALL(RenderImage, PreserveOpenGLStates(Preserve == sfTrue));
+}
+
+
+////////////////////////////////////////////////////////////
+/// Get the target image
+////////////////////////////////////////////////////////////
+sfImage* sfRenderImage_GetImage(sfRenderImage* RenderImage)
+{
+ CSFML_CHECK_RETURN(RenderImage, NULL);
+
+ return RenderImage->Target;
+}
+
+
+////////////////////////////////////////////////////////////
+/// Check whether the system supports render images or not
+////////////////////////////////////////////////////////////
+sfBool sfRenderImage_CanUseRenderImage()
+{
+ return sf::RenderImage::CanUseRenderImage();
+}
diff --git a/CSFML/src/SFML/Graphics/RenderImageStruct.h b/CSFML/src/SFML/Graphics/RenderImageStruct.h
new file mode 100644
index 000000000..0c9f5c8f3
--- /dev/null
+++ b/CSFML/src/SFML/Graphics/RenderImageStruct.h
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_RENDERIMAGESTRUCT_H
+#define SFML_RENDERIMAGESTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfRenderWindow
+////////////////////////////////////////////////////////////
+struct sfRenderImage
+{
+ sf::RenderImage This;
+ sfImage* Target;
+ sfView* DefaultView;
+ sfView* CurrentView;
+};
+
+
+#endif // SFML_RENDERIMAGESTRUCT_H
diff --git a/CSFML/src/SFML/Graphics/RenderWindow.cpp b/CSFML/src/SFML/Graphics/RenderWindow.cpp
index c35fed48f..ebe0c1a03 100644
--- a/CSFML/src/SFML/Graphics/RenderWindow.cpp
+++ b/CSFML/src/SFML/Graphics/RenderWindow.cpp
@@ -26,63 +26,15 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
+#include
+#include
+#include
+#include
+#include
+#include
#include
-// WARNING : this structure must always be the SAME as in Graphics/PostFX.h
-struct sfPostFX
-{
- sf::PostFX This;
-};
-// WARNING : this structure must always be the SAME as in Graphics/Shape.h
-struct sfShape
-{
- sf::Shape This;
-};
-// WARNING : this structure must always be the SAME as in Graphics/Sprite.h
-struct sfSprite
-{
- sf::Sprite This;
- sfImage* Image;
- sfIntRect SubRect;
-};
-// WARNING : this structure must always be the SAME as in Graphics/String.h
-struct sfString
-{
- sf::String This;
- std::string Text;
-};
-// WARNING : this structure must always be the SAME as in Graphics/Image.h
-struct sfImage
-{
- sf::Image This;
-};
-// WARNING : this structure must always be the SAME as in Window/Input.h
-struct sfInput
-{
- const sf::Input* This;
-};
-// WARNING : this structure must always be the SAME as in Graphics/View.h
-struct sfView
-{
- sf::View* This;
-};
-struct sfRenderWindow
-{
- sf::RenderWindow This;
- sfInput Input;
- sfView DefaultView;
- sfView* CurrentView;
-};
-
-
////////////////////////////////////////////////////////////
/// Construct a new renderwindow
////////////////////////////////////////////////////////////
@@ -95,9 +47,9 @@ sfRenderWindow* sfRenderWindow_Create(sfVideoMode Mode, const char* Title, unsig
sfRenderWindow* RenderWindow = new sfRenderWindow;
sf::ContextSettings Settings(Params.DepthBits, Params.StencilBits, Params.AntialiasingLevel);
RenderWindow->This.Create(VideoMode, Title, Style, Settings);
- RenderWindow->Input.This = &RenderWindow->This.GetInput();
- RenderWindow->DefaultView.This = &RenderWindow->This.GetDefaultView();
- RenderWindow->CurrentView = &RenderWindow->DefaultView;
+ RenderWindow->Input.This = &RenderWindow->This.GetInput();
+ RenderWindow->DefaultView = new sfView(const_cast(&RenderWindow->This.GetDefaultView()));
+ RenderWindow->CurrentView = RenderWindow->DefaultView;
return RenderWindow;
}
@@ -111,9 +63,9 @@ sfRenderWindow* sfRenderWindow_CreateFromHandle(sfWindowHandle Handle, sfContext
sfRenderWindow* RenderWindow = new sfRenderWindow;
sf::ContextSettings Settings(Params.DepthBits, Params.StencilBits, Params.AntialiasingLevel);
RenderWindow->This.Create(Handle, Settings);
- RenderWindow->Input.This = &RenderWindow->This.GetInput();
- RenderWindow->DefaultView.This = &RenderWindow->This.GetDefaultView();
- RenderWindow->CurrentView = &RenderWindow->DefaultView;
+ RenderWindow->Input.This = &RenderWindow->This.GetInput();
+ RenderWindow->DefaultView = new sfView(const_cast(&RenderWindow->This.GetDefaultView()));
+ RenderWindow->CurrentView = RenderWindow->DefaultView;
return RenderWindow;
}
@@ -124,6 +76,7 @@ sfRenderWindow* sfRenderWindow_CreateFromHandle(sfWindowHandle Handle, sfContext
////////////////////////////////////////////////////////////
void sfRenderWindow_Destroy(sfRenderWindow* RenderWindow)
{
+ delete RenderWindow->DefaultView;
delete RenderWindow;
}
@@ -420,7 +373,7 @@ sfImage* sfRenderWindow_Capture(sfRenderWindow* RenderWindow)
CSFML_CHECK_RETURN(RenderWindow, NULL);
sfImage* Image = new sfImage;
- Image->This = RenderWindow->This.Capture();
+ *Image->This = RenderWindow->This.Capture();
return Image;
}
@@ -465,7 +418,7 @@ sfView* sfRenderWindow_GetDefaultView(sfRenderWindow* RenderWindow)
{
CSFML_CHECK_RETURN(RenderWindow, NULL);
- return &RenderWindow->DefaultView;
+ return RenderWindow->DefaultView;
}
diff --git a/CSFML/src/SFML/Graphics/RenderWindowStruct.h b/CSFML/src/SFML/Graphics/RenderWindowStruct.h
new file mode 100644
index 000000000..8c26fa548
--- /dev/null
+++ b/CSFML/src/SFML/Graphics/RenderWindowStruct.h
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_RENDERWINDOWSTRUCT_H
+#define SFML_RENDERWINDOWSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfRenderWindow
+////////////////////////////////////////////////////////////
+struct sfRenderWindow
+{
+ sf::RenderWindow This;
+ sfInput Input;
+ sfView* DefaultView;
+ sfView* CurrentView;
+};
+
+
+#endif // SFML_RENDERWINDOWSTRUCT_H
diff --git a/CSFML/src/SFML/Graphics/Shape.cpp b/CSFML/src/SFML/Graphics/Shape.cpp
index 93c988d93..729490168 100644
--- a/CSFML/src/SFML/Graphics/Shape.cpp
+++ b/CSFML/src/SFML/Graphics/Shape.cpp
@@ -26,18 +26,11 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
-#include
#include
-struct sfShape
-{
- sf::Shape This;
-};
-
-
////////////////////////////////////////////////////////////
/// Create a new shape
////////////////////////////////////////////////////////////
@@ -46,6 +39,7 @@ sfShape* sfShape_Create()
return new sfShape;
}
+
////////////////////////////////////////////////////////////
/// Create a new shape made of a single line
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Graphics/ShapeStruct.h b/CSFML/src/SFML/Graphics/ShapeStruct.h
new file mode 100644
index 000000000..90825caa5
--- /dev/null
+++ b/CSFML/src/SFML/Graphics/ShapeStruct.h
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SHAPESTRUCT_H
+#define SFML_SHAPESTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfShape
+////////////////////////////////////////////////////////////
+struct sfShape
+{
+ sf::Shape This;
+};
+
+
+#endif // SFML_SHAPESTRUCT_H
diff --git a/CSFML/src/SFML/Graphics/Sprite.cpp b/CSFML/src/SFML/Graphics/Sprite.cpp
index 42c0550d9..5afbbd7da 100644
--- a/CSFML/src/SFML/Graphics/Sprite.cpp
+++ b/CSFML/src/SFML/Graphics/Sprite.cpp
@@ -26,25 +26,12 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
#include
#include
-// WARNING : this structure must always be the SAME as in Graphics/Image.h
-struct sfImage
-{
- sf::Image This;
-};
-struct sfSprite
-{
- sf::Sprite This;
- sfImage* Image;
- sfIntRect SubRect;
-};
-
-
////////////////////////////////////////////////////////////
/// Create a new sprite
////////////////////////////////////////////////////////////
@@ -310,7 +297,7 @@ void sfSprite_SetImage(sfSprite* Sprite, sfImage* Image)
{
if (Image)
{
- CSFML_CALL(Sprite, SetImage(Image->This))
+ CSFML_CALL(Sprite, SetImage(*Image->This))
Sprite->Image = Image;
}
}
diff --git a/CSFML/src/SFML/Graphics/SpriteStruct.h b/CSFML/src/SFML/Graphics/SpriteStruct.h
new file mode 100644
index 000000000..191bade17
--- /dev/null
+++ b/CSFML/src/SFML/Graphics/SpriteStruct.h
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_SPRITESTRUCT_H
+#define SFML_SPRITESTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfMusic
+////////////////////////////////////////////////////////////
+struct sfSprite
+{
+ sf::Sprite This;
+ sfImage* Image;
+ sfIntRect SubRect;
+};
+
+
+#endif // SFML_SPRITESTRUCT_H
diff --git a/CSFML/src/SFML/Graphics/String.cpp b/CSFML/src/SFML/Graphics/String.cpp
index 89ac70f5d..39d4f2032 100644
--- a/CSFML/src/SFML/Graphics/String.cpp
+++ b/CSFML/src/SFML/Graphics/String.cpp
@@ -26,28 +26,12 @@
// Headers
////////////////////////////////////////////////////////////
#include
+#include
#include
-#include
#include
-#include
#include
-// WARNING : this structure must always be the SAME as in Graphics/Font.h
-struct sfFont
-{
- sf::Font This;
-};
-
-struct sfString
-{
- sf::String This;
- std::string Text;
- sfFont* Font;
- sfFloatRect Rect;
-};
-
-
////////////////////////////////////////////////////////////
/// Create a new string
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Graphics/StringStruct.h b/CSFML/src/SFML/Graphics/StringStruct.h
new file mode 100644
index 000000000..c27b230d9
--- /dev/null
+++ b/CSFML/src/SFML/Graphics/StringStruct.h
@@ -0,0 +1,49 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_STRINGSTRUCT_H
+#define SFML_STRINGSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+#include
+#include
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfMusic
+////////////////////////////////////////////////////////////
+struct sfString
+{
+ sf::String This;
+ std::string Text;
+ sfFont* Font;
+ sfFloatRect Rect;
+};
+
+
+#endif // SFML_STRINGSTRUCT_H
diff --git a/CSFML/src/SFML/Graphics/View.cpp b/CSFML/src/SFML/Graphics/View.cpp
index e217cf860..d5070a79b 100644
--- a/CSFML/src/SFML/Graphics/View.cpp
+++ b/CSFML/src/SFML/Graphics/View.cpp
@@ -26,21 +26,10 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
-#include
+#include
#include
-struct sfView
-{
- sfView() : This(new sf::View) {}
- sfView(sfFloatRect Rect) : This(new sf::View(sf::FloatRect(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom))) {}
- ~sfView() {delete This;}
-
- sf::View* This; // pointer needed for RenderView
-};
-
-
////////////////////////////////////////////////////////////
/// Construct a default view (1000x1000)
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Graphics/ViewStruct.h b/CSFML/src/SFML/Graphics/ViewStruct.h
new file mode 100644
index 000000000..4d6262e6f
--- /dev/null
+++ b/CSFML/src/SFML/Graphics/ViewStruct.h
@@ -0,0 +1,68 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_VIEWSTRUCT_H
+#define SFML_VIEWSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfMusic
+////////////////////////////////////////////////////////////
+struct sfView
+{
+ sfView() :
+ This(new sf::View),
+ OwnInstance(true)
+ {
+ }
+
+ sfView(sfFloatRect Rect) :
+ This(new sf::View(sf::FloatRect(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom))),
+ OwnInstance(true)
+ {
+ }
+
+ sfView(sf::View* View) :
+ This(View),
+ OwnInstance(false)
+ {
+ }
+
+ ~sfView()
+ {
+ if (OwnInstance)
+ delete This;
+ }
+
+ sf::View* This; // pointer needed for RenderWindow
+ bool OwnInstance;
+};
+
+
+#endif // SFML_VIEWSTRUCT_H
diff --git a/CSFML/src/SFML/Makefile b/CSFML/src/SFML/Makefile
index fa14c1daa..400267228 100644
--- a/CSFML/src/SFML/Makefile
+++ b/CSFML/src/SFML/Makefile
@@ -3,7 +3,8 @@ export CPP = g++
export CFLAGS = -W -Wall -pedantic -fPIC -Wno-unused -I../.. -I../../../include -DNDEBUG -DCSFML_EXPORTS -O2
export LDFLAGS = -shared
export LIBPATH = ../../../lib
-export VERSION = 2.0export CP = cp
+export VERSION = 2.0
+export CP = cp
export LN = ln
export LNFLAGS = -s -f
export DESTDIR = /usr
diff --git a/CSFML/src/SFML/Network/Ftp.cpp b/CSFML/src/SFML/Network/Ftp.cpp
index e4f3f5213..0ba3a5b12 100644
--- a/CSFML/src/SFML/Network/Ftp.cpp
+++ b/CSFML/src/SFML/Network/Ftp.cpp
@@ -26,19 +26,11 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
#include
-struct sfFtpListingResponse
-{
- sfFtpListingResponse(const sf::Ftp::ListingResponse& Response) : This(Response) {}
-
- sf::Ftp::ListingResponse This;
-};
-
-
////////////////////////////////////////////////////////////
/// Destroy an existing Ftp directory response
////////////////////////////////////////////////////////////
@@ -95,14 +87,6 @@ const char* sfFtpListingResponse_GetFilename(sfFtpListingResponse* FtpListingRes
}
-struct sfFtpDirectoryResponse
-{
- sfFtpDirectoryResponse(const sf::Ftp::DirectoryResponse& Response) : This(Response) {}
-
- sf::Ftp::DirectoryResponse This;
-};
-
-
////////////////////////////////////////////////////////////
/// Destroy an existing Ftp directory response
////////////////////////////////////////////////////////////
@@ -151,14 +135,6 @@ const char* sfFtpDirectoryResponse_GetDirectory(sfFtpDirectoryResponse* FtpDirec
}
-struct sfFtpResponse
-{
- sfFtpResponse(const sf::Ftp::Response& Response) : This(Response) {}
-
- sf::Ftp::Response This;
-};
-
-
////////////////////////////////////////////////////////////
/// Destroy an existing Ftp response
////////////////////////////////////////////////////////////
@@ -200,12 +176,6 @@ const char* sfFtpResponse_GetMessage(sfFtpResponse* FtpResponse)
}
-struct sfFtp
-{
- sf::Ftp This;
-};
-
-
////////////////////////////////////////////////////////////
/// Construct a new Ftp
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Network/FtpStruct.h b/CSFML/src/SFML/Network/FtpStruct.h
new file mode 100644
index 000000000..567608ff2
--- /dev/null
+++ b/CSFML/src/SFML/Network/FtpStruct.h
@@ -0,0 +1,85 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_FTPSTRUCT_H
+#define SFML_FTPSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfFtp
+////////////////////////////////////////////////////////////
+struct sfFtp
+{
+ sf::Ftp This;
+};
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfFtpResponse
+////////////////////////////////////////////////////////////
+struct sfFtpResponse
+{
+ sfFtpResponse(const sf::Ftp::Response& Response)
+ : This(Response)
+ {
+ }
+
+ sf::Ftp::Response This;
+};
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfFtpDirectoryResponse
+////////////////////////////////////////////////////////////
+struct sfFtpDirectoryResponse
+{
+ sfFtpDirectoryResponse(const sf::Ftp::DirectoryResponse& Response)
+ : This(Response)
+ {
+ }
+
+ sf::Ftp::DirectoryResponse This;
+};
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfFtpListingResponse
+////////////////////////////////////////////////////////////
+struct sfFtpListingResponse
+{
+ sfFtpListingResponse(const sf::Ftp::ListingResponse& Response)
+ : This(Response)
+ {
+ }
+
+ sf::Ftp::ListingResponse This;
+};
+
+
+#endif // SFML_FTPSTRUCT_H
diff --git a/CSFML/src/SFML/Network/Http.cpp b/CSFML/src/SFML/Network/Http.cpp
index e81e3d561..f5bfa1159 100644
--- a/CSFML/src/SFML/Network/Http.cpp
+++ b/CSFML/src/SFML/Network/Http.cpp
@@ -26,16 +26,10 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
-struct sfHttpRequest
-{
- sf::Http::Request This;
-};
-
-
////////////////////////////////////////////////////////////
/// Construct a new Http request
////////////////////////////////////////////////////////////
@@ -106,12 +100,6 @@ void sfHttpRequest_SetBody(sfHttpRequest* HttpRequest, const char* Body)
}
-struct sfHttpResponse
-{
- sf::Http::Response This;
-};
-
-
////////////////////////////////////////////////////////////
/// Destroy an existing Http response
////////////////////////////////////////////////////////////
@@ -178,12 +166,6 @@ const char* sfHttpResponse_GetBody(sfHttpResponse* HttpResponse)
}
-struct sfHttp
-{
- sf::Http This;
-};
-
-
////////////////////////////////////////////////////////////
/// Construct a new Http object
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Network/HttpStruct.h b/CSFML/src/SFML/Network/HttpStruct.h
new file mode 100644
index 000000000..f18944538
--- /dev/null
+++ b/CSFML/src/SFML/Network/HttpStruct.h
@@ -0,0 +1,61 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_HTTPSTRUCT_H
+#define SFML_HTTPSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfHttp
+////////////////////////////////////////////////////////////
+struct sfHttp
+{
+ sf::Http This;
+};
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfHttpRequest
+////////////////////////////////////////////////////////////
+struct sfHttpRequest
+{
+ sf::Http::Request This;
+};
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfHttpResponse
+////////////////////////////////////////////////////////////
+struct sfHttpResponse
+{
+ sf::Http::Response This;
+};
+
+
+#endif // SFML_HTTPSTRUCT_H
diff --git a/CSFML/src/SFML/Network/Packet.cpp b/CSFML/src/SFML/Network/Packet.cpp
index bdc808aa6..81e04cfaf 100644
--- a/CSFML/src/SFML/Network/Packet.cpp
+++ b/CSFML/src/SFML/Network/Packet.cpp
@@ -26,16 +26,10 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
-struct sfPacket
-{
- sf::Packet This;
-};
-
-
namespace
{
////////////////////////////////////////////////////////////
diff --git a/CSFML/src/SFML/Network/PacketStruct.h b/CSFML/src/SFML/Network/PacketStruct.h
new file mode 100644
index 000000000..b452fc06e
--- /dev/null
+++ b/CSFML/src/SFML/Network/PacketStruct.h
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////
+//
+// SFML - Simple and Fast Multimedia Library
+// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
+//
+// This software is provided 'as-is', without any express or implied warranty.
+// In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it freely,
+// subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented;
+// you must not claim that you wrote the original software.
+// If you use this software in a product, an acknowledgment
+// in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such,
+// and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+//
+////////////////////////////////////////////////////////////
+
+#ifndef SFML_PACKETSTRUCT_H
+#define SFML_PACKETSTRUCT_H
+
+////////////////////////////////////////////////////////////
+// Headers
+////////////////////////////////////////////////////////////
+#include
+
+
+////////////////////////////////////////////////////////////
+// Internal structure of sfPacket
+////////////////////////////////////////////////////////////
+struct sfPacket
+{
+ sf::Packet This;
+};
+
+
+#endif // SFML_PACKETSTRUCT_H
diff --git a/CSFML/src/SFML/Network/Selector.cpp b/CSFML/src/SFML/Network/Selector.cpp
index 3ad22321a..618952532 100644
--- a/CSFML/src/SFML/Network/Selector.cpp
+++ b/CSFML/src/SFML/Network/Selector.cpp
@@ -26,32 +26,8 @@
// Headers
////////////////////////////////////////////////////////////
#include
-#include
+#include
#include
-#include