Hleb Valoshka
6a3f93a295
Don't use suggestions if object searched is not found
...
Closes : #604
2022-01-20 18:45:39 +02:00
Hleb Valoshka
f969b37c3e
Refactor font handling code
...
* Add cache for loaded fonts
* Replace `const std::string &` with `std::string_view` in print
* Remove static load method
* Reformat with clang-format
* Return bool from celestiacore::set*Font
2022-01-20 12:10:30 +03:00
Hleb Valoshka
c251dac856
Split greek-letters handling from utf8 and refactor a bit
2022-01-08 17:21:23 +03:00
Andrew Tribick
7cdf65659d
Clamp cosine of phase angle to [-1, 1]
2022-01-02 16:03:52 +01:00
Andrew Tribick
7b762832a4
[qtwin] Fix crash on pasting screenshots
...
Workaround for an issue with the Windows Qt version where Celestia crashes
when a copied screenshot is pasted into another application. This appears to
be because the data sent to the clipboard still contains a reference to the
data in the destructed Image object, despite the Qt documentation stating that
QClipboard::setImage causes the clipboard to take ownership of the data. This
does not occur if the QImage manages its own buffer.
2022-01-01 21:27:10 +01:00
Andrew Tribick
33116aad4a
Backport C++20 numbers header
2021-12-31 17:25:39 +01:00
Andrew Tribick
f15443bf63
Remove WIP HDR implementation
2021-12-29 14:48:36 +01:00
Andrew Tribick
86f2aab284
Remove glcontext.*
2021-12-29 14:48:36 +01:00
Hleb Valoshka
50deb54bff
Remove unneeded fs::path.string() conversions
2021-12-28 21:14:29 +01:00
Levin Li
968199915c
Add support for different temperature scales
2021-12-25 23:10:10 +08:00
Hleb Valoshka
ab409356c1
Add versioned local config file support
2021-12-24 21:32:27 +03:00
Hleb Valoshka
14af83a391
Implement Logger to replace raw cerr/cout and DPRINTF usage
2021-12-20 17:54:50 +03:00
Levin Li
9a94e2dc6b
Allow to use a custom date formatter for display
2021-12-05 18:56:30 +08:00
Levin Li
b9b02beb0e
Use localized names at bottom right
2021-12-05 18:30:44 +08: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
Hleb Valoshka
6b853ce47f
Fix fault due to result expanded to int
2021-11-19 00:41:52 +03:00
Levin Li
dff29425fe
Fix crash displaying localized DSOs
2021-10-23 17:35:18 +08:00
Hleb Valoshka
28f674565e
Add and use Overlay::printf instead of Overlay::operator<<
2021-10-23 12:15:01 +03:00
Hleb Valoshka
811ed4ff3c
Fix a few error messages
2021-10-23 12:15:01 +03:00
Hleb Valoshka
ccd01c460f
Fix fs::path printing using fmt
2021-10-23 12:15:01 +03:00
Hleb Valoshka
42790d9013
Replace deprecated fmt::fprintf calls
2021-10-19 19:35:23 +03:00
Levin Li
1613542c5d
Fix duplicate in Body as well
2021-10-19 17:42:49 +08:00
Levin Li
b04ffab738
Add support in .cfg
2021-09-28 14:03:24 +08:00
Levin Li
f0db65c8f6
Add support for imperial units
2021-09-28 14:03:24 +08:00
Hleb Valoshka
f731579681
Revert "Refactor movie capture to use FFMPEG only"
2021-08-23 11:04:03 +03:00
Hleb Valoshka
7b52f23c97
Open log file with relative name in the current dir not in the data dir
2021-08-09 08:58:52 +03:00
Joseph C Wang
05cb7196b5
make it compile with fmt v8
2021-06-27 20:52:35 +03:00
Hleb Valoshka
bece12f6e4
Refactor Image class and image capture
...
* use GL_MESA_pack_invert to flip captured buffer
* move enum PixelFormat to own file
* use PixelFormat instead of GL formats in Image
* provide captureImage() in CelestiaCore
* use CelestiaCore methods to capture images in Qt UI
2021-06-16 14:15:32 +03:00
Hleb Valoshka
6e83aa9e04
Refactor movie capture to use FFMPEG only
2021-06-06 08:44:21 +03:00
Hleb Valoshka
8dab250f22
Use FFMpeg to capture video
2021-06-06 08:44:21 +03:00
Levin Li
009e09df63
Clear dateStrWidth on clearFonts
2021-05-27 16:34:33 +08:00
Levin Li
b4858b1e72
Use shared_ptr around TextureFont
2021-05-24 08:37:01 +08:00
Levin Li
e3297b7775
Namespacing Marker* and Rect
2021-05-23 11:03:07 +08:00
Levin Li
d6270ecac2
i18n for star and dsos in code
2021-05-22 09:34:34 +08:00
Levin Li
0fb2b4e7c0
Add an option to not search for localized version of a script
2021-05-17 08:00:40 +08:00
Levin Li
9d74b326a9
Implement skip_permission_denied and align behavior with std::filesystem
2021-05-17 08:00:17 +08:00
Levin Li
d79a4ac43b
Sort DSO directories in extras directories
2021-05-11 16:28:13 +08:00
Hleb Valoshka
e356f9339e
Fix a few strings
2021-05-10 23:03:53 +03:00
Hleb Valoshka
c906f917eb
[i18n] translate more strings
2021-05-08 13:13:37 +03:00
Hleb Valoshka
a7b5ed202f
[i18n] Use C_ macro to correctly translate "Spacecraft"
2021-05-05 15:04:47 +03:00
Hleb Valoshka
77af6f7419
Refactor images related code
...
* move different formats support to its own directory
* add common CaptureBufferToFile subroutine
2021-04-06 10:23:53 +03:00
Levin Li
dc88685c2c
Fix compilation with std filesystem
2021-03-27 22:30:39 +08:00
Hleb Valoshka
93ec39a836
Add guards for portable builds
...
ports commit c4f02af
from 1.6.x
2021-03-09 09:07:21 +03:00
Hleb Valoshka
451fe6ffcb
Read favorites file from system data directory
...
This commits ports 8ba1ab7
from 1.6.x branch
2021-03-09 09:07:21 +03:00
Hleb Valoshka
f5f8770f7f
Keep Url objects instead of pointer in history
2021-03-08 14:08:36 +03:00
Hleb Valoshka
332840fdd1
Refactor Url class
...
* Critical change:
- Drop Url versions 1, 2 and 4. Versions 1 and 2 are
too old and can't be handled properly. Version 4
was added to handle 64 bit RenderFlags but we can
encode them in backward compatible way by adding a
new parameter "nrf" ignored by Celestia 1.6.
* Use string_view to reduce memory allocation during Url
parsing.
* Use non-throwing functions to parse numbers.
2021-03-08 14:08:36 +03:00
Hleb Valoshka
db9dd5cb18
Extract string utilities to own file
2021-03-08 14:08:36 +03:00
Hleb Valoshka
fe810135f6
Translate and simplify displayed RA/Dec
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
0dab2d9d5b
astro - add useful literals
...
* au (astronomic units)
* ly (light years)
* c (speed of light)
2021-03-08 14:08:36 +03:00