Commit Graph

14107 Commits

Author SHA1 Message Date
Michał Janiszewski 6eeda1ec77 Perform more cleanup of CMakeLists.txt files
This moves setting of compilation flags to common file to be used by all
subprojects and explicitly enables only C++ support, skipping whole C
support in CMake.
2018-02-15 23:51:49 +01:00
Michał Janiszewski 8e3a271fb4 Remove support for C code from CMake 2018-02-15 23:51:49 +01:00
Michael Steenbeek bde913ee16 Rename SmallCoords and BigCoords 2018-02-15 22:26:50 +01:00
Michael Steenbeek ab94ea74f4 More MSVC fixes 2018-02-15 22:26:50 +01:00
Michael Steenbeek ca5a1e1f34 Testpaint and MSVC fixes 2018-02-15 22:26:50 +01:00
Michael Steenbeek 45e892e5b5 Allow passing BigCoordsXY into map_get_surface_element_at() 2018-02-15 22:26:50 +01:00
Michael Steenbeek 264f35d783 Replace some occurrences of LocationXY16 2018-02-15 22:26:50 +01:00
Michael Steenbeek 3e7161650c Replace LocationXYZD8 2018-02-15 22:26:50 +01:00
Michael Steenbeek a2af371de9 Replace LocationXYZ8 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
Michael Steenbeek d481cca2ed
Remove some redundant casts and fix rct_sprite::AsDuck() 2018-02-15 13:04:25 +01:00
OpenRCT2 git bot c8c9bf70a7 Merge Localisation/master into OpenRCT2/develop. 2018-02-15 04:00:32 +00:00
Michał Janiszewski 92c4c39b96 Guard from nullptr dereference in object_entry_get_entry
While looking at
https://github.com/OpenRCT2/OpenRCT2/issues/7176#issuecomment-365399194
I got a crash with stacktrace:

    #0 0x7f9e81fa2e30 in object_entry_get_entry(int, unsigned long) ../src/openrct2/object/ObjectList.cpp:181
    #1 0x7f9e81fa24ae in get_loaded_object_entry(unsigned long) ../src/openrct2/object/ObjectList.cpp:142
    #2 0x7f9e8215d64f in S6Exporter::Export() ../src/openrct2/rct2/S6Exporter.cpp:169
    #3 0x7f9e8216de71 in scenario_save(char const*, int) ../src/openrct2/rct2/S6Exporter.cpp:757
    #4 0x7f9e81c932b0 in game_autosave() ../src/openrct2/Game.cpp:1590
    #5 0x7f9e828625b6 in scenario_autosave_check() ../src/openrct2/scenario/Scenario.cpp:297
    #6 0x7f9e81c8a958 in game_update() ../src/openrct2/Game.cpp:439
    #7 0x7f9e81c6731f in OpenRCT2::Context::Update() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10f331f)
    #8 0x7f9e81c6674c in OpenRCT2::Context::RunVariableFrame() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10f274c)
    #9 0x7f9e81c6402d in OpenRCT2::Context::RunFrame() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10f002d)
    #10 0x7f9e81c638f4 in OpenRCT2::Context::RunGameLoop() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10ef8f4)
    #11 0x7f9e81c627bf in OpenRCT2::Context::Launch() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10ee7bf)
    #12 0x7f9e81c5b08a in OpenRCT2::Context::RunOpenRCT2(int, char const**) ../src/openrct2/Context.cpp:170
    #13 0x56323695b95e in main ../src/openrct2-ui/Ui.cpp:60

