Commit Graph

933 Commits

Author SHA1 Message Date
vittorioromeo
230c6a4d57 Simplify 'FontHandles' management 2023-04-19 16:32:49 +01:00
Chris Thrasher
82b9821a8a Add clang-tidy bugprone-* checks 2023-04-12 19:53:36 -06:00
Chris Thrasher
2c99b3343a Remove default sf::Text constructor 2023-04-05 09:54:56 -06:00
Chris Thrasher
f371a99b39 Implement sf::String in terms of std::u32string 2023-04-04 15:47:34 -06:00
Chris Thrasher
93a8506498 Let compiler generated special member functions 2023-04-04 15:47:34 -06:00
Chris Thrasher
14dbd3c899 Remove old workaround for MinGW's lack of unicode support
Dates back to 2009 when 78247bd38 was written. I'm going to assume
the situation has improved in the last 14 years. There are SFML
users who weren't even alive in 2009...
2023-04-03 21:23:43 -06:00
Chris Thrasher
06c5c50537 De-constexpr sf::String::InvalidPos
This fails to link on MinGW. Until that can be resolved we can go
back to a normal constant. Because this is just an integer it doesn't
matter all that much whether it's const or constexpr.
2023-04-03 21:23:43 -06:00
Chris Thrasher
92e5a1e4e6 Implement move semantics for sf::Cursor 2023-04-03 01:02:26 -06:00
Jim-Marsden
a8bc8cf889 Added move constructor, and move assignment operator. 2023-03-29 23:48:05 +02:00
binary1248
f4e0c4b4c0 Make moving Shapes, swapping Textures and swapping VertexBuffers noexcept. 2023-03-07 16:32:35 -07:00
metaquarx
474de4d16e Allow setting window icon with sf::Image 2023-02-21 15:48:33 -07:00
Vittorio Romeo
698b7ee49f Remove unused headers and reduce physical dependencies 2023-02-20 23:30:25 +01:00
Chris Thrasher
5bd3722598 Fix sf::Rect docs 2023-02-19 17:40:03 -07:00
Chris Thrasher
949d9f44e1
Simplify implementation of sf::Clock 2023-02-11 14:02:22 -07:00
tverrbjelke
7074849814 Fixes Typo in documentation of WindowBase
modified:   include/SFML/Window/WindowBase.hpp
2023-01-25 10:07:16 -07:00
Andreas Hüwel
8737bbe970 Fixses mostly unimportant typo in documentation of WindowBase
modified:   include/SFML/Window/WindowBase.hpp
2023-01-25 10:07:16 -07:00
Chris Thrasher
9f08d67dcc Convert scancodes into a scoped enumeration 2023-01-25 10:06:03 -07:00
Chris Thrasher
72cd8781bb Remove deprecated keycodes 2023-01-25 10:06:03 -07:00
Norm Evangelista
4c8b770992 Replaced anonymous enums with constexpr per #2328
Addressed review comments


Addressed review comments


Changed NOLINTBEGIN/END to NOLINTNEXTLINE


Addressed CI complaint


Fixed BSD CI issues
2023-01-24 16:15:16 -07:00
Chris Thrasher
8a307df494 Update copyright year 2023-01-24 08:46:30 +01:00
Norm Evangelista
9b1b0f5b07 Streamlined readability-* clang-tidy checks
Addressed CI complaints

Addressed review comments, CI issues

Reverted files exempted from linting

Fixed missing comma

Fixed clang-format escape

Disabled spurious readability-non-const-parameter

Addressed review comment

Moved NOLINT inside namespace per review

Remove const from function argument decls


Fixed rebase and formatting issues


Fixed macOS CI issues
2023-01-22 17:00:25 -07:00
Chris Thrasher
b48f4b70a7 Export StreamDeleter symbols
We're unsure why this is necessary but it satisfies a linker error
2023-01-22 15:50:53 -07:00
Chris Thrasher
dd83189fae Enable move semantics for SoundFile types
Funny how the addition of a forward declaration resulted in
accidentally disabling move semantics for two types. We ought to
be careful that build time improvements don't have runtime
performance impacts.
2023-01-22 15:50:53 -07:00
Chris Thrasher
6ea07b810c Let compiler implicitly delete copy operations
Because this class is implemented with unique pointers, copy semantics
are implicitly deleted. This can be verified by the type trait tests
which continue to affirm that these types are noncopyable.
2023-01-22 15:50:53 -07:00
Lukas Dürrenberger
d9f8df9ca0 Merge branch '2.6.x' into master 2023-01-21 10:17:18 +01:00
kimci86
752955c6f8 Rename Key::Tilde to Key::Grave 2023-01-20 16:32:59 +01:00
kimci86
914ae374ff Silence clang warnings about Scancode enumeration 2023-01-20 16:32:59 +01:00
kimci86
b354f7f7ee Scancode renaming leftover 2023-01-20 16:32:59 +01:00
Lukas Dürrenberger
5dbe85bfec Use a nested struct instead of a prefix 2023-01-20 16:32:59 +01:00
Lukas Dürrenberger
39b8d67262 Align and fix mappings and general logic
- Aligned mappings
  - ScanDash -> ScanHyphen
  - Numpad keys include Numpad
  - *Equals -> *Equal
  - Key 29/42 are Backslash
  - Key 45 is Non-US Backslash
  - Add additional media & more scancodes
  - Rename ScanAgain to ScanRedo
  - Rename ScanMute to ScanVolumeMute
  - Add the missing F-key mappings for macOS
  - Fix mapping in Windows code
  - Correctly handle numpad keys on Windows for isKeyPressed
