├── .gitignore ├── .vscode ├── launch.json └── tasks.json ├── CMakeLists.txt ├── README.md ├── SFML ├── .editorconfig ├── .github │ ├── ISSUE_TEMPLATE.md │ └── PULL_REQUEST_TEMPLATE.md ├── CMakeLists.txt ├── CONTRIBUTING.md ├── changelog.md ├── cmake │ ├── Config.cmake │ ├── Macros.cmake │ ├── Modules │ │ ├── FindEGL.cmake │ │ ├── FindFLAC.cmake │ │ ├── FindFreetype.cmake │ │ ├── FindGLES.cmake │ │ ├── FindUDev.cmake │ │ └── FindVorbis.cmake │ ├── SFMLConfig.cmake.in │ ├── SFMLConfigDependencies.cmake.in │ └── toolchains │ │ ├── android.toolchain.cmake │ │ └── iOS.toolchain.cmake ├── extlibs │ ├── Android.mk │ ├── headers │ │ ├── AL │ │ │ ├── al.h │ │ │ ├── alc.h │ │ │ ├── alext.h │ │ │ ├── efx-creative.h │ │ │ ├── efx-presets.h │ │ │ └── efx.h │ │ ├── FLAC │ │ │ ├── all.h │ │ │ ├── assert.h │ │ │ ├── callback.h │ │ │ ├── export.h │ │ │ ├── format.h │ │ │ ├── metadata.h │ │ │ ├── ordinals.h │ │ │ ├── stream_decoder.h │ │ │ └── stream_encoder.h │ │ ├── freetype2 │ │ │ ├── config │ │ │ │ ├── ftconfig.h │ │ │ │ ├── ftheader.h │ │ │ │ ├── ftmodule.h │ │ │ │ ├── ftoption.h │ │ │ │ └── ftstdlib.h │ │ │ ├── freetype.h │ │ │ ├── ft2build.h │ │ │ ├── ftadvanc.h │ │ │ ├── ftautoh.h │ │ │ ├── ftbbox.h │ │ │ ├── ftbdf.h │ │ │ ├── ftbitmap.h │ │ │ ├── ftbzip2.h │ │ │ ├── ftcache.h │ │ │ ├── ftcffdrv.h │ │ │ ├── ftchapters.h │ │ │ ├── ftcid.h │ │ │ ├── fterrdef.h │ │ │ ├── fterrors.h │ │ │ ├── ftgasp.h │ │ │ ├── ftglyph.h │ │ │ ├── ftgxval.h │ │ │ ├── ftgzip.h │ │ │ ├── ftimage.h │ │ │ ├── ftincrem.h │ │ │ ├── ftlcdfil.h │ │ │ ├── ftlist.h │ │ │ ├── ftlzw.h │ │ │ ├── ftmac.h │ │ │ ├── ftmm.h │ │ │ ├── ftmodapi.h │ │ │ ├── ftmoderr.h │ │ │ ├── ftotval.h │ │ │ ├── ftoutln.h │ │ │ ├── ftpfr.h │ │ │ ├── ftrender.h │ │ │ ├── ftsizes.h │ │ │ ├── ftsnames.h │ │ │ ├── ftstroke.h │ │ │ ├── ftsynth.h │ │ │ ├── ftsystem.h │ │ │ ├── fttrigon.h │ │ │ ├── ftttdrv.h │ │ │ ├── fttypes.h │ │ │ ├── ftwinfnt.h │ │ │ ├── ftxf86.h │ │ │ ├── t1tables.h │ │ │ ├── ttnameid.h │ │ │ ├── tttables.h │ │ │ ├── tttags.h │ │ │ └── ttunpat.h │ │ ├── mingw │ │ │ ├── _mingw_dxhelper.h │ │ │ └── dinput.h │ │ ├── ogg │ │ │ ├── config_types.h │ │ │ ├── ogg.h │ │ │ └── os_types.h │ │ ├── stb_image │ │ │ ├── stb_image.h │ │ │ └── stb_image_write.h │ │ └── vorbis │ │ │ ├── codec.h │ │ │ ├── vorbisenc.h │ │ │ └── vorbisfile.h │ ├── libs-android │ │ ├── armeabi-v7a │ │ │ ├── libFLAC++.a │ │ │ ├── libFLAC.a │ │ │ ├── libfreetype.a │ │ │ ├── libogg.a │ │ │ ├── libopenal.so │ │ │ ├── libvorbis.a │ │ │ ├── libvorbisenc.a │ │ │ └── libvorbisfile.a │ │ ├── armeabi │ │ │ ├── libFLAC++.a │ │ │ ├── libFLAC.a │ │ │ ├── libfreetype.a │ │ │ ├── libogg.a │ │ │ ├── libopenal.so │ │ │ ├── libvorbis.a │ │ │ ├── libvorbisenc.a │ │ │ └── libvorbisfile.a │ │ ├── mips │ │ │ ├── libFLAC++.a │ │ │ ├── libFLAC.a │ │ │ ├── libfreetype.a │ │ │ ├── libogg.a │ │ │ ├── libopenal.so │ │ │ ├── libvorbis.a │ │ │ ├── libvorbisenc.a │ │ │ └── libvorbisfile.a │ │ └── x86 │ │ │ ├── libFLAC++.a │ │ │ ├── libFLAC.a │ │ │ ├── libfreetype.a │ │ │ ├── libogg.a │ │ │ ├── libopenal.so │ │ │ ├── libvorbis.a │ │ │ ├── libvorbisenc.a │ │ │ └── libvorbisfile.a │ ├── libs-ios │ │ ├── libflac.a │ │ ├── libfreetype.a │ │ ├── libogg.a │ │ └── libvorbis.a │ ├── libs-mingw │ │ ├── x64 │ │ │ ├── libFLAC.a │ │ │ ├── libfreetype.a │ │ │ ├── libogg.a │ │ │ ├── libopenal32.a │ │ │ ├── libvorbis.a │ │ │ ├── libvorbisenc.a │ │ │ └── libvorbisfile.a │ │ └── x86 │ │ │ ├── libFLAC.a │ │ │ ├── libfreetype.a │ │ │ ├── libogg.a │ │ │ ├── libopenal32.a │ │ │ ├── libvorbis.a │ │ │ ├── libvorbisenc.a │ │ │ └── libvorbisfile.a │ ├── libs-msvc-universal │ │ ├── x64 │ │ │ ├── flac.lib │ │ │ ├── freetype.lib │ │ │ ├── ogg.lib │ │ │ ├── openal32.lib │ │ │ ├── vorbis.lib │ │ │ ├── vorbisenc.lib │ │ │ └── vorbisfile.lib │ │ └── x86 │ │ │ ├── flac.lib │ │ │ ├── freetype.lib │ │ │ ├── ogg.lib │ │ │ ├── openal32.lib │ │ │ ├── vorbis.lib │ │ │ ├── vorbisenc.lib │ │ │ └── vorbisfile.lib │ ├── libs-msvc │ │ ├── x64 │ │ │ ├── flac.lib │ │ │ ├── freetype.lib │ │ │ ├── ogg.lib │ │ │ ├── openal32.lib │ │ │ ├── vorbis.lib │ │ │ ├── vorbisenc.lib │ │ │ └── vorbisfile.lib │ │ └── x86 │ │ │ ├── flac.lib │ │ │ ├── freetype.lib │ │ │ ├── ogg.lib │ │ │ ├── openal32.lib │ │ │ ├── vorbis.lib │ │ │ ├── vorbisenc.lib │ │ │ └── vorbisfile.lib │ └── libs-osx │ │ └── Frameworks │ │ ├── FLAC.framework │ │ ├── FLAC │ │ ├── Resources │ │ └── Versions │ │ │ ├── A │ │ │ ├── FLAC │ │ │ └── Resources │ │ │ │ └── Info.plist │ │ │ └── Current │ │ ├── OpenAL.framework │ │ ├── OpenAL │ │ ├── Resources │ │ └── Versions │ │ │ ├── A │ │ │ ├── OpenAL │ │ │ └── Resources │ │ │ │ └── Info.plist │ │ │ └── Current │ │ ├── freetype.framework │ │ ├── Resources │ │ ├── Versions │ │ │ ├── A │ │ │ │ ├── Resources │ │ │ │ │ └── Info.plist │ │ │ │ └── freetype │ │ │ └── Current │ │ └── freetype │ │ ├── ogg.framework │ │ ├── Resources │ │ ├── Versions │ │ │ ├── A │ │ │ │ ├── Resources │ │ │ │ │ └── Info.plist │ │ │ │ └── ogg │ │ │ └── Current │ │ └── ogg │ │ ├── vorbis.framework │ │ ├── Resources │ │ ├── Versions │ │ │ ├── A │ │ │ │ ├── Resources │ │ │ │ │ └── Info.plist │ │ │ │ └── vorbis │ │ │ └── Current │ │ └── vorbis │ │ ├── vorbisenc.framework │ │ ├── Resources │ │ ├── Versions │ │ │ ├── A │ │ │ │ ├── Resources │ │ │ │ │ └── Info.plist │ │ │ │ └── vorbisenc │ │ │ └── Current │ │ └── vorbisenc │ │ └── vorbisfile.framework │ │ ├── Resources │ │ ├── Versions │ │ ├── A │ │ │ ├── Resources │ │ │ │ └── Info.plist │ │ │ └── vorbisfile │ │ └── Current │ │ └── vorbisfile ├── include │ └── SFML │ │ ├── Audio.hpp │ │ ├── Audio │ │ ├── AlResource.hpp │ │ ├── Export.hpp │ │ ├── InputSoundFile.hpp │ │ ├── Listener.hpp │ │ ├── Music.hpp │ │ ├── OutputSoundFile.hpp │ │ ├── Sound.hpp │ │ ├── SoundBuffer.hpp │ │ ├── SoundBufferRecorder.hpp │ │ ├── SoundFileFactory.hpp │ │ ├── SoundFileFactory.inl │ │ ├── SoundFileReader.hpp │ │ ├── SoundFileWriter.hpp │ │ ├── SoundRecorder.hpp │ │ ├── SoundSource.hpp │ │ └── SoundStream.hpp │ │ ├── Config.hpp │ │ ├── GpuPreference.hpp │ │ ├── Graphics.hpp │ │ ├── Graphics │ │ ├── BlendMode.hpp │ │ ├── CircleShape.hpp │ │ ├── Color.hpp │ │ ├── ConvexShape.hpp │ │ ├── Drawable.hpp │ │ ├── Export.hpp │ │ ├── Font.hpp │ │ ├── Glsl.hpp │ │ ├── Glsl.inl │ │ ├── Glyph.hpp │ │ ├── Image.hpp │ │ ├── PrimitiveType.hpp │ │ ├── Rect.hpp │ │ ├── Rect.inl │ │ ├── RectangleShape.hpp │ │ ├── RenderStates.hpp │ │ ├── RenderTarget.hpp │ │ ├── RenderTexture.hpp │ │ ├── RenderWindow.hpp │ │ ├── Shader.hpp │ │ ├── Shape.hpp │ │ ├── Sprite.hpp │ │ ├── Text.hpp │ │ ├── Texture.hpp │ │ ├── Transform.hpp │ │ ├── Transformable.hpp │ │ ├── Vertex.hpp │ │ ├── VertexArray.hpp │ │ ├── VertexBuffer.hpp │ │ └── View.hpp │ │ ├── Main.hpp │ │ ├── Network.hpp │ │ ├── Network │ │ ├── Export.hpp │ │ ├── Ftp.hpp │ │ ├── Http.hpp │ │ ├── IpAddress.hpp │ │ ├── Packet.hpp │ │ ├── Socket.hpp │ │ ├── SocketHandle.hpp │ │ ├── SocketSelector.hpp │ │ ├── TcpListener.hpp │ │ ├── TcpSocket.hpp │ │ └── UdpSocket.hpp │ │ ├── OpenGL.hpp │ │ ├── System.hpp │ │ ├── System │ │ ├── Clock.hpp │ │ ├── Err.hpp │ │ ├── Export.hpp │ │ ├── FileInputStream.hpp │ │ ├── InputStream.hpp │ │ ├── Lock.hpp │ │ ├── MemoryInputStream.hpp │ │ ├── Mutex.hpp │ │ ├── NativeActivity.hpp │ │ ├── NonCopyable.hpp │ │ ├── Sleep.hpp │ │ ├── String.hpp │ │ ├── String.inl │ │ ├── Thread.hpp │ │ ├── Thread.inl │ │ ├── ThreadLocal.hpp │ │ ├── ThreadLocalPtr.hpp │ │ ├── ThreadLocalPtr.inl │ │ ├── Time.hpp │ │ ├── Utf.hpp │ │ ├── Utf.inl │ │ ├── Vector2.hpp │ │ ├── Vector2.inl │ │ ├── Vector3.hpp │ │ └── Vector3.inl │ │ ├── Window.hpp │ │ └── Window │ │ ├── Clipboard.hpp │ │ ├── Context.hpp │ │ ├── ContextSettings.hpp │ │ ├── Cursor.hpp │ │ ├── Event.hpp │ │ ├── Export.hpp │ │ ├── GlResource.hpp │ │ ├── Joystick.hpp │ │ ├── Keyboard.hpp │ │ ├── Mouse.hpp │ │ ├── Sensor.hpp │ │ ├── Touch.hpp │ │ ├── VideoMode.hpp │ │ ├── Window.hpp │ │ ├── WindowHandle.hpp │ │ └── WindowStyle.hpp ├── license.md ├── readme.md └── src │ └── SFML │ ├── Android.mk │ ├── Audio │ ├── ALCheck.cpp │ ├── ALCheck.hpp │ ├── AlResource.cpp │ ├── AudioDevice.cpp │ ├── AudioDevice.hpp │ ├── CMakeLists.txt │ ├── InputSoundFile.cpp │ ├── Listener.cpp │ ├── Music.cpp │ ├── OutputSoundFile.cpp │ ├── Sound.cpp │ ├── SoundBuffer.cpp │ ├── SoundBufferRecorder.cpp │ ├── SoundFileFactory.cpp │ ├── SoundFileReaderFlac.cpp │ ├── SoundFileReaderFlac.hpp │ ├── SoundFileReaderOgg.cpp │ ├── SoundFileReaderOgg.hpp │ ├── SoundFileReaderWav.cpp │ ├── SoundFileReaderWav.hpp │ ├── SoundFileWriterFlac.cpp │ ├── SoundFileWriterFlac.hpp │ ├── SoundFileWriterOgg.cpp │ ├── SoundFileWriterOgg.hpp │ ├── SoundFileWriterWav.cpp │ ├── SoundFileWriterWav.hpp │ ├── SoundRecorder.cpp │ ├── SoundSource.cpp │ └── SoundStream.cpp │ ├── CMakeLists.txt │ ├── Graphics │ ├── BlendMode.cpp │ ├── CMakeLists.txt │ ├── CircleShape.cpp │ ├── Color.cpp │ ├── ConvexShape.cpp │ ├── Font.cpp │ ├── GLCheck.cpp │ ├── GLCheck.hpp │ ├── GLExtensions.cpp │ ├── GLExtensions.hpp │ ├── GLExtensions.txt │ ├── GLLoader.cpp │ ├── GLLoader.hpp │ ├── Glsl.cpp │ ├── Image.cpp │ ├── ImageLoader.cpp │ ├── ImageLoader.hpp │ ├── RectangleShape.cpp │ ├── RenderStates.cpp │ ├── RenderTarget.cpp │ ├── RenderTexture.cpp │ ├── RenderTextureImpl.cpp │ ├── RenderTextureImpl.hpp │ ├── RenderTextureImplDefault.cpp │ ├── RenderTextureImplDefault.hpp │ ├── RenderTextureImplFBO.cpp │ ├── RenderTextureImplFBO.hpp │ ├── RenderWindow.cpp │ ├── Shader.cpp │ ├── Shape.cpp │ ├── Sprite.cpp │ ├── Text.cpp │ ├── Texture.cpp │ ├── TextureSaver.cpp │ ├── TextureSaver.hpp │ ├── Transform.cpp │ ├── Transformable.cpp │ ├── Vertex.cpp │ ├── VertexArray.cpp │ ├── VertexBuffer.cpp │ └── View.cpp │ ├── Main │ ├── CMakeLists.txt │ ├── MainAndroid.cpp │ ├── MainWin32.cpp │ ├── MainiOS.mm │ └── SFMLActivity.cpp │ ├── Network │ ├── CMakeLists.txt │ ├── Ftp.cpp │ ├── Http.cpp │ ├── IpAddress.cpp │ ├── Packet.cpp │ ├── Socket.cpp │ ├── SocketImpl.hpp │ ├── SocketSelector.cpp │ ├── TcpListener.cpp │ ├── TcpSocket.cpp │ ├── UdpSocket.cpp │ ├── Unix │ │ ├── SocketImpl.cpp │ │ └── SocketImpl.hpp │ └── Win32 │ │ ├── SocketImpl.cpp │ │ └── SocketImpl.hpp │ ├── System │ ├── Android │ │ ├── Activity.cpp │ │ ├── Activity.hpp │ │ ├── NativeActivity.cpp │ │ ├── ResourceStream.cpp │ │ └── ResourceStream.hpp │ ├── CMakeLists.txt │ ├── Clock.cpp │ ├── Err.cpp │ ├── FileInputStream.cpp │ ├── Lock.cpp │ ├── MemoryInputStream.cpp │ ├── Mutex.cpp │ ├── Sleep.cpp │ ├── String.cpp │ ├── Thread.cpp │ ├── ThreadLocal.cpp │ ├── Time.cpp │ ├── Unix │ │ ├── ClockImpl.cpp │ │ ├── ClockImpl.hpp │ │ ├── MutexImpl.cpp │ │ ├── MutexImpl.hpp │ │ ├── SleepImpl.cpp │ │ ├── SleepImpl.hpp │ │ ├── ThreadImpl.cpp │ │ ├── ThreadImpl.hpp │ │ ├── ThreadLocalImpl.cpp │ │ └── ThreadLocalImpl.hpp │ └── Win32 │ │ ├── ClockImpl.cpp │ │ ├── ClockImpl.hpp │ │ ├── MutexImpl.cpp │ │ ├── MutexImpl.hpp │ │ ├── SleepImpl.cpp │ │ ├── SleepImpl.hpp │ │ ├── ThreadImpl.cpp │ │ ├── ThreadImpl.hpp │ │ ├── ThreadLocalImpl.cpp │ │ └── ThreadLocalImpl.hpp │ └── Window │ ├── Android │ ├── ClipboardImpl.cpp │ ├── ClipboardImpl.hpp │ ├── CursorImpl.cpp │ ├── CursorImpl.hpp │ ├── InputImpl.cpp │ ├── InputImpl.hpp │ ├── JoystickImpl.cpp │ ├── JoystickImpl.hpp │ ├── SensorImpl.cpp │ ├── SensorImpl.hpp │ ├── VideoModeImpl.cpp │ ├── WindowImplAndroid.cpp │ └── WindowImplAndroid.hpp │ ├── CMakeLists.txt │ ├── Clipboard.cpp │ ├── ClipboardImpl.hpp │ ├── Context.cpp │ ├── Cursor.cpp │ ├── CursorImpl.hpp │ ├── EGLCheck.cpp │ ├── EGLCheck.hpp │ ├── EglContext.cpp │ ├── EglContext.hpp │ ├── FreeBSD │ ├── JoystickImpl.cpp │ └── JoystickImpl.hpp │ ├── GlContext.cpp │ ├── GlContext.hpp │ ├── GlResource.cpp │ ├── InputImpl.hpp │ ├── Joystick.cpp │ ├── JoystickImpl.hpp │ ├── JoystickManager.cpp │ ├── JoystickManager.hpp │ ├── Keyboard.cpp │ ├── Mouse.cpp │ ├── OSX │ ├── AutoreleasePoolWrapper.h │ ├── AutoreleasePoolWrapper.mm │ ├── ClipboardImpl.hpp │ ├── ClipboardImpl.mm │ ├── CursorImpl.hpp │ ├── CursorImpl.mm │ ├── HIDInputManager.hpp │ ├── HIDInputManager.mm │ ├── HIDJoystickManager.cpp │ ├── HIDJoystickManager.hpp │ ├── InputImpl.hpp │ ├── InputImpl.mm │ ├── JoystickImpl.cpp │ ├── JoystickImpl.hpp │ ├── NSImage+raw.h │ ├── NSImage+raw.mm │ ├── SFApplication.h │ ├── SFApplication.m │ ├── SFApplicationDelegate.h │ ├── SFApplicationDelegate.m │ ├── SFContext.hpp │ ├── SFContext.mm │ ├── SFKeyboardModifiersHelper.h │ ├── SFKeyboardModifiersHelper.mm │ ├── SFOpenGLView+keyboard.mm │ ├── SFOpenGLView+keyboard_priv.h │ ├── SFOpenGLView+mouse.mm │ ├── SFOpenGLView+mouse_priv.h │ ├── SFOpenGLView.h │ ├── SFOpenGLView.mm │ ├── SFSilentResponder.h │ ├── SFSilentResponder.m │ ├── SFViewController.h │ ├── SFViewController.mm │ ├── SFWindow.h │ ├── SFWindow.m │ ├── SFWindowController.h │ ├── SFWindowController.mm │ ├── Scaling.h │ ├── SensorImpl.cpp │ ├── SensorImpl.hpp │ ├── VideoModeImpl.cpp │ ├── WindowImplCocoa.hpp │ ├── WindowImplCocoa.mm │ ├── WindowImplDelegateProtocol.h │ ├── cg_sf_conversion.hpp │ ├── cg_sf_conversion.mm │ ├── cpp_objc_conversion.h │ └── cpp_objc_conversion.mm │ ├── OpenBSD │ ├── JoystickImpl.cpp │ └── JoystickImpl.hpp │ ├── Sensor.cpp │ ├── SensorImpl.hpp │ ├── SensorManager.cpp │ ├── SensorManager.hpp │ ├── Touch.cpp │ ├── Unix │ ├── ClipboardImpl.cpp │ ├── ClipboardImpl.hpp │ ├── CursorImpl.cpp │ ├── CursorImpl.hpp │ ├── Display.cpp │ ├── Display.hpp │ ├── GlxContext.cpp │ ├── GlxContext.hpp │ ├── GlxExtensions.cpp │ ├── GlxExtensions.hpp │ ├── GlxExtensions.txt │ ├── InputImpl.cpp │ ├── InputImpl.hpp │ ├── JoystickImpl.cpp │ ├── JoystickImpl.hpp │ ├── SensorImpl.cpp │ ├── SensorImpl.hpp │ ├── VideoModeImpl.cpp │ ├── WindowImplX11.cpp │ └── WindowImplX11.hpp │ ├── VideoMode.cpp │ ├── VideoModeImpl.hpp │ ├── Win32 │ ├── ClipboardImpl.cpp │ ├── ClipboardImpl.hpp │ ├── CursorImpl.cpp │ ├── CursorImpl.hpp │ ├── InputImpl.cpp │ ├── InputImpl.hpp │ ├── JoystickImpl.cpp │ ├── JoystickImpl.hpp │ ├── SensorImpl.cpp │ ├── SensorImpl.hpp │ ├── VideoModeImpl.cpp │ ├── WglContext.cpp │ ├── WglContext.hpp │ ├── WglExtensions.cpp │ ├── WglExtensions.hpp │ ├── WglExtensions.txt │ ├── WindowImplWin32.cpp │ └── WindowImplWin32.hpp │ ├── Window.cpp │ ├── WindowImpl.cpp │ ├── WindowImpl.hpp │ └── iOS │ ├── ClipboardImpl.hpp │ ├── ClipboardImpl.mm │ ├── CursorImpl.cpp │ ├── CursorImpl.hpp │ ├── EaglContext.hpp │ ├── EaglContext.mm │ ├── InputImpl.hpp │ ├── InputImpl.mm │ ├── JoystickImpl.hpp │ ├── JoystickImpl.mm │ ├── ObjCType.hpp │ ├── SFAppDelegate.hpp │ ├── SFAppDelegate.mm │ ├── SFMain.hpp │ ├── SFMain.mm │ ├── SFView.hpp │ ├── SFView.mm │ ├── SFViewController.hpp │ ├── SFViewController.mm │ ├── SensorImpl.hpp │ ├── SensorImpl.mm │ ├── VideoModeImpl.mm │ ├── WindowImplUIKit.hpp │ └── WindowImplUIKit.mm ├── cmake-build-debug ├── CMakeCache.txt ├── CMakeFiles │ ├── 3.14.5 │ │ ├── CMakeCCompiler.cmake │ │ ├── CMakeCXXCompiler.cmake │ │ ├── CMakeDetermineCompilerABI_C.bin │ │ ├── CMakeDetermineCompilerABI_CXX.bin │ │ ├── CMakeSystem.cmake │ │ ├── CompilerIdC │ │ │ ├── CMakeCCompilerId.c │ │ │ └── a.out │ │ └── CompilerIdCXX │ │ │ ├── CMakeCXXCompilerId.cpp │ │ │ └── a.out │ ├── CMakeDirectoryInformation.cmake │ ├── CMakeOutput.log │ ├── Makefile.cmake │ ├── Makefile2 │ ├── TargetDirectories.txt │ ├── clion-environment.txt │ ├── clion-log.txt │ ├── cmake.check_cache │ ├── feature_tests.bin │ ├── feature_tests.c │ ├── feature_tests.cxx │ ├── progress.marks │ ├── sfml_pendulumPhysics.dir │ │ ├── CXX.includecache │ │ ├── DependInfo.cmake │ │ ├── build.make │ │ ├── cmake_clean.cmake │ │ ├── depend.internal │ │ ├── depend.make │ │ ├── flags.make │ │ ├── link.txt │ │ ├── progress.make │ │ └── src │ │ │ ├── Pendulum.cpp.o │ │ │ └── main.cpp.o │ └── sfmltest.dir │ │ ├── DependInfo.cmake │ │ ├── build.make │ │ ├── cmake_clean.cmake │ │ ├── depend.make │ │ ├── flags.make │ │ ├── link.txt │ │ └── progress.make ├── Makefile ├── OpenSans-Regular.ttf ├── cmake_install.cmake ├── sfml_pendulumPhysics ├── sfml_pendulumPhysics.cbp ├── sfmltest └── sfmltest.cbp ├── cmake_modules └── FindSFML.cmake ├── res └── OpenSans-Regular.ttf └── src ├── Main.cpp ├── Pendulum.cpp └── Pendulum.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Build system 2 | gmon.out 3 | *.stats 4 | Thumbs.db 5 | .DS_Store 6 | build 7 | bin 8 | 9 | # VS Code 10 | .vscode/ipch -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "(lldb) Launch", 9 | "type": "cppdbg", 10 | "request": "launch", 11 | "program": "${workspaceFolder}/build/a", 12 | "cwd": "${workspaceFolder}/build", 13 | "preLaunchTask": "make", 14 | "args": [], 15 | "internalConsoleOptions": "openOnSessionStart", 16 | "logging": { 17 | "moduleLoad": false, 18 | "programOutput": false, 19 | "trace": false 20 | }, 21 | "showDisplayString": false, 22 | "externalConsole": true, 23 | "environment": [], 24 | "MIMode": "lldb", 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "make", 8 | "type": "shell", 9 | "command": "make", 10 | "options": { 11 | "cwd": "${workspaceFolder}/build" 12 | } 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | project(sfml_pendulumPhysics) 3 | 4 | set(CMAKE_CXX_STANDARD 14) 5 | 6 | 7 | set(SOURCES src/main.cpp src/Pendulum.cpp) 8 | add_executable(${PROJECT_NAME} ${SOURCES}) 9 | set_target_properties(${PROJECT_NAME} PROPERTIES OUTPUT_NAME "a") 10 | 11 | set (CMAKE_CXX_FLAGS "-g -W -pedantic") 12 | 13 | include_directories(src) 14 | 15 | # Additional resources like images and fonts 16 | configure_file(res/OpenSans-Regular.ttf OpenSans-Regular.ttf COPYONLY) 17 | 18 | set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH}) 19 | find_package(SFML 2 REQUIRED network audio graphics window system) 20 | if(SFML_FOUND) 21 | include_directories(SFML/include) 22 | target_link_libraries(${PROJECT_NAME} ${SFML_LIBRARIES} ${SFML_DEPENDENCIES}) 23 | endif() 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sfml_cmake_skeleton 2 | Skeleton project folder for building SFML-project with CMake 3 | 4 | 5 | # How to build? 6 | #### You need CMake. Install it for command line atleast. If you are not sure if you have it: `cmake --version` 7 | #### After installing CMake follow steps 1-7 8 | 1. Clone project or download Zip-file and unzip it 9 | 2. Open terminal inside of the project 10 | 3. `mkdir build` - to make "build" directory inside of project folder 11 | 4. `cd ./build` - go inside of "build" folder 12 | 5. `cmake ./../'` - to link files 13 | 6. `make` - to build project 14 | 7. `./a` - to display output 15 | 16 | # How to use? 17 | #### If you are new to CMake don't worry so am I. I made this for myself so it will be easy to copy this for new project and be ready to go without additional hassle. 18 | - In project folder you will find "CMakeLists.txt". Don't rename it and don't move it if you don't know what you are doing. 19 | - Add your ".cpp"-files here: `set(SOURCES src/main.cpp 'here')`. Don't forget "`src/`". 20 | - Create your header files (".h/.hpp")-files inside of src folder. If you want to put them into different folder just modify this line: `include_directories(your_include_folder_name)` 21 | - If your project uses additional files like images or fonts keep them in "res" folder. and add this line for each additional file `configure_file(res/filename.extension filename.extension COPYONLY)` 22 | 23 | 24 | # Not working? 25 | If you have renamed your project folder after building the project try this: 26 | - Delete everything inside of "build" folder. Do steps 5-7 again inside of empty "build" folder. 27 | 28 | 29 | # Additional info 30 | - This skeleton uses SFML version 2.5.1. You can update SFML by simply downloading new version from: "https://github.com/SFML/SFML" and replacing "SFML-2.5.1"-folder with new version. 31 | 32 | - https://github.com/lutrarutra/sfml_cmake_skeleton/ 33 | - Creator: lutrarutra 34 | -------------------------------------------------------------------------------- /SFML/.editorconfig: -------------------------------------------------------------------------------- 1 | # Configuration file for EditorConfig 2 | # More information is available under http://EditorConfig.org 3 | 4 | # Ignore any other files further up in the file system 5 | root = true 6 | 7 | # Configuration for all files 8 | [*] 9 | # Enforce Unix style line endings (\n only) 10 | end_of_line = lf 11 | # Always end files with a blank line 12 | insert_final_newline = true 13 | # Force space characters for indentation 14 | indent_style = space 15 | # Always indent by 4 characters 16 | indent_size = 4 17 | # Remove whitespace characters at the end of line 18 | trim_trailing_whitespace = true 19 | -------------------------------------------------------------------------------- /SFML/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thanks for raising your issue here! 🙂 2 | 3 | Before you submit the issue however, we'd like you to consider the follow points. 4 | 5 | * We like to use the issue tracker for confirmed issues. 6 | * If you're stuck with SFML, please use [the forum](https://en.sfml-dev.org/forums/index.php#c3) to get help. 7 | 8 | ---- 9 | 10 | ## Subject of the issue 11 | 12 | Describe your issue here. 13 | 14 | ## Your environment 15 | 16 | * Your OS / distro / window manager used 17 | * Your version of SFML (2.5.0, git master, etc) 18 | * Your compiler and compiler version used 19 | * Special compiler flags used 20 | 21 | ## Steps to reproduce 22 | 23 | Tell us how to reproduce this issue. Please provide a [minimal, complete and verifiable example](https://stackoverflow.com/help/mcve), you can use the follow template as a start: 24 | 25 | ```cpp 26 | #include 27 | 28 | int main() 29 | { 30 | sf::RenderWindow window(sf::VideoMode(1280, 720), "Minimal, complete and verifiable example"); 31 | window.setFramerateLimit(60); 32 | 33 | while (window.isOpen()) 34 | { 35 | sf::Event event; 36 | while (window.pollEvent(event)) 37 | { 38 | if (event.type == sf::Event::Closed) 39 | window.close(); 40 | } 41 | 42 | window.clear(); 43 | window.display(); 44 | } 45 | } 46 | ``` 47 | 48 | ## Expected behavior 49 | 50 | Tell us what should happen 51 | 52 | ## Actual behavior 53 | 54 | Tell us what happens instead 55 | -------------------------------------------------------------------------------- /SFML/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Thanks a lot for making a contribution to SFML! 🙂 2 | 3 | Before you create the pull request, we ask you to check the follow boxes. (For small changes not everything needs to ticked, but the more the better!) 4 | 5 | * [ ] Has this change been discussed on [the forum](https://en.sfml-dev.org/forums/index.php#c3) or in an issue before? 6 | * [ ] Does the code follow the SFML [Code Style Guide](https://www.sfml-dev.org/style.php)? 7 | * [ ] Have you provided some example/test code for your changes? 8 | * [ ] If you have additional steps which need to be performed list them as tasks! 9 | 10 | ---- 11 | 12 | ## Description 13 | 14 | Please describe your pull request. 15 | 16 | This PR is related to the issue # 17 | 18 | ## Tasks 19 | 20 | * [ ] Tested on Linux 21 | * [ ] Tested on Windows 22 | * [ ] Tested on macOS 23 | * [ ] Tested on iOS 24 | * [ ] Tested on Android 25 | 26 | ## How to test this PR? 27 | 28 | Describe how to best test these changes. Please provide a [minimal, complete and verifiable example](https://stackoverflow.com/help/mcve) if possible, you can use the follow template as a start: 29 | 30 | ```cpp 31 | #include 32 | 33 | int main() 34 | { 35 | sf::RenderWindow window(sf::VideoMode(1280, 720), "Minimal, complete and verifiable example"); 36 | window.setFramerateLimit(60); 37 | 38 | while (window.isOpen()) 39 | { 40 | sf::Event event; 41 | while (window.pollEvent(event)) 42 | { 43 | if (event.type == sf::Event::Closed) 44 | window.close(); 45 | } 46 | 47 | window.clear(); 48 | window.display(); 49 | } 50 | } 51 | ``` -------------------------------------------------------------------------------- /SFML/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guidelines 2 | 3 | You would like to see a feature implemented or a bug fixed in SFML? Great! Contributions to SFML are highly appreciated, be it in the form of general ideas, concrete suggestions or code patches. 4 | 5 | [A few guiding rules have been set up on the SFML website](https://www.sfml-dev.org/contribute.php) that you should be aware of before opening an Issue or Pull Request. They will help you focus on the important stuff and prevent you from losing (y)our time with requests that are out of SFML's scope, known issues, and so on. 6 | 7 | Those rules cover the general scope defined for this project, a coding style, and a precise procedure to report bugs or suggest new features. 8 | -------------------------------------------------------------------------------- /SFML/cmake/Modules/FindEGL.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Try to find EGL library and include path. 3 | # Once done this will define 4 | # 5 | # EGL_FOUND 6 | # EGL_INCLUDE_PATH 7 | # EGL_LIBRARY 8 | # 9 | 10 | find_path(EGL_INCLUDE_DIR EGL/egl.h) 11 | find_library(EGL_LIBRARY NAMES EGL) 12 | 13 | include(FindPackageHandleStandardArgs) 14 | find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR) 15 | -------------------------------------------------------------------------------- /SFML/cmake/Modules/FindFLAC.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Try to find FLAC libraries and include paths. 3 | # Once done this will define 4 | # 5 | # FLAC_FOUND 6 | # FLAC_INCLUDE_DIR 7 | # FLAC_LIBRARY 8 | # 9 | 10 | find_path(FLAC_INCLUDE_DIR FLAC/all.h) 11 | find_path(FLAC_INCLUDE_DIR FLAC/stream_decoder.h) 12 | 13 | find_library(FLAC_LIBRARY NAMES FLAC) 14 | 15 | include(FindPackageHandleStandardArgs) 16 | find_package_handle_standard_args(FLAC DEFAULT_MSG FLAC_LIBRARY FLAC_INCLUDE_DIR) 17 | 18 | mark_as_advanced(FLAC_INCLUDE_DIR FLAC_LIBRARY) 19 | -------------------------------------------------------------------------------- /SFML/cmake/Modules/FindGLES.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Try to find GLES library and include path. 3 | # Once done this will define 4 | # 5 | # GLES_FOUND 6 | # GLES_INCLUDE_PATH 7 | # GLES_LIBRARY 8 | # 9 | 10 | find_path(GLES_INCLUDE_DIR GLES/gl.h) 11 | find_library(GLES_LIBRARY NAMES GLESv1_CM) 12 | 13 | include(FindPackageHandleStandardArgs) 14 | find_package_handle_standard_args(GLES DEFAULT_MSG GLES_LIBRARY GLES_INCLUDE_DIR) 15 | -------------------------------------------------------------------------------- /SFML/cmake/Modules/FindUDev.cmake: -------------------------------------------------------------------------------- 1 | # Configure libudev environment 2 | # 3 | # UDEV_FOUND - system has a libudev 4 | # UDEV_INCLUDE_DIR - where to find header files 5 | # UDEV_LIBRARIES - the libraries to link against udev 6 | # UDEV_STABLE - it's true when is the version greater or equals to 143 - version when the libudev was stabilized in its API 7 | # 8 | # copyright (c) 2011 Petr Vanek 9 | # Redistribution and use of this file is allowed according to the terms of the BSD license. 10 | # 11 | 12 | FIND_PATH( 13 | UDEV_INCLUDE_DIR 14 | libudev.h 15 | /usr/include 16 | /usr/local/include 17 | ${UDEV_PATH_INCLUDES} 18 | ) 19 | 20 | FIND_LIBRARY( 21 | UDEV_LIBRARIES 22 | NAMES udev libudev 23 | PATHS ${ADDITIONAL_LIBRARY_PATHS} 24 | ${UDEV_PATH_LIB} 25 | ) 26 | 27 | IF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR) 28 | SET(UDEV_FOUND "YES") 29 | execute_process(COMMAND pkg-config --atleast-version=143 libudev RESULT_VARIABLE UDEV_STABLE) 30 | # retvale is 0 of the condition is "true" so we need to negate the value... 31 | if (UDEV_STABLE) 32 | set(UDEV_STABLE 0) 33 | else (UDEV_STABLE) 34 | set(UDEV_STABLE 1) 35 | endif (UDEV_STABLE) 36 | message(STATUS "libudev stable: ${UDEV_STABLE}") 37 | ENDIF (UDEV_LIBRARIES AND UDEV_INCLUDE_DIR) 38 | 39 | IF (UDEV_FOUND) 40 | MESSAGE(STATUS "Found UDev: ${UDEV_LIBRARIES}") 41 | MESSAGE(STATUS " include: ${UDEV_INCLUDE_DIR}") 42 | ELSE (UDEV_FOUND) 43 | MESSAGE(STATUS "UDev not found.") 44 | MESSAGE(STATUS "UDev: You can specify includes: -DUDEV_PATH_INCLUDES=/opt/udev/include") 45 | MESSAGE(STATUS " currently found includes: ${UDEV_INCLUDE_DIR}") 46 | MESSAGE(STATUS "UDev: You can specify libs: -DUDEV_PATH_LIB=/opt/udev/lib") 47 | MESSAGE(STATUS " currently found libs: ${UDEV_LIBRARIES}") 48 | IF (UDev_FIND_REQUIRED) 49 | MESSAGE(FATAL_ERROR "Could not find UDev library") 50 | ENDIF (UDev_FIND_REQUIRED) 51 | ENDIF (UDEV_FOUND) 52 | 53 | mark_as_advanced(UDEV_INCLUDE_DIR UDEV_LIBRARIES) 54 | -------------------------------------------------------------------------------- /SFML/cmake/Modules/FindVorbis.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Try to find Ogg/Vorbis libraries and include paths. 3 | # Once done this will define 4 | # 5 | # VORBIS_FOUND 6 | # VORBIS_INCLUDE_DIRS 7 | # VORBIS_LIBRARIES 8 | # 9 | 10 | find_path(OGG_INCLUDE_DIR ogg/ogg.h) 11 | find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h) 12 | 13 | find_library(OGG_LIBRARY NAMES ogg) 14 | find_library(VORBIS_LIBRARY NAMES vorbis) 15 | if (NOT SFML_OS_IOS) 16 | find_library(VORBISFILE_LIBRARY NAMES vorbisfile) 17 | find_library(VORBISENC_LIBRARY NAMES vorbisenc) 18 | set(VORBIS_LIBRARIES ${VORBISENC_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY} ${OGG_LIBRARY}) 19 | else() 20 | set(VORBIS_LIBRARIES ${VORBIS_LIBRARY} ${OGG_LIBRARY}) 21 | endif() 22 | 23 | include(FindPackageHandleStandardArgs) 24 | 25 | find_package_handle_standard_args(VORBIS DEFAULT_MSG VORBIS_LIBRARIES VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR) 26 | 27 | set(VORBIS_INCLUDE_DIRS ${OGG_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR}) 28 | 29 | mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY) 30 | -------------------------------------------------------------------------------- /SFML/extlibs/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_MODULE := freetype 5 | LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libfreetype.a 6 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include 7 | include $(PREBUILT_STATIC_LIBRARY) 8 | 9 | include $(CLEAR_VARS) 10 | LOCAL_MODULE := openal 11 | LOCAL_SRC_FILES := lib/$(TARGET_ARCH_ABI)/libopenal.so 12 | LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include 13 | include $(PREBUILT_SHARED_LIBRARY) 14 | -------------------------------------------------------------------------------- /SFML/extlibs/headers/AL/efx-creative.h: -------------------------------------------------------------------------------- 1 | /* The tokens that would be defined here are already defined in efx.h. This 2 | * empty file is here to provide compatibility with Windows-based projects 3 | * that would include it. */ 4 | -------------------------------------------------------------------------------- /SFML/extlibs/headers/FLAC/assert.h: -------------------------------------------------------------------------------- 1 | /* libFLAC - Free Lossless Audio Codec library 2 | * Copyright (C) 2001-2009 Josh Coalson 3 | * Copyright (C) 2011-2013 Xiph.Org Foundation 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * - Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * - Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * - Neither the name of the Xiph.org Foundation nor the names of its 17 | * contributors may be used to endorse or promote products derived from 18 | * this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR 24 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef FLAC__ASSERT_H 34 | #define FLAC__ASSERT_H 35 | 36 | /* we need this since some compilers (like MSVC) leave assert()s on release code (and we don't want to use their ASSERT) */ 37 | #ifdef DEBUG 38 | #include 39 | #define FLAC__ASSERT(x) assert(x) 40 | #define FLAC__ASSERT_DECLARATION(x) x 41 | #else 42 | #define FLAC__ASSERT(x) 43 | #define FLAC__ASSERT_DECLARATION(x) 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /SFML/extlibs/headers/freetype2/config/ftmodule.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file registers the FreeType modules compiled into the library. 3 | * 4 | * If you use GNU make, this file IS NOT USED! Instead, it is created in 5 | * the objects directory (normally `/objs/') based on information 6 | * from `/modules.cfg'. 7 | * 8 | * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile 9 | * FreeType without GNU make. 10 | * 11 | */ 12 | 13 | FT_USE_MODULE( FT_Module_Class, autofit_module_class ) 14 | FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class ) 15 | FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class ) 16 | FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class ) 17 | FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class ) 18 | FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class ) 19 | FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class ) 20 | FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class ) 21 | FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class ) 22 | FT_USE_MODULE( FT_Module_Class, psaux_module_class ) 23 | FT_USE_MODULE( FT_Module_Class, psnames_module_class ) 24 | FT_USE_MODULE( FT_Module_Class, pshinter_module_class ) 25 | FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class ) 26 | FT_USE_MODULE( FT_Module_Class, sfnt_module_class ) 27 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class ) 28 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) 29 | FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) 30 | FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class ) 31 | 32 | /* EOF */ 33 | -------------------------------------------------------------------------------- /SFML/extlibs/headers/freetype2/ttunpat.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************/ 2 | /* */ 3 | /* ttunpat.h */ 4 | /* */ 5 | /* Definitions for the unpatented TrueType hinting system */ 6 | /* */ 7 | /* Copyright 2003, 2006 by */ 8 | /* David Turner, Robert Wilhelm, and Werner Lemberg. */ 9 | /* */ 10 | /* Written by Graham Asher */ 11 | /* */ 12 | /* This file is part of the FreeType project, and may only be used, */ 13 | /* modified, and distributed under the terms of the FreeType project */ 14 | /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ 15 | /* this file you indicate that you have read the license and */ 16 | /* understand and accept it fully. */ 17 | /* */ 18 | /***************************************************************************/ 19 | 20 | 21 | #ifndef __TTUNPAT_H__ 22 | #define __TTUNPAT_H__ 23 | 24 | 25 | #include 26 | #include FT_FREETYPE_H 27 | 28 | #ifdef FREETYPE_H 29 | #error "freetype.h of FreeType 1 has been loaded!" 30 | #error "Please fix the directory search order for header files" 31 | #error "so that freetype.h of FreeType 2 is found first." 32 | #endif 33 | 34 | 35 | FT_BEGIN_HEADER 36 | 37 | 38 | /*************************************************************************** 39 | * 40 | * @constant: 41 | * FT_PARAM_TAG_UNPATENTED_HINTING 42 | * 43 | * @description: 44 | * A constant used as the tag of an @FT_Parameter structure to indicate 45 | * that unpatented methods only should be used by the TrueType bytecode 46 | * interpreter for a typeface opened by @FT_Open_Face. 47 | * 48 | */ 49 | #define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' ) 50 | 51 | /* */ 52 | 53 | 54 | FT_END_HEADER 55 | 56 | 57 | #endif /* __TTUNPAT_H__ */ 58 | 59 | 60 | /* END */ 61 | -------------------------------------------------------------------------------- /SFML/extlibs/headers/ogg/config_types.h: -------------------------------------------------------------------------------- 1 | #ifndef __CONFIG_TYPES_H__ 2 | #define __CONFIG_TYPES_H__ 3 | 4 | /* these are filled in by configure */ 5 | #define INCLUDE_INTTYPES_H 1 6 | #define INCLUDE_STDINT_H 1 7 | #define INCLUDE_SYS_TYPES_H 1 8 | 9 | #if INCLUDE_INTTYPES_H 10 | # include 11 | #endif 12 | #if INCLUDE_STDINT_H 13 | # include 14 | #endif 15 | #if INCLUDE_SYS_TYPES_H 16 | # include 17 | #endif 18 | 19 | typedef int16_t ogg_int16_t; 20 | typedef uint16_t ogg_uint16_t; 21 | typedef int32_t ogg_int32_t; 22 | typedef uint32_t ogg_uint32_t; 23 | typedef int64_t ogg_int64_t; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi-v7a/libFLAC++.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi-v7a/libFLAC++.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi-v7a/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi-v7a/libFLAC.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi-v7a/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi-v7a/libfreetype.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi-v7a/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi-v7a/libogg.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi-v7a/libopenal.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi-v7a/libopenal.so -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi-v7a/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi-v7a/libvorbis.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi-v7a/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi-v7a/libvorbisenc.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi-v7a/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi-v7a/libvorbisfile.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi/libFLAC++.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi/libFLAC++.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi/libFLAC.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi/libfreetype.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi/libogg.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi/libopenal.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi/libopenal.so -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi/libvorbis.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi/libvorbisenc.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/armeabi/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/armeabi/libvorbisfile.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/mips/libFLAC++.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/mips/libFLAC++.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/mips/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/mips/libFLAC.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/mips/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/mips/libfreetype.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/mips/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/mips/libogg.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/mips/libopenal.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/mips/libopenal.so -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/mips/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/mips/libvorbis.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/mips/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/mips/libvorbisenc.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/mips/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/mips/libvorbisfile.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/x86/libFLAC++.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/x86/libFLAC++.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/x86/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/x86/libFLAC.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/x86/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/x86/libfreetype.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/x86/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/x86/libogg.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/x86/libopenal.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/x86/libopenal.so -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/x86/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/x86/libvorbis.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/x86/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/x86/libvorbisenc.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-android/x86/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-android/x86/libvorbisfile.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-ios/libflac.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-ios/libflac.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-ios/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-ios/libfreetype.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-ios/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-ios/libogg.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-ios/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-ios/libvorbis.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x64/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x64/libFLAC.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x64/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x64/libfreetype.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x64/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x64/libogg.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x64/libopenal32.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x64/libopenal32.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x64/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x64/libvorbis.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x64/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x64/libvorbisenc.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x64/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x64/libvorbisfile.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x86/libFLAC.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x86/libFLAC.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x86/libfreetype.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x86/libfreetype.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x86/libogg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x86/libogg.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x86/libopenal32.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x86/libopenal32.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x86/libvorbis.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x86/libvorbis.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x86/libvorbisenc.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x86/libvorbisenc.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-mingw/x86/libvorbisfile.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-mingw/x86/libvorbisfile.a -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x64/flac.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x64/flac.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x64/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x64/freetype.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x64/ogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x64/ogg.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x64/openal32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x64/openal32.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x64/vorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x64/vorbis.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x64/vorbisenc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x64/vorbisenc.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x64/vorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x64/vorbisfile.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x86/flac.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x86/flac.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x86/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x86/freetype.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x86/ogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x86/ogg.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x86/openal32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x86/openal32.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x86/vorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x86/vorbis.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x86/vorbisenc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x86/vorbisenc.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc-universal/x86/vorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc-universal/x86/vorbisfile.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x64/flac.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x64/flac.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x64/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x64/freetype.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x64/ogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x64/ogg.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x64/openal32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x64/openal32.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x64/vorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x64/vorbis.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x64/vorbisenc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x64/vorbisenc.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x64/vorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x64/vorbisfile.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x86/flac.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x86/flac.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x86/freetype.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x86/freetype.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x86/ogg.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x86/ogg.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x86/openal32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x86/openal32.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x86/vorbis.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x86/vorbis.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x86/vorbisenc.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x86/vorbisenc.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-msvc/x86/vorbisfile.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-msvc/x86/vorbisfile.lib -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/FLAC.framework/FLAC: -------------------------------------------------------------------------------- 1 | Versions/Current/FLAC -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/FLAC.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/FLAC.framework/Versions/A/FLAC: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-osx/Frameworks/FLAC.framework/Versions/A/FLAC -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/FLAC.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | FLAC 9 | CFBundleIdentifier 10 | org.sfml-dev.FLAC 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/FLAC.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/OpenAL.framework/OpenAL: -------------------------------------------------------------------------------- 1 | Versions/Current/OpenAL -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/OpenAL.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/A/OpenAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/A/OpenAL -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | OpenAL 9 | CFBundleIdentifier 10 | org.sfml-dev.OpenAL 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/OpenAL.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/freetype.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | freetype 9 | CFBundleIdentifier 10 | org.sfml-dev.freetype 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-osx/Frameworks/freetype.framework/Versions/A/freetype -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/freetype.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/freetype.framework/freetype: -------------------------------------------------------------------------------- 1 | Versions/Current/freetype -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/ogg.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/ogg.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ogg 9 | CFBundleIdentifier 10 | org.sfml-dev.ogg 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/ogg.framework/Versions/A/ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-osx/Frameworks/ogg.framework/Versions/A/ogg -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/ogg.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/ogg.framework/ogg: -------------------------------------------------------------------------------- 1 | Versions/Current/ogg -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbis.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbis.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | vorbis 9 | CFBundleIdentifier 10 | org.sfml-dev.vorbis 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbis.framework/Versions/A/vorbis: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-osx/Frameworks/vorbis.framework/Versions/A/vorbis -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbis.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbis.framework/vorbis: -------------------------------------------------------------------------------- 1 | Versions/Current/vorbis -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbisenc.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | vorbisenc 9 | CFBundleIdentifier 10 | org.sfml-dev.vorbisenc 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/A/vorbisenc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/A/vorbisenc -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbisenc.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbisenc.framework/vorbisenc: -------------------------------------------------------------------------------- 1 | Versions/Current/vorbisenc -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbisfile.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | vorbisfile 9 | CFBundleIdentifier 10 | org.sfml-dev.vorbisfile 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | FMWK 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleSupportedPlatforms 20 | MacOSX 21 | 22 | 23 | -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/A/vorbisfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/SFML/extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/A/vorbisfile -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbisfile.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /SFML/extlibs/libs-osx/Frameworks/vorbisfile.framework/vorbisfile: -------------------------------------------------------------------------------- 1 | Versions/Current/vorbisfile -------------------------------------------------------------------------------- /SFML/include/SFML/Audio.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_AUDIO_HPP 26 | #define SFML_AUDIO_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | 47 | 48 | #endif // SFML_AUDIO_HPP 49 | 50 | //////////////////////////////////////////////////////////// 51 | /// \defgroup audio Audio module 52 | /// 53 | /// Sounds, streaming (musics or custom sources), recording, 54 | /// spatialization. 55 | /// 56 | //////////////////////////////////////////////////////////// 57 | -------------------------------------------------------------------------------- /SFML/include/SFML/Audio/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_AUDIO_EXPORT_HPP 26 | #define SFML_AUDIO_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_AUDIO_EXPORTS) 38 | 39 | #define SFML_AUDIO_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_AUDIO_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_AUDIO_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /SFML/include/SFML/Graphics/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_GRAPHICS_EXPORT_HPP 26 | #define SFML_GRAPHICS_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_GRAPHICS_EXPORTS) 38 | 39 | #define SFML_GRAPHICS_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_GRAPHICS_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_GRAPHICS_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /SFML/include/SFML/Main.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_MAIN_HPP 26 | #define SFML_MAIN_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | #if defined(SFML_SYSTEM_IOS) 35 | 36 | // On iOS, we have no choice but to have our own main, 37 | // so we need to rename the user one and call it later 38 | #define main sfmlMain 39 | 40 | #endif 41 | 42 | 43 | #endif // SFML_MAIN_HPP 44 | -------------------------------------------------------------------------------- /SFML/include/SFML/Network.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_NETWORK_HPP 26 | #define SFML_NETWORK_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | 44 | 45 | #endif // SFML_NETWORK_HPP 46 | 47 | //////////////////////////////////////////////////////////// 48 | /// \defgroup network Network module 49 | /// 50 | /// Socket-based communication, utilities and higher-level 51 | /// network protocols (HTTP, FTP). 52 | /// 53 | //////////////////////////////////////////////////////////// 54 | -------------------------------------------------------------------------------- /SFML/include/SFML/Network/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_NETWORK_EXPORT_HPP 26 | #define SFML_NETWORK_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_NETWORK_EXPORTS) 38 | 39 | #define SFML_NETWORK_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_NETWORK_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_NETWORK_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /SFML/include/SFML/Network/SocketHandle.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SOCKETHANDLE_HPP 26 | #define SFML_SOCKETHANDLE_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | #if defined(SFML_SYSTEM_WINDOWS) 34 | #include 35 | #endif 36 | 37 | 38 | namespace sf 39 | { 40 | //////////////////////////////////////////////////////////// 41 | // Define the low-level socket handle type, specific to 42 | // each platform 43 | //////////////////////////////////////////////////////////// 44 | #if defined(SFML_SYSTEM_WINDOWS) 45 | 46 | typedef UINT_PTR SocketHandle; 47 | 48 | #else 49 | 50 | typedef int SocketHandle; 51 | 52 | #endif 53 | 54 | } // namespace sf 55 | 56 | 57 | #endif // SFML_SOCKETHANDLE_HPP 58 | -------------------------------------------------------------------------------- /SFML/include/SFML/System/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SYSTEM_EXPORT_HPP 26 | #define SFML_SYSTEM_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_SYSTEM_EXPORTS) 38 | 39 | #define SFML_SYSTEM_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_SYSTEM_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_SYSTEM_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /SFML/include/SFML/System/NativeActivity.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_NATIVEACTIVITY_HPP 26 | #define SFML_NATIVEACTIVITY_HPP 27 | 28 | 29 | //////////////////////////////////////////////////////////// 30 | // Headers 31 | //////////////////////////////////////////////////////////// 32 | #include 33 | 34 | 35 | #if !defined(SFML_SYSTEM_ANDROID) 36 | #error NativeActivity.hpp: This header is Android only. 37 | #endif 38 | 39 | 40 | struct ANativeActivity; 41 | 42 | namespace sf 43 | { 44 | //////////////////////////////////////////////////////////// 45 | /// \ingroup system 46 | /// \brief Return a pointer to the Android native activity 47 | /// 48 | /// You shouldn't have to use this function, unless you want 49 | /// to implement very specific details, that SFML doesn't 50 | /// support, or to use a workaround for a known issue. 51 | /// 52 | /// \return Pointer to Android native activity structure 53 | /// 54 | /// \sfplatform{Android,SFML/System/NativeActivity.hpp} 55 | /// 56 | //////////////////////////////////////////////////////////// 57 | SFML_SYSTEM_API ANativeActivity* getNativeActivity(); 58 | 59 | } // namespace sf 60 | 61 | 62 | #endif // SFML_NATIVEACTIVITY_HPP 63 | -------------------------------------------------------------------------------- /SFML/include/SFML/System/Sleep.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SLEEP_HPP 26 | #define SFML_SLEEP_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | //////////////////////////////////////////////////////////// 38 | /// \ingroup system 39 | /// \brief Make the current thread sleep for a given duration 40 | /// 41 | /// sf::sleep is the best way to block a program or one of its 42 | /// threads, as it doesn't consume any CPU power. 43 | /// 44 | /// \param duration Time to sleep 45 | /// 46 | //////////////////////////////////////////////////////////// 47 | void SFML_SYSTEM_API sleep(Time duration); 48 | 49 | } // namespace sf 50 | 51 | 52 | #endif // SFML_SLEEP_HPP 53 | -------------------------------------------------------------------------------- /SFML/include/SFML/System/String.inl: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | 26 | //////////////////////////////////////////////////////////// 27 | template 28 | String String::fromUtf8(T begin, T end) 29 | { 30 | String string; 31 | Utf8::toUtf32(begin, end, std::back_inserter(string.m_string)); 32 | return string; 33 | } 34 | 35 | 36 | //////////////////////////////////////////////////////////// 37 | template 38 | String String::fromUtf16(T begin, T end) 39 | { 40 | String string; 41 | Utf16::toUtf32(begin, end, std::back_inserter(string.m_string)); 42 | return string; 43 | } 44 | 45 | 46 | //////////////////////////////////////////////////////////// 47 | template 48 | String String::fromUtf32(T begin, T end) 49 | { 50 | String string; 51 | string.m_string.assign(begin, end); 52 | return string; 53 | } 54 | -------------------------------------------------------------------------------- /SFML/include/SFML/Window.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SFML_WINDOW_HPP 26 | #define SFML_SFML_WINDOW_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | 48 | 49 | 50 | #endif // SFML_SFML_WINDOW_HPP 51 | 52 | //////////////////////////////////////////////////////////// 53 | /// \defgroup window Window module 54 | /// 55 | /// Provides OpenGL-based windows, and abstractions for 56 | /// events and input handling. 57 | /// 58 | //////////////////////////////////////////////////////////// 59 | -------------------------------------------------------------------------------- /SFML/include/SFML/Window/Export.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_WINDOW_EXPORT_HPP 26 | #define SFML_WINDOW_EXPORT_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | 34 | //////////////////////////////////////////////////////////// 35 | // Define portable import / export macros 36 | //////////////////////////////////////////////////////////// 37 | #if defined(SFML_WINDOW_EXPORTS) 38 | 39 | #define SFML_WINDOW_API SFML_API_EXPORT 40 | 41 | #else 42 | 43 | #define SFML_WINDOW_API SFML_API_IMPORT 44 | 45 | #endif 46 | 47 | 48 | #endif // SFML_WINDOW_EXPORT_HPP 49 | -------------------------------------------------------------------------------- /SFML/include/SFML/Window/WindowStyle.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_WINDOWSTYLE_HPP 26 | #define SFML_WINDOWSTYLE_HPP 27 | 28 | 29 | namespace sf 30 | { 31 | namespace Style 32 | { 33 | //////////////////////////////////////////////////////////// 34 | /// \ingroup window 35 | /// \brief Enumeration of the window styles 36 | /// 37 | //////////////////////////////////////////////////////////// 38 | enum 39 | { 40 | None = 0, ///< No border / title bar (this flag and all others are mutually exclusive) 41 | Titlebar = 1 << 0, ///< Title bar + fixed border 42 | Resize = 1 << 1, ///< Title bar + resizable border + maximize button 43 | Close = 1 << 2, ///< Title bar + close button 44 | Fullscreen = 1 << 3, ///< Fullscreen mode (this flag and all others are mutually exclusive) 45 | 46 | Default = Titlebar | Resize | Close ///< Default window style 47 | }; 48 | } 49 | 50 | } // namespace sf 51 | 52 | 53 | #endif // SFML_WINDOWSTYLE_HPP 54 | -------------------------------------------------------------------------------- /SFML/license.md: -------------------------------------------------------------------------------- 1 | # SFML 2 | 3 | SFML - Copyright (C) 2007-2018 Laurent Gomila - laurent@sfml-dev.org 4 | 5 | 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. 6 | 7 | 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: 8 | 9 | 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. 10 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 11 | 3. This notice may not be removed or altered from any source distribution. 12 | 13 | ## External libraries used by SFML 14 | 15 | * _OpenAL-Soft_ is under the LGPL license 16 | * _stb_image_ and _stb_image_write_ are public domain 17 | * _freetype_ is under the FreeType license or the GPL license 18 | * _libogg_ is under the BSD license 19 | * _libvorbis_ is under the BSD license 20 | * _libflac_ is under the BSD license 21 | -------------------------------------------------------------------------------- /SFML/readme.md: -------------------------------------------------------------------------------- 1 | [![SFML logo](https://www.sfml-dev.org/images/logo.png)](https://www.sfml-dev.org) 2 | 3 | # SFML — Simple and Fast Multimedia Library 4 | 5 | SFML is a simple, fast, cross-platform and object-oriented multimedia API. It provides access to windowing, graphics, audio and network. It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python. 6 | 7 | ## Authors 8 | 9 | - Laurent Gomila — main developer (laurent@sfml-dev.org) 10 | - Marco Antognini — OS X developer (hiura@sfml-dev.org) 11 | - Jonathan De Wachter — Android developer (dewachter.jonathan@gmail.com) 12 | - Jan Haller (bromeon@sfml-dev.org) 13 | - Stefan Schindler (tank@sfml-dev.org) 14 | - Lukas Dürrenberger (eXpl0it3r@sfml-dev.org) 15 | - binary1248 (binary1248@hotmail.com) 16 | - Artur Moreira (artturmoreira@gmail.com) 17 | - Mario Liebisch (mario@sfml-dev.org) 18 | - And many other members of the SFML community 19 | 20 | ## Download 21 | 22 | You can get the latest official release on [SFML's website](https://www.sfml-dev.org/download.php). You can also get the current development version from the [Git repository](https://github.com/SFML/SFML). 23 | 24 | ## Install 25 | 26 | Follow the instructions of the [tutorials](https://www.sfml-dev.org/tutorials/), there is one for each platform/compiler that SFML supports. 27 | 28 | ## Learn 29 | 30 | There are several places to learn SFML: 31 | 32 | * The [official tutorials](https://www.sfml-dev.org/tutorials/) 33 | * The [online API documentation](https://www.sfml-dev.org/documentation/) 34 | * The [community wiki](https://github.com/SFML/SFML/wiki/) 35 | * The [community forum](https://en.sfml-dev.org/forums/) ([French](https://fr.sfml-dev.org/forums/)) 36 | 37 | ## Contribute 38 | 39 | SFML is an open-source project, and it needs your help to go on growing and improving. If you want to get involved and suggest some additional features, file a bug report or submit a patch, please have a look at the [contribution guidelines](https://www.sfml-dev.org/contribute.php). 40 | -------------------------------------------------------------------------------- /SFML/src/SFML/Graphics/ConvexShape.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | //////////////////////////////////////////////////////////// 34 | ConvexShape::ConvexShape(std::size_t pointCount) 35 | { 36 | setPointCount(pointCount); 37 | } 38 | 39 | 40 | //////////////////////////////////////////////////////////// 41 | void ConvexShape::setPointCount(std::size_t count) 42 | { 43 | m_points.resize(count); 44 | update(); 45 | } 46 | 47 | 48 | //////////////////////////////////////////////////////////// 49 | std::size_t ConvexShape::getPointCount() const 50 | { 51 | return m_points.size(); 52 | } 53 | 54 | 55 | //////////////////////////////////////////////////////////// 56 | void ConvexShape::setPoint(std::size_t index, const Vector2f& point) 57 | { 58 | m_points[index] = point; 59 | update(); 60 | } 61 | 62 | 63 | //////////////////////////////////////////////////////////// 64 | Vector2f ConvexShape::getPoint(std::size_t index) const 65 | { 66 | return m_points[index]; 67 | } 68 | 69 | } // namespace sf 70 | -------------------------------------------------------------------------------- /SFML/src/SFML/Graphics/GLExtensions.txt: -------------------------------------------------------------------------------- 1 | // Created with: 2 | // lua LoadGen.lua 3 | 4 | SGIS_texture_edge_clamp 5 | EXT_texture_edge_clamp 6 | EXT_blend_minmax 7 | EXT_blend_subtract 8 | ARB_multitexture 9 | EXT_blend_func_separate 10 | ARB_vertex_buffer_object 11 | ARB_shading_language_100 12 | ARB_shader_objects 13 | ARB_vertex_shader 14 | ARB_fragment_shader 15 | ARB_texture_non_power_of_two 16 | EXT_blend_equation_separate 17 | EXT_texture_sRGB 18 | EXT_framebuffer_object 19 | EXT_packed_depth_stencil 20 | EXT_framebuffer_blit 21 | EXT_framebuffer_multisample 22 | ARB_copy_buffer 23 | ARB_geometry_shader4 24 | -------------------------------------------------------------------------------- /SFML/src/SFML/Graphics/RenderTextureImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | RenderTextureImpl::~RenderTextureImpl() 37 | { 38 | // Nothing to do 39 | } 40 | 41 | } // namespace priv 42 | 43 | } // namespace sf 44 | -------------------------------------------------------------------------------- /SFML/src/SFML/Graphics/TextureSaver.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | TextureSaver::TextureSaver() 37 | { 38 | glCheck(glGetIntegerv(GL_TEXTURE_BINDING_2D, &m_textureBinding)); 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | TextureSaver::~TextureSaver() 44 | { 45 | glCheck(glBindTexture(GL_TEXTURE_2D, m_textureBinding)); 46 | } 47 | 48 | } // namespace priv 49 | 50 | } // namespace sf 51 | -------------------------------------------------------------------------------- /SFML/src/SFML/Main/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(INCROOT ${PROJECT_SOURCE_DIR}/include/SFML/Main) 3 | set(SRCROOT ${PROJECT_SOURCE_DIR}/src/SFML/Main) 4 | 5 | # sources 6 | if(SFML_OS_WINDOWS) 7 | set(SRC ${SRC} ${SRCROOT}/MainWin32.cpp) 8 | elseif(SFML_OS_IOS) 9 | set(SRC ${SRC} ${SRCROOT}/MainiOS.mm) 10 | elseif(SFML_OS_ANDROID) 11 | set(SRC ${SRC} ${SRCROOT}/MainAndroid.cpp) 12 | else() 13 | return() 14 | endif() 15 | 16 | # define the sfml-main target 17 | sfml_add_library(sfml-main STATIC SOURCES ${SRC}) 18 | 19 | # overwrite sfml-main suffix for backward compatibility with FindSFML.cmake 20 | set_target_properties(sfml-main PROPERTIES 21 | DEBUG_POSTFIX -d 22 | RELEASE_POSTFIX "" 23 | MINSIZEREL_POSTFIX "" 24 | RELWITHDEBINFO_POSTFIX "") 25 | 26 | # because of a current limitation on Android (which prevents one library 27 | # from depending on shared libraries), we need a boostrap activity which 28 | # will load our shared libraries manually 29 | if(SFML_OS_ANDROID) 30 | sfml_add_library(sfml-activity SOURCES ${SRCROOT}/SFMLActivity.cpp) 31 | endif() 32 | -------------------------------------------------------------------------------- /SFML/src/SFML/Main/MainWin32.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // Copyright (C) 2013 Jonathan De Wachter (dewachter.jonathan@gmail.com) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | 27 | //////////////////////////////////////////////////////////// 28 | // Windows specific: we define the WinMain entry point, 29 | // so that developers can use the standard main function 30 | // even in a Win32 Application project, and thus keep a 31 | // portable code 32 | //////////////////////////////////////////////////////////// 33 | 34 | 35 | //////////////////////////////////////////////////////////// 36 | // Headers 37 | //////////////////////////////////////////////////////////// 38 | #include 39 | 40 | #ifdef SFML_SYSTEM_WINDOWS 41 | 42 | #include 43 | 44 | extern int main(int argc, char* argv[]); 45 | 46 | //////////////////////////////////////////////////////////// 47 | int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, INT) 48 | { 49 | return main(__argc, __argv); 50 | } 51 | 52 | #endif // SFML_SYSTEM_WINDOWS 53 | 54 | -------------------------------------------------------------------------------- /SFML/src/SFML/Network/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | set(INCROOT ${PROJECT_SOURCE_DIR}/include/SFML/Network) 3 | set(SRCROOT ${PROJECT_SOURCE_DIR}/src/SFML/Network) 4 | 5 | # all source files 6 | set(SRC 7 | ${INCROOT}/Export.hpp 8 | ${SRCROOT}/Ftp.cpp 9 | ${INCROOT}/Ftp.hpp 10 | ${SRCROOT}/Http.cpp 11 | ${INCROOT}/Http.hpp 12 | ${SRCROOT}/IpAddress.cpp 13 | ${INCROOT}/IpAddress.hpp 14 | ${SRCROOT}/Packet.cpp 15 | ${INCROOT}/Packet.hpp 16 | ${SRCROOT}/Socket.cpp 17 | ${INCROOT}/Socket.hpp 18 | ${SRCROOT}/SocketImpl.hpp 19 | ${INCROOT}/SocketHandle.hpp 20 | ${SRCROOT}/SocketSelector.cpp 21 | ${INCROOT}/SocketSelector.hpp 22 | ${SRCROOT}/TcpListener.cpp 23 | ${INCROOT}/TcpListener.hpp 24 | ${SRCROOT}/TcpSocket.cpp 25 | ${INCROOT}/TcpSocket.hpp 26 | ${SRCROOT}/UdpSocket.cpp 27 | ${INCROOT}/UdpSocket.hpp 28 | ) 29 | 30 | # add platform specific sources 31 | if(SFML_OS_WINDOWS) 32 | set(SRC 33 | ${SRC} 34 | ${SRCROOT}/Win32/SocketImpl.cpp 35 | ${SRCROOT}/Win32/SocketImpl.hpp 36 | ) 37 | else() 38 | set(SRC 39 | ${SRC} 40 | ${SRCROOT}/Unix/SocketImpl.cpp 41 | ${SRCROOT}/Unix/SocketImpl.hpp 42 | ) 43 | endif() 44 | 45 | source_group("" FILES ${SRC}) 46 | 47 | # define the sfml-network target 48 | sfml_add_library(sfml-network 49 | SOURCES ${SRC}) 50 | 51 | # setup dependencies 52 | target_link_libraries(sfml-network PUBLIC sfml-system) 53 | if(SFML_OS_WINDOWS) 54 | target_link_libraries(sfml-network PRIVATE ws2_32) 55 | endif() 56 | -------------------------------------------------------------------------------- /SFML/src/SFML/Network/SocketImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | #if defined(SFML_SYSTEM_WINDOWS) 32 | 33 | #include 34 | 35 | #else 36 | 37 | #include 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Android/Activity.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // Copyright (C) 2013 Jonathan De Wachter (dewachter.jonathan@gmail.com) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | 27 | //////////////////////////////////////////////////////////// 28 | // Headers 29 | //////////////////////////////////////////////////////////// 30 | #include 31 | #include 32 | 33 | #define LOGE(...) ((void)__android_log_print(ANDROID_LOG_INFO, "sfml-error", __VA_ARGS__)) 34 | 35 | LogcatStream::LogcatStream() : 36 | std::streambuf() 37 | { 38 | // Nothing to do 39 | } 40 | 41 | std::streambuf::int_type LogcatStream::overflow (std::streambuf::int_type c) 42 | { 43 | if (c == "\n"[0]) 44 | { 45 | m_message.push_back(c); 46 | LOGE("%s", m_message.c_str()); 47 | m_message.clear(); 48 | } 49 | 50 | m_message.push_back(c); 51 | 52 | return traits_type::not_eof(c); 53 | } 54 | 55 | namespace sf 56 | { 57 | namespace priv 58 | { 59 | ActivityStates* getActivity(ActivityStates* initializedStates, bool reset) 60 | { 61 | static ActivityStates* states = NULL; 62 | 63 | if (!states || reset) 64 | states = initializedStates; 65 | 66 | return states; 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Android/NativeActivity.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | namespace sf 32 | { 33 | //////////////////////////////////////////////////////////// 34 | ANativeActivity* getNativeActivity() 35 | { 36 | return priv::getActivity()->activity; 37 | } 38 | 39 | } // namespace sf 40 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Clock.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | #if defined(SFML_SYSTEM_WINDOWS) 31 | #include 32 | #else 33 | #include 34 | #endif 35 | 36 | 37 | namespace sf 38 | { 39 | //////////////////////////////////////////////////////////// 40 | Clock::Clock() : 41 | m_startTime(priv::ClockImpl::getCurrentTime()) 42 | { 43 | } 44 | 45 | 46 | //////////////////////////////////////////////////////////// 47 | Time Clock::getElapsedTime() const 48 | { 49 | return priv::ClockImpl::getCurrentTime() - m_startTime; 50 | } 51 | 52 | 53 | //////////////////////////////////////////////////////////// 54 | Time Clock::restart() 55 | { 56 | Time now = priv::ClockImpl::getCurrentTime(); 57 | Time elapsed = now - m_startTime; 58 | m_startTime = now; 59 | 60 | return elapsed; 61 | } 62 | 63 | } // namespace sf 64 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Lock.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | //////////////////////////////////////////////////////////// 35 | Lock::Lock(Mutex& mutex) : 36 | m_mutex(mutex) 37 | { 38 | m_mutex.lock(); 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | Lock::~Lock() 44 | { 45 | m_mutex.unlock(); 46 | } 47 | 48 | } // namespace sf 49 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Mutex.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | #if defined(SFML_SYSTEM_WINDOWS) 31 | #include 32 | #else 33 | #include 34 | #endif 35 | 36 | 37 | namespace sf 38 | { 39 | //////////////////////////////////////////////////////////// 40 | Mutex::Mutex() 41 | { 42 | m_mutexImpl = new priv::MutexImpl; 43 | } 44 | 45 | 46 | //////////////////////////////////////////////////////////// 47 | Mutex::~Mutex() 48 | { 49 | delete m_mutexImpl; 50 | } 51 | 52 | 53 | //////////////////////////////////////////////////////////// 54 | void Mutex::lock() 55 | { 56 | m_mutexImpl->lock(); 57 | } 58 | 59 | 60 | //////////////////////////////////////////////////////////// 61 | void Mutex::unlock() 62 | { 63 | m_mutexImpl->unlock(); 64 | } 65 | 66 | } // namespace sf 67 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Sleep.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | #if defined(SFML_SYSTEM_WINDOWS) 31 | #include 32 | #else 33 | #include 34 | #endif 35 | 36 | 37 | namespace sf 38 | { 39 | //////////////////////////////////////////////////////////// 40 | void sleep(Time duration) 41 | { 42 | if (duration >= Time::Zero) 43 | priv::sleepImpl(duration); 44 | } 45 | 46 | } // namespace sf 47 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/ThreadLocal.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | #if defined(SFML_SYSTEM_WINDOWS) 31 | #include 32 | #else 33 | #include 34 | #endif 35 | 36 | 37 | namespace sf 38 | { 39 | //////////////////////////////////////////////////////////// 40 | ThreadLocal::ThreadLocal(void* value) 41 | { 42 | m_impl = new priv::ThreadLocalImpl; 43 | setValue(value); 44 | } 45 | 46 | 47 | //////////////////////////////////////////////////////////// 48 | ThreadLocal::~ThreadLocal() 49 | { 50 | delete m_impl; 51 | } 52 | 53 | 54 | //////////////////////////////////////////////////////////// 55 | void ThreadLocal::setValue(void* value) 56 | { 57 | m_impl->setValue(value); 58 | } 59 | 60 | 61 | //////////////////////////////////////////////////////////// 62 | void* ThreadLocal::getValue() const 63 | { 64 | return m_impl->getValue(); 65 | } 66 | 67 | } // namespace sf 68 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Unix/ClockImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #if defined(SFML_SYSTEM_MACOS) || defined(SFML_SYSTEM_IOS) 30 | #include 31 | #else 32 | #include 33 | #endif 34 | 35 | 36 | namespace sf 37 | { 38 | namespace priv 39 | { 40 | //////////////////////////////////////////////////////////// 41 | Time ClockImpl::getCurrentTime() 42 | { 43 | #if defined(SFML_SYSTEM_MACOS) || defined(SFML_SYSTEM_IOS) 44 | 45 | // Mac OS X specific implementation (it doesn't support clock_gettime) 46 | static mach_timebase_info_data_t frequency = {0, 0}; 47 | if (frequency.denom == 0) 48 | mach_timebase_info(&frequency); 49 | Uint64 nanoseconds = mach_absolute_time() * frequency.numer / frequency.denom; 50 | return sf::microseconds(nanoseconds / 1000); 51 | 52 | #else 53 | 54 | // POSIX implementation 55 | timespec time; 56 | clock_gettime(CLOCK_MONOTONIC, &time); 57 | return sf::microseconds(static_cast(time.tv_sec) * 1000000 + time.tv_nsec / 1000); 58 | 59 | #endif 60 | } 61 | 62 | } // namespace priv 63 | 64 | } // namespace sf 65 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Unix/ClockImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_CLOCKIMPLUNIX_HPP 26 | #define SFML_CLOCKIMPLUNIX_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | namespace priv 38 | { 39 | //////////////////////////////////////////////////////////// 40 | /// \brief Unix implementation of sf::Clock 41 | /// 42 | //////////////////////////////////////////////////////////// 43 | class ClockImpl 44 | { 45 | public: 46 | 47 | //////////////////////////////////////////////////////////// 48 | /// \brief Get the current time 49 | /// 50 | /// \return Current time 51 | /// 52 | //////////////////////////////////////////////////////////// 53 | static Time getCurrentTime(); 54 | }; 55 | 56 | } // namespace priv 57 | 58 | } // namespace sf 59 | 60 | 61 | #endif // SFML_CLOCKIMPLUNIX_HPP 62 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Unix/MutexImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | MutexImpl::MutexImpl() 37 | { 38 | // Make it recursive to follow the expected behavior 39 | pthread_mutexattr_t attributes; 40 | pthread_mutexattr_init(&attributes); 41 | pthread_mutexattr_settype(&attributes, PTHREAD_MUTEX_RECURSIVE); 42 | 43 | pthread_mutex_init(&m_mutex, &attributes); 44 | } 45 | 46 | 47 | //////////////////////////////////////////////////////////// 48 | MutexImpl::~MutexImpl() 49 | { 50 | pthread_mutex_destroy(&m_mutex); 51 | } 52 | 53 | 54 | //////////////////////////////////////////////////////////// 55 | void MutexImpl::lock() 56 | { 57 | pthread_mutex_lock(&m_mutex); 58 | } 59 | 60 | 61 | //////////////////////////////////////////////////////////// 62 | void MutexImpl::unlock() 63 | { 64 | pthread_mutex_unlock(&m_mutex); 65 | } 66 | 67 | } // namespace priv 68 | 69 | } // namespace sf 70 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Unix/SleepImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | #include 31 | 32 | 33 | namespace sf 34 | { 35 | namespace priv 36 | { 37 | //////////////////////////////////////////////////////////// 38 | void sleepImpl(Time time) 39 | { 40 | Uint64 usecs = time.asMicroseconds(); 41 | 42 | // Construct the time to wait 43 | timespec ti; 44 | ti.tv_nsec = (usecs % 1000000) * 1000; 45 | ti.tv_sec = usecs / 1000000; 46 | 47 | // Wait... 48 | // If nanosleep returns -1, we check errno. If it is EINTR 49 | // nanosleep was interrupted and has set ti to the remaining 50 | // duration. We continue sleeping until the complete duration 51 | // has passed. We stop sleeping if it was due to an error. 52 | while ((nanosleep(&ti, &ti) == -1) && (errno == EINTR)) 53 | { 54 | } 55 | } 56 | 57 | } // namespace priv 58 | 59 | } // namespace sf 60 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Unix/SleepImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SLEEPIMPLUNIX_HPP 26 | #define SFML_SLEEPIMPLUNIX_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | namespace priv 38 | { 39 | //////////////////////////////////////////////////////////// 40 | /// \brief Unix implementation of sf::Sleep 41 | /// 42 | /// \param time Time to sleep 43 | /// 44 | //////////////////////////////////////////////////////////// 45 | void sleepImpl(Time time); 46 | 47 | } // namespace priv 48 | 49 | } // namespace sf 50 | 51 | 52 | #endif // SFML_SLEEPIMPLUNIX_HPP 53 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Unix/ThreadLocalImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | ThreadLocalImpl::ThreadLocalImpl() : 37 | m_key(0) 38 | { 39 | pthread_key_create(&m_key, NULL); 40 | } 41 | 42 | 43 | //////////////////////////////////////////////////////////// 44 | ThreadLocalImpl::~ThreadLocalImpl() 45 | { 46 | pthread_key_delete(m_key); 47 | } 48 | 49 | 50 | //////////////////////////////////////////////////////////// 51 | void ThreadLocalImpl::setValue(void* value) 52 | { 53 | pthread_setspecific(m_key, value); 54 | } 55 | 56 | 57 | //////////////////////////////////////////////////////////// 58 | void* ThreadLocalImpl::getValue() const 59 | { 60 | return pthread_getspecific(m_key); 61 | } 62 | 63 | } // namespace priv 64 | 65 | } // namespace sf 66 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Win32/ClockImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_CLOCKIMPLWIN32_HPP 26 | #define SFML_CLOCKIMPLWIN32_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | namespace priv 38 | { 39 | //////////////////////////////////////////////////////////// 40 | /// \brief Windows implementation of sf::Clock 41 | /// 42 | //////////////////////////////////////////////////////////// 43 | class ClockImpl 44 | { 45 | public: 46 | 47 | //////////////////////////////////////////////////////////// 48 | /// \brief Get the current time 49 | /// 50 | /// \return Current time 51 | /// 52 | //////////////////////////////////////////////////////////// 53 | static Time getCurrentTime(); 54 | }; 55 | 56 | } // namespace priv 57 | 58 | } // namespace sf 59 | 60 | 61 | #endif // SFML_CLOCKIMPLWIN32_HPP 62 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Win32/MutexImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | MutexImpl::MutexImpl() 37 | { 38 | InitializeCriticalSection(&m_mutex); 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | MutexImpl::~MutexImpl() 44 | { 45 | DeleteCriticalSection(&m_mutex); 46 | } 47 | 48 | 49 | //////////////////////////////////////////////////////////// 50 | void MutexImpl::lock() 51 | { 52 | EnterCriticalSection(&m_mutex); 53 | } 54 | 55 | 56 | //////////////////////////////////////////////////////////// 57 | void MutexImpl::unlock() 58 | { 59 | LeaveCriticalSection(&m_mutex); 60 | } 61 | 62 | } // namespace priv 63 | 64 | } // namespace sf 65 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Win32/SleepImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | namespace priv 35 | { 36 | //////////////////////////////////////////////////////////// 37 | void sleepImpl(Time time) 38 | { 39 | // Get the supported timer resolutions on this system 40 | TIMECAPS tc; 41 | timeGetDevCaps(&tc, sizeof(TIMECAPS)); 42 | 43 | // Set the timer resolution to the minimum for the Sleep call 44 | timeBeginPeriod(tc.wPeriodMin); 45 | 46 | // Wait... 47 | ::Sleep(time.asMilliseconds()); 48 | 49 | // Reset the timer resolution back to the system default 50 | timeEndPeriod(tc.wPeriodMin); 51 | } 52 | 53 | } // namespace priv 54 | 55 | } // namespace sf 56 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Win32/SleepImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SLEEPIMPLWIN32_HPP 26 | #define SFML_SLEEPIMPLWIN32_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | namespace sf 36 | { 37 | namespace priv 38 | { 39 | //////////////////////////////////////////////////////////// 40 | /// \brief Windows implementation of sf::Sleep 41 | /// 42 | /// \param time Time to sleep 43 | /// 44 | //////////////////////////////////////////////////////////// 45 | void sleepImpl(Time time); 46 | 47 | } // namespace priv 48 | 49 | } // namespace sf 50 | 51 | 52 | #endif // SFML_SLEEPIMPLWIN32_HPP 53 | -------------------------------------------------------------------------------- /SFML/src/SFML/System/Win32/ThreadLocalImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | namespace sf 32 | { 33 | namespace priv 34 | { 35 | //////////////////////////////////////////////////////////// 36 | ThreadLocalImpl::ThreadLocalImpl() 37 | { 38 | m_index = TlsAlloc(); 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | ThreadLocalImpl::~ThreadLocalImpl() 44 | { 45 | TlsFree(m_index); 46 | } 47 | 48 | 49 | //////////////////////////////////////////////////////////// 50 | void ThreadLocalImpl::setValue(void* value) 51 | { 52 | TlsSetValue(m_index, value); 53 | } 54 | 55 | 56 | //////////////////////////////////////////////////////////// 57 | void* ThreadLocalImpl::getValue() const 58 | { 59 | return TlsGetValue(m_index); 60 | } 61 | 62 | } // namespace priv 63 | 64 | } // namespace sf 65 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/Android/ClipboardImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | namespace priv 35 | { 36 | //////////////////////////////////////////////////////////// 37 | String ClipboardImpl::getString() 38 | { 39 | sf::err() << "Clipboard API not implemented for Android.\n"; 40 | return String(); 41 | } 42 | 43 | 44 | //////////////////////////////////////////////////////////// 45 | void ClipboardImpl::setString(const String& text) 46 | { 47 | sf::err() << "Clipboard API not implemented for Android.\n"; 48 | } 49 | 50 | } // namespace priv 51 | 52 | } // namespace sf 53 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/Android/CursorImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | namespace sf 31 | { 32 | namespace priv 33 | { 34 | 35 | //////////////////////////////////////////////////////////// 36 | CursorImpl::CursorImpl() 37 | { 38 | // Nothing. 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | CursorImpl::~CursorImpl() 44 | { 45 | // Nothing. 46 | } 47 | 48 | 49 | //////////////////////////////////////////////////////////// 50 | bool CursorImpl::loadFromPixels(const Uint8* pixels, Vector2u size, Vector2u hotspot) 51 | { 52 | // Not supported 53 | return false; 54 | } 55 | 56 | 57 | //////////////////////////////////////////////////////////// 58 | bool CursorImpl::loadFromSystem(Cursor::Type type) 59 | { 60 | // Not supported 61 | return false; 62 | } 63 | 64 | 65 | } // namespace priv 66 | 67 | } // namespace sf 68 | 69 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/Android/VideoModeImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2013 Jonathan De Wachter (dewachter.jonathan@gmail.com) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | namespace sf 35 | { 36 | namespace priv 37 | { 38 | //////////////////////////////////////////////////////////// 39 | std::vector VideoModeImpl::getFullscreenModes() 40 | { 41 | VideoMode desktop = getDesktopMode(); 42 | 43 | // Return both portrait and landscape resolutions 44 | std::vector modes; 45 | modes.push_back(desktop); 46 | modes.push_back(VideoMode(desktop.height, desktop.width, desktop.bitsPerPixel)); 47 | return modes; 48 | } 49 | 50 | 51 | //////////////////////////////////////////////////////////// 52 | VideoMode VideoModeImpl::getDesktopMode() 53 | { 54 | // Get the activity states 55 | priv::ActivityStates* states = priv::getActivity(NULL); 56 | Lock lock(states->mutex); 57 | 58 | return VideoMode(states->screenSize.x, states->screenSize.y); 59 | } 60 | 61 | } // namespace priv 62 | 63 | } // namespace sf 64 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/Clipboard.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | #include 31 | 32 | 33 | namespace sf 34 | { 35 | //////////////////////////////////////////////////////////// 36 | String Clipboard::getString() 37 | { 38 | return priv::ClipboardImpl::getString(); 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | void Clipboard::setString(const String& text) 44 | { 45 | return priv::ClipboardImpl::setString(text); 46 | } 47 | 48 | } // namespace sf 49 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/ClipboardImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_CLIPBOARDIMPL_HPP 26 | #define SFML_CLIPBOARDIMPL_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | #if defined(SFML_SYSTEM_WINDOWS) 34 | #include 35 | #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) 36 | #include 37 | #elif defined(SFML_SYSTEM_MACOS) 38 | #include 39 | #elif defined(SFML_SYSTEM_IOS) 40 | #include 41 | #elif defined(SFML_SYSTEM_ANDROID) 42 | #include 43 | #endif 44 | 45 | #endif // SFML_CLIPBOARDIMPL_HPP 46 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/Cursor.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | namespace sf 32 | { 33 | 34 | //////////////////////////////////////////////////////////// 35 | Cursor::Cursor() : 36 | m_impl(new priv::CursorImpl()) 37 | { 38 | // That's it 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | Cursor::~Cursor() 44 | { 45 | delete m_impl; 46 | } 47 | 48 | 49 | //////////////////////////////////////////////////////////// 50 | bool Cursor::loadFromPixels(const Uint8* pixels, Vector2u size, Vector2u hotspot) 51 | { 52 | if ((pixels == 0) || (size.x == 0) || (size.y == 0)) 53 | return false; 54 | else 55 | return m_impl->loadFromPixels(pixels, size, hotspot); 56 | } 57 | 58 | 59 | //////////////////////////////////////////////////////////// 60 | bool Cursor::loadFromSystem(Type type) 61 | { 62 | return m_impl->loadFromSystem(type); 63 | } 64 | 65 | 66 | //////////////////////////////////////////////////////////// 67 | const priv::CursorImpl& Cursor::getImpl() const 68 | { 69 | return *m_impl; 70 | } 71 | 72 | } // namespace sf 73 | 74 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/CursorImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_CURSORIMPL_HPP 26 | #define SFML_CURSORIMPL_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | #if defined(SFML_SYSTEM_WINDOWS) 34 | 35 | #include 36 | 37 | #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) 38 | 39 | #include 40 | 41 | #elif defined(SFML_SYSTEM_MACOS) 42 | 43 | #include 44 | 45 | #elif defined(SFML_SYSTEM_IOS) 46 | 47 | #include 48 | 49 | #elif defined(SFML_SYSTEM_ANDROID) 50 | 51 | #include 52 | 53 | #endif 54 | 55 | 56 | #endif // SFML_CURSORIMPL_HPP 57 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/GlResource.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | //////////////////////////////////////////////////////////// 35 | GlResource::GlResource() 36 | { 37 | priv::GlContext::initResource(); 38 | } 39 | 40 | 41 | //////////////////////////////////////////////////////////// 42 | GlResource::~GlResource() 43 | { 44 | priv::GlContext::cleanupResource(); 45 | } 46 | 47 | 48 | //////////////////////////////////////////////////////////// 49 | void GlResource::registerContextDestroyCallback(ContextDestroyCallback callback, void* arg) 50 | { 51 | priv::GlContext::registerContextDestroyCallback(callback, arg); 52 | } 53 | 54 | 55 | //////////////////////////////////////////////////////////// 56 | GlResource::TransientContextLock::TransientContextLock() 57 | { 58 | priv::GlContext::acquireTransientContext(); 59 | } 60 | 61 | 62 | //////////////////////////////////////////////////////////// 63 | GlResource::TransientContextLock::~TransientContextLock() 64 | { 65 | priv::GlContext::releaseTransientContext(); 66 | } 67 | 68 | } // namespace sf 69 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/InputImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_INPUTIMPL_HPP 26 | #define SFML_INPUTIMPL_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | 33 | #if defined(SFML_SYSTEM_WINDOWS) 34 | #include 35 | #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) 36 | #include 37 | #elif defined(SFML_SYSTEM_MACOS) 38 | #include 39 | #elif defined(SFML_SYSTEM_IOS) 40 | #include 41 | #elif defined(SFML_SYSTEM_ANDROID) 42 | #include 43 | #endif 44 | 45 | 46 | #endif // SFML_INPUTIMPL_HPP 47 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/Keyboard.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | //////////////////////////////////////////////////////////// 35 | bool Keyboard::isKeyPressed(Key key) 36 | { 37 | return priv::InputImpl::isKeyPressed(key); 38 | } 39 | 40 | 41 | //////////////////////////////////////////////////////////// 42 | void Keyboard::setVirtualKeyboardVisible(bool visible) 43 | { 44 | priv::InputImpl::setVirtualKeyboardVisible(visible); 45 | } 46 | 47 | } // namespace sf 48 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/OSX/AutoreleasePoolWrapper.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | /// \brief Ensure one autorelease pool is available on this thread 28 | /// 29 | //////////////////////////////////////////////////////////// 30 | void ensureThreadHasPool(void); 31 | 32 | 33 | //////////////////////////////////////////////////////////// 34 | /// \brief Drain the thread's pool but keep it alive 35 | /// 36 | //////////////////////////////////////////////////////////// 37 | void drainThreadPool(void); 38 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/OSX/NSImage+raw.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #include 30 | 31 | #import 32 | 33 | //////////////////////////////////////////////////////////// 34 | /// Extends NSImage with a convenience method to load images 35 | /// from raw data. 36 | /// 37 | //////////////////////////////////////////////////////////// 38 | 39 | @interface NSImage (raw) 40 | 41 | //////////////////////////////////////////////////////////// 42 | /// \brief Load an image from raw RGBA pixels 43 | /// 44 | /// \param pixels array of 4 * `size` bytes representing the image 45 | /// \param size size of the image 46 | /// 47 | /// \return an instance of NSImage that needs to be released by the caller 48 | /// 49 | //////////////////////////////////////////////////////////// 50 | +(NSImage*)imageWithRawData:(const sf::Uint8*)pixels andSize:(NSSize)size; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/OSX/SFApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #import 30 | #import 31 | 32 | 33 | //////////////////////////////////////////////////////////// 34 | /// \brief Process some application specific events 35 | /// 36 | //////////////////////////////////////////////////////////// 37 | @interface SFApplicationDelegate : NSObject 38 | 39 | //////////////////////////////////////////////////////////// 40 | /// \brief React to a termination notification 41 | /// 42 | /// Send a close message to all windows and cancel the termination. 43 | /// 44 | //////////////////////////////////////////////////////////// 45 | -(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender; 46 | 47 | //////////////////////////////////////////////////////////// 48 | /// \brief Exit the app when all windows are closed 49 | /// 50 | //////////////////////////////////////////////////////////// 51 | -(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication; 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/OSX/SFApplicationDelegate.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #import 30 | 31 | //////////////////////////////////////////////////////////// 32 | @implementation SFApplicationDelegate 33 | 34 | 35 | //////////////////////////////////////////////////////////// 36 | -(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)sender 37 | { 38 | (void)sender; 39 | // Generate close event for each SFML window 40 | [NSApp makeWindowsPerform:@selector(sfClose) inOrder:NO]; 41 | return NSTerminateCancel; 42 | } 43 | 44 | 45 | //////////////////////////////////////////////////////////// 46 | -(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication 47 | { 48 | (void)theApplication; 49 | return YES; 50 | } 51 | 52 | 53 | @end 54 | 55 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/OSX/SFSilentResponder.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #import 30 | 31 | //////////////////////////////////////////////////////////// 32 | /// \brief Silent Responder used to prevent sound alert with key event 33 | /// 34 | /// Mainly used by SFOpenGLView and its hidden text view. 35 | /// 36 | //////////////////////////////////////////////////////////// 37 | @interface SFSilentResponder : NSResponder 38 | 39 | -(void)doCommandBySelector:(SEL)sel; 40 | 41 | @end 42 | 43 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/OSX/SFSilentResponder.m: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #import 30 | 31 | @implementation SFSilentResponder 32 | 33 | -(void)doCommandBySelector:(SEL)sel 34 | { 35 | // Just do nothing, to prevent sound alerts 36 | (void)sel; 37 | } 38 | 39 | @end 40 | 41 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/OSX/cpp_objc_conversion.h: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Marco Antognini (antognini.marco@gmail.com), 5 | // Laurent Gomila (laurent@sfml-dev.org) 6 | // 7 | // This software is provided 'as-is', without any express or implied warranty. 8 | // In no event will the authors be held liable for any damages arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it freely, 12 | // subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; 15 | // you must not claim that you wrote the original software. 16 | // If you use this software in a product, an acknowledgment 17 | // in the product documentation would be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, 20 | // and must not be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source distribution. 23 | // 24 | //////////////////////////////////////////////////////////// 25 | 26 | //////////////////////////////////////////////////////////// 27 | // Headers 28 | //////////////////////////////////////////////////////////// 29 | #include 30 | #include 31 | 32 | #import 33 | 34 | //////////////////////////////////////////////////////////// 35 | /// \brief Returns a NSString construct with +stringWithCString:encoding: 36 | /// 37 | //////////////////////////////////////////////////////////// 38 | NSString* stringToNSString(const std::string& string); 39 | 40 | //////////////////////////////////////////////////////////// 41 | /// \brief Returns a NSString construct with +stringWithCString:encoding: 42 | /// 43 | //////////////////////////////////////////////////////////// 44 | NSString* sfStringToNSString(const sf::String& string); 45 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/Sensor.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | 35 | //////////////////////////////////////////////////////////// 36 | bool Sensor::isAvailable(Type sensor) 37 | { 38 | return priv::SensorManager::getInstance().isAvailable(sensor); 39 | } 40 | 41 | //////////////////////////////////////////////////////////// 42 | void Sensor::setEnabled(Type sensor, bool enabled) 43 | { 44 | return priv::SensorManager::getInstance().setEnabled(sensor, enabled); 45 | } 46 | 47 | //////////////////////////////////////////////////////////// 48 | Vector3f Sensor::getValue(Type sensor) 49 | { 50 | return priv::SensorManager::getInstance().getValue(sensor); 51 | } 52 | 53 | } // namespace sf 54 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/SensorImpl.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SENSORIMPL_HPP 26 | #define SFML_SENSORIMPL_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | #if defined(SFML_SYSTEM_WINDOWS) 35 | 36 | #include 37 | 38 | #elif defined(SFML_SYSTEM_LINUX) || defined(SFML_SYSTEM_FREEBSD) || defined(SFML_SYSTEM_OPENBSD) 39 | 40 | #include 41 | 42 | #elif defined(SFML_SYSTEM_MACOS) 43 | 44 | #include 45 | 46 | #elif defined(SFML_SYSTEM_IOS) 47 | 48 | #include 49 | 50 | #elif defined(SFML_SYSTEM_ANDROID) 51 | 52 | #include 53 | 54 | #endif 55 | 56 | 57 | #endif // SFML_SENSORIMPL_HPP 58 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/Touch.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | 31 | 32 | namespace sf 33 | { 34 | //////////////////////////////////////////////////////////// 35 | bool Touch::isDown(unsigned int finger) 36 | { 37 | return priv::InputImpl::isTouchDown(finger); 38 | } 39 | 40 | 41 | //////////////////////////////////////////////////////////// 42 | Vector2i Touch::getPosition(unsigned int finger) 43 | { 44 | return priv::InputImpl::getTouchPosition(finger); 45 | } 46 | 47 | 48 | //////////////////////////////////////////////////////////// 49 | Vector2i Touch::getPosition(unsigned int finger, const Window& relativeTo) 50 | { 51 | return priv::InputImpl::getTouchPosition(finger, relativeTo); 52 | } 53 | 54 | } // namespace sf 55 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/Unix/GlxExtensions.txt: -------------------------------------------------------------------------------- 1 | // Created with: 2 | // https://bitbucket.org/KhronosGroup/glloadgen 3 | // Commit d143d66ac90d538ed06f806188714861b8e8e2f9 4 | // lua LoadGen.lua -style=pointer_c -spec=glX -indent=space -prefix=sf -extfile=GlxExtensions.txt GlxExtensions 5 | 6 | EXT_swap_control 7 | // MESA_swap_control 8 | SGI_swap_control 9 | EXT_framebuffer_sRGB 10 | ARB_framebuffer_sRGB 11 | GLX_ARB_multisample 12 | GLX_SGIX_pbuffer 13 | GLX_ARB_create_context 14 | GLX_ARB_create_context_profile 15 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/Win32/WglExtensions.txt: -------------------------------------------------------------------------------- 1 | // Created with: 2 | // https://bitbucket.org/KhronosGroup/glloadgen 3 | // Commit d143d66ac90d538ed06f806188714861b8e8e2f9 4 | // lua LoadGen.lua -style=pointer_c -spec=wgl -indent=space -prefix=sf -extfile=WglExtensions.txt WglExtensions 5 | 6 | EXT_swap_control 7 | EXT_framebuffer_sRGB 8 | ARB_framebuffer_sRGB 9 | WGL_ARB_multisample 10 | WGL_ARB_pixel_format 11 | WGL_ARB_pbuffer 12 | WGL_ARB_create_context 13 | WGL_ARB_create_context_profile 14 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/iOS/CursorImpl.cpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | namespace sf 31 | { 32 | namespace priv 33 | { 34 | 35 | //////////////////////////////////////////////////////////// 36 | CursorImpl::CursorImpl() 37 | { 38 | // Nothing. 39 | } 40 | 41 | 42 | //////////////////////////////////////////////////////////// 43 | CursorImpl::~CursorImpl() 44 | { 45 | // Nothing. 46 | } 47 | 48 | 49 | //////////////////////////////////////////////////////////// 50 | bool CursorImpl::loadFromPixels(const Uint8* pixels, Vector2u size, Vector2u hotspot) 51 | { 52 | // Not supported 53 | return false; 54 | } 55 | 56 | 57 | //////////////////////////////////////////////////////////// 58 | bool CursorImpl::loadFromSystem(Cursor::Type type) 59 | { 60 | // Not supported 61 | return false; 62 | } 63 | 64 | 65 | } // namespace priv 66 | 67 | } // namespace sf 68 | 69 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/iOS/ObjCType.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_OBJCTYPE_HPP 26 | #define SFML_OBJCTYPE_HPP 27 | 28 | 29 | // Forward declare an Objective-C class 30 | #ifdef __OBJC__ 31 | #define SFML_DECLARE_OBJC_CLASS(c) @class c 32 | #else 33 | #define SFML_DECLARE_OBJC_CLASS(c) typedef struct objc_object c 34 | #endif 35 | 36 | 37 | #endif // SFML_OBJCTYPE_HPP 38 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/iOS/SFMain.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SFMAIN_HPP 26 | #define SFML_SFMAIN_HPP 27 | 28 | 29 | int sfmlMain(int argc, char** argv); 30 | 31 | int sfmlMain(); 32 | 33 | 34 | #endif // SFML_SFMAIN_HPP 35 | 36 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/iOS/SFMain.mm: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | // sfmlMain is called by the application delegate (SFAppDelegate). 32 | // 33 | // Since we don't know which prototype of main the user 34 | // defines, we declare both versions of sfmlMain, but with 35 | // the 'weak' attribute (GCC extension) so that the 36 | // user-declared one will replace SFML's one at linking stage. 37 | // 38 | // If user defines main(argc, argv) then it will be called 39 | // directly, if he defines main() then it will be called by 40 | // our placeholder. 41 | // 42 | // The sfmlMain() version is never called, it is just defined 43 | // to avoid a linker error if the user directly defines the 44 | // version with arguments. 45 | // 46 | // See the sfml-main module for the other half of this 47 | // initialization trick. 48 | 49 | 50 | //////////////////////////////////////////////////////////// 51 | __attribute__((weak)) int sfmlMain(int, char**) 52 | { 53 | return sfmlMain(); 54 | } 55 | 56 | 57 | //////////////////////////////////////////////////////////// 58 | __attribute__((weak)) int sfmlMain() 59 | { 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/iOS/SFView.hpp: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | #ifndef SFML_SFVIEW_HPP 26 | #define SFML_SFVIEW_HPP 27 | 28 | //////////////////////////////////////////////////////////// 29 | // Headers 30 | //////////////////////////////////////////////////////////// 31 | #include 32 | #include 33 | 34 | 35 | //////////////////////////////////////////////////////////// 36 | /// \brief Our custom implementation of the window's view 37 | /// (supports OpenGL and reports events) 38 | /// 39 | //////////////////////////////////////////////////////////// 40 | @interface SFView : UIView 41 | 42 | //////////////////////////////////////////////////////////// 43 | /// \brief Construct the view with its initial size 44 | /// 45 | /// \param frame Dimensions of the view 46 | /// 47 | /// \return Id of the view 48 | /// 49 | //////////////////////////////////////////////////////////// 50 | - (id)initWithFrame:(CGRect)frame andContentScaleFactor:(CGFloat)factor; 51 | 52 | //////////////////////////////////////////////////////////// 53 | // Member data 54 | //////////////////////////////////////////////////////////// 55 | @property (nonatomic) sf::priv::EaglContext* context; ///< The attached EAGL context 56 | 57 | @end 58 | 59 | #endif // SFML_SFVIEW_HPP 60 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/iOS/SFViewController.mm: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | 30 | 31 | @implementation SFViewController 32 | 33 | @synthesize orientationCanChange; 34 | 35 | 36 | //////////////////////////////////////////////////////////// 37 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 38 | { 39 | return self.orientationCanChange; 40 | } 41 | 42 | 43 | //////////////////////////////////////////////////////////// 44 | - (BOOL)shouldAutorotate 45 | { 46 | return self.orientationCanChange; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /SFML/src/SFML/Window/iOS/VideoModeImpl.mm: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////// 2 | // 3 | // SFML - Simple and Fast Multimedia Library 4 | // Copyright (C) 2007-2018 Laurent Gomila (laurent@sfml-dev.org) 5 | // 6 | // This software is provided 'as-is', without any express or implied warranty. 7 | // In no event will the authors be held liable for any damages arising from the use of this software. 8 | // 9 | // Permission is granted to anyone to use this software for any purpose, 10 | // including commercial applications, and to alter it and redistribute it freely, 11 | // subject to the following restrictions: 12 | // 13 | // 1. The origin of this software must not be misrepresented; 14 | // you must not claim that you wrote the original software. 15 | // If you use this software in a product, an acknowledgment 16 | // in the product documentation would be appreciated but is not required. 17 | // 18 | // 2. Altered source versions must be plainly marked as such, 19 | // and must not be misrepresented as being the original software. 20 | // 21 | // 3. This notice may not be removed or altered from any source distribution. 22 | // 23 | //////////////////////////////////////////////////////////// 24 | 25 | //////////////////////////////////////////////////////////// 26 | // Headers 27 | //////////////////////////////////////////////////////////// 28 | #include 29 | #include 30 | #include 31 | 32 | namespace sf 33 | { 34 | namespace priv 35 | { 36 | //////////////////////////////////////////////////////////// 37 | std::vector VideoModeImpl::getFullscreenModes() 38 | { 39 | VideoMode desktop = getDesktopMode(); 40 | 41 | // Return both portrait and landscape resolutions 42 | std::vector modes; 43 | modes.push_back(desktop); 44 | modes.push_back(VideoMode(desktop.height, desktop.width, desktop.bitsPerPixel)); 45 | return modes; 46 | } 47 | 48 | 49 | //////////////////////////////////////////////////////////// 50 | VideoMode VideoModeImpl::getDesktopMode() 51 | { 52 | CGRect bounds = [[UIScreen mainScreen] bounds]; 53 | float backingScale = [SFAppDelegate getInstance].backingScaleFactor; 54 | return VideoMode(bounds.size.width * backingScale, bounds.size.height * backingScale); 55 | } 56 | 57 | } // namespace priv 58 | 59 | } // namespace sf 60 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_C.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_C.bin -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_CXX.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/cmake-build-debug/CMakeFiles/3.14.5/CMakeDetermineCompilerABI_CXX.bin -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.14.5/CMakeSystem.cmake: -------------------------------------------------------------------------------- 1 | set(CMAKE_HOST_SYSTEM "Darwin-18.7.0") 2 | set(CMAKE_HOST_SYSTEM_NAME "Darwin") 3 | set(CMAKE_HOST_SYSTEM_VERSION "18.7.0") 4 | set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") 5 | 6 | 7 | 8 | set(CMAKE_SYSTEM "Darwin-18.7.0") 9 | set(CMAKE_SYSTEM_NAME "Darwin") 10 | set(CMAKE_SYSTEM_VERSION "18.7.0") 11 | set(CMAKE_SYSTEM_PROCESSOR "x86_64") 12 | 13 | set(CMAKE_CROSSCOMPILING "FALSE") 14 | 15 | set(CMAKE_SYSTEM_LOADED 1) 16 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.14.5/CompilerIdC/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/cmake-build-debug/CMakeFiles/3.14.5/CompilerIdC/a.out -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/3.14.5/CompilerIdCXX/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/cmake-build-debug/CMakeFiles/3.14.5/CompilerIdCXX/a.out -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/CMakeDirectoryInformation.cmake: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14 3 | 4 | # Relative path conversion top directories. 5 | set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics") 6 | set(CMAKE_RELATIVE_PATH_TOP_BINARY "/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/cmake-build-debug") 7 | 8 | # Force unix paths in dependencies. 9 | set(CMAKE_FORCE_UNIX_PATHS 1) 10 | 11 | 12 | # The C and CXX include file regular expressions for this directory. 13 | set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") 14 | set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") 15 | set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) 16 | set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) 17 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/TargetDirectories.txt: -------------------------------------------------------------------------------- 1 | /Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/cmake-build-debug/CMakeFiles/rebuild_cache.dir 2 | /Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/cmake-build-debug/CMakeFiles/edit_cache.dir 3 | /Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir 4 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/clion-environment.txt: -------------------------------------------------------------------------------- 1 | ToolSet: 1.0 (local)Options: 2 | 3 | Options: -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/clion-log.txt: -------------------------------------------------------------------------------- 1 | /Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics 2 | -- Found SFML 2.5.1 in /usr/local/include 3 | -- Configuring done 4 | -- Generating done 5 | -- Build files have been written to: /Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/cmake-build-debug 6 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/cmake.check_cache: -------------------------------------------------------------------------------- 1 | # This file is generated by cmake for dependency checking of the CMakeCache.txt file 2 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/feature_tests.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/cmake-build-debug/CMakeFiles/feature_tests.bin -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/feature_tests.c: -------------------------------------------------------------------------------- 1 | 2 | const char features[] = {"\n" 3 | "C_FEATURE:" 4 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 5 | "1" 6 | #else 7 | "0" 8 | #endif 9 | "c_function_prototypes\n" 10 | "C_FEATURE:" 11 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 12 | "1" 13 | #else 14 | "0" 15 | #endif 16 | "c_restrict\n" 17 | "C_FEATURE:" 18 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L 19 | "1" 20 | #else 21 | "0" 22 | #endif 23 | "c_static_assert\n" 24 | "C_FEATURE:" 25 | #if ((__clang_major__ * 100) + __clang_minor__) >= 400 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 26 | "1" 27 | #else 28 | "0" 29 | #endif 30 | "c_variadic_macros\n" 31 | 32 | }; 33 | 34 | int main(int argc, char** argv) { (void)argv; return features[argc]; } 35 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/progress.marks: -------------------------------------------------------------------------------- 1 | 3 2 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/src/Pendulum.cpp" "/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/src/Pendulum.cpp.o" 8 | "/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/src/main.cpp" "/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/src/main.cpp.o" 9 | ) 10 | set(CMAKE_CXX_COMPILER_ID "AppleClang") 11 | 12 | # The include file search paths: 13 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 14 | "../src" 15 | "../SFML/include" 16 | ) 17 | 18 | # Targets to which this target links. 19 | set(CMAKE_TARGET_LINKED_INFO_FILES 20 | ) 21 | 22 | # Fortran module output directory. 23 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 24 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/sfml_pendulumPhysics.dir/src/main.cpp.o" 3 | "CMakeFiles/sfml_pendulumPhysics.dir/src/Pendulum.cpp.o" 4 | "sfml_pendulumPhysics.pdb" 5 | "sfml_pendulumPhysics" 6 | ) 7 | 8 | # Per-language clean rules from dependency scanning. 9 | foreach(lang CXX) 10 | include(CMakeFiles/sfml_pendulumPhysics.dir/cmake_clean_${lang}.cmake OPTIONAL) 11 | endforeach() 12 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14 3 | 4 | # compile CXX with /Library/Developer/CommandLineTools/usr/bin/c++ 5 | CXX_FLAGS = -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -std=gnu++14 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/src -I/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/SFML/include 10 | 11 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/link.txt: -------------------------------------------------------------------------------- 1 | /Library/Developer/CommandLineTools/usr/bin/c++ -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/sfml_pendulumPhysics.dir/src/main.cpp.o CMakeFiles/sfml_pendulumPhysics.dir/src/Pendulum.cpp.o -o sfml_pendulumPhysics /usr/local/lib/libsfml-network.dylib /usr/local/lib/libsfml-audio.dylib /usr/local/lib/libsfml-graphics.dylib /usr/local/lib/libsfml-window.dylib /usr/local/lib/libsfml-system.dylib 2 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | CMAKE_PROGRESS_3 = 3 4 | 5 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/src/Pendulum.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/src/Pendulum.cpp.o -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/src/main.cpp.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/cmake-build-debug/CMakeFiles/sfml_pendulumPhysics.dir/src/main.cpp.o -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfmltest.dir/DependInfo.cmake: -------------------------------------------------------------------------------- 1 | # The set of languages for which implicit dependencies are needed: 2 | set(CMAKE_DEPENDS_LANGUAGES 3 | "CXX" 4 | ) 5 | # The set of files for implicit dependencies of each language: 6 | set(CMAKE_DEPENDS_CHECK_CXX 7 | "/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/main.cpp" "/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/cmake-build-debug/CMakeFiles/sfmltest.dir/main.cpp.o" 8 | ) 9 | set(CMAKE_CXX_COMPILER_ID "AppleClang") 10 | 11 | # The include file search paths: 12 | set(CMAKE_CXX_TARGET_INCLUDE_PATH 13 | "../SFML/include" 14 | ) 15 | 16 | # Targets to which this target links. 17 | set(CMAKE_TARGET_LINKED_INFO_FILES 18 | ) 19 | 20 | # Fortran module output directory. 21 | set(CMAKE_Fortran_TARGET_MODULE_DIR "") 22 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfmltest.dir/cmake_clean.cmake: -------------------------------------------------------------------------------- 1 | file(REMOVE_RECURSE 2 | "CMakeFiles/sfmltest.dir/main.cpp.o" 3 | "sfmltest.pdb" 4 | "sfmltest" 5 | ) 6 | 7 | # Per-language clean rules from dependency scanning. 8 | foreach(lang CXX) 9 | include(CMakeFiles/sfmltest.dir/cmake_clean_${lang}.cmake OPTIONAL) 10 | endforeach() 11 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfmltest.dir/depend.make: -------------------------------------------------------------------------------- 1 | # Empty dependencies file for sfmltest. 2 | # This may be replaced when dependencies are built. 3 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfmltest.dir/flags.make: -------------------------------------------------------------------------------- 1 | # CMAKE generated file: DO NOT EDIT! 2 | # Generated by "Unix Makefiles" Generator, CMake Version 3.14 3 | 4 | # compile CXX with /Library/Developer/CommandLineTools/usr/bin/c++ 5 | CXX_FLAGS = -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -std=gnu++14 6 | 7 | CXX_DEFINES = 8 | 9 | CXX_INCLUDES = -I/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/SFML/include 10 | 11 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfmltest.dir/link.txt: -------------------------------------------------------------------------------- 1 | /Library/Developer/CommandLineTools/usr/bin/c++ -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/sfmltest.dir/main.cpp.o -o sfmltest /usr/local/lib/libsfml-network.dylib /usr/local/lib/libsfml-audio.dylib /usr/local/lib/libsfml-graphics.dylib /usr/local/lib/libsfml-window.dylib /usr/local/lib/libsfml-system.dylib 2 | -------------------------------------------------------------------------------- /cmake-build-debug/CMakeFiles/sfmltest.dir/progress.make: -------------------------------------------------------------------------------- 1 | CMAKE_PROGRESS_1 = 1 2 | CMAKE_PROGRESS_2 = 2 3 | 4 | -------------------------------------------------------------------------------- /cmake-build-debug/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/cmake-build-debug/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /cmake-build-debug/cmake_install.cmake: -------------------------------------------------------------------------------- 1 | # Install script for directory: /Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics 2 | 3 | # Set the install prefix 4 | if(NOT DEFINED CMAKE_INSTALL_PREFIX) 5 | set(CMAKE_INSTALL_PREFIX "/usr/local") 6 | endif() 7 | string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") 8 | 9 | # Set the install configuration name. 10 | if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) 11 | if(BUILD_TYPE) 12 | string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" 13 | CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") 14 | else() 15 | set(CMAKE_INSTALL_CONFIG_NAME "Debug") 16 | endif() 17 | message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") 18 | endif() 19 | 20 | # Set the component getting installed. 21 | if(NOT CMAKE_INSTALL_COMPONENT) 22 | if(COMPONENT) 23 | message(STATUS "Install component: \"${COMPONENT}\"") 24 | set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") 25 | else() 26 | set(CMAKE_INSTALL_COMPONENT) 27 | endif() 28 | endif() 29 | 30 | # Is this installation the result of a crosscompile? 31 | if(NOT DEFINED CMAKE_CROSSCOMPILING) 32 | set(CMAKE_CROSSCOMPILING "FALSE") 33 | endif() 34 | 35 | if(CMAKE_INSTALL_COMPONENT) 36 | set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") 37 | else() 38 | set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") 39 | endif() 40 | 41 | string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT 42 | "${CMAKE_INSTALL_MANIFEST_FILES}") 43 | file(WRITE "/Users/lutrarutra/Documents/dev/sfml_projects/sfml_pendulumPhysics/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}" 44 | "${CMAKE_INSTALL_MANIFEST_CONTENT}") 45 | -------------------------------------------------------------------------------- /cmake-build-debug/sfml_pendulumPhysics: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/cmake-build-debug/sfml_pendulumPhysics -------------------------------------------------------------------------------- /cmake-build-debug/sfmltest: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/cmake-build-debug/sfmltest -------------------------------------------------------------------------------- /res/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lutrarutra/sfml_pendulumPhysics/4500f9d921c9db2d95f217e67627faed2c9898a8/res/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /src/Main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "Pendulum.h" 6 | 7 | #define PI 3.14159265 8 | #define LOG(x) std::cout << x << std::endl 9 | 10 | int main() 11 | { 12 | std::cout << "Hellooo" << std::endl; 13 | sf::ContextSettings settings; 14 | settings.antialiasingLevel = 8; 15 | 16 | sf::RenderWindow window(sf::VideoMode(1280, 720), "Double Pendulum", sf::Style::Close, settings); 17 | sf::Event event; 18 | 19 | Pendulum p1(100, 90, 220, window.getSize().x / 2, 175); 20 | Pendulum p2(100, 90, 220, &p1); 21 | 22 | //You could add more pendulums but I am not sure if this is correct in terms of physics... 23 | //Pendulum p3(100, 90, 220, &p2); 24 | 25 | sf::Clock clock; 26 | sf::Font font; 27 | 28 | if (!font.loadFromFile("OpenSans-Regular.ttf")) 29 | { 30 | LOG("Could not load font file.."); 31 | return 1; 32 | } 33 | sf::Text text; 34 | text.setFont(font); 35 | text.setCharacterSize(24); 36 | text.setFillColor(sf::Color::Black); 37 | 38 | std::vector line; 39 | sf::Vertex *lineArr; 40 | 41 | while (window.isOpen()) 42 | { 43 | while (window.pollEvent(event)) 44 | { 45 | if (event.type == sf::Event::Closed) 46 | window.close(); 47 | } 48 | 49 | //p3.update(); 50 | p2.update(); 51 | //p3.updatePos(clock.getElapsedTime().asSeconds() * 20); 52 | line.push_back(sf::Vertex(p2.updatePos(clock.getElapsedTime().asSeconds() * 20), sf::Color::Black)); 53 | p1.updatePos(clock.getElapsedTime().asSeconds() * 20); 54 | 55 | clock.restart(); 56 | lineArr = &line[0]; 57 | window.clear(sf::Color::White); 58 | 59 | window.draw(lineArr, line.size(), sf::Lines); 60 | p1.draw(window); 61 | p2.draw(window); 62 | //p3.draw(window); 63 | 64 | window.display(); 65 | } 66 | 67 | return 0; 68 | } 69 | -------------------------------------------------------------------------------- /src/Pendulum.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | class Pendulum 6 | { 7 | public: 8 | Pendulum(int m, float a0, int r, int x, int y); 9 | Pendulum(int m, float a0, int r, Pendulum *upperPendulum); 10 | ~Pendulum(); 11 | void update(); 12 | void draw(sf::RenderWindow &window); 13 | void attachPendulum(Pendulum *lowerPendulum); 14 | sf::Vector2f updatePos(float dt); 15 | private: 16 | void init(int m, float a0, int r); 17 | const float PI = 3.14159265358979f; 18 | const float G = 9.81; 19 | int getXPoint(); 20 | int getYPoint(); 21 | int mass, x, y, r; 22 | //va is angular acceleration and v is angular velocity. 23 | float va, v, a; 24 | 25 | Pendulum *upperPendulum = nullptr; 26 | Pendulum *lowerPendulum = nullptr; 27 | sf::CircleShape *body; 28 | sf::RectangleShape *arm; 29 | }; --------------------------------------------------------------------------------