Sadly I cannot reproduce it anymore
2018-02-14 09:48:34 +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
Gymnasiast 431c2a4e74 Temporarily fix #7173: cannot load saves into vanilla 2018-02-14 09:26:59 +01:00
Ted John 9cc8d36a03 Fix #7171: Clicking any ride that has custom designs crashes
Wrong argument was being passed to object_entry_get_entry.
2018-02-13 17:30:47 +00:00
Michael Steenbeek 187945149f
Add some missing changelog entries 2018-02-13 16:53:06 +01:00
Michael Steenbeek a408747c4c Use object_entry_get_type() throughout 2018-02-13 16:42:18 +01:00
Aaron van Geffen 3ea6a3ea2f Implement optional full font hinting for scrolling text (banners). 2018-02-13 10:15:27 +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
OpenRCT2 git bot a5da22d5c7 Merge Localisation/master into OpenRCT2/develop. 2018-02-13 04:01:17 +00:00
jensj12 02474353e3 Reduce duplicate code
Fix two cases of duplicated code
2018-02-13 00:11:29 +01:00
Aaron van Geffen c8b5cbb3e4 Fix cmake build for openrct2-cli on macOS.
This also removes the globbing for *.m files. As the platform files for macOS
now all use Objective C++ (.mm) instead of Objective C (.m), this is no longer needed.
2018-02-12 23:15:41 +01:00
Richard Jenkins ac1a936841 Xcode and macOS compilation fix 2018-02-12 22:24:22 +01:00
Michał Janiszewski 7fec13ac74 Apply workaround for old compilers
https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899
2018-02-12 22:24:22 +01:00
Michał Janiszewski 06e139f4cb Use __builtin_cpu_supports for AVX2 detection 2018-02-12 22:24:22 +01:00
Michał Janiszewski f2d1cd418f Force AVX2 project-wide for MSVC 2018-02-12 22:24:22 +01:00
Michał Janiszewski 6a71688db7 Allow specifying cpuid subleaf 2018-02-12 22:24:22 +01:00
Michał Janiszewski ad27806534 Implement AVX2 masking 2018-02-12 22:24:22 +01:00
Ted John 928ae3b4cd Fix mistake in ObjectRepository::Create
Objects that could not be loaded were being returned with a success status causing blanks in the index file.
2018-02-12 21:22:27 +00:00
Ted John 683ffcdadc
Merge pull request #7167 from IntelOrca/refactor/easy-new-object-types
Refactor things related to object types
2018-02-12 19:43:49 +00:00
Michał Janiszewski 991a8472bf If forcing IPv4, retry immediately rather than wait 2 minutes 2018-02-12 20:39:47 +01:00
Michał Janiszewski 2e19e6cf0e Use CURL_IPRESOLVE_V4 option only as fallback for advertising 2018-02-12 20:39:47 +01:00
Michał Janiszewski 759171186c Make curl resolve over IPv4 2018-02-12 20:39:47 +01:00
Ted John 0433803ae1 Use std::vector for ObjectManager 2018-02-12 17:15:15 +00:00
Michał Janiszewski c672e6098c Fix testpaint 2018-02-12 16:03:20 +01:00
Michał Janiszewski 3f76bd214f Const all the painted tile elements
Extracted from https://github.com/OpenRCT2/OpenRCT2/pull/7036
2018-02-12 16:03:20 +01:00
Ted John 7e01dcdaaf Remove legacy object list 2018-02-12 12:48:41 +00:00
Ted John 51321a71e7 Get entries directly from object manager 2018-02-12 12:48:41 +00:00
Ted John d22572d0b9 Remove rct_object_entry_extended 2018-02-12 12:48:41 +00:00
Ted John 4d8fe051e8 Remove most usages of object_entry_groups 2018-02-12 12:48:41 +00:00
Ted John d905dde070 Simplify selected object flags 2018-02-12 12:48:41 +00:00
Michael Steenbeek 76a997aa18
Extract scenario descriptions from the STEX .DATs
This is another step in removing support for STEX .DATs.
2018-02-12 10:56:05 +01:00
Ted John 2da0f86b9b
Merge pull request #7163 from IntelOrca/fix/cold-startup
Fix cold startup
2018-02-11 22:50:19 +00:00
ZehMatt 4f011163d0 Fix #6667: Match sample rate to games audio content. 2018-02-11 12:51:33 +01:00
Ted John 0f00659c8e Do not show file index error if it doesn't exist 2018-02-11 10:39:15 +00:00
Ted John 3c29b15de9 Fix segfault if no RCT2 install path 2018-02-11 10:39:15 +00:00
Ted John e996c83b70 Create config directory if it doesn't exist 2018-02-11 10:39:15 +00:00
Michał Janiszewski a9afe3253c Fix #7160: Crash when trying to play the Dynamite Dunes scenario
The fix shouldn't modify guests that don't have any ride set.

This also fixes how peeps get removed and adds name of the offending
guest in the warning message.
2018-02-11 09:47:52 +01:00