- Refactorings
  - Use mapping for Linux from different key config
  - Refactor some mapping code
  - Fix map initialization
  - Layout independent keys also don't have unicode characters, so it
    makes more sense to translate them first and use unicode as fallback
  - Fix iteration limits on Windows
  - Consistently use 'Scancode' instead of 'ScanCode' everywhere
  - Use 'delocalize' instead of 'unlocalize'
  - Fix conversion warnings
  - Remove unused mapping function
  - Hide parameters for non-applicable iOS functions
- Update documentation
- Add Android InputImpl scancode function stubs
2023-01-20 16:32:59 +01:00
jonathan.r.paton@googlemail.com
a34d48c42d Initial Windows implementation 2023-01-20 16:32:59 +01:00
Marco Antognini
34197ba5b5 Add new API for scancodes 2023-01-20 16:32:59 +01:00
Lukas Dürrenberger
b191a0dc58 Use Scan prefix instead of 's'
Also use getDescription instead of localizedRepresentation
2023-01-20 16:32:59 +01:00
Marco Antognini
75ef99e2ca Add new API for scancodes 2023-01-20 16:32:59 +01:00
Norm Evangelista
6ef8e487cc Added readability-qualified-auto, -redundant-access-specifiers
Fixed clang-format escapes

Fixed OSX clang-tidy issues

Collapsed extraneous lines

Fixed clang-format escape
2023-01-19 15:53:40 -07:00
Chris Thrasher
8a5b206bb8 Add clang-tidy modernize-use-default-member-init check 2023-01-18 08:03:10 -07:00
Nikita
1f0167192b
Update to year 2023 2023-01-12 11:38:41 +01:00
Chris Thrasher
badb388507 Remove unnecessary casts 2023-01-11 15:30:22 -07:00
Chris Thrasher
cdce9f7147 Use nested namespaces 2023-01-07 11:28:36 -07:00
Chris Thrasher
098f6927d2 Prevent using a temporary sf::SoundBuffer with sf::Sound 2023-01-06 15:46:22 -07:00
Chris Thrasher
2d0c923a53 Prevent using a temporary sf::Texture with sf::Shader 2023-01-06 15:46:22 -07:00
Chris Thrasher
0c2f7da9f9 Prevent using a temporary sf::Texture with sf::Sprite 2023-01-06 15:46:22 -07:00
Chris Thrasher
3f4bb1ae12 Prevent constructing sf::Text with a temporary sf::Font
By deleting this constructor overload, it fails to compile if
you pass a temporary font to this parameter slot. That includes
code like

  sf::Text text("", sf::Font());

but more importantly it prohibits code like this

  sf::Font getFont()
  {
    sf::Font font;
    // load a font...
    return font;
  }

  sf::Text text("", getFont());

The same idea can be applied to setFont() to prevent setting fonts
from a temporary.

Credit to Jonny for the idea

