Commit Graph

141 Commits

Author SHA1 Message Date
Aaron van Geffen 2799d96145 Rename PeepData to PeepAnimationData 2024-04-21 22:54:10 +02:00
Aaron van Geffen 642162853f Refactor g_peep_animation_entries into kPeepAnimationEntries 2024-04-21 22:53:37 +02:00
Harry-Hopkinson 47939567c4 Rename CHAT_MAX_WINDOW_WIDTH - kChatMaxWindowWidth 2024-04-17 13:20:37 +00:00
Harry-Hopkinson ba1f066710 Rename PEEP_MAX_ENERGY_TARGET to kPeepMaxEnergyTarget 2024-04-15 15:26:10 +00:00
Harry-Hopkinson cf50b4c8a3 Rename PEEP_MAX_ENERGY to kPeepMaxEnergy 2024-04-15 15:21:49 +00:00
Harry-Hopkinson 04ca18b7c6 Rename PEEP_MIN_ENERGY to kPeepMinEnergy 2024-04-15 15:12:21 +00:00
Harry Hopkinson 530a7de98f
Replace notation in Guest.h 2024-04-15 16:48:41 +02:00
Gymnasiast c158854a7f
Move Park into namespace, add other park-related things to struct 2024-04-04 18:14:27 +02:00
ζeh Matt 84d1f502b1
Rename NO_TRAIN to kNoTrain 2024-03-30 23:18:51 +01:00
Michał Janiszewski 43507671b5
Fix crash on null ride in Guest::UpdateRideLeaveExit (#21668) 2024-03-26 11:46:34 +00:00
Claudio Tiecher b60483f25d Part of #21421: Refactor VEHICLE_SEAT_NUM_MASK 2024-03-25 16:17:32 +01:00
Claudio Tiecher 13e9ff84c2
Part of #21421: Replace define with constexpr (#21626)
* Part of #21421: Refactor RIDE_INITIAL_RELIABILITY in Ride.h

* Part of #21421: Refactor STATION_DEPART_FLAG and STATION_DEPART_MASK

* Part of #21421: Refactor MAX_STATION_PLATFORM_LENGTH

* Part of #21421: Refactor RIDE_RATING_UNDEFINED

* Part of #21421: Refactor TRACK_BLOCK_END

* Part of #21421: Refactor TRACK_PREVIEW_IMAGE_SIZE

* Part of #21421: Refactor based on feedback

* Part of #21421: Fix signed/unsigned mismatch on Win

* Improved consistency kTrackPreviewImageSize

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Part of #21421: kMaxStationPlatformLength to int8

---------

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2024-03-24 21:49:50 +00:00
Matt 6633509af6
Refactor peep update (#21605) 2024-03-16 06:35:55 -03:00
Duncan 4b6ba80a46
Move cheats to struct in GameState_t 2024-03-03 22:44:15 +01:00
mrmbernardi 4ccecd6e68
Remove forwarding functions in Window.cpp (#21516) 2024-03-03 18:04:09 +01:00
Andrew 5aed126cac
Use new colours for peeps' clothing when they spawn 2024-03-02 02:06:47 +01:00
Harry Hopkinson 7797db10c8
Replace Macros and Notation in Cheats.h, common.h and Context.h. (#21437) 2024-02-23 19:30:35 -03:00
Harry Hopkinson 8816aa607c Move gNextGuestNumber to Gamestate_t 2024-01-25 09:34:47 +00:00
Michael Steenbeek b200ce02ef
Fix merge error (#21257) 2024-01-24 12:00:41 +01:00
Harry Hopkinson 42336915cd
Move gClimateCurrent to GameState_t 2024-01-24 11:18:54 +01:00
Michael Steenbeek b5786c2a86
Move gGuestInitial* to GameState 2024-01-22 22:28:16 +00:00
Hielke Morsink 13351d996e #21193: Move gParkFlags to GameState_t, refactor uses
Also changed a few instances where GetGameState was called inside the same function.
The change in Peep.cpp is needed because of a function conflict. FormatStringID exists both in the global and in the OpenRCT2 namespace.
2024-01-22 16:31:35 +01:00
ζeh Matt a5dde0f8dc
Replace gCurrentTicks with the one in GameState_t 2024-01-19 16:32:19 +02:00
James103 1d8dc111f1
Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
Duncan 4349688de4
These function names have not reflected their use for a while (#20656) 2023-08-01 20:19:33 +01:00
Matthias Moninger 379287ed0f
Remove legacy stuff in common.h (#20523)
* Remove old interop macro

* Remove legacy string macro things

* Unbreak the posix/linux/unix builds

* Add String::IEquals and use it for case insensitive compare

* Add missing include for posix

* Replace _strnicmp with String::StartsWith

* Add LoByte and HiByte into Util.h, swap macros

* Fix android build

* Hopefully last of the string things

* Replace STUB directly with the warning
2023-07-02 12:59:20 +03:00
Aaron van Geffen d425e0a8bb Remove const qualifier from constexpr statements 2023-06-24 11:45:26 +02:00
ζeh Matt 12bc9777d3
Cleanup calls to GetShopItemDescriptor in Guest::DecideAndBuyItem 2023-05-25 17:50:09 +03:00
ζeh Matt 454c5aa819
Use unsigned type for ScenarioRand 2023-05-25 17:46:27 +03:00
Michael Steenbeek 58baa85a27
Small path additions cleanup (#20076)
* Split off path addition paint calls

* Replace occurences of “path bit” with “path addition”

* Replace occurences of “footpath item“ with “path addition”
2023-05-09 20:08:25 +01:00
Duncan cdccb21dd5
Refactor of colours (#19998)
* Move dropdown functions to dropdown code

* Use a map for the colour tip

* Keep dropdownidx and colour seperated

* Allow number of rows to match vanilla

* Apply review comment

* Bump network version
2023-04-22 08:58:13 +00:00
kyphii 6dfc6225e2
"Reversed Trains" Option (#19305)
* Initial commit for backwards-facing trains

* Allow persistence for reversed cars across save/load

* Make log flume turntable compatible with new reversal implementation

* Style fixes + Better implementation of inverted bank angles

* Further Style Fixes

* Code cleanup from PR feedback

* Fix GetBankRotationForDrawing function declaration

* Use update flag for reversed state

* Replace modulo operation with bit mask

* Correct guest pathing destination when entering reversed cars

* More style fixes

* Add plugin support for reversed vehicles

* Fix formatting error

* Derive reversal from ride mode for car spawning

* Formatting

* Rename function to GetPaintBankRotation

* Add reversed trains modes to Multi Dimension Coaster

* Change name of isReversed plugin API parameter for consistency

* Replace reversal operating modes with separate ride setting

* Add ALLOW_REVERSED_TRAINS flag to more ride types

* Make clang-format happy

* More Formatting

* Fix ALLOW_REVERSED_TRAINS flag on a couple rides

* Exclude flat rides from Reverse Trains tickbox when cheats are enabled

* Formatting

* Use Disable Vehicle Limits cheat for checkbox appearance condition

* Use correct swinging sprites when cars are reversed

* Update changelog and Plugin/Network/Park version numbers

* Formatting

* Add separate error String ID for clarity

* Add name to contributors.md

* Fix ride vehicle preview window with reversed trains for RCT1 train types

* Bump version numbers again

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-21 19:22:33 +03:00
Duncan 9493af44dd
Fix rand colours missing final colour (#19901) 2023-04-11 18:27:45 -03:00
Matthias Moninger 3d5cb20ca6
Merge pull request #19874 from ZehMatt/cleanup-entity
Move sprite related info into its own structure
2023-04-09 23:21:38 +03:00
Matthias Moninger 59198a5126
Merge pull request #19838 from ZehMatt/refactor-tile-access
Refactor tile access
2023-04-08 15:00:19 +03:00
ζeh Matt 8f82aa95b3
Move Direction out and rename it to Orientation to avoid name conflict 2023-04-07 22:46:25 +03:00
ζeh Matt 679f5aac2e
Rename members of EntitySpriteData 2023-04-07 19:47:26 +03:00
ζeh Matt dce21bc8ec
Split move sprite specific data into EntitySpriteData 2023-04-07 19:37:47 +03:00
kyphii 39790779bb
Extend color selection dropdown with more colors (#19446)
* Setup for extended palette

* Define order for color picker cells

* Init G2 Palettes in ColoursInitMaps

* Add Glass Palettes

* Use special sprite for Invisible color

* Set up new cheat for special colors

* Add glass palettes to palette_to_g1_offset

* Add entries for new colors in TranslucentWindowPalettes

* Finish implementation of special colors cheat

* Some cleanup

* New colors almost work

* Correct g2 palette loading indices

* Invisible color sprite displays properly

* Repaint works with large scenery and walls

* Prevent random shop items from overflowing to junk palettes

* More cleanup

* Fix glass palettes

* Add mapping of new colors to original colors for UI themes

* Fix junk palettes for random shop items

* Fix missing highlight color in software renderer

* Convert small scenery support flag to allow use of new colors

* Progress on displaying new colors in software renderer

* Fix invisible color scheme sprite

* Formatting cleanup

* Resolve comparison of integer expressions of different signedness

* Index g2 palette maps to fix visible chain lift

* Progress on fixing new colors in software renderer

* Fix station and support colors

* Fix dropdown selected index

* Get invisible color (mostly) working in software renderer

* Use forceBmp for palette resources

* Remove test function definition left in by mistake

* Remove some obsolete range checks for original color values

* Add changelog entry

* Reorder color dropdown based on NE user feedback

* Some cleanup

* Further cleanup

* Formatting

* Add include for GetPaletteMapIndexForColour

* Fix a couple things I broke

* Fix function placement

* Revert "Add include for GetPaletteMapIndexForColour"

This reverts commit 0af9611e6656d792adb7a36efe7dbf3387a4a759.

* Use color constants for color order list

* Make remappable colors contiguous

* turn off clang format for ordered color list

* Appease clang

* Use all colors for random shop item animation

* Improvements to palette map resources

* Fix chain lifts again + adjustments to a few colors

* Update changelog and contributors.md

* Revert changes to S4 and S6 importers which are no longer needed

* Bump network, plugin, and minimum park versions

* Revert "Progress on displaying new colors in software renderer"

This reverts commit 337602e4a7.

* Remove unnecessary comment

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-06 08:36:07 +01:00
ζeh Matt c248ac58ed
Make passing of CoordsXY explicit 2023-04-05 23:23:19 +03:00
ζeh Matt be45b20de8
Fix parameter deduction for TileElementsView 2023-04-05 22:56:00 +03:00
Michał Janiszewski 1f7ef64627
Fix #19574: Handle exits in null locations (#19727)
In park/replay from dump #19574 there was a calamity that happened
likely due to a plugin. Pretty much all rides were deleted in single
tick, which caused the park to mark some locations as null and then it
tripped on one of the many assertions. In many of the places it already
bails out if ride or vehicle is a nullptr, so I followed with similar
approach for invalid ride exits.
2023-03-28 01:16:55 +03:00
ζeh Matt 5ee5f8013d
Separate game state logic and rendering logic for money entities 2023-03-22 22:28:14 +02:00
ζeh Matt ff1941eb8d
Fix #19586: Guests generated have potentially a large amount of money 2023-03-07 06:46:50 +02:00
Michael Steenbeek dd624f9bff
Replace remaining usages of money16, money32 (#19469)
* Use money64 for ride prices and shop items

* Use money64 for park entrance fee

* Use money64 for gGuestInitialCash

* Use money64 for upkeep costs

* Use money64 for ride value

* Use money64 for marketing campaign cost

* Use money64 for object prices

* Use money64 for land prices

* Use money64 for guest expenditure

* Replace remaining occurrences of money32 with money64

* Update replays

* Bump network version

---------

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-03-02 21:55:42 +00:00
Matthias Moninger c3bd837c42
Fix #19517: Crash when peeps try to exit or enter a hacked ride (#19518)
* Fix #19517: Crash when peeps try to exit or enter a hacked ride

* Update changelog.txt
2023-03-01 08:31:20 +00:00
Duncan b56748bc82
ObjectEntry Cleanup. FootpathItem, SceneryGroup, Water, LargeScenery (#19385)
* Move footpathitem entry into new getter

* Move scenery group entry into new getter

* Move water entry into new getter

* Move large scenery entry into new getter

* Remove unused header includes

* Fix compile issue

* Include missing header from vcxproj
2023-02-15 21:35:16 +00:00
spacek531 df0edc92d0
Vehicle/rename update flags (#19363)
* rename VEHICLE_UPDATE_FLAG_ON_LIFT_HILL

* rename VEHICLE_UPDATE_FLAG_COLLISION_DISABLED

* rename VEHICLE_UPDATE_FLAG_WAIT_ON_ADJACENT

* rename VEHICLE_UPDATE_FLAG_REVERSING_SHUTTLE

* rename VEHICLE_UPDATE_FLAG_READY_DEPART

* rename VEHICLE_UPDATE_FLAG_TESTING

* rename VEHICLE_UPDATE_FLAG_6

* rename VEHICLE_UPDATE_FLAG_ZERO_VELOCITY

* rename VEHICLE_UPDATE_FLAG_BROKEN_CAR

* rename VEHICLE_UPDATE_FLAG_BROKEN_TRAIN

* rename VEHICLE_UPDATE_FLAG_ON_BRAKE_FOR_DROP

* rename VEHICLE_UPDATE_FLAG_USE_INVERTED_SPRITES

* rename VEHICLE_UPDATE_FLAG_12

* rename VEHICLE_UPDATE_FLAG_ROTATION_OFF_WILD_MOUSE

* rename VEHICLE_UPDATE_FLAG_SINGLE_CAR_POSITION

* rename VEHICLE_UPDATE_FLAG_CRASHED

* name flag 12 to Reverse Incline Completed Lap

* name flag 6 to Currently Colliding

* fix formatting

* rename has/clear/set update flag

* fix formatting again

* move to namespace constexpr

* fix formatting

* the one that got away
2023-02-12 22:32:16 +00:00
ζeh Matt bf9efc7f84
Rename some variables 2023-02-05 17:52:47 +02:00
ζeh Matt a2a06d6dde
Return const RideObjectEntry*, refactor uses and fix related access 2023-02-05 17:36:37 +02:00