Andrew Tribick
e6a7b32fee
Remove string_view compatibility headers
2021-12-28 21:14:29 +01:00
Andrew Tribick
4f913eb3ad
Collapse nested namespaces
2021-12-28 21:14:29 +01:00
Hleb Valoshka
14af83a391
Implement Logger to replace raw cerr/cout and DPRINTF usage
2021-12-20 17:54:50 +03:00
Hleb Valoshka
08b0cd0682
Use custom gettext file to translated object names
2021-12-14 13:16:18 +03:00
Andrew Tribick
a670d8e3be
Cleanup and fix celutil/util.h; rename to tzutil.h
...
- Replace deleteFunc with lambdas
- Remove unused printlineFunc, memsize
- string_view does not allow returning the TZ name, replace with std::string&
2021-12-04 11:44:36 +01:00
Andrew Tribick
b79959979a
Extract inner types from Material and Mesh
...
- Remove using namspace cmod
- Convert enums to enum classes
2021-12-04 09:49:52 +01:00
Andrew Tribick
06613bda27
Add unit tests for the tokenizer
...
- Added tests for the tokenizer
- Reorganized the tests so that the catch main method is only compiled once
- Fixed missing error return in the tokenizer found by the tests
2021-11-18 22:43:03 +01:00
Andrew Tribick
e92c3d9bd5
More forgiving handling of invalid UTF-8 sequences
...
- Report an error (once per stream)
- In string literals, append U+FFFD REPLACEMENT CHARACTER
2021-11-17 12:29:54 +01:00
Andrew Tribick
8ae1fcb88e
Additional format checks for string escapes and numbers
...
- Disallow invalid string escapes
- Disallow numbers ending with a sign character (e.g. + or 3.2e-)
- Disallow exponents immediately after a sign (e.g. +e32)
2021-11-17 12:29:54 +01:00
Andrew Tribick
b3efa631d9
Enforce maximum token length, error on invalid UTF-8 sequences
2021-11-15 18:28:06 +01:00
Andrew Tribick
f79b21e7d3
Use existing tokenizer to parse ASCII cmod files
2021-11-15 18:28:06 +01:00
Andrew Tribick
da5f621a19
Set up common binary IO functions
2021-11-10 19:14:19 +01:00
Andrew Tribick
ec232b7fad
Fix for debug builds
...
- Include fmt/ostream.h in debug.h to allow formatting filesystem paths
- Avoid including headers via debug.h on non-debug builds
2021-10-26 10:17:48 +03:00
Hleb Valoshka
42790d9013
Replace deprecated fmt::fprintf calls
2021-10-19 19:35:23 +03:00
Andrew Tribick
11c0361324
Fixes for the Windows build
...
- Move the compatibility classes into the cel17 namespace
- Skip generating resource translations if Perl not present
- Use fmt/ostream.h instead of fmt/printf.h for string_view
2021-10-18 09:58:33 +03:00
Andrew Tribick
df94a78658
Rewrite tokenizer and remove custom float parsing
2021-10-18 09:58:19 +03:00
Levin Li
bf5689574d
Make AVIF optional
2021-10-14 10:35:26 +08:00
Levin Li
a45425c374
Support AVIF texture
2021-10-14 10:35:26 +08:00
Hleb Valoshka
b067799a3c
Use old way to capture video in windows environment
2021-08-23 11:04:03 +03:00
Hleb Valoshka
d394192999
Allow binary orbits without text source
...
Closes : #1088
2021-06-24 09:41:15 +03:00
Hleb Valoshka
8dab250f22
Use FFMpeg to capture video
2021-06-06 08:44:21 +03:00
Hleb Valoshka
5af65a58f3
[cmake] Remove cotire usage
...
* It doesn't work with cmake >= 3.12 and M$ VC++ (not a big issue)
* It doesn't work with extern "C" properly (blocks FFMPEG)
* It's unmaintained
2021-06-06 08:44:21 +03:00
Levin Li
0fb2b4e7c0
Add an option to not search for localized version of a script
2021-05-17 08:00:40 +08:00
Hleb Valoshka
e65e535a2e
[i18n] Add support for context-dependent translations
2021-05-05 15:04:47 +03:00
Hleb Valoshka
cb8c1e8f03
[utils] add generic util::ResolveWildcard() method
2021-04-25 14:22:59 +03:00
Levin Li
2f7662fd3b
Avoid undefined behavior caused by passing negative value to isdigit
2021-03-15 17:44:55 +08:00
Levin Li
7a21915460
Add missing using namespace std;
2021-03-15 17:44:55 +08:00
Levin Li
2f12dd9452
Add some utils for apple platform and remove functions for portable builds
2021-03-15 17:44:55 +08:00
Levin Li
08037d78e8
Add cctype include for toupper
2021-03-15 17:44:55 +08:00
Levin Li
8540ed5d9f
Move UI related code to celestia/win32
2021-03-15 17:44:55 +08:00
Levin Li
e24d7e002d
Use string_view.data instead of .begin and .end
2021-03-14 20:40:59 +08:00
Hleb Valoshka
df25eed5a2
Add fs::create_directory() and move fs utility function to their own file
2021-03-09 09:07:21 +03:00
Hleb Valoshka
f1d84435a0
Add missing operators and constructors to array_view
2021-03-09 09:07:21 +03:00
Hleb Valoshka
db9dd5cb18
Extract string utilities to own file
2021-03-08 14:08:36 +03:00
Hleb Valoshka
ba7e0602a0
Remove 'using namespace std' from header files
2021-03-08 14:08:36 +03:00
Hleb Valoshka
f265e70607
Add an array_view class as a read-only analog of c++20's std::span
2021-03-03 20:18:32 +03:00
Hleb Valoshka
18c5126459
Copy console output into a file
...
Currently Qt frontend only, can be activated by passing -l/--log option:
celestia-qt --log /tmp/celestia.log
2021-01-14 16:45:57 +03:00
Levin Li
17cd02b3cc
Add view port effect for post processing
2020-10-10 20:18:15 +08:00
Hleb Valoshka
89991fb773
Natural order sorting for typed text completions
2020-07-26 11:14:04 +03:00
Hleb Valoshka
a0f6a2c1ff
Don't build static archives
...
1) We don't need them
2) There are issues with MinGW as CMake adds *.a together with *.so to
linker, so it's unable to resolve proper source of exported functions
2020-07-12 10:41:53 +03:00
unknown
b6334718ba
Fix string cut off during conversion
2020-06-21 23:35:51 +08:00
Levin Li
9d4043b9fa
Fix potential crash caused by substring index
2020-06-21 19:31:07 +08:00
Hleb Valoshka
1c668d3d7f
Fix warnings reported by clang/gcc
2020-06-20 10:11:09 +03:00
Hleb Valoshka
d510b2bf6d
More methods to work with Color
2020-04-24 09:54:19 +03:00
Hleb Valoshka
1ca9db3212
Fix some warnings reported by msvc
...
1) warning C4390: ';': empty controlled statement found; is this the intent?
2) warning C4305: 'argument': truncation from 'double' to 'float'
2020-03-29 17:58:49 +03:00
pirogronian
e8d0e4d1d7
Move blockarray to celutil
2020-03-06 20:47:42 +01:00
Hleb Valoshka
fe35e8e2bd
Use Color::parse in AssociativeArray::getColor
2020-02-17 19:52:44 +03:00
Hleb Valoshka
3604152867
Make Color constructors constexpr
2020-02-17 19:52:44 +03:00
Hleb Valoshka
073088e869
Add Color::data() method returning data as byte[4]
2020-02-17 19:52:44 +03:00
Hleb Valoshka
91166938d7
Disable unused version of ReplaceGreekLetterAbbr
...
It requires additional work to match ReplaceGreekLetterAbbr(std::string)
behaviour
2020-02-17 19:52:29 +03:00