Skip to content

Commit 3ceedda

Browse files
Update.Tried to fix saveSettings missing some text
Update.Tried to fix saveSettings missing some text. Added more alpha to sprites. Remove unused mdl_studio code (lighting). Press & hold 'ALT' key for see sprites axes and boxes.
1 parent 0865a84 commit 3ceedda

File tree

88 files changed

+1544
-851
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+1544
-851
lines changed

fmt/.github/workflows/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
- name: Set timezone
7979
run: tzutil /s "Ekaterinburg Standard Time"
8080
shell: cmd
81-
- uses: msys2/setup-msys2@5df0ca6cbf14efcd08f8d5bd5e049a3cc8e07fd2 # v2.24.0
81+
- uses: msys2/setup-msys2@c52d1fa9c7492275e60fe763540fb601f5f232a1 # v2.25.0
8282
with:
8383
release: false
8484
msystem: ${{matrix.sys}}

fmt/ChangeLog.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,111 @@
22

33
- Improved debug codegen.
44

5+
- Improved C++20 module support
6+
(https://github.com/fmtlib/fmt/pull/4083,
7+
https://github.com/fmtlib/fmt/pull/4084,
8+
https://github.com/fmtlib/fmt/pull/4152,
9+
https://github.com/fmtlib/fmt/pull/4169).
10+
Thanks @kamrann.
11+
12+
- Made `std::expected<void, E>` formattable
13+
(https://github.com/fmtlib/fmt/issues/4145,
14+
https://github.com/fmtlib/fmt/pull/4148).
15+
For example ([godbolt](https://www.godbolt.org/z/hrj5c6G86)):
16+
17+
```c++
18+
fmt::print("{}", std::expected<void, int>());
19+
```
20+
21+
prints
22+
23+
```
24+
expected()
25+
```
26+
27+
Thanks @phprus.
28+
29+
- Added support for `_BitInt` formatting when using clang
30+
(https://github.com/fmtlib/fmt/issues/4007,
31+
https://github.com/fmtlib/fmt/pull/4072,
32+
https://github.com/fmtlib/fmt/pull/4176).
33+
For example ([godbolt](https://www.godbolt.org/z/KWjbWec5z)):
34+
35+
```c++
36+
using int42 = _BitInt(42);
37+
fmt::print("{}", int42(100));
38+
```
39+
40+
Thanks @Arghnews.
41+
42+
- Added the `n` specifier for tuples and pairs
43+
(https://github.com/fmtlib/fmt/pull/4107). Thanks @someonewithpc.
44+
45+
- Made more types formattable at compile time
46+
(https://github.com/fmtlib/fmt/pull/4127). Thanks @AnthonyVH.
47+
48+
- Implemented a more efficient compile-time `fmt::formatted_size`
49+
(https://github.com/fmtlib/fmt/issues/4102,
50+
https://github.com/fmtlib/fmt/pull/4103). Thanks @phprus.
51+
52+
- Added a formatter for `std::reference_wrapper`
53+
(https://github.com/fmtlib/fmt/pull/4163,
54+
https://github.com/fmtlib/fmt/pull/4164). Thanks @yfeldblum and @phprus.
55+
56+
- Added experimental padding support (glibc `strftime` extension) to `%m`, `%j`
57+
and `%Y`. (https://github.com/fmtlib/fmt/pull/4161). Thanks @KKhanhH.
58+
59+
- Fixed an unreleased regression in transcoding of surrogate pairs
60+
(https://github.com/fmtlib/fmt/issues/4094,
61+
https://github.com/fmtlib/fmt/pull/4095). Thanks @phprus.
62+
63+
- Made `fmt::appender` satisfy `std::output_iterator` concept
64+
(https://github.com/fmtlib/fmt/issues/4092,
65+
https://github.com/fmtlib/fmt/pull/4093). Thanks @phprus.
66+
67+
- Made `std::iterator_traits<fmt::appender>` standard-conforming
68+
(https://github.com/fmtlib/fmt/pull/4185). Thanks @CaseyCarter.
69+
70+
- Made it easier to reuse `formatter<std::string_view>` for types with implicit
71+
conversion to `std::string_view` (https://github.com/fmtlib/fmt/issues/4036,
72+
https://github.com/fmtlib/fmt/pull/4055). Thanks @Arghnews.
73+
74+
- Fixed compile-time formatting of some string types
75+
(https://github.com/fmtlib/fmt/pull/4065). Thanks @torshepherd.
76+
77+
- Made it possible to disable `<filesystem>` use via `FMT_CPP_LIB_FILESYSTEM`
78+
for compatibility with some video game console SDKs, e.g. Nintendo Switch SDK
79+
(https://github.com/fmtlib/fmt/issues/4257,
80+
https://github.com/fmtlib/fmt/pull/4258,
81+
https://github.com/fmtlib/fmt/pull/4259). Thanks @W4RH4WK and @phprus.
82+
83+
- Fixed compatibility with platforms that use 80-bit `long double`
84+
(https://github.com/fmtlib/fmt/issues/4245,
85+
https://github.com/fmtlib/fmt/pull/4246). Thanks @jsirpoma.
86+
87+
- Improved include directory ordering to reduce the chance of including
88+
incorrect headers when using multiple versions of {fmt}
89+
(https://github.com/fmtlib/fmt/pull/4116). Thanks @cdzhan.
90+
91+
- Improved documentation and README (https://github.com/fmtlib/fmt/pull/4066).
92+
Thanks @zyctree.
93+
94+
- Improved the documentation generator (https://github.com/fmtlib/fmt/pull/4110,
95+
https://github.com/fmtlib/fmt/pull/4115). Thanks @rturrado.
96+
97+
- Improved CI (https://github.com/fmtlib/fmt/pull/4155,
98+
https://github.com/fmtlib/fmt/pull/4151). Thanks @phprus.
99+
100+
- Fixed various warnings and compilation issues
101+
(https://github.com/fmtlib/fmt/issues/4129,
102+
https://github.com/fmtlib/fmt/pull/4130,
103+
https://github.com/fmtlib/fmt/pull/4131,
104+
https://github.com/fmtlib/fmt/pull/4132,
105+
https://github.com/fmtlib/fmt/pull/4159,
106+
https://github.com/fmtlib/fmt/pull/4170,
107+
https://github.com/fmtlib/fmt/pull/4188).
108+
Thanks @torsten48, @Arghnews, @tinfoilboy, @aminya, @Ottani, @c4v4.
109+
5110
# 11.0.2 - 2024-07-20
6111

7112
- Fixed compatibility with non-POSIX systems

fmt/doc/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ hide:
122122
</p>
123123
<p>
124124
The library is highly portable and requires only a minimal <b>subset of
125-
C++11</b> features which are available in GCC 4.9, Clang 3.4, MSVC 19.0
126-
(2015) and later. Newer compiler and standard library features are used
125+
C++11</b> features which are available in GCC 4.9, Clang 3.4, MSVC 19.10
126+
(2017) and later. Newer compiler and standard library features are used
127127
if available, and enable additional functionality.
128128
</p>
129129
<p>

fmt/doc/syntax.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,12 +706,12 @@ The available padding modifiers (*padding_modifier*) are:
706706

707707
| Type | Meaning |
708708
|-------|-----------------------------------------|
709-
| `'-'` | Pad a numeric result with spaces. |
710-
| `'_'` | Do not pad a numeric result string. |
709+
| `'_'` | Pad a numeric result with spaces. |
710+
| `'-'` | Do not pad a numeric result string. |
711711
| `'0'` | Pad a numeric result string with zeros. |
712712

713713
These modifiers are only supported for the `'H'`, `'I'`, `'M'`, `'S'`, `'U'`,
714-
`'V'`, `'W'`, `'m'`, `'j'`, `'Y'` presentation types.
714+
`'V'`, `'W'`, `'Y'`, `'d'`, `'j'` and `'m'` presentation types.
715715

716716
## Range Format Specifications
717717

fmt/include/fmt/format.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,17 +419,17 @@ template <> constexpr auto num_bits<uint128_fallback>() -> int { return 128; }
419419
// and 128-bit pointers to uint128_fallback.
420420
template <typename To, typename From, FMT_ENABLE_IF(sizeof(To) > sizeof(From))>
421421
inline auto bit_cast(const From& from) -> To {
422-
constexpr auto size = static_cast<int>(sizeof(From) / sizeof(unsigned));
422+
constexpr auto size = static_cast<int>(sizeof(From) / sizeof(unsigned short));
423423
struct data_t {
424-
unsigned value[static_cast<unsigned>(size)];
424+
unsigned short value[static_cast<unsigned>(size)];
425425
} data = bit_cast<data_t>(from);
426426
auto result = To();
427427
if (const_check(is_big_endian())) {
428428
for (int i = 0; i < size; ++i)
429-
result = (result << num_bits<unsigned>()) | data.value[i];
429+
result = (result << num_bits<unsigned short>()) | data.value[i];
430430
} else {
431431
for (int i = size - 1; i >= 0; --i)
432-
result = (result << num_bits<unsigned>()) | data.value[i];
432+
result = (result << num_bits<unsigned short>()) | data.value[i];
433433
}
434434
return result;
435435
}
@@ -891,7 +891,7 @@ class basic_memory_buffer : public detail::buffer<T> {
891891
using memory_buffer = basic_memory_buffer<char>;
892892

893893
template <size_t SIZE>
894-
FMT_NODISCARD auto to_string(basic_memory_buffer<char, SIZE>& buf)
894+
FMT_NODISCARD auto to_string(const basic_memory_buffer<char, SIZE>& buf)
895895
-> std::string {
896896
auto size = buf.size();
897897
detail::assume(size < std::string().max_size());

fmt/include/fmt/ranges.h

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,9 @@ template <typename R>
357357
using maybe_const_range =
358358
conditional_t<has_const_begin_end<R>::value, const R, R>;
359359

360-
// Workaround a bug in MSVC 2015 and earlier.
361-
#if !FMT_MSC_VERSION || FMT_MSC_VERSION >= 1910
362360
template <typename R, typename Char>
363361
struct is_formattable_delayed
364362
: is_formattable<uncvref_type<maybe_const_range<R>>, Char> {};
365-
#endif
366363
} // namespace detail
367364

368365
template <typename...> struct conjunction : std::true_type {};
@@ -498,13 +495,8 @@ struct formatter<
498495
range_format_kind<R, Char>::value != range_format::disabled &&
499496
range_format_kind<R, Char>::value != range_format::map &&
500497
range_format_kind<R, Char>::value != range_format::string &&
501-
range_format_kind<R, Char>::value != range_format::debug_string>
502-
// Workaround a bug in MSVC 2015 and earlier.
503-
#if !FMT_MSC_VERSION || FMT_MSC_VERSION >= 1910
504-
,
505-
detail::is_formattable_delayed<R, Char>
506-
#endif
507-
>::value>> {
498+
range_format_kind<R, Char>::value != range_format::debug_string>,
499+
detail::is_formattable_delayed<R, Char>>::value>> {
508500
private:
509501
using range_type = detail::maybe_const_range<R>;
510502
range_formatter<detail::uncvref_type<range_type>, Char> range_formatter_;
@@ -646,9 +638,9 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
646638
#endif
647639
formatter<remove_cvref_t<value_type>, Char> value_formatter_;
648640

649-
using view_ref = conditional_t<std::is_copy_constructible<It>::value,
650-
const join_view<It, Sentinel, Char>&,
651-
join_view<It, Sentinel, Char>&&>;
641+
using view = conditional_t<std::is_copy_constructible<It>::value,
642+
const join_view<It, Sentinel, Char>,
643+
join_view<It, Sentinel, Char>>;
652644

653645
public:
654646
using nonlocking = void;
@@ -658,9 +650,10 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
658650
}
659651

660652
template <typename FormatContext>
661-
auto format(view_ref& value, FormatContext& ctx) const
662-
-> decltype(ctx.out()) {
663-
auto it = std::forward<view_ref>(value).begin;
653+
auto format(view& value, FormatContext& ctx) const -> decltype(ctx.out()) {
654+
using iter =
655+
conditional_t<std::is_copy_constructible<view>::value, It, It&>;
656+
iter it = value.begin;
664657
auto out = ctx.out();
665658
if (it == value.end) return out;
666659
out = value_formatter_.format(*it, ctx);
@@ -675,34 +668,6 @@ struct formatter<join_view<It, Sentinel, Char>, Char> {
675668
}
676669
};
677670

678-
/// Returns a view that formats the iterator range `[begin, end)` with elements
679-
/// separated by `sep`.
680-
template <typename It, typename Sentinel>
681-
auto join(It begin, Sentinel end, string_view sep) -> join_view<It, Sentinel> {
682-
return {std::move(begin), end, sep};
683-
}
684-
685-
/**
686-
* Returns a view that formats `range` with elements separated by `sep`.
687-
*
688-
* **Example**:
689-
*
690-
* auto v = std::vector<int>{1, 2, 3};
691-
* fmt::print("{}", fmt::join(v, ", "));
692-
* // Output: 1, 2, 3
693-
*
694-
* `fmt::join` applies passed format specifiers to the range elements:
695-
*
696-
* fmt::print("{:02}", fmt::join(v, ", "));
697-
* // Output: 01, 02, 03
698-
*/
699-
template <typename Range, FMT_ENABLE_IF(!is_tuple_like<Range>::value)>
700-
auto join(Range&& r, string_view sep)
701-
-> join_view<decltype(detail::range_begin(r)),
702-
decltype(detail::range_end(r))> {
703-
return {detail::range_begin(r), detail::range_end(r), sep};
704-
}
705-
706671
template <typename Char, typename Tuple> struct tuple_join_view : detail::view {
707672
const Tuple& tuple;
708673
basic_string_view<Char> sep;
@@ -819,6 +784,34 @@ struct formatter<
819784

820785
FMT_BEGIN_EXPORT
821786

787+
/// Returns a view that formats the iterator range `[begin, end)` with elements
788+
/// separated by `sep`.
789+
template <typename It, typename Sentinel>
790+
auto join(It begin, Sentinel end, string_view sep) -> join_view<It, Sentinel> {
791+
return {std::move(begin), end, sep};
792+
}
793+
794+
/**
795+
* Returns a view that formats `range` with elements separated by `sep`.
796+
*
797+
* **Example**:
798+
*
799+
* auto v = std::vector<int>{1, 2, 3};
800+
* fmt::print("{}", fmt::join(v, ", "));
801+
* // Output: 1, 2, 3
802+
*
803+
* `fmt::join` applies passed format specifiers to the range elements:
804+
*
805+
* fmt::print("{:02}", fmt::join(v, ", "));
806+
* // Output: 01, 02, 03
807+
*/
808+
template <typename Range, FMT_ENABLE_IF(!is_tuple_like<Range>::value)>
809+
auto join(Range&& r, string_view sep)
810+
-> join_view<decltype(detail::range_begin(r)),
811+
decltype(detail::range_end(r))> {
812+
return {detail::range_begin(r), detail::range_end(r), sep};
813+
}
814+
822815
/**
823816
* Returns an object that formats `std::tuple` with elements separated by `sep`.
824817
*

fmt/include/fmt/std.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
// Check FMT_CPLUSPLUS to suppress a bogus warning in MSVC.
2929
# if FMT_CPLUSPLUS >= 201703L
30-
# if FMT_HAS_INCLUDE(<filesystem>)
30+
# if FMT_HAS_INCLUDE(<filesystem>) && \
31+
(!defined(FMT_CPP_LIB_FILESYSTEM) || FMT_CPP_LIB_FILESYSTEM != 0)
3132
# include <filesystem>
3233
# endif
3334
# if FMT_HAS_INCLUDE(<variant>)

fmt/test/base-test.cc

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -645,9 +645,7 @@ TEST(base_test, is_formattable) {
645645
EXPECT_TRUE(fmt::is_formattable<const const_formattable&>::value);
646646

647647
EXPECT_TRUE(fmt::is_formattable<nonconst_formattable&>::value);
648-
#if !FMT_MSC_VERSION || FMT_MSC_VERSION >= 1910
649648
EXPECT_FALSE(fmt::is_formattable<const nonconst_formattable&>::value);
650-
#endif
651649

652650
EXPECT_FALSE(fmt::is_formattable<convertible_to_pointer>::value);
653651
const auto f = convertible_to_pointer_formattable();
@@ -745,19 +743,6 @@ TEST(base_test, no_implicit_conversion_to_string_view) {
745743
fmt::is_formattable<implicitly_convertible_to_string_view>::value);
746744
}
747745

748-
#ifdef FMT_USE_STRING_VIEW
749-
struct implicitly_convertible_to_std_string_view {
750-
operator std::string_view() const { return "foo"; }
751-
};
752-
753-
TEST(base_test, no_implicit_conversion_to_std_string_view) {
754-
EXPECT_FALSE(
755-
fmt::is_formattable<implicitly_convertible_to_std_string_view>::value);
756-
}
757-
#endif
758-
759-
// std::is_constructible is broken in MSVC until version 2015.
760-
#if !FMT_MSC_VERSION || FMT_MSC_VERSION >= 1900
761746
struct explicitly_convertible_to_string_view {
762747
explicit operator fmt::string_view() const { return "foo"; }
763748
};
@@ -769,7 +754,16 @@ TEST(base_test, format_explicitly_convertible_to_string_view) {
769754
!fmt::is_formattable<explicitly_convertible_to_string_view>::value, "");
770755
}
771756

772-
# ifdef FMT_USE_STRING_VIEW
757+
#if FMT_CPLUSPLUS >= 201703L
758+
struct implicitly_convertible_to_std_string_view {
759+
operator std::string_view() const { return "foo"; }
760+
};
761+
762+
TEST(base_test, no_implicit_conversion_to_std_string_view) {
763+
EXPECT_FALSE(
764+
fmt::is_formattable<implicitly_convertible_to_std_string_view>::value);
765+
}
766+
773767
struct explicitly_convertible_to_std_string_view {
774768
explicit operator std::string_view() const { return "foo"; }
775769
};
@@ -781,8 +775,7 @@ TEST(base_test, format_explicitly_convertible_to_std_string_view) {
781775
!fmt::is_formattable<explicitly_convertible_to_std_string_view>::value,
782776
"");
783777
}
784-
# endif
785-
#endif
778+
#endif // FMT_CPLUSPLUS >= 201703L
786779

787780
TEST(base_test, has_formatter) {
788781
EXPECT_TRUE((fmt::detail::has_formatter<const const_formattable, char>()));

0 commit comments

Comments
 (0)