Commit Graph

847 Commits

Author SHA1 Message Date
Ted John c3eab7ead6 Refactor window.c to C++ 2018-01-07 12:39:58 +01:00
Ted John f18595a1c1 Refactor viewport.c to C++ 2018-01-07 12:39:58 +01:00
Richard Jenkins c966faf9c2 Fix #6242: Scenery invalidated when there is no visual change 2018-01-06 19:20:39 +00:00
Michael Steenbeek 755add6c9a
Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Richard Jenkins 9bb7b66157 Fix #6948 & #6949: Removing or trying to build a ride freezes game 2018-01-06 13:49:29 +00:00
Michał Janiszewski b2bc974fe7
Use nullptr where possible 2018-01-04 06:58:44 +01:00
Michael Steenbeek 91589f57c6 Compile map.c as C++ 2018-01-03 20:40:51 +01:00
Ted John 49f5611bd1 Rename scenario.c|h to cpp 2018-01-03 15:07:17 +01:00
Hielke Morsink eb4a8924d1 Refactor and clean up footpath-related code
This commit corrects some misused defines, and gave them clearer names.
For example, the slope mask was only useful for surface elements, so now
"SURFACE" is in its name. I also replaced any hard coded values that I
could find and knew their purpose off.
2018-01-03 10:57:37 +01:00
Michael Steenbeek 347ff702d0 Refactor objects 2018-01-03 10:16:51 +01:00
Gymnasiast 23d70a4ac9 Compile ride.c as C++ 2017-12-31 20:43:17 +01:00
Hielke Morsink bcfd66cbc6 Use nullptr instead of 0 2017-12-21 23:47:30 +01:00
Hielke Morsink 3770b46e46 Replace 1 and 0 constants with bool where applicable 2017-12-21 23:47:30 +01:00
Hielke Morsink 628039dd8a Use range-based for loops in libopenrct2 2017-12-21 23:47:30 +01:00
Gymnasiast 44651defa7 Fix #6447: Rename friction to mass 2017-12-17 20:11:55 +01:00
Michael Steenbeek c4f44e5e7a Compile files in paint folder as C++ 2017-12-17 17:24:36 +01:00
Michael Steenbeek 1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Michael Steenbeek 9ea5302a2a Refactor access to some footpath stuff 2017-12-13 13:51:38 +01:00
Michael Steenbeek 6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Michael Steenbeek 171271215e Change some ride type names for clarity, fix Americanism 2017-12-08 07:59:44 +01:00
Michael Steenbeek 0ffa2b541a Use more consistent terminology and remove some Americanisms 2017-12-05 10:23:36 +01:00
Michael Steenbeek 60d8865efb Compile game.c and game.h as C++ 2017-12-05 09:10:27 +01:00
Ted John 3de8e0d37e
Merge pull request #6772 from IntelOrca/remove-rct2-interop-2
Remove RCT2 interop
2017-12-04 20:10:35 +00:00
Michael Steenbeek 407f1ad148
Create scenery_small_entry_has_flag() 2017-12-04 20:09:38 +01:00
Ted John 99d7aaa2d6 Remove RCT2 interop 2017-12-04 19:04:06 +00:00
Michał Janiszewski 14f39e189d Fix building 2017-11-26 21:24:57 +01:00
Michael Steenbeek 1011d6172d
Clean up string IDs 2017-11-23 15:52:06 +01:00
Ted John aff7609b86 Name remaining wall entry flags 2017-11-22 22:53:13 +00:00
Michael Steenbeek dd8464f907 Refactor small, large and wall scenery 2017-11-20 14:40:56 +01:00
Michael Steenbeek bf69b2e682 Make terminology use more consistent 2017-11-20 11:20:04 +01:00
Ted John 110730015b Rename scenery set to scenery group 2017-11-19 20:40:55 +00:00
Ted John 3251af4f30 Refactor entertainer invented logic
Remove hard dependency on scenery window by calling a new is scenery set invented function. I don't think this the performance is any worse as it called init_scenery anyway for every call to get_available_entertainers.
2017-11-19 16:06:10 +00:00
platipo 789b47b7bb Refactor slope flags and path type flag 2017-11-18 12:58:27 +01:00
Michael Steenbeek 3bd68947b9 Create functions for getting large scenery type and sequence 2017-11-17 12:56:08 +01:00
Michael Steenbeek f448d16707 Add methods for getting and setting track element type 2017-11-17 12:54:47 +01:00
Michael Steenbeek ab3f42f1f9 Add getters and setters for ride index and maze entry 2017-11-17 12:54:47 +01:00
Michael Steenbeek 9d686db86c Fix typo in 'tolerance' 2017-11-13 16:23:19 +01:00
Christian F. Coors 06afeeda9a Apply some refactoring 2017-11-02 12:22:28 +01:00
Michael Steenbeek 386a399a51
Fix #6593: Can't hire entertainers when default scenery groups are deselected 2017-11-02 11:10:26 +01:00
Michael Steenbeek af845beb61 Replace mapElement with tileElement 2017-10-31 19:59:06 +01:00
Michael Steenbeek ce8d9cc71b Rename map_element to tile_element 2017-10-31 19:59:06 +01:00
Michał Janiszewski 4d0a8143bc Remove redundant check in peep_update_answering
The field `mechanic_status` is verified to be RIDE_MECHANIC_STATUS_HEADING
when entering the function
2017-10-30 22:18:17 +01:00
Michał Janiszewski c7c0c15abf Update formatting for recent changes 2017-10-30 16:45:16 +01:00
Michał Janiszewski d3a30132a8 Fix check order that did not function properly
The checks were done in https://github.com/OpenRCT2/OpenRCT2/pull/6576
but probably due to me later rearranging things, I got them wrong.
2017-10-30 16:45:16 +01:00
Michał Janiszewski 75685fa75d Fix #3781: Glitchy map causing crash 2017-10-30 12:03:34 +01:00
Michael Steenbeek 4290d0a65d Fix some erroneous use of LOCATION_NULL
Found by @janisozaur and introduced in PR #6461.
2017-10-25 11:59:29 +02:00
Michael Steenbeek ce4899c60c Compile station.c as C++ 2017-10-23 14:47:12 +02:00
blackhand1001 ce0650daf5 Change min energy cheat to the correct min value 32.
Change min energy cheat to the correct min value 32. This fixes the issue with the min energy cheat that causes it to reset to 255 a few seconds after applying it.
2017-10-18 21:52:46 +02:00
Michael Steenbeek bb01699b7d Compile track.c as C++ 2017-10-17 13:51:47 +02:00
Tomas Dittmann e393ff1f22 Stop using (void*)-1 for invalid pointers 2017-10-15 15:53:16 +02:00
Robert Jordan 0313183d13 Fix #6318: Can't fire staff that are being placed 2017-10-14 22:14:45 +02:00
Michael Steenbeek 7f9c25a7a9 Use constant for LOCATION_NULL, split off location stuff to Location.h 2017-10-13 22:23:07 +02:00
Michał Janiszewski ab3835719a Compile peep and staff logic as C++ 2017-10-13 10:06:36 +02:00
Tomas Dittmann 6d29fd5c77 Set null viewports to NULL, not -1 2017-10-12 21:43:39 +02:00
Michael Steenbeek d342272dda Fix usage of RIDE_ID_NULL 2017-10-12 13:35:04 +02:00
Michael Steenbeek 42d6a10952 Compile management as C++ 2017-10-11 21:38:26 +02:00
Michael Steenbeek 17557569d0 Turn 'unlock all prices' into a regular option
This uses a previously unused S6 flag to save this option persistently.
This should not make S6 import much harder, but should reduce the amount of questions about S4 import.

