Replaced unsigned long with Uint32 in the public API (avoids size problems with bindings)
This commit is contained in:
parent
017ef652f9
commit
a5d40de8a2
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 ?
|
||||
};
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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<unsigned long>(size));
|
||||
Uint32 packetSize = htonl(static_cast<Uint32>(size));
|
||||
Status status = Send(reinterpret_cast<const char*>(&packetSize), sizeof(packetSize));
|
||||
|
||||
// Make sure that the size was properly sent
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -37,7 +37,7 @@
|
||||
namespace
|
||||
{
|
||||
// OpenGL resources counter and its mutex
|
||||
unsigned long count = 0;
|
||||
unsigned int count = 0;
|
||||
sf::Mutex mutex;
|
||||
}
|
||||
|
||||
|
@ -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),
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user