Co-authored-by: JonnyPtn <jonathan.r.paton@googlemail.com>
2023-01-06 10:21:00 -07:00
Chris Thrasher
718195bf25 Mark move operators as noexcept 2023-01-04 09:49:20 -07:00
Chris Thrasher
9a4426fb35 Simplify in-class initializer expressions 2023-01-03 14:51:44 -07:00
Chris Thrasher
259b57d9b9 Use in-class member initializers 2023-01-02 16:26:51 -07:00
Jim-Marsden
34b6323929 Changed to namespace 2023-01-01 14:31:26 -07:00
Chris Thrasher
15cdb40fc2
Merge branch '2.6.x' into feature/backmerge 2022-12-29 22:48:49 -07:00
kimci86
f0b44937ce Update Image documentation regarding supported input formats 2022-12-29 00:08:52 +01:00
Jim-Marsden
7884efc49e Replaced Header Guards with Pragma Once 2022-12-27 20:08:11 +01:00
Benjamin Li
9c7b7d68c0 Use = default to define empty destructors #2311 2022-12-27 11:08:11 +01:00
Chris Thrasher
50d86e4755 Use in-class member initializers 2022-12-22 09:36:54 -07:00
Jim-Marsden
77dcd712fb Changed inline const to constexpr 2022-12-19 16:06:40 -07:00
Chris Thrasher
b7198b08d6 Use in-class member initializers 2022-12-18 09:11:22 -07:00
Jim-Marsden
487c97afaf Added non-trivial move operations.
Removed the default move constructor and operator.
2022-12-15 10:03:54 -07:00
Chris Thrasher
c0acaef204
Use in-class member initializers 2022-12-15 00:41:19 -07:00
Chris Thrasher
dc9d794722
Merge remote-tracking branch 'origin/2.6.x' into feature/backmerge 2022-12-13 23:06:49 -07:00
Chris Thrasher
3b6db4d18c Enforce variable case 2022-12-12 16:10:03 -07:00
fuzzdistor
7faa5507a4
Rearanged members of Transformable for a smaller object size 2022-11-29 01:28:05 -07:00
Jonny
510068d501
Use enum class instead of plain enum for PrimitiveType (#2286)
Co-authored-by: Jean Tampon <jean.tampon@gmail.com>
2022-11-27 12:17:27 -07:00
Christian Ivicevic
a9f33999dc
Fix outdated use of the sf::VideoMode constructor 2022-11-22 14:55:52 +01:00
jim
1d4db22d62 Added move constructor/operator 2022-11-19 19:52:45 -07:00
Chris Thrasher
0bdefd25d7 Use in-class member initializers
See C++ Core Guidelines item C.45 for more information.

https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c45-dont-define-a-default-constructor-that-only-initializes-data-members-use-in-class-member-initializers-instead
2022-11-17 18:44:36 -07:00
kimci86
0310b03aef Document that checking XButton1 and XButton2 state on X11 is not supported 2022-11-15 22:36:37 +01:00
Chris Thrasher
6451a29f49 Disable certain GCC pragmas when using other compilers
Fixes MSVC warning C4068 in public headers while keeping that warning
disabled for uses of GCC pragmas in SFML source files.
2022-11-05 12:52:40 -06:00
Chris Thrasher
cd985e37d2 Enforce parameter case 2022-10-24 12:53:29 +02:00
Chris Thrasher
a5dbe59f07
Merge branch '2.6.x' 2022-10-13 14:33:11 -06:00
Radek Dutkiewicz
2503b00299 Fix compile on linux with gcc 12.2.0
Undefined NUL
2022-10-11 15:30:23 +02:00
Vittorio Romeo
58b4346895 Add '[[nodiscard]]' to 'IpAddress::resolve' 2022-10-07 14:37:53 +02:00
kimci86
3acd9620eb Fix SoundRecorder example code 2022-10-01 11:15:02 -06:00
Chris Thrasher
34ee40c835 Use scoped enumerations in Network module 2022-09-27 17:30:13 +02:00
Pierce Brooks
c565daccae fix visual studio 2019 complaints regarding the int64_t type not being a member of the std namespace 2022-09-22 12:26:06 +02:00
Chris Thrasher
3a3935d005 Replace sf::Uint64 with std::uint64_t 2022-09-13 11:15:03 -06:00
Chris Thrasher
05690b963d Replace sf::Int64 with std::int64_t 2022-09-13 11:15:03 -06:00
Chris Thrasher
e294090c8e Replace sf::Uint32 with std::uint32_t 2022-09-12 15:36:55 -06:00
Chris Thrasher
056f66a2b8 Replace sf::Int32 with std::int32_t 2022-09-12 15:36:55 -06:00
Chris Thrasher
ff9c9131b3 Replace sf::Uint16 with std::uint16_t 2022-09-12 21:36:13 +03:00
Chris Thrasher
e21ae3204e Replace sf::Int16 with std::int16_t 2022-09-12 21:36:13 +03:00
Chris Thrasher
e2528de20a Replace sf::Uint8 with std::uint8_t 2022-09-09 10:28:53 +02:00
Chris Thrasher
af34794123 Replace sf::Int8 with std::int8_t 2022-09-09 10:28:53 +02:00
Chris Thrasher
8561101b11 Add conversions between sf::Time and std::chrono::durations 2022-09-05 23:35:25 +02:00
Chris Thrasher
ebb2d9d186 Implement sf::Time with <chrono> 2022-09-05 23:35:25 +02:00
Chris Thrasher
4f52793f7d Run clang-format 2022-07-11 20:04:56 +02:00
metaquarx
88e9f82bee Add '.clang-format' file, CI integration, and formatting exceptions
Co-authored-by: Vittorio Romeo <vittorio.romeo@outlook.com>
Co-authored-by: Chris Thrasher <chrisjthrasher@gmail.com>
Co-authored-by: kimci86 <kimci86@hotmail.fr>
2022-07-11 20:04:56 +02:00
Vittorio Romeo
8c8d97c6c9 IpAddress is always valid 2022-06-28 00:31:12 +02:00
Vittorio Romeo
8a2aa6397f Explicitly instantiate float vector members in cpp 2022-06-24 18:47:28 +02:00
Vittorio Romeo
a3dd3e02aa Remove unused <string> include from Texture.hpp 2022-06-24 12:59:30 +02:00
Chris Thrasher
d7f09c1167 Manually inline sf::IpAddress::resolve
This code is better expressed as a constructor since that's the
only place where it's used.
2022-06-23 20:22:13 +02:00
Chris Thrasher
76223b07a1 Implement sf::IpAddress with std::optional 2022-06-23 20:22:13 +02:00
Vittorio Romeo
e4c5af63b7 Replace 'TcpSocket::send' local buffer with data member 2022-06-23 18:37:01 +02:00
kimci86
95201a3950 Update Image code example with Vector2u parameters 2022-06-23 18:03:54 +02:00
kimci86
c4790bcb14 Clarify Image::copy implementation 2022-06-23 18:03:54 +02:00
Vittorio Romeo
6cd07a043f 'sf::Image::copy' returns a 'bool' to signal success/failure 2022-06-21 16:40:22 +02:00
Chris Thrasher
9e23fb0899 Clarify sf::ConvexShape docs
Co-authored-by: Jan Haller <bromeon@gmail.com>
2022-06-09 10:05:29 +02:00
Chris Thrasher
dbac180db5 Limit the scope of event object 2022-06-08 13:16:40 +02:00
Chris Thrasher
745bcb82ef Remove implicitly defined special member functions 2022-06-07 23:19:30 +02:00
Chris Thrasher
e0c4d14541 Use [[maybe_unused]] for parameters that are sometimes not used
Depending on preprocessor settings, certain parameters may or may
not be used. Instead of casing to (void) when not used, it's easier
to use C++17's [[maybe_unused]] attribute to express this.
2022-06-01 08:19:40 +02:00
Chris Thrasher
88515b2fca Add polar coordinates constructor for sf::Vector2<T> 2022-05-17 20:30:02 +02:00
Chris Thrasher
0785093ebc Use sf::Vector2<T> for numeric parameter pairs 2022-05-17 08:33:11 +02:00
Bambo-Borris
b2ab6d6ab3 Add extension methods to Vector3<T>
Includes relevant tests and updates TestUtilities to feature ApproxVec2 & ApproxVec3
2022-05-16 08:59:42 +02:00
Lukas Dürrenberger
65e357e901
Merge pull request #2099 from SFML/2.6.x
Backmerge 2.6.x to master
2022-05-10 23:39:34 +02:00
Coder-Rahul-Y
33cb8f4391 Corrected/clarified the setLoopPoints() documentation
The previous documentation talks about 'end points' but the current code does not take end point as an argument and hence does not allow specifying the end point of the loop. (Instead the functions allows specifying the beginning offset and the length of the loop.)
2022-04-28 20:12:29 +02:00
Lukas Dürrenberger
af209510d9 Merge branch '2.6.x' into master 2022-04-21 08:31:37 +02:00
kimci86
f7c88ee7ef Fix font pages not being created with the desired smoothness 2022-04-21 08:24:40 +02:00
Peter Chapman
470822cfe4 Fixed incorrect value for fully transparent pixels 2022-04-21 08:23:10 +02:00
Chris Thrasher
c7705a8d9a Remove remaining use of this-> 2022-04-20 08:29:45 +02:00
Chris Thrasher
4b93727413 Enable MSVC standards conformance 2022-04-19 08:33:27 +02:00
Jan Haller
70eeba5067 Add Vector2 extension methods (inspired from Thor)
Adds vector algebra functionality as member functions for Vector2<T>, with some methods limited to floating-point T.
Also adds UnitX and UnitY constants for the two axis unit vectors.
2022-02-28 16:18:00 +00:00
Vittorio Romeo
d55b5ec5b9 Minor include cleanup ('Window', 'RenderWindow') 2022-02-17 01:42:31 +00:00
Chris Thrasher
5f2c7bb898 Use std::filesystem::path 2022-02-17 00:40:29 +00:00
Vittorio Romeo
a3b27b4a6d Use pre-increment when post-increment is not necessary 2022-02-17 00:39:35 +00:00
Vittorio Romeo
218154cf00 Add move semantics to 'Font', 'Text,' and 'Image' 2022-02-16 16:29:45 +00:00
Vittorio Romeo
b069f88127 Avoid overuse of 'std::endl' 2022-02-16 16:28:39 +00:00
Vittorio Romeo
5fee1aad7d Add '[[nodiscard]]' in more useful/ambiguous places, fix usages 2022-02-16 16:27:32 +00:00
Jan Haller
eb321b3040 Update year to 2022 (master branch) 2022-02-16 13:52:31 +00:00
Vittorio Romeo
83259a4a31 Add move semantics to 'sf::Packet' 2022-02-16 13:50:07 +00:00
Vittorio Romeo
32ad019304 Cleanup sf::err includes 2022-02-16 08:45:39 +01:00
binary1248
359fe9088c Fixed warnings reported by LGTM and Coverity Scan. 2022-02-16 08:26:17 +01:00
Vittorio Romeo
5b500ad2c2 Turn more compile-time constants into 'constexpr' variables 2022-02-15 13:27:10 +00:00
Jan Haller
9d28bf7eb2 Update year to 2022 (amended) 2022-02-12 19:29:09 +01:00
Vittorio Romeo
dbeef66693 Turn 'sf::Transform' into a 'constexpr' class 2022-02-10 23:51:47 +00:00
Vittorio Romeo
63ce7e4e92 Remove unnecessary includes from public-facing headers 2022-02-10 21:05:49 +00:00
Vittorio Romeo
0e419543f2 Make 'Color' constants 'constexpr' and add tests 2022-02-08 23:32:12 +00:00
Chris Thrasher
28f273b9c9 Add sf::Angle
Similar to sf::Time, sf::Angle provides a typesafe API for working
with angles and provides named functions for converting to and from
degrees and radians.
2022-02-08 22:52:37 +00:00
Chris Thrasher
0c8c35fa0c Fix findIntersection documentation 2022-02-04 09:35:34 +01:00
Chris Thrasher
7c80f302e4 Use std::optional to remove extra sf::Rect::intersects overload 2022-01-27 02:55:11 +00:00
Chris Thrasher
052e624ddf Remove GCC 4 workaround 2022-01-21 21:19:05 +01:00
Vittorio Romeo
a880122836 Reintroduce 'SleepImpl' sleep implementation 2022-01-12 00:01:35 +00:00
Lukas Dürrenberger
3a402f241a Merge branch '2.6.x' into feature/back_merge 2022-01-08 12:28:34 +01:00
Chris Thrasher
cd84b19669 Define fixed-width integer type aliases in terms of standard fixed-width types 2022-01-06 21:02:14 +01:00
Chris Thrasher
79c2aadbcc Remove redundant 4-param sf::Rect<T> constructor 2022-01-06 20:04:03 +01:00
Vittorio Romeo
3dc8fc0923 Add 'NetworkUtil' for network module tests 2022-01-03 01:00:55 +01:00
Vittorio Romeo
5ba6580568 Make 'Time' a 'constexpr' class 2021-12-28 16:52:52 +01:00
Chris Thrasher
14fff20eb8 Remove redundant API taking x,y pair instead of sf::Vector 2021-12-26 17:13:18 +01:00
kimci86
53594dfbe7 Fix null pointer dereference in Font 2021-12-23 17:03:16 +01:00
kimci86
d0c63f46fc Use a smart pointer to manage std::FILE pointer in FileInputStream 2021-12-22 02:35:45 +01:00
Vittorio Romeo
f6de7eca40 Use smart pointers to manage memory 2021-12-21 19:54:25 +01:00
Lukas Dürrenberger
3cd45a283b Merge branch '2.6.x' into feature/backmerge 2021-12-20 13:44:56 +01:00
Pawel Paruzel
c824d3d57a Fix all macOS clang warnings
Co-authored-by: binary1248 <binary1248@hotmail.com>
2021-12-20 00:10:55 +01:00
Vittorio Romeo
18bb892625 Improve compilation times by removing some includes and avoiding heavy dependencies 2021-12-19 18:13:07 +01:00
Vittorio Romeo
a20d73aafa Make 'Vertex' a 'constexpr' class 2021-12-19 15:35:47 +01:00
Vittorio Romeo
ed201ce87a Make 'Color' a 'constexpr' class 2021-12-18 21:34:05 +01:00
Vittorio Romeo
cfeb7651b5 Make 'Rect' a 'constexpr' class 2021-12-18 17:29:41 +01:00
Vittorio Romeo
f6bd12c300 Replace 'sf::NonCopyable' with '= delete' 2021-12-16 22:39:38 +01:00
Vittorio Romeo
3c7fba0f96 Reduce compile-time impact of 'windows.h' 2021-12-16 22:39:07 +01:00
Vittorio Romeo
6cb10856c6 Make 'Vector2' and 'Vector3' 'constexpr' classes 2021-12-15 17:28:50 +01:00
Pawel Paruzel
96a4262fb9 Update Android example build to C++17 2021-12-15 12:52:27 +01:00
Pawel Paruzel
dfff93fe04 Update SFML Time classes to C++17
Ensure Clock uses a monotonic clock

Statically assert against low precision clocks

Allow suspend-aware clock for Android

Add descriptive documentation to sf::Clock
2021-12-15 12:52:27 +01:00
Vittorio Romeo
e9e353a7b2 Remove redundant APIs taking '(x, y)' in favour of ones taking 'sf::Vector' 2021-12-15 11:22:46 +01:00
Vittorio Romeo
bb854fa739 Strategic use of '[[nodiscard]]' in 'Audio' module 2021-12-14 15:19:37 +01:00
Vittorio Romeo
ab0378805d Strategic use of '[[nodiscard]]' in 'System' module 2021-12-14 14:02:05 +01:00
Vittorio Romeo
b33f4bb205 Replace SFML multithreading primitives with standard C++ ones 2021-12-14 01:07:29 +01:00
Vittorio Romeo
363e964acc Strategic use of '[[nodiscard]]' in 'Graphics' module 2021-12-10 01:27:05 +00:00
Vittorio Romeo
7343b112fc Strategic use of '[[nodiscard]]' in 'Network' module 2021-12-09 22:34:57 +00:00
Vittorio Romeo
3579ecbdb0 Strategic use of '[[nodiscard]]' in 'Window' module 2021-12-09 19:53:54 +00:00
Vittorio Romeo
bc5b41657c Remove deprecated 'PrimitiveType::Quads' 2021-12-09 16:33:02 +00:00
Lukas Dürrenberger
cd517ba267 Merge branch '2.6.x' into feature/backmerge 2021-12-09 14:36:55 +01:00
Vittorio Romeo
7f2243d826 Remove most deprecated 'PrimitiveType' enumators 2021-12-09 13:12:03 +00:00
Vittorio Romeo
6678fdd291 Remove deprecated 'Shader::setParameter' API 2021-12-09 13:12:03 +00:00
Vittorio Romeo
0e28212584 Remove deprecated overload of 'RenderWindow::capture' 2021-12-09 13:12:03 +00:00
Vittorio Romeo
e7a5039cd9 Remove deprecated overload of 'RenderTexture::create' 2021-12-09 13:12:03 +00:00
Vittorio Romeo
f6186d880d Remove deprecated 'Text::[set|get]Color' 2021-12-09 13:12:03 +00:00
Vittorio Romeo
756a399909 Remove deprecated 'Keyboard::Key' enumerators and adjust usages 2021-12-09 13:12:03 +00:00
Vittorio Romeo
21d594a765 Remove 'MouseWheelEvent' and adjust usages 2021-12-09 13:12:03 +00:00
Vittorio Romeo
d12a2cd319 Use 'override' whenever possible instead of 'virtual' 2021-12-09 09:07:03 +01:00
Vittorio Romeo
a23076d7bb Replace 'BoolType' with 'explicit operator bool' 2021-12-09 09:03:55 +01:00
Vittorio Romeo
87e84bc9e5 Minor modernization changes: 'nullptr', range-based 'for' loops, ... 2021-12-08 21:41:20 +00:00
Vittorio Romeo
2839f6b4d2 Use 'auto' where no information is lost 2021-12-08 19:14:31 +00:00
Vittorio Romeo
9a0cc4b7dc Use alias declarations instead of 'typedef' 2021-12-08 17:58:13 +00:00
Vittorio Romeo
8be8a76cba Use 'auto', range-'for', and structured bindings to improve some loops 2021-12-08 13:05:52 +01:00
lieff
e458f4651e Add MP3 decoding support using 'minimp3'
Co-authored-by: Lukas Dürrenberger <eXpl0it3r@my-gate.net>
Co-authored-by: Vittorio Romeo <vittorio.romeo@outlook.com>
2021-12-08 08:19:08 +01:00
Vittorio Romeo
51ebeaf383 Change most associative containers to their respective 'unordered' version 2021-12-06 14:01:56 +00:00
Vittorio Romeo
dd14d7c57f Use '[[fallthrough]]' attribute and enable relevant warning 2021-12-04 12:42:09 +01:00
Vittorio Romeo
4e1fcb3775 Remove 'SFML_DEPRECATED' and replace internal usages with '[[deprecated]]' 2021-12-03 19:36:47 +01:00
Vittorio Romeo
c9f7cb3d52 Use 'nullptr' instead of 'NULL' 2021-12-03 15:48:32 +00:00
Lukas Dürrenberger
1aa2b7cd0d Update SFML version to 3.0.0
Unlike with SFML 2.x and earlier the version numbers are updated as soon
as work on the new release starts. This especially helps with version
checks, which until now caused issues with in-development version
matching the previous release.
2021-12-02 20:02:15 +01:00
Lukas Dürrenberger
c74694c3b2 Fix conversion warnings for the Audio module 2021-11-30 11:25:58 +01:00
Lukas Dürrenberger
e0f2356102 Fix conversion warnings for Unix
- Fix conversion & shadowing warnings
- For the System & Window module
2021-11-30 11:25:58 +01:00
Jan Haller
5bed29dd19 Fix conversion and other warnings, mainly on Windows 2021-11-30 11:25:58 +01:00
Vittorio Romeo
dc88cbd81e Remove include directives for unused headers 2021-11-22 00:47:11 +01:00
Ant
089f0fd8b4 Fixed typo in TcpSocket header comment. 2021-07-14 10:47:06 +02:00
Guillaume Bertholon
1f21e5497b Control GL_FRAMEBUFFER_SRGB flag in RenderTarget
This fixes wrong rendering for RenderTexture that need sRGB encoding along a
non-sRGB window.
We cannot simply always enable GL_FRAMEBUFFER_SRGB because some drivers
enable sRGB encoding on non-sRGB window surfaces.
Also add a isSrgb() method to tell if a RenderTarget is encoding into
sRGB color space.
2021-05-11 16:52:55 +02:00
Vittorio Romeo
c0b19109a9 Fix incorrect standard includes in 'InputSoundFile' and 'Music' 2021-04-13 10:21:11 +02:00
Lukas Dürrenberger
a7e5d3c386 Add missing semicolon in doc example 2021-04-08 17:35:05 +02:00
Vittorio Romeo
748ba1bc82 Fix '-Wimplicit-fallthrough' warnings by adding a fallthrough comment 2021-03-25 11:39:50 +01:00
Guillaume Bertholon
05c83617de Add Min and Max blend modes 2021-03-23 21:09:53 +01:00
Radek Dutkiewicz
88451a0740 Fixed naming convention mistakes 2021-02-11 00:40:30 +01:00
Radek Dutkiewicz
84e0a25e04 Fixed unnecessary loadGlyph() calls
getKerning() now passes the bold flag to getGlyph() function, so already cached glyph can be used.
2021-02-11 00:40:30 +01:00
Radek Dutkiewicz
7a0c35c334 Added glyph position compensation after autohinting
This improves glyph spacing by subtracting glyph position deltas from glyph advance generated by forced autohinting
2021-02-11 00:40:30 +01:00
swordfatih
498d7ee79c Update the copyright year to 2021
Just updating all the 2020 references to 2021. 😄
2021-01-06 20:21:36 +01:00
David Carlier
4cbb34ddb4 NetBSD support proposal. 2020-12-07 16:08:00 +01:00
Arthur Caputo
129774877b Implemented saveToMemory and saveImageToMemory. 2020-12-03 20:12:27 +01:00
Bruno Van de Velde
7b84e46fac Added support for directional arrow resize cursors on Linux 2020-11-29 21:22:45 +01:00
Jonny Paton
59df9d0d88 Implement smoothing for fonts 2020-09-20 19:17:11 +02:00
Corentin Schreiber
aaf8ef1c89 Updated Cursor documentation for colored cursors on Unix 2020-09-13 20:35:48 +02:00
Lukas Dürrenberger
9b596cc8d9 Update the copyright year to 2020 2020-09-12 19:34:34 +02:00
mcz
5eea8032db replace dead link in Config.hpp file
replace dead link with working link containing information about predefined macros
2020-09-03 21:07:17 +02:00
scotth
95c98093e9 Adjustable processing interval in SoundStream #1517
Resurrection of previous PR with updated documentation. Added setter to
adjust processing interval in SoundStream for low-latency streams.
2020-06-18 17:36:59 +02:00
43187455e4 Added Font::hasGlyph() 2020-05-20 16:12:41 +02:00
Quentin Bazin
f93372f98a Added missing documentation about TcpListener::listen and Socket::AnyPort. 2020-05-16 20:15:17 +02:00
Jonny
50e173e403 Update documentation 2020-02-06 22:29:19 +01:00
Michal Marszalek
632a015663 Added readCurrentReadPosition in sf::Packet 2020-02-06 22:29:19 +01:00
Jan Haller
519e1f9572 Improve sf::Transform documentation
Clarifies order of combine() and equivalence of operations.
Closes #1608.
2020-01-02 15:27:47 +01:00
Mario Liebisch
a1d4bc80c2 Changed Doxygen single-line comment format
Single line comments starting with `///` are interpreted by
Microsoft Visual Studio as documentation containing XML code.

Therefore single line comments starting with `///<` unfortunately
cause a parsing error, as IntelliSense will assume the `<` is the
start of an XML tag. This is not the case, but unfortunately,
IntelliSense will still complain about the following space
character rather than displaying the raw string. This commit alters
all such comments to start with `//!<` instead, which prevents the
issue.

This fixes issue #1622.
2020-01-02 15:25:57 +01:00
binary1248
6272f853c1 Add support for creating Vulkan window surfaces. 2019-10-16 21:48:24 +02:00
Stefan Schindler
ca21695521 Added getPosition() and getSize() to sf::Rect<T>. 2019-09-03 09:45:24 +02:00
binary1248
81a1da6a59 Revert "Added a VertexBuffer implementation to all Drawables that were rendered via VertexArrays."
This reverts commit 4dfad062e4.
2019-09-01 18:20:13 +02:00
SGauvin
9c8cc19f96 Removed useless cast
Removed useless cast in SFML/System/Utf.inl at line 296.
This useless cast creates a warning when using -Wuseless-cast as an option in g++ and clang++.
Operations can't be made on types smaller than 4 bytes (32 bits), so types smaller than 4 bytes are converted to at least 4 bytes types, thus rendering the static_cast<Uint32> useless in this particular case.
2019-02-19 10:08:58 +01:00
binary1248
4dfad062e4 Added a VertexBuffer implementation to all Drawables that were rendered via VertexArrays. 2019-02-19 10:05:59 +01:00
EpicCoder
489482a630 Updated the copyright year to 2019 2019-01-08 08:53:33 +01:00
binary1248
ae337952a9
Allow creation of a window without an OpenGL context in order to support use cases where the user wants to render using other graphics APIs. 2019-01-05 23:22:08 +01:00
cosiek
077af21f37 allow for closing sound files 2018-12-03 19:27:53 +01:00
Lukas Dürrenberger
2be4e54d4a
Fixed example documentation to match the code 2018-11-25 17:23:25 +01:00
Lukas Dürrenberger
3f4bc3683b Updated the changelog and version number for 2.5.1 2018-10-15 21:52:40 +02:00
binary1248
8554d210df Ensure the proper default framebuffer is bound when activating a RenderWindow. Fixes #1471. 2018-10-01 20:33:59 +02:00
Marco Antognini
aeca3dce41 Improved macOS implementation for Cursor
- remove Wait and SizeAll cursors as they don't look nice
   (Wait is not spining and produces a broken rendering,
    SizeAll is a simple white cursor.)
 - fix memory management for NSCursor.
 - ignore selector warnings.
2018-08-27 21:42:59 +02:00
Jonny Paton
0bcb2992a7 Implemented extra cursors on macOS 2018-08-27 21:42:59 +02:00
Lionel Aimerie (Pixium Digital)
2853b6b629 ANDROID flag fix to SFML_SYSTEM_ANDROID 2018-07-28 18:10:04 +02:00
binary1248
235abae134 Fixed the Unix clipboard implementation causing an abort due to internal data races in Xlib. 2018-07-02 22:39:54 +02:00
Lukas Dürrenberger
192eb968a4 Updated version number to SFML 2.5.0 2018-05-06 08:53:30 +02:00
Marco Antognini
de2d49e3af Added doxygen documentation for Packet >> & << operators 2018-05-06 08:42:42 +02:00
Marco Antognini
b21039452e Fixed a reference in the documentation of Shader 2018-05-06 08:42:42 +02:00
Marco Antognini
f2ccc64536 Fixed doxygen rendering of markdown table 2018-05-06 08:42:42 +02:00
binary1248
cd1387479e Moved NvOptimusEnablement and AmdPowerXpressRequestHighPerformance out of sfml-main and into a macro the user can place in their own translation unit when they need it. Fixes #1192 2018-04-28 13:22:05 +02:00
binary1248
9bdd6d46dd Fixed TcpListener and TcpSocket not behaving as documented when calling listen or connect while the underlying socket object already exists, also adjusted UdpSocket to be consistent with connect and listen behaviour when calling bind while the underlying socket object already exists. Fixes #1346 2018-04-14 10:16:17 +02:00
David Carlier
9da895da8b further changes 2018-04-14 10:14:34 +02:00
David Carlier
4d0d331272 pushing upstream openbsd support from package. 2018-04-14 10:14:34 +02:00
Mario Liebisch
1e800d9551 Android: No longer keep an active input stream longer than needed. 2018-04-14 09:59:01 +02:00
binary1248
0adde249ec Optimized RenderTexture performance when using the FBO implementation by removing unnecessary context switches and flushing. 2018-04-14 09:54:59 +02:00
irrmich
15d0f789c7 Add append/overwrite parameter to Ftp::upload. 2018-04-05 11:21:20 +02:00
binary1248
421e8bb812 Added support for creation of a stencil attachment and multisampling to sf::RenderTexture. 2018-03-26 23:48:05 +02:00
Marco Antognini
b0f3611ab9 Renamed a few key codes
Deprecated BackSlash, BackSpace, SemiColon, Dash and
introduced Backslash, Backspace, Semicolon, Hyphen in a
retrocompatible way.
2018-03-26 23:39:39 +02:00
Radek Dutkiewicz
deeb3a95f3 Fixed letter spacing being letter width dependent 2018-02-15 21:27:19 +01:00
Mario Liebisch
806813e937 Android: Removed custom toolchain file
This commit drops the previous custom CMake toolchain file for Android
in favor of CMake's new built-in toolchain for this (CMake >3.7.2).

This makes building SFML for Android a lot simpler and more straight
forward, working almost as smooth as other platforms.

To configure your build directory, all you have to do is defining just a
few variables the first time you invoke CMake.

**Required Variables**

* `CMAKE_SYSTEM_NAME` must be `Android`, so CMake knows we actually want
  to cross-compile.
* `CMAKE_ANDROID_NDK` must point to the NDK's installation directory,
  e.g. `/usr/android/ndk` or `c:/android/ndk`.

**Recommended Variables**
* `CMAKE_ANDROID_STL_TYPE` defines the STL implementation to be used.
  You should use `c++_shared`, although others might work.

**Optional Variables**
* `CMAKE_SYSTEM_VERSION` can be set to pick a specific SDK version other
  than the latest.
* `CMAKE_ANDROID_ARCH_ABI` defines the target architecture and ABI, for
  example `armeabi` or `armeabi-v7a`.

Based on your system, you might want to enforce a specific generator to
prevent issues, e.g. using `MinGW Makefiles`.
2018-02-11 20:15:54 +01:00
Alexander Weinrauch
0da25a0b87 Added support for the newest NDK version 2018-02-11 20:15:54 +01:00
Maximilian Wagenbach
989367e345 Turned the header image in readme.md into a link.
Updated all links to use https (tested).
2018-02-10 17:12:54 +01:00
Maximilian Wagenbach
5d7843c58a Updated the copyright year to 2018. 2018-02-10 14:51:46 +01:00
Sérgio Agostinho
6d4e870e32 Correct docstring for seek 2018-01-29 17:51:46 +01:00
Maximilian Wagenbach
65d26be74d Changed the implementation from offsets to factors. 2018-01-25 01:52:19 +01:00
Maximilian Wagenbach
73892dfa12 Updated sf::Text documentation and OpenGL example. 2018-01-25 01:47:55 +01:00
Maximilian Wagenbach
812dea70d0 Implemented line spacing in sf::Text. 2018-01-25 01:47:54 +01:00
Maximilian Wagenbach
9e2f2eb27f Implemented letter spacing in sf::Text. 2018-01-25 01:47:54 +01:00
jonathan.r.paton@googlemail.com
e31b925234 Added functionality to allow polymorphism with sf::SoundSource 2018-01-25 00:31:20 +01:00
binary1248
61cdcd47ca Added sf::VertexBuffer class. 2018-01-25 00:26:38 +01:00
Maximilian Wagenbach
c24de5fcaf Fix for broken text when the font is reloaded. 2018-01-17 00:48:38 +01:00
Marco Antognini
c352f5228b Fixed typo in sf::Music documentation 2017-12-06 16:59:43 +01:00
marukrap
8a02dc0ad5 Change a character
from en-dash(u2013) to hypen-minus(u002d)
2017-12-06 16:58:20 +01:00
binary1248
898c2350f7 Add equality comparison to sf::Transform and avoid uploading 64 bytes of data every time we want to reset the OpenGL matrix back to identity. 2017-10-12 20:41:05 +02:00
Cobaltergeist
93a2e9502d Added Loop Point support to sf::Music 2017-09-03 12:57:09 -07:00
Lukas Dürrenberger
ffd9c94381 Remove unused/leftover openForWriting function in InputSoundFile. 2017-08-06 00:29:59 +02:00