Commit Graph

42 Commits

Author SHA1 Message Date
Peter Nelson b30fe0d7da Feature: Ctrl-click to toggle favourites in build-pickers.
This allows ctrl-click on a type in a build-picker window to remember it
as a favourite. An new filter button to show only favourites makes it
simpler to use these types.

Favourite types are saved locally in favs.cfg, so are remembered between
games.
2024-05-11 02:12:41 +01:00
Peter Nelson cdc356e7bf Change: Unify station/waypoint/roadstop/object build-picker window code.
These windows now share a common code base for choosing and display class and types.

An additional text filter is added to search types by name instead of just classes.
2024-05-11 02:12:41 +01:00
Peter Nelson 115ac2629b
Cleanup: Remove TileMatrix that hasn't been used for 4+ years. (#12621)
This 'nice' structure was left around from #8258 just in case it might be used again.

Spoiler alert: it hasn't.

This removes manual memory management. And otherwise unused and untested code.
2024-05-04 09:41:58 +01:00
Peter Nelson 21d11ee361 Codechange: Move cache check function to own file. 2024-04-18 22:13:55 +01:00
Peter Nelson 34ba969c74
Change: Display more useful information in sprite aligner than sprite ID. (#12439)
Sprite IDs are not useful information given they change don't refer to anything outside the loaded game.

Instead, include the filename and nfo line at minimum, and include action A or action 5 sprite replacement information if applicable.
2024-04-06 21:16:02 +01:00
Peter Nelson 2047c27445 Codechange: Move drop down list item definitions to separate header.
This reduces the scope of the definitions which are no longer needed to create the common lists.
2024-04-01 22:33:16 +01:00
Peter Nelson d683ec0183
Codechange: Move dropdown and slider out of widgets directory. (#12403)
Also shuffle headers to place widget includes near end.

This leaves the widgets directory solely for defining Widget IDs.
2024-03-31 19:37:16 +01:00
Ivan Fefer 23d733be95
Add: Basic autocompletion on tab for console commands (#12163) 2024-03-13 21:43:08 +01:00
Patric Stout d3b2a576de
Feature: Plugin framework for Social Integration with Steam, Discord, GOG, etc (#11628) 2024-01-22 19:22:45 +00:00
Patric Stout d3ee045c2d
Codechange: refactor the Windows-only DllLoader in a cross-platform LibraryLoader (#11751) 2024-01-10 21:38:58 +00:00
Peter Nelson 34e8c8e1c1
Codechange: Build station and depot vehicle lists from shared order lists. (#11676)
The brings some performance advantages:

* No need to iterate all vehicles and check for primary vehicle as only vehicles that can have orders are listed.
* Shared orders only need to be tested once instead of for each vehicle sharing them.
* Vehicle tests only need to be performed on the first shared vehicle instead of all.
2024-01-05 18:59:38 +00:00
Peter Nelson daec0e2ca4 Codechange: Split palette handling to separate file. 2023-12-25 11:22:52 +00:00
Peter Nelson 05436d9c2f Add: Expose minimal parts of SpriteCache internals.
These parts are needed to be able to mock the SpriteCache for unit-tests.
2023-11-05 19:24:59 +00:00
Patric Stout 37e2f99c09
Change: store crash logs in JSON format (#11232) 2023-09-14 20:13:27 +02:00
Niels Martin Hansen 41de0d46f3 Feature: Help and manuals access window 2023-09-13 16:11:08 +02:00
Tyler Trahan 701a61c9af Codechange: Delete date_type.h 2023-09-10 08:40:25 -04:00
Loïc Guilloux 7ef55bdfb0
Cleanup: [CMake] don't add strgen.h twice (#11199) 2023-08-14 21:29:03 +00:00
PeterN 2a2443dd01
Feature: Create group of vehicles from manage vehicle list button. (#10890) 2023-06-18 20:48:04 +01:00
Rubidium ed51cf117a Add: helper output iterator for formatting strings 2023-06-04 12:24:37 +02:00
Rubidium a19a43a4f7 Codechange: use fmt::format and time conversions over "custom" implementation 2023-05-22 15:36:09 +02:00
Tyler Trahan 6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar (#10753) 2023-05-04 13:14:12 +00:00
Patric Stout 81d4fa6999 Feature: drop ICU-lx in favour of directly interfacing with harfbuzz
This means we have RTL support again with ICU 58+. It makes use of:
- ICU for bidi-itemization
- ICU for script-itemization
- OpenTTD for style-itemization
- harfbuzz for shaping
2023-05-01 22:17:56 +02:00
Patric Stout 9cb60768fe Codechange: split implementations of ParagraphLayouterFactory into their own file 2023-05-01 22:17:56 +02:00
Rubidium f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 2023-04-25 17:55:09 +02:00
Patric Stout 1ba4dcc924 Codechange: migrate all Window-related timers to the new framework
This means we also say goodbye to GUITimers.
2023-04-15 13:58:55 +02:00
Patric Stout 5e1bcee39b Codechange: introduce a framework for all our timers
IntervalTimer and TimeoutTimer use RAII, and can be used to replace
all the time-based timeouts, lag-detection, "execute every N" we
have.
As it uses RAII, you can safely use it as static variable, class
member, temporary variable, etc. As soon as it goes out-of-scope,
it will be safely removed.
This allows for much easier to read code when it comes to intervals.
2023-04-15 13:58:55 +02:00
Rubidium c6ff7dad68 Add: compile time "unit tests" for GetPartialZ consistent 2023-04-09 19:00:26 +02:00
Jonathan G Rennison 4c1406a4b5 Add: NewGRF road stops 2023-02-26 21:28:30 +01:00
dP 5e14a20b3b
Feature: [GS] Scriptable league tables (#10001) 2022-11-26 18:03:03 +01:00
Peter Nelson 2cdd8b7429 Change: Separate fontcache implementations. 2022-09-25 18:34:24 +01:00
glx22 bba6ad1f4e Fix #9935: Use more selectivity when building SSE specific code 2022-08-26 19:36:18 +02:00
J0anJosep d9a37c915f Cleanup #9725: Replace cmd_helper related functions and remove cmd_helper.h. 2022-02-02 21:30:15 +01:00
Michael Lutz 123c7f99c3 Codechange: Move command callback declarations to the cmd header files. 2021-12-16 22:28:32 +01:00
Michael Lutz 33ca4f2b99 Codechange: Let the compile generate the master command table out of templated command traits.
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
2021-12-16 22:28:32 +01:00
rubidium42 25ca6a75bc Codechange: split off the settings table and all the callbacks from the main settings handling logic 2021-07-06 21:32:47 +02:00
rubidium42 aa5a8fe28a Codechange: use thread safe time functions
Functions like localtime, gmtime and asctime are not thread safe as they (might) reuse the same buffer. So use the safer _s/_r variant for localtime and gmtime, and use strftime in favour of asctime.
2021-05-14 23:22:29 +02:00
Rubidium 8e0b1b5d1a Add: concept of a RandomAccessFile to replace the FIO slot functions 2021-05-08 12:39:34 +02:00
Michael Lutz 63ed3f3575 Codechange: Move Fontconfig-specific code to a seperate file. 2021-02-13 20:09:14 +01:00
Michael Lutz c6af8f16f6 Codechange: [Win32] Move Win32-specific font code to a seperate file. 2021-02-13 20:09:14 +01:00
glx22 d1fa6b129c Add: [CMake] Option to only build tools/docs 2020-12-13 22:46:46 +01:00
Charles Pigott 348c231e12 Codechange: Make codestyle for CMake files consistent for 'control' statements 2020-09-25 14:43:13 +01:00
Patric Stout 56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
2020-06-05 19:36:05 +02:00