1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00
Commit Graph

379 Commits

Author SHA1 Message Date
duncanspumpkin
fcb66b7449 Start refactoring pathfinding to use tileCoords 2018-05-05 11:42:34 +01:00
Hielke Morsink
8d10bfb5a1 Add namespace closing comments 2018-05-04 22:54:43 +02:00
Hielke Morsink
bc44792da9 Pack nested namespaces together 2018-05-04 22:54:43 +02:00
Michael Steenbeek
5f9d40be7a Replace tile_element_get_type() with struct method 2018-05-02 19:27:04 +02:00
oli414
3bff12c081 Seperate surface tile element 2018-05-01 16:33:16 +02:00
Hielke Morsink
30063984e6 Delete unused function arguments or mark them so (#7426)
This aims to make future refactoring easier. The arguments are removed where possible, but kept and marked with C++17's [[maybe_unused]] where they could not be removed (e.g. when they are used as a callback, rather than called directly).

I've skipped the rides/<category>/* and peep/* source files, because the rides source files are mostly generated and have a ton of unused variables, and the peep source files are being refactored.
I've also skipped most of window/* source files, because most of the functions are used as callbacks and will be bulk-renamed at some point.
2018-04-20 13:56:37 +02:00
Hielke Morsink
a51462b0fd Include necessary files for compiling headers
This commits works towards #7289. It includes files that it depends on, or forward declares types when possible. It may seem like this only increases compilation time, but before this commit they depended on the other includes of the source files that use them.
2018-03-31 23:07:14 +02:00
Ted John
3a341816bf Require double CTRL+C to exit 2018-03-22 20:44:58 +00:00
Ted John
4babfa2479 Do not make hide close the game 2018-03-22 20:29:41 +00:00
Ted John
2c627b43ba Optionally use terminal colour codes 2018-03-22 20:16:58 +00:00
Ted John
6d526d020c Fix for MSVC 2018-03-22 20:16:58 +00:00
Ted John
dd0573b235 Move in game console to UI library 2018-03-22 20:16:58 +00:00
Ted John
395f124a0b Fix console exit for stdin/out 2018-03-22 20:16:58 +00:00
Ted John
ec9e812ea7 Replace gConsoleOpen with function 2018-03-22 20:16:58 +00:00
Ted John
5188c3612a Move in game console variables to class 2018-03-22 20:16:58 +00:00
Ted John
c29efc7573 Separate consoles to different sources 2018-03-22 20:16:58 +00:00
Ted John
65eb908025 Create new in-game console class 2018-03-22 20:16:58 +00:00
Ted John
d18f416370 Add basic interactive console using linenoise 2018-03-22 20:16:58 +00:00
Michał Janiszewski
67f74119cf Fix missing headers 2018-03-20 00:27:58 +01:00
Michał Janiszewski
cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Michał Janiszewski
3303246b09 Reduce header inclusions 2018-03-20 00:27:58 +01:00
Michał Janiszewski
4dd0995efb Move cmath out of common.h 2018-03-18 23:29:13 +01:00
Hielke Morsink
1cd3e5e49c use GAME_COMMAND_FLAG_APPLY instead of hardcoded value 2018-03-18 12:21:24 +01:00
Michał Janiszewski
d1d32456a5 Fix generating screenshot path for GCC8
GCC8 rightfully complains about using improperly-sized buffers in call
to snprintf.
2018-03-14 22:11:01 +01:00
Michał Janiszewski
764520076f Reduce header inclusion
* Update includes in PlatformEnvironment.cpp

* Update includes in ParkImporter.h

* Update includes of OpenRCT2.h

* Update includes in Intro.h

* Remove unused include from Input.cpp

* Update includes of Imaging.h

* Update includes in Game.h

* Update includes in Editor.h

* Update includes of Context.cpp

* Update includes in Cheats.cpp, CmdlineSprite.cpp

* Update includes of some source files

* Update includes in some cpp files

* Update includes in some cpp files

* Update includes in TextureCache.h

* Fix tests

* Update includes in Font.cpp

* Update includes in LightFX files

* Update some includes

* Fix GCC builds

* Update some includes

* Update some includes

* Update includes in FontsFamilies.*

* Update includes of Console.h

* Improve includes in Window.h

* Improve headers in Viewport.h/Window.h

* Fix MSVC build

* Fix network-less builds

* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
Michael Steenbeek
88af2d3954 Rename sub_6CA2DF() to window_ride_construction_update_state() 2018-03-09 09:17:24 +01:00
Aaron van Geffen
887619a87e Use correct fonts for simplified and traditional Chinese. 2018-03-08 22:33:17 +01:00
Michael Steenbeek
7a982503a8 Remove some hard coded numbers 2018-03-08 12:45:38 +01:00
Michael Steenbeek
bde913ee16 Rename SmallCoords and BigCoords 2018-02-15 22:26:50 +01:00
Michael Steenbeek
a2260929dd Replace rct_xy_element with BigCoordsXYE 2018-02-15 22:26:50 +01:00
Hielke Morsink
55979a3fff Remove and replace C typedefs
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +01:00
Aaron van Geffen
bd928bc27e Make font hinting optional on a per-font basis.
Previously, hinting could only be disabled globally.
This commit disables hinting if the hinting threshold is set to 0.
Note that this parameter is configurable through config.ini, too.
2018-02-13 10:15:27 +01:00
Aaron van Geffen
1809eec079 Improve TrueType font appearance for scrolling texts.
This makes the scrolling text drawing code respect banner font y-offset definitions.
Font definitions are also adjusted accordingly. Definitions set prior were ignored
by the game thus far, hence the need for adjustment.
2018-02-13 10:15:27 +01:00
Ted John
4d8fe051e8 Remove most usages of object_entry_groups 2018-02-12 12:48:41 +00:00
Ted John
3c29b15de9 Fix segfault if no RCT2 install path 2018-02-11 10:39:15 +00:00
Gymnasiast
3261753510 Ignore missing STEX entries 2018-02-09 13:47:15 +01:00
Gymnasiast
b1ab852fb7 Add object_entry_get_type() 2018-02-09 13:47:15 +01:00
Gymnasiast
cc4f7e144a Remove most usages of 'new Intent' 2018-02-05 23:23:26 +01:00
Gymnasiast
e3c0f6606d Clean up Intent.{cpp,h}
This gets rid of the C transfer functions, add licence and does some alignment fixes
2018-02-05 23:23:26 +01:00
Gymnasiast
34a6b5ef92 Remove __cplusplus ifdefs 2018-02-05 16:20:15 +01:00
Gymnasiast
778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Richard Jenkins
95dfcea6bd Implement #4984: Add option to highlight vomit, litter and handymen 2018-02-05 00:20:12 +00:00
Marijn van der Werf
7efaf3dd80 Decrease dependency of world on windows 2018-02-01 13:59:46 +01:00
Gymnasiast
5cc21fd21b Replace NULL with nullptr in C++ files 2018-01-29 21:33:21 +00:00
Gymnasiast
e8b2a3df0d Slight research refactor 2018-01-29 12:52:12 +01:00
Richard Jenkins
f1df94b6d1 Standardise caret with TextInput window 2018-01-25 10:56:35 +01:00
Hielke Morsink
c965f854d8 Add maximum number of lines in console window
Changed the container type from a vector to a deque, as that supports FIFO with random access.
2018-01-23 16:43:33 +01:00
Hielke Morsink
7c0bcc2c34 Handle codepoints for text colour in a nicer way
This replaces a couple more buffers with std::strings and makes {WINDOW_COLOUR_2} the default colour when adding a new line. Codepoints for any other colour will be added, and overwrite the codepoint that gets calculated in `console_draw` (which is only there for when the user has text set to black).
2018-01-23 16:43:33 +01:00
Hielke Morsink
3633d56e3e Refactor and cleanup in-game console to use C++ strings
Instead of storing the console text in one large buffer, it gets stored in a vector of strings. This makes the code easier to understand, as the `std::string`s now handle the buffer lenghts, instead of doing that manually and bloating the code with it, but at the cost of some performance (not noticable though). This fixes an issue where the buffer would be cut off when the total length exeeded the buffer length.
With this commit printed warnings and errors will have a red and yellow colour. It looks like this was intended, but it didn't work before, and makes `gfx_draw_string` and related functions take const strings.
2018-01-23 16:43:33 +01:00
ZehMatt
1f5140ae94 Fix benchgfx attemping to render unloaded parks. 2018-01-21 21:46:11 +00:00