Also refactor the checks whether the user can ask money for rides or entry. This should make it a lot easier
when our own save format comes around.
2017-10-11 08:33:17 +02:00
Michael Steenbeek 64da0e8f8d Fix some formatting in peep.c
JENKINS!!
2017-10-10 15:17:39 +02:00
Michał Janiszewski 16bd2c6439 Fix #6430: endless vomiting
Mistake during refactor
2017-10-10 14:02:50 +02:00
Michael Steenbeek 6621faf27a Fix #6196: Guest's energy underflows and never decreases
Issue caused by using max where min was intended.
This also reverts an earlier change in capping the energy target, since it seems to max out at 255, unlike energy itself.
2017-10-10 10:06:56 +02:00
Michał Janiszewski c4538496c5 Make sure variables are either static or declared externally 2017-10-09 22:59:40 +02:00
Michał Janiszewski b05bdf28fc Fix compilation with older clang
Older clang would expand the macros and spot that clamping unsigned
values to [0, MAX] is a tautological operation and produce an error.

As these are tautological operations, no network version change should
be needed.
2017-10-09 17:34:37 +02:00
Marijn van der Werf eef3bd9af5 Move staff and guest windows 2017-10-07 22:24:14 +02:00
Michael Steenbeek 31e1ad43a8 Compile finance.c as C++, clean up 2017-10-07 16:28:35 +02:00
Michał Janiszewski 10def2a31b Provide default values to fix mingw build 2017-10-06 13:42:37 +02:00
Oli414 857faec100 Tabs to spaces 2017-10-05 10:42:44 +02:00
Oli414 8fa82493cb Move set_staff_name game command functionality to game action 2017-10-05 10:42:44 +02:00
Oli414 14f59c3d9b Move set_guest_name game command functionality to game action 2017-10-05 10:42:44 +02:00
Olivier Wervers 45944cb037 Fix #6202: Avoid breaking occupied benches 2017-10-02 17:18:51 +02:00
Michał Janiszewski 00fd18809c Move extern "C" {} blocks to headers (#6282) 2017-09-18 17:05:28 +02:00
Michael Steenbeek 671a7bcbe1 Improve and extend constant usage 2017-09-13 18:13:38 +02:00
Gymnasiast a28509e24c Split Ride and rct2_ride 2017-09-12 11:16:57 +02:00
muemart e5bfd241ea Import staff patrol areas from RCT1 save files and fix #5445 2017-09-10 12:54:57 +02:00
Tomas Dittmann 7d8695394c Add guards for nullptr and (-1) pointer accesses 2017-08-22 10:20:59 +02:00
Michael Steenbeek 9c7c553ccc Clean up vehicle flags (#6058) 2017-07-31 11:27:04 +01:00
Ted John 8b2eb8a13e Move screen variables to OpenRCT2.h 2017-07-29 20:29:29 +01:00
ζeh Matt d23e6fe5a9 Fix #5912: Negative queue when moving entrance in paused state. (#6060) 2017-07-29 09:30:01 +01:00
Richard Jenkins 222782b228 Fix #6007: 'Felicity Anderson' can affect peeps entering rides 2017-07-28 07:50:35 +02:00
Gymnasiast 38c504685e Define constants for max energy and happiness, cap energy to 128 instead of 255 2017-07-27 21:44:46 +02:00
Gymnasiast db438a27b7 Use map_element_get_direction in more places, create map_element_get_direction_with_offset() 2017-07-27 21:23:26 +02:00
Michael Steenbeek 46de90df86 Create map_get_water_height() 2017-07-27 17:15:56 +02:00
Gymnasiast d936b23072 Get and set map element station index via helper functions 2017-07-27 14:13:16 +02:00
Gymnasiast 0092fee1ce Fix what was likely a refactoring error 2017-07-26 16:49:42 +02:00
Gymnasiast db56c7e3b3 Change growth_rate to target, fix cheats to use them 2017-07-26 16:49:42 +02:00
Gymnasiast 3f345c60c6 Fix underflow in sub_68F41A() 2017-07-26 14:51:43 +02:00
Gymnasiast 894d010439 Name map element track sequence flags and use them 2017-07-26 14:41:04 +02:00
Duncan 9a49490a0a Refactor of scenery elements (#5308)
Label scenery flags, vars and refactor small scenery into cpp file.
2017-07-25 22:26:43 +01:00
Gymnasiast f5923dbe99 Create find_first_non_null_station_index() 2017-07-19 08:52:33 +02:00
Michael Steenbeek 7a4e7e17a1 Fix incorrect terminology 2017-07-18 18:07:43 +02:00
Gymnasiast 50b993386a Change station_starts to an rct_xy8 2017-07-18 13:12:34 +02:00
Gymnasiast c96ef96edb Clean up rct_ride and rct1_ride structs and usage 2017-07-18 10:50:28 +02:00
Gymnasiast 7b8248cca7 Change ride->exit into an rct_xy8, cleanup 2017-07-17 20:41:03 +02:00
Gymnasiast c12113475b Turn ride->entrances into an rct_xy8 2017-07-17 19:27:38 +02:00
rwjuk 7c2e1b626d Fix #5800: Crash when opening server from command line 2017-07-05 22:08:02 +01:00
Ted John 146982d4b0 Fix #5750: OpenRCT2 locking up consistently, no reports (#5757)
Prevent freezing on corrupted ride queues by ignoring sprites that are not guests when a guest re-joins the front of the queue.
2017-07-03 07:56:34 +01:00
Ted John 5db0a05f11 Fix #5658: Assertion failed errors in peep.c (#5747)
Protect edge cases that occur in various hacked parks:
* Current station <-> ride exits
* Current seat <-> peep load positions
2017-07-01 01:31:19 +01:00
Michael Steenbeek 44af1653a6 Replace 'center' with 'centre' (#5745) 2017-06-30 23:11:28 +01:00
zaxcav b39723a0a8 Allow mechanics to walk over wide tiles on the edge of the patrol zone 2017-06-29 20:34:37 +02:00
Ted John 4f1cfb4631 Don't load graphics for headless 2017-06-25 23:19:24 +01:00
RMcTn 92988a6020 Moved peep release balloon code into a function 2017-06-22 22:55:19 +02:00
ZehM4tt 08230f047c Fix desync if "Handyman mow grass by default" is checked. (#5652) 2017-06-18 20:43:15 +02:00
Gymnasiast ed905f3c68 Add define for number of colour schemes, correct several cases of max stations per ride 2017-06-17 14:31:48 +02:00
Michał Janiszewski 9903c15e2a Remove various trailing whitespaces
[ci skip]
2017-06-17 13:41:40 +02:00
ZehM4tt 60bf5083fc Fixed few multiplayer desync issues. (#5578)
This addresses some of the desync causes:

* `vehicle_create_car` was using `scenario_rand` when it shouldn't have
* ghost elements affected grass growth
* ghost elements affecting peep logic[1]

It also adds some desync debug facilities, enabled at compile time.

It also reverts part of change introduced in
https://github.com/OpenRCT2/OpenRCT2/pull/5185,
namely reorder of desync check vs call to `ProcessGameCommandQueue();`

[1] It is not ideal to have this check in multiple locations, it is prone
to human error. We already have `map_remove_provisional_elements`,
but it is possible it does not work as well as it should. This needs
further investigation.
2017-06-12 12:11:01 +02:00
Ted John 945d960cb7 Hide guest money effects on title screen 2017-06-07 23:20:35 +01:00
Michał Janiszewski ff9417f4a6 Validate access to peep_loading_positions (#4475) 2017-06-07 21:56:29 +01:00
Michał Janiszewski 61d38511bc Expand tabs to spaces
This commit expands tabs to spaces (ts=4) in all the files under src/
and test/.

Until now we had two wildly different code styles with C using tabs and
new C++ using spaces. It is painful to maintain as none of the commonly
used tools support this kind of setup and in reality is needless, as we
can simply convert all the sources to spaces and have opened PRs do the
same, where needed.

Additionally, trailing whitespace has been removed.
2017-06-06 23:46:14 +02:00
Michał Janiszewski 37a3179639 Fix #5558: can't hire staff
Caused by invalid flag check
2017-06-06 21:17:57 +02:00
Michael Steenbeek f3b4c88783 Merge pull request #5532 from OpenRCT2/sub_hex_fix
Name sub_<hex>() functions
2017-06-06 16:14:54 +02:00
rwjuk aa81ee4601 Add another RCT2 address comment
[ci skip]
2017-06-06 13:55:23 +01:00
rwjuk f0dec49e6d Add RCT2 address comments
[ci skip]
2017-06-06 13:48:06 +01:00
Michał Janiszewski c49f27dcab Peep pathfinding asserts (#3340) 2017-06-06 08:25:52 +01:00
Ted John c95dbf4b2f Merge pull request #5295 from janisozaur/fix-staff-hiring
Fix staff hiring check
2017-06-06 08:24:41 +01:00
rwjuk aa17f296cb Name sub_693BE5() and second param 2017-06-06 00:51:34 +01:00
rwjuk b346be8488 Name sub_68F8CD() 2017-06-06 00:47:08 +01:00
rwjuk c3401b75d5 Name sub_6B7588() 2017-06-06 00:47:08 +01:00
Richard Jenkins 457a2f624c Name sub_69AF1E() 2017-06-06 00:47:08 +01:00
Richard Jenkins 5abb5c9e9f More accurate name for sub_693BAB() 2017-06-06 00:47:08 +01:00
Richard Jenkins 03286af22b Name sub_693BAB() 2017-06-06 00:47:08 +01:00
Richard Jenkins 322a2432bb Name sub_693C9E() 2017-06-06 00:47:07 +01:00
Richard Jenkins 954124738c Name sub_693B58(), and minor formatting tweak to it 2017-06-06 00:47:07 +01:00
Richard Jenkins 7a3bc1e5fd Rename rct_ride->undercover_portion to sheltered_eighths. 2017-06-06 00:47:07 +01:00
Ted John 16ac68533f Disable for network games
As it would cause desyncs, and we can not easily mitigate this at the moment.
2017-06-05 21:32:28 +01:00
Sam Olsen b9e9b8320f Add enhancement to show money effect when peeps make purchases 2017-06-05 21:02:05 +01:00
Michał Janiszewski 79d76759bb Fix #5516: Update copyrights for 2017
Not all files were necessarily _changed_, but all were touched, see
https://github.com/OpenRCT2/OpenRCT2/pull/4932
2017-06-01 21:55:10 +02:00
Ted John 08ae74293d Remove a few more SDL calls from core library 2017-05-29 22:38:44 +02:00
Ted John 0440c3deea Clean up audio.cpp 2017-05-29 22:38:43 +02:00
Ted John d206d181f2 Move audio code to UI project 2017-05-29 22:38:43 +02:00
Ted John bd9839ff50 Get the game working
Mostly just needed to resolve screen size which is now retrieved via ui context.
2017-05-29 22:38:43 +02:00
Marijn van der Werf eaf93430d5 Remove some string additions 2017-05-28 19:49:32 +02:00
Michael Steenbeek 6bd34c1e55 Clean up sub_69101A, use constants for undefined excitement ratings, fixes #5481 2017-05-16 22:36:48 +02:00
duncanspumpkin 69d8794260 Use snake case for peep fields 2017-05-16 20:12:18 +01:00
Gymnasiast d5f1e22a56 Name RIDE_TYPE_FLAG4 flags 2017-05-16 16:37:23 +02:00
Richard Jenkins 6472c0e6c3 Allow ride names to duplicate existing user strings, fixes #5211 2017-05-12 23:43:48 +02:00
Richard Jenkins d6b32591ae Implement guard function for decrementing guest counts
* Implement guard function for decrementing guest counts

* Implement separate functions for incr/decr of peep count globals

* assert() on attempt to increment guest counts over UINT16_MAX

* Increase network version
2017-05-11 18:31:29 +02:00
CraigCraig 58deb3a54a Grammar, readability, and spelling fixes
[ci skip]
2017-05-11 11:45:59 +02:00
Michael Steenbeek a53b01d5b9 Remove magic numbers and Americanisms 2017-05-08 23:54:38 +02:00
Craig Craig 9dd820e2e7 Spelling fixes 2017-05-08 08:30:50 +02:00
zaxcav 268f6d9ac0 Minor improvements to the path finding debugging (#5443) 2017-05-06 15:51:47 +01:00
zaxcav 36ff7e90af Improve ignoring wide flags on patrol zone edges
This is a minor improvement to #5424.

The zone edge detection is expanded to also check the diagonal neighbouring tiles so that the fix in #5242 also works for tiles on an internal corner of a patrol zone.
2017-05-03 08:41:34 +02:00
Marijn van der Werf 3cf725745d Add compile-time checked constants for widget ids 2017-05-02 09:58:25 +02:00
zaxcav 0debd879da Ignore wide flags on patrol zone edges in path finding heuristic, fixes #5414
Wide path flags in patrol zones can divide the paths with an uncrossable boundary. Ignore wide flags on the patrol zone edges to provide doorways for mechanics through these boundaries without otherwise affecting the path finding heuristic.

Fixes #5414.

Requires new network version.
2017-05-02 08:10:09 +02:00
zaxcav 94eb6994fb Prevent peeps walking up and back down ride queues (#5423)
This bug is caused by inconsistent use of peep->interactionRideIndex. The primary use of this value is to record when a peep has decided to go on the ride at the queue entrance so they remember that decision when entering each queue path tile - without this they would re-decide whether to go on the ride each time they walk into a new ride queue tile.

This is also important for making the peeps walk up and back out of the queue when the ride is closed.

This value is also set when a peep decides not to go on a ride (though the reason why is not clear to me), but is not reset/changed on interaction with other tile types (e.g. shops, no entry signs, etc) causing peeps who bounce back on a ride queue entrance to walk up and down the queue.

Fixes #3499

Requires new network version.
2017-05-01 21:29:38 +02:00
CraigCraig e0b875398b Tons of spelling fixes (#5413)
[ci skip]
2017-04-30 06:39:24 +02:00
duncanspumpkin 9257645cb7 Correctly loop. Add typedef for easter egg functions 2017-04-12 20:44:44 +01:00
duncanspumpkin 509afe74cd Refactor easter egg peep functions. Fix #5357 2017-04-12 20:34:12 +01:00
Richard Jenkins 5b685d5cad Don't apply peep_make_passing_peeps_sick() to peeps in a queue, fixes #1992 2017-03-28 09:24:42 +02:00
duncanspumpkin ffeb1fa527 Initial refactor of entrance 2017-03-13 17:33:46 +00:00
Ted John bcc0bfa485 Rename climate.h to Climate.h 2017-03-11 22:59:33 +00:00
Ted John 8148c86f6b Use balloon for create_balloon 2017-03-11 12:57:45 +00:00
Michał Janiszewski 12f0c2d660 Fix staff hiring check 2017-03-10 15:36:29 +01:00
duncanspumpkin 5bd44a6d3f Fix #5265. Queue TV's now correctly detected.
Due to a mistake when implementing only ghost queue TV's were used for increasing peep happiness
2017-03-07 21:13:45 +00:00
Michał Janiszewski 7341f4aadd Remove trailing whitespace
[ci skip]
2017-03-07 20:38:11 +01:00
wolfreak99 38f264cce8 Allow for more peep spawns in the future 2017-03-02 23:02:54 +01:00
Duncan 1654ba4fe4 Merge pull request #5236 from duncanspumpkin/refactor
Refactor fence to wall
2017-02-28 06:56:06 +00:00
Michał Janiszewski 7f48df20ec Refactor input 2017-02-27 20:20:41 +01:00
duncanspumpkin 810bf301f3 Rename map element fence to wall 2017-02-20 21:10:49 +00:00
duncanspumpkin f54c71b61c Rename functions to wall. Refactor game commands 2017-02-20 21:02:19 +00:00
Ted John fb2c835d52 Include new config header 2017-02-18 15:45:10 +00:00
Michał Janiszewski 7d1f86bb51 Explain edge case behaviour of get_ride_queue_end
[ci skip]
2017-02-17 14:11:03 +01:00
Michał Janiszewski 7e6d826c09 Refactor peep action getter 2017-02-17 09:35:53 +01:00
Michał Janiszewski 32438ef6d0 Check for NULL element in get_ride_queue_end 2017-02-17 09:02:50 +01:00
Michał Janiszewski 8f0711f99d Validate peep action in sub_693B58 2017-02-17 08:42:08 +01:00
Michał Janiszewski 03dd026ba0 Fix invalid bounds check in game_command_set_staff_order 2017-02-17 08:36:34 +01:00
wolfreak99 f85dc8ced0 Code fixups 2017-02-08 21:46:54 -05:00
wolfreak99 b0cc772990 Replace gParkEntranceX/Y/Z/Direction with rct_xyzd16 gParkEntrance 2017-02-08 09:39:04 -05:00
duncanspumpkin fef7445f0c Use flags where known. Refactor large 3d signs slightly 2017-02-04 08:12:44 +00:00
wolfreak99 99c68439b1 define MAX_PEEP_SPAWNS and MAX_PARK_ENTRANCES (#5119) 2017-01-29 22:27:14 +01:00
Gymnasiast d476176d73 Import more fields, name mechanic flags, fix booster behaviour 2017-01-26 23:30:16 +00:00
zaxcav f5ae931406 Replace reuse of test_edge with new variable next_test_edge
Value of test_edge is needed for checking all path tiles placed with
zero clearance at that location.
2017-01-26 22:59:54 +01:00
Michał Janiszewski aeef3a7d5d Remove trailing whitespace 2017-01-26 19:51:31 +00:00
duncanspumpkin 98f483e4bb Fix trailing white space. Fixed space indent 2017-01-26 19:51:31 +00:00
duncanspumpkin d951c500c5 Refactor of peep data and label known addresses
Fixes #4545. Incorrect sprite image for chicken and juice
2017-01-26 19:51:30 +00:00
Ted John 93762bf15f Fix issues 2017-01-24 17:32:17 +00:00
Ted John c699c91348 Pick random entertainer costume 2017-01-24 13:06:23 +00:00
Ted John 2900f38cc3 Allow entertainer costume to be given to game command 2017-01-24 13:06:23 +00:00
Michał Janiszewski ceb77b489d Fix map_get_path_element_at to not consider ghosts 2017-01-24 11:30:39 +01:00
Michał Janiszewski 88113ca952 Fix some ghost consideration in peep AI
This is a continuation of
https://github.com/OpenRCT2/OpenRCT2/pull/5094.

While the previous PR cured some desyncs, the real issue remained –
logic of the game considers ghost elements. This change fixes it, to
some extent.

The problem here is we already remove ghosts when interacting over
network (e.g. `footpath_provisional_remove` in `footpath_place_real`),
but this happens only when such a game command is executed in OpenRCT2.
Whenever SV6 gets imported, path map elements already have had edges
calculated for them, neighbours being ghost or not, and we don't update
it. OpenRCT2/OpenRCT2#5094 is one, naïve, way to solve, the other option
would be to recalculate all the paths whenever we load SV6.
2017-01-24 11:29:58 +01:00
Michael Steenbeek 6016339773 Fix two usages of raw RIDE4 flag usages, rename one, add comment
#5065
2017-01-17 12:00:47 +00:00
Ted John 0da434bb8a Fix tall ride consideration
The consideration of tall rides was probably not working properly as it was doing a straight comparrison of a flags variable.
This instead removes it as it already checks if the ride has ratings anyway. I've also added a status check so that guests do not attempt to walk to a ride far away that isn't open.
2017-01-16 14:30:54 +01:00
Broxzier 60603ae10a Use types from common.h 2017-01-14 12:37:31 +01:00
Michał Janiszewski d88635307f Merge pull request #5062 from janisozaur/cmake-warnings
More warnings for CMake
2017-01-13 19:46:30 +01:00
Ted John baed215984 Add helper: ride_has_ratings
#5066
2017-01-13 18:14:38 +00:00
Ted John cf0c489d40 Name flag: RIDE_TYPE_FLAG_13 2017-01-13 13:08:56 +00:00
Ted John ef2ddbf462 Name flag: RIDE_TYPE_FLAG_20 2017-01-13 12:55:47 +00:00
Michał Janiszewski 33dcb1a506 Rename types to avoid shadowing 2017-01-13 10:57:00 +01:00
Michał Janiszewski ecf77e3609 Remove redundant declarations 2017-01-13 10:02:17 +01:00
Michał Janiszewski cf670deb10 Add -Wshadow to CMakeLists and fix offenders 2017-01-13 10:02:17 +01:00
Ted John b79af110c7 Fix more warnings 2017-01-12 18:02:28 +00:00
Ted John 18597bacb1 Fix more warnings 2017-01-12 17:36:05 +00:00
Ted John bd732b99c7 Fix cast warnings 2017-01-12 12:41:47 +00:00
zaxcav 9772c34cee Update debugging messages to reflect changes in how pathfind_history[].direction is updated. 2017-01-06 12:26:23 +01:00
zaxcav 64a2d105e5 Reword comments with "from from". 2017-01-05 21:43:57 +01:00
zaxcav f98b8e9de9 Restrict peep backtracking further via pathfind_history[i].direction
Dependent on the path layout it is possible for peeps to get stuck in backtracking cycles between two or more path tiles - each such tile is a turn around point because from that tile, the reachable tile on the search boundary that is closest to the peep destination is in the direction the peep came from.

When storing/updating the pathfind_histroy, remove the direction the peep came from (in addition to the chosen direction) from the directions left to try to prevent such backtracking.
2017-01-05 17:45:18 +01:00
Ted John 4fbecc2f60 Replace magic numbers with constant SPRITE_INDEX_NULL 2017-01-05 12:49:42 +00:00
Michael Steenbeek 2b35986746 Add and use constant for number of ride types 2017-01-05 09:19:22 +01:00
Ted John 25bc798ff8 Move contents of src into project sub directory 2017-01-04 17:44:12 +00:00