diff --git a/CSFML/build/VC2005/csfml-audio-d.def b/CSFML/build/VC2005/csfml-audio-d.def index 5e2d700e8..ebfb7f04e 100644 --- a/CSFML/build/VC2005/csfml-audio-d.def +++ b/CSFML/build/VC2005/csfml-audio-d.def @@ -21,11 +21,13 @@ EXPORTS sfMusic_SetPitch sfMusic_SetVolume sfMusic_SetPosition + sfMusic_SetRelativeToListener sfMusic_SetMinDistance sfMusic_SetAttenuation sfMusic_GetPitch sfMusic_GetVolume sfMusic_GetPosition + sfMusic_IsRelativeToListener sfMusic_GetMinDistance sfMusic_GetAttenuation sfMusic_GetPlayingOffset @@ -42,12 +44,14 @@ EXPORTS sfSound_SetPitch sfSound_SetVolume sfSound_SetPosition + sfSound_SetRelativeToListener sfSound_SetMinDistance sfSound_SetAttenuation sfSound_SetPlayingOffset sfSound_GetPitch sfSound_GetVolume sfSound_GetPosition + sfSound_IsRelativeToListener sfSound_GetPlayingOffset sfSound_GetMinDistance sfSound_GetAttenuation @@ -84,12 +88,14 @@ EXPORTS sfSoundStream_SetPitch sfSoundStream_SetVolume sfSoundStream_SetPosition + sfSoundStream_SetRelativeToListener sfSoundStream_SetMinDistance sfSoundStream_SetAttenuation sfSoundStream_SetLoop sfSoundStream_GetPitch sfSoundStream_GetVolume sfSoundStream_GetPosition + sfSoundStream_IsRelativeToListener sfSoundStream_GetMinDistance sfSoundStream_GetAttenuation sfSoundStream_GetLoop diff --git a/CSFML/build/VC2005/csfml-audio.def b/CSFML/build/VC2005/csfml-audio.def index fb211e825..3bf96b32d 100644 --- a/CSFML/build/VC2005/csfml-audio.def +++ b/CSFML/build/VC2005/csfml-audio.def @@ -21,11 +21,13 @@ EXPORTS sfMusic_SetPitch sfMusic_SetVolume sfMusic_SetPosition + sfMusic_SetRelativeToListener sfMusic_SetMinDistance sfMusic_SetAttenuation sfMusic_GetPitch sfMusic_GetVolume sfMusic_GetPosition + sfMusic_IsRelativeToListener sfMusic_GetMinDistance sfMusic_GetAttenuation sfMusic_GetPlayingOffset @@ -42,12 +44,14 @@ EXPORTS sfSound_SetPitch sfSound_SetVolume sfSound_SetPosition + sfSound_SetRelativeToListener sfSound_SetMinDistance sfSound_SetAttenuation sfSound_SetPlayingOffset sfSound_GetPitch sfSound_GetVolume sfSound_GetPosition + sfSound_IsRelativeToListener sfSound_GetPlayingOffset sfSound_GetMinDistance sfSound_GetAttenuation @@ -84,12 +88,14 @@ EXPORTS sfSoundStream_SetPitch sfSoundStream_SetVolume sfSoundStream_SetPosition + sfSoundStream_SetRelativeToListener sfSoundStream_SetMinDistance sfSoundStream_SetAttenuation sfSoundStream_SetLoop sfSoundStream_GetPitch sfSoundStream_GetVolume sfSoundStream_GetPosition + sfSoundStream_IsRelativeToListener sfSoundStream_GetMinDistance sfSoundStream_GetAttenuation sfSoundStream_GetLoop diff --git a/CSFML/build/VC2008/csfml-audio-d.def b/CSFML/build/VC2008/csfml-audio-d.def index 5e2d700e8..ebfb7f04e 100644 --- a/CSFML/build/VC2008/csfml-audio-d.def +++ b/CSFML/build/VC2008/csfml-audio-d.def @@ -21,11 +21,13 @@ EXPORTS sfMusic_SetPitch sfMusic_SetVolume sfMusic_SetPosition + sfMusic_SetRelativeToListener sfMusic_SetMinDistance sfMusic_SetAttenuation sfMusic_GetPitch sfMusic_GetVolume sfMusic_GetPosition + sfMusic_IsRelativeToListener sfMusic_GetMinDistance sfMusic_GetAttenuation sfMusic_GetPlayingOffset @@ -42,12 +44,14 @@ EXPORTS sfSound_SetPitch sfSound_SetVolume sfSound_SetPosition + sfSound_SetRelativeToListener sfSound_SetMinDistance sfSound_SetAttenuation sfSound_SetPlayingOffset sfSound_GetPitch sfSound_GetVolume sfSound_GetPosition + sfSound_IsRelativeToListener sfSound_GetPlayingOffset sfSound_GetMinDistance sfSound_GetAttenuation @@ -84,12 +88,14 @@ EXPORTS sfSoundStream_SetPitch sfSoundStream_SetVolume sfSoundStream_SetPosition + sfSoundStream_SetRelativeToListener sfSoundStream_SetMinDistance sfSoundStream_SetAttenuation sfSoundStream_SetLoop sfSoundStream_GetPitch sfSoundStream_GetVolume sfSoundStream_GetPosition + sfSoundStream_IsRelativeToListener sfSoundStream_GetMinDistance sfSoundStream_GetAttenuation sfSoundStream_GetLoop diff --git a/CSFML/build/VC2008/csfml-audio.def b/CSFML/build/VC2008/csfml-audio.def index fb211e825..3bf96b32d 100644 --- a/CSFML/build/VC2008/csfml-audio.def +++ b/CSFML/build/VC2008/csfml-audio.def @@ -21,11 +21,13 @@ EXPORTS sfMusic_SetPitch sfMusic_SetVolume sfMusic_SetPosition + sfMusic_SetRelativeToListener sfMusic_SetMinDistance sfMusic_SetAttenuation sfMusic_GetPitch sfMusic_GetVolume sfMusic_GetPosition + sfMusic_IsRelativeToListener sfMusic_GetMinDistance sfMusic_GetAttenuation sfMusic_GetPlayingOffset @@ -42,12 +44,14 @@ EXPORTS sfSound_SetPitch sfSound_SetVolume sfSound_SetPosition + sfSound_SetRelativeToListener sfSound_SetMinDistance sfSound_SetAttenuation sfSound_SetPlayingOffset sfSound_GetPitch sfSound_GetVolume sfSound_GetPosition + sfSound_IsRelativeToListener sfSound_GetPlayingOffset sfSound_GetMinDistance sfSound_GetAttenuation @@ -84,12 +88,14 @@ EXPORTS sfSoundStream_SetPitch sfSoundStream_SetVolume sfSoundStream_SetPosition + sfSoundStream_SetRelativeToListener sfSoundStream_SetMinDistance sfSoundStream_SetAttenuation sfSoundStream_SetLoop sfSoundStream_GetPitch sfSoundStream_GetVolume sfSoundStream_GetPosition + sfSoundStream_IsRelativeToListener sfSoundStream_GetMinDistance sfSoundStream_GetAttenuation sfSoundStream_GetLoop diff --git a/CSFML/include/SFML/Audio/Music.h b/CSFML/include/SFML/Audio/Music.h index bac3e3d44..1c79ba87d 100644 --- a/CSFML/include/SFML/Audio/Music.h +++ b/CSFML/include/SFML/Audio/Music.h @@ -184,6 +184,17 @@ CSFML_API void sfMusic_SetVolume(sfMusic* Music, float Volume); //////////////////////////////////////////////////////////// CSFML_API void sfMusic_SetPosition(sfMusic* Music, float X, float Y, float Z); +//////////////////////////////////////////////////////////// +/// Make the music's position relative to the listener's +/// position, or absolute. +/// The default value is false (absolute) +/// +/// \param Music : Music to modify +/// \param Relative : True to set the position relative, false to set it absolute +/// +//////////////////////////////////////////////////////////// +CSFML_API void sfMusic_SetRelativeToListener(sfMusic* Music, sfBool Relative); + //////////////////////////////////////////////////////////// /// Set the minimum distance - closer than this distance, /// the listener will hear the music at its maximum volume. @@ -237,6 +248,17 @@ CSFML_API float sfMusic_GetVolume(sfMusic* Music); //////////////////////////////////////////////////////////// CSFML_API void sfMusic_GetPosition(sfMusic* Music, float* X, float* Y, float* Z); +//////////////////////////////////////////////////////////// +/// Tell if the music's position is relative to the listener's +/// position, or if it's absolute +/// +/// \param Music : Music to check +/// +/// \return sfTrue if the position is relative, sfFalse if it's absolute +/// +//////////////////////////////////////////////////////////// +CSFML_API sfBool sfMusic_IsRelativeToListener(sfMusic* Music); + //////////////////////////////////////////////////////////// /// Get the minimum distance of a music /// diff --git a/CSFML/include/SFML/Audio/Sound.h b/CSFML/include/SFML/Audio/Sound.h index 9ea2219f5..9afe95061 100644 --- a/CSFML/include/SFML/Audio/Sound.h +++ b/CSFML/include/SFML/Audio/Sound.h @@ -150,6 +150,17 @@ CSFML_API void sfSound_SetVolume(sfSound* Sound, float Volume); //////////////////////////////////////////////////////////// CSFML_API void sfSound_SetPosition(sfSound* Sound, float X, float Y, float Z); +//////////////////////////////////////////////////////////// +/// Make the sound's position relative to the listener's +/// position, or absolute. +/// The default value is false (absolute) +/// +/// \param Sound : Sound to modify +/// \param Relative : True to set the position relative, false to set it absolute +/// +//////////////////////////////////////////////////////////// +CSFML_API void sfSound_SetRelativeToListener(sfSound* Sound, sfBool Relative); + //////////////////////////////////////////////////////////// /// Set the minimum distance - closer than this distance, /// the listener will hear the sound at its maximum volume. @@ -212,6 +223,17 @@ CSFML_API float sfSound_GetVolume(sfSound* Sound); //////////////////////////////////////////////////////////// CSFML_API void sfSound_GetPosition(sfSound* Sound, float* X, float* Y, float* Z); +//////////////////////////////////////////////////////////// +/// Tell if the sound's position is relative to the listener's +/// position, or if it's absolute +/// +/// \param Sound : Sound to check +/// +/// \return sfTrue if the position is relative, sfFalse if it's absolute +/// +//////////////////////////////////////////////////////////// +CSFML_API sfBool sfSound_IsRelativeToListener(sfSound* Sound); + //////////////////////////////////////////////////////////// /// Get the minimum distance of a sound /// diff --git a/CSFML/include/SFML/Audio/SoundStream.h b/CSFML/include/SFML/Audio/SoundStream.h index f47257181..3142cfe34 100644 --- a/CSFML/include/SFML/Audio/SoundStream.h +++ b/CSFML/include/SFML/Audio/SoundStream.h @@ -157,6 +157,17 @@ CSFML_API void sfSoundStream_SetVolume(sfSoundStream* SoundStream, float Volume) //////////////////////////////////////////////////////////// CSFML_API void sfSoundStream_SetPosition(sfSoundStream* SoundStream, float X, float Y, float Z); +//////////////////////////////////////////////////////////// +/// Make the sound stream's position relative to the listener's +/// position, or absolute. +/// The default value is false (absolute) +/// +/// \param SoundStream : Sound stream to modify +/// \param Relative : True to set the position relative, false to set it absolute +/// +//////////////////////////////////////////////////////////// +CSFML_API void sfSoundStream_SetRelativeToListener(sfSoundStream* SoundStream, sfBool Relative); + //////////////////////////////////////////////////////////// /// Set the minimum distance - closer than this distance, /// the listener will hear the sound stream at its maximum volume. @@ -219,6 +230,17 @@ CSFML_API float sfSoundStream_GetVolume(sfSoundStream* SoundStream); //////////////////////////////////////////////////////////// CSFML_API void sfSoundStream_GetPosition(sfSoundStream* SoundStream, float* X, float* Y, float* Z); +//////////////////////////////////////////////////////////// +/// Tell if the sound stream's position is relative to the listener's +/// position, or if it's absolute +/// +/// \param SoundStream : Sound stream to check +/// +/// \return sfTrue if the position is relative, sfFalse if it's absolute +/// +//////////////////////////////////////////////////////////// +CSFML_API sfBool sfSoundStream_IsRelativeToListener(sfSoundStream* SoundStream); + //////////////////////////////////////////////////////////// /// Get the minimum distance of a sound stream /// diff --git a/CSFML/src/SFML/Audio/Music.cpp b/CSFML/src/SFML/Audio/Music.cpp index 906c59db9..7a4d8682c 100644 --- a/CSFML/src/SFML/Audio/Music.cpp +++ b/CSFML/src/SFML/Audio/Music.cpp @@ -198,6 +198,17 @@ void sfMusic_SetPosition(sfMusic* Music, float X, float Y, float Z) } +//////////////////////////////////////////////////////////// +/// Make the music's position relative to the listener's +/// position, or absolute. +/// The default value is false (absolute) +//////////////////////////////////////////////////////////// +void sfMusic_SetRelativeToListener(sfMusic* music, sfBool Relative) +{ + CSFML_CALL(music, SetRelativeToListener(Relative == sfTrue)); +} + + //////////////////////////////////////////////////////////// /// Set the minimum distance - closer than this distance, /// the listener will hear the music at its maximum volume. @@ -255,6 +266,16 @@ void sfMusic_GetPosition(sfMusic* Music, float* X, float* Y, float* Z) } +//////////////////////////////////////////////////////////// +/// Tell if the music's position is relative to the listener's +/// position, or if it's absolute +//////////////////////////////////////////////////////////// +CSFML_API sfBool sfMusic_IsRelativeToListener(sfMusic* Music) +{ + CSFML_CALL_RETURN(Music, IsRelativeToListener(), sfFalse); +} + + //////////////////////////////////////////////////////////// /// Get the minimum distance of a music //////////////////////////////////////////////////////////// diff --git a/CSFML/src/SFML/Audio/Sound.cpp b/CSFML/src/SFML/Audio/Sound.cpp index 2875c4af3..176bb5b47 100644 --- a/CSFML/src/SFML/Audio/Sound.cpp +++ b/CSFML/src/SFML/Audio/Sound.cpp @@ -168,6 +168,17 @@ void sfSound_SetPosition(sfSound* Sound, float X, float Y, float Z) } +//////////////////////////////////////////////////////////// +/// Make the sound's position relative to the listener's +/// position, or absolute. +/// The default value is false (absolute) +//////////////////////////////////////////////////////////// +void sfSound_SetRelativeToListener(sfSound* Sound, sfBool Relative) +{ + CSFML_CALL(Sound, SetRelativeToListener(Relative == sfTrue)); +} + + //////////////////////////////////////////////////////////// /// Set the minimum distance - closer than this distance, /// the listener will hear the sound at its maximum volume. @@ -231,6 +242,16 @@ void sfSound_GetPosition(sfSound* Sound, float* X, float* Y, float* Z) } +//////////////////////////////////////////////////////////// +/// Tell if the sound's position is relative to the listener's +/// position, or if it's absolute +//////////////////////////////////////////////////////////// +CSFML_API sfBool sfSound_IsRelativeToListener(sfSound* Sound) +{ + CSFML_CALL_RETURN(Sound, IsRelativeToListener(), sfFalse); +} + + //////////////////////////////////////////////////////////// /// Get the minimum distance of a sound //////////////////////////////////////////////////////////// diff --git a/CSFML/src/SFML/Audio/SoundStream.cpp b/CSFML/src/SFML/Audio/SoundStream.cpp index 90fe6f393..ed07bce65 100644 --- a/CSFML/src/SFML/Audio/SoundStream.cpp +++ b/CSFML/src/SFML/Audio/SoundStream.cpp @@ -195,6 +195,17 @@ void sfSoundStream_SetPosition(sfSoundStream* SoundStream, float X, float Y, flo } +//////////////////////////////////////////////////////////// +/// Make the sound stream's position relative to the listener's +/// position, or absolute. +/// The default value is false (absolute) +//////////////////////////////////////////////////////////// +void sfSoundStream_SetRelativeToListener(sfSoundStream* SoundStream, sfBool Relative) +{ + CSFML_CALL(SoundStream, SetRelativeToListener(Relative == sfTrue)); +} + + //////////////////////////////////////////////////////////// /// Set the minimum distance - closer than this distance, /// the listener will hear the sound stream at its maximum volume. @@ -258,6 +269,16 @@ void sfSoundStream_GetPosition(sfSoundStream* SoundStream, float* X, float* Y, f } +//////////////////////////////////////////////////////////// +/// Tell if the sound stream's position is relative to the listener's +/// position, or if it's absolute +//////////////////////////////////////////////////////////// +CSFML_API sfBool sfSoundStream_IsRelativeToListener(sfSoundStream* SoundStream) +{ + CSFML_CALL_RETURN(SoundStream, IsRelativeToListener(), sfFalse); +} + + //////////////////////////////////////////////////////////// /// Get the minimum distance of a sound stream //////////////////////////////////////////////////////////// diff --git a/CSFML/xcode/SFML-Info.plist b/CSFML/xcode/SFML-Info.plist new file mode 100644 index 000000000..9e2fead0c --- /dev/null +++ b/CSFML/xcode/SFML-Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.sfml.${PRODUCT_NAME:identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleSignature + ???? + CFBundleVersion + 1.0 + + diff --git a/CSFML/xcode/SFML-bare.xcodeproj/project.pbxproj b/CSFML/xcode/SFML-bare.xcodeproj/project.pbxproj new file mode 100644 index 000000000..798466d95 --- /dev/null +++ b/CSFML/xcode/SFML-bare.xcodeproj/project.pbxproj @@ -0,0 +1,1793 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 42; + objects = { + +/* Begin PBXAggregateTarget section */ + A011E39B0F6574D600FAE48D /* All */ = { + isa = PBXAggregateTarget; + buildConfigurationList = A011E3AB0F6574E400FAE48D /* Build configuration list for PBXAggregateTarget "All" */; + buildPhases = ( + ); + dependencies = ( + A011E3B80F6574EF00FAE48D /* PBXTargetDependency */, + A011E3B60F6574EF00FAE48D /* PBXTargetDependency */, + A011E3B40F6574EF00FAE48D /* PBXTargetDependency */, + A011E3B20F6574EF00FAE48D /* PBXTargetDependency */, + A011E3B00F6574EF00FAE48D /* PBXTargetDependency */, + ); + name = All; + productName = All; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + A011E3E30F65776B00FAE48D /* Sleep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3DE0F65776B00FAE48D /* Sleep.cpp */; }; + A011E3E40F65776B00FAE48D /* Thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3DF0F65776B00FAE48D /* Thread.cpp */; }; + A011E3E50F65776B00FAE48D /* Randomizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3E00F65776B00FAE48D /* Randomizer.cpp */; }; + A011E3E60F65776B00FAE48D /* Clock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3E10F65776B00FAE48D /* Clock.cpp */; }; + A011E3E70F65776B00FAE48D /* Mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3E20F65776B00FAE48D /* Mutex.cpp */; }; + A011E3F10F65777800FAE48D /* Ftp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3EA0F65777800FAE48D /* Ftp.cpp */; }; + A011E3F20F65777800FAE48D /* Http.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3EB0F65777800FAE48D /* Http.cpp */; }; + A011E3F30F65777800FAE48D /* IPAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3EC0F65777800FAE48D /* IPAddress.cpp */; }; + A011E3F40F65777800FAE48D /* Packet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3ED0F65777800FAE48D /* Packet.cpp */; }; + A011E3F50F65777800FAE48D /* Selector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3EE0F65777800FAE48D /* Selector.cpp */; }; + A011E3F60F65777800FAE48D /* SocketTCP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3EF0F65777800FAE48D /* SocketTCP.cpp */; }; + A011E3F70F65777800FAE48D /* SocketUDP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3F00F65777800FAE48D /* SocketUDP.cpp */; }; + A011E3FF0F65778600FAE48D /* Listener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3F80F65778600FAE48D /* Listener.cpp */; }; + A011E4000F65778600FAE48D /* Music.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3F90F65778600FAE48D /* Music.cpp */; }; + A011E4010F65778600FAE48D /* Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3FA0F65778600FAE48D /* Sound.cpp */; }; + A011E4020F65778600FAE48D /* SoundBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3FB0F65778600FAE48D /* SoundBuffer.cpp */; }; + A011E4030F65778600FAE48D /* SoundBufferRecorder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3FC0F65778600FAE48D /* SoundBufferRecorder.cpp */; }; + A011E4040F65778600FAE48D /* SoundRecorder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3FD0F65778600FAE48D /* SoundRecorder.cpp */; }; + A011E4050F65778600FAE48D /* SoundStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E3FE0F65778600FAE48D /* SoundStream.cpp */; }; + A011E40A0F65779900FAE48D /* Context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4060F65779900FAE48D /* Context.cpp */; }; + A011E40B0F65779900FAE48D /* Input.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4070F65779900FAE48D /* Input.cpp */; }; + A011E40C0F65779900FAE48D /* VideoMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4080F65779900FAE48D /* VideoMode.cpp */; }; + A011E40D0F65779900FAE48D /* Window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4090F65779900FAE48D /* Window.cpp */; }; + A011E4180F6577A500FAE48D /* Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E40E0F6577A500FAE48D /* Color.cpp */; }; + A011E4190F6577A500FAE48D /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E40F0F6577A500FAE48D /* Font.cpp */; }; + A011E41A0F6577A500FAE48D /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4100F6577A500FAE48D /* Image.cpp */; }; + A011E41B0F6577A500FAE48D /* PostFX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4110F6577A500FAE48D /* PostFX.cpp */; }; + A011E41C0F6577A500FAE48D /* Rect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4120F6577A500FAE48D /* Rect.cpp */; }; + A011E41D0F6577A500FAE48D /* RenderWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4130F6577A500FAE48D /* RenderWindow.cpp */; }; + A011E41E0F6577A500FAE48D /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4140F6577A500FAE48D /* Shape.cpp */; }; + A011E41F0F6577A500FAE48D /* Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4150F6577A500FAE48D /* Sprite.cpp */; }; + A011E4200F6577A500FAE48D /* String.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4160F6577A500FAE48D /* String.cpp */; }; + A011E4210F6577A500FAE48D /* View.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4170F6577A500FAE48D /* View.cpp */; }; + A011E4370F65780E00FAE48D /* Clock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4250F65780E00FAE48D /* Clock.cpp */; }; + A011E4380F65780E00FAE48D /* Initializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4260F65780E00FAE48D /* Initializer.cpp */; }; + A011E4390F65780E00FAE48D /* Lock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4270F65780E00FAE48D /* Lock.cpp */; }; + A011E43B0F65780E00FAE48D /* Platform.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4290F65780E00FAE48D /* Platform.hpp */; }; + A011E43C0F65780E00FAE48D /* Randomizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E42A0F65780E00FAE48D /* Randomizer.cpp */; }; + A011E43D0F65780E00FAE48D /* Sleep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E42B0F65780E00FAE48D /* Sleep.cpp */; }; + A011E43E0F65780E00FAE48D /* Unicode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E42C0F65780E00FAE48D /* Unicode.cpp */; }; + A011E43F0F65780E00FAE48D /* Mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E42E0F65780E00FAE48D /* Mutex.cpp */; }; + A011E4400F65780E00FAE48D /* Platform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E42F0F65780E00FAE48D /* Platform.cpp */; }; + A011E4410F65780E00FAE48D /* Platform.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4300F65780E00FAE48D /* Platform.hpp */; }; + A011E4420F65780E00FAE48D /* Thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4310F65780E00FAE48D /* Thread.cpp */; }; + A011E4540F65782800FAE48D /* Ftp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4480F65782800FAE48D /* Ftp.cpp */; }; + A011E4550F65782800FAE48D /* Http.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4490F65782800FAE48D /* Http.cpp */; }; + A011E4560F65782800FAE48D /* IPAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E44A0F65782800FAE48D /* IPAddress.cpp */; }; + A011E4580F65782800FAE48D /* Packet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E44C0F65782800FAE48D /* Packet.cpp */; }; + A011E4590F65782800FAE48D /* SelectorBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E44D0F65782800FAE48D /* SelectorBase.cpp */; }; + A011E45A0F65782800FAE48D /* SocketTCP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E44E0F65782800FAE48D /* SocketTCP.cpp */; }; + A011E45B0F65782800FAE48D /* SocketUDP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E44F0F65782800FAE48D /* SocketUDP.cpp */; }; + A011E45C0F65782800FAE48D /* SocketHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4510F65782800FAE48D /* SocketHelper.cpp */; }; + A011E4740F65783900FAE48D /* AudioDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E45F0F65783900FAE48D /* AudioDevice.cpp */; }; + A011E4750F65783900FAE48D /* AudioDevice.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4600F65783900FAE48D /* AudioDevice.hpp */; }; + A011E4760F65783900FAE48D /* AudioResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4610F65783900FAE48D /* AudioResource.cpp */; }; + A011E4770F65783900FAE48D /* Listener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4620F65783900FAE48D /* Listener.cpp */; }; + A011E4790F65783900FAE48D /* Music.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4640F65783900FAE48D /* Music.cpp */; }; + A011E47A0F65783900FAE48D /* OpenAL.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4650F65783900FAE48D /* OpenAL.hpp */; }; + A011E47B0F65783900FAE48D /* Sound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4660F65783900FAE48D /* Sound.cpp */; }; + A011E47C0F65783900FAE48D /* SoundBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4670F65783900FAE48D /* SoundBuffer.cpp */; }; + A011E47D0F65783900FAE48D /* SoundBufferRecorder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4680F65783900FAE48D /* SoundBufferRecorder.cpp */; }; + A011E47E0F65783900FAE48D /* SoundFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4690F65783900FAE48D /* SoundFile.cpp */; }; + A011E47F0F65783900FAE48D /* SoundFile.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E46A0F65783900FAE48D /* SoundFile.hpp */; }; + A011E4800F65783900FAE48D /* SoundFileDefault.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E46B0F65783900FAE48D /* SoundFileDefault.cpp */; }; + A011E4810F65783900FAE48D /* SoundFileDefault.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E46C0F65783900FAE48D /* SoundFileDefault.hpp */; }; + A011E4820F65783900FAE48D /* SoundFileOgg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E46D0F65783900FAE48D /* SoundFileOgg.cpp */; }; + A011E4830F65783900FAE48D /* SoundFileOgg.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E46E0F65783900FAE48D /* SoundFileOgg.hpp */; }; + A011E4840F65783900FAE48D /* SoundRecorder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E46F0F65783900FAE48D /* SoundRecorder.cpp */; }; + A011E4850F65783900FAE48D /* SoundStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4700F65783900FAE48D /* SoundStream.cpp */; }; + A011E4860F65783900FAE48D /* stb_vorbis.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4720F65783900FAE48D /* stb_vorbis.c */; }; + A011E4870F65783900FAE48D /* stb_vorbis.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E4730F65783900FAE48D /* stb_vorbis.h */; }; + A011E4B80F65784E00FAE48D /* AppController.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E48A0F65784E00FAE48D /* AppController.h */; }; + A011E4B90F65784E00FAE48D /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = A011E48B0F65784E00FAE48D /* AppController.mm */; }; + A011E4BA0F65784E00FAE48D /* GLKit.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E48C0F65784E00FAE48D /* GLKit.h */; }; + A011E4BB0F65784E00FAE48D /* GLKit.mm in Sources */ = {isa = PBXBuildFile; fileRef = A011E48D0F65784E00FAE48D /* GLKit.mm */; }; + A011E4BC0F65784E00FAE48D /* Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E48E0F65784E00FAE48D /* Joystick.cpp */; }; + A011E4BD0F65784E00FAE48D /* Joystick.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E48F0F65784E00FAE48D /* Joystick.hpp */; }; + A011E4BE0F65784E00FAE48D /* VideoModeSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4900F65784E00FAE48D /* VideoModeSupport.cpp */; }; + A011E4BF0F65784E00FAE48D /* VideoModeSupport.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4910F65784E00FAE48D /* VideoModeSupport.hpp */; }; + A011E4C20F65784E00FAE48D /* WindowImplCocoa.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4940F65784E00FAE48D /* WindowImplCocoa.hpp */; }; + A011E4C30F65784E00FAE48D /* WindowImplCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = A011E4950F65784E00FAE48D /* WindowImplCocoa.mm */; }; + A011E4C40F65784E00FAE48D /* Context.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4960F65784E00FAE48D /* Context.cpp */; }; + A011E4C50F65784E00FAE48D /* glext.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E4980F65784E00FAE48D /* glext.h */; }; + A011E4C60F65784E00FAE48D /* glxext.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E4990F65784E00FAE48D /* glxext.h */; }; + A011E4C70F65784E00FAE48D /* wglext.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E49A0F65784E00FAE48D /* wglext.h */; }; + A011E4C80F65784E00FAE48D /* Input.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E49B0F65784E00FAE48D /* Input.cpp */; }; + A011E4C90F65784E00FAE48D /* Joystick.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E49C0F65784E00FAE48D /* Joystick.hpp */; }; + A011E4D70F65784E00FAE48D /* VideoMode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4AC0F65784E00FAE48D /* VideoMode.cpp */; }; + A011E4D80F65784E00FAE48D /* VideoModeSupport.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4AD0F65784E00FAE48D /* VideoModeSupport.hpp */; }; + A011E4DF0F65784E00FAE48D /* Window.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4B50F65784E00FAE48D /* Window.cpp */; }; + A011E4E00F65784E00FAE48D /* WindowImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4B60F65784E00FAE48D /* WindowImpl.cpp */; }; + A011E4E10F65784E00FAE48D /* WindowImpl.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4B70F65784E00FAE48D /* WindowImpl.hpp */; }; + A011E5690F65786600FAE48D /* Arial.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4E30F65786600FAE48D /* Arial.hpp */; }; + A011E56A0F65786600FAE48D /* Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4E40F65786600FAE48D /* Color.cpp */; }; + A011E56B0F65786600FAE48D /* Drawable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4E50F65786600FAE48D /* Drawable.cpp */; }; + A011E56C0F65786600FAE48D /* Font.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4E60F65786600FAE48D /* Font.cpp */; }; + A011E56D0F65786600FAE48D /* FontLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4E70F65786600FAE48D /* FontLoader.cpp */; }; + A011E56E0F65786600FAE48D /* FontLoader.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4E80F65786600FAE48D /* FontLoader.hpp */; }; + A011E56F0F65786600FAE48D /* glew.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4EA0F65786600FAE48D /* glew.c */; }; + A011E5700F65786600FAE48D /* glew.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E4EB0F65786600FAE48D /* glew.h */; }; + A011E5710F65786600FAE48D /* glxew.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E4EC0F65786600FAE48D /* glxew.h */; }; + A011E5720F65786600FAE48D /* wglew.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E4ED0F65786600FAE48D /* wglew.h */; }; + A011E5730F65786600FAE48D /* GraphicsContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4EE0F65786600FAE48D /* GraphicsContext.cpp */; }; + A011E5740F65786600FAE48D /* GraphicsContext.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4EF0F65786600FAE48D /* GraphicsContext.hpp */; }; + A011E5750F65786600FAE48D /* Image.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4F00F65786600FAE48D /* Image.cpp */; }; + A011E5760F65786600FAE48D /* ImageLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E4F10F65786600FAE48D /* ImageLoader.cpp */; }; + A011E5770F65786600FAE48D /* ImageLoader.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A011E4F20F65786600FAE48D /* ImageLoader.hpp */; }; + A011E5780F65786600FAE48D /* cderror.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E4F40F65786600FAE48D /* cderror.h */; }; + A011E5790F65786600FAE48D /* jcapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4F50F65786600FAE48D /* jcapimin.c */; }; + A011E57A0F65786600FAE48D /* jcapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4F60F65786600FAE48D /* jcapistd.c */; }; + A011E57B0F65786600FAE48D /* jccoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4F70F65786600FAE48D /* jccoefct.c */; }; + A011E57C0F65786600FAE48D /* jccolor.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4F80F65786600FAE48D /* jccolor.c */; }; + A011E57D0F65786600FAE48D /* jcdctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4F90F65786600FAE48D /* jcdctmgr.c */; }; + A011E57E0F65786600FAE48D /* jchuff.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4FA0F65786600FAE48D /* jchuff.c */; }; + A011E57F0F65786600FAE48D /* jchuff.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E4FB0F65786600FAE48D /* jchuff.h */; }; + A011E5800F65786600FAE48D /* jcinit.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4FC0F65786600FAE48D /* jcinit.c */; }; + A011E5810F65786600FAE48D /* jcmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4FD0F65786600FAE48D /* jcmainct.c */; }; + A011E5820F65786600FAE48D /* jcmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4FE0F65786600FAE48D /* jcmarker.c */; }; + A011E5830F65786600FAE48D /* jcmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E4FF0F65786600FAE48D /* jcmaster.c */; }; + A011E5840F65786600FAE48D /* jcomapi.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5000F65786600FAE48D /* jcomapi.c */; }; + A011E5850F65786600FAE48D /* jconfig.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5010F65786600FAE48D /* jconfig.h */; }; + A011E5860F65786600FAE48D /* jcparam.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5020F65786600FAE48D /* jcparam.c */; }; + A011E5870F65786600FAE48D /* jcphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5030F65786600FAE48D /* jcphuff.c */; }; + A011E5880F65786600FAE48D /* jcprepct.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5040F65786600FAE48D /* jcprepct.c */; }; + A011E5890F65786600FAE48D /* jcsample.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5050F65786600FAE48D /* jcsample.c */; }; + A011E58A0F65786600FAE48D /* jctrans.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5060F65786600FAE48D /* jctrans.c */; }; + A011E58B0F65786600FAE48D /* jdapimin.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5070F65786600FAE48D /* jdapimin.c */; }; + A011E58C0F65786600FAE48D /* jdapistd.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5080F65786600FAE48D /* jdapistd.c */; }; + A011E58D0F65786600FAE48D /* jdatadst.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5090F65786600FAE48D /* jdatadst.c */; }; + A011E58E0F65786600FAE48D /* jdatasrc.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E50A0F65786600FAE48D /* jdatasrc.c */; }; + A011E58F0F65786600FAE48D /* jdcoefct.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E50B0F65786600FAE48D /* jdcoefct.c */; }; + A011E5900F65786600FAE48D /* jdcolor.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E50C0F65786600FAE48D /* jdcolor.c */; }; + A011E5910F65786600FAE48D /* jdct.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E50D0F65786600FAE48D /* jdct.h */; }; + A011E5920F65786600FAE48D /* jddctmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E50E0F65786600FAE48D /* jddctmgr.c */; }; + A011E5930F65786600FAE48D /* jdhuff.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E50F0F65786600FAE48D /* jdhuff.c */; }; + A011E5940F65786600FAE48D /* jdhuff.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5100F65786600FAE48D /* jdhuff.h */; }; + A011E5950F65786600FAE48D /* jdinput.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5110F65786600FAE48D /* jdinput.c */; }; + A011E5960F65786600FAE48D /* jdmainct.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5120F65786600FAE48D /* jdmainct.c */; }; + A011E5970F65786600FAE48D /* jdmarker.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5130F65786600FAE48D /* jdmarker.c */; }; + A011E5980F65786600FAE48D /* jdmaster.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5140F65786600FAE48D /* jdmaster.c */; }; + A011E5990F65786600FAE48D /* jdmerge.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5150F65786600FAE48D /* jdmerge.c */; }; + A011E59A0F65786600FAE48D /* jdphuff.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5160F65786600FAE48D /* jdphuff.c */; }; + A011E59B0F65786600FAE48D /* jdpostct.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5170F65786600FAE48D /* jdpostct.c */; }; + A011E59C0F65786600FAE48D /* jdsample.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5180F65786600FAE48D /* jdsample.c */; }; + A011E59D0F65786600FAE48D /* jdtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5190F65786600FAE48D /* jdtrans.c */; }; + A011E59E0F65786600FAE48D /* jerror.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E51A0F65786600FAE48D /* jerror.c */; }; + A011E59F0F65786600FAE48D /* jerror.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E51B0F65786600FAE48D /* jerror.h */; }; + A011E5A00F65786600FAE48D /* jfdctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E51C0F65786600FAE48D /* jfdctflt.c */; }; + A011E5A10F65786600FAE48D /* jfdctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E51D0F65786600FAE48D /* jfdctfst.c */; }; + A011E5A20F65786600FAE48D /* jfdctint.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E51E0F65786600FAE48D /* jfdctint.c */; }; + A011E5A30F65786600FAE48D /* jidctflt.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E51F0F65786600FAE48D /* jidctflt.c */; }; + A011E5A40F65786600FAE48D /* jidctfst.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5200F65786600FAE48D /* jidctfst.c */; }; + A011E5A50F65786600FAE48D /* jidctint.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5210F65786600FAE48D /* jidctint.c */; }; + A011E5A60F65786600FAE48D /* jidctred.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5220F65786600FAE48D /* jidctred.c */; }; + A011E5A70F65786600FAE48D /* jinclude.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5230F65786600FAE48D /* jinclude.h */; }; + A011E5A80F65786600FAE48D /* jmemmgr.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5240F65786600FAE48D /* jmemmgr.c */; }; + A011E5A90F65786600FAE48D /* jmemnobs.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5250F65786600FAE48D /* jmemnobs.c */; }; + A011E5AA0F65786600FAE48D /* jmemsys.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5260F65786600FAE48D /* jmemsys.h */; }; + A011E5AB0F65786600FAE48D /* jmorecfg.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5270F65786600FAE48D /* jmorecfg.h */; }; + A011E5AC0F65786600FAE48D /* jpegint.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5280F65786600FAE48D /* jpegint.h */; }; + A011E5AD0F65786600FAE48D /* jpeglib.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5290F65786600FAE48D /* jpeglib.h */; }; + A011E5AE0F65786600FAE48D /* jquant1.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E52A0F65786600FAE48D /* jquant1.c */; }; + A011E5AF0F65786600FAE48D /* jquant2.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E52B0F65786600FAE48D /* jquant2.c */; }; + A011E5B00F65786600FAE48D /* jutils.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E52C0F65786600FAE48D /* jutils.c */; }; + A011E5B10F65786600FAE48D /* jversion.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E52D0F65786600FAE48D /* jversion.h */; }; + A011E5B20F65786600FAE48D /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E52F0F65786600FAE48D /* png.c */; }; + A011E5B30F65786600FAE48D /* png.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5300F65786600FAE48D /* png.h */; }; + A011E5B40F65786600FAE48D /* pngconf.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5310F65786600FAE48D /* pngconf.h */; }; + A011E5B50F65786600FAE48D /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5320F65786600FAE48D /* pngerror.c */; }; + A011E5B60F65786600FAE48D /* pnggccrd.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5330F65786600FAE48D /* pnggccrd.c */; }; + A011E5B70F65786600FAE48D /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5340F65786600FAE48D /* pngget.c */; }; + A011E5B80F65786600FAE48D /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5350F65786600FAE48D /* pngmem.c */; }; + A011E5B90F65786600FAE48D /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5360F65786600FAE48D /* pngpread.c */; }; + A011E5BA0F65786600FAE48D /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5370F65786600FAE48D /* pngread.c */; }; + A011E5BB0F65786600FAE48D /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5380F65786600FAE48D /* pngrio.c */; }; + A011E5BC0F65786600FAE48D /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5390F65786600FAE48D /* pngrtran.c */; }; + A011E5BD0F65786600FAE48D /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E53A0F65786600FAE48D /* pngrutil.c */; }; + A011E5BE0F65786600FAE48D /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E53B0F65786600FAE48D /* pngset.c */; }; + A011E5BF0F65786600FAE48D /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E53C0F65786600FAE48D /* pngtrans.c */; }; + A011E5C00F65786600FAE48D /* pngvcrd.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E53D0F65786600FAE48D /* pngvcrd.c */; }; + A011E5C10F65786600FAE48D /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E53E0F65786600FAE48D /* pngwio.c */; }; + A011E5C20F65786600FAE48D /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E53F0F65786600FAE48D /* pngwrite.c */; }; + A011E5C30F65786600FAE48D /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5400F65786600FAE48D /* pngwtran.c */; }; + A011E5C40F65786600FAE48D /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5410F65786600FAE48D /* pngwutil.c */; }; + A011E5C60F65786600FAE48D /* Matrix3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E5430F65786600FAE48D /* Matrix3.cpp */; }; + A011E5C70F65786600FAE48D /* PostFX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E5440F65786600FAE48D /* PostFX.cpp */; }; + A011E5C80F65786600FAE48D /* RenderTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E5450F65786600FAE48D /* RenderTarget.cpp */; }; + A011E5C90F65786600FAE48D /* RenderWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E5460F65786600FAE48D /* RenderWindow.cpp */; }; + A011E5CA0F65786600FAE48D /* Shape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E5470F65786600FAE48D /* Shape.cpp */; }; + A011E5CB0F65786600FAE48D /* image_DXT.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5490F65786600FAE48D /* image_DXT.c */; }; + A011E5CC0F65786600FAE48D /* image_DXT.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E54A0F65786600FAE48D /* image_DXT.h */; }; + A011E5CD0F65786600FAE48D /* SOIL.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E54B0F65786600FAE48D /* SOIL.c */; }; + A011E5CE0F65786600FAE48D /* SOIL.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E54C0F65786600FAE48D /* SOIL.h */; }; + A011E5CF0F65786600FAE48D /* stb_image_aug.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E54D0F65786600FAE48D /* stb_image_aug.c */; }; + A011E5D00F65786600FAE48D /* stb_image_aug.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E54E0F65786600FAE48D /* stb_image_aug.h */; }; + A011E5D10F65786600FAE48D /* stbi_DDS_aug.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E54F0F65786600FAE48D /* stbi_DDS_aug.h */; }; + A011E5D20F65786600FAE48D /* stbi_DDS_aug_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5500F65786600FAE48D /* stbi_DDS_aug_c.h */; }; + A011E5D30F65786600FAE48D /* Sprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E5510F65786600FAE48D /* Sprite.cpp */; }; + A011E5D40F65786600FAE48D /* String.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E5520F65786600FAE48D /* String.cpp */; }; + A011E5D50F65786600FAE48D /* View.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A011E5530F65786600FAE48D /* View.cpp */; }; + A011E5D60F65786600FAE48D /* adler32.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5550F65786600FAE48D /* adler32.c */; }; + A011E5D70F65786600FAE48D /* compress.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5560F65786600FAE48D /* compress.c */; }; + A011E5D80F65786600FAE48D /* crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5570F65786600FAE48D /* crc32.c */; }; + A011E5D90F65786600FAE48D /* crc32.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5580F65786600FAE48D /* crc32.h */; }; + A011E5DA0F65786600FAE48D /* deflate.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5590F65786600FAE48D /* deflate.c */; }; + A011E5DB0F65786600FAE48D /* deflate.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E55A0F65786600FAE48D /* deflate.h */; }; + A011E5DC0F65786600FAE48D /* inffast.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E55B0F65786600FAE48D /* inffast.c */; }; + A011E5DD0F65786600FAE48D /* inffast.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E55C0F65786600FAE48D /* inffast.h */; }; + A011E5DE0F65786600FAE48D /* inffixed.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E55D0F65786600FAE48D /* inffixed.h */; }; + A011E5DF0F65786600FAE48D /* inflate.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E55E0F65786600FAE48D /* inflate.c */; }; + A011E5E00F65786600FAE48D /* inflate.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E55F0F65786600FAE48D /* inflate.h */; }; + A011E5E10F65786600FAE48D /* inftrees.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5600F65786600FAE48D /* inftrees.c */; }; + A011E5E20F65786600FAE48D /* inftrees.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5610F65786600FAE48D /* inftrees.h */; }; + A011E5E30F65786600FAE48D /* trees.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5620F65786600FAE48D /* trees.c */; }; + A011E5E40F65786600FAE48D /* trees.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5630F65786600FAE48D /* trees.h */; }; + A011E5E50F65786600FAE48D /* uncompr.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5640F65786600FAE48D /* uncompr.c */; }; + A011E5E60F65786600FAE48D /* zconf.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5650F65786600FAE48D /* zconf.h */; }; + A011E5E70F65786600FAE48D /* zlib.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5660F65786600FAE48D /* zlib.h */; }; + A011E5E80F65786600FAE48D /* zutil.c in Sources */ = {isa = PBXBuildFile; fileRef = A011E5670F65786600FAE48D /* zutil.c */; }; + A011E5E90F65786600FAE48D /* zutil.h in Headers */ = {isa = PBXBuildFile; fileRef = A011E5680F65786600FAE48D /* zutil.h */; }; + A011E5FB0F65791B00FAE48D /* libcsfml-system.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A011E3720F65749300FAE48D /* libcsfml-system.dylib */; }; + A011E6060F65797100FAE48D /* libcsfml-system.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A011E3720F65749300FAE48D /* libcsfml-system.dylib */; }; + A011E6140F6579CA00FAE48D /* libcsfml-window.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A011E38F0F6574B500FAE48D /* libcsfml-window.dylib */; }; + A011E6170F6579D100FAE48D /* libcsfml-system.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A011E3720F65749300FAE48D /* libcsfml-system.dylib */; }; + A01BEF370F6BF2490095262C /* sndfile.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A01BEF360F6BF2490095262C /* sndfile.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + A011E3AF0F6574EF00FAE48D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A011E3570F65738800FAE48D /* Project object */; + proxyType = 1; + remoteGlobalIDString = A011E3970F6574BE00FAE48D; + remoteInfo = "csfml-graphics"; + }; + A011E3B10F6574EF00FAE48D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A011E3570F65738800FAE48D /* Project object */; + proxyType = 1; + remoteGlobalIDString = A011E38E0F6574B500FAE48D; + remoteInfo = "csfml-window"; + }; + A011E3B30F6574EF00FAE48D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A011E3570F65738800FAE48D /* Project object */; + proxyType = 1; + remoteGlobalIDString = A011E3850F6574AC00FAE48D; + remoteInfo = "csfml-audio"; + }; + A011E3B50F6574EF00FAE48D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A011E3570F65738800FAE48D /* Project object */; + proxyType = 1; + remoteGlobalIDString = A011E37C0F65749F00FAE48D; + remoteInfo = "csfml-network"; + }; + A011E3B70F6574EF00FAE48D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = A011E3570F65738800FAE48D /* Project object */; + proxyType = 1; + remoteGlobalIDString = A011E3710F65749300FAE48D; + remoteInfo = "csfml-system"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + A011E3720F65749300FAE48D /* libcsfml-system.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libcsfml-system.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + A011E37D0F65749F00FAE48D /* libcsfml-network.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libcsfml-network.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + A011E3860F6574AC00FAE48D /* libcsfml-audio.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libcsfml-audio.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + A011E38F0F6574B500FAE48D /* libcsfml-window.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libcsfml-window.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + A011E3980F6574BE00FAE48D /* libcsfml-graphics.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libcsfml-graphics.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + A011E3A40F6574E400FAE48D /* SFML-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SFML-Info.plist"; sourceTree = ""; }; + A011E3DE0F65776B00FAE48D /* Sleep.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Sleep.cpp; path = ../src/SFML/System/Sleep.cpp; sourceTree = SOURCE_ROOT; }; + A011E3DF0F65776B00FAE48D /* Thread.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Thread.cpp; path = ../src/SFML/System/Thread.cpp; sourceTree = SOURCE_ROOT; }; + A011E3E00F65776B00FAE48D /* Randomizer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Randomizer.cpp; path = ../src/SFML/System/Randomizer.cpp; sourceTree = SOURCE_ROOT; }; + A011E3E10F65776B00FAE48D /* Clock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Clock.cpp; path = ../src/SFML/System/Clock.cpp; sourceTree = SOURCE_ROOT; }; + A011E3E20F65776B00FAE48D /* Mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Mutex.cpp; path = ../src/SFML/System/Mutex.cpp; sourceTree = SOURCE_ROOT; }; + A011E3EA0F65777800FAE48D /* Ftp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Ftp.cpp; path = ../src/SFML/Network/Ftp.cpp; sourceTree = SOURCE_ROOT; }; + A011E3EB0F65777800FAE48D /* Http.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Http.cpp; path = ../src/SFML/Network/Http.cpp; sourceTree = SOURCE_ROOT; }; + A011E3EC0F65777800FAE48D /* IPAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = IPAddress.cpp; path = ../src/SFML/Network/IPAddress.cpp; sourceTree = SOURCE_ROOT; }; + A011E3ED0F65777800FAE48D /* Packet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Packet.cpp; path = ../src/SFML/Network/Packet.cpp; sourceTree = SOURCE_ROOT; }; + A011E3EE0F65777800FAE48D /* Selector.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Selector.cpp; path = ../src/SFML/Network/Selector.cpp; sourceTree = SOURCE_ROOT; }; + A011E3EF0F65777800FAE48D /* SocketTCP.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SocketTCP.cpp; path = ../src/SFML/Network/SocketTCP.cpp; sourceTree = SOURCE_ROOT; }; + A011E3F00F65777800FAE48D /* SocketUDP.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SocketUDP.cpp; path = ../src/SFML/Network/SocketUDP.cpp; sourceTree = SOURCE_ROOT; }; + A011E3F80F65778600FAE48D /* Listener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Listener.cpp; path = ../src/SFML/Audio/Listener.cpp; sourceTree = SOURCE_ROOT; }; + A011E3F90F65778600FAE48D /* Music.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Music.cpp; path = ../src/SFML/Audio/Music.cpp; sourceTree = SOURCE_ROOT; }; + A011E3FA0F65778600FAE48D /* Sound.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Sound.cpp; path = ../src/SFML/Audio/Sound.cpp; sourceTree = SOURCE_ROOT; }; + A011E3FB0F65778600FAE48D /* SoundBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SoundBuffer.cpp; path = ../src/SFML/Audio/SoundBuffer.cpp; sourceTree = SOURCE_ROOT; }; + A011E3FC0F65778600FAE48D /* SoundBufferRecorder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SoundBufferRecorder.cpp; path = ../src/SFML/Audio/SoundBufferRecorder.cpp; sourceTree = SOURCE_ROOT; }; + A011E3FD0F65778600FAE48D /* SoundRecorder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SoundRecorder.cpp; path = ../src/SFML/Audio/SoundRecorder.cpp; sourceTree = SOURCE_ROOT; }; + A011E3FE0F65778600FAE48D /* SoundStream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SoundStream.cpp; path = ../src/SFML/Audio/SoundStream.cpp; sourceTree = SOURCE_ROOT; }; + A011E4060F65779900FAE48D /* Context.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Context.cpp; path = ../src/SFML/Window/Context.cpp; sourceTree = SOURCE_ROOT; }; + A011E4070F65779900FAE48D /* Input.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Input.cpp; path = ../src/SFML/Window/Input.cpp; sourceTree = SOURCE_ROOT; }; + A011E4080F65779900FAE48D /* VideoMode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = VideoMode.cpp; path = ../src/SFML/Window/VideoMode.cpp; sourceTree = SOURCE_ROOT; }; + A011E4090F65779900FAE48D /* Window.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Window.cpp; path = ../src/SFML/Window/Window.cpp; sourceTree = SOURCE_ROOT; }; + A011E40E0F6577A500FAE48D /* Color.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Color.cpp; path = ../src/SFML/Graphics/Color.cpp; sourceTree = SOURCE_ROOT; }; + A011E40F0F6577A500FAE48D /* Font.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Font.cpp; path = ../src/SFML/Graphics/Font.cpp; sourceTree = SOURCE_ROOT; }; + A011E4100F6577A500FAE48D /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Image.cpp; path = ../src/SFML/Graphics/Image.cpp; sourceTree = SOURCE_ROOT; }; + A011E4110F6577A500FAE48D /* PostFX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PostFX.cpp; path = ../src/SFML/Graphics/PostFX.cpp; sourceTree = SOURCE_ROOT; }; + A011E4120F6577A500FAE48D /* Rect.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Rect.cpp; path = ../src/SFML/Graphics/Rect.cpp; sourceTree = SOURCE_ROOT; }; + A011E4130F6577A500FAE48D /* RenderWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = RenderWindow.cpp; path = ../src/SFML/Graphics/RenderWindow.cpp; sourceTree = SOURCE_ROOT; }; + A011E4140F6577A500FAE48D /* Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Shape.cpp; path = ../src/SFML/Graphics/Shape.cpp; sourceTree = SOURCE_ROOT; }; + A011E4150F6577A500FAE48D /* Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Sprite.cpp; path = ../src/SFML/Graphics/Sprite.cpp; sourceTree = SOURCE_ROOT; }; + A011E4160F6577A500FAE48D /* String.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = String.cpp; path = ../src/SFML/Graphics/String.cpp; sourceTree = SOURCE_ROOT; }; + A011E4170F6577A500FAE48D /* View.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = View.cpp; path = ../src/SFML/Graphics/View.cpp; sourceTree = SOURCE_ROOT; }; + A011E4250F65780E00FAE48D /* Clock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Clock.cpp; sourceTree = ""; }; + A011E4260F65780E00FAE48D /* Initializer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Initializer.cpp; sourceTree = ""; }; + A011E4270F65780E00FAE48D /* Lock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Lock.cpp; sourceTree = ""; }; + A011E4290F65780E00FAE48D /* Platform.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = Platform.hpp; sourceTree = ""; }; + A011E42A0F65780E00FAE48D /* Randomizer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Randomizer.cpp; sourceTree = ""; }; + A011E42B0F65780E00FAE48D /* Sleep.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Sleep.cpp; sourceTree = ""; }; + A011E42C0F65780E00FAE48D /* Unicode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Unicode.cpp; sourceTree = ""; }; + A011E42E0F65780E00FAE48D /* Mutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Mutex.cpp; sourceTree = ""; }; + A011E42F0F65780E00FAE48D /* Platform.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Platform.cpp; sourceTree = ""; }; + A011E4300F65780E00FAE48D /* Platform.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = Platform.hpp; sourceTree = ""; }; + A011E4310F65780E00FAE48D /* Thread.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Thread.cpp; sourceTree = ""; }; + A011E4480F65782800FAE48D /* Ftp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Ftp.cpp; sourceTree = ""; }; + A011E4490F65782800FAE48D /* Http.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Http.cpp; sourceTree = ""; }; + A011E44A0F65782800FAE48D /* IPAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IPAddress.cpp; sourceTree = ""; }; + A011E44C0F65782800FAE48D /* Packet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Packet.cpp; sourceTree = ""; }; + A011E44D0F65782800FAE48D /* SelectorBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SelectorBase.cpp; sourceTree = ""; }; + A011E44E0F65782800FAE48D /* SocketTCP.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SocketTCP.cpp; sourceTree = ""; }; + A011E44F0F65782800FAE48D /* SocketUDP.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SocketUDP.cpp; sourceTree = ""; }; + A011E4510F65782800FAE48D /* SocketHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SocketHelper.cpp; sourceTree = ""; }; + A011E45F0F65783900FAE48D /* AudioDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AudioDevice.cpp; sourceTree = ""; }; + A011E4600F65783900FAE48D /* AudioDevice.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = AudioDevice.hpp; sourceTree = ""; }; + A011E4610F65783900FAE48D /* AudioResource.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AudioResource.cpp; sourceTree = ""; }; + A011E4620F65783900FAE48D /* Listener.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Listener.cpp; sourceTree = ""; }; + A011E4640F65783900FAE48D /* Music.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Music.cpp; sourceTree = ""; }; + A011E4650F65783900FAE48D /* OpenAL.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = OpenAL.hpp; sourceTree = ""; }; + A011E4660F65783900FAE48D /* Sound.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Sound.cpp; sourceTree = ""; }; + A011E4670F65783900FAE48D /* SoundBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SoundBuffer.cpp; sourceTree = ""; }; + A011E4680F65783900FAE48D /* SoundBufferRecorder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SoundBufferRecorder.cpp; sourceTree = ""; }; + A011E4690F65783900FAE48D /* SoundFile.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SoundFile.cpp; sourceTree = ""; }; + A011E46A0F65783900FAE48D /* SoundFile.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = SoundFile.hpp; sourceTree = ""; }; + A011E46B0F65783900FAE48D /* SoundFileDefault.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SoundFileDefault.cpp; sourceTree = ""; }; + A011E46C0F65783900FAE48D /* SoundFileDefault.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = SoundFileDefault.hpp; sourceTree = ""; }; + A011E46D0F65783900FAE48D /* SoundFileOgg.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SoundFileOgg.cpp; sourceTree = ""; }; + A011E46E0F65783900FAE48D /* SoundFileOgg.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = SoundFileOgg.hpp; sourceTree = ""; }; + A011E46F0F65783900FAE48D /* SoundRecorder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SoundRecorder.cpp; sourceTree = ""; }; + A011E4700F65783900FAE48D /* SoundStream.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SoundStream.cpp; sourceTree = ""; }; + A011E4720F65783900FAE48D /* stb_vorbis.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = stb_vorbis.c; sourceTree = ""; }; + A011E4730F65783900FAE48D /* stb_vorbis.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stb_vorbis.h; sourceTree = ""; }; + A011E48A0F65784E00FAE48D /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = ""; }; + A011E48B0F65784E00FAE48D /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = ""; }; + A011E48C0F65784E00FAE48D /* GLKit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GLKit.h; sourceTree = ""; }; + A011E48D0F65784E00FAE48D /* GLKit.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = GLKit.mm; sourceTree = ""; }; + A011E48E0F65784E00FAE48D /* Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Joystick.cpp; sourceTree = ""; }; + A011E48F0F65784E00FAE48D /* Joystick.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = Joystick.hpp; sourceTree = ""; }; + A011E4900F65784E00FAE48D /* VideoModeSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = VideoModeSupport.cpp; sourceTree = ""; }; + A011E4910F65784E00FAE48D /* VideoModeSupport.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = VideoModeSupport.hpp; sourceTree = ""; }; + A011E4940F65784E00FAE48D /* WindowImplCocoa.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = WindowImplCocoa.hpp; sourceTree = ""; }; + A011E4950F65784E00FAE48D /* WindowImplCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WindowImplCocoa.mm; sourceTree = ""; }; + A011E4960F65784E00FAE48D /* Context.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Context.cpp; sourceTree = ""; }; + A011E4980F65784E00FAE48D /* glext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = glext.h; sourceTree = ""; }; + A011E4990F65784E00FAE48D /* glxext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = glxext.h; sourceTree = ""; }; + A011E49A0F65784E00FAE48D /* wglext.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wglext.h; sourceTree = ""; }; + A011E49B0F65784E00FAE48D /* Input.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Input.cpp; sourceTree = ""; }; + A011E49C0F65784E00FAE48D /* Joystick.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = Joystick.hpp; sourceTree = ""; }; + A011E4AC0F65784E00FAE48D /* VideoMode.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = VideoMode.cpp; sourceTree = ""; }; + A011E4AD0F65784E00FAE48D /* VideoModeSupport.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = VideoModeSupport.hpp; sourceTree = ""; }; + A011E4B50F65784E00FAE48D /* Window.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Window.cpp; sourceTree = ""; }; + A011E4B60F65784E00FAE48D /* WindowImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = WindowImpl.cpp; sourceTree = ""; }; + A011E4B70F65784E00FAE48D /* WindowImpl.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = WindowImpl.hpp; sourceTree = ""; }; + A011E4E30F65786600FAE48D /* Arial.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = Arial.hpp; sourceTree = ""; }; + A011E4E40F65786600FAE48D /* Color.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Color.cpp; sourceTree = ""; }; + A011E4E50F65786600FAE48D /* Drawable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Drawable.cpp; sourceTree = ""; }; + A011E4E60F65786600FAE48D /* Font.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Font.cpp; sourceTree = ""; }; + A011E4E70F65786600FAE48D /* FontLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FontLoader.cpp; sourceTree = ""; }; + A011E4E80F65786600FAE48D /* FontLoader.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = FontLoader.hpp; sourceTree = ""; }; + A011E4EA0F65786600FAE48D /* glew.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = glew.c; sourceTree = ""; }; + A011E4EB0F65786600FAE48D /* glew.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = glew.h; sourceTree = ""; }; + A011E4EC0F65786600FAE48D /* glxew.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = glxew.h; sourceTree = ""; }; + A011E4ED0F65786600FAE48D /* wglew.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = wglew.h; sourceTree = ""; }; + A011E4EE0F65786600FAE48D /* GraphicsContext.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContext.cpp; sourceTree = ""; }; + A011E4EF0F65786600FAE48D /* GraphicsContext.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = GraphicsContext.hpp; sourceTree = ""; }; + A011E4F00F65786600FAE48D /* Image.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Image.cpp; sourceTree = ""; }; + A011E4F10F65786600FAE48D /* ImageLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ImageLoader.cpp; sourceTree = ""; }; + A011E4F20F65786600FAE48D /* ImageLoader.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; path = ImageLoader.hpp; sourceTree = ""; }; + A011E4F40F65786600FAE48D /* cderror.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cderror.h; sourceTree = ""; }; + A011E4F50F65786600FAE48D /* jcapimin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcapimin.c; sourceTree = ""; }; + A011E4F60F65786600FAE48D /* jcapistd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcapistd.c; sourceTree = ""; }; + A011E4F70F65786600FAE48D /* jccoefct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jccoefct.c; sourceTree = ""; }; + A011E4F80F65786600FAE48D /* jccolor.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jccolor.c; sourceTree = ""; }; + A011E4F90F65786600FAE48D /* jcdctmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcdctmgr.c; sourceTree = ""; }; + A011E4FA0F65786600FAE48D /* jchuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jchuff.c; sourceTree = ""; }; + A011E4FB0F65786600FAE48D /* jchuff.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jchuff.h; sourceTree = ""; }; + A011E4FC0F65786600FAE48D /* jcinit.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcinit.c; sourceTree = ""; }; + A011E4FD0F65786600FAE48D /* jcmainct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmainct.c; sourceTree = ""; }; + A011E4FE0F65786600FAE48D /* jcmarker.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmarker.c; sourceTree = ""; }; + A011E4FF0F65786600FAE48D /* jcmaster.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcmaster.c; sourceTree = ""; }; + A011E5000F65786600FAE48D /* jcomapi.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcomapi.c; sourceTree = ""; }; + A011E5010F65786600FAE48D /* jconfig.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jconfig.h; sourceTree = ""; }; + A011E5020F65786600FAE48D /* jcparam.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcparam.c; sourceTree = ""; }; + A011E5030F65786600FAE48D /* jcphuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcphuff.c; sourceTree = ""; }; + A011E5040F65786600FAE48D /* jcprepct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcprepct.c; sourceTree = ""; }; + A011E5050F65786600FAE48D /* jcsample.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jcsample.c; sourceTree = ""; }; + A011E5060F65786600FAE48D /* jctrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jctrans.c; sourceTree = ""; }; + A011E5070F65786600FAE48D /* jdapimin.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdapimin.c; sourceTree = ""; }; + A011E5080F65786600FAE48D /* jdapistd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdapistd.c; sourceTree = ""; }; + A011E5090F65786600FAE48D /* jdatadst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdatadst.c; sourceTree = ""; }; + A011E50A0F65786600FAE48D /* jdatasrc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdatasrc.c; sourceTree = ""; }; + A011E50B0F65786600FAE48D /* jdcoefct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdcoefct.c; sourceTree = ""; }; + A011E50C0F65786600FAE48D /* jdcolor.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdcolor.c; sourceTree = ""; }; + A011E50D0F65786600FAE48D /* jdct.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jdct.h; sourceTree = ""; }; + A011E50E0F65786600FAE48D /* jddctmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jddctmgr.c; sourceTree = ""; }; + A011E50F0F65786600FAE48D /* jdhuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdhuff.c; sourceTree = ""; }; + A011E5100F65786600FAE48D /* jdhuff.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jdhuff.h; sourceTree = ""; }; + A011E5110F65786600FAE48D /* jdinput.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdinput.c; sourceTree = ""; }; + A011E5120F65786600FAE48D /* jdmainct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmainct.c; sourceTree = ""; }; + A011E5130F65786600FAE48D /* jdmarker.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmarker.c; sourceTree = ""; }; + A011E5140F65786600FAE48D /* jdmaster.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmaster.c; sourceTree = ""; }; + A011E5150F65786600FAE48D /* jdmerge.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdmerge.c; sourceTree = ""; }; + A011E5160F65786600FAE48D /* jdphuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdphuff.c; sourceTree = ""; }; + A011E5170F65786600FAE48D /* jdpostct.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdpostct.c; sourceTree = ""; }; + A011E5180F65786600FAE48D /* jdsample.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdsample.c; sourceTree = ""; }; + A011E5190F65786600FAE48D /* jdtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jdtrans.c; sourceTree = ""; }; + A011E51A0F65786600FAE48D /* jerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jerror.c; sourceTree = ""; }; + A011E51B0F65786600FAE48D /* jerror.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jerror.h; sourceTree = ""; }; + A011E51C0F65786600FAE48D /* jfdctflt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctflt.c; sourceTree = ""; }; + A011E51D0F65786600FAE48D /* jfdctfst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctfst.c; sourceTree = ""; }; + A011E51E0F65786600FAE48D /* jfdctint.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jfdctint.c; sourceTree = ""; }; + A011E51F0F65786600FAE48D /* jidctflt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctflt.c; sourceTree = ""; }; + A011E5200F65786600FAE48D /* jidctfst.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctfst.c; sourceTree = ""; }; + A011E5210F65786600FAE48D /* jidctint.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctint.c; sourceTree = ""; }; + A011E5220F65786600FAE48D /* jidctred.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jidctred.c; sourceTree = ""; }; + A011E5230F65786600FAE48D /* jinclude.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jinclude.h; sourceTree = ""; }; + A011E5240F65786600FAE48D /* jmemmgr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jmemmgr.c; sourceTree = ""; }; + A011E5250F65786600FAE48D /* jmemnobs.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jmemnobs.c; sourceTree = ""; }; + A011E5260F65786600FAE48D /* jmemsys.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jmemsys.h; sourceTree = ""; }; + A011E5270F65786600FAE48D /* jmorecfg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jmorecfg.h; sourceTree = ""; }; + A011E5280F65786600FAE48D /* jpegint.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jpegint.h; sourceTree = ""; }; + A011E5290F65786600FAE48D /* jpeglib.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jpeglib.h; sourceTree = ""; }; + A011E52A0F65786600FAE48D /* jquant1.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jquant1.c; sourceTree = ""; }; + A011E52B0F65786600FAE48D /* jquant2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jquant2.c; sourceTree = ""; }; + A011E52C0F65786600FAE48D /* jutils.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = jutils.c; sourceTree = ""; }; + A011E52D0F65786600FAE48D /* jversion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = jversion.h; sourceTree = ""; }; + A011E52F0F65786600FAE48D /* png.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = png.c; sourceTree = ""; }; + A011E5300F65786600FAE48D /* png.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = png.h; sourceTree = ""; }; + A011E5310F65786600FAE48D /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = pngconf.h; sourceTree = ""; }; + A011E5320F65786600FAE48D /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngerror.c; sourceTree = ""; }; + A011E5330F65786600FAE48D /* pnggccrd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pnggccrd.c; sourceTree = ""; }; + A011E5340F65786600FAE48D /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngget.c; sourceTree = ""; }; + A011E5350F65786600FAE48D /* pngmem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngmem.c; sourceTree = ""; }; + A011E5360F65786600FAE48D /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngpread.c; sourceTree = ""; }; + A011E5370F65786600FAE48D /* pngread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngread.c; sourceTree = ""; }; + A011E5380F65786600FAE48D /* pngrio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngrio.c; sourceTree = ""; }; + A011E5390F65786600FAE48D /* pngrtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngrtran.c; sourceTree = ""; }; + A011E53A0F65786600FAE48D /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngrutil.c; sourceTree = ""; }; + A011E53B0F65786600FAE48D /* pngset.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngset.c; sourceTree = ""; }; + A011E53C0F65786600FAE48D /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngtrans.c; sourceTree = ""; }; + A011E53D0F65786600FAE48D /* pngvcrd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngvcrd.c; sourceTree = ""; }; + A011E53E0F65786600FAE48D /* pngwio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngwio.c; sourceTree = ""; }; + A011E53F0F65786600FAE48D /* pngwrite.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngwrite.c; sourceTree = ""; }; + A011E5400F65786600FAE48D /* pngwtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngwtran.c; sourceTree = ""; }; + A011E5410F65786600FAE48D /* pngwutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = pngwutil.c; sourceTree = ""; }; + A011E5430F65786600FAE48D /* Matrix3.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Matrix3.cpp; sourceTree = ""; }; + A011E5440F65786600FAE48D /* PostFX.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PostFX.cpp; sourceTree = ""; }; + A011E5450F65786600FAE48D /* RenderTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTarget.cpp; sourceTree = ""; }; + A011E5460F65786600FAE48D /* RenderWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = RenderWindow.cpp; sourceTree = ""; }; + A011E5470F65786600FAE48D /* Shape.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Shape.cpp; sourceTree = ""; }; + A011E5490F65786600FAE48D /* image_DXT.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = image_DXT.c; sourceTree = ""; }; + A011E54A0F65786600FAE48D /* image_DXT.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = image_DXT.h; sourceTree = ""; }; + A011E54B0F65786600FAE48D /* SOIL.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = SOIL.c; sourceTree = ""; }; + A011E54C0F65786600FAE48D /* SOIL.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SOIL.h; sourceTree = ""; }; + A011E54D0F65786600FAE48D /* stb_image_aug.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = stb_image_aug.c; sourceTree = ""; }; + A011E54E0F65786600FAE48D /* stb_image_aug.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stb_image_aug.h; sourceTree = ""; }; + A011E54F0F65786600FAE48D /* stbi_DDS_aug.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stbi_DDS_aug.h; sourceTree = ""; }; + A011E5500F65786600FAE48D /* stbi_DDS_aug_c.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = stbi_DDS_aug_c.h; sourceTree = ""; }; + A011E5510F65786600FAE48D /* Sprite.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Sprite.cpp; sourceTree = ""; }; + A011E5520F65786600FAE48D /* String.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = String.cpp; sourceTree = ""; }; + A011E5530F65786600FAE48D /* View.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = View.cpp; sourceTree = ""; }; + A011E5550F65786600FAE48D /* adler32.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = adler32.c; sourceTree = ""; }; + A011E5560F65786600FAE48D /* compress.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = compress.c; sourceTree = ""; }; + A011E5570F65786600FAE48D /* crc32.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = crc32.c; sourceTree = ""; }; + A011E5580F65786600FAE48D /* crc32.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = crc32.h; sourceTree = ""; }; + A011E5590F65786600FAE48D /* deflate.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = deflate.c; sourceTree = ""; }; + A011E55A0F65786600FAE48D /* deflate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = deflate.h; sourceTree = ""; }; + A011E55B0F65786600FAE48D /* inffast.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = inffast.c; sourceTree = ""; }; + A011E55C0F65786600FAE48D /* inffast.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = inffast.h; sourceTree = ""; }; + A011E55D0F65786600FAE48D /* inffixed.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = inffixed.h; sourceTree = ""; }; + A011E55E0F65786600FAE48D /* inflate.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = inflate.c; sourceTree = ""; }; + A011E55F0F65786600FAE48D /* inflate.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = inflate.h; sourceTree = ""; }; + A011E5600F65786600FAE48D /* inftrees.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = inftrees.c; sourceTree = ""; }; + A011E5610F65786600FAE48D /* inftrees.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = inftrees.h; sourceTree = ""; }; + A011E5620F65786600FAE48D /* trees.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = trees.c; sourceTree = ""; }; + A011E5630F65786600FAE48D /* trees.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = trees.h; sourceTree = ""; }; + A011E5640F65786600FAE48D /* uncompr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = uncompr.c; sourceTree = ""; }; + A011E5650F65786600FAE48D /* zconf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = zconf.h; sourceTree = ""; }; + A011E5660F65786600FAE48D /* zlib.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = zlib.h; sourceTree = ""; }; + A011E5670F65786600FAE48D /* zutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = zutil.c; sourceTree = ""; }; + A011E5680F65786600FAE48D /* zutil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = zutil.h; sourceTree = ""; }; + A01BEF360F6BF2490095262C /* sndfile.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = sndfile.framework; path = "../../extlibs/libs-xcode/sndfile.framework"; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + A011E3700F65749300FAE48D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E37B0F65749F00FAE48D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E3840F6574AC00FAE48D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E5FB0F65791B00FAE48D /* libcsfml-system.dylib in Frameworks */, + A01BEF370F6BF2490095262C /* sndfile.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E38D0F6574B500FAE48D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E6060F65797100FAE48D /* libcsfml-system.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E3960F6574BE00FAE48D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E6140F6579CA00FAE48D /* libcsfml-window.dylib in Frameworks */, + A011E6170F6579D100FAE48D /* libcsfml-system.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + A011E3550F65738800FAE48D = { + isa = PBXGroup; + children = ( + A011E3C10F6575B300FAE48D /* SFML */, + A011E3C80F6575D800FAE48D /* csfml-system */, + A011E3C70F6575D000FAE48D /* csfml-network */, + A011E3C40F6575C100FAE48D /* csfml-audio */, + A011E3C30F6575BC00FAE48D /* csfml-window */, + A011E3C20F6575B700FAE48D /* csfml-graphics */, + A011E3730F65749300FAE48D /* Products */, + A011E3A40F6574E400FAE48D /* SFML-Info.plist */, + ); + sourceTree = ""; + }; + A011E3730F65749300FAE48D /* Products */ = { + isa = PBXGroup; + children = ( + A011E3720F65749300FAE48D /* libcsfml-system.dylib */, + A011E37D0F65749F00FAE48D /* libcsfml-network.dylib */, + A011E3860F6574AC00FAE48D /* libcsfml-audio.dylib */, + A011E38F0F6574B500FAE48D /* libcsfml-window.dylib */, + A011E3980F6574BE00FAE48D /* libcsfml-graphics.dylib */, + ); + name = Products; + sourceTree = ""; + }; + A011E3C10F6575B300FAE48D /* SFML */ = { + isa = PBXGroup; + children = ( + ); + name = SFML; + sourceTree = ""; + }; + A011E3C20F6575B700FAE48D /* csfml-graphics */ = { + isa = PBXGroup; + children = ( + A011E4E20F65786600FAE48D /* Graphics */, + A011E40E0F6577A500FAE48D /* Color.cpp */, + A011E40F0F6577A500FAE48D /* Font.cpp */, + A011E4100F6577A500FAE48D /* Image.cpp */, + A011E4110F6577A500FAE48D /* PostFX.cpp */, + A011E4120F6577A500FAE48D /* Rect.cpp */, + A011E4130F6577A500FAE48D /* RenderWindow.cpp */, + A011E4140F6577A500FAE48D /* Shape.cpp */, + A011E4150F6577A500FAE48D /* Sprite.cpp */, + A011E4160F6577A500FAE48D /* String.cpp */, + A011E4170F6577A500FAE48D /* View.cpp */, + ); + name = "csfml-graphics"; + sourceTree = ""; + }; + A011E3C30F6575BC00FAE48D /* csfml-window */ = { + isa = PBXGroup; + children = ( + A011E4880F65784E00FAE48D /* Window */, + A011E4060F65779900FAE48D /* Context.cpp */, + A011E4070F65779900FAE48D /* Input.cpp */, + A011E4080F65779900FAE48D /* VideoMode.cpp */, + A011E4090F65779900FAE48D /* Window.cpp */, + ); + name = "csfml-window"; + sourceTree = ""; + }; + A011E3C40F6575C100FAE48D /* csfml-audio */ = { + isa = PBXGroup; + children = ( + A01BEF360F6BF2490095262C /* sndfile.framework */, + A011E45E0F65783900FAE48D /* Audio */, + A011E3F80F65778600FAE48D /* Listener.cpp */, + A011E3F90F65778600FAE48D /* Music.cpp */, + A011E3FA0F65778600FAE48D /* Sound.cpp */, + A011E3FB0F65778600FAE48D /* SoundBuffer.cpp */, + A011E3FC0F65778600FAE48D /* SoundBufferRecorder.cpp */, + A011E3FD0F65778600FAE48D /* SoundRecorder.cpp */, + A011E3FE0F65778600FAE48D /* SoundStream.cpp */, + ); + name = "csfml-audio"; + sourceTree = ""; + }; + A011E3C70F6575D000FAE48D /* csfml-network */ = { + isa = PBXGroup; + children = ( + A011E4470F65782800FAE48D /* Network */, + A011E3EA0F65777800FAE48D /* Ftp.cpp */, + A011E3EB0F65777800FAE48D /* Http.cpp */, + A011E3EC0F65777800FAE48D /* IPAddress.cpp */, + A011E3ED0F65777800FAE48D /* Packet.cpp */, + A011E3EE0F65777800FAE48D /* Selector.cpp */, + A011E3EF0F65777800FAE48D /* SocketTCP.cpp */, + A011E3F00F65777800FAE48D /* SocketUDP.cpp */, + ); + name = "csfml-network"; + sourceTree = ""; + }; + A011E3C80F6575D800FAE48D /* csfml-system */ = { + isa = PBXGroup; + children = ( + A011E4240F65780E00FAE48D /* System */, + A011E3DE0F65776B00FAE48D /* Sleep.cpp */, + A011E3DF0F65776B00FAE48D /* Thread.cpp */, + A011E3E00F65776B00FAE48D /* Randomizer.cpp */, + A011E3E10F65776B00FAE48D /* Clock.cpp */, + A011E3E20F65776B00FAE48D /* Mutex.cpp */, + ); + name = "csfml-system"; + sourceTree = ""; + }; + A011E4240F65780E00FAE48D /* System */ = { + isa = PBXGroup; + children = ( + A011E4250F65780E00FAE48D /* Clock.cpp */, + A011E4260F65780E00FAE48D /* Initializer.cpp */, + A011E4270F65780E00FAE48D /* Lock.cpp */, + A011E4290F65780E00FAE48D /* Platform.hpp */, + A011E42A0F65780E00FAE48D /* Randomizer.cpp */, + A011E42B0F65780E00FAE48D /* Sleep.cpp */, + A011E42C0F65780E00FAE48D /* Unicode.cpp */, + A011E42D0F65780E00FAE48D /* Unix */, + ); + name = System; + path = ../../src/SFML/System; + sourceTree = SOURCE_ROOT; + }; + A011E42D0F65780E00FAE48D /* Unix */ = { + isa = PBXGroup; + children = ( + A011E42E0F65780E00FAE48D /* Mutex.cpp */, + A011E42F0F65780E00FAE48D /* Platform.cpp */, + A011E4300F65780E00FAE48D /* Platform.hpp */, + A011E4310F65780E00FAE48D /* Thread.cpp */, + ); + path = Unix; + sourceTree = ""; + }; + A011E4470F65782800FAE48D /* Network */ = { + isa = PBXGroup; + children = ( + A011E4480F65782800FAE48D /* Ftp.cpp */, + A011E4490F65782800FAE48D /* Http.cpp */, + A011E44A0F65782800FAE48D /* IPAddress.cpp */, + A011E44C0F65782800FAE48D /* Packet.cpp */, + A011E44D0F65782800FAE48D /* SelectorBase.cpp */, + A011E44E0F65782800FAE48D /* SocketTCP.cpp */, + A011E44F0F65782800FAE48D /* SocketUDP.cpp */, + A011E4500F65782800FAE48D /* Unix */, + ); + name = Network; + path = ../../src/SFML/Network; + sourceTree = SOURCE_ROOT; + }; + A011E4500F65782800FAE48D /* Unix */ = { + isa = PBXGroup; + children = ( + A011E4510F65782800FAE48D /* SocketHelper.cpp */, + ); + path = Unix; + sourceTree = ""; + }; + A011E45E0F65783900FAE48D /* Audio */ = { + isa = PBXGroup; + children = ( + A011E45F0F65783900FAE48D /* AudioDevice.cpp */, + A011E4600F65783900FAE48D /* AudioDevice.hpp */, + A011E4610F65783900FAE48D /* AudioResource.cpp */, + A011E4620F65783900FAE48D /* Listener.cpp */, + A011E4640F65783900FAE48D /* Music.cpp */, + A011E4650F65783900FAE48D /* OpenAL.hpp */, + A011E4660F65783900FAE48D /* Sound.cpp */, + A011E4670F65783900FAE48D /* SoundBuffer.cpp */, + A011E4680F65783900FAE48D /* SoundBufferRecorder.cpp */, + A011E4690F65783900FAE48D /* SoundFile.cpp */, + A011E46A0F65783900FAE48D /* SoundFile.hpp */, + A011E46B0F65783900FAE48D /* SoundFileDefault.cpp */, + A011E46C0F65783900FAE48D /* SoundFileDefault.hpp */, + A011E46D0F65783900FAE48D /* SoundFileOgg.cpp */, + A011E46E0F65783900FAE48D /* SoundFileOgg.hpp */, + A011E46F0F65783900FAE48D /* SoundRecorder.cpp */, + A011E4700F65783900FAE48D /* SoundStream.cpp */, + A011E4710F65783900FAE48D /* stb_vorbis */, + ); + name = Audio; + path = ../../src/SFML/Audio; + sourceTree = SOURCE_ROOT; + }; + A011E4710F65783900FAE48D /* stb_vorbis */ = { + isa = PBXGroup; + children = ( + A011E4720F65783900FAE48D /* stb_vorbis.c */, + A011E4730F65783900FAE48D /* stb_vorbis.h */, + ); + path = stb_vorbis; + sourceTree = ""; + }; + A011E4880F65784E00FAE48D /* Window */ = { + isa = PBXGroup; + children = ( + A011E4890F65784E00FAE48D /* Cocoa */, + A011E4960F65784E00FAE48D /* Context.cpp */, + A011E4970F65784E00FAE48D /* glext */, + A011E49B0F65784E00FAE48D /* Input.cpp */, + A011E49C0F65784E00FAE48D /* Joystick.hpp */, + A011E4AC0F65784E00FAE48D /* VideoMode.cpp */, + A011E4AD0F65784E00FAE48D /* VideoModeSupport.hpp */, + A011E4B50F65784E00FAE48D /* Window.cpp */, + A011E4B60F65784E00FAE48D /* WindowImpl.cpp */, + A011E4B70F65784E00FAE48D /* WindowImpl.hpp */, + ); + name = Window; + path = ../../src/SFML/Window; + sourceTree = SOURCE_ROOT; + }; + A011E4890F65784E00FAE48D /* Cocoa */ = { + isa = PBXGroup; + children = ( + A011E48A0F65784E00FAE48D /* AppController.h */, + A011E48B0F65784E00FAE48D /* AppController.mm */, + A011E48C0F65784E00FAE48D /* GLKit.h */, + A011E48D0F65784E00FAE48D /* GLKit.mm */, + A011E48E0F65784E00FAE48D /* Joystick.cpp */, + A011E48F0F65784E00FAE48D /* Joystick.hpp */, + A011E4900F65784E00FAE48D /* VideoModeSupport.cpp */, + A011E4910F65784E00FAE48D /* VideoModeSupport.hpp */, + A011E4940F65784E00FAE48D /* WindowImplCocoa.hpp */, + A011E4950F65784E00FAE48D /* WindowImplCocoa.mm */, + ); + path = Cocoa; + sourceTree = ""; + }; + A011E4970F65784E00FAE48D /* glext */ = { + isa = PBXGroup; + children = ( + A011E4980F65784E00FAE48D /* glext.h */, + A011E4990F65784E00FAE48D /* glxext.h */, + A011E49A0F65784E00FAE48D /* wglext.h */, + ); + path = glext; + sourceTree = ""; + }; + A011E4E20F65786600FAE48D /* Graphics */ = { + isa = PBXGroup; + children = ( + A011E4E30F65786600FAE48D /* Arial.hpp */, + A011E4E40F65786600FAE48D /* Color.cpp */, + A011E4E50F65786600FAE48D /* Drawable.cpp */, + A011E4E60F65786600FAE48D /* Font.cpp */, + A011E4E70F65786600FAE48D /* FontLoader.cpp */, + A011E4E80F65786600FAE48D /* FontLoader.hpp */, + A011E4E90F65786600FAE48D /* GLEW */, + A011E4EE0F65786600FAE48D /* GraphicsContext.cpp */, + A011E4EF0F65786600FAE48D /* GraphicsContext.hpp */, + A011E4F00F65786600FAE48D /* Image.cpp */, + A011E4F10F65786600FAE48D /* ImageLoader.cpp */, + A011E4F20F65786600FAE48D /* ImageLoader.hpp */, + A011E4F30F65786600FAE48D /* libjpeg */, + A011E52E0F65786600FAE48D /* libpng */, + A011E5430F65786600FAE48D /* Matrix3.cpp */, + A011E5440F65786600FAE48D /* PostFX.cpp */, + A011E5450F65786600FAE48D /* RenderTarget.cpp */, + A011E5460F65786600FAE48D /* RenderWindow.cpp */, + A011E5470F65786600FAE48D /* Shape.cpp */, + A011E5480F65786600FAE48D /* SOIL */, + A011E5510F65786600FAE48D /* Sprite.cpp */, + A011E5520F65786600FAE48D /* String.cpp */, + A011E5530F65786600FAE48D /* View.cpp */, + A011E5540F65786600FAE48D /* zlib */, + ); + name = Graphics; + path = ../../src/SFML/Graphics; + sourceTree = SOURCE_ROOT; + }; + A011E4E90F65786600FAE48D /* GLEW */ = { + isa = PBXGroup; + children = ( + A011E4EA0F65786600FAE48D /* glew.c */, + A011E4EB0F65786600FAE48D /* glew.h */, + A011E4EC0F65786600FAE48D /* glxew.h */, + A011E4ED0F65786600FAE48D /* wglew.h */, + ); + path = GLEW; + sourceTree = ""; + }; + A011E4F30F65786600FAE48D /* libjpeg */ = { + isa = PBXGroup; + children = ( + A011E4F40F65786600FAE48D /* cderror.h */, + A011E4F50F65786600FAE48D /* jcapimin.c */, + A011E4F60F65786600FAE48D /* jcapistd.c */, + A011E4F70F65786600FAE48D /* jccoefct.c */, + A011E4F80F65786600FAE48D /* jccolor.c */, + A011E4F90F65786600FAE48D /* jcdctmgr.c */, + A011E4FA0F65786600FAE48D /* jchuff.c */, + A011E4FB0F65786600FAE48D /* jchuff.h */, + A011E4FC0F65786600FAE48D /* jcinit.c */, + A011E4FD0F65786600FAE48D /* jcmainct.c */, + A011E4FE0F65786600FAE48D /* jcmarker.c */, + A011E4FF0F65786600FAE48D /* jcmaster.c */, + A011E5000F65786600FAE48D /* jcomapi.c */, + A011E5010F65786600FAE48D /* jconfig.h */, + A011E5020F65786600FAE48D /* jcparam.c */, + A011E5030F65786600FAE48D /* jcphuff.c */, + A011E5040F65786600FAE48D /* jcprepct.c */, + A011E5050F65786600FAE48D /* jcsample.c */, + A011E5060F65786600FAE48D /* jctrans.c */, + A011E5070F65786600FAE48D /* jdapimin.c */, + A011E5080F65786600FAE48D /* jdapistd.c */, + A011E5090F65786600FAE48D /* jdatadst.c */, + A011E50A0F65786600FAE48D /* jdatasrc.c */, + A011E50B0F65786600FAE48D /* jdcoefct.c */, + A011E50C0F65786600FAE48D /* jdcolor.c */, + A011E50D0F65786600FAE48D /* jdct.h */, + A011E50E0F65786600FAE48D /* jddctmgr.c */, + A011E50F0F65786600FAE48D /* jdhuff.c */, + A011E5100F65786600FAE48D /* jdhuff.h */, + A011E5110F65786600FAE48D /* jdinput.c */, + A011E5120F65786600FAE48D /* jdmainct.c */, + A011E5130F65786600FAE48D /* jdmarker.c */, + A011E5140F65786600FAE48D /* jdmaster.c */, + A011E5150F65786600FAE48D /* jdmerge.c */, + A011E5160F65786600FAE48D /* jdphuff.c */, + A011E5170F65786600FAE48D /* jdpostct.c */, + A011E5180F65786600FAE48D /* jdsample.c */, + A011E5190F65786600FAE48D /* jdtrans.c */, + A011E51A0F65786600FAE48D /* jerror.c */, + A011E51B0F65786600FAE48D /* jerror.h */, + A011E51C0F65786600FAE48D /* jfdctflt.c */, + A011E51D0F65786600FAE48D /* jfdctfst.c */, + A011E51E0F65786600FAE48D /* jfdctint.c */, + A011E51F0F65786600FAE48D /* jidctflt.c */, + A011E5200F65786600FAE48D /* jidctfst.c */, + A011E5210F65786600FAE48D /* jidctint.c */, + A011E5220F65786600FAE48D /* jidctred.c */, + A011E5230F65786600FAE48D /* jinclude.h */, + A011E5240F65786600FAE48D /* jmemmgr.c */, + A011E5250F65786600FAE48D /* jmemnobs.c */, + A011E5260F65786600FAE48D /* jmemsys.h */, + A011E5270F65786600FAE48D /* jmorecfg.h */, + A011E5280F65786600FAE48D /* jpegint.h */, + A011E5290F65786600FAE48D /* jpeglib.h */, + A011E52A0F65786600FAE48D /* jquant1.c */, + A011E52B0F65786600FAE48D /* jquant2.c */, + A011E52C0F65786600FAE48D /* jutils.c */, + A011E52D0F65786600FAE48D /* jversion.h */, + ); + path = libjpeg; + sourceTree = ""; + }; + A011E52E0F65786600FAE48D /* libpng */ = { + isa = PBXGroup; + children = ( + A011E52F0F65786600FAE48D /* png.c */, + A011E5300F65786600FAE48D /* png.h */, + A011E5310F65786600FAE48D /* pngconf.h */, + A011E5320F65786600FAE48D /* pngerror.c */, + A011E5330F65786600FAE48D /* pnggccrd.c */, + A011E5340F65786600FAE48D /* pngget.c */, + A011E5350F65786600FAE48D /* pngmem.c */, + A011E5360F65786600FAE48D /* pngpread.c */, + A011E5370F65786600FAE48D /* pngread.c */, + A011E5380F65786600FAE48D /* pngrio.c */, + A011E5390F65786600FAE48D /* pngrtran.c */, + A011E53A0F65786600FAE48D /* pngrutil.c */, + A011E53B0F65786600FAE48D /* pngset.c */, + A011E53C0F65786600FAE48D /* pngtrans.c */, + A011E53D0F65786600FAE48D /* pngvcrd.c */, + A011E53E0F65786600FAE48D /* pngwio.c */, + A011E53F0F65786600FAE48D /* pngwrite.c */, + A011E5400F65786600FAE48D /* pngwtran.c */, + A011E5410F65786600FAE48D /* pngwutil.c */, + ); + path = libpng; + sourceTree = ""; + }; + A011E5480F65786600FAE48D /* SOIL */ = { + isa = PBXGroup; + children = ( + A011E5490F65786600FAE48D /* image_DXT.c */, + A011E54A0F65786600FAE48D /* image_DXT.h */, + A011E54B0F65786600FAE48D /* SOIL.c */, + A011E54C0F65786600FAE48D /* SOIL.h */, + A011E54D0F65786600FAE48D /* stb_image_aug.c */, + A011E54E0F65786600FAE48D /* stb_image_aug.h */, + A011E54F0F65786600FAE48D /* stbi_DDS_aug.h */, + A011E5500F65786600FAE48D /* stbi_DDS_aug_c.h */, + ); + path = SOIL; + sourceTree = ""; + }; + A011E5540F65786600FAE48D /* zlib */ = { + isa = PBXGroup; + children = ( + A011E5550F65786600FAE48D /* adler32.c */, + A011E5560F65786600FAE48D /* compress.c */, + A011E5570F65786600FAE48D /* crc32.c */, + A011E5580F65786600FAE48D /* crc32.h */, + A011E5590F65786600FAE48D /* deflate.c */, + A011E55A0F65786600FAE48D /* deflate.h */, + A011E55B0F65786600FAE48D /* inffast.c */, + A011E55C0F65786600FAE48D /* inffast.h */, + A011E55D0F65786600FAE48D /* inffixed.h */, + A011E55E0F65786600FAE48D /* inflate.c */, + A011E55F0F65786600FAE48D /* inflate.h */, + A011E5600F65786600FAE48D /* inftrees.c */, + A011E5610F65786600FAE48D /* inftrees.h */, + A011E5620F65786600FAE48D /* trees.c */, + A011E5630F65786600FAE48D /* trees.h */, + A011E5640F65786600FAE48D /* uncompr.c */, + A011E5650F65786600FAE48D /* zconf.h */, + A011E5660F65786600FAE48D /* zlib.h */, + A011E5670F65786600FAE48D /* zutil.c */, + A011E5680F65786600FAE48D /* zutil.h */, + ); + path = zlib; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + A011E36E0F65749300FAE48D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E43B0F65780E00FAE48D /* Platform.hpp in Headers */, + A011E4410F65780E00FAE48D /* Platform.hpp in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E3790F65749F00FAE48D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E3820F6574AC00FAE48D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E4750F65783900FAE48D /* AudioDevice.hpp in Headers */, + A011E47A0F65783900FAE48D /* OpenAL.hpp in Headers */, + A011E47F0F65783900FAE48D /* SoundFile.hpp in Headers */, + A011E4810F65783900FAE48D /* SoundFileDefault.hpp in Headers */, + A011E4830F65783900FAE48D /* SoundFileOgg.hpp in Headers */, + A011E4870F65783900FAE48D /* stb_vorbis.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E38B0F6574B500FAE48D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E4B80F65784E00FAE48D /* AppController.h in Headers */, + A011E4BA0F65784E00FAE48D /* GLKit.h in Headers */, + A011E4BD0F65784E00FAE48D /* Joystick.hpp in Headers */, + A011E4BF0F65784E00FAE48D /* VideoModeSupport.hpp in Headers */, + A011E4C20F65784E00FAE48D /* WindowImplCocoa.hpp in Headers */, + A011E4C50F65784E00FAE48D /* glext.h in Headers */, + A011E4C60F65784E00FAE48D /* glxext.h in Headers */, + A011E4C70F65784E00FAE48D /* wglext.h in Headers */, + A011E4C90F65784E00FAE48D /* Joystick.hpp in Headers */, + A011E4D80F65784E00FAE48D /* VideoModeSupport.hpp in Headers */, + A011E4E10F65784E00FAE48D /* WindowImpl.hpp in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E3940F6574BE00FAE48D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E5690F65786600FAE48D /* Arial.hpp in Headers */, + A011E56E0F65786600FAE48D /* FontLoader.hpp in Headers */, + A011E5700F65786600FAE48D /* glew.h in Headers */, + A011E5710F65786600FAE48D /* glxew.h in Headers */, + A011E5720F65786600FAE48D /* wglew.h in Headers */, + A011E5740F65786600FAE48D /* GraphicsContext.hpp in Headers */, + A011E5770F65786600FAE48D /* ImageLoader.hpp in Headers */, + A011E5780F65786600FAE48D /* cderror.h in Headers */, + A011E57F0F65786600FAE48D /* jchuff.h in Headers */, + A011E5850F65786600FAE48D /* jconfig.h in Headers */, + A011E5910F65786600FAE48D /* jdct.h in Headers */, + A011E5940F65786600FAE48D /* jdhuff.h in Headers */, + A011E59F0F65786600FAE48D /* jerror.h in Headers */, + A011E5A70F65786600FAE48D /* jinclude.h in Headers */, + A011E5AA0F65786600FAE48D /* jmemsys.h in Headers */, + A011E5AB0F65786600FAE48D /* jmorecfg.h in Headers */, + A011E5AC0F65786600FAE48D /* jpegint.h in Headers */, + A011E5AD0F65786600FAE48D /* jpeglib.h in Headers */, + A011E5B10F65786600FAE48D /* jversion.h in Headers */, + A011E5B30F65786600FAE48D /* png.h in Headers */, + A011E5B40F65786600FAE48D /* pngconf.h in Headers */, + A011E5CC0F65786600FAE48D /* image_DXT.h in Headers */, + A011E5CE0F65786600FAE48D /* SOIL.h in Headers */, + A011E5D00F65786600FAE48D /* stb_image_aug.h in Headers */, + A011E5D10F65786600FAE48D /* stbi_DDS_aug.h in Headers */, + A011E5D20F65786600FAE48D /* stbi_DDS_aug_c.h in Headers */, + A011E5D90F65786600FAE48D /* crc32.h in Headers */, + A011E5DB0F65786600FAE48D /* deflate.h in Headers */, + A011E5DD0F65786600FAE48D /* inffast.h in Headers */, + A011E5DE0F65786600FAE48D /* inffixed.h in Headers */, + A011E5E00F65786600FAE48D /* inflate.h in Headers */, + A011E5E20F65786600FAE48D /* inftrees.h in Headers */, + A011E5E40F65786600FAE48D /* trees.h in Headers */, + A011E5E60F65786600FAE48D /* zconf.h in Headers */, + A011E5E70F65786600FAE48D /* zlib.h in Headers */, + A011E5E90F65786600FAE48D /* zutil.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + A011E3710F65749300FAE48D /* csfml-system */ = { + isa = PBXNativeTarget; + buildConfigurationList = A011E3760F65749400FAE48D /* Build configuration list for PBXNativeTarget "csfml-system" */; + buildPhases = ( + A011E36E0F65749300FAE48D /* Headers */, + A011E36F0F65749300FAE48D /* Sources */, + A011E3700F65749300FAE48D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "csfml-system"; + productName = "csfml-system"; + productReference = A011E3720F65749300FAE48D /* libcsfml-system.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + A011E37C0F65749F00FAE48D /* csfml-network */ = { + isa = PBXNativeTarget; + buildConfigurationList = A011E3A70F6574E400FAE48D /* Build configuration list for PBXNativeTarget "csfml-network" */; + buildPhases = ( + A011E3790F65749F00FAE48D /* Headers */, + A011E37A0F65749F00FAE48D /* Sources */, + A011E37B0F65749F00FAE48D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "csfml-network"; + productName = "csfml-network"; + productReference = A011E37D0F65749F00FAE48D /* libcsfml-network.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + A011E3850F6574AC00FAE48D /* csfml-audio */ = { + isa = PBXNativeTarget; + buildConfigurationList = A011E3A80F6574E400FAE48D /* Build configuration list for PBXNativeTarget "csfml-audio" */; + buildPhases = ( + A011E3820F6574AC00FAE48D /* Headers */, + A011E3830F6574AC00FAE48D /* Sources */, + A011E3840F6574AC00FAE48D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "csfml-audio"; + productName = "csfml-audio"; + productReference = A011E3860F6574AC00FAE48D /* libcsfml-audio.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + A011E38E0F6574B500FAE48D /* csfml-window */ = { + isa = PBXNativeTarget; + buildConfigurationList = A011E3A90F6574E400FAE48D /* Build configuration list for PBXNativeTarget "csfml-window" */; + buildPhases = ( + A011E38B0F6574B500FAE48D /* Headers */, + A011E38C0F6574B500FAE48D /* Sources */, + A011E38D0F6574B500FAE48D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "csfml-window"; + productName = "csfml-window"; + productReference = A011E38F0F6574B500FAE48D /* libcsfml-window.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; + A011E3970F6574BE00FAE48D /* csfml-graphics */ = { + isa = PBXNativeTarget; + buildConfigurationList = A011E3AA0F6574E400FAE48D /* Build configuration list for PBXNativeTarget "csfml-graphics" */; + buildPhases = ( + A011E3940F6574BE00FAE48D /* Headers */, + A011E3950F6574BE00FAE48D /* Sources */, + A011E3960F6574BE00FAE48D /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "csfml-graphics"; + productName = "csfml-graphics"; + productReference = A011E3980F6574BE00FAE48D /* libcsfml-graphics.dylib */; + productType = "com.apple.product-type.library.dynamic"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + A011E3570F65738800FAE48D /* Project object */ = { + isa = PBXProject; + buildConfigurationList = A011E35A0F65738800FAE48D /* Build configuration list for PBXProject "SFML-bare" */; + compatibilityVersion = "Xcode 2.4"; + hasScannedForEncodings = 0; + mainGroup = A011E3550F65738800FAE48D; + productRefGroup = A011E3730F65749300FAE48D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A011E39B0F6574D600FAE48D /* All */, + A011E3710F65749300FAE48D /* csfml-system */, + A011E37C0F65749F00FAE48D /* csfml-network */, + A011E3850F6574AC00FAE48D /* csfml-audio */, + A011E38E0F6574B500FAE48D /* csfml-window */, + A011E3970F6574BE00FAE48D /* csfml-graphics */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + A011E36F0F65749300FAE48D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E3E30F65776B00FAE48D /* Sleep.cpp in Sources */, + A011E3E40F65776B00FAE48D /* Thread.cpp in Sources */, + A011E3E50F65776B00FAE48D /* Randomizer.cpp in Sources */, + A011E3E60F65776B00FAE48D /* Clock.cpp in Sources */, + A011E3E70F65776B00FAE48D /* Mutex.cpp in Sources */, + A011E4370F65780E00FAE48D /* Clock.cpp in Sources */, + A011E4380F65780E00FAE48D /* Initializer.cpp in Sources */, + A011E4390F65780E00FAE48D /* Lock.cpp in Sources */, + A011E43C0F65780E00FAE48D /* Randomizer.cpp in Sources */, + A011E43D0F65780E00FAE48D /* Sleep.cpp in Sources */, + A011E43E0F65780E00FAE48D /* Unicode.cpp in Sources */, + A011E43F0F65780E00FAE48D /* Mutex.cpp in Sources */, + A011E4400F65780E00FAE48D /* Platform.cpp in Sources */, + A011E4420F65780E00FAE48D /* Thread.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E37A0F65749F00FAE48D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E3F10F65777800FAE48D /* Ftp.cpp in Sources */, + A011E3F20F65777800FAE48D /* Http.cpp in Sources */, + A011E3F30F65777800FAE48D /* IPAddress.cpp in Sources */, + A011E3F40F65777800FAE48D /* Packet.cpp in Sources */, + A011E3F50F65777800FAE48D /* Selector.cpp in Sources */, + A011E3F60F65777800FAE48D /* SocketTCP.cpp in Sources */, + A011E3F70F65777800FAE48D /* SocketUDP.cpp in Sources */, + A011E4540F65782800FAE48D /* Ftp.cpp in Sources */, + A011E4550F65782800FAE48D /* Http.cpp in Sources */, + A011E4560F65782800FAE48D /* IPAddress.cpp in Sources */, + A011E4580F65782800FAE48D /* Packet.cpp in Sources */, + A011E4590F65782800FAE48D /* SelectorBase.cpp in Sources */, + A011E45A0F65782800FAE48D /* SocketTCP.cpp in Sources */, + A011E45B0F65782800FAE48D /* SocketUDP.cpp in Sources */, + A011E45C0F65782800FAE48D /* SocketHelper.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E3830F6574AC00FAE48D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E3FF0F65778600FAE48D /* Listener.cpp in Sources */, + A011E4000F65778600FAE48D /* Music.cpp in Sources */, + A011E4010F65778600FAE48D /* Sound.cpp in Sources */, + A011E4020F65778600FAE48D /* SoundBuffer.cpp in Sources */, + A011E4030F65778600FAE48D /* SoundBufferRecorder.cpp in Sources */, + A011E4040F65778600FAE48D /* SoundRecorder.cpp in Sources */, + A011E4050F65778600FAE48D /* SoundStream.cpp in Sources */, + A011E4740F65783900FAE48D /* AudioDevice.cpp in Sources */, + A011E4760F65783900FAE48D /* AudioResource.cpp in Sources */, + A011E4770F65783900FAE48D /* Listener.cpp in Sources */, + A011E4790F65783900FAE48D /* Music.cpp in Sources */, + A011E47B0F65783900FAE48D /* Sound.cpp in Sources */, + A011E47C0F65783900FAE48D /* SoundBuffer.cpp in Sources */, + A011E47D0F65783900FAE48D /* SoundBufferRecorder.cpp in Sources */, + A011E47E0F65783900FAE48D /* SoundFile.cpp in Sources */, + A011E4800F65783900FAE48D /* SoundFileDefault.cpp in Sources */, + A011E4820F65783900FAE48D /* SoundFileOgg.cpp in Sources */, + A011E4840F65783900FAE48D /* SoundRecorder.cpp in Sources */, + A011E4850F65783900FAE48D /* SoundStream.cpp in Sources */, + A011E4860F65783900FAE48D /* stb_vorbis.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E38C0F6574B500FAE48D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E40A0F65779900FAE48D /* Context.cpp in Sources */, + A011E40B0F65779900FAE48D /* Input.cpp in Sources */, + A011E40C0F65779900FAE48D /* VideoMode.cpp in Sources */, + A011E40D0F65779900FAE48D /* Window.cpp in Sources */, + A011E4B90F65784E00FAE48D /* AppController.mm in Sources */, + A011E4BB0F65784E00FAE48D /* GLKit.mm in Sources */, + A011E4BC0F65784E00FAE48D /* Joystick.cpp in Sources */, + A011E4BE0F65784E00FAE48D /* VideoModeSupport.cpp in Sources */, + A011E4C30F65784E00FAE48D /* WindowImplCocoa.mm in Sources */, + A011E4C40F65784E00FAE48D /* Context.cpp in Sources */, + A011E4C80F65784E00FAE48D /* Input.cpp in Sources */, + A011E4D70F65784E00FAE48D /* VideoMode.cpp in Sources */, + A011E4DF0F65784E00FAE48D /* Window.cpp in Sources */, + A011E4E00F65784E00FAE48D /* WindowImpl.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A011E3950F6574BE00FAE48D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A011E4180F6577A500FAE48D /* Color.cpp in Sources */, + A011E4190F6577A500FAE48D /* Font.cpp in Sources */, + A011E41A0F6577A500FAE48D /* Image.cpp in Sources */, + A011E41B0F6577A500FAE48D /* PostFX.cpp in Sources */, + A011E41C0F6577A500FAE48D /* Rect.cpp in Sources */, + A011E41D0F6577A500FAE48D /* RenderWindow.cpp in Sources */, + A011E41E0F6577A500FAE48D /* Shape.cpp in Sources */, + A011E41F0F6577A500FAE48D /* Sprite.cpp in Sources */, + A011E4200F6577A500FAE48D /* String.cpp in Sources */, + A011E4210F6577A500FAE48D /* View.cpp in Sources */, + A011E56A0F65786600FAE48D /* Color.cpp in Sources */, + A011E56B0F65786600FAE48D /* Drawable.cpp in Sources */, + A011E56C0F65786600FAE48D /* Font.cpp in Sources */, + A011E56D0F65786600FAE48D /* FontLoader.cpp in Sources */, + A011E56F0F65786600FAE48D /* glew.c in Sources */, + A011E5730F65786600FAE48D /* GraphicsContext.cpp in Sources */, + A011E5750F65786600FAE48D /* Image.cpp in Sources */, + A011E5760F65786600FAE48D /* ImageLoader.cpp in Sources */, + A011E5790F65786600FAE48D /* jcapimin.c in Sources */, + A011E57A0F65786600FAE48D /* jcapistd.c in Sources */, + A011E57B0F65786600FAE48D /* jccoefct.c in Sources */, + A011E57C0F65786600FAE48D /* jccolor.c in Sources */, + A011E57D0F65786600FAE48D /* jcdctmgr.c in Sources */, + A011E57E0F65786600FAE48D /* jchuff.c in Sources */, + A011E5800F65786600FAE48D /* jcinit.c in Sources */, + A011E5810F65786600FAE48D /* jcmainct.c in Sources */, + A011E5820F65786600FAE48D /* jcmarker.c in Sources */, + A011E5830F65786600FAE48D /* jcmaster.c in Sources */, + A011E5840F65786600FAE48D /* jcomapi.c in Sources */, + A011E5860F65786600FAE48D /* jcparam.c in Sources */, + A011E5870F65786600FAE48D /* jcphuff.c in Sources */, + A011E5880F65786600FAE48D /* jcprepct.c in Sources */, + A011E5890F65786600FAE48D /* jcsample.c in Sources */, + A011E58A0F65786600FAE48D /* jctrans.c in Sources */, + A011E58B0F65786600FAE48D /* jdapimin.c in Sources */, + A011E58C0F65786600FAE48D /* jdapistd.c in Sources */, + A011E58D0F65786600FAE48D /* jdatadst.c in Sources */, + A011E58E0F65786600FAE48D /* jdatasrc.c in Sources */, + A011E58F0F65786600FAE48D /* jdcoefct.c in Sources */, + A011E5900F65786600FAE48D /* jdcolor.c in Sources */, + A011E5920F65786600FAE48D /* jddctmgr.c in Sources */, + A011E5930F65786600FAE48D /* jdhuff.c in Sources */, + A011E5950F65786600FAE48D /* jdinput.c in Sources */, + A011E5960F65786600FAE48D /* jdmainct.c in Sources */, + A011E5970F65786600FAE48D /* jdmarker.c in Sources */, + A011E5980F65786600FAE48D /* jdmaster.c in Sources */, + A011E5990F65786600FAE48D /* jdmerge.c in Sources */, + A011E59A0F65786600FAE48D /* jdphuff.c in Sources */, + A011E59B0F65786600FAE48D /* jdpostct.c in Sources */, + A011E59C0F65786600FAE48D /* jdsample.c in Sources */, + A011E59D0F65786600FAE48D /* jdtrans.c in Sources */, + A011E59E0F65786600FAE48D /* jerror.c in Sources */, + A011E5A00F65786600FAE48D /* jfdctflt.c in Sources */, + A011E5A10F65786600FAE48D /* jfdctfst.c in Sources */, + A011E5A20F65786600FAE48D /* jfdctint.c in Sources */, + A011E5A30F65786600FAE48D /* jidctflt.c in Sources */, + A011E5A40F65786600FAE48D /* jidctfst.c in Sources */, + A011E5A50F65786600FAE48D /* jidctint.c in Sources */, + A011E5A60F65786600FAE48D /* jidctred.c in Sources */, + A011E5A80F65786600FAE48D /* jmemmgr.c in Sources */, + A011E5A90F65786600FAE48D /* jmemnobs.c in Sources */, + A011E5AE0F65786600FAE48D /* jquant1.c in Sources */, + A011E5AF0F65786600FAE48D /* jquant2.c in Sources */, + A011E5B00F65786600FAE48D /* jutils.c in Sources */, + A011E5B20F65786600FAE48D /* png.c in Sources */, + A011E5B50F65786600FAE48D /* pngerror.c in Sources */, + A011E5B60F65786600FAE48D /* pnggccrd.c in Sources */, + A011E5B70F65786600FAE48D /* pngget.c in Sources */, + A011E5B80F65786600FAE48D /* pngmem.c in Sources */, + A011E5B90F65786600FAE48D /* pngpread.c in Sources */, + A011E5BA0F65786600FAE48D /* pngread.c in Sources */, + A011E5BB0F65786600FAE48D /* pngrio.c in Sources */, + A011E5BC0F65786600FAE48D /* pngrtran.c in Sources */, + A011E5BD0F65786600FAE48D /* pngrutil.c in Sources */, + A011E5BE0F65786600FAE48D /* pngset.c in Sources */, + A011E5BF0F65786600FAE48D /* pngtrans.c in Sources */, + A011E5C00F65786600FAE48D /* pngvcrd.c in Sources */, + A011E5C10F65786600FAE48D /* pngwio.c in Sources */, + A011E5C20F65786600FAE48D /* pngwrite.c in Sources */, + A011E5C30F65786600FAE48D /* pngwtran.c in Sources */, + A011E5C40F65786600FAE48D /* pngwutil.c in Sources */, + A011E5C60F65786600FAE48D /* Matrix3.cpp in Sources */, + A011E5C70F65786600FAE48D /* PostFX.cpp in Sources */, + A011E5C80F65786600FAE48D /* RenderTarget.cpp in Sources */, + A011E5C90F65786600FAE48D /* RenderWindow.cpp in Sources */, + A011E5CA0F65786600FAE48D /* Shape.cpp in Sources */, + A011E5CB0F65786600FAE48D /* image_DXT.c in Sources */, + A011E5CD0F65786600FAE48D /* SOIL.c in Sources */, + A011E5CF0F65786600FAE48D /* stb_image_aug.c in Sources */, + A011E5D30F65786600FAE48D /* Sprite.cpp in Sources */, + A011E5D40F65786600FAE48D /* String.cpp in Sources */, + A011E5D50F65786600FAE48D /* View.cpp in Sources */, + A011E5D60F65786600FAE48D /* adler32.c in Sources */, + A011E5D70F65786600FAE48D /* compress.c in Sources */, + A011E5D80F65786600FAE48D /* crc32.c in Sources */, + A011E5DA0F65786600FAE48D /* deflate.c in Sources */, + A011E5DC0F65786600FAE48D /* inffast.c in Sources */, + A011E5DF0F65786600FAE48D /* inflate.c in Sources */, + A011E5E10F65786600FAE48D /* inftrees.c in Sources */, + A011E5E30F65786600FAE48D /* trees.c in Sources */, + A011E5E50F65786600FAE48D /* uncompr.c in Sources */, + A011E5E80F65786600FAE48D /* zutil.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + A011E3B00F6574EF00FAE48D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A011E3970F6574BE00FAE48D /* csfml-graphics */; + targetProxy = A011E3AF0F6574EF00FAE48D /* PBXContainerItemProxy */; + }; + A011E3B20F6574EF00FAE48D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A011E38E0F6574B500FAE48D /* csfml-window */; + targetProxy = A011E3B10F6574EF00FAE48D /* PBXContainerItemProxy */; + }; + A011E3B40F6574EF00FAE48D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A011E3850F6574AC00FAE48D /* csfml-audio */; + targetProxy = A011E3B30F6574EF00FAE48D /* PBXContainerItemProxy */; + }; + A011E3B60F6574EF00FAE48D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A011E37C0F65749F00FAE48D /* csfml-network */; + targetProxy = A011E3B50F6574EF00FAE48D /* PBXContainerItemProxy */; + }; + A011E3B80F6574EF00FAE48D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = A011E3710F65749300FAE48D /* csfml-system */; + targetProxy = A011E3B70F6574EF00FAE48D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + A011E3580F65738800FAE48D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; + CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../lib"; + COPY_PHASE_STRIP = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; + GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES; + GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; + GCC_WARN_MISSING_PARENTHESES = YES; + GCC_WARN_PROTOTYPE_CONVERSION = YES; + GCC_WARN_SHADOW = YES; + GCC_WARN_SIGN_COMPARE = YES; + GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_PARAMETER = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../src", + "$(SRCROOT)/../include", + "$(SRCROOT)/../../include", + "$(SRCROOT)/../../src", + ); + OBJROOT = "$(SRCROOT)/build"; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SYMROOT = "$(SRCROOT)/../../lib"; + }; + name = Debug; + }; + A011E3590F65738800FAE48D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; + CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../lib"; + COPY_PHASE_STRIP = YES; + GCC_OPTIMIZATION_LEVEL = 2; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../src", + "$(SRCROOT)/../include", + "$(SRCROOT)/../../include", + "$(SRCROOT)/../../src", + ); + OBJROOT = "$(SRCROOT)/build"; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SYMROOT = "$(SRCROOT)/../../lib"; + }; + name = Release; + }; + A011E3740F65749400FAE48D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + EXECUTABLE_PREFIX = lib; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INSTALL_PATH = /usr/local/lib; + OTHER_LDFLAGS = ( + "-framework", + CoreFoundation, + ); + PREBINDING = NO; + PRODUCT_NAME = "csfml-system-d"; + }; + name = Debug; + }; + A011E3750F65749400FAE48D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/lib; + OTHER_LDFLAGS = ( + "-framework", + CoreFoundation, + ); + PREBINDING = NO; + PRODUCT_NAME = "csfml-system"; + ZERO_LINK = NO; + }; + name = Release; + }; + A011E37E0F65749F00FAE48D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + EXECUTABLE_PREFIX = lib; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INSTALL_PATH = /usr/local/lib; + PREBINDING = NO; + PRODUCT_NAME = "csfml-network-d"; + }; + name = Debug; + }; + A011E37F0F65749F00FAE48D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/lib; + PREBINDING = NO; + PRODUCT_NAME = "csfml-network"; + ZERO_LINK = NO; + }; + name = Release; + }; + A011E3870F6574AC00FAE48D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + EXECUTABLE_PREFIX = lib; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../extlibs/libs-xcode\""; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../src", + "$(SRCROOT)/../include", + "$(SRCROOT)/../../include", + "$(SRCROOT)/../../src", + "$(SRCROOT)/../../extlibs/headers", + ); + INSTALL_PATH = /usr/local/lib; + OTHER_LDFLAGS = ( + "-framework", + OpenAL, + ); + PREBINDING = NO; + PRODUCT_NAME = "csfml-audio-d"; + }; + name = Debug; + }; + A011E3880F6574AC00FAE48D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + EXECUTABLE_PREFIX = lib; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../extlibs/libs-xcode\""; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = G5; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../src", + "$(SRCROOT)/../include", + "$(SRCROOT)/../../include", + "$(SRCROOT)/../../src", + "$(SRCROOT)/../../extlibs/headers", + ); + INSTALL_PATH = /usr/local/lib; + OTHER_LDFLAGS = ( + "-framework", + OpenAL, + ); + PREBINDING = NO; + PRODUCT_NAME = "csfml-audio"; + ZERO_LINK = NO; + }; + name = Release; + }; + A011E3900F6574B500FAE48D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + EXECUTABLE_PREFIX = lib; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + INSTALL_PATH = /usr/local/lib; + OTHER_LDFLAGS = ( + "-framework", + Cocoa, + ); + PREBINDING = NO; + PRODUCT_NAME = "csfml-window-d"; + }; + name = Debug; + }; + A011E3910F6574B500FAE48D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = G5; + INSTALL_PATH = /usr/local/lib; + OTHER_LDFLAGS = ( + "-framework", + Cocoa, + ); + PREBINDING = NO; + PRODUCT_NAME = "csfml-window"; + ZERO_LINK = NO; + }; + name = Release; + }; + A011E3990F6574BE00FAE48D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + EXECUTABLE_PREFIX = lib; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../src", + "$(SRCROOT)/../include", + "$(SRCROOT)/../../include", + "$(SRCROOT)/../../src", + "$(SRCROOT)/../../extlibs/headers", + ); + INSTALL_PATH = /usr/local/lib; + OTHER_LDFLAGS = ( + "-framework", + OpenGL, + "$(SRCROOT)/../../extlibs/libs-xcode/libfreetype.a", + ); + PREBINDING = NO; + PRODUCT_NAME = "csfml-graphics-d"; + }; + name = Debug; + }; + A011E39A0F6574BE00FAE48D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + EXECUTABLE_PREFIX = lib; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = G5; + HEADER_SEARCH_PATHS = ( + "$(SRCROOT)/../src", + "$(SRCROOT)/../include", + "$(SRCROOT)/../../include", + "$(SRCROOT)/../../src", + "$(SRCROOT)/../../extlibs/headers", + ); + INSTALL_PATH = /usr/local/lib; + OTHER_LDFLAGS = ( + "-framework", + OpenGL, + "$(SRCROOT)/../../extlibs/libs-xcode/libfreetype.a", + ); + PREBINDING = NO; + PRODUCT_NAME = "csfml-graphics"; + ZERO_LINK = NO; + }; + name = Release; + }; + A011E39C0F6574D600FAE48D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + PRODUCT_NAME = All; + }; + name = Debug; + }; + A011E39D0F6574D600FAE48D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + PRODUCT_NAME = All; + ZERO_LINK = NO; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + A011E35A0F65738800FAE48D /* Build configuration list for PBXProject "SFML-bare" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A011E3580F65738800FAE48D /* Debug */, + A011E3590F65738800FAE48D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A011E3760F65749400FAE48D /* Build configuration list for PBXNativeTarget "csfml-system" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A011E3740F65749400FAE48D /* Debug */, + A011E3750F65749400FAE48D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A011E3A70F6574E400FAE48D /* Build configuration list for PBXNativeTarget "csfml-network" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A011E37E0F65749F00FAE48D /* Debug */, + A011E37F0F65749F00FAE48D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A011E3A80F6574E400FAE48D /* Build configuration list for PBXNativeTarget "csfml-audio" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A011E3870F6574AC00FAE48D /* Debug */, + A011E3880F6574AC00FAE48D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A011E3A90F6574E400FAE48D /* Build configuration list for PBXNativeTarget "csfml-window" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A011E3900F6574B500FAE48D /* Debug */, + A011E3910F6574B500FAE48D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A011E3AA0F6574E400FAE48D /* Build configuration list for PBXNativeTarget "csfml-graphics" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A011E3990F6574BE00FAE48D /* Debug */, + A011E39A0F6574BE00FAE48D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A011E3AB0F6574E400FAE48D /* Build configuration list for PBXAggregateTarget "All" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A011E39C0F6574D600FAE48D /* Debug */, + A011E39D0F6574D600FAE48D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = A011E3570F65738800FAE48D /* Project object */; +} diff --git a/build/xcode/SFML-bare.xcodeproj/project.pbxproj b/build/xcode/SFML-bare.xcodeproj/project.pbxproj index 4cd20dd13..3b211f5b0 100644 --- a/build/xcode/SFML-bare.xcodeproj/project.pbxproj +++ b/build/xcode/SFML-bare.xcodeproj/project.pbxproj @@ -25,12 +25,14 @@ /* End PBXAggregateTarget section */ /* Begin PBXBuildFile section */ + A011E8070F65B35400FAE48D /* GLKit.mm in Sources */ = {isa = PBXBuildFile; fileRef = A011E8060F65B35400FAE48D /* GLKit.mm */; }; A018A2AF0EA21A2C005FFAC3 /* Http.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A018A2AD0EA21A2C005FFAC3 /* Http.cpp */; }; A018A2B00EA21A2C005FFAC3 /* Ftp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A018A2AE0EA21A2C005FFAC3 /* Ftp.cpp */; }; + A01BEF080F6BF0140095262C /* Initializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A01BEF070F6BF0140095262C /* Initializer.cpp */; }; + A01BEF0C0F6BF0550095262C /* sndfile.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A01BEF0B0F6BF0550095262C /* sndfile.framework */; }; A04C5A9D0EDDD88B00935061 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = A04C5A940EDDD88B00935061 /* AppController.mm */; }; A04C5A9E0EDDD88B00935061 /* Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A04C5A950EDDD88B00935061 /* Joystick.cpp */; }; A04C5A9F0EDDD88B00935061 /* VideoModeSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A04C5A970EDDD88B00935061 /* VideoModeSupport.cpp */; }; - A04C5AA00EDDD88B00935061 /* WindowController.mm in Sources */ = {isa = PBXBuildFile; fileRef = A04C5A9A0EDDD88B00935061 /* WindowController.mm */; }; A04C5AA10EDDD88B00935061 /* WindowImplCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = A04C5A9C0EDDD88B00935061 /* WindowImplCocoa.mm */; }; A0660EBA0E89051400D39DEB /* Clock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0660EA90E89051400D39DEB /* Clock.cpp */; }; A0660EBC0E89051400D39DEB /* Lock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0660EAB0E89051400D39DEB /* Lock.cpp */; }; @@ -197,21 +199,23 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - A01269660E6318C000B96A5D /* libsfml-system.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-system.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; - A012696F0E6318FE00B96A5D /* libsfml-network.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-network.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; - A01269760E63190F00B96A5D /* libsfml-audio.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-audio.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; - A012697D0E63192000B96A5D /* libsfml-window.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-window.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; - A01269840E63192B00B96A5D /* libsfml-graphics.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-graphics.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + A011E8050F65B35400FAE48D /* GLKit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = GLKit.h; sourceTree = ""; }; + A011E8060F65B35400FAE48D /* GLKit.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = GLKit.mm; sourceTree = ""; }; + A01269660E6318C000B96A5D /* libsfml-system-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-system-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + A012696F0E6318FE00B96A5D /* libsfml-network-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-network-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + A01269760E63190F00B96A5D /* libsfml-audio-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-audio-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + A012697D0E63192000B96A5D /* libsfml-window-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-window-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; + A01269840E63192B00B96A5D /* libsfml-graphics-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libsfml-graphics-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; A018A2AD0EA21A2C005FFAC3 /* Http.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Http.cpp; path = ../../src/SFML/Network/Http.cpp; sourceTree = SOURCE_ROOT; }; A018A2AE0EA21A2C005FFAC3 /* Ftp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Ftp.cpp; path = ../../src/SFML/Network/Ftp.cpp; sourceTree = SOURCE_ROOT; }; + A01BEF070F6BF0140095262C /* Initializer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Initializer.cpp; path = ../../src/SFML/System/Initializer.cpp; sourceTree = SOURCE_ROOT; }; + A01BEF0B0F6BF0550095262C /* sndfile.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = sndfile.framework; path = "../../extlibs/libs-xcode/sndfile.framework"; sourceTree = SOURCE_ROOT; }; A04C5A930EDDD88B00935061 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ../../src/SFML/Window/Cocoa/AppController.h; sourceTree = SOURCE_ROOT; }; A04C5A940EDDD88B00935061 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = AppController.mm; path = ../../src/SFML/Window/Cocoa/AppController.mm; sourceTree = SOURCE_ROOT; }; A04C5A950EDDD88B00935061 /* Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../../src/SFML/Window/Cocoa/Joystick.cpp; sourceTree = SOURCE_ROOT; }; A04C5A960EDDD88B00935061 /* Joystick.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = Joystick.hpp; path = ../../src/SFML/Window/Cocoa/Joystick.hpp; sourceTree = SOURCE_ROOT; }; A04C5A970EDDD88B00935061 /* VideoModeSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = VideoModeSupport.cpp; path = ../../src/SFML/Window/Cocoa/VideoModeSupport.cpp; sourceTree = SOURCE_ROOT; }; A04C5A980EDDD88B00935061 /* VideoModeSupport.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = VideoModeSupport.hpp; path = ../../src/SFML/Window/Cocoa/VideoModeSupport.hpp; sourceTree = SOURCE_ROOT; }; - A04C5A990EDDD88B00935061 /* WindowController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = WindowController.h; path = ../../src/SFML/Window/Cocoa/WindowController.h; sourceTree = SOURCE_ROOT; }; - A04C5A9A0EDDD88B00935061 /* WindowController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = WindowController.mm; path = ../../src/SFML/Window/Cocoa/WindowController.mm; sourceTree = SOURCE_ROOT; }; A04C5A9B0EDDD88B00935061 /* WindowImplCocoa.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = WindowImplCocoa.hpp; path = ../../src/SFML/Window/Cocoa/WindowImplCocoa.hpp; sourceTree = SOURCE_ROOT; }; A04C5A9C0EDDD88B00935061 /* WindowImplCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = WindowImplCocoa.mm; path = ../../src/SFML/Window/Cocoa/WindowImplCocoa.mm; sourceTree = SOURCE_ROOT; }; A0660EA90E89051400D39DEB /* Clock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Clock.cpp; path = ../../src/SFML/System/Clock.cpp; sourceTree = SOURCE_ROOT; }; @@ -406,6 +410,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + A01BEF0C0F6BF0550095262C /* sndfile.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -441,11 +446,11 @@ A01269670E6318C000B96A5D /* Products */ = { isa = PBXGroup; children = ( - A01269660E6318C000B96A5D /* libsfml-system.dylib */, - A012696F0E6318FE00B96A5D /* libsfml-network.dylib */, - A01269760E63190F00B96A5D /* libsfml-audio.dylib */, - A012697D0E63192000B96A5D /* libsfml-window.dylib */, - A01269840E63192B00B96A5D /* libsfml-graphics.dylib */, + A01269660E6318C000B96A5D /* libsfml-system-d.dylib */, + A012696F0E6318FE00B96A5D /* libsfml-network-d.dylib */, + A01269760E63190F00B96A5D /* libsfml-audio-d.dylib */, + A012697D0E63192000B96A5D /* libsfml-window-d.dylib */, + A01269840E63192B00B96A5D /* libsfml-graphics-d.dylib */, ); name = Products; sourceTree = ""; @@ -453,6 +458,7 @@ A01269870E63193B00B96A5D /* sfml-system */ = { isa = PBXGroup; children = ( + A01BEF070F6BF0140095262C /* Initializer.cpp */, A0660EA90E89051400D39DEB /* Clock.cpp */, A0660EAA0E89051400D39DEB /* Platform.hpp */, A0660EAB0E89051400D39DEB /* Lock.cpp */, @@ -482,6 +488,7 @@ A012698D0E63194600B96A5D /* sfml-audio */ = { isa = PBXGroup; children = ( + A01BEF0B0F6BF0550095262C /* sndfile.framework */, A0660EDB0E89054E00D39DEB /* AudioDevice.cpp */, A0660EDC0E89054E00D39DEB /* AudioDevice.hpp */, A0660EDD0E89054E00D39DEB /* AudioResource.cpp */, @@ -554,14 +561,14 @@ A04C5A920EDDD88B00935061 /* Cocoa */ = { isa = PBXGroup; children = ( + A011E8050F65B35400FAE48D /* GLKit.h */, + A011E8060F65B35400FAE48D /* GLKit.mm */, A04C5A930EDDD88B00935061 /* AppController.h */, A04C5A940EDDD88B00935061 /* AppController.mm */, A04C5A950EDDD88B00935061 /* Joystick.cpp */, A04C5A960EDDD88B00935061 /* Joystick.hpp */, A04C5A970EDDD88B00935061 /* VideoModeSupport.cpp */, A04C5A980EDDD88B00935061 /* VideoModeSupport.hpp */, - A04C5A990EDDD88B00935061 /* WindowController.h */, - A04C5A9A0EDDD88B00935061 /* WindowController.mm */, A04C5A9B0EDDD88B00935061 /* WindowImplCocoa.hpp */, A04C5A9C0EDDD88B00935061 /* WindowImplCocoa.mm */, ); @@ -765,7 +772,7 @@ ); name = "sfml-system"; productName = "sfml-system"; - productReference = A01269660E6318C000B96A5D /* libsfml-system.dylib */; + productReference = A01269660E6318C000B96A5D /* libsfml-system-d.dylib */; productType = "com.apple.product-type.library.dynamic"; }; A012696E0E6318FE00B96A5D /* sfml-network */ = { @@ -781,7 +788,7 @@ ); name = "sfml-network"; productName = "sfml-network"; - productReference = A012696F0E6318FE00B96A5D /* libsfml-network.dylib */; + productReference = A012696F0E6318FE00B96A5D /* libsfml-network-d.dylib */; productType = "com.apple.product-type.library.dynamic"; }; A01269750E63190F00B96A5D /* sfml-audio */ = { @@ -797,7 +804,7 @@ ); name = "sfml-audio"; productName = "sfml-audio"; - productReference = A01269760E63190F00B96A5D /* libsfml-audio.dylib */; + productReference = A01269760E63190F00B96A5D /* libsfml-audio-d.dylib */; productType = "com.apple.product-type.library.dynamic"; }; A012697C0E63192000B96A5D /* sfml-window */ = { @@ -813,7 +820,7 @@ ); name = "sfml-window"; productName = "sfml-window"; - productReference = A012697D0E63192000B96A5D /* libsfml-window.dylib */; + productReference = A012697D0E63192000B96A5D /* libsfml-window-d.dylib */; productType = "com.apple.product-type.library.dynamic"; }; A01269830E63192B00B96A5D /* sfml-graphics */ = { @@ -829,7 +836,7 @@ ); name = "sfml-graphics"; productName = "sfml-graphics"; - productReference = A01269840E63192B00B96A5D /* libsfml-graphics.dylib */; + productReference = A01269840E63192B00B96A5D /* libsfml-graphics-d.dylib */; productType = "com.apple.product-type.library.dynamic"; }; /* End PBXNativeTarget section */ @@ -868,6 +875,7 @@ A0660EC00E89051400D39DEB /* Platform.cpp in Sources */, A0660EC20E89051400D39DEB /* Thread.cpp in Sources */, A0660EC40E89051400D39DEB /* Sleep.cpp in Sources */, + A01BEF080F6BF0140095262C /* Initializer.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -918,8 +926,8 @@ A04C5A9D0EDDD88B00935061 /* AppController.mm in Sources */, A04C5A9E0EDDD88B00935061 /* Joystick.cpp in Sources */, A04C5A9F0EDDD88B00935061 /* VideoModeSupport.cpp in Sources */, - A04C5AA00EDDD88B00935061 /* WindowController.mm in Sources */, A04C5AA10EDDD88B00935061 /* WindowImplCocoa.mm in Sources */, + A011E8070F65B35400FAE48D /* GLKit.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1104,6 +1112,10 @@ GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 0; + OTHER_LDFLAGS = ( + "-framework", + CoreFoundation, + ); PREBINDING = NO; PRODUCT_NAME = "sfml-system-d"; }; @@ -1119,6 +1131,10 @@ GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_MODEL_TUNING = G5; LD_DYLIB_INSTALL_NAME = "$(DYLIB_INSTALL_NAME_BASE:standardizepath)/$(EXECUTABLE_PATH)"; + OTHER_LDFLAGS = ( + "-framework", + CoreFoundation, + ); PREBINDING = NO; PRODUCT_NAME = "sfml-system"; ZERO_LINK = NO; @@ -1161,6 +1177,11 @@ ALWAYS_SEARCH_USER_PATHS = NO; COPY_PHASE_STRIP = NO; EXECUTABLE_PREFIX = lib; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../extlibs/libs-xcode\""; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_MODEL_TUNING = G5; @@ -1168,7 +1189,6 @@ OTHER_LDFLAGS = ( "-framework", OpenAL, - "$(SRCROOT)/../../extlibs/libs-xcode/libsndfile.a", "-lsfml-system-d", ); PREBINDING = NO; @@ -1183,12 +1203,16 @@ COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; EXECUTABLE_PREFIX = lib; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../extlibs/libs-xcode\""; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_MODEL_TUNING = G5; OTHER_LDFLAGS = ( "-framework", OpenAL, - "$(SRCROOT)/../../extlibs/libs-xcode/libsndfile.a", "-lsfml-system", ); PREBINDING = NO; diff --git a/build/xcode/SFML.xcodeproj/project.pbxproj b/build/xcode/SFML.xcodeproj/project.pbxproj index f3936f26f..95fcf3f3e 100644 --- a/build/xcode/SFML.xcodeproj/project.pbxproj +++ b/build/xcode/SFML.xcodeproj/project.pbxproj @@ -54,13 +54,11 @@ A04C59B20EDDBA9C00935061 /* Joystick.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A04C59A80EDDBA9C00935061 /* Joystick.hpp */; }; A04C59B30EDDBA9C00935061 /* VideoModeSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A04C59A90EDDBA9C00935061 /* VideoModeSupport.cpp */; }; A04C59B40EDDBA9C00935061 /* VideoModeSupport.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A04C59AA0EDDBA9C00935061 /* VideoModeSupport.hpp */; }; - A04C59B50EDDBA9C00935061 /* WindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = A04C59AB0EDDBA9C00935061 /* WindowController.h */; }; - A04C59B60EDDBA9C00935061 /* WindowController.mm in Sources */ = {isa = PBXBuildFile; fileRef = A04C59AC0EDDBA9C00935061 /* WindowController.mm */; }; A04C59B70EDDBA9C00935061 /* WindowImplCocoa.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A04C59AD0EDDBA9C00935061 /* WindowImplCocoa.hpp */; }; A04C59B80EDDBA9C00935061 /* WindowImplCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = A04C59AE0EDDBA9C00935061 /* WindowImplCocoa.mm */; }; - A05EEF700E5CF18F00572B7E /* sfml-window.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C93EB40D9A9CA000B9E0C8 /* sfml-window.framework */; }; + A05EEF700E5CF18F00572B7E /* sfml-window-d.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0C93EB40D9A9CA000B9E0C8 /* sfml-window-d.framework */; }; A093E3D00D8BF918002236B4 /* dummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A093E3CF0D8BF918002236B4 /* dummy.cpp */; }; - A093E5480D8BFEAE002236B4 /* sfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A093E37F0D8BF87A002236B4 /* sfml-system.framework */; }; + A093E5480D8BFEAE002236B4 /* sfml-system-d.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A093E37F0D8BF87A002236B4 /* sfml-system-d.framework */; }; A09EEBF70D8C19BF00F6C625 /* Platform.hpp in Headers */ = {isa = PBXBuildFile; fileRef = A09EEBED0D8C19BF00F6C625 /* Platform.hpp */; }; A09EEBF80D8C19BF00F6C625 /* Randomizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A09EEBEE0D8C19BF00F6C625 /* Randomizer.cpp */; }; A09EEBF90D8C19BF00F6C625 /* Mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A09EEBF00D8C19BF00F6C625 /* Mutex.cpp */; }; @@ -70,8 +68,13 @@ A09EEBFD0D8C19BF00F6C625 /* Clock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A09EEBF40D8C19BF00F6C625 /* Clock.cpp */; }; A09EEBFE0D8C19BF00F6C625 /* Lock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A09EEBF50D8C19BF00F6C625 /* Lock.cpp */; }; A09EEBFF0D8C19BF00F6C625 /* Sleep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A09EEBF60D8C19BF00F6C625 /* Sleep.cpp */; }; - A0BE1A200D917332007D4CAD /* sfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A093E37F0D8BF87A002236B4 /* sfml-system.framework */; }; - A0C93F930D9AA9FA00B9E0C8 /* sfml-system.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A093E37F0D8BF87A002236B4 /* sfml-system.framework */; }; + A0B617730F66936F005E0970 /* sndfile.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0B617720F66936F005E0970 /* sndfile.framework */; }; + A0B617780F66938D005E0970 /* sndfile.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = A0B617720F66936F005E0970 /* sndfile.framework */; }; + A0BE1A200D917332007D4CAD /* sfml-system-d.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A093E37F0D8BF87A002236B4 /* sfml-system-d.framework */; }; + A0C93F930D9AA9FA00B9E0C8 /* sfml-system-d.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A093E37F0D8BF87A002236B4 /* sfml-system-d.framework */; }; + A0CE9FE70F46F72500FD00CE /* GLKit.h in Headers */ = {isa = PBXBuildFile; fileRef = A0CE9FE50F46F72500FD00CE /* GLKit.h */; }; + A0CE9FE80F46F72500FD00CE /* GLKit.mm in Sources */ = {isa = PBXBuildFile; fileRef = A0CE9FE60F46F72500FD00CE /* GLKit.mm */; }; + A0EEDE990F59D49C0023A7F7 /* Initializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0EEDE980F59D49C0023A7F7 /* Initializer.cpp */; }; A0F1E68A0E75440800778F12 /* IPAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0F1E6800E75440800778F12 /* IPAddress.cpp */; }; A0F1E68C0E75440800778F12 /* Packet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0F1E6820E75440800778F12 /* Packet.cpp */; }; A0F1E68D0E75440800778F12 /* SelectorBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0F1E6830E75440800778F12 /* SelectorBase.cpp */; }; @@ -306,6 +309,19 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + A0B617500F66926C005E0970 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + A0B617780F66938D005E0970 /* sndfile.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ A018A2790EA21866005FFAC3 /* Http.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Http.cpp; path = ../../src/SFML/Network/Http.cpp; sourceTree = SOURCE_ROOT; }; A018A27A0EA21866005FFAC3 /* Ftp.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Ftp.cpp; path = ../../src/SFML/Network/Ftp.cpp; sourceTree = SOURCE_ROOT; }; @@ -406,20 +422,18 @@ A04C59A80EDDBA9C00935061 /* Joystick.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = Joystick.hpp; path = ../../src/SFML/Window/Cocoa/Joystick.hpp; sourceTree = SOURCE_ROOT; }; A04C59A90EDDBA9C00935061 /* VideoModeSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = VideoModeSupport.cpp; path = ../../src/SFML/Window/Cocoa/VideoModeSupport.cpp; sourceTree = SOURCE_ROOT; }; A04C59AA0EDDBA9C00935061 /* VideoModeSupport.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = VideoModeSupport.hpp; path = ../../src/SFML/Window/Cocoa/VideoModeSupport.hpp; sourceTree = SOURCE_ROOT; }; - A04C59AB0EDDBA9C00935061 /* WindowController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = WindowController.h; path = ../../src/SFML/Window/Cocoa/WindowController.h; sourceTree = SOURCE_ROOT; }; - A04C59AC0EDDBA9C00935061 /* WindowController.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = WindowController.mm; path = ../../src/SFML/Window/Cocoa/WindowController.mm; sourceTree = SOURCE_ROOT; }; A04C59AD0EDDBA9C00935061 /* WindowImplCocoa.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = WindowImplCocoa.hpp; path = ../../src/SFML/Window/Cocoa/WindowImplCocoa.hpp; sourceTree = SOURCE_ROOT; }; A04C59AE0EDDBA9C00935061 /* WindowImplCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; name = WindowImplCocoa.mm; path = ../../src/SFML/Window/Cocoa/WindowImplCocoa.mm; sourceTree = SOURCE_ROOT; }; A093E3750D8BF86E002236B4 /* SFML.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SFML.framework; sourceTree = BUILT_PRODUCTS_DIR; }; A093E3770D8BF86E002236B4 /* SFML-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SFML-Info.plist"; sourceTree = SOURCE_ROOT; }; - A093E37F0D8BF87A002236B4 /* sfml-system.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-system.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + A093E37F0D8BF87A002236B4 /* sfml-system-d.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-system-d.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; A093E3800D8BF87A002236B4 /* sfml-system-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "sfml-system-Info.plist"; sourceTree = SOURCE_ROOT; }; - A093E3880D8BF885002236B4 /* sfml-network.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-network.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + A093E3880D8BF885002236B4 /* sfml-network-d.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-network-d.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; A093E3890D8BF885002236B4 /* sfml-network-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "sfml-network-Info.plist"; sourceTree = SOURCE_ROOT; }; A093E3920D8BF892002236B4 /* sfml-window-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "sfml-window-Info.plist"; sourceTree = SOURCE_ROOT; }; - A093E39A0D8BF89B002236B4 /* sfml-audio.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-audio.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + A093E39A0D8BF89B002236B4 /* sfml-audio-d.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-audio-d.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; A093E39B0D8BF89B002236B4 /* sfml-audio-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "sfml-audio-Info.plist"; sourceTree = SOURCE_ROOT; }; - A093E3A30D8BF8A2002236B4 /* sfml-graphics.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-graphics.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + A093E3A30D8BF8A2002236B4 /* sfml-graphics-d.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-graphics-d.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; A093E3A40D8BF8A2002236B4 /* sfml-graphics-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "sfml-graphics-Info.plist"; sourceTree = SOURCE_ROOT; }; A093E3CF0D8BF918002236B4 /* dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = dummy.cpp; sourceTree = SOURCE_ROOT; }; A09EEBED0D8C19BF00F6C625 /* Platform.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = Platform.hpp; path = ../../src/SFML/System/Platform.hpp; sourceTree = SOURCE_ROOT; }; @@ -431,7 +445,11 @@ A09EEBF40D8C19BF00F6C625 /* Clock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Clock.cpp; path = ../../src/SFML/System/Clock.cpp; sourceTree = SOURCE_ROOT; }; A09EEBF50D8C19BF00F6C625 /* Lock.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Lock.cpp; path = ../../src/SFML/System/Lock.cpp; sourceTree = SOURCE_ROOT; }; A09EEBF60D8C19BF00F6C625 /* Sleep.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Sleep.cpp; path = ../../src/SFML/System/Sleep.cpp; sourceTree = SOURCE_ROOT; }; - A0C93EB40D9A9CA000B9E0C8 /* sfml-window.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-window.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + A0B617720F66936F005E0970 /* sndfile.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = sndfile.framework; path = "../../extlibs/libs-xcode/sndfile.framework"; sourceTree = SOURCE_ROOT; }; + A0C93EB40D9A9CA000B9E0C8 /* sfml-window-d.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "sfml-window-d.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + A0CE9FE50F46F72500FD00CE /* GLKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLKit.h; sourceTree = ""; }; + A0CE9FE60F46F72500FD00CE /* GLKit.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GLKit.mm; sourceTree = ""; }; + A0EEDE980F59D49C0023A7F7 /* Initializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Initializer.cpp; path = ../../src/SFML/System/Initializer.cpp; sourceTree = SOURCE_ROOT; }; A0F1E6800E75440800778F12 /* IPAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = IPAddress.cpp; path = ../../src/SFML/Network/IPAddress.cpp; sourceTree = SOURCE_ROOT; }; A0F1E6820E75440800778F12 /* Packet.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Packet.cpp; path = ../../src/SFML/Network/Packet.cpp; sourceTree = SOURCE_ROOT; }; A0F1E6830E75440800778F12 /* SelectorBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SelectorBase.cpp; path = ../../src/SFML/Network/SelectorBase.cpp; sourceTree = SOURCE_ROOT; }; @@ -600,7 +618,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A093E5480D8BFEAE002236B4 /* sfml-system.framework in Frameworks */, + A093E5480D8BFEAE002236B4 /* sfml-system-d.framework in Frameworks */, + A0B617730F66936F005E0970 /* sndfile.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -608,8 +627,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A0BE1A200D917332007D4CAD /* sfml-system.framework in Frameworks */, - A05EEF700E5CF18F00572B7E /* sfml-window.framework in Frameworks */, + A0BE1A200D917332007D4CAD /* sfml-system-d.framework in Frameworks */, + A05EEF700E5CF18F00572B7E /* sfml-window-d.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -617,7 +636,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A0C93F930D9AA9FA00B9E0C8 /* sfml-system.framework in Frameworks */, + A0C93F930D9AA9FA00B9E0C8 /* sfml-system-d.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -820,10 +839,10 @@ A04C59A70EDDBA9C00935061 /* Joystick.cpp */, A04C59AA0EDDBA9C00935061 /* VideoModeSupport.hpp */, A04C59A90EDDBA9C00935061 /* VideoModeSupport.cpp */, - A04C59AB0EDDBA9C00935061 /* WindowController.h */, - A04C59AC0EDDBA9C00935061 /* WindowController.mm */, A04C59AD0EDDBA9C00935061 /* WindowImplCocoa.hpp */, A04C59AE0EDDBA9C00935061 /* WindowImplCocoa.mm */, + A0CE9FE50F46F72500FD00CE /* GLKit.h */, + A0CE9FE60F46F72500FD00CE /* GLKit.mm */, ); name = Cocoa; path = ../../src/SFML/Window/Cocoa; @@ -846,11 +865,11 @@ isa = PBXGroup; children = ( A093E3750D8BF86E002236B4 /* SFML.framework */, - A093E37F0D8BF87A002236B4 /* sfml-system.framework */, - A093E3880D8BF885002236B4 /* sfml-network.framework */, - A093E39A0D8BF89B002236B4 /* sfml-audio.framework */, - A093E3A30D8BF8A2002236B4 /* sfml-graphics.framework */, - A0C93EB40D9A9CA000B9E0C8 /* sfml-window.framework */, + A093E37F0D8BF87A002236B4 /* sfml-system-d.framework */, + A093E3880D8BF885002236B4 /* sfml-network-d.framework */, + A093E39A0D8BF89B002236B4 /* sfml-audio-d.framework */, + A093E3A30D8BF8A2002236B4 /* sfml-graphics-d.framework */, + A0C93EB40D9A9CA000B9E0C8 /* sfml-window-d.framework */, ); name = Products; sourceTree = ""; @@ -895,6 +914,7 @@ A093E3B90D8BF8C2002236B4 /* sfml-audio */ = { isa = PBXGroup; children = ( + A0B617720F66936F005E0970 /* sndfile.framework */, A01A3AD70E75181300D0BA9B /* Sources */, A093E39B0D8BF89B002236B4 /* sfml-audio-Info.plist */, ); @@ -920,6 +940,7 @@ A09EEBF40D8C19BF00F6C625 /* Clock.cpp */, A09EEBF50D8C19BF00F6C625 /* Lock.cpp */, A09EEBF60D8C19BF00F6C625 /* Sleep.cpp */, + A0EEDE980F59D49C0023A7F7 /* Initializer.cpp */, ); name = Sources; sourceTree = SOURCE_ROOT; @@ -1247,8 +1268,8 @@ A04C59AF0EDDBA9C00935061 /* AppController.h in Headers */, A04C59B20EDDBA9C00935061 /* Joystick.hpp in Headers */, A04C59B40EDDBA9C00935061 /* VideoModeSupport.hpp in Headers */, - A04C59B50EDDBA9C00935061 /* WindowController.h in Headers */, A04C59B70EDDBA9C00935061 /* WindowImplCocoa.hpp in Headers */, + A0CE9FE70F46F72500FD00CE /* GLKit.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1290,7 +1311,7 @@ ); name = "sfml-system"; productName = "sfml-system"; - productReference = A093E37F0D8BF87A002236B4 /* sfml-system.framework */; + productReference = A093E37F0D8BF87A002236B4 /* sfml-system-d.framework */; productType = "com.apple.product-type.framework"; }; A093E3870D8BF885002236B4 /* sfml-network */ = { @@ -1309,7 +1330,7 @@ ); name = "sfml-network"; productName = "sfml-network"; - productReference = A093E3880D8BF885002236B4 /* sfml-network.framework */; + productReference = A093E3880D8BF885002236B4 /* sfml-network-d.framework */; productType = "com.apple.product-type.framework"; }; A093E3990D8BF89B002236B4 /* sfml-audio */ = { @@ -1320,6 +1341,7 @@ A093E3960D8BF89B002236B4 /* Resources */, A093E3970D8BF89B002236B4 /* Sources */, A093E3980D8BF89B002236B4 /* Frameworks */, + A0B617500F66926C005E0970 /* CopyFiles */, ); buildRules = ( ); @@ -1328,7 +1350,7 @@ ); name = "sfml-audio"; productName = "sfml-audio"; - productReference = A093E39A0D8BF89B002236B4 /* sfml-audio.framework */; + productReference = A093E39A0D8BF89B002236B4 /* sfml-audio-d.framework */; productType = "com.apple.product-type.framework"; }; A093E3A20D8BF8A2002236B4 /* sfml-graphics */ = { @@ -1348,7 +1370,7 @@ ); name = "sfml-graphics"; productName = "sfml-graphics"; - productReference = A093E3A30D8BF8A2002236B4 /* sfml-graphics.framework */; + productReference = A093E3A30D8BF8A2002236B4 /* sfml-graphics-d.framework */; productType = "com.apple.product-type.framework"; }; A0C93EB30D9A9CA000B9E0C8 /* sfml-window */ = { @@ -1367,7 +1389,7 @@ ); name = "sfml-window"; productName = "sfml-window"; - productReference = A0C93EB40D9A9CA000B9E0C8 /* sfml-window.framework */; + productReference = A0C93EB40D9A9CA000B9E0C8 /* sfml-window-d.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -1476,6 +1498,7 @@ A09EEBFE0D8C19BF00F6C625 /* Lock.cpp in Sources */, A09EEBFF0D8C19BF00F6C625 /* Sleep.cpp in Sources */, A01C69C90E3E63CE00ED3F04 /* Unicode.cpp in Sources */, + A0EEDE990F59D49C0023A7F7 /* Initializer.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1625,8 +1648,8 @@ A04C59B00EDDBA9C00935061 /* AppController.mm in Sources */, A04C59B10EDDBA9C00935061 /* Joystick.cpp in Sources */, A04C59B30EDDBA9C00935061 /* VideoModeSupport.cpp in Sources */, - A04C59B60EDDBA9C00935061 /* WindowController.mm in Sources */, A04C59B80EDDBA9C00935061 /* WindowImplCocoa.mm in Sources */, + A0CE9FE80F46F72500FD00CE /* GLKit.mm in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1715,7 +1738,7 @@ SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = ../../lib/xcode; + SYMROOT = ../../lib; }; name = Debug; }; @@ -1742,7 +1765,7 @@ ); SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static; - SYMROOT = ../../lib/xcode; + SYMROOT = ../../lib; }; name = Release; }; @@ -1800,6 +1823,7 @@ OTHER_REZFLAGS = ""; PRODUCT_NAME = SFML; SECTORDER_FLAGS = ""; + SYMROOT = ../../lib; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", @@ -1828,6 +1852,7 @@ OTHER_REZFLAGS = ""; PRODUCT_NAME = SFML; SECTORDER_FLAGS = ""; + SYMROOT = ../../lib; WARNING_CFLAGS = ( "-Wmost", "-Wno-four-char-constants", @@ -1842,6 +1867,11 @@ COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../extlibs/libs-xcode\""; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; @@ -1854,7 +1884,6 @@ INSTALL_PATH = "@executable_path/../Frameworks"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( - "$(SRCROOT)/../../extlibs/libs-xcode/libsndfile.a", "-framework", OpenAL, ); @@ -1875,6 +1904,11 @@ COPY_PHASE_STRIP = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../extlibs/libs-xcode\""; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; @@ -1886,7 +1920,6 @@ INFOPLIST_FILE = "sfml-audio-Info.plist"; INSTALL_PATH = "@executable_path/../Frameworks"; OTHER_LDFLAGS = ( - "$(SRCROOT)/../../extlibs/libs-xcode/libsndfile.a", "-framework", OpenAL, ); @@ -2041,7 +2074,10 @@ INFOPLIST_FILE = "sfml-system-Info.plist"; INSTALL_PATH = "@executable_path/../Frameworks"; OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = ( + "-framework", + CoreFoundation, + ); OTHER_REZFLAGS = ""; PRODUCT_NAME = "sfml-system-d"; SECTORDER_FLAGS = ""; @@ -2069,7 +2105,10 @@ INFOPLIST_FILE = "sfml-system-Info.plist"; INSTALL_PATH = "@executable_path/../Frameworks"; OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = ( + "-framework", + CoreFoundation, + ); OTHER_REZFLAGS = ""; PRODUCT_NAME = "sfml-system"; SECTORDER_FLAGS = ""; @@ -2157,21 +2196,29 @@ isa = XCBuildConfiguration; buildSettings = { ARCHS = "$(NATIVE_ARCH)"; + CONFIGURATION_BUILD_DIR = ../../lib; COPY_PHASE_STRIP = NO; + GCC_DEBUGGING_SYMBOLS = full; GCC_OPTIMIZATION_LEVEL = 0; GCC_VERSION = ""; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_MISSING_NEWLINE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES; + GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; GCC_WARN_MISSING_PARENTHESES = YES; GCC_WARN_SHADOW = YES; GCC_WARN_SIGN_COMPARE = YES; GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; GCC_WARN_UNINITIALIZED_AUTOS = NO; + GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - OTHER_CFLAGS = ""; + OTHER_CFLAGS = "-g3"; SDKROOT = ""; STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = build; + SYMROOT = ../../lib; }; name = Development; }; @@ -2226,6 +2273,11 @@ COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../extlibs/libs-xcode\""; FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; @@ -2238,7 +2290,6 @@ INSTALL_PATH = "@executable_path/../Frameworks"; OTHER_CFLAGS = ""; OTHER_LDFLAGS = ( - "$(SRCROOT)/../../extlibs/libs-xcode/libsndfile.a", "-framework", OpenAL, ); @@ -2324,6 +2375,7 @@ FRAMEWORK_VERSION = A; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; + GCC_VERSION = 4.2; HEADER_SEARCH_PATHS = ( "${SRCROOT}/../../src", "${SRCROOT}/../../include", @@ -2331,7 +2383,10 @@ INFOPLIST_FILE = "sfml-system-Info.plist"; INSTALL_PATH = "@executable_path/../Frameworks"; OTHER_CFLAGS = ""; - OTHER_LDFLAGS = ""; + OTHER_LDFLAGS = ( + "-framework", + CoreFoundation, + ); OTHER_REZFLAGS = ""; PRODUCT_NAME = "sfml-system-d"; SECTORDER_FLAGS = ""; @@ -2385,9 +2440,9 @@ A02679DD0E5CDB03008D4C81 /* Build configuration list for PBXProject "SFML" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0C9DDC80E8BE5D10084CFD8 /* Development */, A02679C20E5CDB03008D4C81 /* Debug */, A02679C30E5CDB03008D4C81 /* Release */, + A0C9DDC80E8BE5D10084CFD8 /* Development */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -2395,9 +2450,9 @@ A02679DE0E5CDB03008D4C81 /* Build configuration list for PBXNativeTarget "SFML" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0C9DDCA0E8BE5D10084CFD8 /* Development */, A02679C80E5CDB03008D4C81 /* Debug */, A02679C90E5CDB03008D4C81 /* Release */, + A0C9DDCA0E8BE5D10084CFD8 /* Development */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -2405,9 +2460,9 @@ A02679DF0E5CDB03008D4C81 /* Build configuration list for PBXNativeTarget "sfml-system" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0C9DDCE0E8BE5D10084CFD8 /* Development */, A02679D40E5CDB03008D4C81 /* Debug */, A02679D50E5CDB03008D4C81 /* Release */, + A0C9DDCE0E8BE5D10084CFD8 /* Development */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -2415,9 +2470,9 @@ A02679E00E5CDB03008D4C81 /* Build configuration list for PBXNativeTarget "sfml-network" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0C9DDCD0E8BE5D10084CFD8 /* Development */, A02679D10E5CDB03008D4C81 /* Debug */, A02679D20E5CDB03008D4C81 /* Release */, + A0C9DDCD0E8BE5D10084CFD8 /* Development */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -2425,9 +2480,9 @@ A02679E10E5CDB03008D4C81 /* Build configuration list for PBXNativeTarget "sfml-audio" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0C9DDCB0E8BE5D10084CFD8 /* Development */, A02679CB0E5CDB03008D4C81 /* Debug */, A02679CC0E5CDB03008D4C81 /* Release */, + A0C9DDCB0E8BE5D10084CFD8 /* Development */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -2435,9 +2490,9 @@ A02679E20E5CDB03008D4C81 /* Build configuration list for PBXNativeTarget "sfml-window" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0C9DDCF0E8BE5D10084CFD8 /* Development */, A02679D70E5CDB03008D4C81 /* Debug */, A02679D80E5CDB03008D4C81 /* Release */, + A0C9DDCF0E8BE5D10084CFD8 /* Development */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -2445,9 +2500,9 @@ A02679E30E5CDB03008D4C81 /* Build configuration list for PBXNativeTarget "sfml-graphics" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0C9DDCC0E8BE5D10084CFD8 /* Development */, A02679CE0E5CDB03008D4C81 /* Debug */, A02679CF0E5CDB03008D4C81 /* Release */, + A0C9DDCC0E8BE5D10084CFD8 /* Development */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -2455,9 +2510,9 @@ A02679E40E5CDB03008D4C81 /* Build configuration list for PBXAggregateTarget "All" */ = { isa = XCConfigurationList; buildConfigurations = ( - A0C9DDC90E8BE5D10084CFD8 /* Development */, A02679C50E5CDB03008D4C81 /* Debug */, A02679C60E5CDB03008D4C81 /* Release */, + A0C9DDC90E8BE5D10084CFD8 /* Development */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; diff --git a/dotnet/src/Audio/Listener.cs b/dotnet/src/Audio/Listener.cs index da0c2237f..03f97daa4 100644 --- a/dotnet/src/Audio/Listener.cs +++ b/dotnet/src/Audio/Listener.cs @@ -20,7 +20,7 @@ namespace SFML /// Global volume of all sounds, in range [0 .. 100] (default is 100) /// //////////////////////////////////////////////////////////// - static float GlobalVolume + public static float GlobalVolume { get {return sfListener_GetGlobalVolume();} set {sfListener_SetGlobalVolume(value);} @@ -31,7 +31,7 @@ namespace SFML /// 3D position of the listener (default is (0, 0, 0)) /// //////////////////////////////////////////////////////////// - static Vector3 Position + public static Vector3 Position { get {Vector3 v; sfListener_GetPosition(out v.X, out v.Y, out v.Z); return v;} set {sfListener_SetPosition(value.X, value.Y, value.Z);} @@ -43,7 +43,7 @@ namespace SFML /// (default is (0, 0, -1)) /// //////////////////////////////////////////////////////////// - static Vector3 Target + public static Vector3 Target { get {Vector3 v; sfListener_GetTarget(out v.X, out v.Y, out v.Z); return v;} set {sfListener_SetTarget(value.X, value.Y, value.Z);} diff --git a/dotnet/src/Audio/Music.cs b/dotnet/src/Audio/Music.cs index 988761ea7..41be7c6e1 100644 --- a/dotnet/src/Audio/Music.cs +++ b/dotnet/src/Audio/Music.cs @@ -165,6 +165,19 @@ namespace SFML set {sfMusic_SetPosition(This, value.X, value.Y, value.Z);} } + //////////////////////////////////////////////////////////// + /// + /// Is the music's position relative to the listener's position, + /// or is it absolute? + /// Default value is false (absolute) + /// + //////////////////////////////////////////////////////////// + public bool RelativeToListener + { + get {return sfMusic_IsRelativeToListener(This);} + set {sfMusic_SetRelativeToListener(This, value);} + } + //////////////////////////////////////////////////////////// /// /// Minimum distance of the music. Closer than this distance, @@ -213,70 +226,76 @@ namespace SFML } #region Imports - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern IntPtr sfMusic_CreateFromFile(string Filename); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] unsafe static extern IntPtr sfMusic_CreateFromMemory(char* Data, uint SizeInBytes); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_Destroy(IntPtr MusicStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_Play(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_Pause(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_Stop(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern SoundStatus sfMusic_GetStatus(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern float sfMusic_GetDuration(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern uint sfMusic_GetChannelsCount(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern uint sfMusic_GetSampleRate(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_SetPitch(IntPtr Music, float Pitch); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_SetLoop(IntPtr Music, bool Loop); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_SetVolume(IntPtr Music, float Volume); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_SetPosition(IntPtr Music, float X, float Y, float Z); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] + static extern void sfMusic_SetRelativeToListener(IntPtr Music, bool Relative); + + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_SetMinDistance(IntPtr Music, float MinDistance); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_SetAttenuation(IntPtr Music, float Attenuation); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern bool sfMusic_GetLoop(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern float sfMusic_GetPitch(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern float sfMusic_GetVolume(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfMusic_GetPosition(IntPtr Music, out float X, out float Y, out float Z); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] + static extern bool sfMusic_IsRelativeToListener(IntPtr Music); + + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern float sfMusic_GetMinDistance(IntPtr Music); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern float sfMusic_GetAttenuation(IntPtr Music); [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] diff --git a/dotnet/src/Audio/Sound.cs b/dotnet/src/Audio/Sound.cs index d6d499ede..93eb34481 100644 --- a/dotnet/src/Audio/Sound.cs +++ b/dotnet/src/Audio/Sound.cs @@ -159,6 +159,19 @@ namespace SFML set {sfSound_SetPosition(This, value.X, value.Y, value.Z);} } + //////////////////////////////////////////////////////////// + /// + /// Is the sound's position relative to the listener's position, + /// or is it absolute? + /// Default value is false (absolute) + /// + //////////////////////////////////////////////////////////// + public bool RelativeToListener + { + get {return sfSound_IsRelativeToListener(This);} + set {sfSound_SetRelativeToListener(This, value);} + } + //////////////////////////////////////////////////////////// /// /// Minimum distance of the sound. Closer than this distance, @@ -238,6 +251,9 @@ namespace SFML [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSound_SetPosition(IntPtr Sound, float X, float Y, float Z); + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] + static extern void sfSound_SetRelativeToListener(IntPtr Sound, bool Relative); + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSound_SetMinDistance(IntPtr Sound, float MinDistance); @@ -256,6 +272,9 @@ namespace SFML [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSound_GetPosition(IntPtr Sound, out float X, out float Y, out float Z); + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] + static extern bool sfSound_IsRelativeToListener(IntPtr Sound); + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern float sfSound_GetMinDistance(IntPtr Sound); diff --git a/dotnet/src/Audio/SoundRecorder.cs b/dotnet/src/Audio/SoundRecorder.cs index 3f39c5a54..1c8e79d04 100644 --- a/dotnet/src/Audio/SoundRecorder.cs +++ b/dotnet/src/Audio/SoundRecorder.cs @@ -157,22 +157,22 @@ namespace SFML private StopCallback myStopCallback; #region Imports - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern IntPtr sfSoundRecorder_Create(StartCallback OnStart, ProcessCallback OnProcess, StopCallback OnStop, IntPtr UserData); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundRecorder_Destroy(IntPtr SoundRecorder); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundRecorder_Start(IntPtr SoundRecorder, uint SampleRate); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundRecorder_Stop(IntPtr SoundRecorder); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern uint sfSoundRecorder_GetSampleRate(IntPtr SoundRecorder); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern bool sfSoundRecorder_CanCapture(); #endregion } diff --git a/dotnet/src/Audio/SoundStream.cs b/dotnet/src/Audio/SoundStream.cs index c8d019c32..b0c4a8063 100644 --- a/dotnet/src/Audio/SoundStream.cs +++ b/dotnet/src/Audio/SoundStream.cs @@ -130,6 +130,19 @@ namespace SFML set {sfSoundStream_SetPosition(This, value.X, value.Y, value.Z);} } + //////////////////////////////////////////////////////////// + /// + /// Is the sound stream's position relative to the listener's position, + /// or is it absolute? + /// Default value is false (absolute) + /// + //////////////////////////////////////////////////////////// + public bool RelativeToListener + { + get {return sfSoundStream_IsRelativeToListener(This);} + set {sfSoundStream_SetRelativeToListener(This, value);} + } + //////////////////////////////////////////////////////////// /// /// Minimum distance of the sound stream. Closer than this distance, @@ -275,64 +288,70 @@ namespace SFML private short[] myTempBuffer; #region Imports - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern IntPtr sfSoundStream_Create(StartCallbackType OnStart, GetDataCallbackType OnGetData, uint ChannelsCount, uint SampleRate, IntPtr UserData); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_Destroy(IntPtr SoundStreamStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_Play(IntPtr SoundStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_Pause(IntPtr SoundStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_Stop(IntPtr SoundStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern SoundStatus sfSoundStream_GetStatus(IntPtr SoundStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern uint sfSoundStream_GetChannelsCount(IntPtr SoundStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern uint sfSoundStream_GetSampleRate(IntPtr SoundStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_SetLoop(IntPtr SoundStream, bool Loop); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_SetPitch(IntPtr SoundStream, float Pitch); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_SetVolume(IntPtr SoundStream, float Volume); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_SetPosition(IntPtr SoundStream, float X, float Y, float Z); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] + static extern void sfSoundStream_SetRelativeToListener(IntPtr SoundStream, bool Relative); + + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_SetMinDistance(IntPtr SoundStream, float MinDistance); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_SetAttenuation(IntPtr SoundStream, float Attenuation); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern bool sfSoundStream_GetLoop(IntPtr SoundStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern float sfSoundStream_GetPitch(IntPtr SoundStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern float sfSoundStream_GetVolume(IntPtr SoundStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern void sfSoundStream_GetPosition(IntPtr SoundStream, out float X, out float Y, out float Z); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] + static extern bool sfSoundStream_IsRelativeToListener(IntPtr SoundStream); + + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern float sfSoundStream_GetMinDistance(IntPtr SoundStream); - [DllImport("csfml-audio")] + [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] static extern float sfSoundStream_GetAttenuation(IntPtr SoundStream); [DllImport("csfml-audio"), SuppressUnmanagedCodeSecurity] diff --git a/dotnet/src/Graphics/RenderWindow.cs b/dotnet/src/Graphics/RenderWindow.cs index 3b23ee2ce..9553c9e77 100644 --- a/dotnet/src/Graphics/RenderWindow.cs +++ b/dotnet/src/Graphics/RenderWindow.cs @@ -519,7 +519,7 @@ namespace SFML [DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity] static extern void sfRenderWindow_EnableKeyRepeat(IntPtr This, bool Enable); - [DllImport("csfml-graphics")] + [DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity] unsafe static extern void sfRenderWindow_SetIcon(IntPtr This, uint Width, uint Height, byte* Pixels); [DllImport("csfml-graphics"), SuppressUnmanagedCodeSecurity] diff --git a/extlibs/libs-xcode/libsndfile.a b/extlibs/libs-xcode/libsndfile.a deleted file mode 100644 index d7181c6d5..000000000 Binary files a/extlibs/libs-xcode/libsndfile.a and /dev/null differ diff --git a/extlibs/libs-xcode/sndfile.framework/Resources b/extlibs/libs-xcode/sndfile.framework/Resources new file mode 120000 index 000000000..953ee36f3 --- /dev/null +++ b/extlibs/libs-xcode/sndfile.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/extlibs/libs-xcode/sndfile.framework/Versions/A/Resources/Info.plist b/extlibs/libs-xcode/sndfile.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000..4ae5f883c --- /dev/null +++ b/extlibs/libs-xcode/sndfile.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + sndfile + CFBundleIdentifier + com.mega-nerd.sndfile + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + FMWK + CFBundleSignature + ???? + CFBundleVersion + 1.0 + + diff --git a/extlibs/libs-xcode/sndfile.framework/Versions/A/sndfile b/extlibs/libs-xcode/sndfile.framework/Versions/A/sndfile new file mode 100755 index 000000000..70749517e Binary files /dev/null and b/extlibs/libs-xcode/sndfile.framework/Versions/A/sndfile differ diff --git a/extlibs/libs-xcode/sndfile.framework/Versions/Current b/extlibs/libs-xcode/sndfile.framework/Versions/Current new file mode 120000 index 000000000..8c7e5a667 --- /dev/null +++ b/extlibs/libs-xcode/sndfile.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/extlibs/libs-xcode/sndfile.framework/sndfile b/extlibs/libs-xcode/sndfile.framework/sndfile new file mode 120000 index 000000000..1e01cac9a --- /dev/null +++ b/extlibs/libs-xcode/sndfile.framework/sndfile @@ -0,0 +1 @@ +Versions/Current/sndfile \ No newline at end of file diff --git a/include/SFML/Audio/Sound.hpp b/include/SFML/Audio/Sound.hpp index 4fd1b2419..691d6338c 100644 --- a/include/SFML/Audio/Sound.hpp +++ b/include/SFML/Audio/Sound.hpp @@ -159,6 +159,16 @@ public : //////////////////////////////////////////////////////////// void SetPosition(const Vector3f& Position); + //////////////////////////////////////////////////////////// + /// Make the sound's position relative to the listener's + /// position, or absolute. + /// The default value is false (absolute) + /// + /// \param Relative : True to set the position relative, false to set it absolute + /// + //////////////////////////////////////////////////////////// + void SetRelativeToListener(bool Relative); + //////////////////////////////////////////////////////////// /// Set the minimum distance - closer than this distance, /// the listener will hear the sound at its maximum volume. @@ -227,6 +237,15 @@ public : //////////////////////////////////////////////////////////// Vector3f GetPosition() const; + //////////////////////////////////////////////////////////// + /// Tell if the sound's position is relative to the listener's + /// position, or if it's absolute + /// + /// \return True if the position is relative, false if it's absolute + /// + //////////////////////////////////////////////////////////// + bool IsRelativeToListener() const; + //////////////////////////////////////////////////////////// /// Get the minimum distance /// diff --git a/include/SFML/Audio/SoundStream.hpp b/include/SFML/Audio/SoundStream.hpp index 75991dd1e..6df0c57bc 100644 --- a/include/SFML/Audio/SoundStream.hpp +++ b/include/SFML/Audio/SoundStream.hpp @@ -53,11 +53,13 @@ public : using Sound::SetPitch; using Sound::SetVolume; using Sound::SetPosition; + using Sound::SetRelativeToListener; using Sound::SetMinDistance; using Sound::SetAttenuation; using Sound::GetPitch; using Sound::GetVolume; using Sound::GetPosition; + using Sound::IsRelativeToListener; using Sound::GetMinDistance; using Sound::GetAttenuation; diff --git a/python/PySFML/__init__.py b/python/PySFML/__init__.py index 8b1378917..48163e520 100644 --- a/python/PySFML/__init__.py +++ b/python/PySFML/__init__.py @@ -1 +1,2 @@ +__all__ = ['sf'] diff --git a/python/samples/sound_stream.py b/python/samples/sound_stream.py index e3d588be6..a4e7a470a 100755 --- a/python/samples/sound_stream.py +++ b/python/samples/sound_stream.py @@ -24,7 +24,7 @@ class MyCustomStream(sf.SoundStream): # Check if there is enough data to stream if self.myOffset > len(self.myBuffer): # Returning something else than a string means that we want to stop playing the stream - return False + return "" # Data contains the string of samples we will return if self.myOffset + self.myBufferSize >= len(self.myBuffer): print "End of audio data reached" diff --git a/python/samples/sound_stream_py3.py b/python/samples/sound_stream_py3.py index 9cae12797..bd1a73f8e 100755 --- a/python/samples/sound_stream_py3.py +++ b/python/samples/sound_stream_py3.py @@ -24,7 +24,7 @@ class MyCustomStream(sf.SoundStream): # Check if there is enough data to stream if self.myOffset > len(self.myBuffer): # Returning something else than a string means that we want to stop playing the stream - return False + return "" # Data contains the string of samples we will return if self.myOffset + self.myBufferSize >= len(self.myBuffer): print("End of audio data reached") diff --git a/python/samples/worm.py b/python/samples/worm.py index 2039f315b..685ff01f4 100644 --- a/python/samples/worm.py +++ b/python/samples/worm.py @@ -234,14 +234,9 @@ class Main: while self.win.GetEvent(event): # Event Handler if event.Type == sf.Event.Closed: self.win.Close() - elif event.Type == sf.Event.KeyPressed: - for key in self.keys: - if event.Key.Code == key: - self.keys[key](True) - elif event.Type == sf.Event.KeyReleased: - for key in self.keys: - if event.Key.Code == key: - self.keys[key](False) + elif event.Type == sf.Event.KeyPressed or event.Type == sf.Event.KeyReleased: + if event.Key.Code in self.keys: + self.keys[event.Key.Code](event.Type == sf.Event.KeyPressed) self.win.Display() self.win.Clear(background_color) self.next_frame(self.win) diff --git a/python/src/Clock.cpp b/python/src/Clock.cpp index 714a6603a..c6ba62880 100644 --- a/python/src/Clock.cpp +++ b/python/src/Clock.cpp @@ -41,21 +41,12 @@ PySfClock_new(PyTypeObject *type, PyObject *args, PyObject *kwds) self = (PySfClock *)type->tp_alloc(type, 0); if (self != NULL) - { - } + self->obj = new sf::Clock(); return (PyObject *)self; } -static int -PySfClock_init(PySfClock *self, PyObject *args, PyObject *kwds) -{ - self->obj = new sf::Clock(); - return 0; -} - - static PyObject* PySfClock_GetElapsedTime(PySfClock *self) { @@ -111,7 +102,7 @@ PyTypeObject PySfClockType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfClock_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfClock_new, /* tp_new */ }; diff --git a/python/src/Color.cpp b/python/src/Color.cpp index be8f16754..567a2da93 100644 --- a/python/src/Color.cpp +++ b/python/src/Color.cpp @@ -57,52 +57,28 @@ static PyObject * PySfColor_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PySfColor *self; - self = (PySfColor *)type->tp_alloc(type, 0); - if (self != NULL) { self->r = 0; self->g = 0; self->b = 0; self->a = 255; + self->obj = new sf::Color(0, 0, 0, 255); } - return (PyObject *)self; } - -static int -PySfColor_init(PySfColor *self, PyObject *args, PyObject *kwds) +static int +PySfColor_init(PySfColor *self, PyObject *args, PyObject *kwds) { const char *kwlist[] = {"r", "g", "b", "a", NULL}; - - long int rgba=0; - - - if (PyTuple_Size(args) == 1) - { - if ( !PyArg_ParseTuple(args, "l", &rgba)) - return -1; - self->r = rgba & 0xff; - self->g = rgba>>8 & 0xff; - self->b = rgba>>16 & 0xff; - self->a = rgba>>24 & 0xff; - } - else if (PyTuple_Size(args) > 1) - if (! PyArg_ParseTupleAndKeywords(args, kwds, "BBB|B", (char **)kwlist, &(self->r), &(self->g), &(self->b), &(self->a))) - return -1; - - self->obj = new sf::Color(self->r, self->g, self->b, self->a); - + if (!PyArg_ParseTupleAndKeywords(args, kwds, "BBB|B:Color.__init__", (char **)kwlist, &(self->r), &(self->g), &(self->b), &(self->a))) + return -1; + PySfColorUpdate(self); return 0; } -static PyMethodDef PySfColor_methods[] = { - {NULL} /* Sentinel */ -}; - - PyTypeObject PySfColorType = { head_init "Color", /*tp_name*/ @@ -131,7 +107,7 @@ PyTypeObject PySfColorType = { 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ - PySfColor_methods, /* tp_methods */ + 0, /* tp_methods */ PySfColor_members, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ @@ -147,7 +123,7 @@ PyTypeObject PySfColorType = { PySfColor * GetNewPySfColor() { - return (PySfColor *)PySfColor_new(&PySfColorType, NULL, NULL); + return PyObject_New(PySfColor, &PySfColorType); } void @@ -218,16 +194,5 @@ PySfColor_InitConst() Cyan->a = sf::Color::Cyan.a; PyDict_SetItemString(PySfColorType.tp_dict, "Cyan", (PyObject *)Cyan); Py_DECREF(Cyan); - -/* - static const Color Black; ///< Black predefined color - static const Color White; ///< White predefined color - static const Color Red; ///< Red predefined color - static const Color Green; ///< Green predefined color - static const Color Blue; ///< Blue predefined color - static const Color Yellow; ///< Yellow predefined color - static const Color Magenta; ///< Magenta predefined color - static const Color Cyan; ///< Cyan predefined color -*/ } diff --git a/python/src/Drawable.cpp b/python/src/Drawable.cpp index 4ac64df96..75ab0407c 100644 --- a/python/src/Drawable.cpp +++ b/python/src/Drawable.cpp @@ -36,7 +36,10 @@ void CustomDrawable::Render(sf::RenderTarget& Target) const if (RenderFunction) PyObject_CallFunction(RenderFunction, (char *)"O", RenderWindow); else + { PyErr_SetString(PyExc_RuntimeError, "Custom drawables must have a render method defined"); + PyErr_Print(); + } } static void @@ -51,17 +54,18 @@ PySfDrawable_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PySfDrawable *self; self = (PySfDrawable *)type->tp_alloc(type, 0); + if (self != NULL) + { + self->IsCustom = true; + self->obj = new CustomDrawable(); + if (PyObject_HasAttrString((PyObject *)self, "Render")) + self->obj->RenderFunction = PyObject_GetAttrString((PyObject *)self, "Render"); + else + self->obj->RenderFunction = NULL; + self->obj->RenderWindow = NULL; + } return (PyObject *)self; } - -static int -PySfDrawable_init(PySfDrawable *self, PyObject *args, PyObject *kwds) -{ - self->obj = new CustomDrawable(); - self->obj->RenderFunction = NULL; - self->obj->RenderWindow = NULL; - return 0; -} static PyObject * PySfDrawable_SetX(PySfDrawable* self, PyObject *args) @@ -123,7 +127,7 @@ static PyObject * PySfDrawable_SetColor(PySfDrawable* self, PyObject *args) { PySfColor *Color = (PySfColor *)args; - if (! PyObject_TypeCheck(args, &PySfColorType)) + if (!PyObject_TypeCheck(args, &PySfColorType)) { PyErr_SetString(PyExc_TypeError, "Drawable.SetColor() Argument is not a sf.Color"); return NULL; @@ -226,6 +230,27 @@ PySfDrawable_TransformToGlobal(PySfDrawable* self, PyObject *args) return Py_BuildValue("ff", result.x, result.y); } +int PySfDrawable_SetAttr(PyObject* self, PyObject *attr_name, PyObject *v) +{ +#ifdef IS_PY3K + PyObject *string = PyUnicode_AsUTF8String(attr_name); + if (string == NULL) return NULL; + std::string Name(PyBytes_AsString(string)); +#else + std::string Name(PyString_AsString(attr_name)); +#endif + if (Name == "Render") + { + Py_CLEAR(((PySfDrawable*)self)->obj->RenderFunction); + Py_INCREF(v); + ((PySfDrawable*)self)->obj->RenderFunction = v; + } +#ifdef IS_PY3K + Py_DECREF(string); +#endif + return PyObject_GenericSetAttr(self, attr_name, v); +} + static PyMethodDef PySfDrawable_methods[] = { {"TransformToLocal", (PyCFunction)PySfDrawable_TransformToLocal, METH_VARARGS, "TransformToLocal(X, Y)\n\ Transform a point from global coordinates into local coordinates (ie it applies the inverse of object's center, translation, rotation and scale to the point). Returns a tuple.\n\ @@ -274,7 +299,7 @@ PyTypeObject PySfDrawableType = { 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ - 0, /*tp_setattro*/ + PySfDrawable_SetAttr, /*tp_setattro*/ 0, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/ "Abstract base class for every object that can be drawn into a render window.", /* tp_doc */ @@ -292,15 +317,9 @@ PyTypeObject PySfDrawableType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfDrawable_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfDrawable_new, /* tp_new */ }; -PySfDrawable * -GetNewPySfDrawable() -{ - return (PySfDrawable *)PySfDrawable_new(&PySfDrawableType, NULL, NULL); -} - diff --git a/python/src/Drawable.hpp b/python/src/Drawable.hpp index 6e227271a..84049c5a3 100644 --- a/python/src/Drawable.hpp +++ b/python/src/Drawable.hpp @@ -44,11 +44,9 @@ public : typedef struct { PyObject_HEAD + bool IsCustom; CustomDrawable *obj; } PySfDrawable; -PySfDrawable * -GetNewPySfDrawable(); - #endif diff --git a/python/src/Event.cpp b/python/src/Event.cpp index e6a899c00..449295deb 100644 --- a/python/src/Event.cpp +++ b/python/src/Event.cpp @@ -51,12 +51,6 @@ PySfEventText_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return (PyObject *)self; } -int -PySfEventText_init(PySfEventText *self, PyObject *args, PyObject *kwds) -{ - return 0; -} - void PySfEventText_dealloc(PySfEventText* self) { @@ -99,7 +93,7 @@ PyTypeObject PySfEventTextType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfEventText_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfEventText_new, /* tp_new */ }; @@ -129,12 +123,6 @@ PySfEventKey_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return (PyObject *)self; } -int -PySfEventKey_init(PySfEventKey *self, PyObject *args, PyObject *kwds) -{ - return 0; -} - void PySfEventKey_dealloc(PySfEventKey* self) { @@ -185,7 +173,7 @@ PyTypeObject PySfEventKeyType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfEventKey_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfEventKey_new, /* tp_new */ }; @@ -210,12 +198,6 @@ PySfEventMouseMove_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return (PyObject *)self; } -int -PySfEventMouseMove_init(PySfEventMouseMove *self, PyObject *args, PyObject *kwds) -{ - return 0; -} - void PySfEventMouseMove_dealloc(PySfEventMouseMove *self) { @@ -265,7 +247,7 @@ PyTypeObject PySfEventMouseMoveType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfEventMouseMove_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfEventMouseMove_new, /* tp_new */ }; @@ -291,12 +273,6 @@ PySfEventMouseButton_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return (PyObject *)self; } -int -PySfEventMouseButton_init(PySfEventMouseButton *self, PyObject *args, PyObject *kwds) -{ - return 0; -} - void PySfEventMouseButton_dealloc(PySfEventMouseButton* self) { @@ -347,7 +323,7 @@ PyTypeObject PySfEventMouseButtonType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfEventMouseButton_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfEventMouseButton_new, /* tp_new */ }; @@ -371,12 +347,6 @@ PySfEventMouseWheel_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return (PyObject *)self; } -int -PySfEventMouseWheel_init(PySfEventMouseWheel *self, PyObject *args, PyObject *kwds) -{ - return 0; -} - void PySfEventMouseWheel_dealloc(PySfEventMouseWheel* self) { @@ -424,7 +394,7 @@ PyTypeObject PySfEventMouseWheelType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfEventMouseWheel_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfEventMouseWheel_new, /* tp_new */ }; @@ -450,12 +420,6 @@ PySfEventJoyMove_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return (PyObject *)self; } -int -PySfEventJoyMove_init(PySfEventJoyMove *self, PyObject *args, PyObject *kwds) -{ - return 0; -} - void PySfEventJoyMove_dealloc(PySfEventJoyMove* self) { @@ -506,7 +470,7 @@ PyTypeObject PySfEventJoyMoveType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfEventJoyMove_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfEventJoyMove_new, /* tp_new */ }; @@ -531,12 +495,6 @@ PySfEventJoyButton_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return (PyObject *)self; } -int -PySfEventJoyButton_init(PySfEventJoyButton *self, PyObject *args, PyObject *kwds) -{ - return 0; -} - void PySfEventJoyButton_dealloc(PySfEventJoyButton* self) { @@ -586,7 +544,7 @@ PyTypeObject PySfEventJoyButtonType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfEventJoyButton_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfEventJoyButton_new, /* tp_new */ }; @@ -611,12 +569,6 @@ PySfEventSize_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return (PyObject *)self; } -int -PySfEventSize_init(PySfEventSize *self, PyObject *args, PyObject *kwds) -{ - return 0; -} - void PySfEventSize_dealloc(PySfEventSize* self) { @@ -665,7 +617,7 @@ PyTypeObject PySfEventSizeType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfEventSize_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfEventSize_new, /* tp_new */ }; @@ -680,13 +632,6 @@ PyTypeObject PySfEventSizeType = { //////////////////////////////////// -static int -PySfEvent_init(PySfEvent *self, PyObject *args, PyObject *kwds) -{ - self->obj = new sf::Event(); - return 0; -} - static PyObject * PySfEvent_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { @@ -703,6 +648,7 @@ PySfEvent_new(PyTypeObject *type, PyObject *args, PyObject *kwds) self->JoyMove = (PySfEventJoyMove *)PySfEventJoyMove_new(&PySfEventJoyMoveType, NULL, NULL); self->JoyButton = (PySfEventJoyButton *)PySfEventJoyButton_new(&PySfEventJoyButtonType, NULL, NULL); self->Size = (PySfEventSize *)PySfEventSize_new(&PySfEventSizeType, NULL, NULL); + self->obj = new sf::Event(); } return (PyObject *)self; @@ -736,10 +682,6 @@ static PyMemberDef PySfEvent_members[] = { {NULL} /* Sentinel */ }; -static PyMethodDef PySfEvent_methods[] = { - {NULL} /* Sentinel */ -}; - PyTypeObject PySfEventType = { head_init "Event", /*tp_name*/ @@ -768,7 +710,7 @@ PyTypeObject PySfEventType = { 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ - PySfEvent_methods, /* tp_methods */ + 0, /* tp_methods */ PySfEvent_members, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ @@ -776,7 +718,7 @@ PyTypeObject PySfEventType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfEvent_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfEvent_new, /* tp_new */ }; diff --git a/python/src/Font.cpp b/python/src/Font.cpp index 1458a0bd4..cd6f7bd9f 100644 --- a/python/src/Font.cpp +++ b/python/src/Font.cpp @@ -42,17 +42,13 @@ PySfFont_new(PyTypeObject *type, PyObject *args, PyObject *kwds) PySfFont *self; self = (PySfFont *)type->tp_alloc(type, 0); if (self != NULL) + { self->Owner = true; + self->obj = new sf::Font(); + } return (PyObject *)self; } -static int -PySfFont_init(PySfFont *self, PyObject *args, PyObject *kwds) -{ - self->obj = new sf::Font(); - return 0; -} - static PyObject * PySfFont_LoadFromFile(PySfFont* self, PyObject *args, PyObject *kwds) { @@ -63,7 +59,7 @@ PySfFont_LoadFromFile(PySfFont* self, PyObject *args, PyObject *kwds) int Length; bool result; std::string Encoding; - if (PyArg_ParseTupleAndKeywords(args, kwds, "s|I:Font.LoadFromFile", (char **)kwlist, &Filename, &Charsize)) + if (PyArg_ParseTuple(args, "s|I:Font.LoadFromFile", &Filename, &Charsize)) result = self->obj->LoadFromFile(Filename, Charsize); else if (PyArg_ParseTupleAndKeywords(args, kwds, "s|Iu:Font.LoadFromFile", (char **)kwlist, &Filename, &Charsize, &Charset)) { @@ -113,7 +109,7 @@ PySfFont_LoadFromMemory(PySfFont* self, PyObject *args, PyObject *kwds) int Length; bool result; std::string Encoding; - if (PyArg_ParseTupleAndKeywords(args, kwds, "s#|I:Font.LoadFromMemory", (char **)kwlist, &Data, &Size, &Charsize)) + if (PyArg_ParseTuple(args, "s#|I:Font.LoadFromMemory", &Data, &Size, &Charsize)) result = self->obj->LoadFromMemory(Data, Size, Charsize); else if (PyArg_ParseTupleAndKeywords(args, kwds, "s#|Iu:Font.LoadFromMemory", (char **)kwlist, &Data, &Size, &Charsize, &Charset)) { @@ -238,7 +234,7 @@ PyTypeObject PySfFontType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfFont_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfFont_new, /* tp_new */ }; @@ -246,7 +242,7 @@ PyTypeObject PySfFontType = { PySfFont * GetNewPySfFont() { - return (PySfFont *)PySfFont_new(&PySfFontType, NULL, NULL); + return PyObject_New(PySfFont, &PySfFontType); } diff --git a/python/src/Glyph.cpp b/python/src/Glyph.cpp index 2f82b058f..d7fe9fc3f 100644 --- a/python/src/Glyph.cpp +++ b/python/src/Glyph.cpp @@ -91,21 +91,13 @@ PySfGlyph_new(PyTypeObject *type, PyObject *args, PyObject *kwds) self->Advance = 0; self->Rectangle = GetNewPySfIntRect(); self->TexCoords = GetNewPySfFloatRect(); + self->obj = new sf::Glyph(); + self->Rectangle->obj = &(self->obj->Rectangle); + self->TexCoords->obj = &(self->obj->TexCoords); } return (PyObject *)self; } - -static int -PySfGlyph_init(PySfGlyph *self, PyObject *args, PyObject *kwds) -{ - self->obj = new sf::Glyph(); - self->Rectangle->obj = &(self->obj->Rectangle); - self->TexCoords->obj = &(self->obj->TexCoords); - return 0; -} - - PyTypeObject PySfGlyphType = { head_init "Glyph", /*tp_name*/ @@ -142,7 +134,7 @@ PyTypeObject PySfGlyphType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfGlyph_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfGlyph_new, /* tp_new */ }; @@ -150,6 +142,6 @@ PyTypeObject PySfGlyphType = { PySfGlyph * GetNewPySfGlyph() { - return (PySfGlyph *)PySfGlyph_new(&PySfGlyphType, NULL, NULL); + return PyObject_New(PySfGlyph, &PySfGlyphType); } diff --git a/python/src/Image.cpp b/python/src/Image.cpp index 3d8b060e7..d98e4ea29 100644 --- a/python/src/Image.cpp +++ b/python/src/Image.cpp @@ -41,13 +41,7 @@ PySfImage_dealloc(PySfImage* self) } static PyObject * -PySfImage_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - PySfImage *self; - self = (PySfImage *)type->tp_alloc(type, 0); - return (PyObject *)self; -} - +PySfImage_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static PyObject * PySfImage_Create(PySfImage* self, PyObject *args, PyObject *kwds) @@ -57,7 +51,7 @@ PySfImage_Create(PySfImage* self, PyObject *args, PyObject *kwds) unsigned int Width=0, Height=0; const char *kwlist[] = {"Width", "Height", "Color", NULL}; - if (! PyArg_ParseTupleAndKeywords(args, kwds, "|IIO!:Image.Create", (char **)kwlist, &Width, &Height, &PySfColorType, &ColorTmp)) + if (!PyArg_ParseTupleAndKeywords(args, kwds, "|IIO!:Image.Create", (char **)kwlist, &Width, &Height, &PySfColorType, &ColorTmp)) return NULL; if (ColorTmp) @@ -79,7 +73,7 @@ PySfImage_CopyScreen(PySfImage* self, PyObject *args) PySfIntRect *SourceRect=NULL; bool Result; - if (! PyArg_ParseTuple(args, "O!|O!:Image.CopyScreen", &PySfRenderWindowType, &RenderWindow, &PySfIntRectType, &SourceRect)) + if (!PyArg_ParseTuple(args, "O!|O!:Image.CopyScreen", &PySfRenderWindowType, &RenderWindow, &PySfIntRectType, &SourceRect)) return NULL; @@ -164,7 +158,7 @@ PySfImage_LoadFromMemory(PySfImage* self, PyObject *args) unsigned int SizeInBytes; char *Data; - if (! PyArg_ParseTuple(args, "s#:Image.LoadFromMemory", &Data, &SizeInBytes)) + if (!PyArg_ParseTuple(args, "s#:Image.LoadFromMemory", &Data, &SizeInBytes)) return NULL; return PyBool_FromLong(self->obj->LoadFromMemory(Data, (std::size_t) SizeInBytes)); @@ -205,9 +199,6 @@ PySfImage_SaveToFile (PySfImage *self, PyObject *args) save_to_file(self, args); } -static int -PySfImage_init(PySfImage *self, PyObject *args, PyObject *kwds); - static PyObject * PySfImage_Bind(PySfImage *self) { @@ -248,7 +239,7 @@ PySfImage_GetTexCoords(PySfImage* self, PyObject *args) bool Adjust = false; PyObject *AdjustObj = NULL; - if (! PyArg_ParseTuple(args, "O!|O", &PySfIntRectType, &RectArg, &AdjustObj)) + if (!PyArg_ParseTuple(args, "O!|O:Image.GetTextCoords", &PySfIntRectType, &RectArg, &AdjustObj)) return NULL; if (AdjustObj) @@ -258,7 +249,7 @@ PySfImage_GetTexCoords(PySfImage* self, PyObject *args) PySfFloatRect *Rect; Rect = GetNewPySfFloatRect(); - Rect->obj = new sf::FloatRect ( self->obj->GetTexCoords(*(RectArg->obj), Adjust) ); + Rect->obj = new sf::FloatRect(self->obj->GetTexCoords(*(RectArg->obj), Adjust)); Rect->Left = Rect->obj->Left; Rect->Top = Rect->obj->Top; Rect->Right = Rect->obj->Right; @@ -267,8 +258,26 @@ PySfImage_GetTexCoords(PySfImage* self, PyObject *args) return (PyObject *)Rect; } +static int +PySfImage_init(PySfImage *self, PyObject *args, PyObject *kwds) +{ + int size = PyTuple_Size(args); + if (size > 0) + { + if (PySfImage_Create(self, args, kwds) == NULL) + { + if (size != 3) + return -1; + else if (PySfImage_LoadFromPixels(self, args) == NULL) + return -1; + else PyErr_Clear(); + } + } + return 0; +} + static PyObject * -PySfImage_Copy(PySfImage* self, PyObject *args); +PySfImage_Copy(PySfImage* self, PyObject *args, PyObject *kwds); static PyMethodDef PySfImage_methods[] = { {"Copy", (PyCFunction)PySfImage_Copy, METH_VARARGS, "Copy(Source, DestX, DestY, SourceRect = sf.IntRect(0,0,0,0))\n\ @@ -352,44 +361,38 @@ Copy constructor : sf.Image(Copy) where Copy is a sf.Image instance.", /* tp_doc PySfImage_new, /* tp_new */ }; -static int -PySfImage_init(PySfImage *self, PyObject *args, PyObject *kwds) +static PyObject * +PySfImage_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - int size = PyTuple_Size(args); - if (size == 1) + PySfImage *self; + self = (PySfImage *)type->tp_alloc(type, 0); + if (self != NULL) { - PySfImage *Image; - if (PyArg_ParseTuple(args, "O!", &PySfImageType, &Image)) + if (PyTuple_Size(args) == 1) { - self->obj = new sf::Image(*(Image->obj)); - return 0; - } - else PyErr_Clear(); - } - self->obj = new sf::Image(); - if (PyTuple_Size(args) > 0) - { - if (PySfImage_Create(self, args, kwds) == NULL) - { - if (size != 3) - return -1; - else if (PySfImage_LoadFromPixels(self, args) == NULL) - return -1; + PySfImage *Image; + if (PyArg_ParseTuple(args, "O!", &PySfImageType, &Image)) + { + self->obj = new sf::Image(*(Image->obj)); + } else PyErr_Clear(); } + else self->obj = new sf::Image(); } - return 0; + return (PyObject *)self; } static PyObject * -PySfImage_Copy(PySfImage* self, PyObject *args) +PySfImage_Copy(PySfImage* self, PyObject *args, PyObject *kwds) { + const char *kwlist[] = {"Source", "DestX", "DestY", "SourceRect", "ApplyAlpha", NULL}; PySfIntRect *SourceRect = NULL; PySfImage *Source = NULL; unsigned int DestX, DestY; - PyObject *PyApplyAlpha; - bool ApplyAlpha = false; - if (! PyArg_ParseTuple(args, "O!II|O!O:Image.Copy", &PySfImageType, &Source, &DestX, &DestY, &PySfIntRectType, &SourceRect, &PyApplyAlpha)) + PyObject *PyApplyAlpha = NULL; + bool ApplyAlpha = false; + + if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!II|O!O:Image.Copy", (char **)kwlist, &PySfImageType, &Source, &DestX, &DestY, &PySfIntRectType, &SourceRect, &PyApplyAlpha)) return NULL; if (PyApplyAlpha) @@ -410,6 +413,6 @@ PySfImage_Copy(PySfImage* self, PyObject *args) PySfImage * GetNewPySfImage() { - return (PySfImage *)PySfImage_new(&PySfImageType, NULL, NULL); + return PyObject_New(PySfImage, &PySfImageType); } diff --git a/python/src/Input.cpp b/python/src/Input.cpp index c146f69f1..d3322a5bd 100644 --- a/python/src/Input.cpp +++ b/python/src/Input.cpp @@ -29,17 +29,9 @@ static PyObject * PySfInput_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - PySfInput *self; - self = (PySfInput *)type->tp_alloc(type, 0); - return (PyObject *)self; -} - -static int -PySfInput_init(PySfInput *self, PyObject *args, PyObject *kwds) { PyErr_SetString(PyExc_RuntimeError, "You can't create an Input object yourself, because an Input object must always be associated to its window.\nThe only way to get an Input is by creating a window and calling : Input = MyWindow.GetInput()."); - return -1; + return NULL; } static PyObject* @@ -129,7 +121,7 @@ PyTypeObject PySfInputType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfInput_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfInput_new, /* tp_new */ }; @@ -137,6 +129,6 @@ PyTypeObject PySfInputType = { PySfInput * GetNewPySfInput() { - return (PySfInput *)PySfInput_new(&PySfInputType, NULL, NULL); + return PyObject_New(PySfInput, &PySfInputType); } diff --git a/python/src/Listener.cpp b/python/src/Listener.cpp index 4f2f877e0..c286411e6 100644 --- a/python/src/Listener.cpp +++ b/python/src/Listener.cpp @@ -27,14 +27,6 @@ #include "compat.hpp" -static PyObject * -PySfListener_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - PySfListener *self; - self = (PySfListener *)type->tp_alloc(type, 0); - return (PyObject *)self; -} - static PyObject * PySfListener_SetGlobalVolume(PySfListener* self, PyObject *args) { @@ -130,7 +122,7 @@ PyTypeObject PySfListenerType = { 0, /* tp_dictoffset */ 0, /* tp_init */ 0, /* tp_alloc */ - PySfListener_new, /* tp_new */ + 0, /* tp_new */ }; diff --git a/python/src/Music.cpp b/python/src/Music.cpp index ed54bf5f3..fae51b21a 100644 --- a/python/src/Music.cpp +++ b/python/src/Music.cpp @@ -40,37 +40,25 @@ PySfMusic_dealloc(PySfMusic *self) static PyObject * PySfMusic_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { + unsigned int BufferSize=44100; PySfMusic *self; self = (PySfMusic *)type->tp_alloc(type, 0); + if (self != NULL) + { + if (!PyArg_ParseTuple(args, "|I:Music.__new__", &BufferSize)) + return NULL; + self->obj = new sf::Music(BufferSize); + } return (PyObject *)self; } - -static int -PySfMusic_init(PySfMusic *self, PyObject *args, PyObject *kwds) -{ - unsigned int BufferSize=44100; - int size = PyTuple_Size(args); - if (size == 1) - { - if ( !PyArg_ParseTuple(args, "I:Music.Init", &BufferSize)) - return -1; - } - else if (size > 1) - { - PyErr_SetString(PyExc_TypeError, "Music.__init__() takes at most one argument"); - } - self->obj = new sf::Music(BufferSize); - return 0; -} - static PyObject* PySfMusic_OpenFromMemory(PySfMusic *self, PyObject *args) { unsigned int SizeInBytes; char *Data; - if (! PyArg_ParseTuple(args, "s#:Music.OpenFromMemory", &Data, &SizeInBytes)) + if (!PyArg_ParseTuple(args, "s#:Music.OpenFromMemory", &Data, &SizeInBytes)) return NULL; return PyBool_FromLong(self->obj->OpenFromMemory(Data, (std::size_t) SizeInBytes)); @@ -148,7 +136,7 @@ BufferSize : Size of the internal buffer, expressed in number of samples (ie. si 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfMusic_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfMusic_new, /* tp_new */ }; diff --git a/python/src/PostFX.cpp b/python/src/PostFX.cpp index 739920308..6d797a00e 100644 --- a/python/src/PostFX.cpp +++ b/python/src/PostFX.cpp @@ -41,12 +41,7 @@ PySfPostFX_dealloc(PySfPostFX *self) } static PyObject * -PySfPostFX_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - PySfPostFX *self; - self = (PySfPostFX *)type->tp_alloc(type, 0); - return (PyObject *)self; -} +PySfPostFX_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static PyObject * PySfPostFX_LoadFromFile (PySfPostFX *self, PyObject *args) @@ -73,10 +68,6 @@ PySfPostFX_LoadFromMemory (PySfPostFX *self, PyObject *args) return PyBool_FromLong(result); } -static int -PySfPostFX_init(PySfPostFX *self, PyObject *args); - - static PyObject * PySfPostFX_SetParameter(PySfPostFX* self, PyObject *args) { char *Name; float X, Y, Z, W; int size = PyTuple_Size(args); if (!PyArg_ParseTuple(args, "sf|fff:PostFX.SetParameter", &Name, &X, &Y, &Z, &W)) return NULL; switch (size) @@ -179,24 +170,25 @@ Copy constructor : sf.PostFX(Copy) where Copy is a sf.PostFX instance.", /* tp_d 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfPostFX_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfPostFX_new, /* tp_new */ }; -static int -PySfPostFX_init(PySfPostFX *self, PyObject *args) -{ - if (PyTuple_Size(args) == 1) - { - PySfPostFX *Copy; - if (PyArg_ParseTuple(args, "O!", &PySfPostFXType, &Copy)) - self->obj = new sf::PostFX(*(Copy->obj)); - else - return -1; - } - else - self->obj = new sf::PostFX(); - return 0; -} +static PyObject * +PySfPostFX_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + PySfPostFX *self; + self = (PySfPostFX *)type->tp_alloc(type, 0); + if (self != NULL) + { + PySfPostFX *Copy = NULL; + self->IsCustom = false; + if (!PyArg_ParseTuple(args, "|O!", &PySfPostFXType, &Copy)) + return NULL; + if (Copy) self->obj = new sf::PostFX(*(Copy->obj)); + else self->obj = new sf::PostFX(); + } + return (PyObject *)self; +} diff --git a/python/src/PostFX.hpp b/python/src/PostFX.hpp index 080b3a0a5..9994885f7 100644 --- a/python/src/PostFX.hpp +++ b/python/src/PostFX.hpp @@ -31,6 +31,7 @@ typedef struct { PyObject_HEAD + bool IsCustom; sf::PostFX *obj; } PySfPostFX; diff --git a/python/src/Rect.cpp b/python/src/Rect.cpp index a05583e92..26a61b5ac 100644 --- a/python/src/Rect.cpp +++ b/python/src/Rect.cpp @@ -63,36 +63,33 @@ PySfFloatRect_dealloc(PySfFloatRect* self) static PyObject * PySfIntRect_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { + const char *kwlist[] = {"Left", "Top", "Right", "Bottom", NULL}; PySfIntRect *self; self = (PySfIntRect *)type->tp_alloc(type, 0); + if (self != NULL) + { + if (!PyArg_ParseTupleAndKeywords(args, kwds, "iiii:IntRect.__init__", (char **)kwlist, &(self->Left), &(self->Top), &(self->Right), &(self->Bottom))) + return NULL; + self->obj = new sf::IntRect(self->Left, self->Top, self->Right, self->Bottom); + } return (PyObject *)self; } static PyObject * PySfFloatRect_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { + const char *kwlist[] = {"Left", "Top", "Right", "Bottom", NULL}; PySfFloatRect *self; self = (PySfFloatRect *)type->tp_alloc(type, 0); + if (self != NULL) + { + if (!PyArg_ParseTupleAndKeywords(args, kwds, "ffff:FloatRect.__init__", (char **)kwlist, &(self->Left), &(self->Top), &(self->Right), &(self->Bottom))) + return NULL; + self->obj = new sf::FloatRect(self->Left, self->Top, self->Right, self->Bottom); + } return (PyObject *)self; } -static int -PySfIntRect_init(PySfIntRect *self, PyObject *args, PyObject *kwds) -{ - const char *kwlist[] = {"Left", "Top", "Right", "Bottom", NULL}; - int Left, Top, Right, Bottom; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "iiii:IntRect.__init__", (char **)kwlist, &Left, &Top, &Right, &Bottom)) - return -1; - - self->Left = Left; - self->Top = Top; - self->Right = Right; - self->Bottom = Bottom; - self->obj = new sf::IntRect(Left, Top, Right, Bottom); - return 0; -} - static PyObject * PySfIntRect_GetWidth(PySfIntRect *self) { @@ -133,24 +130,6 @@ PySfFloatRect_Contains(PySfFloatRect* self, PyObject *args); static PyObject * PySfFloatRect_Intersects(PySfFloatRect* self, PyObject *args); -static int -PySfFloatRect_init(PySfFloatRect *self, PyObject *args, PyObject *kwds) -{ - const char *kwlist[] = {"Left", "Top", "Right", "Bottom", NULL}; - float Left, Top, Right, Bottom; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "ffff:FloatRect.__init__", (char **)kwlist, &Left, &Top, &Right, &Bottom)) - return -1; - - self->Left = Left; - self->Top = Top; - self->Right = Right; - self->Bottom = Bottom; - self->obj = new sf::FloatRect(Left, Top, Right, Bottom); - return 0; -} - - static PyObject * PySfIntRect_Offset(PySfIntRect* self, PyObject *args) { @@ -259,7 +238,7 @@ PyTypeObject PySfIntRectType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfIntRect_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfIntRect_new, /* tp_new */ }; @@ -301,7 +280,7 @@ PyTypeObject PySfFloatRectType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfFloatRect_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfFloatRect_new, /* tp_new */ }; @@ -406,13 +385,13 @@ PySfFloatRectUpdateSelf(PySfFloatRect *self) PySfIntRect * GetNewPySfIntRect() { - return (PySfIntRect *)PySfIntRect_new(&PySfIntRectType, NULL, NULL); + return PyObject_New(PySfIntRect, &PySfIntRectType); } PySfFloatRect * GetNewPySfFloatRect() { - return (PySfFloatRect *)PySfFloatRect_new(&PySfFloatRectType, NULL, NULL); + return PyObject_New(PySfFloatRect, &PySfFloatRectType); } diff --git a/python/src/RenderWindow.cpp b/python/src/RenderWindow.cpp index 0985201e6..598efd877 100644 --- a/python/src/RenderWindow.cpp +++ b/python/src/RenderWindow.cpp @@ -52,19 +52,11 @@ static PyObject * PySfRenderWindow_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PySfRenderWindow *self; - self = (PySfRenderWindow *)type->tp_alloc(type, 0); + self = (PySfRenderWindow *)type->tp_alloc(type, 0); + if (self != NULL) + self->obj = new sf::RenderWindow(); return (PyObject *)self; -} - -static int -PySfRenderWindow_init(PySfRenderWindow *self, PyObject *args, PyObject *kwds) -{ - self->obj = new sf::RenderWindow(); - if (PyTuple_Size(args) > 0) - if (PySfWindow_Create((PySfWindow *)self, args, kwds) == NULL) - return -1; - return 0; -} +} static PyObject * PySfRenderWindow_Capture(PySfRenderWindow *self) @@ -99,14 +91,13 @@ PySfRenderWindow_DrawObject(PySfRenderWindow *RenderWindow, PySfDrawable *Obj) { if (PyObject_TypeCheck((PyObject *)Obj, &PySfDrawableType)) { - if (PyObject_HasAttrString((PyObject *)Obj, "Render")) + if (Obj->IsCustom) { - Py_XDECREF(Obj->obj->RenderWindow); + Py_CLEAR(Obj->obj->RenderWindow); + Py_INCREF(RenderWindow); Obj->obj->RenderWindow = RenderWindow; - Py_XDECREF(Obj->obj->RenderFunction); - Obj->obj->RenderFunction = PyObject_GetAttrString((PyObject *)Obj, "Render"); } - RenderWindow->obj->Draw( *(Obj->obj) ); + RenderWindow->obj->Draw(*(Obj->obj)); return true; } return false; @@ -147,23 +138,14 @@ PySfRenderWindow_Draw(PySfRenderWindow *self, PyObject *args) static PyObject * PySfRenderWindow_Clear(PySfRenderWindow *self, PyObject *args) { - PySfColor *Color; - int size = PyTuple_Size(args); - if (size == 1) - { - if (!PyArg_ParseTuple(args, "O!:RenderWindow.Clear", &PySfColorType, &Color)) - return NULL; - PySfColorUpdate(Color); - self->obj->Clear(*(Color->obj)); - } - else if (size == 0) - { - self->obj->Clear(sf::Color::Black); - } + PySfColor *Color = NULL; + if (!PyArg_ParseTuple(args, "|O!:RenderWindow.Clear", &PySfColorType, &Color)) + return NULL; + if (Color == NULL) self->obj->Clear(sf::Color::Black); else { - PyErr_SetString(PyExc_TypeError, "RenderWindow.Clear() takes one or zero argument"); - return NULL; + PySfColorUpdate(Color); + self->obj->Clear(*(Color->obj)); } Py_RETURN_NONE; } @@ -282,7 +264,7 @@ Parameters:\n\ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfRenderWindow_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfRenderWindow_new, /* tp_new */ }; diff --git a/python/src/Shape.cpp b/python/src/Shape.cpp index fc4142cdf..6ac2dd4a5 100644 --- a/python/src/Shape.cpp +++ b/python/src/Shape.cpp @@ -45,16 +45,14 @@ PySfShape_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PySfShape *self; self = (PySfShape *)type->tp_alloc(type, 0); + if (self != NULL) + { + self->obj = new sf::Shape(); + self->IsCustom = false; + } return (PyObject *)self; } -static int -PySfShape_init(PySfShape *self, PyObject *args) -{ - self->obj = new sf::Shape(); - return 0; -} - // void AddPoint(float X, float Y, const Color& Col = Color(255, 255, 255), const Color& OutlineCol = Color(0, 0, 0)); static PyObject * PySfShape_AddPoint(PySfShape* self, PyObject *args, PyObject *kwds) @@ -72,7 +70,7 @@ PySfShape_AddPoint(PySfShape* self, PyObject *args, PyObject *kwds) Col = ColTmp->obj; } else - Col = (sf::Color *)&sf::Color::Black; + Col = (sf::Color *)&sf::Color::White; if (OutlineColTmp) { @@ -231,7 +229,7 @@ PySfShape_SetPointOutlineColor(PySfShape* self, PyObject *args) { unsigned int Index; PySfColor *Color; - if (!PyArg_ParseTuple(args, "IO!:Shape:SetPointOutlineColor", &Index, &PySfColorType, &Color)) + if (!PyArg_ParseTuple(args, "IO!:Shape.SetPointOutlineColor", &Index, &PySfColorType, &Color)) return NULL; PySfColorUpdate(Color); self->obj->SetPointOutlineColor(Index, *(Color->obj)); @@ -365,7 +363,7 @@ PyTypeObject PySfShapeType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfShape_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfShape_new, /* tp_new */ }; @@ -374,6 +372,8 @@ PyTypeObject PySfShapeType = { PySfShape * GetNewPySfShape() { - return (PySfShape *)PySfShape_new(&PySfShapeType, NULL, NULL); + PySfShape *Shape = PyObject_New(PySfShape, &PySfShapeType); + Shape->IsCustom = false; + return Shape; } diff --git a/python/src/Shape.hpp b/python/src/Shape.hpp index ee2d2ce1c..7e21bfc94 100644 --- a/python/src/Shape.hpp +++ b/python/src/Shape.hpp @@ -32,6 +32,7 @@ typedef struct { PyObject_HEAD + bool IsCustom; sf::Shape *obj; } PySfShape; diff --git a/python/src/Sound.cpp b/python/src/Sound.cpp index 494d7fb43..926d2c69d 100644 --- a/python/src/Sound.cpp +++ b/python/src/Sound.cpp @@ -39,23 +39,38 @@ PySfSound_dealloc(PySfSound *self) } static PyObject * -PySfSound_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - PySfSound *self; - self = (PySfSound *)type->tp_alloc(type, 0); - return (PyObject *)self; +PySfSound_new(PyTypeObject *type, PyObject *args, PyObject *kwds); + +static int +PySfSound_init(PySfSound *self, PyObject *args, PyObject *kwds) +{ + const char *kwlist[] = {"Buffer", "Loop", "Pitch", "Volume", "X", "Y", "Z", NULL}; + PySfSoundBuffer *Buffer=NULL; + PyObject *Loop=NULL; + float Pitch=1.f, Volume=100.f, X=0.f, Y=0.f, Z=0.f; + if (!PyArg_ParseTupleAndKeywords(args, kwds, "|O!Offfff:Sound.__new__", (char **)kwlist, &PySfSoundBufferType, &Buffer, &Loop, &Pitch, &Volume, &X, &Y, &Z)) + return -1; + { + if (Loop) + self->obj->SetLoop(PyBool_AsBool(Loop)); + if (Buffer) + self->obj->SetBuffer(*(Buffer->obj)); + self->obj->SetPitch(Pitch); + self->obj->SetVolume(Volume); + self->obj->SetPosition(X, Y, Z); + } + return 0; } - -static int -PySfSound_init(PySfSound *self, PyObject *args, PyObject *kwds); - static PyObject* PySfSound_SetBuffer(PySfSound *self, PyObject *args) { PySfSoundBuffer *Buffer = (PySfSoundBuffer *)args; if (!PyObject_TypeCheck(args, &PySfSoundBufferType)) + { PyErr_SetString(PyExc_TypeError, "Sound.SetBuffer() The argument must be a sf.SoundBuffer."); + return NULL; + } self->obj->SetBuffer(*(Buffer->obj)); Py_RETURN_NONE; @@ -68,6 +83,19 @@ PySfSound_SetLoop(PySfSound *self, PyObject *args) Py_RETURN_NONE; } +static PyObject* +PySfSound_SetRelativeToListener(PySfSound *self, PyObject *args) +{ + self->obj->SetRelativeToListener(PyBool_AsBool(args)); + Py_RETURN_NONE; +} + +static PyObject* +PySfSound_IsRelativeToListener(PySfSound *self) +{ + return PyBool_FromLong(self->obj->IsRelativeToListener()); +} + static PyObject* PySfSound_SetPitch(PySfSound *self, PyObject *args) { @@ -195,6 +223,8 @@ PySfSound_SetPlayingOffset(PySfSound *self, PyObject *args) } static PyMethodDef PySfSound_methods[] = { + {"SetRelativeToListener", (PyCFunction)PySfSound_SetRelativeToListener, METH_O, "SetRelativeToListener(Relative)\nMake the sound's position relative to the listener's position, or absolute. The default value is false (absolute)\n Relative : True to set the position relative, false to set it absolute"}, + {"IsRelativeToListener", (PyCFunction)PySfSound_IsRelativeToListener, METH_NOARGS, "IsRelativeToListener()\nTell if the sound's position is relative to the listener's position, or if it's absolute."}, {"SetPlayingOffset", (PyCFunction)PySfSound_SetPlayingOffset, METH_O, "SetPlayingOffset(TimeOffset)\nSet the current playing position of the sound.\n TimeOffset : New playing position, expressed in seconds"}, {"SetLoop", (PyCFunction)PySfSound_SetLoop, METH_O, "SetLoop(Loop)\nSet the Sound loop state.\n Loop : True to play in loop, false to play once"}, {"SetBuffer", (PyCFunction)PySfSound_SetBuffer, METH_O, "SetBuffer(Buffer)\nSet the source buffer.\n Buffer : New sound buffer to bind to the sound "}, @@ -269,38 +299,26 @@ Copy constructor : Sound(Copy) where Copy is a sf.Sound instance.", /* tp_doc */ PySfSound_new, /* tp_new */ }; -static int -PySfSound_init(PySfSound *self, PyObject *args, PyObject *kwds) -{ - const char *kwlist[] = {"Buffer", "Loop", "Pitch", "Volume", "X", "Y", "Z", NULL}; - PySfSoundBuffer *Buffer=NULL; - bool Loop=false; - PyObject *LoopObj=Py_False; - float Pitch=1.f, Volume=100.f, X=0.f, Y=0.f, Z=0.f; - - if (PyTuple_Size(args) == 1) +static PyObject * +PySfSound_new(PyTypeObject *type, PyObject *args, PyObject *kwds) +{ + PySfSound *self; + self = (PySfSound *)type->tp_alloc(type, 0); + if (self != NULL) { - PySfSound *Copy; - if (PyArg_ParseTuple(args, "O!:Sound.__init__", &PySfSoundType, &Copy)) + if (PyTuple_Size(args) == 1) { - self->obj = new sf::Sound(*(Copy->obj)); - return 0; + PySfSound *Copy; + if (PyArg_ParseTuple(args, "O!:Sound.__new__", &PySfSoundType, &Copy)) + { + self->obj = new sf::Sound(*(Copy->obj)); + return (PyObject *)self; + } + else PyErr_Clear(); } - else PyErr_Clear(); - } - if (PyTuple_Size(args) > 0) - { - if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|Offfff:Sound.__init__", (char **)kwlist, &PySfSoundBufferType, &Buffer, &LoopObj, &Pitch, &Volume, &X, &Y, &Z)) - return -1; - if (PyObject_IsTrue(LoopObj)) - Loop = true; - - self->obj = new sf::Sound(*(Buffer->obj), Loop, Pitch, Volume, sf::Vector3f(X, Y, Z)); - } - else self->obj = new sf::Sound(); - - return 0; + } + return (PyObject *)self; } void diff --git a/python/src/SoundBuffer.cpp b/python/src/SoundBuffer.cpp index e3c95238c..bf4ac168b 100644 --- a/python/src/SoundBuffer.cpp +++ b/python/src/SoundBuffer.cpp @@ -35,15 +35,7 @@ PySfSoundBuffer_dealloc(PySfSoundBuffer *self) } static PyObject * -PySfSoundBuffer_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - PySfSoundBuffer *self; - self = (PySfSoundBuffer *)type->tp_alloc(type, 0); - return (PyObject *)self; -} - -static int -PySfSoundBuffer_init(PySfSoundBuffer *self, PyObject *args, PyObject *kwds); +PySfSoundBuffer_new(PyTypeObject *type, PyObject *args, PyObject *kwds); static PyObject* PySfSoundBuffer_LoadFromFile(PySfSoundBuffer *self, PyObject *args) @@ -170,32 +162,33 @@ Copy constructor : SoundBuffer(Copy) where Copy is a sf.SoundBuffer instance.", 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfSoundBuffer_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfSoundBuffer_new, /* tp_new */ }; -static int -PySfSoundBuffer_init(PySfSoundBuffer *self, PyObject *args, PyObject *kwds) +static PyObject * +PySfSoundBuffer_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { - int size = PyTuple_Size(args); - if (size == 1) + PySfSoundBuffer *self; + self = (PySfSoundBuffer *)type->tp_alloc(type, 0); + if (self != NULL) { - PySfSoundBuffer *Copy; - if (!PyArg_ParseTuple(args, "O!:SoundBuffer.__init__", &PySfSoundBufferType, &Copy)) - return -1; - self->obj = new sf::SoundBuffer(*(Copy->obj)); - } - else if (size == 0) + PySfSoundBuffer *Copy=NULL; + if (PyArg_ParseTuple(args, "O!:SoundBuffer.__init__", &PySfSoundBufferType, &Copy)) + { + self->obj = new sf::SoundBuffer(*(Copy->obj)); + return (PyObject *)self; + } + PyErr_Clear(); self->obj = new sf::SoundBuffer(); - else - PyErr_SetString(PyExc_TypeError, "SoundBuffer.__init__() takes 0 or 1 argument"); - return 0; + } + return (PyObject *)self; } PySfSoundBuffer * GetNewPySfSoundBuffer() { - return (PySfSoundBuffer *)PySfSoundBuffer_new(&PySfSoundBufferType, NULL, NULL); + return PyObject_New(PySfSoundBuffer, &PySfSoundBufferType); } diff --git a/python/src/SoundBufferRecorder.cpp b/python/src/SoundBufferRecorder.cpp index 5da462ae3..05978f6fb 100644 --- a/python/src/SoundBufferRecorder.cpp +++ b/python/src/SoundBufferRecorder.cpp @@ -43,16 +43,11 @@ PySfSoundBufferRecorder_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PySfSoundBufferRecorder *self; self = (PySfSoundBufferRecorder *)type->tp_alloc(type, 0); + if (self != NULL) + self->obj = new sf::SoundBufferRecorder(); return (PyObject *)self; } -static int -PySfSoundBufferRecorder_init(PySfSoundBufferRecorder *self, PyObject *args) -{ - self->obj = new sf::SoundBufferRecorder(); - return 0; -} - static PyObject * PySfSoundBufferRecorder_GetBuffer(PySfSoundBufferRecorder* self) { @@ -103,7 +98,7 @@ PyTypeObject PySfSoundBufferRecorderType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfSoundBufferRecorder_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfSoundBufferRecorder_new, /* tp_new */ }; diff --git a/python/src/SoundRecorder.cpp b/python/src/SoundRecorder.cpp index e45ef1828..46f7ae199 100644 --- a/python/src/SoundRecorder.cpp +++ b/python/src/SoundRecorder.cpp @@ -76,17 +76,14 @@ PySfSoundRecorder_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PySfSoundRecorder *self; self = (PySfSoundRecorder *)type->tp_alloc(type, 0); + if (self != NULL) + { + self->obj = new CustomSoundRecorder(); + self->obj->SoundRecorder = (PyObject *)self; + } return (PyObject *)self; } -static int -PySfSoundRecorder_init(PySfSoundRecorder *self, PyObject *args) -{ - self->obj = new CustomSoundRecorder(); - self->obj->SoundRecorder = (PyObject *)self; - return 0; -} - static PyObject * PySfSoundRecorder_Start(PySfSoundRecorder* self, PyObject *args) { @@ -162,7 +159,7 @@ Construct the sound recorder with a callback function for processing captured sa 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfSoundRecorder_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfSoundRecorder_new, /* tp_new */ }; diff --git a/python/src/SoundStream.cpp b/python/src/SoundStream.cpp index 89b040840..bc75ecb60 100644 --- a/python/src/SoundStream.cpp +++ b/python/src/SoundStream.cpp @@ -38,19 +38,21 @@ bool CustomSoundStream::OnStart() Py_DECREF(OnStart); Py_DECREF(Result); } + if (PyErr_Occurred()) + { + PyErr_Print(); + return false; + } return result; } bool CustomSoundStream::OnGetData(Chunk& Data) { bool result = false; - if (PyData != NULL) { - Py_DECREF(PyData); - } - if (PyObject_HasAttrString(SoundStream, "OnGetData")) + Py_CLEAR(PyData); + PyObject *Function = PyObject_GetAttrString(SoundStream, "OnGetData"); + if (Function != NULL) { - PyObject *Function = PyObject_GetAttrString(SoundStream, "OnGetData"); - Data.NbSamples = 0; PyData = PyObject_CallFunction(Function, NULL); if (PyData != NULL) { @@ -63,6 +65,12 @@ bool CustomSoundStream::OnGetData(Chunk& Data) } Py_DECREF(Function); } + if (PyErr_Occurred()) + { + PyErr_Print(); + Py_CLEAR(PyData); + return false; + } return result; } @@ -71,15 +79,6 @@ void CustomSoundStream::Init(unsigned int ChannelsCount, unsigned int SampleRate Initialize(ChannelsCount, SampleRate); } -static int -PySfSoundStream_init(PySfSoundStream *self, PyObject *args, PyObject *kwds) -{ - self->obj = new CustomSoundStream(); - self->obj->PyData = NULL; - self->obj->SoundStream = (PyObject *)self; - return 0; -} - static void PySfSoundStream_dealloc(PySfSoundStream *self) { @@ -92,6 +91,12 @@ PySfSoundStream_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PySfSoundStream *self; self = (PySfSoundStream *)type->tp_alloc(type, 0); + if (self != NULL) + { + self->obj = new CustomSoundStream(); + self->obj->PyData = NULL; + self->obj->SoundStream = (PyObject *)self; + } return (PyObject *)self; } @@ -232,7 +237,22 @@ PySfSoundStream_GetPlayingOffset(PySfSoundStream *self) return PyFloat_FromDouble(self->obj->GetPlayingOffset()); } +static PyObject* +PySfSoundStream_SetRelativeToListener(PySfSoundStream *self, PyObject *args) +{ + self->obj->SetRelativeToListener(PyBool_AsBool(args)); + Py_RETURN_NONE; +} + +static PyObject* +PySfSoundStream_IsRelativeToListener(PySfSoundStream *self) +{ + return PyBool_FromLong(self->obj->IsRelativeToListener()); +} + static PyMethodDef PySfSoundStream_methods[] = { + {"SetRelativeToListener", (PyCFunction)PySfSoundStream_SetRelativeToListener, METH_O, "SetRelativeToListener(Relative)\nMake the sound's position relative to the listener's position, or absolute. The default value is false (absolute)\n Relative : True to set the position relative, false to set it absolute"}, + {"IsRelativeToListener", (PyCFunction)PySfSoundStream_IsRelativeToListener, METH_NOARGS, "IsRelativeToListener()\nTell if the sound's position is relative to the listener's position, or if it's absolute."}, {"Initialize", (PyCFunction)PySfSoundStream_Initialize, METH_VARARGS, "Initialize(ChannelsCount, SampleRate)\n\ Set the audio stream parameters, you must call it before Play()\n\ ChannelsCount : Number of channels\n\ @@ -300,7 +320,7 @@ or for streaming sound from the network", /* tp_doc */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfSoundStream_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfSoundStream_new, /* tp_new */ }; diff --git a/python/src/Sprite.cpp b/python/src/Sprite.cpp index 3070e47c8..5482acc7d 100644 --- a/python/src/Sprite.cpp +++ b/python/src/Sprite.cpp @@ -56,7 +56,8 @@ PySfSprite_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (self != NULL) { - self->Image = NULL; + self->Image = NULL; + self->IsCustom = false; } return (PyObject *)self; diff --git a/python/src/Sprite.hpp b/python/src/Sprite.hpp index aaab6d635..ae83bbf31 100644 --- a/python/src/Sprite.hpp +++ b/python/src/Sprite.hpp @@ -33,6 +33,7 @@ typedef struct { PyObject_HEAD + bool IsCustom; sf::Sprite *obj; PySfImage *Image; } PySfSprite; diff --git a/python/src/String.cpp b/python/src/String.cpp index b95517393..ecb168508 100644 --- a/python/src/String.cpp +++ b/python/src/String.cpp @@ -30,8 +30,6 @@ #include "compat.hpp" -extern PyTypeObject PySfColorType; -extern PyTypeObject PySfImageType; extern PyTypeObject PySfDrawableType; extern PyTypeObject PySfFontType; @@ -39,6 +37,7 @@ extern PyTypeObject PySfFontType; static void PySfString_dealloc(PySfString *self) { + Py_CLEAR(self->font); delete self->obj; free_object(self); } @@ -48,52 +47,13 @@ PySfString_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PySfString *self; self = (PySfString *)type->tp_alloc(type, 0); - return (PyObject *)self; -} - -static int -PySfString_init(PySfString *self, PyObject *args, PyObject *kwds) -{ - const char *kwlist[] = {"Text", "Font", "Size", NULL}; - float Size = 30.f; - PyObject *Text=NULL; - PySfFont *FontTmp = NULL; - sf::Font *Font; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO!f:String.__init__", (char **)kwlist, &Text, &PySfFontType, &FontTmp, &Size)) - return -1; - - if (FontTmp) - Font = (FontTmp->obj); - else - Font = (sf::Font *)&(sf::Font::GetDefaultFont()); - - if (Text != NULL) + if (self != NULL) { - if (PyUnicode_Check(Text)) - { -#if Py_UNICODE_SIZE == 4 - self->obj = new sf::String((sf::Uint32 *)PyUnicode_AS_UNICODE(Text), *Font, Size); -#else - self->obj = new sf::String((sf::Uint16 *)PyUnicode_AS_UNICODE(Text), *Font, Size); -#endif - } -#ifdef IS_PY3K - else if (PyBytes_Check(Text)) - self->obj = new sf::String(sf::Unicode::UTF8String((sf::Uint8 *)PyBytes_AsString(Text)), *Font, Size); -#else - else if (PyString_Check(Text)) - self->obj = new sf::String(sf::Unicode::UTF8String((sf::Uint8 *)PyString_AsString(Text)), *Font, Size); -#endif - else - { - PyErr_SetString(PyExc_TypeError, "String.__init__() first argument must be str"); - return -1; - } + self->font = NULL; + self->IsCustom = false; + self->obj = new sf::String(); } - else - self->obj = new sf::String("", *Font, Size); - return 0; + return (PyObject *)self; } static PyObject * @@ -144,7 +104,13 @@ PySfString_SetFont(PySfString* self, PyObject *args) { PySfFont *Font = (PySfFont *)args; if (!PyObject_TypeCheck(Font, &PySfFontType)) + { PyErr_SetString(PyExc_ValueError, "String.SetFont() Argument must be a sf.Font"); + return NULL; + } + Py_CLEAR(self->font); + Py_INCREF(args); + self->font = Font; self->obj->SetFont(*(Font->obj)); Py_RETURN_NONE; } @@ -189,9 +155,18 @@ PySfString_GetText(PySfString* self) static PyObject * PySfString_GetFont(PySfString* self) { - PySfFont *Font = GetNewPySfFont(); - Font->obj = new sf::Font(self->obj->GetFont()); - return (PyObject *)Font; + if (self->font == NULL) + { + PySfFont *Font = GetNewPySfFont(); + Font->obj = (sf::Font *)&(sf::Font::GetDefaultFont()); + Font->Owner = false; + return (PyObject *)Font; + } + else + { + Py_INCREF(self->font); + return (PyObject *)(self->font); + } } static PyObject * @@ -216,6 +191,44 @@ PySfString_GetCharacterPos(PySfString* self, PyObject *args) return Py_BuildValue("ff", Pos.x, Pos.y); } +static int +PySfString_init(PySfString *self, PyObject *args, PyObject *kwds) +{ + const char *kwlist[] = {"Text", "Font", "Size", NULL}; + float Size = 30.f; + PyObject *Text=NULL; + PySfFont *Font = NULL; + if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO!f:String.__new__", (char **)kwlist, &Text, &PySfFontType, &Font, &Size)) + return -1; + + if (Text != NULL) + { + if (PyUnicode_Check(Text)) + { +#if Py_UNICODE_SIZE == 4 + self->obj->SetText((sf::Uint32 *)PyUnicode_AS_UNICODE(Text)); +#else + self->obj->SetText((sf::Uint16 *)PyUnicode_AS_UNICODE(Text)); +#endif + } +#ifdef IS_PY3K + else if (PyBytes_Check(Text)) + self->obj->SetText(sf::Unicode::UTF8String((sf::Uint8 *)PyBytes_AsString(Text))); +#else + else if (PyString_Check(Text)) + self->obj->SetText(sf::Unicode::UTF8String((sf::Uint8 *)PyString_AsString(Text))); +#endif + else + { + PyErr_SetString(PyExc_TypeError, "String.__init__() first argument must be str"); + return -1; + } + } + if (Font) PySfString_SetFont(self, (PyObject *)Font); + self->obj->SetSize(Size); + return 0; +} + static PyMethodDef PySfString_methods[] = { {"GetCharacterPos", (PyCFunction)PySfString_GetCharacterPos, METH_O, "GetCharacterPos(Index)\n\ diff --git a/python/src/String.hpp b/python/src/String.hpp index a036f8e16..ef26c6a61 100644 --- a/python/src/String.hpp +++ b/python/src/String.hpp @@ -29,9 +29,13 @@ #include +#include "Font.hpp" + typedef struct { PyObject_HEAD + bool IsCustom; sf::String *obj; + PySfFont *font; } PySfString; void PySfString_InitConst(); diff --git a/python/src/VideoMode.cpp b/python/src/VideoMode.cpp index 70cefbb5c..5b630546f 100644 --- a/python/src/VideoMode.cpp +++ b/python/src/VideoMode.cpp @@ -48,17 +48,16 @@ PySfVideoMode_dealloc(PySfVideoMode* self) static PyObject * PySfVideoMode_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { + const char *kwlist[] = {"Width", "Height", "BitsPerPixel", NULL}; PySfVideoMode *self; - self = (PySfVideoMode *)type->tp_alloc(type, 0); - if (self != NULL) { - self->Width = 0; - self->Height = 0; self->BitsPerPixel = 32; + if (!PyArg_ParseTupleAndKeywords(args, kwds, "II|I:VideoMode.__init__", (char **)kwlist, &self->Width, &self->Height, &self->BitsPerPixel)) + return NULL; + self->obj = new sf::VideoMode(self->Width, self->Height, self->BitsPerPixel); } - return (PyObject *)self; } @@ -70,27 +69,10 @@ PySfVideoModeUpdate(PySfVideoMode *self) self->obj->BitsPerPixel = self->BitsPerPixel; } -static int -PySfVideoMode_init(PySfVideoMode *self, PyObject *args, PyObject *kwds) -{ - const char *kwlist[] = {"Width", "Height", "BitsPerPixel", NULL}; - - if (!PyArg_ParseTupleAndKeywords(args, kwds, "II|I:VideoMode.__init__", (char **)kwlist, &self->Width, &self->Height, &self->BitsPerPixel)) - return -1; - - self->obj = new sf::VideoMode(self->Width, self->Height, self->BitsPerPixel); - - return 0; -} - - - static PyObject * PySfVideoMode_IsValid(PySfVideoMode* self) { - self->obj->Width = self->Width; - self->obj->Height = self->Height; - self->obj->BitsPerPixel = self->BitsPerPixel; + PySfVideoModeUpdate(self); return PyBool_FromLong(self->obj->IsValid()); } @@ -100,7 +82,7 @@ PySfVideoMode_GetDesktopMode(PySfVideoMode* self) PySfVideoMode *VideoMode; VideoMode = GetNewPySfVideoMode(); - VideoMode->obj = new sf::VideoMode ( sf::VideoMode::GetDesktopMode() ); + VideoMode->obj = new sf::VideoMode(sf::VideoMode::GetDesktopMode()); VideoMode->Width = VideoMode->obj->Width; VideoMode->Height = VideoMode->obj->Height; VideoMode->BitsPerPixel = VideoMode->obj->BitsPerPixel; @@ -117,7 +99,7 @@ PySfVideoMode_GetMode(PySfVideoMode* self, PyObject *args) index = (std::size_t)PyLong_AsLong(args); VideoMode = GetNewPySfVideoMode(); - VideoMode->obj = new sf::VideoMode ( sf::VideoMode::GetMode(index) ); + VideoMode->obj = new sf::VideoMode(sf::VideoMode::GetMode(index)); VideoMode->Width = VideoMode->obj->Width; VideoMode->Height = VideoMode->obj->Height; VideoMode->BitsPerPixel = VideoMode->obj->BitsPerPixel; @@ -132,7 +114,6 @@ PySfVideoMode_GetModesCount(PySfVideoMode* self) } - static PyMethodDef PySfVideoMode_methods[] = { {"IsValid", (PyCFunction)PySfVideoMode_IsValid, METH_NOARGS, "IsValid()\nTell whether or not the video mode is supported."}, {"GetDesktopMode", (PyCFunction)PySfVideoMode_GetDesktopMode, METH_STATIC | METH_NOARGS, "GetDesktopMode()\nGet the current desktop video mode."}, @@ -190,7 +171,7 @@ Construct the video mode with its attributes : VideoMode(ModeWidth, ModeHeight, 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfVideoMode_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfVideoMode_new, /* tp_new */ }; @@ -199,6 +180,6 @@ Construct the video mode with its attributes : VideoMode(ModeWidth, ModeHeight, PySfVideoMode * GetNewPySfVideoMode() { - return (PySfVideoMode *)PySfVideoMode_new(&PySfVideoModeType, NULL, NULL); + return PyObject_New(PySfVideoMode, &PySfVideoModeType); } diff --git a/python/src/Window.cpp b/python/src/Window.cpp index 9844ddf68..481eaf42b 100644 --- a/python/src/Window.cpp +++ b/python/src/Window.cpp @@ -50,7 +50,9 @@ static PyObject * PySfWindow_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { PySfWindow *self; - self = (PySfWindow *)type->tp_alloc(type, 0); + self = (PySfWindow *)type->tp_alloc(type, 0); + if (self != NULL) + self->obj = new sf::Window(); return (PyObject *)self; } @@ -128,9 +130,8 @@ PySfWindow_Create(PySfWindow* self, PyObject *args, PyObject *kwds) static int PySfWindow_init(PySfWindow *self, PyObject *args, PyObject *kwds) -{ - self->obj = new sf::Window(); - if (PyTuple_Size(args) > 0) +{ + if (args != NULL) if (PySfWindow_Create(self, args, kwds) == NULL) return -1; return 0; diff --git a/python/src/WindowSettings.cpp b/python/src/WindowSettings.cpp index 9a6579624..5c4a4f275 100644 --- a/python/src/WindowSettings.cpp +++ b/python/src/WindowSettings.cpp @@ -55,6 +55,7 @@ PySfWindowSettingsUpdate(PySfWindowSettings *self) static PyObject * PySfWindowSettings_new(PyTypeObject *type, PyObject *args, PyObject *kwds) { + const char *kwlist[] = {"DepthBits", "StencilBits", "AntialiasingLevel", NULL}; PySfWindowSettings *self; self = (PySfWindowSettings *)type->tp_alloc(type, 0); if (self != NULL) @@ -62,23 +63,13 @@ PySfWindowSettings_new(PyTypeObject *type, PyObject *args, PyObject *kwds) self->DepthBits = 24; self->StencilBits = 8; self->AntialiasingLevel = 0; + if (!PyArg_ParseTupleAndKeywords(args, kwds, "|III:WindowSettings.__init__", (char **)kwlist, &(self->DepthBits), &(self->StencilBits), &(self->AntialiasingLevel))) + return NULL; + self->obj = new sf::WindowSettings(self->DepthBits, self->StencilBits, self->AntialiasingLevel); } return (PyObject *)self; } - -static int -PySfWindowSettings_init(PySfWindowSettings *self, PyObject *args, PyObject *kwds) -{ - const char *kwlist[] = {"DepthBits", "StencilBits", "AntialiasingLevel", NULL}; - if (!PyArg_ParseTupleAndKeywords(args, kwds, "|III:WindowSettings.__init__", (char **)kwlist, &(self->DepthBits), &(self->StencilBits), &(self->AntialiasingLevel))) - return -1; - self->obj = new sf::WindowSettings(self->DepthBits, self->StencilBits, self->AntialiasingLevel); - - return 0; -} - - PyTypeObject PySfWindowSettingsType = { head_init "WindowSettings", /*tp_name*/ @@ -115,7 +106,7 @@ PyTypeObject PySfWindowSettingsType = { 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ - (initproc)PySfWindowSettings_init, /* tp_init */ + 0, /* tp_init */ 0, /* tp_alloc */ PySfWindowSettings_new, /* tp_new */ }; @@ -123,6 +114,6 @@ PyTypeObject PySfWindowSettingsType = { PySfWindowSettings * GetNewPySfWindowSettings() { - return (PySfWindowSettings *)PySfWindowSettings_new(&PySfWindowSettingsType, NULL, NULL); + return PyObject_New(PySfWindowSettings, &PySfWindowSettingsType); } diff --git a/python/src/main.hpp b/python/src/main.hpp index fa65683ba..dc4a5541a 100644 --- a/python/src/main.hpp +++ b/python/src/main.hpp @@ -27,7 +27,6 @@ #include #include -#include #include #include diff --git a/src/SFML/Audio/Sound.cpp b/src/SFML/Audio/Sound.cpp index 2a128e4a8..51a3bd90c 100644 --- a/src/SFML/Audio/Sound.cpp +++ b/src/SFML/Audio/Sound.cpp @@ -175,6 +175,17 @@ void Sound::SetPosition(const Vector3f& Position) } +//////////////////////////////////////////////////////////// +/// Make the sound's position relative to the listener's +/// position, or absolute. +/// The default value is false (absolute) +//////////////////////////////////////////////////////////// +void Sound::SetRelativeToListener(bool Relative) +{ + ALCheck(alSourcei(mySource, AL_SOURCE_RELATIVE, Relative)); +} + + //////////////////////////////////////////////////////////// /// Set the minimum distance - closer than this distance, /// the listener will hear the sound at its maximum volume. @@ -263,6 +274,19 @@ Vector3f Sound::GetPosition() const } +//////////////////////////////////////////////////////////// +/// Tell if the sound's position is relative to the listener's +/// position, or if it's absolute +//////////////////////////////////////////////////////////// +bool Sound::IsRelativeToListener() const +{ + ALint Relative; + ALCheck(alGetSourcei(mySource, AL_SOURCE_RELATIVE, &Relative)); + + return Relative != 0; +} + + //////////////////////////////////////////////////////////// /// Get the minimum distance //////////////////////////////////////////////////////////// diff --git a/src/SFML/Audio/stb_vorbis/stb_vorbis.c b/src/SFML/Audio/stb_vorbis/stb_vorbis.c index c092d9722..e34405f81 100755 --- a/src/SFML/Audio/stb_vorbis/stb_vorbis.c +++ b/src/SFML/Audio/stb_vorbis/stb_vorbis.c @@ -2037,7 +2037,6 @@ void dct_iv_slow(float *buffer, int n) //acc += x[j] * cos(M_PI / n * (i + 0.5) * (j + 0.5)); buffer[i] = acc; } - free(x); } void inverse_mdct_slow(float *buffer, int n, vorb *f, int blocktype) @@ -3504,8 +3503,8 @@ static int start_decoder(vorb *f) #else for (j=0; j < (int) c->lookup_values; ++j) c->multiplicands[j] = mults[j] * c->delta_value + c->minimum_value; - setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); #endif + setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values); } skip:; @@ -3812,6 +3811,7 @@ static void vorbis_deinit(stb_vorbis *p) setup_free(p, p->B[i]); setup_free(p, p->C[i]); setup_free(p, p->window[i]); + setup_free(p, p->bit_reverse[i]); } #ifndef STB_VORBIS_NO_STDIO if (p->close_on_free) fclose(p->f); diff --git a/src/SFML/System/Initializer.cpp b/src/SFML/System/Initializer.cpp index 161ae999c..0d3dbeeae 100644 --- a/src/SFML/System/Initializer.cpp +++ b/src/SFML/System/Initializer.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2009 Lucas Soltic (elmerod@gmail.com) and Laurent Gomila (laurent.gom@gmail.com) +// Copyright (C) 2007-2009 Lucas Soltic (ceylow@gmail.com) and 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/src/SFML/Window/Cocoa/AppController.h b/src/SFML/Window/Cocoa/AppController.h index 365afc9d3..f56db4eb5 100644 --- a/src/SFML/Window/Cocoa/AppController.h +++ b/src/SFML/Window/Cocoa/AppController.h @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2008 Lucas Soltic (elmerod@gmail.com) and Laurent Gomila (laurent.gom@gmail.com) +// Copyright (C) 2007-2009 Lucas Soltic (ceylow@gmail.com) and 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. @@ -26,12 +26,8 @@ //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// -#import #import -#import #import -#import -#import #define SharedAppController [AppController sharedController] @@ -42,80 +38,50 @@ enum { CleanScreen }; - +@class WindowWrapper; @interface AppController : NSObject { - // Note: objc allocation doesn't call C++ constructor - std::vector *windows; - - NSAutoreleasePool *mainPool; - sf::Clock *cleaner; - sf::VideoMode desktopMode; - sf::VideoMode prevMode; + BOOL myOwningEventLoop; + WindowWrapper *myFullscreenWrapper; + NSAutoreleasePool *myMainPool; + sf::VideoMode myDesktopMode; + sf::VideoMode myPrevMode; } //////////////////////////////////////////////////////////// -/// Return the shared AppController object. Makes one if needed +/// Return the shared AppController instance. Make one if needed. //////////////////////////////////////////////////////////// + (AppController *)sharedController; //////////////////////////////////////////////////////////// -/// Reallocate main pool to release autoreleased objects -//////////////////////////////////////////////////////////// -- (void)resetPool; - -//////////////////////////////////////////////////////////// -/// Register our application and launch it if needed -//////////////////////////////////////////////////////////// -- (void)runApplication; - -//////////////////////////////////////////////////////////// -/// Terminate the current running application -//////////////////////////////////////////////////////////// -- (void)quitApplication:(id)sender; - -//////////////////////////////////////////////////////////// -/// Make menu bar +/// Make the menu bar //////////////////////////////////////////////////////////// - (void)makeMenuBar; //////////////////////////////////////////////////////////// -/// Get the events and put them into an array for each window +/// Process all the events and send them to the application +/// No event is processed if the AppController instance is +/// not the owner of the event loop (ie: user made his own loop) //////////////////////////////////////////////////////////// - (void)processEvents; //////////////////////////////////////////////////////////// -/// Add the 'windowImplObj' object to the list of known windows +/// Set @window as the current fullscreen window +/// Change the screen resolution if needed according to @window and @fullscreenMode //////////////////////////////////////////////////////////// -- (void)registerWindow:(sf::priv::WindowImplCocoa *)windowImplObj; - -//////////////////////////////////////////////////////////// -/// Remove the 'windowImplObj' object from the list of known windows -//////////////////////////////////////////////////////////// -- (void)unregisterWindow:(sf::priv::WindowImplCocoa *)windowImplObj; - -//////////////////////////////////////////////////////////// -/// Return true is one of the registered window is a full screen one -//////////////////////////////////////////////////////////// -- (bool)isUsingFullscreen; +- (void)setFullscreenWindow:(WindowWrapper *)window mode:(sf::VideoMode *)fullscreenMode; //////////////////////////////////////////////////////////// /// Perform fade operation where 'operation' is one of { FillScreen, CleanScreen} /// and 'time' is the time during which you wish the operation to be performed. /// Set 'sync' to true if you do not want the method to end before the end -/// of the fade operation. Pass the last used token or a new one if you are -/// using this method for the first time. This lets the method release some -/// resources when doing CleanScreen operation. +/// of the fade operation. //////////////////////////////////////////////////////////// -- (void)doFadeOperation:(int)operation time:(float)time sync:(bool)sync token:(CGDisplayFadeReservationToken *)prevToken; +- (void)doFadeOperation:(int)operation time:(float)time sync:(bool)sync; + +//////////////////////////////////////////////////////////// +/// Return the desktop video mode (made at the instance initialization) +//////////////////////////////////////////////////////////// +- (const sf::VideoMode&)desktopMode; @end - -//////////////////////////////////////////////////////////// -/// check that ptr is valid, otherwise print msg in -/// std::cerr and throw std::bad_alloc. -/// Must be used to check alloc results -//////////////////////////////////////////////////////////// -template -T *massert(T *ptr); - diff --git a/src/SFML/Window/Cocoa/AppController.mm b/src/SFML/Window/Cocoa/AppController.mm index a6b7310f5..3ebba08aa 100644 --- a/src/SFML/Window/Cocoa/AppController.mm +++ b/src/SFML/Window/Cocoa/AppController.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2008 Lucas Soltic (elmerod@gmail.com) and Laurent Gomila (laurent.gom@gmail.com) +// Copyright (C) 2007-2009 Lucas Soltic (ceylow@gmail.com) and 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. @@ -27,14 +27,13 @@ // Headers //////////////////////////////////////////////////////////// #import -#import -#import +#import #import #import #import -// AppController singleton +// AppController singleton object static AppController *shared = nil; @@ -61,160 +60,120 @@ static AppController *shared = nil; @implementation AppController + +//////////////////////////////////////////////////////////// +/// Return an initialized AppController instance +/// Save the desktop mode +/// Make the main autorelease pool +/// Set the application observer +//////////////////////////////////////////////////////////// - (id)init { self = [super init]; if (self != nil) { - windows = new std::vector ; - cleaner = new sf::Clock; + myOwningEventLoop = NO; + + // Save the desktop mode + myDesktopMode = sf::VideoMode::GetDesktopMode(); + myPrevMode = myDesktopMode; + + // Make the app autorelease pool + myMainPool = [[NSAutoreleasePool alloc] init]; + + // Don't go on if the user handles the app + if (![NSApp isRunning]) + { + // Force our application to appear in the Dock and make it able + // to get focus (even when it's a raw executable) + ProcessSerialNumber psn; + + if (!GetCurrentProcess(&psn)) { + TransformProcessType(&psn, kProcessTransformToForegroundApplication); + SetFrontProcess(&psn); + } + + // Make the app + [NSApplication sharedApplication]; + + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + // I want to go back to the desktop mode + // if we've a fullscreen window when hiding + [nc addObserver:self + selector:@selector(applicationWillHide:) + name:NSApplicationWillHideNotification + object:NSApp]; + + // And restore de fullscreen mode when unhiding + [nc addObserver:self + selector:@selector(applicationWillUnhide:) + name:NSApplicationWillUnhideNotification + object:NSApp]; + + // Go back to desktop mode before exit + [nc addObserver:self + selector:@selector(applicationWillTerminate:) + name:NSApplicationWillTerminateNotification + object:NSApp]; + + if ([NSApp mainMenu] == nil) { + [self makeMenuBar]; + } + } } return self; } +//////////////////////////////////////////////////////////// +/// Clean the controller +//////////////////////////////////////////////////////////// - (void)dealloc { - delete windows; - delete cleaner; + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [myFullscreenWrapper release]; [super dealloc]; } //////////////////////////////////////////////////////////// -/// Return the shared AppController object. Makes one if needed +/// Return the shared AppController instance. Make one if needed. //////////////////////////////////////////////////////////// + (AppController *)sharedController { - if (nil == shared) { - shared = [massert([AppController alloc]) init]; - } + if (nil == shared) + shared = [[AppController alloc] init]; return shared; } //////////////////////////////////////////////////////////// -/// Reallocate main pool to release autoreleased objects -//////////////////////////////////////////////////////////// -- (void)resetPool -{ - [mainPool release]; - - mainPool = [massert([NSAutoreleasePool alloc]) init]; -} - - -//////////////////////////////////////////////////////////// -/// Register our application and launch it if needed -//////////////////////////////////////////////////////////// -- (void)runApplication -{ - if ([NSApp isRunning]) - return; - - // We want our application to appear in the Dock and be able - // to get focus - ProcessSerialNumber psn; - - if (!GetCurrentProcess(&psn)) { - TransformProcessType(&psn, kProcessTransformToForegroundApplication); - SetFrontProcess(&psn); - } - - if (NSApp == nil) { - massert([NSApplication sharedApplication]); - } - - if ([NSApp mainMenu] == nil) { - [self makeMenuBar]; - } - - [NSApp finishLaunching]; - [NSApp setRunning:YES]; - [NSApp setDelegate:self]; - - desktopMode = sf::VideoMode::GetDesktopMode(); -} - - -//////////////////////////////////////////////////////////// -/// Terminate the current running application -//////////////////////////////////////////////////////////// -- (void)quitApplication:(id)sender -{ - // Close all windows - // SFML user has to detect when all windows are closed - NSWindow *current = nil; - sf::priv::WindowImplCocoa *priv = NULL; - - while (windows->size()) { - priv = windows->at(0); - current = static_cast (priv->CocoaWindow()); - [current close]; - windows->erase(windows->begin()); - } -} - - -//////////////////////////////////////////////////////////// -/// Returns the first full screen window found or nil -//////////////////////////////////////////////////////////// -- (SFWindow *)fullscreenWindow -{ - SFWindow *window = nil; - std::vector::size_type sz = windows->size(); - std::vector::size_type idx; - - for (idx = 0; idx < sz; idx++) { - sf::priv::WindowImplCocoa *win = windows->at(idx); - if (win && win->IsFullscreen()) { - window = static_cast (win->CocoaWindow()); - break; - } - } - - return window; -} - - -//////////////////////////////////////////////////////////// -/// Hide all the fullscreen windows and switch to desktop display mode +/// Hide all the fullscreen windows and switch back to the desktop display mode //////////////////////////////////////////////////////////// - (void)applicationWillHide:(NSNotification *)aNotification { - if ([self isUsingFullscreen]) { - prevMode = sf::VideoMode::GetDesktopMode(); + if (myFullscreenWrapper) { + myPrevMode = sf::VideoMode::GetDesktopMode(); CFDictionaryRef displayMode = CGDisplayBestModeForParameters (kCGDirectMainDisplay, - desktopMode.BitsPerPixel, - desktopMode.Width, - desktopMode.Height, + myDesktopMode.BitsPerPixel, + myDesktopMode.Width, + myDesktopMode.Height, NULL); - CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken; - // Fade to black screen - [SharedAppController doFadeOperation:FillScreen time:0.2f sync:true token:&token]; + [self doFadeOperation:FillScreen time:0.2f sync:true]; - // Make all the full screen SFML windows unvisible - std::vector::size_type sz = windows->size(); - std::vector::size_type idx; - - for (idx = 0; idx < sz; idx++) { - sf::priv::WindowImplCocoa *win = windows->at(idx); - - if (win->IsFullscreen()) { - [static_cast (win->CocoaWindow()) setAlphaValue:0.0f]; - } - } + // Make the full screen window unvisible + [[myFullscreenWrapper window] setAlphaValue:0.0f]; // Switch to the wished display mode CGDisplaySwitchToMode(kCGDirectMainDisplay, displayMode); // Fade to normal screen - [SharedAppController doFadeOperation:CleanScreen time:0.5f sync:false token:&token]; + [self doFadeOperation:CleanScreen time:0.5f sync:false]; } } @@ -224,41 +183,43 @@ static AppController *shared = nil; //////////////////////////////////////////////////////////// - (void)applicationWillUnhide:(NSNotification *)aNotification { - if ([self isUsingFullscreen]) { + if (myFullscreenWrapper) { CFDictionaryRef displayMode = CGDisplayBestModeForParameters (kCGDirectMainDisplay, - prevMode.BitsPerPixel, - prevMode.Width, - prevMode.Height, + myPrevMode.BitsPerPixel, + myPrevMode.Width, + myPrevMode.Height, NULL); - CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken; - // Fade to a black screen - [SharedAppController doFadeOperation:FillScreen time:0.5f sync:true token:&token]; + [self doFadeOperation:FillScreen time:0.5f sync:true]; [NSMenu setMenuBarVisible:NO]; // Switch to the wished display mode CGDisplaySwitchToMode(kCGDirectMainDisplay, displayMode); - // Make all the SFML windows visible - std::vector::size_type sz = windows->size(); - std::vector::size_type idx; - - for (idx = 0; idx < sz; idx++) { - sf::priv::WindowImplCocoa *win = windows->at(idx); - - if (win->IsFullscreen()) { - [static_cast (win->CocoaWindow()) setAlphaValue:1.0f]; - [static_cast (win->CocoaWindow()) center]; - } + // Show the fullscreen window if existing + if (myFullscreenWrapper) + { + [[myFullscreenWrapper window] setAlphaValue:1.0f]; + [[myFullscreenWrapper window] center]; } // Fade to normal screen - [SharedAppController doFadeOperation:CleanScreen time:0.5f sync:false token:&token]; + [self doFadeOperation:CleanScreen time:0.5f sync:false]; } } +- (void)applicationWillTerminate:(NSNotification *)aNotification +{ + if (myFullscreenWrapper) + [self setFullscreenWindow:nil mode:NULL]; + + // FIXME: should I really do this ? what about the user owned windows ? + // And is this really useful as the application is about to exit ? + [NSApp makeWindowsPerform:@selector(close) inOrder:NO]; +} + //////////////////////////////////////////////////////////// /// Make menu bar //////////////////////////////////////////////////////////// @@ -282,10 +243,10 @@ static AppController *shared = nil; // Create the main menu bar - [NSApp setMainMenu:[massert([NSMenu alloc]) init]]; + [NSApp setMainMenu:[[NSMenu alloc] init]]; // Create the application menu - appleMenu = [massert([NSMenu alloc]) initWithTitle:@""]; + appleMenu = [[NSMenu alloc] initWithTitle:@""]; // Put menu items // + 'About' menu item @@ -303,7 +264,7 @@ static AppController *shared = nil; keyEquivalent:@"h"]; // + 'Hide other' menu item - menuItem = static_cast ([appleMenu addItemWithTitle:@"Hide Others" + menuItem = reinterpret_cast ([appleMenu addItemWithTitle:@"Hide Others" action:@selector(hideOtherApplications:) keyEquivalent:@"h"]); [menuItem setKeyEquivalentModifierMask:(NSAlternateKeyMask|NSCommandKeyMask)]; @@ -317,15 +278,15 @@ static AppController *shared = nil; // + 'Quit' menu item title = [@"Quit " stringByAppendingString:appName]; - quitMenuItem = [[massert([NSMenuItem alloc]) + quitMenuItem = [[[NSMenuItem alloc] initWithTitle:title - action:@selector(quitApplication:) + action:@selector(terminate:) keyEquivalent:@"q"] autorelease]; - [quitMenuItem setTarget:self]; + //[quitMenuItem setTarget:self]; [appleMenu addItem:quitMenuItem]; // Put the menu into the menubar - menuItem = [massert([NSMenuItem alloc]) + menuItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""]; @@ -338,11 +299,11 @@ static AppController *shared = nil; [appleMenu release]; // 'File' menu - fileMenu = [massert([NSMenu alloc]) + fileMenu = [[NSMenu alloc] initWithTitle:@"File"]; // + 'Close' menu item - menuItem = [massert([NSMenuItem alloc]) + menuItem = [[NSMenuItem alloc] initWithTitle:@"Close" action:@selector(performClose:) keyEquivalent:@"w"]; @@ -350,7 +311,7 @@ static AppController *shared = nil; [menuItem release]; // + 'File' menu item (head) - menuItem = [massert([NSMenuItem alloc]) + menuItem = [[NSMenuItem alloc] initWithTitle:@"File" action:nil keyEquivalent:@""]; @@ -359,11 +320,11 @@ static AppController *shared = nil; [menuItem release]; // 'Window' menu - windowMenu = [massert([NSMenu alloc]) + windowMenu = [[NSMenu alloc] initWithTitle:@"Window"]; // + 'Minimize' menu item - menuItem = [massert([NSMenuItem alloc]) + menuItem = [[NSMenuItem alloc] initWithTitle:@"Minimize" action:@selector(performMiniaturize:) keyEquivalent:@"m"]; @@ -371,7 +332,7 @@ static AppController *shared = nil; [menuItem release]; // + 'Window' menu item (head) - menuItem = [massert([NSMenuItem alloc]) + menuItem = [[NSMenuItem alloc] initWithTitle:@"Window" action:nil keyEquivalent:@""]; [menuItem setSubmenu:windowMenu]; @@ -385,127 +346,109 @@ static AppController *shared = nil; //////////////////////////////////////////////////////////// -/// Delegate method in order to prevent usual -terminate: -//////////////////////////////////////////////////////////// -- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender -{ - [self quitApplication:nil]; - return NSTerminateCancel; -} - - -//////////////////////////////////////////////////////////// -/// Get the events and put them into an array for each window +/// Process all the events and send them to the application +/// No event is processed if the AppController instance is +/// not the owner of the event loop (ie: user made his own loop) //////////////////////////////////////////////////////////// - (void)processEvents { - // Release the main autorelease pool every second - if (cleaner->GetElapsedTime() > 1.0f) { - cleaner->Reset(); - [self resetPool]; + // Check there is a run loop + if (![NSApp isRunning]) + { + // Get the ownershipt of event handling if not and run + [NSApp finishLaunching]; + [NSApp setRunning:YES]; + myOwningEventLoop = YES; } + // Clean the autorelease pool + [myMainPool release]; + myMainPool = [[NSAutoreleasePool alloc] init]; + NSEvent *event = nil; - while (nil != (event = [NSApp nextEventMatchingMask:NSAnyEventMask - untilDate:nil - inMode:NSEventTrackingRunLoopMode - dequeue:YES])) { - NSWindow *keyWindow = [NSApp keyWindow]; - - if (keyWindow == nil) { - // Is there a fullscreen WindowImpl object ? + if (myOwningEventLoop) + { + // Minimal event loop + while (nil != (event = [NSApp nextEventMatchingMask:NSAnyEventMask + untilDate:nil + inMode:NSDefaultRunLoopMode + dequeue:YES])) + { [NSApp sendEvent:event]; - } else { - - std::vector::size_type cnt = windows->size(); - std::vector::size_type idx; - - // is the key window a SFML window ? - for (idx = 0;idx < cnt; idx++) { - sf::priv::WindowImplCocoa *ptr = windows->at(idx);; - - if (ptr->CocoaWindow() == keyWindow) { - // yup, it is - ptr->HandleEvent(static_cast (event)); - break; - } - } - - // nop, it isn't - if (idx == cnt) { - [NSApp sendEvent:event]; - } } } } //////////////////////////////////////////////////////////// -/// Add the 'windowImplObj' object to the list of known windows +/// Set @window as the current fullscreen window +/// Change the screen resolution if needed according to @window and @fullscreenMode //////////////////////////////////////////////////////////// -- (void)registerWindow:(sf::priv::WindowImplCocoa *)windowImplObj +- (void)setFullscreenWindow:(WindowWrapper *)aWrapper mode:(sf::VideoMode *)fullscreenMode { - - if (windowImplObj != NULL) { - std::vector::size_type sz = windows->size(); - std::vector::size_type idx; + // If we have a fullscreen window and want to remove it + if (myFullscreenWrapper && aWrapper == nil) + { + // Get the CoreGraphics display mode according to the desktop mode + CFDictionaryRef displayMode = CGDisplayBestModeForParameters (kCGDirectMainDisplay, + myDesktopMode.BitsPerPixel, + myDesktopMode.Width, + myDesktopMode.Height, + NULL); - for (idx = 0; idx < sz; idx++) { - if (windows->at(idx) == windowImplObj) { - break; - } - } + // Fade to black screen + [self doFadeOperation:FillScreen time:0.2f sync:true]; + // Switch to the desktop display mode + CGDisplaySwitchToMode(kCGDirectMainDisplay, displayMode); - // Register window only if not already registered - if (sz == idx) { - windows->push_back(windowImplObj); - } + // Close the window + [[myFullscreenWrapper window] close]; + + // Show the menu bar + [NSMenu setMenuBarVisible:YES]; + + // Fade to normal screen + [self doFadeOperation:CleanScreen time:0.5f sync:true]; + + // Release the saved window wrapper + [myFullscreenWrapper release], myFullscreenWrapper = nil; } -} - - -//////////////////////////////////////////////////////////// -/// Remove the 'windowImplObj' object from the list of known windows -//////////////////////////////////////////////////////////// -- (void)unregisterWindow:(sf::priv::WindowImplCocoa *)windowImplObj -{ - if (windowImplObj != NULL) { - std::vector::size_type sz = windows->size(); - std::vector::size_type idx; + else if (myFullscreenWrapper == nil && aWrapper) + { + assert(fullscreenMode != NULL); - for (idx = 0; idx < sz; idx++) { - if (windows->at(idx) == windowImplObj) { - break; - } - } + // Get the CoreGraphics display mode according to the given sf mode + CFDictionaryRef displayMode = CGDisplayBestModeForParameters (kCGDirectMainDisplay, + fullscreenMode->BitsPerPixel, + fullscreenMode->Width, + fullscreenMode->Height, + NULL); - if (idx < sz) { - windows->erase(windows->begin() + idx); - } + // Fade to a black screen + [self doFadeOperation:FillScreen time:0.5f sync:true]; + + // Hide to the main menu bar + [NSMenu setMenuBarVisible:NO]; + + // Switch to the wished display mode + CGDisplaySwitchToMode(kCGDirectMainDisplay, displayMode); + + // Open and center the window + [[aWrapper window] makeKeyAndOrderFront:nil]; + [[aWrapper window] center]; + + // Fade to normal screen + [self doFadeOperation:CleanScreen time:0.2f sync:false]; + + // Save the fullscreen wrapper + myFullscreenWrapper = [aWrapper retain]; } -} - - -//////////////////////////////////////////////////////////// -/// Return true is one of the registered window is a full screen one -//////////////////////////////////////////////////////////// -- (bool)isUsingFullscreen -{ - bool isUsing = false; - std::vector::size_type sz = windows->size(); - std::vector::size_type idx; - - for (idx = 0; idx < sz; idx++) { - sf::priv::WindowImplCocoa *win = windows->at(idx); - if (win && win->IsFullscreen()) { - isUsing = true; - break; - } + else + { + std::cerr << "Inconcistency error for arguments given to -[AppController setFullscreenWindow:mode:]" << std::endl; } - - return isUsing; } @@ -517,11 +460,10 @@ static AppController *shared = nil; /// using this method for the first time. This lets the method release some /// resources when doing CleanScreen operation. //////////////////////////////////////////////////////////// -- (void) doFadeOperation:(int)operation time:(float)time sync:(bool)sync token:(CGDisplayFadeReservationToken *)prevToken +- (void) doFadeOperation:(int)operation time:(float)time sync:(bool)sync { - CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken; - if (prevToken) - token = *prevToken; + static CGDisplayFadeReservationToken prevToken = kCGDisplayFadeReservationInvalidToken; + CGDisplayFadeReservationToken token = prevToken; CGError result = 0, capture = 0; @@ -539,7 +481,7 @@ static AppController *shared = nil; CGDisplayFade(token, time, kCGDisplayBlendNormal, kCGDisplayBlendSolidColor, - 0.0, 0.0, 0.0, sync); + 0.0f, 0.0f, 0.0f, sync); // Now, release the non black-filling capture CGDisplayRelease(kCGDirectMainDisplay); @@ -549,8 +491,7 @@ static AppController *shared = nil; CGDisplayCaptureWithOptions(kCGDirectMainDisplay, kCGCaptureNoOptions); } - if (prevToken) - *prevToken = token; + prevToken = token; } } else if (operation == CleanScreen) { // Get access for the fade operation @@ -569,14 +510,13 @@ static AppController *shared = nil; CGDisplayFade(token, time, kCGDisplayBlendSolidColor, kCGDisplayBlendNormal, - 0.0, 0.0, 0.0, sync); + 0.0f, 0.0f, 0.0f, sync); // Release the fade operation token CGReleaseDisplayFadeReservation(token); // Invalidate the given token - if (prevToken) - *prevToken = kCGDisplayFadeReservationInvalidToken; + prevToken = kCGDisplayFadeReservationInvalidToken; } // Release the captured display @@ -585,15 +525,14 @@ static AppController *shared = nil; } } + +//////////////////////////////////////////////////////////// +/// Return the desktop video mode (made at the instance initialization) +//////////////////////////////////////////////////////////// +- (const sf::VideoMode&)desktopMode +{ + return myDesktopMode; +} + @end - -template -T *massert(T *ptr) -{ - if (NULL == ptr) { - throw std::bad_alloc(); - } - - return ptr; -} diff --git a/src/SFML/Window/Cocoa/GLKit.h b/src/SFML/Window/Cocoa/GLKit.h new file mode 100644 index 000000000..aa2125c48 --- /dev/null +++ b/src/SFML/Window/Cocoa/GLKit.h @@ -0,0 +1,216 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2009 Lucas Soltic (ceylow@gmail.com) and 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 +//////////////////////////////////////////////////////////// +#import +#import + + +//////////////////////////////////////////////////////////// +/// Window independant OpenGL context class +//////////////////////////////////////////////////////////// +@interface GLContext : NSOpenGLContext +{ + GLContext *mySharedContext; +} + +//////////////////////////////////////////////////////////// +/// Return the shared OpenGL context instance (making one if needed) +//////////////////////////////////////////////////////////// ++ (id)sharedContext; + +//////////////////////////////////////////////////////////// +/// Make a new OpenGL context according to the @attribs settings +/// and the shared context @context +//////////////////////////////////////////////////////////// +- (id)initWithAttributes:(sf::WindowSettings&)attribs + sharedContext:(GLContext *)context; + +@end + + +//////////////////////////////////////////////////////////// +/// Customized Cocoa OpenGL view +//////////////////////////////////////////////////////////// +@interface GLView : NSOpenGLView +{ + sf::priv::WindowImplCocoa *myDelegate; + GLContext *myGLContext; +} + +//////////////////////////////////////////////////////////// +/// Make a new view according the the rect @frame, +/// the video mode @mode, the window settings @settings +/// and the sf window delegate @delegate +/// @delegate must not be null +//////////////////////////////////////////////////////////// +- (id)initWithFrame:(NSRect)frame + mode:(const sf::VideoMode&)mode + settings:(sf::WindowSettings&)settings + delegate:(sf::priv::WindowImplCocoa *)delegate; + +//////////////////////////////////////////////////////////// +/// Finish view setting (after having added it to the window) +//////////////////////////////////////////////////////////// +- (void)finishInitialization; + +//////////////////////////////////////////////////////////// +/// Forward call to en/disable vertical synchronization +//////////////////////////////////////////////////////////// +- (void)enableVerticalSync:(bool)flag; + +//////////////////////////////////////////////////////////// +/// Forward call to set the OpenGL context as active according to @flag +//////////////////////////////////////////////////////////// +- (void)setActive:(bool)flag; + +//////////////////////////////////////////////////////////// +/// Forward call to flush the OpenGL context +//////////////////////////////////////////////////////////// +- (void)flushBuffer; + +@end + +//////////////////////////////////////////////////////////// +/// Cocoa window implementation to let fullscreen windows +/// catch key events +//////////////////////////////////////////////////////////// +@interface GLWindow : NSWindow + +//////////////////////////////////////////////////////////// +/// Technical note: this class must neither contain new members +/// nor methods. It is used transparently as a NSWindow object +/// by WindowWrapper. Not following this rule could result +/// in a segmentation fault or data corruption. +//////////////////////////////////////////////////////////// + +@end + +//////////////////////////////////////////////////////////// +/// WindowWrapper class : handles both imported and self-built windows +//////////////////////////////////////////////////////////// +@interface WindowWrapper : NSObject +{ + GLWindow *myWindow; + GLView *myView; + sf::VideoMode myFullscreenMode; + bool myIsFullscreen; +} + +//////////////////////////////////////////////////////////// +/// Make a new window wrapper according to the window settings @attribs, +/// the video mode @mode, the window style @style, the window title @title +/// and the sf window implementation delegate @delegate +//////////////////////////////////////////////////////////// +- (id)initWithSettings:(sf::WindowSettings&)attribs + videoMode:(sf::VideoMode&)mode + style:(unsigned long)style + title:(NSString *)title + delegate:(sf::priv::WindowImplCocoa *)delegate; + +//////////////////////////////////////////////////////////// +/// Make a new window wrapper by importing @window and according to +/// the window settings @params and the sf window implementation delegate +/// @delegate +/// @window and @delegate must not be null +//////////////////////////////////////////////////////////// +- (id)initWithWindow:(NSWindow *)window + settings:(sf::WindowSettings&)params + delegate:(sf::priv::WindowImplCocoa *)delegate; + +//////////////////////////////////////////////////////////// +/// Make a new window wrapper by importing @window if it's not null and according to +/// the window settings @params and the sf window implementation delegate +/// @delegate; or by creating a new window if @window is null. In this case @title +/// must therefore not be null and @params must be valid. +/// @delegate must never be null +//////////////////////////////////////////////////////////// +- (id)initWithWindow:(NSWindow *)window + settings:(sf::WindowSettings&)params + videoMode:(sf::VideoMode&)mode + style:(unsigned long)style + title:(NSString *)title + delegate:(sf::priv::WindowImplCocoa *)delegate; + + +//////////////////////////////////////////////////////////// +/// Finish the window setup (without knowing whether it's a imported +/// window) +//////////////////////////////////////////////////////////// +/* - (void)setupGLViewAndWindow; */ + +//////////////////////////////////////////////////////////// +/// Return a reference to the internal Cocoa window +//////////////////////////////////////////////////////////// +- (NSWindow *)window; + +//////////////////////////////////////////////////////////// +/// Return a reference to the internal Cocoa OpenGL view +//////////////////////////////////////////////////////////// +- (GLView *)glView; + +//////////////////////////////////////////////////////////// +/// Forward call to set the window position on screen +//////////////////////////////////////////////////////////// +- (void)setPosition:(NSPoint)pos; + +//////////////////////////////////////////////////////////// +/// Forward call to set the window size +//////////////////////////////////////////////////////////// +- (void)setSize:(NSSize)size; + +//////////////////////////////////////////////////////////// +/// Return the mouse location relative to the internal window +//////////////////////////////////////////////////////////// +- (NSPoint)mouseLocation; + +//////////////////////////////////////////////////////////// +/// Return whether the mouse is on our window +//////////////////////////////////////////////////////////// +- (BOOL)mouseInside; + +//////////////////////////////////////////////////////////// +/// Close or open the window +//////////////////////////////////////////////////////////// +- (void)show:(bool)flag; + +//////////////////////////////////////////////////////////// +/// Forward call to en/disable the OpenGL view vertical synchronization +//////////////////////////////////////////////////////////// +- (void)enableVerticalSync:(bool)flag; + +//////////////////////////////////////////////////////////// +/// Forward 'setActive' call the the OpenGL view +//////////////////////////////////////////////////////////// +- (void)setActive:(bool)flag; + +//////////////////////////////////////////////////////////// +/// Forward call to flush the OpenGL view +//////////////////////////////////////////////////////////// +- (void)flushBuffer; + +@end + diff --git a/src/SFML/Window/Cocoa/GLKit.mm b/src/SFML/Window/Cocoa/GLKit.mm new file mode 100644 index 000000000..9d266a9d9 --- /dev/null +++ b/src/SFML/Window/Cocoa/GLKit.mm @@ -0,0 +1,1024 @@ +//////////////////////////////////////////////////////////// +// +// SFML - Simple and Fast Multimedia Library +// Copyright (C) 2007-2009 Lucas Soltic (ceylow@gmail.com) and 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 +//////////////////////////////////////////////////////////// +#import +#import +#import +#import +#import +#import +#import + + +//////////////////////////////////////////////////////////// +/// Window independant OpenGL context class +//////////////////////////////////////////////////////////// +@implementation GLContext + +static GLContext *sharedCtx = nil; + +//////////////////////////////////////////////////////////// +/// Return the shared OpenGL context instance (making one if needed) +//////////////////////////////////////////////////////////// ++ (id)sharedContext +{ + if (sharedCtx == nil) + { + // Make a new context with the default parameters + sf::WindowSettings params(0, 0, 0); + sharedCtx = [[GLContext alloc] initWithAttributes:params sharedContext:nil]; + } + + return sharedCtx; +} + +- (void)dealloc +{ + [mySharedContext release]; + [super dealloc]; +} + +//////////////////////////////////////////////////////////// +/// Make a new OpenGL context according to the @attribs settings +/// and the shared context @context +//////////////////////////////////////////////////////////// +- (id)initWithAttributes:(sf::WindowSettings&)attribs sharedContext:(GLContext *)context +{ + // Note about antialiasing and other context attributes : + // OpenGL context sharing does not allow the shared contexts to use different attributes. + // The point is that the default shared global OpenGL context uses default parameters. + // That means that all the other context *should* use the same paramaters. + // Fortunately some values parameters for some parameters are compatible, but some are not + // among which : the antialising level. + // + // I've no way to fix this for now. + + NSOpenGLPixelFormat *myPixelFormat = nil; + unsigned idx = 0; + + // Attributes list + NSOpenGLPixelFormatAttribute ctxtAttribs[15] = {(NSOpenGLPixelFormatAttribute) 0}; + + // Accelerated, double buffered + ctxtAttribs[idx++] = NSOpenGLPFAClosestPolicy; + ctxtAttribs[idx++] = NSOpenGLPFADoubleBuffer; + ctxtAttribs[idx++] = NSOpenGLPFAAccelerated; + + // windowed context (even fullscreen mode uses a window) + ctxtAttribs[idx++] = NSOpenGLPFAWindow; + + // Color size ; usually 32 bits per pixel + ctxtAttribs[idx++] = NSOpenGLPFAColorSize; + ctxtAttribs[idx++] = (NSOpenGLPixelFormatAttribute) sf::VideoMode::GetDesktopMode().BitsPerPixel; + + // Z-buffer size + ctxtAttribs[idx++] = NSOpenGLPFADepthSize; + ctxtAttribs[idx++] = (NSOpenGLPixelFormatAttribute) attribs.DepthBits; + + // Stencil bits (I don't really know what's that...) + ctxtAttribs[idx++] = NSOpenGLPFAStencilSize; + ctxtAttribs[idx++] = (NSOpenGLPixelFormatAttribute) attribs.StencilBits; + + myPixelFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:ctxtAttribs]; + + if (myPixelFormat) { + self = [super initWithFormat:myPixelFormat + shareContext:context]; + + mySharedContext = [context retain]; + + // Get the effective properties from our OpenGL context + GLint tmpDepthSize = 0, tmpStencilBits = 0, tmpAntialiasingLevel = 0; + + if (self) { + [myPixelFormat getValues:&tmpDepthSize + forAttribute:NSOpenGLPFADepthSize + forVirtualScreen:[self currentVirtualScreen]]; + + [myPixelFormat getValues:&tmpStencilBits + forAttribute:NSOpenGLPFAStencilSize + forVirtualScreen:[self currentVirtualScreen]]; + + [myPixelFormat getValues:&tmpAntialiasingLevel + forAttribute:NSOpenGLPFASamples + forVirtualScreen:[self currentVirtualScreen]]; + } + + + attribs.DepthBits = (unsigned) tmpDepthSize; + attribs.StencilBits = (unsigned) tmpStencilBits; + attribs.AntialiasingLevel = (unsigned) tmpAntialiasingLevel; + + [myPixelFormat release]; + } + + return self; +} + +@end + + +//////////////////////////////////////////////////////////// +/// Customized Cocoa OpenGL view +//////////////////////////////////////////////////////////// +@implementation GLView + +//////////////////////////////////////////////////////////// +/// Make a new view according the the rect @frame, +/// the video mode @mode, the window settings @settings +/// and the sf window delegate @delegate +/// @delegate must not be null +//////////////////////////////////////////////////////////// +- (id)initWithFrame:(NSRect)frame + mode:(const sf::VideoMode&)mode + settings:(sf::WindowSettings&)settings + delegate:(sf::priv::WindowImplCocoa *)delegate +{ + assert(delegate != NULL); + + // make the view + self = [super initWithFrame:frame pixelFormat:nil]; + + if (self) + { + // enabled auto-resizing + [self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; + + // make the OpenGL context + myGLContext = [[GLContext alloc] initWithAttributes:settings sharedContext:sharedCtx]; + + // We need to update the OpenGL view when it's resized + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + [nc addObserver:self + selector:@selector(viewFrameDidChange:) + name:NSViewFrameDidChangeNotification + object:self]; + + // Save the delegate + myDelegate = delegate; + } + + return self; +} + + +//////////////////////////////////////////////////////////// +/// Clean the instance +//////////////////////////////////////////////////////////// +- (void)dealloc +{ + // Remove the observer and release the OpenGL context + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [myGLContext release]; + + [super dealloc]; +} + + +//////////////////////////////////////////////////////////// +/// Finish view setting (after having added it to the window) +//////////////////////////////////////////////////////////// +- (void)finishInitialization +{ + assert([self superview] != nil); + assert(myGLContext != nil); + + // Attach the OpenGL context to our view + [self clearGLContext]; + [self setOpenGLContext:myGLContext]; + [myGLContext setView:self]; + + // Make our view the first responder + [[self window] makeFirstResponder:self]; +} + + +//////////////////////////////////////////////////////////// +/// Forward call to en/disable vertical synchronization +//////////////////////////////////////////////////////////// +- (void)enableVerticalSync:(bool)flag +{ + GLint enable = (flag) ? 1 : 0; + [[self openGLContext] setValues:&enable forParameter:NSOpenGLCPSwapInterval]; +} + + +//////////////////////////////////////////////////////////// +/// Forward call to set the OpenGL context as active according to @flag +//////////////////////////////////////////////////////////// +- (void)setActive:(bool)flag +{ + if (flag) { + if ([NSOpenGLContext currentContext] != [self openGLContext]) + [[self openGLContext] makeCurrentContext]; + } else { + if ([NSOpenGLContext currentContext] == [self openGLContext]) + [NSOpenGLContext clearCurrentContext]; + } +} + + +//////////////////////////////////////////////////////////// +/// Forward call to flush the OpenGL context +//////////////////////////////////////////////////////////// +- (void)flushBuffer +{ + [[self openGLContext] flushBuffer]; +} + + +//////////////////////////////////////////////////////////// +/// Send event to the linked window +//////////////////////////////////////////////////////////// +- (void)pushEvent:(sf::Event)sfEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleNotifiedEvent(sfEvent); +} + + +//////////////////////////////////////////////////////////// +/// Notification method receiver when OpenGL view size changes +//////////////////////////////////////////////////////////// +- (void)viewFrameDidChange:(NSNotification *)notification +{ + [self update]; + + sf::Event ev; + ev.Type = sf::Event::Resized; + ev.Size.Width = (unsigned) [self frame].size.width; + ev.Size.Height = (unsigned) [self frame].size.height; + + [self pushEvent:ev]; +} + + +//////////////////////////////////////////////////////////// +/// Receiver method called when a key is pressed +//////////////////////////////////////////////////////////// +- (void)keyDown:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + + NSText *field = [[self window] fieldEditor:YES forObject:nil]; + [field interpretKeyEvents:[NSArray arrayWithObject:theEvent]]; + [field setString:@""]; + + myDelegate->HandleKeyDown(theEvent); +} + + +//////////////////////////////////////////////////////////// +/// Receiver method called when a key is released +//////////////////////////////////////////////////////////// +- (void)keyUp:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleKeyUp(theEvent); +} + + +//////////////////////////////////////////////////////////// +/// Receiver method called when a modifier flag has changed +//////////////////////////////////////////////////////////// +- (void)flagsChanged:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleModifierKey(theEvent); +} + + +//////////////////////////////////////////////////////////// +/// Receiver method called when the mouse wheel has been used +//////////////////////////////////////////////////////////// +- (void)scrollWheel:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleMouseWheel(theEvent); +} + + +//////////////////////////////////////////////////////////// +/// Receiver method called when left mouse click is pressed +//////////////////////////////////////////////////////////// +- (void)mouseDown:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleMouseDown(theEvent); +} + + +//////////////////////////////////////////////////////////// +/// Receiver method called when right mouse click is pressed +//////////////////////////////////////////////////////////// +- (void)rightMouseDown:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleMouseDown(theEvent); +} + + +//////////////////////////////////////////////////////////// +/// Receiver method called when left mouse click is released +//////////////////////////////////////////////////////////// +- (void)mouseUp:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleMouseUp(theEvent); +} + + +//////////////////////////////////////////////////////////// +/// Receiver method called when right mouse click is released +//////////////////////////////////////////////////////////// +- (void)rightMouseUp:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleMouseUp(theEvent); +} + + +//////////////////////////////////////////////////////////// +/// Receiver method called when mouse moves +//////////////////////////////////////////////////////////// +- (void)mouseMoved:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleMouseMove(theEvent); +} + +//////////////////////////////////////////////////////////// +/// Receiver method called when mouse is pressed (on left button) and moves +//////////////////////////////////////////////////////////// +- (void)mouseDragged:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleMouseMove(theEvent); +} + +//////////////////////////////////////////////////////////// +/// Receiver method called when mouse is pressed (on right button) and moves +//////////////////////////////////////////////////////////// +- (void)rightMouseDragged:(NSEvent *)theEvent +{ + assert(myDelegate != NULL); + myDelegate->HandleMouseMove(theEvent); +} + + +//////////////////////////////////////////////////////////// +/// Tells that the view can be focused +//////////////////////////////////////////////////////////// +- (BOOL)acceptsFirstResponder +{ + return YES; +} + + +//////////////////////////////////////////////////////////// +/// Tells that the view can become the key responder (ie. can catch key events) +//////////////////////////////////////////////////////////// +- (BOOL)canBecomeKeyView +{ + return YES; +} + +@end + + +//////////////////////////////////////////////////////////// +/// Cocoa window implementation to let fullscreen windows +/// catch key events +//////////////////////////////////////////////////////////// +@implementation GLWindow + +- (BOOL)canBecomeKeyWindow +{ + return YES; +} + +- (BOOL)canBecomeMainWindow +{ + return YES; +} + +@end + + +//////////////////////////////////////////////////////////// +/// WindowWrapper class : handles both imported and self-built windows +//////////////////////////////////////////////////////////// +@implementation WindowWrapper + +//////////////////////////////////////////////////////////// +/// Make a new window wrapper according to the window settings @attribs, +/// the video mode @mode, the window style @style, the window title @title +/// and the sf window implementation delegate @delegate +//////////////////////////////////////////////////////////// +- (id)initWithSettings:(sf::WindowSettings&)params + videoMode:(sf::VideoMode&)mode + style:(unsigned long)style + title:(NSString *)title + delegate:(sf::priv::WindowImplCocoa *)delegate +{ + /* + assert(title != nil); + assert(delegate != NULL); + + self = [super init]; + + if (self) + { + NSRect frame = NSMakeRect (0.0f, 0.0f, (float) mode.Width, (float) mode.Height); + unsigned int mask = 0; + + // We grab options from WindowStyle and add them to our window mask + if (style & sf::Style::None || style & sf::Style::Fullscreen) { + mask |= NSBorderlessWindowMask; + + if (style & sf::Style::Fullscreen) { + myIsFullscreen = true; + + // Check display mode and put new values in 'mode' if needed + boolean_t exact = true; + + CFDictionaryRef properties = CGDisplayBestModeForParameters(kCGDirectMainDisplay, mode.BitsPerPixel, + mode.Width, mode.Height, &exact); + + if (!properties) { + std::cerr << "Unable to get a display mode with the given parameters" << std::endl; + [self autorelease]; + return nil; + } + + if (exact == false) { + CFNumberGetValue((CFNumberRef) CFDictionaryGetValue(properties, kCGDisplayWidth), + kCFNumberIntType, &mode.Width); + + CFNumberGetValue((CFNumberRef) CFDictionaryGetValue(properties, kCGDisplayHeight), + kCFNumberIntType, &mode.Height); + + CFNumberGetValue((CFNumberRef) CFDictionaryGetValue(properties, kCGDisplayBitsPerPixel), + kCFNumberIntType, &mode.BitsPerPixel); + + } + } + + } else { + if (style & sf::Style::Titlebar) { + mask |= NSTitledWindowMask; + mask |= NSMiniaturizableWindowMask; + } + + if (style & sf::Style::Resize) { + mask |= NSTitledWindowMask; + mask |= NSMiniaturizableWindowMask; + mask |= NSResizableWindowMask; + } + + if (style & sf::Style::Close) { + mask |= NSTitledWindowMask; + mask |= NSClosableWindowMask; + mask |= NSMiniaturizableWindowMask; + } + } + + // Now we make the window with the values we got + // Note: defer flag set to NO to be able to use OpenGL in our window + myWindow = [[GLWindow alloc] initWithContentRect:frame + styleMask:mask + backing:NSBackingStoreBuffered + defer:NO]; + + if (myWindow) { + // We set title and window position + [myWindow setTitle:title]; + [myWindow center]; + + // Make the OpenGL view + myView = [[GLView alloc] initWithFrame:[[myWindow contentView] frame] + mode:mode + settings:params + delegate:delegate]; + if (myView) { + // Finish setting up the view and window + [self setupGLViewAndWindow]; + } else { + std::cerr << "Unable to create the OpenGL view" << std::endl; + [self autorelease]; + return nil; + } + + if (myIsFullscreen) { + myFullscreenMode = mode; + + // Using this because full screen window was not always + // in front of the other application windows when unhiding app + [myWindow setLevel:NSFloatingWindowLevel]; + } + } + } + + return self; + */ + + return [self initWithWindow:nil + settings:params + videoMode:mode + style:style + title:title + delegate:delegate]; +} + + +//////////////////////////////////////////////////////////// +/// Make a new window wrapper by importing @window and according to +/// the window settings @params and the sf window implementation delegate +/// @delegate +/// @window and @delegate must not be null +//////////////////////////////////////////////////////////// +- (id)initWithWindow:(NSWindow *)window + settings:(sf::WindowSettings&)params + delegate:(sf::priv::WindowImplCocoa *)delegate +{ + /* + assert(window != NULL); + assert(delegate != NULL); + + self = [super init]; + + if (self) + { + myWindow = (GLWindow *)[window retain]; + + sf::VideoMode mode([[myWindow contentView] frame].size.width, + [[myWindow contentView] frame].size.height); + + // Make the OpenGL view + myView = [[GLView alloc] initWithFrame:[[myWindow contentView] frame] + mode:mode + settings:params + delegate:delegate]; + + if (myView) + { + // Finish setting up the view and window + [self setupGLViewAndWindow]; + } + else + { + std::cerr << "Unable to create the OpenGL view" << std::endl; + [self autorelease]; + return nil; + } + } + + return self; + */ + + sf::VideoMode mode([[myWindow contentView] frame].size.width, [[myWindow contentView] frame].size.height); + return [self initWithWindow:[window autorelease] + settings:params + videoMode:mode + style:0 + title:nil + delegate:delegate]; +} + + +//////////////////////////////////////////////////////////// +/// Make a new window wrapper by importing @window if it's not null and according to +/// the window settings @params and the sf window implementation delegate +/// @delegate; or by creating a new window if @window is null. In this case @title +/// must therefore not be null and @params must be valid. +/// @delegate must never be null +//////////////////////////////////////////////////////////// +- (id)initWithWindow:(NSWindow *)window + settings:(sf::WindowSettings&)params + videoMode:(sf::VideoMode&)mode + style:(unsigned long)style + title:(NSString *)title + delegate:(sf::priv::WindowImplCocoa *)delegate +{ + assert(delegate != NULL); + + self = [super init]; + + if (self) + { + if (window) { + myWindow = (GLWindow *)[window retain]; + } else { + assert(title != nil); + + NSRect frame = NSMakeRect (0.0f, 0.0f, (float) mode.Width, (float) mode.Height); + unsigned int mask = 0; + + // We grab options from WindowStyle and add them to our window mask + if (style & sf::Style::None || style & sf::Style::Fullscreen) { + mask |= NSBorderlessWindowMask; + + if (style & sf::Style::Fullscreen) { + myIsFullscreen = true; + + // Check display mode and put new values in 'mode' if needed + boolean_t exact = true; + + CFDictionaryRef properties = CGDisplayBestModeForParameters(kCGDirectMainDisplay, mode.BitsPerPixel, + mode.Width, mode.Height, &exact); + + if (!properties) { + std::cerr << "Unable to get a display mode with the given parameters" << std::endl; + [self autorelease]; + return nil; + } + + if (exact == false) { + CFNumberGetValue((CFNumberRef) CFDictionaryGetValue(properties, kCGDisplayWidth), + kCFNumberIntType, &mode.Width); + + CFNumberGetValue((CFNumberRef) CFDictionaryGetValue(properties, kCGDisplayHeight), + kCFNumberIntType, &mode.Height); + + CFNumberGetValue((CFNumberRef) CFDictionaryGetValue(properties, kCGDisplayBitsPerPixel), + kCFNumberIntType, &mode.BitsPerPixel); + + } + } + + } else { + if (style & sf::Style::Titlebar) { + mask |= NSTitledWindowMask; + mask |= NSMiniaturizableWindowMask; + } + + if (style & sf::Style::Resize) { + mask |= NSTitledWindowMask; + mask |= NSMiniaturizableWindowMask; + mask |= NSResizableWindowMask; + } + + if (style & sf::Style::Close) { + mask |= NSTitledWindowMask; + mask |= NSClosableWindowMask; + mask |= NSMiniaturizableWindowMask; + } + } + + // Now we make the window with the values we got + // Note: defer flag set to NO to be able to use OpenGL in our window + myWindow = [[GLWindow alloc] initWithContentRect:frame + styleMask:mask + backing:NSBackingStoreBuffered + defer:NO]; + + if (myWindow) { + // We set title and window position + [myWindow setTitle:title]; + [myWindow center]; + } else { + std::cerr << "Unable to create the Cocoa window" << std::endl; + [self autorelease]; + return nil; + } + } + + // Make the OpenGL view + myView = [[GLView alloc] initWithFrame:[[myWindow contentView] frame] + mode:mode + settings:params + delegate:delegate]; + + if (myView) { + // Finish setting up the view and window + // Add the view to our window and tell it to the view + [[myWindow contentView] addSubview:myView]; + [myView finishInitialization]; + + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + + // We want to know when our window got the focus + [nc addObserver:self + selector:@selector(windowDidBecomeMain:) + name:NSWindowDidBecomeMainNotification + object:myWindow]; + + // We want to know when our window lost the focus + [nc addObserver:self + selector:@selector(windowDidResignMain:) + name:NSWindowDidResignMainNotification + object:myWindow]; + + // We want to know when the user closes the window + [nc addObserver:self + selector:@selector(windowWillClose:) + name:NSWindowWillCloseNotification + object:myWindow]; + + // I want to re-center the window if it's a full screen one and moved by Spaces + [nc addObserver:self + selector:@selector(windowDidMove:) + name:NSWindowDidMoveNotification + object:myWindow]; + + // Needed not to make application crash when releasing the window in our destructor + // (I prefer to take control of everything :P) + [myWindow setReleasedWhenClosed:NO]; + [myWindow setAcceptsMouseMovedEvents:YES]; + + } else { + std::cerr << "Unable to create the OpenGL view" << std::endl; + [self autorelease]; + return nil; + } + + if (myIsFullscreen) { + myFullscreenMode = mode; + + // Using this because full screen window was not always + // in front of the other application windows when unhiding app + [myWindow setLevel:NSFloatingWindowLevel]; + } + } + + return self; +} + +//////////////////////////////////////////////////////////// +/// Finish the window setup (without knowing whether it's a imported +/// window) +//////////////////////////////////////////////////////////// +/* - (void)setupGLViewAndWindow +{ + NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; + + // We want to know when our window got the focus + [nc addObserver:myView + selector:@selector(windowDidBecomeMain:) + name:NSWindowDidBecomeMainNotification + object:myWindow]; + + // We want to know when our window lost the focus + [nc addObserver:myView + selector:@selector(windowDidResignMain:) + name:NSWindowDidResignMainNotification + object:myWindow]; + + // We want to know when the user closes the window + [nc addObserver:myView + selector:@selector(windowWillClose:) + name:NSWindowWillCloseNotification + object:myWindow]; + + // I want to re-center the window if it's a full screen one and moved by Spaces + [nc addObserver:myView + selector:@selector(windowDidMove:) + name:NSWindowDidMoveNotification + object:myWindow]; + + // Needed not to make application crash when releasing the window in our destructor + // (I prefer to take control of everything :P) + [myWindow setReleasedWhenClosed:NO]; + [myWindow setAcceptsMouseMovedEvents:YES]; +} */ + + +//////////////////////////////////////////////////////////// +/// Clean the window wrapper +//////////////////////////////////////////////////////////// +- (void)dealloc +{ + // Remove the notification observer + if (myView) + [[NSNotificationCenter defaultCenter] removeObserver:myView]; + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + // Close the window + [self show:false]; + + // Release the window and view + [myView release]; + [myWindow release]; + + [super dealloc]; +} + + +//////////////////////////////////////////////////////////// +/// Return a reference to the internal Cocoa window +//////////////////////////////////////////////////////////// +- (NSWindow *)window +{ + return myWindow; +} + + +//////////////////////////////////////////////////////////// +/// Return a reference to the internal Cocoa OpenGL view +//////////////////////////////////////////////////////////// +- (GLView *)glView +{ + return myView; +} + + +//////////////////////////////////////////////////////////// +/// Forward call to set the window position on screen +//////////////////////////////////////////////////////////// +- (void)setPosition:(NSPoint)pos +{ + assert(myWindow != nil); + + if (!myIsFullscreen) { + // Flip Y and set window position + pos.y = [[myWindow screen] frame].size.height - pos.y; + [myWindow setFrameTopLeftPoint:pos]; + } +} + + +//////////////////////////////////////////////////////////// +/// Forward call to set the window size +//////////////////////////////////////////////////////////// +- (void)setSize:(NSSize)size +{ + assert(myWindow != nil); + + if (!myIsFullscreen) { + [myWindow setFrame:NSMakeRect([myWindow frame].origin.x, + [myWindow frame].origin.y, + size.width, size.height) + display:YES]; + } +} + + +//////////////////////////////////////////////////////////// +/// Return the mouse location relative to the internal window +//////////////////////////////////////////////////////////// +- (NSPoint)mouseLocation +{ + assert(myWindow != nil); + + NSPoint relativeLocation = [myWindow convertScreenToBase:[NSEvent mouseLocation]]; + relativeLocation.y = [[self glView] frame].size.height - relativeLocation.y; + return relativeLocation; +} + + +//////////////////////////////////////////////////////////// +/// Return whether the mouse is on our window +//////////////////////////////////////////////////////////// +- (BOOL)mouseInside +{ + assert(myWindow != nil); + assert(myView != nil); + + BOOL flag = NO; + + if ([myWindow isVisible]) { + NSPoint relativeToWindow = [myWindow mouseLocationOutsideOfEventStream]; + NSPoint relativeToView = [myView convertPoint:relativeToWindow fromView:nil]; + + if (NSPointInRect (relativeToView, [myView bounds])) + { + flag = YES; + } + } + + return flag; +} + + +//////////////////////////////////////////////////////////// +/// Close or open the window +//////////////////////////////////////////////////////////// +- (void)show:(bool)flag +{ + assert(myWindow != nil); + + if (flag && ![myWindow isVisible]) { + // Wanna open the closed window + + if (myIsFullscreen) { + [SharedAppController setFullscreenWindow:self mode:&myFullscreenMode]; + } else { + // Show the window + [myWindow makeKeyAndOrderFront:nil]; + } + } else if (!flag && [myWindow isVisible]) { + // Wanna close the opened window + + if (myIsFullscreen) { + [SharedAppController setFullscreenWindow:nil mode:NULL]; + } else { + // Close the window + [myWindow close]; + } + } +} + + +//////////////////////////////////////////////////////////// +/// Forward call to en/disable the OpenGL view vertical synchronization +//////////////////////////////////////////////////////////// +- (void)enableVerticalSync:(bool)flag +{ + assert(myView != nil); + [myView enableVerticalSync:flag]; +} + + +//////////////////////////////////////////////////////////// +/// Forward 'setActive' call the the OpenGL view +//////////////////////////////////////////////////////////// +- (void)setActive:(bool)flag +{ + assert(myView != nil); + [myView setActive:flag]; +} + + +//////////////////////////////////////////////////////////// +/// Forward call to flush the OpenGL view +//////////////////////////////////////////////////////////// +- (void)flushBuffer +{ + assert(myView != nil); + [myView flushBuffer]; +} + + +//////////////////////////////////////////////////////////// +/// Notification method receiver when the window gains focus +//////////////////////////////////////////////////////////// +- (void)windowDidBecomeMain:(NSNotification *)notification +{ + sf::Event ev; + ev.Type = sf::Event::GainedFocus; + + [myView pushEvent:ev]; +} + + +//////////////////////////////////////////////////////////// +/// Notification method receiver when the window loses focus +//////////////////////////////////////////////////////////// +- (void)windowDidResignMain:(NSNotification *)notification +{ + sf::Event ev; + ev.Type = sf::Event::LostFocus; + + [myView pushEvent:ev]; +} + + +//////////////////////////////////////////////////////////// +/// Notification method receiver when the window closes +//////////////////////////////////////////////////////////// +- (void)windowWillClose:(NSNotification *)notification +{ + sf::Event ev; + ev.Type = sf::Event::Closed; + + [myView pushEvent:ev]; +} + + +//////////////////////////////////////////////////////////// +/// Notification method receiver when the window finish moving +//////////////////////////////////////////////////////////// +- (void)windowDidMove:(NSNotification *)notification +{ + NSWindow *sender = [notification object]; + + if (!([sender styleMask] & NSTitledWindowMask)) + [sender center]; +} + +@end + diff --git a/src/SFML/Window/Cocoa/Joystick.cpp b/src/SFML/Window/Cocoa/Joystick.cpp index 6b456a199..4ade09c4d 100644 --- a/src/SFML/Window/Cocoa/Joystick.cpp +++ b/src/SFML/Window/Cocoa/Joystick.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-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/src/SFML/Window/Cocoa/Joystick.hpp b/src/SFML/Window/Cocoa/Joystick.hpp index 7a78c9361..425907517 100644 --- a/src/SFML/Window/Cocoa/Joystick.hpp +++ b/src/SFML/Window/Cocoa/Joystick.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-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/src/SFML/Window/Cocoa/VideoModeSupport.cpp b/src/SFML/Window/Cocoa/VideoModeSupport.cpp index 75f5d8e84..9b5ebd016 100644 --- a/src/SFML/Window/Cocoa/VideoModeSupport.cpp +++ b/src/SFML/Window/Cocoa/VideoModeSupport.cpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-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/src/SFML/Window/Cocoa/VideoModeSupport.hpp b/src/SFML/Window/Cocoa/VideoModeSupport.hpp index 2b64685e2..4892fe549 100644 --- a/src/SFML/Window/Cocoa/VideoModeSupport.hpp +++ b/src/SFML/Window/Cocoa/VideoModeSupport.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-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/src/SFML/Window/Cocoa/WindowController.h b/src/SFML/Window/Cocoa/WindowController.h deleted file mode 100644 index 4c40825df..000000000 --- a/src/SFML/Window/Cocoa/WindowController.h +++ /dev/null @@ -1,73 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2008 Lucas Soltic (elmerod@gmail.com) and 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 -//////////////////////////////////////////////////////////// -#import -#import -#import - - -//////////////////////////////////////////////////////////// -/// WindowController is a Cocoa notification receiver -//////////////////////////////////////////////////////////// -@interface WindowController : NSObject { - sf::priv::WindowImplCocoa *parentWindow; -} - -//////////////////////////////////////////////////////////// -/// Return a new autoreleased WindowController object linked -/// to the 'window' WindowImplCocoa object. -//////////////////////////////////////////////////////////// -+ (WindowController *)controllerWithWindow:(sf::priv::WindowImplCocoa *)window; -- (WindowController *)initWithWindow:(sf::priv::WindowImplCocoa *)window; - -//////////////////////////////////////////////////////////// -/// Notification method receiver when OpenGL view size changes -//////////////////////////////////////////////////////////// -- (void)viewFrameDidChange:(NSNotification *)notification; - -//////////////////////////////////////////////////////////// -/// Notification method receiver when the window gains focus -//////////////////////////////////////////////////////////// -- (void)windowDidBecomeMain:(NSNotification *)notification; - -//////////////////////////////////////////////////////////// -/// Notification method receiver when the window loses focus -//////////////////////////////////////////////////////////// -- (void)windowDidResignMain:(NSNotification *)notification; - -//////////////////////////////////////////////////////////// -/// Notification method receiver when the window closes -//////////////////////////////////////////////////////////// -- (void)windowWillClose:(NSNotification *)notification; - -@end - -// NSWindow subclass used to allow full screen windows to receive events -@interface SFWindow : NSWindow -@end - diff --git a/src/SFML/Window/Cocoa/WindowController.mm b/src/SFML/Window/Cocoa/WindowController.mm deleted file mode 100644 index 286a3ed6c..000000000 --- a/src/SFML/Window/Cocoa/WindowController.mm +++ /dev/null @@ -1,157 +0,0 @@ -//////////////////////////////////////////////////////////// -// -// SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2008 Lucas Soltic (elmerod@gmail.com) and 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 -//////////////////////////////////////////////////////////// -#import -#import -#import -#import -#import - -@implementation WindowController - -//////////////////////////////////////////////////////////// -/// Forbide use of WindowController without any linked WindowImplCocoa object -//////////////////////////////////////////////////////////// -- (id)init -{ - return [self initWithWindow:NULL]; -} - -//////////////////////////////////////////////////////////// -/// Initialize a new WindowController object and link it -/// to the 'window' object. -//////////////////////////////////////////////////////////// -- (WindowController *)initWithWindow:(sf::priv::WindowImplCocoa *)window -{ - if (window == NULL) { - std::cerr << "-[WindowController initWithWindow:NULL] -- initialization without any linked window is forbidden ; nil returned" << std::endl; - [self release]; - return nil; - } - - self = [super init]; - - if (self != nil) { - parentWindow = window; - } - - return self; -} - -//////////////////////////////////////////////////////////// -/// Return a new autoreleased WindowController object linked -/// to the 'window' WindowImplCocoa object. -//////////////////////////////////////////////////////////// -+ (WindowController *)controllerWithWindow:(sf::priv::WindowImplCocoa *)window -{ - WindowController *ctrl = - massert([WindowController alloc]); - return [[ctrl initWithWindow:window] autorelease]; -} - -//////////////////////////////////////////////////////////// -/// Send event to the linked window -//////////////////////////////////////////////////////////// -- (void)pushEvent:(sf::Event)sfEvent -{ - if (parentWindow != NULL) { - parentWindow->HandleNotifiedEvent(sfEvent); - } -} - -//////////////////////////////////////////////////////////// -/// Notification method receiver when OpenGL view size changes -//////////////////////////////////////////////////////////// -- (void)viewFrameDidChange:(NSNotification *)notification -{ - NSOpenGLView *glView = [notification object]; - [[glView openGLContext] update]; - - sf::Event ev; - ev.Type = sf::Event::Resized; - ev.Size.Width = (unsigned) [glView frame].size.width; - ev.Size.Height = (unsigned) [glView frame].size.height; - - [self pushEvent:ev]; -} - -//////////////////////////////////////////////////////////// -/// Notification method receiver when the window gains focus -//////////////////////////////////////////////////////////// -- (void)windowDidBecomeMain:(NSNotification *)notification -{ - sf::Event ev; - ev.Type = sf::Event::GainedFocus; - - [self pushEvent:ev]; -} - -//////////////////////////////////////////////////////////// -/// Notification method receiver when the window loses focus -//////////////////////////////////////////////////////////// -- (void)windowDidResignMain:(NSNotification *)notification -{ - sf::Event ev; - ev.Type = sf::Event::LostFocus; - - [self pushEvent:ev]; -} - -//////////////////////////////////////////////////////////// -/// Notification method receiver when the window closes -//////////////////////////////////////////////////////////// -- (void)windowWillClose:(NSNotification *)notification -{ - sf::Event ev; - ev.Type = sf::Event::Closed; - - [self pushEvent:ev]; -} - -- (void)windowDidMove:(NSNotification *)notification -{ - NSWindow *sender = [notification object]; - - if (!([sender styleMask] & NSTitledWindowMask)) - [sender center]; -} - -@end - - -@implementation SFWindow -- (BOOL)canBecomeKeyWindow -{ - return YES; -} - -- (BOOL)canBecomeMainWindow -{ - return YES; -} -@end diff --git a/src/SFML/Window/Cocoa/WindowImplCocoa.hpp b/src/SFML/Window/Cocoa/WindowImplCocoa.hpp index 1b2e96b40..bc93d54ce 100644 --- a/src/SFML/Window/Cocoa/WindowImplCocoa.hpp +++ b/src/SFML/Window/Cocoa/WindowImplCocoa.hpp @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2008 Lucas Soltic (elmerod@gmail.com) and Laurent Gomila (laurent.gom@gmail.com) +// Copyright (C) 2007-2009 Lucas Soltic (ceylow@gmail.com) and 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. @@ -32,13 +32,16 @@ #include #include +#ifdef __OBJC__ +#import +@class WindowWrapper; +#endif + namespace sf { namespace priv { -typedef struct objc_members objc_members; - //////////////////////////////////////////////////////////// /// WindowImplCocoa is the Cocoa implementation of WindowImpl //////////////////////////////////////////////////////////// @@ -88,25 +91,23 @@ public : //////////////////////////////////////////////////////////// static bool IsContextActive(); - //////////////////////////////////////////////////////////// - /// Handle Cocoa NSEvent - //////////////////////////////////////////////////////////// - void HandleEvent(void *eventRef); - //////////////////////////////////////////////////////////// /// Handle an event sent by the default NSNotificationCenter //////////////////////////////////////////////////////////// void HandleNotifiedEvent(Event& eventRef); //////////////////////////////////////////////////////////// - /// Return a pointer to the NSWindow (objc->windowHandle) object + /// Event handling for every event type. + /// 'eventRef' is a NSEvent. //////////////////////////////////////////////////////////// - void *CocoaWindow(void); + void HandleKeyDown(void *eventRef); + void HandleKeyUp(void *eventRef); + void HandleModifierKey(void *eventRef); + void HandleMouseDown(void *eventRef); + void HandleMouseUp(void *eventRef); + void HandleMouseMove(void *eventRef); + void HandleMouseWheel(void *eventRef); - //////////////////////////////////////////////////////////// - /// Return whether the window is in full screen mode - //////////////////////////////////////////////////////////// - bool IsFullscreen(void); private : //////////////////////////////////////////////////////////// @@ -182,38 +183,19 @@ private : //////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////// - /// Event handling for every event type. - /// 'eventRef' is a NSEvent. - //////////////////////////////////////////////////////////// - int HandleKeyDown(void *eventRef); - int HandleKeyUp(void *eventRef); - int HandleModifierKey(void *eventRef); - int HandleMouseDown(void *eventRef); - int HandleMouseUp(void *eventRef); - int HandleMouseMove(void *eventRef); - int HandleMouseWheel(void *eventRef); - - //////////////////////////////////////////////////////////// - /// Make some allocations and initializations - //////////////////////////////////////////////////////////// - void Initialize(void); - - //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - // An opaque structure that contains all obj-C objects - objc_members *members; +#ifdef __OBJC__ + WindowWrapper *myWrapper; +#else + void *myWrapper; +#endif - bool useKeyRepeat; - bool mouseIn; - float wheelStatus; - - bool fullscreen; - VideoMode fullscreenMode; - VideoMode desktopMode; + bool myUseKeyRepeat; + bool myMouseIn; + float myWheelStatus; }; } // namespace priv diff --git a/src/SFML/Window/Cocoa/WindowImplCocoa.mm b/src/SFML/Window/Cocoa/WindowImplCocoa.mm index 045803523..be003049d 100644 --- a/src/SFML/Window/Cocoa/WindowImplCocoa.mm +++ b/src/SFML/Window/Cocoa/WindowImplCocoa.mm @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library -// Copyright (C) 2007-2008 Lucas Soltic (elmerod@gmail.com) and Laurent Gomila (laurent.gom@gmail.com) +// Copyright (C) 2007-2009 Lucas Soltic (ceylow@gmail.com) and 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. @@ -27,38 +27,16 @@ // Headers //////////////////////////////////////////////////////////// #import -#import #import +#import #import #import #import #import -#import +#import #import -#pragma mark Notes - -// ENABLE_ANTIALIASING macro : -// -// I use this to prevent the use of antialiasing -// as OpenGL context sharing does not allow only one of the -// shared OpenGL context to be shared. That means -// antialiasing could not be used without re-compiling -// the whole sfml-window library. -// -// I've no way to fix this for now. - -// ENABLE_WINDOWIMPORT macro : -// -// I use this to disable the import of Cocoa windows -// as it does not work fine for now and is not -// a high priority. - - - - - namespace sf { namespace priv @@ -72,81 +50,34 @@ make;\ __done = 1;\ } } -// Has the event been used or not ? If not, it must be sent to NSApp -enum { - UsedEvent, - UnusedEvent -}; - - -//////////////////////////////////////////////////////////// -/// Structure containing all the members I can't directly put in the class definition -/// because I would have to hide them in a #ifdef __OBJC__ block and the object -/// allocator would allocate space for it as it would be called from a C++ code -/// that wouldn't see these members -//////////////////////////////////////////////////////////// -struct objc_members { - WindowController *controller; - SFWindow *window; - NSOpenGLContext *context; - NSOpenGLView *view; -}; - -//////////////////////////////////////////////////////////// -/// Pointer to the shared OpenGL context -//////////////////////////////////////////////////////////// -static NSOpenGLContext *sharedContext = nil; - //////////////////////////////////////////////////////////// /// Private function declarations //////////////////////////////////////////////////////////// -static SFWindow * MakeWindow(WindowSettings& params, unsigned long style, VideoMode& mode, NSString *title); -static NSOpenGLContext *MakeOpenGLContext(WindowSettings& params); -static NSOpenGLView * MakeOpenGLView(SFWindow *window, NSOpenGLContext *context, WindowSettings& params); -static void ConfigureWindow(SFWindow *window, NSOpenGLView *view, WindowController *controller); static Key::Code KeyForVirtualCode(unsigned short vCode); static Key::Code KeyForUnicode(unsigned short uniCode); static bool IsTextEvent(NSEvent *event); -static bool MouseInside(SFWindow *window, NSView *view); -static NSPoint MouseLocation(SFWindow *window); //////////////////////////////////////////////////////////// /// Default constructor /// (creates a dummy window to provide a valid OpenGL context) //////////////////////////////////////////////////////////// + static WindowImplCocoa *globalWin = NULL; WindowImplCocoa::WindowImplCocoa() : -members(NULL), -useKeyRepeat(false), -mouseIn(false), -wheelStatus(0.0f), -fullscreen(false), -fullscreenMode(0, 0, 0), -desktopMode(0, 0, 0) +myWrapper(nil), +myUseKeyRepeat(false), +myMouseIn(false), +myWheelStatus(0.0f) { - Initialize(); + [AppController sharedController]; - // We just want to have a valid support for an OpenGL context - - // So we create the OpenGL context - WindowSettings params(0, 0, 0); - members->context = MakeOpenGLContext(params); - - if (members->context != nil) { - // Increase the reference counter for the shared OpenGL context - sharedContext = [members->context retain]; - + // Create the shared OpenGL context + if ([GLContext sharedContext]) { // Then we make it the current active OpenGL context SetActive(); - - // And set the current working directory to - // the Resources folder is it's a bundled app, - // or to the directory containing the executable otherwise - chdir([[[NSBundle mainBundle] resourcePath] UTF8String]); - } else { - std::cerr << "*** SFML: Unable to make the main shared OpenGL context" << std::endl; + std::cerr << "Unable to make the main shared OpenGL context" << std::endl; } } @@ -155,53 +86,30 @@ desktopMode(0, 0, 0) /// Create the window implementation from an existing control //////////////////////////////////////////////////////////// WindowImplCocoa::WindowImplCocoa(WindowHandle Handle, WindowSettings& params) : -members(NULL), -useKeyRepeat(false), -mouseIn(false), -wheelStatus(0.0f), -fullscreen(false), -fullscreenMode(0, 0, 0), -desktopMode(0, 0, 0) +myWrapper(NULL), +myUseKeyRepeat(false), +myMouseIn(false), +myWheelStatus(0.0f) { - Initialize(); - -#if ENABLE_WINDOWIMPORT - // Register ourselves for event handling - [[AppController sharedController] registerWindow:this]; - - // Make a WindowController to handle notifications - members->controller = [[WindowController controllerWithWindow:this] retain]; - - // Use existing window - members->window = [static_cast (Handle) retain]; - - if (members->window != nil) { - // We make the OpenGL context, associate it to the OpenGL view - // and add the view to our window - members->context = MakeOpenGLContext(params); + if (Handle) + { + // We create the window according to the given handle + myWrapper = [[WindowWrapper alloc] initWithWindow:(NSWindow *)Handle + settings:params + delegate:this]; - if (members->context != nil) { - members->view = MakeOpenGLView(members->window, members->context, params); + if (myWrapper) + { + // initial mouse state + myMouseIn = [myWrapper mouseInside]; - if (members->view != nil) { - // initial mouse state - mouseIn = MouseInside(members->window, members->view); - - // Initialize myWidth and myHeight members from base class with the window size - myWidth = (unsigned) [members->window frame].size.width; - myHeight = (unsigned) [members->window frame].size.height; - } else { - //error(__FILE__, __LINE__, "failed to make the OpenGL view for the public window"); - } + // We set the myWidth and myHeight members to the correct values + myWidth = (int) [[myWrapper glView] frame].size.width; + myHeight = (int) [[myWrapper glView] frame].size.height; } else { - //error(__FILE__, __LINE__, "failed to make the OpenGL context for the public window"); + std::cerr << "Failed to make the public window" << std::endl; } - } else { - //error(__FILE__, __LINE__, "invalid imported window"); } -#else - std::cerr << "*** SFML: making a sf::Window from a Cocoa one is not available in this version of the SFML" << std::endl; -#endif } @@ -209,65 +117,32 @@ desktopMode(0, 0, 0) /// Create the window implementation //////////////////////////////////////////////////////////// WindowImplCocoa::WindowImplCocoa(VideoMode Mode, const std::string& Title, unsigned long WindowStyle, WindowSettings& params) : -members(NULL), -useKeyRepeat(false), -mouseIn(false), -wheelStatus(0.0f), -fullscreen(WindowStyle & Style::Fullscreen), -fullscreenMode(0, 0, 0), -desktopMode(0, 0, 0) +myWrapper(NULL), +myUseKeyRepeat(false), +myMouseIn(false), +myWheelStatus(0.0f) { - Initialize(); - - // Make a WindowController to handle notifications - members->controller = [[WindowController controllerWithWindow:this] retain]; - // Create a new window with given size, title and style // First we define some objects used for our window - NSString *title = massert([NSString stringWithUTF8String:Title.c_str()]); + NSString *title = [NSString stringWithUTF8String:(Title.c_str()) ? (Title.c_str()) : ""]; // We create the window - members->window = MakeWindow(params, WindowStyle, Mode, title); + myWrapper = [[WindowWrapper alloc] initWithSettings:params + videoMode:Mode + style:WindowStyle + title:title + delegate:this]; - - if (members->window != nil) { - members->context = MakeOpenGLContext(params); + if (myWrapper) + { + // initial mouse state + myMouseIn = [myWrapper mouseInside]; - if (members->context != nil) { - // We make the OpenGL context, associate it to the OpenGL view - // and add the view to our window - members->view = MakeOpenGLView(members->window, members->context, params); - - if (members->view != nil) { - // Set observers and some window settings - ConfigureWindow(members->window, members->view, members->controller); - - // initial mouse state - mouseIn = MouseInside(members->window, members->view); - - // We set the myWidth and myHeight members to the correct values - myWidth = Mode.Width; - myHeight = Mode.Height; - - if (WindowStyle & Style::Fullscreen) { - fullscreenMode = Mode; - - // Using this because full screen window was not always - // in front of the other application windows when unhiding app - [members->window setLevel:NSFloatingWindowLevel]; - } - } else { - std::cerr << "*** SFML: failed to make the OpenGL view for the public window" << std::endl; - [members->context release], members->context = nil; - [sharedContext release]; - [members->window release], members->window = nil; - } - } else { - std::cerr << "*** SFML: failed to make the OpenGL context for the public window" << std::endl; - [members->window release], members->window = nil; - } + // We set the myWidth and myHeight members to the correct values + myWidth = Mode.Width; + myHeight = Mode.Height; } else { - std::cerr << "*** SFML: failed to make the public window" << std::endl; + std::cerr << "Failed to make the public window" << std::endl; } } @@ -277,28 +152,8 @@ desktopMode(0, 0, 0) //////////////////////////////////////////////////////////// WindowImplCocoa::~WindowImplCocoa() { - - // Release the notification receiver - if (members) { - [[NSNotificationCenter defaultCenter] removeObserver:members->controller]; - [members->controller release]; - } - - // Make sure the window is closed - Show(false); - - // Decrement the shared context counter - [sharedContext release]; - - // Release the window objects - if (members) { - [members->context release]; - [members->view release]; - [members->window release]; - } - - // Free the private members struct - delete members; + // Release the window wrapper + [myWrapper release]; } @@ -311,63 +166,6 @@ bool WindowImplCocoa::IsContextActive() } -//////////////////////////////////////////////////////////// -/// Handle a Cocoa NSEvent -//////////////////////////////////////////////////////////// -void WindowImplCocoa::HandleEvent(void *eventRef) -{ - if (eventRef == nil) { - std::cerr << "*** SFML: cannot handle a NULL event. Returning." << std::endl; - return; - } - - NSEvent *event = static_cast (eventRef); - int eventStatus = UnusedEvent; - - switch ([event type]) { - case NSKeyDown: - eventStatus = HandleKeyDown(eventRef); - break; - - case NSKeyUp: - eventStatus = HandleKeyUp(eventRef); - break; - - case NSFlagsChanged: - eventStatus = HandleModifierKey(eventRef); - break; - - case NSScrollWheel: - eventStatus = HandleMouseWheel(eventRef); - break; - - case NSLeftMouseDown: - case NSRightMouseDown: - eventStatus = HandleMouseDown(eventRef); - break; - - case NSLeftMouseUp: - case NSRightMouseUp: - eventStatus = HandleMouseUp(eventRef); - break; - - case NSMouseMoved: - case NSLeftMouseDragged: - case NSRightMouseDragged: - case NSOtherMouseDragged: - eventStatus = HandleMouseMove(eventRef); - break; - - default: - break; - } - - if (eventStatus == UnusedEvent) { - [NSApp sendEvent:event]; - } -} - - //////////////////////////////////////////////////////////// /// Handle event sent by the default NSNotificationCenter //////////////////////////////////////////////////////////// @@ -393,9 +191,9 @@ void WindowImplCocoa::HandleNotifiedEvent(Event& event) //////////////////////////////////////////////////////////// /// Handle a key down event (NSEvent) //////////////////////////////////////////////////////////// -int WindowImplCocoa::HandleKeyDown(void *eventRef) +void WindowImplCocoa::HandleKeyDown(void *eventRef) { - NSEvent *event = static_cast (eventRef); + NSEvent *event = reinterpret_cast (eventRef); Event sfEvent; unichar chr = 0, rawchr = 0; @@ -409,95 +207,65 @@ int WindowImplCocoa::HandleKeyDown(void *eventRef) if ([[event charactersIgnoringModifiers] length]) rawchr = [[event charactersIgnoringModifiers] characterAtIndex:0]; - } - - if (mods & NSCommandKeyMask) { - // Application commands - [NSApp sendEvent:event]; - } - - // User events - - if (!useKeyRepeat && [event isARepeat]) { - return UsedEvent; - } - -#if 1 - // Is it also a text event ? - if (IsTextEvent(event)) { - // buffer for the UTF-8 characters - const char *utf8Characters = [[event characters] UTF8String]; - // buffer for the UTF-32 characters - Uint32 utf32Characters[2]; + // Don't handle repeated events if we chose not to send them + if (!myUseKeyRepeat && [event isARepeat]) + return; - // convert the characters - const Uint32 *addr = Unicode::UTF8ToUTF32(utf8Characters, - utf8Characters + length, - utf32Characters); - - // si il y a eu des caracteres convertis ? - if (addr > utf32Characters) { - sfEvent.Type = Event::TextEntered; - sfEvent.Text.Unicode = utf32Characters[0]; + // Is it also a text event ? + if (IsTextEvent(event)) { + // buffer for the UTF-32 characters + Uint32 utf32Characters[2] = {0}; - SendEvent(sfEvent); - } - } -#else - // Is it also a text event ? - if (IsTextEvent(event)) { - static NSMutableArray *arr = [[NSMutableArray alloc] initWithCapacity:1]; - - sfEvent.Type = Event::TextEntered; - sfEvent.Text.Unicode = chr; - - NSText *field = [members->window fieldEditor:YES forObject:nil]; - [arr addObject:event]; - [field interpretKeyEvents:arr]; - - if ([[field string] length]) { - unichar unichr = [[field string] characterAtIndex:0]; - sfEvent.Text.Unicode = unichr; - SendEvent(sfEvent); - - unichar str[2] = {unichr, 0}; - NSLog(@"Char::%@", [NSString stringWithCharacters:str length:2]); - - [field setString:@""]; - [arr removeAllObjects]; + // convert the characters + // note: using CFString in order to keep compatibility with Mac OS X 10.4 + // (NSUTF32StringEncoding only defined since Mac OS X 10.5) + if (!CFStringGetCString ((CFStringRef)[event characters], + (char *)utf32Characters, + sizeof(utf32Characters), + kCFStringEncodingUTF32)) + { + const char *utf8Char = NULL; + if ([[event characters] lengthOfBytesUsingEncoding:NSUTF8StringEncoding]) + utf8Char = [[event characters] UTF8String]; + + std::cerr << "Error while converting character to UTF32 : " + << ((utf8Char) ? utf8Char : "(undefined)") << std::endl; + } + else + { + sfEvent.Type = Event::TextEntered; + sfEvent.Text.Unicode = utf32Characters[0]; + + SendEvent(sfEvent); + } } + // Anyway it's also a KeyPressed event + sfEvent.Type = Event::KeyPressed; + // Get the keys + if (Key::Code(0) == (sfEvent.Key.Code = KeyForUnicode(rawchr))) { + sfEvent.Key.Code = KeyForVirtualCode([event keyCode]); + } + + // Get the modifiers + sfEvent.Key.Alt = mods & NSAlternateKeyMask; + sfEvent.Key.Control = mods & NSControlKeyMask; + sfEvent.Key.Shift = mods & NSShiftKeyMask; + + // Send the event + SendEvent(sfEvent); } -#endif - - // Anyway it's also a KeyPressed event - sfEvent.Type = Event::KeyPressed; - - // Get the keys - if (Key::Code(0) == (sfEvent.Key.Code = KeyForUnicode(rawchr))) { - sfEvent.Key.Code = KeyForVirtualCode([event keyCode]); - } - - // Get the modifiers - sfEvent.Key.Alt = mods & NSAlternateKeyMask; - sfEvent.Key.Control = mods & NSControlKeyMask; - sfEvent.Key.Shift = mods & NSShiftKeyMask; - - // Send the event - SendEvent(sfEvent); - - return UsedEvent; } //////////////////////////////////////////////////////////// /// Handle a key up event (NSEvent) //////////////////////////////////////////////////////////// -int WindowImplCocoa::HandleKeyUp(void *eventRef) +void WindowImplCocoa::HandleKeyUp(void *eventRef) { - NSEvent *event = static_cast (eventRef); + NSEvent *event = reinterpret_cast (eventRef); Event sfEvent; unsigned mods = [event modifierFlags]; @@ -509,46 +277,47 @@ int WindowImplCocoa::HandleKeyUp(void *eventRef) if ([[event charactersIgnoringModifiers] length]) rawchr = [[event charactersIgnoringModifiers] characterAtIndex:0]; + sfEvent.Type = Event::KeyReleased; + + // Get the code + if (Key::Code(0) == (sfEvent.Key.Code = KeyForUnicode(rawchr))) { + sfEvent.Key.Code = KeyForVirtualCode([event keyCode]); + } + + // Get the modifiers + sfEvent.Key.Alt = mods & NSAlternateKeyMask; + sfEvent.Key.Control = mods & NSControlKeyMask; + sfEvent.Key.Shift = mods & NSShiftKeyMask; + + // Send the event + SendEvent(sfEvent); } - - if (mods & NSCommandKeyMask) { - [NSApp sendEvent:event]; - } - - sfEvent.Type = Event::KeyReleased; - - // Get the code - if (Key::Code(0) == (sfEvent.Key.Code = KeyForUnicode(rawchr))) { - sfEvent.Key.Code = KeyForVirtualCode([event keyCode]); - } - - // Get the modifiers - sfEvent.Key.Alt = mods & NSAlternateKeyMask; - sfEvent.Key.Control = mods & NSControlKeyMask; - sfEvent.Key.Shift = mods & NSShiftKeyMask; - - SendEvent(sfEvent); - - return UsedEvent; } //////////////////////////////////////////////////////////// /// Handle a key modifier event [Command, Option, Control, Shift] //////////////////////////////////////////////////////////// -int WindowImplCocoa::HandleModifierKey(void *eventRef) +void WindowImplCocoa::HandleModifierKey(void *eventRef) { - NSEvent *event = static_cast (eventRef); + NSEvent *event = reinterpret_cast (eventRef); Event sfEvent; unsigned mods = [event modifierFlags]; sfEvent.Type = Event::KeyPressed; + + // Get the code sfEvent.Key.Code = KeyForVirtualCode([event keyCode]); + // Get the modifiers sfEvent.Key.Alt = mods & NSAlternateKeyMask; sfEvent.Key.Control = mods & NSControlKeyMask; sfEvent.Key.Shift = mods & NSShiftKeyMask; + // Guess whether it's a pressed or released event + // Note: this does not work fine is both left and right modifiers are pressed + // I did not find any way to fix this. + // TODO: fix handling of modifier flags for use of left and right key at the same time if (!(mods & NSAlternateKeyMask) && (sfEvent.Key.Code == Key::LAlt || sfEvent.Key.Code == Key::RAlt)) { sfEvent.Type = Event::KeyReleased; @@ -569,18 +338,17 @@ int WindowImplCocoa::HandleModifierKey(void *eventRef) sfEvent.Type = Event::KeyReleased; } + // Send the event SendEvent(sfEvent); - - return UnusedEvent; } //////////////////////////////////////////////////////////// /// Handle a mouse down event (NSEvent) //////////////////////////////////////////////////////////// -int WindowImplCocoa::HandleMouseDown(void *eventRef) +void WindowImplCocoa::HandleMouseDown(void *eventRef) { - NSEvent *event = static_cast (eventRef); + NSEvent *event = reinterpret_cast (eventRef); Event sfEvent; NSPoint loc = {0, 0}; unsigned mods = [event modifierFlags]; @@ -589,18 +357,20 @@ int WindowImplCocoa::HandleMouseDown(void *eventRef) case NSLeftMouseDown: sfEvent.Type = Event::MouseButtonPressed; + // Guess whether it's a mouse left or mouse right event if (mods & NSControlKeyMask) { sfEvent.MouseButton.Button = Mouse::Right; } else { sfEvent.MouseButton.Button = Mouse::Left; } - // Get mouse position - loc = MouseLocation(members->window); + // Get mouse position relative to the window + loc = [myWrapper mouseLocation]; sfEvent.MouseButton.X = (int) loc.x; sfEvent.MouseButton.Y = (int) loc.y; + // Send the event SendEvent(sfEvent); break; @@ -608,30 +378,28 @@ int WindowImplCocoa::HandleMouseDown(void *eventRef) sfEvent.Type = Event::MouseButtonPressed; sfEvent.MouseButton.Button = Mouse::Right; - // Get mouse position - loc = MouseLocation(members->window); + // Get mouse position relative to the window + loc = [myWrapper mouseLocation]; sfEvent.MouseButton.X = (int) loc.x; sfEvent.MouseButton.Y = (int) loc.y; + // Send the event SendEvent(sfEvent); break; default: break; } - - return UnusedEvent; - } //////////////////////////////////////////////////////////// /// Handle a mouse up event (NSEvent) //////////////////////////////////////////////////////////// -int WindowImplCocoa::HandleMouseUp(void *eventRef) +void WindowImplCocoa::HandleMouseUp(void *eventRef) { - NSEvent *event = static_cast (eventRef); + NSEvent *event = reinterpret_cast (eventRef); Event sfEvent; NSPoint loc = {0, 0}; unsigned mods = [event modifierFlags]; @@ -640,18 +408,20 @@ int WindowImplCocoa::HandleMouseUp(void *eventRef) case NSLeftMouseUp: sfEvent.Type = Event::MouseButtonReleased; + // Guess whether it's a mouse left or mouse right event if (mods & NSControlKeyMask) { sfEvent.MouseButton.Button = Mouse::Right; } else { sfEvent.MouseButton.Button = Mouse::Left; } - // Get mouse position - loc = MouseLocation(members->window); + // Get mouse position relative to the window + loc = [myWrapper mouseLocation]; sfEvent.MouseButton.X = (int) loc.x; sfEvent.MouseButton.Y = (int) loc.y; + // Send the event SendEvent(sfEvent); break; @@ -659,32 +429,31 @@ int WindowImplCocoa::HandleMouseUp(void *eventRef) sfEvent.Type = Event::MouseButtonReleased; sfEvent.MouseButton.Button = Mouse::Right; - // Get mouse position - loc = MouseLocation(members->window); + // Get mouse position relative to the window + loc = [myWrapper mouseLocation]; sfEvent.MouseButton.X = (int) loc.x; sfEvent.MouseButton.Y = (int) loc.y; + // Send the event SendEvent(sfEvent); break; default: break; } - - return UnusedEvent; } //////////////////////////////////////////////////////////// /// Handle a mouse move event (NSEvent) //////////////////////////////////////////////////////////// -int WindowImplCocoa::HandleMouseMove(void *eventRef) +void WindowImplCocoa::HandleMouseMove(void *eventRef) { Event sfEvent; NSPoint loc = {0, 0}; - loc = MouseLocation(members->window); + loc = [myWrapper mouseLocation]; sfEvent.Type = Event::MouseMoved; sfEvent.MouseMove.X = (int) loc.x; @@ -692,65 +461,55 @@ int WindowImplCocoa::HandleMouseMove(void *eventRef) SendEvent(sfEvent); - // MouseEntered and MouseLeft events - if (MouseInside(members->window, members->view) && !mouseIn) { + if ([myWrapper mouseInside] && !myMouseIn) { + // If mouse IS inside but WAS not inside last time sfEvent.Type = Event::MouseEntered; - mouseIn = true; + myMouseIn = true; + SendEvent(sfEvent); - } else if (!MouseInside(members->window, members->view) && mouseIn) { + } else if (![myWrapper mouseInside] && myMouseIn) { + // Is mouse WAS not inside but IS now inside sfEvent.Type = Event::MouseLeft; - mouseIn = false; + myMouseIn = false; + SendEvent(sfEvent); } - - return UnusedEvent; } //////////////////////////////////////////////////////////// /// Handle a mouse wheel event (NSEvent) //////////////////////////////////////////////////////////// -int WindowImplCocoa::HandleMouseWheel(void *eventRef) +void WindowImplCocoa::HandleMouseWheel(void *eventRef) { - NSEvent *event = static_cast (eventRef); + NSEvent *event = reinterpret_cast (eventRef); - wheelStatus += [event deltaY]; + // SFML uses integer values for delta but Cocoa uses float and it is mostly fewer than 1.0 + // Therefore I chose to add the float value to a 'wheel status' and + // send a sf event only when it's greater than 1.0 + myWheelStatus += [event deltaY]; - if (fabs(wheelStatus) > 1.0f) { + if (fabs(myWheelStatus) > 1.0f) { + // Make the event and send it Event sfEvent; sfEvent.Type = Event::MouseWheelMoved; - sfEvent.MouseWheel.Delta = (int) wheelStatus; + sfEvent.MouseWheel.Delta = (int) myWheelStatus; SendEvent(sfEvent); - wheelStatus -= (int) wheelStatus; + // Remove as much integer units as the one that have been put in the event + // (was a mistake to set this to 0) + myWheelStatus -= (int) myWheelStatus; } +} + - return UnusedEvent; -} - - -//////////////////////////////////////////////////////////// -/// Return a pointer to the SFWindow object -//////////////////////////////////////////////////////////// -void *WindowImplCocoa::CocoaWindow(void) -{ - return static_cast (members->window); -} - -//////////////////////////////////////////////////////////// -/// Return whether the window is in full screen mode -//////////////////////////////////////////////////////////// -bool WindowImplCocoa::IsFullscreen(void) -{ - return fullscreen; -} - //////////////////////////////////////////////////////////// /// /see sfWindowImpl::Display //////////////////////////////////////////////////////////// void WindowImplCocoa::Display() { - [members->context flushBuffer]; + // Forward flush call to the window + [myWrapper flushBuffer]; } @@ -759,10 +518,8 @@ void WindowImplCocoa::Display() //////////////////////////////////////////////////////////// void WindowImplCocoa::ProcessEvents() { - if (![NSApp isRunning]) - return; - - [[AppController sharedController] processEvents]; + // Forward event handling call to the application controller + [SharedAppController processEvents]; } @@ -771,13 +528,8 @@ void WindowImplCocoa::ProcessEvents() //////////////////////////////////////////////////////////// void WindowImplCocoa::SetActive(bool Active) const { - if (Active) { - if ([NSOpenGLContext currentContext] != members->context) - [members->context makeCurrentContext]; - } else { - if ([NSOpenGLContext currentContext] == members->context) - [NSOpenGLContext clearCurrentContext]; - } + // Forward the call to the window + [myWrapper setActive:Active]; } @@ -786,8 +538,8 @@ void WindowImplCocoa::SetActive(bool Active) const //////////////////////////////////////////////////////////// void WindowImplCocoa::UseVerticalSync(bool Enabled) { - GLint enable = (Enabled) ? 1 : 0; - [members->context setValues:&enable forParameter:NSOpenGLCPSwapInterval]; + // Forward the call to the window + [myWrapper enableVerticalSync:Enabled]; } @@ -811,24 +563,21 @@ void WindowImplCocoa::SetCursorPosition(unsigned int Left, unsigned int Top) { NSPoint pos = NSMakePoint ((float) Left, (float) Top); - if (members->window) { + if (myWrapper) { // Flip for SFML window coordinate system - pos.y = [members->window frame].size.height - pos.y; + pos.y = [[myWrapper window] frame].size.height - pos.y; // Adjust for view reference instead of window - pos.y -= [members->window frame].size.height - [members->view frame].size.height; + pos.y -= [[myWrapper window] frame].size.height - [[myWrapper glView] frame].size.height; // Convert to screen coordinates - NSPoint absolute = [members->window convertBaseToScreen:pos]; + NSPoint absolute = [[myWrapper window] convertBaseToScreen:pos]; // Flip screen coodinates absolute.y = [[NSScreen mainScreen] frame].size.height - absolute.y; // Move cursor CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, CGPointMake(absolute.x, absolute.y)); - } else { - std::cerr << "*** SFML: uninitialized 'members->window' member (objc_members) in " - << this << " (sf::priv::WindowImplCocoa)" << std::endl; } } @@ -838,16 +587,7 @@ void WindowImplCocoa::SetCursorPosition(unsigned int Left, unsigned int Top) //////////////////////////////////////////////////////////// void WindowImplCocoa::SetPosition(int Left, int Top) { - if (members->window) { - if (!fullscreen) { - // Change the window position - Top = (int) [[members->window screen] frame].size.height - Top; - [members->window setFrameTopLeftPoint:NSMakePoint(Left, Top)]; - } - } else { - std::cerr << "*** SFML: uninitialized 'members->window' member (objc_members) in " - << this << " (sf::priv::WindowImplCocoa)"; - } + [myWrapper setPosition:NSMakePoint(Left, Top)]; } @@ -857,17 +597,7 @@ void WindowImplCocoa::SetPosition(int Left, int Top) //////////////////////////////////////////////////////////// void WindowImplCocoa::SetSize(unsigned int Width, unsigned int Height) { - if (members->window) { - if (!fullscreen) { - [members->window setFrame:NSMakeRect([members->window frame].origin.x, - [members->window frame].origin.y, - (float) Width, (float) Height) - display:YES]; - } - } else { - std::cerr << "*** SFML: uninitialized 'members->window' member (objc_members) in " - << this << " (sf::priv::WindowImplCocoa)" << std::endl; - } + [myWrapper setSize:NSMakeSize(Width, Height)]; } @@ -876,83 +606,7 @@ void WindowImplCocoa::SetSize(unsigned int Width, unsigned int Height) //////////////////////////////////////////////////////////// void WindowImplCocoa::Show(bool State) { - if (State && ![members->window isVisible]) { - // Wanna open the closed window - - // Register ourselves for event handling - [[AppController sharedController] registerWindow:this]; - - if (fullscreen) { - desktopMode = VideoMode::GetDesktopMode(); - - CFDictionaryRef displayMode = CGDisplayBestModeForParameters (kCGDirectMainDisplay, - fullscreenMode.BitsPerPixel, - fullscreenMode.Width, - fullscreenMode.Height, - NULL); - - CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken; - - // Fade to a black screen - [SharedAppController doFadeOperation:FillScreen time:0.5f sync:true token:&token]; - [NSMenu setMenuBarVisible:NO]; - - // Switch to the wished display mode - CGDisplaySwitchToMode(kCGDirectMainDisplay, displayMode); - - // Open the window - [members->window makeKeyAndOrderFront:nil]; - [members->window center]; - - // Fade to normal screen - [SharedAppController doFadeOperation:CleanScreen time:0.2f sync:false token:&token]; - - } else { - // Show the window - // Note: using these two lines instead of -[NSWindow makeKeyAndOrderFront:] - // in order to prevent the standard window buttons from not displaying - // the "mouse over" icons - [members->window orderFront:nil]; - [members->window makeKeyWindow]; - - } - } else if (!State && [members->window isVisible]) { - // Wanna close the opened window - - if (fullscreen) { - CFDictionaryRef displayMode = CGDisplayBestModeForParameters (kCGDirectMainDisplay, - desktopMode.BitsPerPixel, - desktopMode.Width, - desktopMode.Height, - NULL); - - CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken; - - // Fade to black screen - [SharedAppController doFadeOperation:FillScreen time:0.2f sync:true token:&token]; - - // Switch to the wished display mode - CGDisplaySwitchToMode(kCGDirectMainDisplay, displayMode); - - // Close the window - [members->window close]; - [NSMenu setMenuBarVisible:YES]; - - // Fade to normal screen - [SharedAppController doFadeOperation:CleanScreen time:0.5f sync:false token:&token]; - - // Do not sync but sleep so that the Dock and the Finder desktop go back to normal - // state before the end of the fade operation - sf::Sleep(0.5f); - } else { - // Close the window - [members->window close]; - - } - - // Unregister ourselves from the event handler - [[AppController sharedController] unregisterWindow:this]; - } + [myWrapper show:State]; } @@ -961,7 +615,7 @@ void WindowImplCocoa::Show(bool State) //////////////////////////////////////////////////////////// void WindowImplCocoa::EnableKeyRepeat(bool Enabled) { - useKeyRepeat = Enabled; + myUseKeyRepeat = Enabled; } @@ -974,270 +628,6 @@ void WindowImplCocoa::SetIcon(unsigned int Width, unsigned int Height, const Uin } -//////////////////////////////////////////////////////////// -/// Make some allocations and initializations -//////////////////////////////////////////////////////////// -void WindowImplCocoa::Initialize(void) -{ - // Allocate mem for the private objc members - members = new objc_members; - bzero(members, sizeof(*members)); - - // Needed to always have an autorelease pool as soon as application is launched - ONCE([SharedAppController resetPool]); - - // Register application if needed and launch it - ONCE([SharedAppController runApplication]); -} - - -//////////////////////////////////////////////////////////// -/// Make the window -//////////////////////////////////////////////////////////// -static SFWindow *MakeWindow(WindowSettings& params, unsigned long style, VideoMode& mode, NSString *title) -{ - SFWindow *window = nil; - - NSRect frame = NSMakeRect (0.0f, 0.0f, (float) mode.Width, (float) mode.Height); - unsigned int mask = 0; - - // We grab options from WindowStyle and add them to our window mask - if (style & Style::None || style & Style::Fullscreen) { - mask |= NSBorderlessWindowMask; - - if (style & Style::Fullscreen) { - // Check display mode and put new values in 'mode' if needed - boolean_t exact = true; - CFDictionaryRef properties = CGDisplayBestModeForParameters(kCGDirectMainDisplay, mode.BitsPerPixel, - mode.Width, mode.Height, &exact); - - if (!properties) { - std::cerr << "*** SFML: unable to get a display mode with the given parameters" << std::endl; - return nil; - } - - if (exact == false) { - CFNumberGetValue((CFNumberRef) CFDictionaryGetValue(properties, kCGDisplayWidth), - kCFNumberIntType, &mode.Width); - - CFNumberGetValue((CFNumberRef) CFDictionaryGetValue(properties, kCGDisplayHeight), - kCFNumberIntType, &mode.Height); - - CFNumberGetValue((CFNumberRef) CFDictionaryGetValue(properties, kCGDisplayBitsPerPixel), - kCFNumberIntType, &mode.BitsPerPixel); - } - } - - } else { - if (style & Style::Titlebar) { - mask |= NSTitledWindowMask; - mask |= NSMiniaturizableWindowMask; - } - - if (style & Style::Resize) { - mask |= NSTitledWindowMask; - mask |= NSMiniaturizableWindowMask; - mask |= NSResizableWindowMask; - } - - if (style & Style::Close) { - mask |= NSTitledWindowMask; - mask |= NSClosableWindowMask; - mask |= NSMiniaturizableWindowMask; - } - } - - // Now we make the window with the values we got - // Note: defer flag set to NO to be able to use OpenGL in our window - window =[massert([SFWindow alloc]) initWithContentRect:frame - styleMask:mask - backing:NSBackingStoreBuffered - defer:NO]; - - if (window != nil) { - // We set title and window position - [window setTitle:title]; - [window center]; - } - - return window; -} - - -//////////////////////////////////////////////////////////// -/// Make the OpenGL pixel format from the given attributes -//////////////////////////////////////////////////////////// -static NSOpenGLContext *MakeOpenGLContext(WindowSettings& params) -{ - NSOpenGLPixelFormat *pixFormat = nil; - NSOpenGLContext *context = nil; - unsigned idx = 0; -#if ENABLE_ANTIALIASING - unsigned samplesIdx = 0; -#endif - - // Attributes list - NSOpenGLPixelFormatAttribute attribs[15] = {(NSOpenGLPixelFormatAttribute) 0}; - - // Accelerated, double buffered - attribs[idx++] = NSOpenGLPFAClosestPolicy; - attribs[idx++] = NSOpenGLPFADoubleBuffer; - attribs[idx++] = NSOpenGLPFAAccelerated; - - // windowed context - attribs[idx++] = NSOpenGLPFAWindow; - - // Color size ; usually 32 bits per pixel - attribs[idx++] = NSOpenGLPFAColorSize; - attribs[idx++] = (NSOpenGLPixelFormatAttribute) VideoMode::GetDesktopMode().BitsPerPixel; - - // Z-buffer size - attribs[idx++] = NSOpenGLPFADepthSize; - attribs[idx++] = (NSOpenGLPixelFormatAttribute) params.DepthBits; - - // Stencil bits (I don't really know what's that...) - attribs[idx++] = NSOpenGLPFAStencilSize; - attribs[idx++] = (NSOpenGLPixelFormatAttribute) params.StencilBits; - -#if ENABLE_ANTIALIASING - // Antialiasing settings - if (params.AntialiasingLevel) { - samplesIdx = idx; - - attribs[idx++] = NSOpenGLPFASamples; - attribs[idx++] = (NSOpenGLPixelFormatAttribute) params.AntialiasingLevel; - - attribs[idx++] = NSOpenGLPFASampleBuffers; - attribs[idx++] = (NSOpenGLPixelFormatAttribute) GL_TRUE; - } -#endif - - pixFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs]; - -#if ENABLE_ANTIALIASING - // If pixel format creation fails and antialiasing level is - // greater than 2, we set it to 2. - if (pixFormat == nil && params.AntialiasingLevel > 2) { - std::cerr << "Failed to find a pixel format supporting " << params.AntialiasingLevel << " antialiasing levels ; trying with 2 levels" << std::endl; - params.AntialiasingLevel = attribs[samplesIdx + 1] = (NSOpenGLPixelFormatAttribute) 2; - - pixFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs]; - } - - // If pixel format creation fails and antialiasing is enabled, - // we disable it. - if (pixFormat == nil && params.AntialiasingLevel > 0) { - std::cerr << "Failed to find a pixel format supporting antialiasing ; antialiasing will be disabled" << std::endl; - attribs[samplesIdx] = (NSOpenGLPixelFormatAttribute) nil; - - pixFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs]; - } -#endif - - if (pixFormat) { - context = [[NSOpenGLContext alloc] initWithFormat:pixFormat - shareContext:[sharedContext retain]]; - - // Get the effective properties from our OpenGL context - GLint tmpDepthSize = 0, tmpStencilBits = 0, tmpAntialiasingLevel = 0; - - if (context) { - [pixFormat getValues:&tmpDepthSize - forAttribute:NSOpenGLPFADepthSize - forVirtualScreen:[context currentVirtualScreen]]; - - [pixFormat getValues:&tmpStencilBits - forAttribute:NSOpenGLPFAStencilSize - forVirtualScreen:[context currentVirtualScreen]]; - - [pixFormat getValues:&tmpAntialiasingLevel - forAttribute:NSOpenGLPFASamples - forVirtualScreen:[context currentVirtualScreen]]; - } - - - params.DepthBits = (unsigned) tmpDepthSize; - params.StencilBits = (unsigned) tmpStencilBits; - params.AntialiasingLevel = (unsigned) tmpAntialiasingLevel; - - [pixFormat release]; - } - - return context; -} - - -static NSOpenGLView * MakeOpenGLView(SFWindow *window, NSOpenGLContext *context, WindowSettings& params) -{ - assert(window != nil); - assert(context != nil); - - NSOpenGLView *view = nil; - - - // We make the NSOpenGLView - view = [[NSOpenGLView alloc] initWithFrame:[[window contentView] bounds] - pixelFormat:nil]; - - if (view) { - // We add the NSOpenGLView to the window - [[window contentView] addSubview:view]; - - [view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; - [view clearGLContext]; - [view setOpenGLContext:context]; - [context setView:view]; - } - - return view; -} - - -static void ConfigureWindow(SFWindow *window, NSOpenGLView *view, WindowController *controller) -{ - assert(window != nil); - assert(view != nil); - assert(controller != nil); - - // We need to update the OpenGL view when it changes - NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; - [nc addObserver:controller - selector:@selector(viewFrameDidChange:) - name:NSViewFrameDidChangeNotification - object:view]; - - // We want to know when our window got the focus - [nc addObserver:controller - selector:@selector(windowDidBecomeMain:) - name:NSWindowDidBecomeMainNotification - object:window]; - - // We want to know when our window lost the focus - [nc addObserver:controller - selector:@selector(windowDidResignMain:) - name:NSWindowDidResignMainNotification - object:window]; - - // We want to know when the user closes the window - [nc addObserver:controller - selector:@selector(windowWillClose:) - name:NSWindowWillCloseNotification - object:window]; - - // I want to re-center the window if it's a full screen one and moved by Spaces - [nc addObserver:controller - selector:@selector(windowDidMove:) - name:NSWindowDidMoveNotification - object:window]; - - - // Needed not to make application crash when releasing the window in our destructor - // (I prefer to take control of everything :P) - [window setReleasedWhenClosed:NO]; - [window setAcceptsMouseMovedEvents:YES]; -} - - //////////////////////////////////////////////////////////// /// Return the SFML key corresponding to a key code //////////////////////////////////////////////////////////// @@ -1295,7 +685,7 @@ static Key::Code KeyForVirtualCode(unsigned short vCode) {0x36, Key::RSystem}, //< Right Command {0x3C, Key::RShift}, //< Right Shift - {0x39, Key::Code(0)} //< Caps Lock + {0x39, Key::Code(0)} //< Caps Lock (not handled by SFML for now) }; Key::Code result = Key::Code(0); @@ -1316,6 +706,7 @@ static Key::Code KeyForVirtualCode(unsigned short vCode) //////////////////////////////////////////////////////////// static Key::Code KeyForUnicode(unsigned short uniCode) { + // TODO: find a better way to get the language independant key static struct { unsigned short character; Key::Code sfKey; @@ -1415,43 +806,6 @@ static bool IsTextEvent(NSEvent *event) return res; } - -//////////////////////////////////////////////////////////// -/// Return whether the mouse is on our OpenGL view -//////////////////////////////////////////////////////////// -static bool MouseInside(SFWindow *window, NSView *view) -{ - bool res = false; - - if (window && view && [window isVisible]) { - NSPoint relativeToWindow = [window mouseLocationOutsideOfEventStream]; - NSPoint relativeToView = [view convertPoint:relativeToWindow fromView:nil]; - - if (NSPointInRect (relativeToView, [view bounds])) - res = true; - } - - return res; -} - - -//////////////////////////////////////////////////////////// -/// Return the mouse location in the SFML coordinates according to 'window' -//////////////////////////////////////////////////////////// -static NSPoint MouseLocation(SFWindow *window) -{ - NSPoint location = [NSEvent mouseLocation]; - NSPoint relativeLocation = {0, 0}; - - if (window) { - relativeLocation = [window convertScreenToBase:location]; - relativeLocation.y = [[window contentView] frame].size.height - relativeLocation.y; - } else { - std::cerr << "*** SFML: tried to get mouse location from no window" << std::endl; - } - - return relativeLocation; -} } // namespace priv diff --git a/src/SFML/Window/Linux/VideoModeSupport.cpp b/src/SFML/Window/Linux/VideoModeSupport.cpp index 7f9f5a661..5209da2ab 100644 --- a/src/SFML/Window/Linux/VideoModeSupport.cpp +++ b/src/SFML/Window/Linux/VideoModeSupport.cpp @@ -61,15 +61,24 @@ void VideoModeSupport::GetSupportedVideoModes(std::vector& Modes) XRRScreenSize* Sizes = XRRConfigSizes(Config, &NbSizes); if (Sizes && (NbSizes > 0)) { - // Add them to the video modes array - for (int i = 0; i < NbSizes; ++i) + // Get the list of supported depths + int NbDepths = 0; + int* Depths = XListDepths(Disp, Screen, &NbDepths); + if (Depths && (NbDepths > 0)) { - // Convert to sfVideoMode - VideoMode Mode(Sizes[i].width, Sizes[i].height, 32); - - // Add it only if it is not already in the array - if (std::find(Modes.begin(), Modes.end(), Mode) == Modes.end()) - Modes.push_back(Mode); + // Combine depths and sizes to fill the array of supported modes + for (int i = 0; i < NbDepths; ++i) + { + for (int j = 0; j < NbSizes; ++j) + { + // Convert to VideoMode + VideoMode Mode(Sizes[j].width, Sizes[j].height, Depths[i]); + + // Add it only if it is not already in the array + if (std::find(Modes.begin(), Modes.end(), Mode) == Modes.end()) + Modes.push_back(Mode); + } + } } } @@ -116,7 +125,7 @@ VideoMode VideoModeSupport::GetDesktopVideoMode() int NbSizes; XRRScreenSize* Sizes = XRRConfigSizes(Config, &NbSizes); if (Sizes && (NbSizes > 0)) - DesktopMode = VideoMode(Sizes[CurrentMode].width, Sizes[CurrentMode].height, 32); + DesktopMode = VideoMode(Sizes[CurrentMode].width, Sizes[CurrentMode].height, DefaultDepth(Disp, Screen)); // Free the configuration instance XRRFreeScreenConfigInfo(Config); diff --git a/src/SFML/Window/Linux/WindowImplX11.cpp b/src/SFML/Window/Linux/WindowImplX11.cpp index 897b19717..5b375d067 100644 --- a/src/SFML/Window/Linux/WindowImplX11.cpp +++ b/src/SFML/Window/Linux/WindowImplX11.cpp @@ -44,6 +44,16 @@ namespace unsigned long EventMask = FocusChangeMask | ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | PointerMotionMask | KeyPressMask | KeyReleaseMask | StructureNotifyMask | EnterWindowMask | LeaveWindowMask; + + //////////////////////////////////////////////////////////// + /// Filter the events received by windows + /// (only allow those matching a specific window) + //////////////////////////////////////////////////////////// + Bool CheckEvent(::Display*, XEvent* Event, XPointer UserData) + { + // Just check if the event matches the window + return Event->xany.window == reinterpret_cast< ::Window >(UserData); + } } @@ -255,30 +265,53 @@ WindowImplX11::~WindowImplX11() //////////////////////////////////////////////////////////// void WindowImplX11::ProcessEvents() { + // This function implements a workaround to properly discard + // repeated key events when necessary. The problem is that the + // system's key events policy doesn't match SFML's one: X server will generate + // both repeated KeyPress and KeyRelease events when maintaining a key down, while + // SFML only wants repeated KeyPress events. Thus, we have to: + // - Discard duplicated KeyRelease events when EnableKeyRepeat is true + // - Discard both duplicated KeyPress and KeyRelease events when EnableKeyRepeat is false + + // Process any event in the queue matching our window XEvent Event; - while (XCheckIfEvent(myDisplay, &Event, &WindowImplX11::CheckEvent, reinterpret_cast(myWindow))) + while (XCheckIfEvent(myDisplay, &Event, &CheckEvent, reinterpret_cast(myWindow))) { - // Filter repeated key events - if (Event.type == KeyRelease) + // Detect repeated key events + if ((Event.type == KeyPress) || (Event.type == KeyRelease)) { - if (XPending(myDisplay)) + if (Event.xkey.keycode < 256) { - XEvent NextEvent; - XPeekEvent(myDisplay, &NextEvent); - if ((NextEvent.type == KeyPress) && - (NextEvent.xkey.keycode == Event.xkey.keycode) && - (NextEvent.xkey.time == Event.xkey.time)) + // To detect if it is a repeated key event, we check the current state of the key. + // - If the state is "down", KeyReleased events must obviously be discarded. + // - KeyPress events are a little bit harder to handle: they depend on the EnableKeyRepeat state, + // and we need to properly forward the first one. + char Keys[32]; + XQueryKeymap(myDisplay, Keys); + if (Keys[Event.xkey.keycode >> 3] & (1 << (Event.xkey.keycode % 8))) { - if (!myKeyRepeat) - XNextEvent(myDisplay, &NextEvent); - continue; + // KeyRelease event + key down = repeated event --> discard + if (Event.type == KeyRelease) + { + myLastKeyReleaseEvent = Event; + continue; + } + + // KeyPress event + key repeat disabled + matching KeyRelease event = repeated event --> discard + if ((Event.type == KeyPress) && !myKeyRepeat && + (myLastKeyReleaseEvent.xkey.keycode == Event.xkey.keycode) && + (myLastKeyReleaseEvent.xkey.time == Event.xkey.time)) + { + continue; + } } } } + // Process the event ProcessEvent(Event); - } + } } @@ -467,6 +500,9 @@ void WindowImplX11::SwitchToFullscreen(const VideoMode& Mode) //////////////////////////////////////////////////////////// void WindowImplX11::Initialize() { + // Make sure the "last key release" is initialized with invalid values + myLastKeyReleaseEvent.type = -1; + // Get the atom defining the close event myAtomClose = XInternAtom(myDisplay, "WM_DELETE_WINDOW", false); XSetWMProtocols(myDisplay, myWindow, &myAtomClose, 1); @@ -551,17 +587,6 @@ void WindowImplX11::CleanUp() } -//////////////////////////////////////////////////////////// -/// Filter the received events -/// (only allow those matching a specific window) -//////////////////////////////////////////////////////////// -Bool WindowImplX11::CheckEvent(::Display*, XEvent* Event, XPointer UserData) -{ - // Just check if the event matches our window - return Event->xany.window == reinterpret_cast< ::Window >(UserData); -} - - //////////////////////////////////////////////////////////// /// Process an incoming event from the window //////////////////////////////////////////////////////////// diff --git a/src/SFML/Window/Linux/WindowImplX11.hpp b/src/SFML/Window/Linux/WindowImplX11.hpp index b81f92d58..965266466 100644 --- a/src/SFML/Window/Linux/WindowImplX11.hpp +++ b/src/SFML/Window/Linux/WindowImplX11.hpp @@ -155,18 +155,6 @@ private : //////////////////////////////////////////////////////////// void CleanUp(); - //////////////////////////////////////////////////////////// - /// Filter the received events - /// (only allow those matching a specific window) - /// - /// \param Event : Event to filter - /// \param UserData : Data passed to the function (here : the window to compare) - /// - /// \return True if the event belongs to the specified window - /// - //////////////////////////////////////////////////////////// - static Bool CheckEvent(::Display*, XEvent* Event, XPointer UserData); - //////////////////////////////////////////////////////////// /// Process an incoming event from the window /// @@ -188,16 +176,17 @@ private : //////////////////////////////////////////////////////////// // Member data //////////////////////////////////////////////////////////// - DisplayRef myDisplayRef; ///< Connection to the X server - ::Window myWindow; ///< X11 structure defining our window - ::Display* myDisplay; ///< Pointer to the display - int myScreen; ///< Screen identifier - bool myIsExternal; ///< Tell whether the window has been created externally or by SFML - Atom myAtomClose; ///< Atom used to identify the close event - int myOldVideoMode; ///< Video mode in use before we switch to fullscreen - Cursor myHiddenCursor; ///< As X11 doesn't provide cursor hidding, we must create a transparent one - XIC myInputContext; ///< Input context used to get unicode input in our window - bool myKeyRepeat; ///< Is the KeyRepeat feature enabled ? + DisplayRef myDisplayRef; ///< Connection to the X server + ::Window myWindow; ///< X11 structure defining our window + ::Display* myDisplay; ///< Pointer to the display + int myScreen; ///< Screen identifier + bool myIsExternal; ///< Tell whether the window has been created externally or by SFML + Atom myAtomClose; ///< Atom used to identify the close event + int myOldVideoMode; ///< Video mode in use before we switch to fullscreen + Cursor myHiddenCursor; ///< As X11 doesn't provide cursor hidding, we must create a transparent one + XIC myInputContext; ///< Input context used to get unicode input in our window + bool myKeyRepeat; ///< Is the KeyRepeat feature enabled ? + XEvent myLastKeyReleaseEvent; ///< Last key release event we received (needed for discarding repeated key events) }; } // namespace priv diff --git a/src/SFML/Window/Window.cpp b/src/SFML/Window/Window.cpp index edf09696f..c94280df3 100644 --- a/src/SFML/Window/Window.cpp +++ b/src/SFML/Window/Window.cpp @@ -32,11 +32,19 @@ #include +//////////////////////////////////////////////////////////// +// Private data +//////////////////////////////////////////////////////////// +namespace +{ + const sf::Window* FullscreenWindow = NULL; +} + + namespace sf { //////////////////////////////////////////////////////////// /// Default constructor -/// //////////////////////////////////////////////////////////// Window::Window() : myWindow (NULL), @@ -97,11 +105,30 @@ Window::~Window() //////////////////////////////////////////////////////////// void Window::Create(VideoMode Mode, const std::string& Title, unsigned long WindowStyle, const ContextSettings& Settings) { - // Check validity of video mode - if ((WindowStyle & Style::Fullscreen) && !Mode.IsValid()) + // Destroy the previous window implementation + Close(); + + // Fullscreen style requires some tests + if (WindowStyle & Style::Fullscreen) { - std::cerr << "The requested video mode is not available, switching to a valid mode" << std::endl; - Mode = VideoMode::GetMode(0); + // Make sure there's not already a fullscreen window (only one is allowed) + if (FullscreenWindow) + { + std::cerr << "Creating two fullscreen windows is not allowed, switching to windowed mode" << std::endl; + WindowStyle &= ~Style::Fullscreen; + } + else + { + // Make sure the chosen video mode is compatible + if (!Mode.IsValid()) + { + std::cerr << "The requested video mode is not available, switching to a valid mode" << std::endl; + Mode = VideoMode::GetMode(0); + } + + // Update the fullscreen window + FullscreenWindow = this; + } } // Check validity of style @@ -131,7 +158,7 @@ void Window::Create(VideoMode Mode, const std::string& Title, unsigned long Wind void Window::Create(WindowHandle Handle, const ContextSettings& Settings) { // Recreate the window implementation - delete myWindow; + Close(); myWindow = priv::WindowImpl::New(Handle); // Make sure another context is bound, so that: @@ -170,6 +197,10 @@ void Window::Close() delete myWindow; myWindow = NULL; } + + // Update the fullscreen window + if (this == FullscreenWindow) + FullscreenWindow = NULL; }