diff --git a/include/SFML/Audio/SoundStream.hpp b/include/SFML/Audio/SoundStream.hpp index 68ff9129..65200cb8 100644 --- a/include/SFML/Audio/SoundStream.hpp +++ b/include/SFML/Audio/SoundStream.hpp @@ -284,7 +284,7 @@ private : unsigned int myBuffers[BuffersCount]; ///< Sound buffers used to store temporary audio data unsigned int myChannelsCount; ///< Number of channels (1 = mono, 2 = stereo, ...) unsigned int mySampleRate; ///< Frequency (samples / second) - unsigned long myFormat; ///< Format of the internal sound buffers + Uint32 myFormat; ///< Format of the internal sound buffers bool myLoop; ///< Loop flag (true to loop, false to play once) Uint64 mySamplesProcessed; ///< Number of buffers processed since beginning of the stream bool myEndBuffers[BuffersCount]; ///< Each buffer is marked as "end buffer" or not, for proper duration calculation diff --git a/include/SFML/Graphics/RenderWindow.hpp b/include/SFML/Graphics/RenderWindow.hpp index b6263d7f..46ae29ef 100644 --- a/include/SFML/Graphics/RenderWindow.hpp +++ b/include/SFML/Graphics/RenderWindow.hpp @@ -72,7 +72,7 @@ public : /// \param settings Additional settings for the underlying OpenGL context /// //////////////////////////////////////////////////////////// - RenderWindow(VideoMode mode, const std::string& title, unsigned long style = Style::Default, const ContextSettings& settings = ContextSettings()); + RenderWindow(VideoMode mode, const std::string& title, Uint32 style = Style::Default, const ContextSettings& settings = ContextSettings()); //////////////////////////////////////////////////////////// /// \brief Construct the window from an existing control diff --git a/include/SFML/Graphics/Text.hpp b/include/SFML/Graphics/Text.hpp index b3d97c7e..84eccb23 100644 --- a/include/SFML/Graphics/Text.hpp +++ b/include/SFML/Graphics/Text.hpp @@ -133,7 +133,7 @@ public : /// \see GetStyle /// //////////////////////////////////////////////////////////// - void SetStyle(unsigned long style); + void SetStyle(Uint32 style); //////////////////////////////////////////////////////////// /// \brief Get the text's string @@ -185,7 +185,7 @@ public : /// \see SetStyle /// //////////////////////////////////////////////////////////// - unsigned long GetStyle() const; + Uint32 GetStyle() const; //////////////////////////////////////////////////////////// /// \brief Return the position of the \a index-th character @@ -240,7 +240,7 @@ private : String myString; ///< String to display const Font* myFont; ///< Font used to display the string unsigned int myCharacterSize; ///< Base size of characters, in pixels - unsigned long myStyle; ///< Text style (see Style enum) + Uint32 myStyle; ///< Text style (see Style enum) mutable FloatRect myBaseRect; ///< Bounding rectangle of the text in object coordinates mutable bool myRectUpdated; ///< Is the bounding rectangle up-to-date ? }; diff --git a/include/SFML/Window/Window.hpp b/include/SFML/Window/Window.hpp index 14f040ae..0a0d257a 100644 --- a/include/SFML/Window/Window.hpp +++ b/include/SFML/Window/Window.hpp @@ -85,7 +85,7 @@ public : /// \param settings Additional settings for the underlying OpenGL context /// //////////////////////////////////////////////////////////// - Window(VideoMode mode, const std::string& title, unsigned long style = Style::Default, const ContextSettings& settings = ContextSettings()); + Window(VideoMode mode, const std::string& title, Uint32 style = Style::Default, const ContextSettings& settings = ContextSettings()); //////////////////////////////////////////////////////////// /// \brief Construct the window from an existing control @@ -124,7 +124,7 @@ public : /// \param settings Additional settings for the underlying OpenGL context /// //////////////////////////////////////////////////////////// - void Create(VideoMode mode, const std::string& title, unsigned long style = Style::Default, const ContextSettings& settings = ContextSettings()); + void Create(VideoMode mode, const std::string& title, Uint32 style = Style::Default, const ContextSettings& settings = ContextSettings()); //////////////////////////////////////////////////////////// /// \brief Create (or recreate) the window from an existing control diff --git a/src/SFML/Graphics/RenderWindow.cpp b/src/SFML/Graphics/RenderWindow.cpp index 4fec0f26..087eaea4 100644 --- a/src/SFML/Graphics/RenderWindow.cpp +++ b/src/SFML/Graphics/RenderWindow.cpp @@ -39,7 +39,7 @@ RenderWindow::RenderWindow() //////////////////////////////////////////////////////////// -RenderWindow::RenderWindow(VideoMode mode, const std::string& title, unsigned long style, const ContextSettings& settings) +RenderWindow::RenderWindow(VideoMode mode, const std::string& title, Uint32 style, const ContextSettings& settings) { // Don't call the base class constructor because it contains virtual function calls Create(mode, title, style, settings); diff --git a/src/SFML/Graphics/Text.cpp b/src/SFML/Graphics/Text.cpp index bed9c5e2..bb92ec7d 100644 --- a/src/SFML/Graphics/Text.cpp +++ b/src/SFML/Graphics/Text.cpp @@ -85,7 +85,7 @@ void Text::SetCharacterSize(unsigned int size) //////////////////////////////////////////////////////////// -void Text::SetStyle(unsigned long style) +void Text::SetStyle(Uint32 style) { if (myStyle != style) { @@ -117,7 +117,7 @@ unsigned int Text::GetCharacterSize() const //////////////////////////////////////////////////////////// -unsigned long Text::GetStyle() const +Uint32 Text::GetStyle() const { return myStyle; } diff --git a/src/SFML/Network/TcpSocket.cpp b/src/SFML/Network/TcpSocket.cpp index c7a1f055..238fdabc 100644 --- a/src/SFML/Network/TcpSocket.cpp +++ b/src/SFML/Network/TcpSocket.cpp @@ -277,7 +277,7 @@ Socket::Status TcpSocket::Send(Packet& packet) const char* data = packet.OnSend(size); // First send the packet size - Uint32 packetSize = htonl(static_cast(size)); + Uint32 packetSize = htonl(static_cast(size)); Status status = Send(reinterpret_cast(&packetSize), sizeof(packetSize)); // Make sure that the size was properly sent diff --git a/src/SFML/Network/Unix/SocketImpl.cpp b/src/SFML/Network/Unix/SocketImpl.cpp index 1cf50324..9a4cb762 100644 --- a/src/SFML/Network/Unix/SocketImpl.cpp +++ b/src/SFML/Network/Unix/SocketImpl.cpp @@ -36,7 +36,7 @@ namespace sf namespace priv { //////////////////////////////////////////////////////////// -sockaddr_in SocketImpl::CreateAddress(unsigned long address, unsigned short port) +sockaddr_in SocketImpl::CreateAddress(Uint32 address, unsigned short port) { sockaddr_in addr; std::memset(addr.sin_zero, 0, sizeof(addr.sin_zero)); diff --git a/src/SFML/Network/Win32/SocketImpl.cpp b/src/SFML/Network/Win32/SocketImpl.cpp index 95812f4e..fcafa7f0 100644 --- a/src/SFML/Network/Win32/SocketImpl.cpp +++ b/src/SFML/Network/Win32/SocketImpl.cpp @@ -34,7 +34,7 @@ namespace sf namespace priv { //////////////////////////////////////////////////////////// -sockaddr_in SocketImpl::CreateAddress(unsigned long address, unsigned short port) +sockaddr_in SocketImpl::CreateAddress(Uint32 address, unsigned short port) { sockaddr_in addr; std::memset(addr.sin_zero, 0, sizeof(addr.sin_zero)); @@ -63,7 +63,7 @@ void SocketImpl::Close(SocketHandle sock) //////////////////////////////////////////////////////////// void SocketImpl::SetBlocking(SocketHandle sock, bool block) { - unsigned long blocking = block ? 0 : 1; + u_long blocking = block ? 0 : 1; ioctlsocket(sock, FIONBIO, &blocking); } diff --git a/src/SFML/Network/Win32/SocketImpl.hpp b/src/SFML/Network/Win32/SocketImpl.hpp index f6e5b001..475ea4ae 100644 --- a/src/SFML/Network/Win32/SocketImpl.hpp +++ b/src/SFML/Network/Win32/SocketImpl.hpp @@ -59,7 +59,7 @@ public : /// \return sockaddr_in ready to be used by socket functions /// //////////////////////////////////////////////////////////// - static sockaddr_in CreateAddress(unsigned long address, unsigned short port); + static sockaddr_in CreateAddress(Uint32 address, unsigned short port); //////////////////////////////////////////////////////////// /// \brief Return the value of the invalid socket diff --git a/src/SFML/Window/GlResource.cpp b/src/SFML/Window/GlResource.cpp index c3f26384..0dd56c5e 100644 --- a/src/SFML/Window/GlResource.cpp +++ b/src/SFML/Window/GlResource.cpp @@ -37,7 +37,7 @@ namespace { // OpenGL resources counter and its mutex - unsigned long count = 0; + unsigned int count = 0; sf::Mutex mutex; } diff --git a/src/SFML/Window/Win32/WindowImplWin32.cpp b/src/SFML/Window/Win32/WindowImplWin32.cpp index dd11178c..4f732069 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.cpp +++ b/src/SFML/Window/Win32/WindowImplWin32.cpp @@ -87,7 +87,7 @@ myIsCursorIn (false) //////////////////////////////////////////////////////////// -WindowImplWin32::WindowImplWin32(VideoMode mode, const std::string& title, unsigned long style) : +WindowImplWin32::WindowImplWin32(VideoMode mode, const std::string& title, Uint32 style) : myHandle (NULL), myCallback (0), myCursor (NULL), diff --git a/src/SFML/Window/Win32/WindowImplWin32.hpp b/src/SFML/Window/Win32/WindowImplWin32.hpp index 047e279f..9a7d97af 100644 --- a/src/SFML/Window/Win32/WindowImplWin32.hpp +++ b/src/SFML/Window/Win32/WindowImplWin32.hpp @@ -62,7 +62,7 @@ public : /// \param style Window style /// //////////////////////////////////////////////////////////// - WindowImplWin32(VideoMode mode, const std::string& title, unsigned long style); + WindowImplWin32(VideoMode mode, const std::string& title, Uint32 style); //////////////////////////////////////////////////////////// /// \brief Destructor diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index ac047f9c..7101649b 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -55,7 +55,7 @@ myFramerateLimit(0) //////////////////////////////////////////////////////////// -Window::Window(VideoMode mode, const std::string& title, unsigned long style, const ContextSettings& settings) : +Window::Window(VideoMode mode, const std::string& title, Uint32 style, const ContextSettings& settings) : myWindow (NULL), myContext (NULL), myLastFrameTime (0), @@ -84,7 +84,7 @@ Window::~Window() //////////////////////////////////////////////////////////// -void Window::Create(VideoMode mode, const std::string& title, unsigned long style, const ContextSettings& settings) +void Window::Create(VideoMode mode, const std::string& title, Uint32 style, const ContextSettings& settings) { // Destroy the previous window implementation Close(); diff --git a/src/SFML/Window/WindowImpl.cpp b/src/SFML/Window/WindowImpl.cpp index 518ea5d8..22801858 100644 --- a/src/SFML/Window/WindowImpl.cpp +++ b/src/SFML/Window/WindowImpl.cpp @@ -55,7 +55,7 @@ namespace sf namespace priv { //////////////////////////////////////////////////////////// -WindowImpl* WindowImpl::New(VideoMode mode, const std::string& title, unsigned long style) +WindowImpl* WindowImpl::New(VideoMode mode, const std::string& title, Uint32 style) { return new WindowImplType(mode, title, style); } diff --git a/src/SFML/Window/WindowImpl.hpp b/src/SFML/Window/WindowImpl.hpp index 86a24fcf..add622cc 100644 --- a/src/SFML/Window/WindowImpl.hpp +++ b/src/SFML/Window/WindowImpl.hpp @@ -64,7 +64,7 @@ public : /// \return Pointer to the created window (don't forget to delete it) /// //////////////////////////////////////////////////////////// - static WindowImpl* New(VideoMode mode, const std::string& title, unsigned long style); + static WindowImpl* New(VideoMode mode, const std::string& title, Uint32 style); //////////////////////////////////////////////////////////// /// \brief Create a new window depending on to the current OS