Commit Graph

305 Commits

Author SHA1 Message Date
Ted John 487fcc3c5b Fix #4134: Can't enable park-wide photo price for log flume and river ra
Caused by not shifting the shop item flags (those above 32) to the correct mask bit.
2016-07-19 18:35:44 +01:00
Michał Janiszewski 9f57c82653 Refactor access to g_sprite_list
Hide g_sprite_list behind accessor function with a check. `assert` is
temporarily disabled, as it breaks nearly every park.
2016-07-17 22:19:34 +02:00
Ted John 304d6d9304 Fix #4110: guests still get charged for rides 2016-07-16 16:27:49 +01:00
Michał Janiszewski a6d0e6916e Fix function definitions to match their declarations
This makes sure every function is properly declared, which includes
proper `extern` wrappers.
2016-07-14 14:11:49 +02:00
Marijn van der Werf 5204fb0ce9 Clean up string and sprite ID's (#3977) 2016-07-14 14:07:49 +02:00
Ted John dca816cfd3 Merge pull request #4024 from IntelOrca/refactor/object-list
Refactor and improve the object system:
- Objects are now exported to user directory under 'object'.
- Object directories are scanned recursively.
- Improves reliability of object loading and handling of bad objects.
- Improve performance of object scanning.
- Only load new objects when loading a new game.
- Improve changing language experience.
2016-07-11 23:45:45 +01:00
Ted John edb4a4a822 fix get capacity string for vehicles 2016-07-11 22:50:55 +01:00
Sijmen Schoon d8bc890d0a Exit scenery selection mode when done saving 2016-07-11 19:13:30 +02:00
Sijmen Schoon a194c91997 Use OpenRCT2 dialog for saving tracks 2016-07-11 19:13:30 +02:00
jensj12 f4690fb879 Remove duplicate check (#3743) 2016-05-26 15:56:57 +01:00
Martin Černáč 4d5b9c97fd Fix #3685. Also refactor related enum value. (#3686) 2016-05-20 22:29:33 +01:00
Martin Černáč 4944fe1836 Fix a Copy-paste induced mistake (#3679) 2016-05-20 09:49:08 +01:00
Martin Černáč c8b8f0f226 Refactor and add better operation-mode bound checks (#3600) 2016-05-19 18:21:36 +01:00
Duncan 163c695a13 Merge pull request #3538 from marijnvdwerf/paint-setup/submarine-ride
Paint Submarine Ride
2016-05-18 22:06:03 +01:00
Marijn van der Werf 1bf9dc26f9 Rename entrance flags to base_image_id 2016-05-18 23:00:26 +02:00
Martin Černáč 3bdc06dc25 Refactor hard-coded strings to use string_ids.h constants (and couple sprites too) (#3658) 2016-05-18 21:51:37 +01:00
Martin Černáč 2b6770bfad Fix redundat separator in ride's measurement & test data window tab (#3654) 2016-05-18 21:04:57 +01:00
Martin Černáč feed51de27 Add correct tooltip entry for the no. circuits (#3650) 2016-05-18 12:56:30 +01:00
Ted John cbf9a393f1 remove use of get_format_arg
Because of strict aliasing, we must use memcpy in some cases.
2016-05-15 22:40:25 +01:00
Ted John 1cc35dfe6e integrate common format args 2016-05-15 22:03:53 +01:00
janisozaur ca430e1b23 Drop unused variables (#3586) 2016-05-13 18:21:58 +01:00
janisozaur 658e877955 Name all the typdef-ed structs (#3581) 2016-05-12 22:57:40 +01:00
Ted John aa929e1593 add globals for researched things, cleanup 2016-05-10 00:00:59 +01:00
Ted John 3c3a37073d add global macro for gSamePriceThroughoutPark 2016-05-09 21:18:44 +01:00
Ted John f9074485f9 integrate more variables 2016-05-08 14:04:04 +01:00
Ted John cbc1848db4 refactor track design save: _trackSavedMapElements 2016-05-08 14:04:00 +01:00
Ted John c0fa762fa5 integrate some unknown variables 2016-05-08 14:04:00 +01:00
Ted John 1908743c71 refactor track save, move into own source 2016-05-08 14:03:49 +01:00
Ted John 77e7313540 move track design related functions to new source 2016-05-08 14:03:48 +01:00
Gymnasiast 17626dbb1a Increase station limit to 32, fix display of plural 2016-05-06 18:30:44 +02:00
janisozaur 68bad6505c Add and correct licence headers to all sources (#3108) 2016-05-04 18:24:41 +01:00
Patrick de Wit 60579932ef Fix overflow in ride_mode_tweak (#3478)
Fixes #2529: Time overflow when unlocking dodgems' operating limits
Fixes #3424: Max. people on ride overflows when operating limit is unlocked
2016-05-03 14:44:54 +01:00
Gymnasiast 5d0b79227f Clean up some magic values and refactor a bit 2016-05-03 07:25:19 +02:00
Michał Janiszewski 1cd1144dd5 Janitorial fixes
Mostly style fixes, includes minor change to make sure spinner's down
button gets shown, update to string IDs, network version and making sure
correct string gets selected based on car count.
2016-05-02 22:35:08 +02:00
X7123M3-256 0efd6ca88b Remove unused local variables 2016-05-02 21:37:10 +02:00
X7123M3-256 102521d131 Replace dropdowns with spinners 2016-05-02 21:37:09 +02:00
X7123M3-256 3a4139eea0 Prevent car count being incorrectly updated 2016-05-02 21:37:09 +02:00
X7123M3-256 fd5bb09271 Remove calls to ride_entry_get_train_layout and replace with calls to ride_entry_get_vehicle_at_position 2016-05-02 21:37:08 +02:00
X7123M3-256 34a67436cd Fix spacing around operator 2016-05-02 21:37:08 +02:00
X7123M3-256 35ccd0b8e1 Implement disable train length limits cheat 2016-05-02 21:37:08 +02:00
Ted John 5ccbf08ac9 add global macros for staff colours 2016-04-24 11:12:24 +01:00
Ted John ee509caf35 integrate game paused variable and refactor 2016-04-23 13:34:55 +01:00
Ted John 4cdb2df9dc integrate screen variables 2016-04-23 11:16:46 +01:00
Ted John 1950fad315 add global macros for date 2016-04-23 11:03:34 +01:00
Ted John 467513616d add global macro: gCurrentTicks 2016-04-23 02:49:24 +01:00
Ted John 307cb9e08b add global macro: gParkFlags 2016-04-23 00:51:22 +01:00
Michael Steenbeek b13d0aa2d3 Fix ride window height definition, fixes #3347 (#3348) 2016-04-19 19:08:24 +01:00
Ted John 63f008566c Merge branch 'master' into develop 2016-04-15 23:25:45 +01:00
Ted John 84edd049d9 integrate current tool variables:
- gCurrentToolId
- gCurrentToolWidget
2016-04-15 18:26:47 +01:00
Ted John 1b3f46f960 integrate game command error string variables
- gGameCommandErrorTitle
- gGameCommandErrorText
2016-04-15 17:54:46 +01:00
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