Commit Graph

2601 Commits

Author SHA1 Message Date
rwjuk 74642c8840 Name sub_6DB807(), better name for sub_6DB7D6() 2017-06-06 00:47:08 +01:00
rwjuk ae684c944e Name sub_6DB7D6() 2017-06-06 00:47:08 +01:00
Richard Jenkins d2fa8bab14 Name sub_6C96C0() 2017-06-06 00:47:08 +01:00
Richard Jenkins d8fe9eef9d Name sub_6A759F() 2017-06-06 00:47:08 +01:00
Richard Jenkins 1d2ced2ad7 Name sub_6CC3FB() 2017-06-06 00:47:07 +01:00
Richard Jenkins 5c28e66aa2 Name sub_6D01B3() 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
Richard Jenkins d191aaa1ef Name sub_6C9627() 2017-06-06 00:47:07 +01:00
Richard Jenkins 7a4511e11a Name some sub_hex instances that Xcode missed 2017-06-06 00:47:07 +01:00
Richard Jenkins 6efc781186 Fix comment for get_num_of_sheltered_eighths()
[ci skip]
2017-06-06 00:47:07 +01:00
Richard Jenkins 881c0c2537 Name sub_65E72D() 2017-06-06 00:47:07 +01:00
Richard Jenkins 4893521bea Name sub_6C84CE() 2017-06-06 00:47:07 +01:00
Ted John 1d5c12d2ae Merge branch 'fix/rating-overflow' into develop 2017-06-05 22:31:44 +01:00
Ted John f14738836a Prevent overflows for many rating operatings 2017-06-05 20:16:28 +01:00
Ted John 9a619b3e0a Clean up branch 2017-06-05 17:38:14 +01:00
Ted John d65d31f632 Fix test expectations and describe ride types 2017-06-04 00:47:33 +01:00
Ted John 443e17c8fc Force rating update on each ride before testing 2017-06-04 00:47:33 +01:00
Michał Janiszewski c136dc85d2 Provide define for maximum map edge size 2017-06-03 12:52:34 +02:00
Michael Steenbeek 7d9acca1e0 Create define for max ride types per ride entry, closes #5524 2017-06-01 22:00:11 +02: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 0440c3deea Clean up audio.cpp 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
wolfreak99 3d50ab56c8 Support mouse dragging when selecting ride design scenery
Define nearby scenery distance, support mouse dragging when selecting/deselecting ride design scenery
2017-05-29 22:34:33 +02:00
Marijn van der Werf eaf93430d5 Remove some string additions 2017-05-28 19:49:32 +02:00
Gymnasiast ab75b8db84 Properly check separate flags when scanning objects and building track list, fixes #3681 2017-05-21 12:19:42 +02:00
Gymnasiast d4bb9c38c9 Delete unused file 2017-05-17 22:57:23 +02:00
Gymnasiast 09f0425c2f Unify River Rafts and Splash Boats drawing code 2017-05-17 20:49:07 +02:00
Gymnasiast 57b5220a4f Fix formatting 2017-05-16 23:11:06 +02:00
Gymnasiast e3c43b495b Fix incorrect ride data array sizes and LIM lookup 2017-05-16 23:09:27 +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
Richard Jenkins 6d32c38fb3 Fix #5471: Ride name issues at ride construction time 2017-05-16 21:56:20 +02:00
Michael Steenbeek e725672d23 Clean up alternative track pieces and types, remove remnants of researched track pieces 2017-05-16 19:11:51 +02:00
Gymnasiast d5f1e22a56 Name RIDE_TYPE_FLAG4 flags 2017-05-16 16:37:23 +02:00
CraigCraig 26287f5a3e More readability, grammar, spelling fixes 2017-05-15 09:28:43 +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
Richard Jenkins 14ec639b47 Fix #5433: Strange Umbrella Pricing Bug
Secondary shop item pricing was being overwritten by on-ride photo price when placing shop. (#5436)
2017-05-05 18:08:02 +01:00
Marijn van der Werf 31e8b510ec Use constants for maze construction 2017-05-03 16:09:21 +02:00
Marijn van der Werf 927190103b Use enum for tools 2017-05-03 16:09:21 +02:00
Gymnasiast af713f2cbe Add booster sprites and drawing routines to the mini roller coaster 2017-05-02 22:40:31 +02:00
Marijn van der Werf 3cf725745d Add compile-time checked constants for widget ids 2017-05-02 09:58:25 +02:00
CraigCraig e0b875398b Tons of spelling fixes (#5413)
[ci skip]
2017-04-30 06:39:24 +02:00
Michał Janiszewski f58233912d Prevent execution of invalid command in track_place 2017-04-29 20:56:32 +02:00
Michał Janiszewski 2609242780 Fix #3136: Add 255th FlatRideTrackBlock entry
This is to guard invalid ride type from invoking an uninitialised read.
2017-04-29 20:56:32 +02:00
Richard Jenkins 0219da2468 Use localised strings for 'rides set mode' command help, fix off-by-one error: RIDES_MODE_COUNT 2017-04-23 22:18:59 +02:00
Richard Jenkins 7a50a52582 Harden console command error checking, reduce command array sizes 2017-04-23 22:18:59 +02:00
Raphael Setin 984ff6dc47 Read until first dot when converting track file name to in-game name, fixes #5077
This commit addresses the bug of Goliath.1 track. The track name will be everything that is written in the file name of that track, until the first dot.
2017-04-23 16:42:08 +02:00
Gymnasiast 34540b6439 Rename edi to something more descriptive 2017-04-17 13:39:44 +02:00
Michael Steenbeek e0764e3ac2 Add booster sprites for the Junior roller coaster 2017-04-17 12:35:38 +02:00
duncanspumpkin 8243501680 Fix #5373. Prevent towers from being shown on car ride special list.
Mistake made during implementation. Not sure how this one was accidentally done as I expect the original list was computer generated. This bug has been in the game since June 2015.
2017-04-16 13:41:54 +01:00
Michael Steenbeek 400a2cc9c7 Merge pull request #5354 from rwjuk/fix5350
Make boosters on Twister and Giga Coaster more practical (#5350)
2017-04-13 22:19:25 +02:00
Richard Jenkins 194afc7b49 Halve Junior RC booster values, and update construction window to match 2017-04-13 21:05:52 +01:00
Gymnasiast 9947532103 Multiply Giga Coaster booster values by 2 2017-04-13 20:24:12 +02:00
Gymnasiast cc92300e3a Load CSG1 booster sprites for the Looping and Corkscrew RC 2017-04-11 22:38:09 +02:00
Richard Jenkins 7b940abeb0 Reduce booster acceleration of Junior RC very slightly 2017-04-11 18:40:39 +01:00
Richard Jenkins c8155e1703 Align acceleration values for Vertical RC with Twister, reduce booster acceleration of Twister, Giga and Vertical by half 2017-04-11 18:18:35 +01:00
Richard Jenkins 34e895936c Multiply booster_acceleration value for Twister and Giga Coaster by 8 to replicate RCT1 performance 2017-04-11 16:53:12 +01:00
Richard Jenkins 62eb3176a5 Use booster_acceleration where appropriate 2017-04-11 16:43:14 +01:00
Richard Jenkins 3e3611c6da Core implementation for rct_ride_properties->booster_acceleration (not used yet) 2017-04-11 16:40:54 +01:00
Richard Jenkins f99956aa86 Rename rct_ride_properties->acceleration to powered_lift_acceleration 2017-04-11 16:29:32 +01:00
Gymnasiast b595fea770 Fix Z-sorting issues with Giga Coaster boosters 2017-04-10 21:11:52 +02:00
Gymnasiast 3ad6af679a Draw booster sprites on Steel Twister, Vertical RC and Giga Coaster, fixes #5351 2017-04-10 20:31:47 +02:00
GrahamRCT 29db1389ce Relative value bonus for new rides
This prevents, for instance, charging $6 for any new ride, regardless of its quality.
2017-04-02 22:52:59 +02:00
Richard Jenkins d58f761721 Improve algorithm for determining zoom level in track previews, fixes #3502 2017-03-28 09:23:46 +02:00
zaxcav 071c8135ba Update ride_find_closest_mechanic() to search using the station exit location, fixes #5284 2017-03-27 20:00:50 +02:00
GrahamRCT 6ea78d6c01 Remove duplicate ride penalty for closed rides
The game reduces the 'value' of a ride, which decides how much guests will pay for it, when multiple rides of the same type exists within a park. Currently, the rides' status is not taken into account.

This PR ensures a ride with status "closed" will no longer attract the penalty. Only open or broken rides will do so.

In other words, this PR removes ill-deserved punishment for players who:

- Use (partial) rides as scenery
- Build replacement rides while keeping the originals open

Also refactored the code slightly to decrease average-case runtime.
2017-03-24 08:13:04 +01:00
Ted John 481f5d706f Fix compilation and refactor GetFrameImage 2017-03-23 17:37:25 +00:00
Ted John 3f53f8cb5d Refactor duck to C++ 2017-03-23 17:37:25 +00:00
duncanspumpkin 60fb821675 More refactoring 2017-03-13 17:33:50 +00:00
duncanspumpkin b2bab06235 Apply cpp style 2017-03-13 17:33:49 +00:00
duncanspumpkin 652cf510e5 Continue refactor. Fix bug with provisional tracks.
Note this might bring back #4728.
2017-03-13 17:33:48 +00:00
Ted John bcc0bfa485 Rename climate.h to Climate.h 2017-03-11 22:59:33 +00:00
Ted John 04a3c73c59 Refactor climate.h structs 2017-03-11 22:59:32 +00:00
Michał Janiszewski 2f66ac2c11 Fix errorneous access to sound params in vehicle_update_sound_params 2017-03-11 22:14:38 +01:00
duncanspumpkin 8bd374f9dd Fix #5275. Door animations now play correctly.
Mistake caused when refactoring. I did some copy paste coding and forgot to test it. On top of that mistakenly thought 0x30 >> 3 = 12 when it equals 6.
2017-03-07 19:44:14 +00:00
Michał Janiszewski 7341f4aadd Remove trailing whitespace
[ci skip]
2017-03-07 20:38:11 +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 adab7f7a6d Add set animation frame function 2017-02-25 09:36:28 +00:00
duncanspumpkin 7691dc3c10 Use functions to set and get secondary colour 2017-02-25 09:19:31 +00:00
Ted John af7af61536 Merge pull request #5240 from IntelOrca/refactor/config-cpp-2
Refactor config
2017-02-25 01:35:03 +00: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
Michał Janiszewski 0f40930ec9 Clamp values in vehicle.c to prevent signed overflow 2017-02-19 22:48:27 +01:00
Ted John f73aebe51d Fix #5238: RCT1 import: Rides are initially free when placing them 2017-02-19 11:19:29 +00:00
duncanspumpkin 133266deb0 Label fence offsets 2017-02-19 11:03:05 +00:00
Ted John fb2c835d52 Include new config header 2017-02-18 15:45:10 +00:00
duncanspumpkin 50e1c831a6 Refactor fence door animation 2017-02-18 08:26:33 +00:00
wolfreak99 6e8e2038f5 Prevent signed addition overflows in multiple places 2017-02-17 23:46:23 +01:00
Michał Janiszewski 7d62c70c59 Initialise variables to default values 2017-02-17 08:50:58 +01:00
duncanspumpkin cab367aa24 Label known flags 2017-02-15 21:41:03 +00:00
Ted John fbe0e2504a Do not use RWops for saving track designs 2017-02-11 12:40:38 +00:00
Ted John 4d16e3e1bd Remove use of RWops from track design 2017-02-11 12:03:03 +00:00
Gymnasiast 6c21b469d4 Correctly save booster speed, fixes #5032 2017-02-10 00:32:41 +01:00
Marijn van der Werf 5504471715 Fix #5188: Clicking on a Magic Carpet doesn't open the ride window 2017-02-08 22:22:25 +00:00
Michael Steenbeek f0f26ee297 Fix one failing testpaint test 2017-02-05 12:41:37 +00:00
duncanspumpkin fef7445f0c Use flags where known. Refactor large 3d signs slightly 2017-02-04 08:12:44 +00:00
Michael Steenbeek cad39c788a Remove more magic values from metal_a_supports_paint_setup 2017-02-02 21:54:19 +01:00
wolfreak99 99c68439b1 define MAX_PEEP_SPAWNS and MAX_PARK_ENTRANCES (#5119) 2017-01-29 22:27:14 +01:00
duncanspumpkin e2efb66d3d Minor refactor of banner and footpath enums 2017-01-29 09:40:43 +00:00
duncanspumpkin 3633b86405 Minor refactor of track design to label enums 2017-01-28 09:28:11 +00:00
Ted John 438926c08c Protect ride_mechanic_status_update from null mechanic 2017-01-26 23:30:16 +00:00
Gymnasiast 79f9cf611d Guard better against incorrect subtypes 2017-01-26 23:30:16 +00:00
Gymnasiast d476176d73 Import more fields, name mechanic flags, fix booster behaviour 2017-01-26 23:30:16 +00:00
Ted John 53c788d9d9 Fix #5003: Able to remove entrance/exit of unedittable rides 2017-01-26 23:24:59 +00:00
Gymnasiast 8f81485c46 Correct spelling of 'block brakes', use constant 2017-01-25 02:33:17 +01:00
Michael Steenbeek a4d5f764f4 Implement diagonal flat-to-steep slopes on the Junior RC, fixes #4584 2017-01-24 09:26:30 +01:00
Ted John 8d959fa519 Merge pull request #5085 from IntelOrca/refactor/structs/various
Create new OpenRCT2 news item struct
2017-01-22 16:15:42 +00:00
Marijn van der Werf 2c6100afcb Fix wrong vertical tunnel offsets 2017-01-18 00:01:58 +01:00
Ted John 71f83cd7a7 Dissociate rct_news_item from RCT2 2017-01-17 12:51:02 +00: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
Broxzier 2235390ce2 Fix 5079 don't remove walls when building stalls and footpaths 2017-01-16 14:28:16 +01:00
Ted John 7edf1e8b7f Merge pull request #4936 from Broxzier/short
Because of a comment on a diff in #4878 asking for clearer and more consistent type usage. What this PR changes:

No unsigned long long found
(signed) long long -> sint64
unsigned int -> uint32
(signed) int -> sint32
(signed) long -> sint32
unsigned short -> uint16
(signed) short -> sint16
unsigned char -> uint8
No signed chars found
plain char is implementation-defined, so I left those in.
2017-01-14 23:41:47 +00:00
Ted John fe389be7c9 Remove unused ride entry flags 2017-01-14 17:37:15 +00:00
Ted John 8f57e514fe Name more ride entry flags 2017-01-14 17:36:47 +00:00
Ted John 769d86e7cc Refactor vehicle_update_boat_location 2017-01-14 17:36:32 +00:00
Ted John f4cea0e6c8 Name a couple of ride entry flags and format enum 2017-01-14 16:48:56 +00:00
Broxzier b80b71cf81 Fixed typos and warnings after rebase 2017-01-14 14:31:06 +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 aed5c0aa60 Name flag: RIDE_TYPE_FLAG_26 2017-01-13 13:20:16 +00:00
Ted John ae7048b2a7 Name flag: RIDE_TYPE_FLAG_30 2017-01-13 13:16:51 +00:00
Ted John 053f8a70bf Name flag: RIDE_TYPE_FLAG_18 2017-01-13 13:13:24 +00:00
Ted John cf0c489d40 Name flag: RIDE_TYPE_FLAG_13 2017-01-13 13:08:56 +00:00
Ted John bdc5078003 Name flag: RIDE_TYPE_FLAG_6 2017-01-13 13:04:11 +00:00
Ted John ef2ddbf462 Name flag: RIDE_TYPE_FLAG_20 2017-01-13 12:55:47 +00:00
Michał Janiszewski 0a36af19e4 Mark classes as final to help devirtualisation 2017-01-13 12:12:50 +01: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
Michael Steenbeek 2a435bfdae Use constants for block brakes and some other elements 2017-01-13 09:49:29 +01:00
Ted John d70cd3775e Fix silent warnings 2017-01-12 18:40:49 +00:00
Ted John b79af110c7 Fix more warnings 2017-01-12 18:02:28 +00:00
Ferdinand Thiessen afbe1dda0f Fix 'No real prototype' warnings 2017-01-12 09:52:44 +01:00
Michael Steenbeek 92feea1612 Clean up metal supports 2017-01-11 20:23:47 +01:00
X123M3-256 7c7b67f665 Do not deselect boosters after building one, fixes #4975 2017-01-09 22:51:16 +01:00
Michael Steenbeek 1c2458b6dd Combine drawing of the Spiral and Mini RC (#5025) 2017-01-09 22:09:33 +01:00
duncanspumpkin ac5b0b0cf5 Rename sprite list vehicle to train to reflect true use
This was found during the rct1 vehicle import branch. When importing it would load all vehicles into this list only to find that each car was treated as a seperate train.
2017-01-07 16:59:46 +00:00
Michał Janiszewski 1a2227289a Limit vehicle search to valid ones only 2017-01-07 14:54:30 +00:00
Ted John 60cb84fd9d Handle nullptr for object when getting track designs 2017-01-05 18:19:20 +00:00
Ted John e1ace9528d Use std::string for File and FileScanner 2017-01-05 18:19:01 +00:00
Ted John 11477c5869 Refactor more of TrackDesignRepository to std::string 2017-01-05 17:51:31 +00:00
Ted John be035dcdb2 Refactor various methods to use std::string 2017-01-05 13:13:22 +00:00
Ted John f201a8b43a Refactor TrackDesignRepository.cpp 2017-01-05 12:55:41 +00: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