Commit Graph

18 Commits (f969b37c3ee783ed51bf4d1cbeefca4132031316)

Author SHA1 Message Date
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
Andrew Tribick f0e6ff3673 Refactor bigfix and univcoord 2021-12-30 21:30:18 +01:00
Andrew Tribick b683c7801d Return std::string_view from Tokenizer::getStringValue to reduce copying 2021-12-29 13:08:54 +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 6f666280fd [celx] fix paths in loadtexture() and runscript() 2021-09-06 20:53:36 +03: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
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 ba7e0602a0 Remove 'using namespace std' from header files 2021-03-08 14:08:36 +03:00
Hleb Valoshka 9e956abe3d Remove support for legacy TXF fonts 2020-06-24 17:14:31 +03:00
Hleb Valoshka a33e24914b [celx] Add method celestia:version() 2020-06-09 21:28:37 +03:00
pirogronian f75f86436a Use find method in lua getstar and getdso. 2020-03-13 12:43:16 +01:00
Hleb Valoshka fb4bede3d1 Allow building without NLS 2020-02-15 00:20:13 +03:00
Hleb Valoshka 26063bf3a6 Use shaders to draw fonts 2019-12-21 19:16:39 +03:00
Hleb Valoshka 682aef8422 Initial implementation for TrueType fonts support 2019-11-20 12:16:15 +03:00
Hleb Valoshka 097d7113e2 Provide a common method to save screenshots 2019-10-19 17:47:31 +03:00
Hleb Valoshka 3cb4d3154d Make options maps common to all scripts 2019-10-18 12:13:48 +03:00
Hleb Valoshka 9401a4389e Move scripts to their own subdirectories 2019-10-17 21:21:12 +03:00