Commit Graph

10992 Commits

Author SHA1 Message Date
Hielke Morsink 4bfeaf0c72 Fix #6870 Crash when loading groena lund
This crash only occurs when the option "no test crashes" was enable. With this commit the sprite index will be checked before the vehicle gets checked.
2018-03-10 06:50:45 +00:00
Michał Janiszewski 8cf8db01d3 Fix #7180: Compiler error: trackType may be used uninitialised 2018-03-10 07:49:24 +01:00
Michał Janiszewski 4b2881b48e Improve declaration of deleter type in S4Importer.cpp 2018-03-09 21:34:24 +01:00
Michael Steenbeek 5411c77358 Clean up more direct access to tile elements 2018-03-09 19:40:16 +01:00
Michael Steenbeek 44524d1e6f Name unknown variable 2018-03-09 19:40:16 +01:00
Michał Janiszewski 229c793b33 Fix NO_TTF builds for Windows and macOS 2018-03-09 16:40:40 +01:00
Hielke Morsink 35f3d9f4c9 Fix #7251: "Own all land" cheat does not work
`x` was not set back to `min` in the second for loop, causing all second iterations to immediately stop.
2018-03-09 16:39:04 +01:00
Ted John 39a38dc193 Include SDL2 using sub directory 2018-03-09 16:28:47 +01:00
Ted John e318e0948a Fix a few assertions that were found when using debug CRT 2018-03-09 16:28:47 +01:00
Ted John d2864a139b Use new dependencies split format 2018-03-09 16:28:47 +01:00
Hielke Morsink 5115cdddd8 Remove unused screenshot_format configuration 2018-03-09 15:58:29 +01:00
Hielke Morsink a8f167c45d Fix a few typos
'vehichle' -> 'vehicle'
'none zero' and 'non zero' -> 'nonzero'
2018-03-09 15:58:12 +01:00
Michael Steenbeek 88af2d3954 Rename sub_6CA2DF() to window_ride_construction_update_state() 2018-03-09 09:17:24 +01:00
Joshua Moerman d6c28b2fa4 Using some more CoordsXY instead of separate xy in Map.cpp 2018-03-08 23:41:33 +01:00
Joshua Moerman 426c21eb56 Uses some more informative types in Map.cpp 2018-03-08 23:41:33 +01:00
Joshua Moerman c2eb735871 Replaces magic numbers with appropriate constants 2018-03-08 23:41:33 +01:00
Joshua Moerman e5d143b748 Simplifies map_window_get_pixel_colour_ride
- Splits uint32 into two uint16
- Reuse code for unowned land colour
2018-03-08 23:41:33 +01:00
Aaron van Geffen 887619a87e Use correct fonts for simplified and traditional Chinese. 2018-03-08 22:33:17 +01:00
Michael Steenbeek c7a78807e6 Remove unused function tile_element_check_address() 2018-03-08 12:47:19 +01:00
Michael Steenbeek 7a982503a8 Remove some hard coded numbers 2018-03-08 12:45:38 +01:00
deurklink 87bdd4d079 Fix #7239: Remove all guests cheat crashes with ferris wheel 2018-03-08 09:20:32 +01:00
Gymnasiast ad4e50d728 Fix #7233: Steep slopes unavailable on Hyper-Twister
Also removes powered lift from Hyper-Twister, which was included by mistake.
2018-03-07 19:30:53 +01:00
Michael Steenbeek 1fa2fa8f80
Refactor ride->entrances and ride->exits 2018-03-07 19:10:50 +01:00
Michael Steenbeek ab54d6c370
Increase network version 2018-03-07 11:01:09 +01:00
deurklink 3648f288e5 Fix #7223: 'Remove all guests' does not remove their mass 2018-03-07 10:52:22 +01:00
Aaron van Geffen 8069a04d67 Fix logic error in setting virtual floor height. 2018-03-05 00:24:38 +01:00
ZehMatt e3708c0593 Split special direction to new parameter. 2018-03-05 00:17:34 +01:00
ZehMatt 49d8d37748 Add serialization traits for bool. 2018-03-05 00:17:34 +01:00
ZehMatt bdc1cf8adc Refactor GAME_COMMAND_MAZE_SET_TRACK to game action. 2018-03-05 00:17:34 +01:00
ZehMatt c8328610ee Optimise the algorithm for virtual floor invalidation. 2018-03-04 19:28:56 +01:00
Aaron van Geffen ba1d269227 Move all Virtual Floor code from Map to its own file. 2018-03-04 19:28:56 +01:00
ZehMatt fdf7adecd9 Fix #7002: Always invalidate virtual floor regardless of selection. 2018-03-04 19:28:56 +01:00
Gymnasiast cd8d40d8a5 Include missing header 2018-03-01 20:10:34 +01:00
Michał Janiszewski ad059a540b Round tweened positions to avoid bumping up and down 2018-03-01 14:09:14 +01:00
Ted John 0ee3c45d37 Fix #7196: Crowd Noises Absent
Sounds loaded into memory that matched the target audio format were returning a failed result.
2018-02-25 02:40:36 +00:00
Aaron van Geffen e53741812f Fix deleting of multibyte characters. 2018-02-24 10:47:52 +01:00
Aaron van Geffen 88cfd14ce5 Fix #7020: end key not working in text input. 2018-02-24 10:47:52 +01:00
Michael Steenbeek c86dfe5f1b Replace hard coded max map size 2018-02-22 10:22:47 +01:00
Gymnasiast f0805c3f59 Increase network version 2018-02-21 22:37:54 +01:00
Gymnasiast 7a2a73b418 Fix #7205: Park entrance fee cannot be set higher than £100 2018-02-21 22:37:54 +01:00
Michał Janiszewski 08bcbe3912 Make network version a variable to reduce recompilations 2018-02-21 22:21:09 +01:00
Gymnasiast a34eec2d3a Increase network version 2018-02-21 20:08:25 +01:00
Michael Steenbeek 701ed1554a Make entrances/exits at station height take precedence 2018-02-21 20:08:25 +01:00
Michael Steenbeek c28f4987d3 Remove some entrance/exit height assumptions 2018-02-21 20:08:25 +01:00
Gymnasiast fb806b572d Increase network version 2018-02-21 09:50:07 +01:00
Michael Steenbeek 2de6529cf5 Use big coordinates for PeepSpawn's Z coordinate 2018-02-21 09:50:07 +01:00
Gymnasiast d92883eee9 Replace NULL with nullptr 2018-02-21 09:50:07 +01:00
Michael Steenbeek ea0566a3f5 Split PeepSpawn and rct12_peep_spawn 2018-02-21 09:50:07 +01:00
wolfreak99 2d8c473f75 Sync Peep Spawn over network 2018-02-19 21:11:14 +01:00
Michał Janiszewski 32619f460b Remove remaining calls to get_current_rotation in paint code 2018-02-17 13:11:07 +01:00
Michał Janiszewski acccd0a2c8 Remove rotation argument from sub_98199C 2018-02-17 13:11:07 +01:00
Michał Janiszewski 5795810a85 Remove rotation argument from sub_98198C 2018-02-17 13:11:07 +01:00
Michał Janiszewski 3f92471ffb Remove rotation argument from sub_98197C 2018-02-17 13:11:07 +01:00
Michał Janiszewski 77fb74d5b6 Remove rotation argument from sub_9819_c 2018-02-17 13:11:07 +01:00
Michał Janiszewski c420fb56f5 Remove rotation argument from sub_98196C 2018-02-17 13:11:07 +01:00
Michał Janiszewski 0bf250d8b8 Initialise paint session with rotation 2018-02-17 13:11:07 +01:00
Aaron van Geffen 8ab1035ebe CMake: fix missing branch information. 2018-02-17 12:17:39 +01:00
Michael Steenbeek f4ac2b4d5b Replace LocationXYZD16 2018-02-16 16:16:49 +01:00
Michael Steenbeek ac0b18cde5 Replace LocationXY32 2018-02-16 16:16:49 +01:00
Michael Steenbeek 359e9ecf2d Replace LocationXYZ32 2018-02-16 16:16:49 +01:00
Michał Janiszewski 551dac9995 Remove more references to C from CMake 2018-02-15 23:51:49 +01:00
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
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 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
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
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 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 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
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
Ted John 4dfed04cef
Merge pull request #7161 from janisozaur/deleters-s4importer
Fix mismatched deallocators in S4Importer.cpp
2018-02-10 22:48:54 +00:00
jensj12 06e52f2d6f Fix #7137: Water, gentle and transport rides can only have 1 vehicle... (#7159)
.../train
2018-02-10 19:22:28 +00:00
Michał Janiszewski 30cbd0128f Fix mismatched deallocator in FileClassifier.cpp 2018-02-10 19:59:49 +01:00
Michał Janiszewski 86ca1581f7 Fix mismatched deallocators in S4Importer.cpp 2018-02-10 19:55:54 +01:00
wolfreak99 204fdaa66a Correct STR_TILE_INSPECTOR_ENTRANCE_MAKE_USABLE_TIP 2018-02-10 15:22:49 +01:00
Michał Janiszewski ab6ce6fd13 Don't try removing sprites past the end of list 2018-02-10 13:07:52 +01:00
Michał Janiszewski 73c861ab59 Improve selecting destination station when fixing imported sprites 2018-02-10 13:07:52 +01:00
Michał Janiszewski 61770b1dd7 Fix possibly invalid values of sprite fields on import 2018-02-10 13:07:52 +01:00
Michał Janiszewski 441b7ebe71 Don't try setting null ride type as invented 2018-02-10 13:07:52 +01:00
Michał Janiszewski 4732afa315 Add some bounds checks 2018-02-10 13:07:52 +01:00
Hielke Morsink 8e55c811f6 Check for server version instead of address (#7155) 2018-02-09 19:16:54 +00:00
Gymnasiast f003366d22 Remove STEX selection from Object Selection window 2018-02-09 13:47:15 +01: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
Ted John 504e635933
Merge pull request #7150 from Broxzier/absolute-path
Make custom paths absolute and show full path in load/save window
2018-02-08 17:25:52 +00:00
Ted John 9f533d7265
Merge pull request #7143 from IntelOrca/refactor/server-list
Refactor server list
2018-02-08 17:25:37 +00:00
Michael Steenbeek acc6136847 Do not pack Ride struct 2018-02-08 15:33:43 +01:00
Michael Steenbeek e2dd629aaf Remove padding and offsets in Ride struct 2018-02-08 15:33:43 +01:00
Michael Steenbeek 34c8409251 Clean up ride struct and num_riders import, update changelog 2018-02-08 15:33:43 +01:00
Gymnasiast 02196a1919 Fix #3330: Current number of passengers overflows 2018-02-08 15:33:43 +01:00
Hielke Morsink ced75956d1 Populate loadsave window with absolute path
When pressing "up", the code would look for the parent in the given path, which doesn't work well with relative paths. This commit fixes this behaviour.
2018-02-08 14:23:21 +01:00
Hielke Morsink e1b99479a2 Make custom paths absolute
Then gCustomUserDataPath and relatant variables are set, they overwrite the gBasePath array, which uses absolute paths. This commit makes the custom paths absolute as well, to prevent issues with assumptions in the code (file dialog for example).
2018-02-08 14:23:21 +01:00
Michał Janiszewski 35b86e3aa1 Fix Android assertion (#7148) 2018-02-08 07:47:48 +00:00
Michał Janiszewski 0e032c9ca4 Avoid shifting negative values in Audio.cpp (#7147)
Rather than shifting negative values, which invokes undefined behaviour,
use a multiplication.
2018-02-08 07:47:35 +00:00
Michał Janiszewski 282553f0c5 Upgrade some char arrays to strings 2018-02-07 23:14:29 +01:00
Michał Janiszewski 4c7053f581 Fix remaining usages of strings used in intents 2018-02-07 23:14:29 +01:00
Michał Janiszewski 20f95d073a Fix remaining uses of WC_LOADSAVE intent 2018-02-07 23:14:29 +01:00
Michał Janiszewski d08924a9c2 Add missing breaks in WindowManager 2018-02-07 23:14:29 +01:00
Ted John 142facb8a3
Remove Memory::Duplicate and Memory::DuplicateArray (#7142) 2018-02-07 19:56:46 +00:00
Ted John 9d50a36f2c More improvements to server list 2018-02-07 19:23:44 +00:00
Ted John c7128ec988 Refactor ServerList more 2018-02-07 13:01:36 +00:00
Ted John c42a63c52c Refactor memory handling in ServerList more 2018-02-07 12:51:52 +00:00
Ted John 5d51676523 Refactor memory handling in ServerList 2018-02-07 12:51:52 +00:00
Michał Janiszewski 04ea015302 Fix #7135: Pass save path as std::string, not a pointer (#7141) 2018-02-07 12:11:37 +00:00
Ted John 214df1cf75 Fix #6958: Recent messages are not coloured
This fix is a workaround to what I believe is a bug in MSVC's optimised code generator. Somehow the casting of a wchar_t to a sint32 is causing some strange behaviour where the number 147 gets changed to 0x??93. Adding a printf to display codepoint was enough to alter the behaviour, making it very difficult to understand what was going on.
2018-02-06 23:29:23 +00:00
Michał Janiszewski 8b72c4f1ad Fix mismatched deleter in TextureCache (#7138) 2018-02-06 20:51:40 +00:00
Ted John fbf0243aa3 Fix #7136: Wrong categorisation of objects
Regression introduced in DuplicateArray when converting CopyArray to memcpy
2018-02-06 18:19:23 +00:00
Ted John 0fc0d16e85 Remove unused String::Substring 2018-02-06 18:19:23 +00:00
Hielke Morsink b6823242b6 Add temporary fix to make mechanics find ride exits 2018-02-06 19:09:51 +01:00
Hielke Morsink 5e86782f0a Check for nullptr instead of using !ptr + format document
This changes all similar checks in the TileInspector file to use `ptr == nullptr` instead of `!ptr`
and applies the coding style.
2018-02-06 19:09:51 +01:00
Hielke Morsink 915dbdf869 Add button to tile inspector to make entrances usable
With this, entrances and exits that have been moved away from its original XY
location can be made usable. Only one entrance or exit will be usable per
station.
2018-02-06 19:09:51 +01:00
Hielke Morsink 7fe50a481f Allow building queues from raised/lowered entrances
The original code assumes the entrance is at the exact same height as the
station, which is not always the case with hacked rides.
2018-02-06 19:09:51 +01:00
Ted John 97032f7044
Merge pull request #7062 from rwjuk/fix7052
Fix #7052: Infinite loops occur in track circuit iteration
2018-02-06 11:42:19 +00:00
Ted John a6cb15c3b6
Merge pull request #7130 from IntelOrca/improve-bad-g1-handling
Improve bad g1.dat handling
2018-02-06 11:37:22 +00:00
Michael Steenbeek b78a744b8e Create footpath_get_edges() 2018-02-06 10:41:31 +01:00
zaxcav 688577375f Correct identification of thin junctions in the heuristic search.
Previously, thin junctions were identified based on the permitted edges - i.e. exit edges from the tile. This causes incorrect handling of tiles with 'no entry' signs. In the worst case, this breaks the heuristic search for paths with 'no entry' signs. Correct to identify thin junctions based on all edges rather than only the permitted edges.

Fixes #7125.
2018-02-06 10:41:31 +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
Ted John f031763531 Use rct_gx for g1 2018-02-05 19:04:01 +00:00
Ted John b8e93177d8 Use std::vector for g2 and csg 2018-02-05 18:56:03 +00:00
Ted John b0755123fd Fix loading of bad g1.dat 2018-02-05 18:47:40 +00:00
Ted John 8e7a0e9110 Fix memcpy to copy_n mistake from 0c71855 2018-02-05 18:32:23 +00:00
Gymnasiast ba7548089c Fix warnings when converting RCT1 research 2018-02-05 19:06:10 +01:00
Ted John 76344498bb Fix outPath not set in platform_get_user_directory 2018-02-05 17:19:39 +00: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
Marijn van der Werf 941f433aa8 Use Objective-C++ for macOS platform file 2018-02-05 15:34:45 +01:00
Richard Jenkins 9a10218275 Update official domain 2018-02-05 13:32:53 +01:00
Aaron van Geffen e3db8be68c Highlight full litter bins, too. 2018-02-05 00:20:12 +00:00
Aaron van Geffen f5db6dbde9 Replace constants with palette codes. 2018-02-05 00:20:12 +00:00
Aaron van Geffen ead49fa84e Name Unk141E9DC as WaterHeight. 2018-02-05 00:20:12 +00:00
Aaron van Geffen 0acf423031 Don't hide water when highlighting vandalism and vomit. 2018-02-05 00:20:12 +00:00
Richard Jenkins 95dfcea6bd Implement #4984: Add option to highlight vomit, litter and handymen 2018-02-05 00:20:12 +00:00
Ted John a84c05f1eb Fix gcc 2018-02-04 12:40:25 +00:00
Ted John 0c71855769 Replace Memory::Copy with std::copy 2018-02-04 12:40:24 +00:00
Ted John bb8b6a3f68 Replace Memory::Move with std::copy 2018-02-04 12:40:24 +00:00
Ted John 7851446a6f Replace Memory::Set with std::fill or similar 2018-02-04 12:35:02 +00:00
Ted John 522e113929 Fix wrong highlighted tab in object selection window 2018-02-04 12:34:41 +00:00
Gymnasiast ca12a4336b Fix custom SV4 files crashing the game 2018-02-03 18:48:57 +01:00
Joshua Moerman 5800a0874d Mac: updates cmake files to reflect previous commit(s)
The new file Platform.mm added in the previous commit was added
to the XCode project, but not to the cmake files.

I copied the pattern from src/openrct2-ui/CMakeFiles.txt
2018-02-02 23:16:37 +01:00
Michael Steenbeek 9bd812c855 Move most of _legacy.c to C++ (#7117) 2018-02-02 23:11:41 +01:00
Brian Callahan e8484d1816 Fix build on OpenBSD and FreeBSD 2018-02-02 12:41:26 +00:00
Richard Jenkins 172b5907fa Fix platform functions for macOS 2018-02-02 12:41:26 +00:00
Ted John 87cd9f88b3 Rewrite Platform::GetInstallPath 2018-02-02 12:41:26 +00:00
Michał Janiszewski da38f36570 Convert Staff.cpp to use more bools 2018-02-01 18:02:10 +01:00
Gymnasiast d87aa7a845 Remove unused static functions 2018-02-01 14:42:51 +01:00
Gymnasiast 3df60e5acd Move ttf_sdlport.c to C++ 2018-02-01 14:42:51 +01:00
Michał Janiszewski 5fa86b603c Make some peep functions use bools explicitly 2018-02-01 14:05:45 +01:00
Marijn van der Werf 7efaf3dd80 Decrease dependency of world on windows 2018-02-01 13:59:46 +01:00
Gymnasiast d91fd1364d Create passageways in European Extravaganza 2018-02-01 13:52:28 +01:00
Gymnasiast 6c49d45266 Remove unused textinputbuffer.{c,h} 2018-02-01 12:13:11 +01:00
Gymnasiast 1b2c1a4d83 Fix #7111: Path items appear twice in build menu
Issue caused by #7106 - fixed it for banners, but forgot to fix it for path bits as well.
2018-02-01 11:39:34 +01:00
Gymnasiast 4f647c24da Fix mistake in RCT1 object list [ci skip] 2018-01-31 22:09:12 +01:00
Gymnasiast d6d9627d08 Make official object translations consistent, fix bug 2018-01-31 21:17:27 +01:00
Michael Steenbeek b4018d398c
Add more object source filters 2018-01-31 13:07:20 +01:00
Michał Janiszewski 8f48da411f Allocate enough space for scenario name 2018-01-31 07:27:34 +00:00
Michał Janiszewski 7041d0c978 Fix #7085: Track design placement going over buffer 2018-01-31 07:27:34 +00:00
duncanspumpkin ac2ad02491 Update name of chairlift flag 2018-01-30 12:53:50 +00:00
duncanspumpkin d17a9d8f42 Update changelog and network version 2018-01-30 12:53:50 +00:00
duncanspumpkin 4d45053aec Name animation flags 2018-01-30 12:53:50 +00:00
duncanspumpkin eb5f8485fa Name further entry flags 2018-01-30 12:53:50 +00:00
duncanspumpkin addf087918 Rename additional_animation to animation as it makes more sense
Label all vehicle animation types based on loading relevant parks
2018-01-30 12:53:50 +00:00
duncanspumpkin 00a9ab1b17 Name every remaining vehicle entry offset!
Removed redundant comments as some were incorrect and its clear from the code now that the flags are named
2018-01-30 12:53:50 +00:00
duncanspumpkin 5401e69b50 Name vehicle animation offsets 2018-01-30 12:53:50 +00:00
duncanspumpkin 3da6481d14 Name further flags 2018-01-30 12:53:50 +00:00
duncanspumpkin 93d1b7a233 Label vehicle sound2 flags 2018-01-30 12:53:50 +00:00
duncanspumpkin 4171490052 Use flags where known 2018-01-30 12:53:50 +00:00
duncanspumpkin eaea22dda1 Revert accidental change of comments 2018-01-30 12:53:50 +00:00
duncanspumpkin 24a57fd854 Refactor the powered acceleration calcualtion code 2018-01-30 12:53:50 +00:00
duncanspumpkin 4551f9c04e Label flags 2018-01-30 12:53:50 +00:00
duncanspumpkin b97fb5feef Fix indentation 2018-01-30 12:53:50 +00:00
duncanspumpkin 96f664abb9 Fix Water Ride spinning on slope bug. Name flags. Refactor
There was a bug in the spinning water ride code that would mean that it would never trigger the stopping of spinning when going up a lift. This mistake was made during implementation of the function.
2018-01-30 12:53:50 +00:00
duncanspumpkin f9d6203200 Refactor vehicle spinning.
Fix bug in R8_SPIN and LR_SPIN that would cause vehicles to spin in wrong direction on certain track elements.
Name parameters
Name flag for additional vehicle spinning sprites
Add comments to code to make function easier to understand.
2018-01-30 12:53:50 +00:00
Gymnasiast 5cc21fd21b Replace NULL with nullptr in C++ files 2018-01-29 21:33:21 +00:00
Gymnasiast 6bd0b2baea Show ride group name in Object Selection 2018-01-29 20:09:05 +01:00
Gymnasiast b78e84702d Always show vehicle name in Research window 2018-01-29 20:09:05 +01:00
Michał Janiszewski 818a71efe8 Add constexprs to TrackData 2018-01-29 15:37:17 +01:00
Gymnasiast 2dc56f4393 Fix renamed define 2018-01-29 14:08:08 +01:00
Hielke Morsink 8fac2e1480 Add guard to ensure game action is registered
This also reorders the headers, which caused RideDemolishAction to fail compiling, but that's also solved by adding the namespace before the call.
2018-01-29 13:22:13 +01:00
Gymnasiast e8b2a3df0d Slight research refactor 2018-01-29 12:52:12 +01:00
Gymnasiast 566f3d901f Small refactor of research_get_current_item() 2018-01-28 21:39:50 +01:00
rwjuk f2792688ea Fix #7084: SC4 scenario completion not marked correctly 2018-01-28 21:38:37 +01:00
Gymnasiast 0e606c4b8c Fix research and guest references in RCT1 news items 2018-01-28 21:36:42 +01:00
Gymnasiast b7ff54480c Import more RCT1 fields 2018-01-28 21:36:42 +01:00
Michael Steenbeek 9d04593734 Slightly refactor staff_can_ignore_wide_flag()
This should also take care of some compilers failing.
2018-01-28 19:31:51 +01:00
Gymnasiast 68516fc2bb Import RCT1 research progress 2018-01-28 19:03:33 +01:00
Gymnasiast 4780ae6e3d Import RCT1 parks with an interest rate of 1% 2018-01-28 15:38:09 +01:00
Gymnasiast 658131bfec Fix import of RCT1 vintage cars
They only had one colour in RCT1.
2018-01-28 14:38:11 +01:00
pss9205 d6bf08e407 Fix #7030: Ride reliability underflows 2018-01-28 12:51:45 +01:00
Gymnasiast f217582f8e Revert "Add default exit value to staff_can_ignore_wide_flag"
AppVeyor fails because the code is unreachable.
This reverts commit a7c7dc68e3.
2018-01-28 12:13:47 +01:00
Gymnasiast 981b67a90f Reorder edge textures 2018-01-27 23:22:24 +01:00
Michał Janiszewski a7c7dc68e3 Add default exit value to staff_can_ignore_wide_flag 2018-01-26 20:29:37 +01:00
Ted John 8f1100c986
Merge pull request #7066 from IntelOrca/refactor/memory-operations
Refactor memory operations 1
2018-01-26 11:41:19 +00:00
Richard Jenkins f1df94b6d1 Standardise caret with TextInput window 2018-01-25 10:56:35 +01:00
Ted John df26354376 Fix drawing glyphs in OpenGL 2018-01-24 18:49:30 +00:00
Richard Jenkins daecb02d00 Fix macOS build use uint32 rather than char32_t 2018-01-23 21:45:58 +00:00
Gymnasiast 2c8ab6fb68 Fix #7065: Guests cannot enter Great Wall Of China scenario 2018-01-23 19:03:00 +01:00
Richard Jenkins 1fc32182af Fix #6314: SV4s do not mark corresponding scenario as completed 2018-01-23 18:42:00 +01:00
Ted John 8304f01aef Fix #5809: Support Steam RCT1 file layout
Checks RCTdeluxe_install sub directory for csg1.1 and csg1i.dat when loading CSG images.
2018-01-23 18:28:33 +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
pss9205 6b716dc157 Fix #7021: Extra rating factors overflow the vehicle tab in Korean (#7073) 2018-01-23 16:06:37 +01:00
Gymnasiast 9a362a8aa3 Import RCT1 gardens correctly 2018-01-22 20:25:29 +01:00
Gymnasiast 498ca56f57 Fix unicode values of some characters 2018-01-22 12:16:22 +01:00
Gymnasiast 6bf09e7abb Add preview images for RCT1 edge styles 2018-01-22 11:44:38 +01:00
ZehMatt 1f5140ae94 Fix benchgfx attemping to render unloaded parks. 2018-01-21 21:46:11 +00:00
ZehMatt abd74dbb1e Add exception handling in LoadParkFromFile. 2018-01-21 21:46:11 +00:00
Michael Steenbeek fdeaaa5631
Allow selecting RCT1 map edges in land tool 2018-01-21 17:18:00 +01:00
Ted John 02d783a993 Fix build 2018-01-21 12:41:42 +00:00
Ted John cebe13984f Remove most of remaining memory functions from libopenrct2ui 2018-01-21 11:17:41 +00:00
Ted John 131286f758 Refactor memory handling in OpenGLShaderProgram.cpp 2018-01-21 11:17:41 +00:00
Ted John 7f8b795842 Refactor memory handling in EditorObjectSelection.cpp 2018-01-21 11:17:41 +00:00
Ted John 589e0f40d0 Refactor memory handling in Map.cpp 2018-01-21 11:17:41 +00:00
Ted John cb44dc5c21 Fix changelog 2018-01-21 11:17:41 +00:00
Ted John b52333f532 Refactor memory handling in TitleScenarioSelect.cpp 2018-01-21 11:17:40 +00:00