Commit Graph

305 Commits

Author SHA1 Message Date
duncanspumpkin 51ba0b2e1d Fix #3302. Max ride mode tweak has been broken since a refactor. 2016-04-14 20:27:09 +01:00
Michał Janiszewski 83a543c86f Make sure shifted value can fit in uint32 2016-04-03 17:49:50 +02:00
Michał Janiszewski f5f2f62507 Cap dropdown items count to 64 2016-04-03 17:38:57 +02:00
IntelOrca d690ee6423 fix #3183: opening ride with construction window open
Issue caused with boat hire rides as there is usually a ghost station present when the construction window is open. This causes vehicles to be created in the ghost station. Fixed by closing the construction window before the vehicles are created for the ride.
2016-03-27 14:18:20 +01:00
IntelOrca 304fd4b84e validate all the other ride operation settings 2016-03-22 21:59:16 +00:00
IntelOrca 16e8609da3 add constants for ride setting id 2016-03-22 21:32:37 +00:00
IntelOrca b8edcd50e1 fix #3107: Number of sold items is reset after some time
Number of sold items was being overwritten by a memmove on the field before it.
Queue time changed to only be drawn for rides.
2016-03-07 21:34:26 +00:00
IntelOrca 1d99c233f6 fix #3008: construct ride that isn't placed yet causes side effects 2016-02-29 20:24:00 +00:00
Gymnasiast ddf3d7a03d Consistently use 'colour' rather than 'color' 2016-02-28 20:32:02 +01:00
IntelOrca 22a194ffa6 clamp ride overview viewport zoom level to allowed range 2016-02-27 13:30:00 +00:00
Michał Janiszewski 4a24aa6cf3 Don't crash if mapElement is null
This allows for loading parks such as "Cocopa Bay"
2016-02-26 23:05:01 +01:00
Michał Janiszewski 6b514d1e3a Fix possible issues highlighted at higher warn levels
Mostly possibly uninitialized values and signedness
2016-02-26 12:54:00 +01:00
Alexander Overvoorde 6311b5588d Fix ride overall views being recalculated constantly 2016-02-25 19:31:46 +01:00
Alexander Overvoorde 4a42b09bb3 Add new overall view logic 2016-02-25 19:31:46 +01:00
Alexander Overvoorde fe6d50f942 Fix overall view position using z coordinate of arbitrary element in same column (fixes #2636) 2016-02-25 19:28:43 +01:00
Michał Janiszewski 14bff0c66f Rename rct_ride_type to rct_ride_entry 2016-02-25 13:33:19 +01:00
Michał Janiszewski d19fe0e334 Make sure null ride type gets handled properly 2016-02-24 23:16:25 +01:00
Michał Janiszewski eb645cd4f3 Rename ride_entry functions and provide better logging
For hacked rides, provide the name of offender in the log.
2016-02-24 22:23:33 +01:00
IntelOrca 3583d601ad name flag: RIDE_TYPE_FLAG_15 2016-02-20 16:37:09 +00:00
IntelOrca bd040918a1 use helper functions instead of direct access to 0x00982164 2016-02-20 16:30:08 +00:00
Alexander Overvoorde d07b7159c8 Add amount of customers currently on ride to customers tab 2016-02-13 04:23:59 +01:00
IntelOrca caf9bd9939 get game working with new theme manager
Theme editor currently unavailable.
2016-02-03 18:23:44 +00:00
Michał Janiszewski ec2387082c Remove cheats from config 2016-01-25 21:44:13 +01:00
duncanspumpkin ba314c6fc8 Fix dropdown default highlight regression 2016-01-25 17:11:56 +00:00
Michał Janiszewski 6d6f9f3c23 Refactor rides to be only accessible with getters
This changes how rides are accessed from macros to getter functions.
2016-01-23 01:13:36 +01:00
IntelOrca 7c8245a63f fix #2749: inverse logic for removing colour tab on rides 2016-01-17 12:27:43 +00:00
Marijn van der Werf 94e47be3e3 Use `ride_type_has_flag` for checking ride type flags 2016-01-15 21:02:39 +01:00
Marijn van der Werf 98b5ad1bf4 Replace known addresses with constants 2016-01-15 21:01:34 +01:00
IntelOrca b7484db239 refactor clip_drawpixelinfo to not allocate memory 2016-01-14 20:12:44 +00:00
duncanspumpkin f2b70b74aa Fix incorrect common format offset causing issues when changing colour scheme 2016-01-14 17:47:06 +00:00
Marijn van der Werf e961cc885a Use RCT2_ADDRESS_COMMON_FORMAT_ARGS instead of raw address 2016-01-11 12:55:33 +01:00
Michał Janiszewski 133096cd64 Merge branch 'develop' into vehicle-update 2016-01-05 09:59:53 +01:00
IntelOrca f0adf90660 integrate variable: gInputFlags 2016-01-04 22:53:03 +00:00
Jonathan Haas 4d26e4c4a1 Refactor peep code
Name various fields and constants related to peeps. This includes:
  - Flags for flashing peeps in map window
  - Animation frames for picked up peeps
  - Function checking if peep should start to fall
  - Special sprite handling for slide boards and lawn mowers
  - Created array for peep sprite entries, renamed some variables and constants
2015-12-31 13:57:06 +01:00
Michał Janiszewski 8a5d066efe Fix strict aliasing violations
Compiler only guarantees proper accesses to variables when using
variable's native type or `char` (i.e. single byte type) [1].

This commit fixes violations of this rule. In most cases changing code
to a simple cast was enough, some required a bit deeper modifications.

This fixes #2596.

[1] http://blog.qt.io/blog/2011/06/10/type-punning-and-strict-aliasing/
2015-12-31 13:27:26 +01:00
Michał Janiszewski 5f66cd48f8 Merge branch 'develop' into vehicle-update
Conflicts:
	openrct2.vcxproj.filters
2015-12-31 11:41:23 +01:00
Michał Janiszewski 4c6ee9570c Merge branch 'develop' into vehicle-update
Conflicts:
	openrct2.vcxproj.filters
2015-12-27 18:11:13 +01:00
Jonathan Haas b71c649d45 Refactor ride customer count
Renamed some confusing ride fields, extracted function to get recent ride customer count.
2015-12-26 22:03:33 +01:00
Aaron van Geffen 020334fa18 Name rct_window's var_494: highlighted_item. 2015-12-26 18:46:19 +09:00
Aaron van Geffen 9232a9906f Inventarised instances of RCT2_ADDRESS_COMMON_FORMAT_ARGS 2015-12-26 18:24:36 +09:00
Michał Janiszewski cd2ec16290 Merge branch 'develop' into vehicle-update
Conflicts:
	openrct2.vcxproj.filters
	projects/openrct2.vcxproj
2015-12-23 19:47:16 +01:00
Michał Janiszewski e666a24c82 Merge branch 'develop' into vehicle-update
Conflicts:
	projects/openrct2.vcxproj.filters
	src/audio/mixer.cpp
	src/windows/ride.c
2015-12-22 14:57:40 +01:00
IntelOrca db18fa8f14 finally fix #1619: Can't place any path
RCT2_ADDRESS_TOOL_WIDGETINDEX was being read as an int32 sometimes
2015-12-21 22:28:34 +00:00
Gymnasiast dd460300ca Extend fast lift hill cheat and update description 2015-12-20 21:12:24 +01:00
IntelOrca 12fdf1f5e7 name vehicle entry flags 2015-12-16 19:12:58 +00:00
duncanspumpkin c00669c942 Merge sub_6DAB4C into vehicle-update 2015-12-14 21:56:00 +00:00
Kyle Kirby caf07c2064 Clean up the comments a litte
• Make comment heads be /**
• Make rct2 addresses be double spaced indented
• Make there be a space afte rct2: and the address
• Make single-line rct2 addresses be full block comments
• Move description of method to top of comment
2015-12-11 16:19:46 -06:00
Ted John ebcde1b231 Merge pull request #2418 from janisozaur/fixes
fix remaining suspicious left shifts
2015-12-05 14:20:29 +00:00
duncanspumpkin 53fa41f2b1 Implement ride lift data 2015-12-05 10:49:12 +00:00
Duncan Frost 79fb099c21 Added more of update measurements 2015-12-05 10:48:53 +00:00
Duncan Frost 5e198dfa1f Add known ride offsets 2015-12-05 10:48:52 +00:00
duncanspumpkin 11398cf60f Fix warning. 2015-12-04 16:57:43 +00:00
Michał Janiszewski 796021cfdc fix suspicious left shifts
See b5b1957f5
2015-12-02 08:32:15 +01:00
duncanspumpkin b9f7f6f4a2 Fix #2395. Fix pressing construct twice 2015-11-29 17:18:42 +00:00
duncanspumpkin 4527aa263e Added check to match mechanic fix 2015-11-29 17:18:41 +00:00
duncanspumpkin cae7b03bdf Fix #1717. Fixes fix ride from failing to fix safety cut out.
As the code to fix rides has not been completed yet it was unknown that safety cutout had so many flags requiring reseting
2015-11-29 17:18:40 +00:00
Dom Light 3a8b25a0ee Sanitize audio.h 2015-11-17 01:05:14 +00:00
Michał Janiszewski 075b98e209 Minor cleanups
Mostly just setting variables to better define game state, with one
minor update of decompilation where an `or` instruction was used in
place of `mov` (in `sub_6CBCE2`).
2015-11-12 12:19:40 +01:00
Gymnasiast 4ba83b0418 Rename RIDE_ENTRY_HIDE_LAST_OPERATING_MODE to RIDE_ENTRY_DISABLE_LAST_OPERATING_MODE 2015-11-08 15:01:40 +01:00
Gymnasiast e749c1a82c Identify RIDE_ENTRY_FLAG_15 and 17, fix 'Show all operating modes' cheat 2015-11-08 14:55:01 +01:00
Michał Janiszewski c0e2a5c7be Add get_current_rotation function and DEBUG_LEVEL macros 2015-11-02 22:58:15 +01:00
Jonathan Haas d2ec665ae4 Fix Bug #2138 2015-11-01 09:59:13 +01:00
Alexander Overvoorde 01793e11b7 Replace RCT2_GLOBAL magic numbers with address identifiers and string ids 2015-10-29 09:44:46 +01:00
IntelOrca 8d84b540ad add vehicle struct and enum labels from vehicle-update branch. 2015-10-25 21:26:03 +00:00
IntelOrca 4ac42ff1b2 add vehicle struct, enum labels and helper functions from implement-ride-create-vehicles branch. 2015-10-25 16:00:21 +00:00
Michał Janiszewski 8e45cccb7a Minor fixes
Includes (mostly) type fixes, dead code removal, signed vs unsigned
comparison fixes, memory leaks removal.
2015-10-21 08:47:09 +02:00
Michał Janiszewski 7d0ce00bab Strip all whitespace 2015-10-20 20:48:51 +02:00
IntelOrca 3855d70d1a fix dropdown 64 item support and remove old RCT2 addresses 2015-10-14 21:01:04 +01:00
Gymnasiast d71ca1f376 Extend dropdowns to hold up to 64 items (with bugs) 2015-10-14 16:19:50 +02:00
Gymnasiast a1cc3e4759 Fix vehicle dropdown when 'Select-by-track-type' off and 'Show vehicles from other track types' on 2015-10-12 16:01:58 +02:00
Gymnasiast 105280a082 Introduce cheat option to show vehicles from other track types 2015-10-12 15:58:15 +02:00
Jonathan Haas ae82ffcd96 Rename window flags 2015-10-03 17:20:53 +02:00
Gymnasiast 4909272a44 Add cheat option to show all operating modes; cleanup 2015-09-18 10:54:48 +02:00
IntelOrca 4dd95c650b implement RideData4 data 2015-09-10 22:16:41 +01:00
Gymnasiast ea9f87d0f3 Remove faulty copy-and-pasted check on secondary items, fixes #1866 2015-09-02 12:42:43 +02:00
Gymnasiast c00e044b6c Multiplayer interface improvements, cleanup 2015-08-16 13:14:04 +02:00
Gymnasiast 46a0529f40 Add comment to clarify that non-inventioned rides are skipped 2015-08-07 22:34:15 +02:00
IntelOrca 6b72f9a555 refactor shop item strings 2015-08-05 19:17:37 +01:00
IntelOrca cec486839c add 'no entrance' style and refactor a few things 2015-08-05 01:24:18 +01:00
Gymnasiast 5ed8948e4f Remove Six Flags branding and limitations, mark the lifecycle flag as deprecated, rename previously unidentified flag 2015-07-27 21:47:55 +02:00
Matt Layher 06f2adb9d6 Properly merge #1672: incorrect plural form for last inspection time, fixes #1513, closes #1672 2015-07-26 21:30:29 +01:00
IntelOrca b2d620bb9d implement window_ride_measurements_tooldown and refactor track save scenery 2015-07-13 20:43:17 +01:00
IntelOrca 3ffffc699c clean up and remove various callprocs 2015-07-12 01:46:52 +01:00
IntelOrca f906391c9d remove registers from window events and changed to typed signatures 2015-07-10 01:39:16 +01:00
IntelOrca c3d5d5f6c2 implement game_command_set_ride_vehicles 2015-06-29 16:14:56 +01:00
IntelOrca 4ada15c972 implement ride_update_max_vehicles 2015-06-29 15:13:42 +01:00
IntelOrca c6e84181cb implement ride_entry_get_train_layout 2015-06-29 01:24:07 +01:00
Gymnasiast ca1b88fc53 Don't modify flags when in select_by_track_type mode; make it switchable in-game again. 2015-06-25 11:46:17 +02:00
IntelOrca 474d300578 change enabledTrackPieces to 64 bit integer in ride type struct 2015-06-24 16:43:21 +01:00
Gymnasiast a6225ebf06 Add option to select by track type (RCT1 style); correct misspellings of 'separate' 2015-06-24 12:41:19 +02:00
IntelOrca 3feacc3400 fix #1356 2015-06-15 22:08:03 +01:00
rd3k 628a586ea2 Tidy window flags 2015-06-13 22:16:14 +01:00
IntelOrca b2e9559d31 fix window issues, fixes #1306 2015-06-11 13:04:55 +01:00
Robert Jordan fb828afa1a Added RCT1 light tooltips 2015-06-10 11:47:54 -04:00
Robert Jordan d7a4474bcd Removed irrelevant comments stating false facts 2015-06-09 23:18:20 -04:00
Robert Jordan 32b79ea216 Fix ride works for all breakdown types 2015-06-09 23:17:08 -04:00
Robert Jordan 98501a51f3 Fix Ride is greyed out when it doesn't work 2015-06-09 23:05:43 -04:00
Robert Jordan e7332b2d94 Fixed maintenance bar 2015-06-09 22:43:14 -04:00
Robert Jordan bf2ac564fb Fixed merge conflicts 2015-06-09 20:19:19 -04:00
Robert Jordan 10c1c29c11 Can now force ride breakdowns 2015-06-09 20:18:04 -04:00
Robert Jordan 0f955d0d92 Decompiled toggle ride price 2015-06-09 17:00:11 -04:00
IntelOrca dc3fe2a6c8 remove commented out CALLPROCs and CALLFUNCs 2015-06-09 15:09:45 +01:00
Robert Jordan fcbe561ad8 Decompiled Ride Prices 2015-06-08 21:28:07 -04:00
Robert Jordan 21734bd71f Fixed open button y 2015-06-07 20:56:31 -04:00
Robert Jordan 9960c8d901 Fixed merge conflicts 2015-06-07 20:37:56 -04:00
Robert Jordan e90c724a3a Rewrote Themes
Added rct1 styles and lights.
Themes are now easier to expand
Added features tab to themes window
2015-06-07 20:31:54 -04:00
Duncan Frost 97966ac707 Implemented scenery_set_setup for research.
I've also labelled ride_type->flags.
2015-06-07 19:19:16 +01:00
IntelOrca 65377629e4 implement track save select nearby scenery 2015-06-07 16:02:43 +01:00
danidoedel 89e4b1c824 fix status label position 2015-06-04 17:27:56 +02:00
IntelOrca ab2e6a867f refactor ride names and show ride type/s on object selection window 2015-06-03 19:14:45 +01:00
IntelOrca 1d622ed3e2 add more ride rating calculations and refactor ride operation mode 2015-06-02 19:59:55 +01:00
Ted John 954db85e8c Merge pull request #1193 from zsilencer/bugfix
#1192
2015-06-01 21:36:54 +01:00
zsilencer 603233a583 #1192 2015-06-01 13:07:18 -06:00
Robert Jordan 765bf976ee Renamed Colour Schemes to Themes
Themes window now opens to settings/presets tab so it's less confusing
for others.
Can no longer change default presets, you get a warning when you try.
now stores themes in themes folder.
Now clips theme names.
2015-06-01 11:02:09 -04:00
Robert Jordan 41171aa304 Resolved Merge Conflicts 2015-05-30 16:00:13 -04:00
Duncan Frost b2caeaf531 Refactor of code slightly
Since get_map_coordinates_from_pos returns sint16 values I changed it so that it didn't use sint32 values.
2015-05-30 06:27:52 +01:00
Robert Jordan dc1e38180e Starting work on colour schemes config settings 2015-05-29 12:04:53 -04:00
IntelOrca 6426adb45d remove asm for set scroll size and add gCurrentAwards 2015-05-26 19:28:56 +01:00
Gymnasiast 121052b807 Add cheat to unlock both entry and ride prices, reordered misc tab on cheats window 2015-05-22 12:41:22 +02:00
Gymnasiast 36ccfe77e0 Add GUI option for switching to the RCT1 colour scheme, along with proper invalidation of the affected windows 2015-05-21 12:28:51 +02:00
Duncan Frost d3587c2fc5 Fix #1103 and #483
Measurement close is now correctly called when the ride measurement window is closed.
When quiting a scenario tool_cancel is called to also reset the scnery selection mode
2015-05-20 19:18:54 +01:00
Gymnasiast 257e330503 Increase maximum number of laps to 20 and maximum number of people in maze to 64. 2015-05-19 11:18:08 +02:00
Gymnasiast 8f82175fec Allow maxing out launch speed and many other operation settings as well 2015-05-17 17:26:07 +02:00
Gymnasiast 02ba241385 Add cheat option for lift hills up to 410 km/h, fix a comment and some spaces 2015-05-16 17:16:09 +02:00
Gymnasiast 8ed8b56abe Introduce a config-file option for a RCT1-like colour scheme 2015-05-12 16:13:30 +02:00
Robert Jordan c25ef45827 Named 2 input flags, and dropdown fix
Named INPUT_FLAG_1 to INPUT_FLAG_DROPDOWN_STAY_OPEN
Named INPUT_FLAG_2 to INPUT_FLAG_DROPDOWN_MOUSE_UP

placed RCT2_ADDRESS_INPUT_FLAGS where valid and replaced all bitwise
references to it with appropriate input flags.

Changed ride view dropdown to hold only as it should be.
2015-05-07 14:31:11 -04:00
Robert Jordan 1b269675d8 #1044
Fixed drop downs not staying open and music dropdown not working first
time after game opened.
2015-05-07 11:37:49 -04:00
Timmy Weerwag 10c4722a86 Deciphered flags and z param of get_map_coordinates_from_pos 2015-05-03 13:54:08 +02:00
zsilencer ea75926a6c game_command_set_ride_appearance 2015-04-25 09:20:47 -06:00
Duncan Frost 9d8983a5c7 Fix ride graphs and negative lengths 2015-04-14 19:00:29 +01:00
Duncan Frost a822301002 Fix vehicle tab from failing to reload new variables 2015-04-14 18:35:26 +01:00
Ted John e08e4b7f61 Merge pull request #988 from Garogolun/footpath-stuff
Added two footpath functions
2015-04-12 23:15:20 +01:00
IntelOrca 12edf8b4a0 rename unidentified ride entry struct members 2015-04-07 00:16:47 +01:00
Timmy Weerwag fe799f03a5 Added footpath_bridge_get_info_from_pos 2015-04-01 01:45:18 +02:00
IntelOrca 851b0819b9 clean up many CALL_PROCs and implement a few functions 2015-03-31 02:21:30 +01:00
Duncan Frost ddfdfd37be Added start of sub_state_7 2015-03-25 18:36:17 +00:00
Duncan Frost a50b0c4200 Label max/min cars in train offset 2015-03-25 18:36:12 +00:00
Kevin Burke 23bfd13ba9 replace ride_window_invalidate flags with constants 2015-03-23 08:33:07 -07:00
Kevin Burke ebd02d022a Fix hex/decimal flag errors 2015-03-23 08:33:07 -07:00
Kevin Burke 09431278e4 Name the ride window-invalidate flag 2015-03-23 08:33:07 -07:00
Kevin Burke 6423c857a7 Name var_199 as the downtime parameter 2015-03-22 12:28:55 -07:00
Kevin Burke 3862a85666 Name reliability variables
- Rename var_146 to fair_value (it is not reliability)
- Add a helper method get_age_penalty which computes the age penalty for
  a ride.
- Adds a constant for a ride's initial reliability
- Names a subroutine
2015-03-22 08:21:13 -07:00
Michael Steenbeek 111309bd7e Merge pull request #5 from duncanspumpkin/set_ride_setting
Added game_command_set_ride_setting.
2015-03-21 00:02:29 +01:00
Duncan Frost 4171289050 Added game_command_set_ride_setting. 2015-03-20 22:33:06 +00:00
Gymnasiast 981affe04c Refactor powered launch modes, add RCT1 style launch to looping RC. 2015-03-20 17:32:59 +01:00
IntelOrca cd16af0f60 add some event handlers for invalidating map objects 2015-03-18 19:52:45 +00:00
Ted John 1f718cda07 Merge pull request #924 from Gymnasiast/patch-2
Fix negative ride ages
2015-03-18 18:23:32 +00:00
Michael Steenbeek ab5285cf1e Don't reset built dates that are in the future 2015-03-18 16:20:12 +01:00
Ted John d862ff73a7 Merge pull request #891 from Gericom/develop
Implemented some viewport drawing functions
2015-03-17 17:07:37 +00:00
Michael Steenbeek aacef89973 Reset build dates that are in the future 2015-03-17 14:41:57 +01:00