Commit Graph

1016 Commits

Author SHA1 Message Date
Duncan ab5f5b20cd
Use enum class for RCT2_SOUND (#9618)
* Use enum class for RCT2_SOUND

* Fix formatting. Fix mistaken declaration.

* Change name of enum to SoundId

* Fix clang format
2019-07-22 19:02:45 +01:00
Hielke Morsink 2792ddfe80 Tile Inspector: Use correct names for up/down buttons
This little mistake has been around for years and is most likely caused
by reordering the buttons. They used to be side-to-side, but their names
were never changed, and since the order of tile elements is reversed I
never noticed it was wrong.
2019-07-21 11:34:50 +02:00
Ted John 5733d666b3 Do not store park name as a user string 2019-07-21 11:33:15 +02:00
Peter e7b051c32c
Update src/openrct2-ui/windows/TitleScenarioSelect.cpp
Co-Authored-By: Aaron van Geffen <aaron@aaronweb.net>
2019-06-21 19:01:14 -04:00
Spongeloaf 5777074a3e #9285 Add feature to remember scernario tab 2019-06-21 12:54:49 -04:00
duncanspumpkin b896f07687 Add PeepPickupAction
Move Guest and Staff pickup to the new game action. Rework the game
action so that only one game action is required for the two game
commands. Remove the final game command with a callback.
2019-06-20 19:34:02 +01:00
duncanspumpkin ecbff5d4f2 Refactor to use CoordsXY 2019-06-20 18:53:30 +01:00
duncanspumpkin 2a60268c05 Fix #9440. Set the tile coordinate correctly with spinner. 2019-06-20 18:52:40 +01:00
duncanspumpkin 96ec0123ca Refactor and clean up for CI's. 2019-06-11 18:43:23 +01:00
duncanspumpkin 3162d4dc75 Implement TileModifyAction
Further work moving game commands into the game action framework
2019-06-11 18:42:52 +01:00
Peter dd948f99c4 #9295 Refactor rct_vehcile->status to rct_vehicle::SetState() (#9329)
Fix #9295. Refactor rct_vehicle->status to rct_vehicle::SetState()

Created rct_vehicle::SetState() and refactored all assignments to
rct_vehcile->status. SetState also includes a call to
vehicle_invalidate_window(), so it cannot be forgotten.
2019-06-09 15:45:56 +01:00
Ted John 6f0298deb3 Refactor ride measurement storage 2019-06-09 11:55:41 +02:00
Rikard Falkeborn 7478e13e61 Add suffix constant to avoid shifting too many bits (#9389)
Since WIDX_SCENERY_BUILD_CLUSTER_BUTTON is 31, add suffix ULL to
avoid shifting 1 (which is an int and 4 bytes on most systems) 31 bits
which is technically undefined behaviour. This is already done in the
shift at line 463.

Detected by the help of cppcheck.
2019-06-09 11:35:42 +02:00
Hielke Morsink 5418eb6e34 Add transparency setting to options window 2019-06-09 11:03:01 +02:00
Duncan 993709c087
Merge pull request #9321 from aw20368/fix/8723-use-rotate_map_coordinates
Fix #8723 Use rotate_map_coordinates to rotate coordinate
2019-06-08 07:52:52 +01:00
aw20368 e0cf476398 Fix #8723 Use rotate_map_coordinates to rotate coordinate
Added Rotate to CoordsXY, TileCoordsXY and used them to replace redundant rotation code.
2019-06-06 08:21:40 -04:00
Aaron van Geffen f1ac847fce
Merge pull request #9222 from IntelOrca/implement/485-ghost-train-simulation
Implement #485: ghost train simulation
2019-06-04 20:24:16 +02:00
aw20368 02ef545f1b Fix #9314: Trying to delete ride piece while paused moves the selection (#9332)
Failed track removal was triggering a move to the next piece. Changed to move only upon successful removal.
2019-05-30 20:51:56 +02:00
Aaron van Geffen d1f48fab53 Add RCT1 traffic light sprites for ride simulate status. 2019-05-28 16:50:38 +01:00
Aaron van Geffen bab7711c5b Add new simulate icon. 2019-05-28 16:50:38 +01:00
Ted John 26185b9e72 Change simulate to toggle button 2019-05-28 16:50:38 +01:00
Ted John 5ef0730008 Remove simulate from ride window 2019-05-28 16:50:38 +01:00
Ted John 5289113c95 Add simulate button to ride construction window 2019-05-28 16:50:38 +01:00
Ted John 5f1f428bce Add and use Ride::SupportsStatus 2019-05-28 16:50:08 +01:00
Ted John fec6d660c6 Remove obsolete configs:
- no crashes
- test unfinished track
2019-05-28 16:50:08 +01:00
Ted John c4e18e570e Add and implement simulation mode for rides 2019-05-28 16:50:08 +01:00
nexgenration 46889b5381 Implement #9231: Add sprite_index to Guest Debug Tab 2019-05-27 22:39:03 +02:00
Ted John 7f2936b8fb Fix #7045: Theme window's colour pickers not drawn properly on OpenGL
Remove unnecessary transparent flag when drawing colour buttons.
2019-05-20 19:47:26 +01:00
Michael Steenbeek 1b11612e3c
Merge pull request #9259 from duncanspumpkin/scenario_set
Implement ScenarioSetSetting game action
2019-05-19 15:09:12 +02:00
nexgenration 6b232f7e53 Fix#9197: Peep insert new thought (#9230)
Improve the readability of the codebase by moving functions into the relevant structures.
- Change name of peep_insert_new_thought to InsertNewThought.
- Update InsertNewThought definition to Guest::InsertNewThought.
2019-05-18 09:47:25 +01:00
Michał Janiszewski bbcc69270d Ensure finances window's months don't overflow (#8686)
Some functions (e.g. window_finances_summary_scrollpaint) will try using
the returned index, which makes it overflow.
2019-05-15 21:09:01 +02:00
Greg Hennis 1fcedae3bc Fix #9258: Rename SPRITE_LIST_NULL to ..._FREE (#9260) 2019-05-15 19:07:01 +02:00
duncanspumpkin 3ac596faf1 Implement ScenarioSetSetting game action
Further work moving game commands into the game action framework to improve design.
2019-05-14 21:46:27 +01:00
Michael Steenbeek c9cbe391eb
Merge pull request #8427 from Mikroscopic/minimap-fix
Fix #8385: Ghost objects rendered in minimap
2019-05-14 22:38:26 +02:00
Michael Steenbeek abc13422ed
Fix #9132: System file browser cannot open SV4 files 2019-05-14 22:12:23 +02:00
duncanspumpkin 0b7d7027e1 Fix formatting 2019-05-14 21:58:55 +02:00
duncanspumpkin 1eb7f4d8c6 Implement Modify Group and Kick Player Actions.
Further work on the Game Actions porting
2019-05-14 21:58:55 +02:00
joshtucker132 4dc77bf121 Feature #8791: Improved tile element flag manipulation in Tile Inspector 2019-05-14 21:38:31 +02:00
duncanspumpkin b9a70d02a3 Make suggested changes
Implement suggestions

Fix formatting
2019-05-12 17:31:48 +01:00
duncanspumpkin e9e445837f Add landset/buyrights action 2019-05-12 17:29:19 +01:00
Ted John 1ac8d9058f Colour local servers as green 2019-05-12 01:05:11 +01:00
Ted John 3334d40da4 Explicitly use std::launch::async 2019-05-12 00:51:33 +01:00
Ted John 52afcb795f Fix windows build 2019-05-12 00:51:33 +01:00
Ted John 47f48721e8 Fix clang build 2019-05-12 00:51:33 +01:00
Ted John 4b0f2bbceb Fix disable network / disable http builds 2019-05-12 00:51:33 +01:00
Ted John 20f52a8cbe Refactor TcpSocket and UdpSocket 2019-05-12 00:51:33 +01:00
Ted John 51117432f0 Improve status messages and prevent duplicates 2019-05-12 00:51:33 +01:00
Ted John 3a400a2471 Refactor server list 2019-05-12 00:51:33 +01:00
Ted John 4437113805 Fix server list LAN address and port 2019-05-12 00:51:33 +01:00
Ted John 7a20874366 Fix Windows build 2019-05-12 00:51:33 +01:00
Ted John 123a8eacad Get the server list showing LAN servers 2019-05-12 00:51:33 +01:00
Ted John 694cb7eb3f Implement UDP socket and broadcasting 2019-05-12 00:50:13 +01:00
Hielke Morsink b51f6a4d90 Use case-insensitive compare for soring ride and vehicle types (#9229) 2019-05-11 12:06:29 +01:00
Filip Gawin 6833da77e3 Simplify boolean expresions 2019-05-10 22:00:38 +02:00
Ted John 710da039a4 Show ghost elements as white on mini-map
Also fixes refresh of map when using OpenGL drawing engine
2019-05-08 21:37:33 +01:00
Mikroscopic 80a9cf8670 Fix ghost objects rendering on minimap 2019-05-08 21:36:31 +01:00
Ted John 0d0479f9b1
Merge pull request #8558 from richard-fine/feature/peep-inspector
Peep debug tab
2019-05-06 20:29:29 +01:00
Ted John a22f0a53fb Use localised strings for guest debug tab 2019-05-04 21:48:02 +00:00
Ted John f50695fc9b Refactor guest window resize 2019-05-04 16:23:29 +00:00
Ted John a90a86562d Refactor guest widget lists 2019-05-04 15:01:51 +00:00
Ted John 7c2708746e Re-draw debug tab every tick 2019-05-04 14:53:25 +00:00
Ted John c13bd04954 Refactor invalidate methods 2019-05-04 14:40:45 +00:00
Ted John 1d296242b4 Improve text colour 2019-05-04 14:09:15 +00:00
Ted John b4a2a94520 Fix build 2019-05-04 14:08:37 +00:00
Richard Fine 480f19c0c6 Add parens to fix operator precedence issue
I missed one... thankfully the CI did not.
2019-05-04 14:08:37 +00:00
Richard Fine 9bb68a7151 Pull window width into temporary variable
As suggested in review, it's a little easier to read this way.
2019-05-04 14:08:37 +00:00
Richard Fine b714f7b0e2 Use constexpr instead of const
For a static constant integer value, it's stylistically clearer to use constexpr instead of const. The resulting variable is implicitly const, but is also guaranteed to have a compile-time-computable value.
2019-05-04 14:08:37 +00:00
Richard Fine 97bcc53637 Eliminate itoa and use correct format specifiers
Use snprintf instead of _itoa as it's not available on all platforms. Also change the format specifies for unsigned variables to %u instead of %i, to be more correct...
2019-05-04 14:08:37 +00:00
Richard Fine 397b044588 Use safe_strcat instead of strcat_s
strcat_s is not available on all platforms, and we have a utility in the codebase that does basically the same thing already.
2019-05-04 14:08:37 +00:00
Richard Fine cfda3fb8f7 Use sizeof(buffer) instead of hardcoded size
Use sizeof(buffer) instead of repeating 4096 in a bunch of places. Also, 4096 was maybe a bit overkill, drop it down to 512 instead.
2019-05-04 14:08:37 +00:00
Richard Fine 8bf72ceadb More peep pathing info
Show more peep debug data in the Guest debug tab, mostly to help with understanding pathfinding behaviour.
2019-05-04 14:08:37 +00:00
Richard Fine 7300a38ce6 Show peep coordinates in debug tab
As a first debug stat to show, display a peep's current coordinates in the debug tab
2019-05-04 14:08:37 +00:00
Richard Fine 70c61d5ac6 Fix guest window width for debugging tab
Introduce a named constant for the width of a tab in the Guest window, and touch the places that set the window width to add it to the minimum window width when the debugging tab is enabled, so that the tab doesn't render off the side of the window.
2019-05-04 14:08:37 +00:00
Richard Fine 5ef07ab936 Formatting 2019-05-04 14:08:37 +00:00
Richard Fine fa63691d17 Disable guest debug tab when debug tools not turned on
Disable the debug tab in the guest window when the debugging tools are not turned on, causing it to be completely hidden from view.
2019-05-04 14:08:37 +00:00
Richard Fine c4a449f47d Add new debugging tab to the Guest window
Add a new tab to the Guest window which we can use to display debug information and tools for guests. At the moment it's blank and always visible; next step is to make it only show up when debugging tools are enabled.
2019-05-04 14:08:37 +00:00
ζeh Matt cd8c67ddac
Implement SetCheatAction. (#8990)
* Implement SetCheatAction.

* Bump up network version
2019-05-04 15:28:38 +02:00
Hielke Morsink 5e9e7bcbe5 Fix: artifacts when changing ride type as client or using the in-game console (#9202) 2019-05-04 10:31:10 +00:00
Aaron van Geffen f1b9c71524
Merge pull request #8687 from Xkeeper0/f/multiplayer-plus
Multiplayer dropdown additions
2019-05-02 22:53:50 +02:00
Duncan a6c2aed26d
Merge pull request #9059 from duncanspumpkin/banner_ga
Implement Banner Place/Remove Actions
2019-05-02 21:32:51 +01:00
duncanspumpkin d14637e1ca Fix narrowing and formatting 2019-05-02 17:47:01 +01:00
duncanspumpkin f6b610c325 Implement Banner Place/Remove Actions 2019-05-02 17:47:01 +01:00
Aaron van Geffen 57040c392c Change multiplayer toolbar image to framed globe, with pressed state. 2019-05-02 12:32:45 +02:00
Ted John f842d8a693 Fix #5103: OpenGL: ride track preview not rendered 2019-05-02 00:07:43 +00:00
Xkeeper 4a34d2a6da Disable "Reconnect" if not desynced. 2019-05-02 00:30:30 +02:00
Xkeeper c075eec224 Update sync icons, new multiplayer toolbar button
The multiplayer toolbar button is the same globe used for the
multiplayer option on the title screen, since it seems like
a nicer (and better?) looking option than the two riders.

Also conflicts less with the new sync icons.
2019-05-02 00:30:30 +02:00
Xkeeper 8c4de40239 Add graphics for desync notice 2019-05-02 00:29:25 +02:00
Xkeeper bc8ecd8e67 Add "Reconnect" option under the multiplayer button 2019-05-02 00:26:37 +02:00
Xkeeper d614fb4035 add network indicators for desync/player count 2019-05-02 00:22:03 +02:00
Aaron van Geffen df42cfe1e1
Change map toolbar icon with current rotation (#9154) 2019-05-02 00:07:20 +02:00
Duncan 1e1d263dae
PlayerSetGroupAction (#9072)
* First pass at action.

* Version 2. Do all the work in Network.cpp

* Mark game command as complete

* Make requested changes

* Increment of network version
2019-05-01 16:54:12 +01:00
Michael Steenbeek c8df801e66
Create ShopItemDescriptor 2019-04-26 20:25:11 +02:00
Michael Steenbeek 57201c12db
Merge pull request #9128 from Broxzier/feature/6116-tile-inspector-colour-scheme
Expose colour scheme in the tile inspector (#6116)
2019-04-24 19:42:12 +02:00
boucks b052c4ac61 Fix #9054: remove gSceneryTileElement by returning it within GameActi… (#9127)
* Fix #9054: remove gSceneryTileElement by returning it within GameActionResult

* fixing Clang-format issues

* fixing clang-format

lets try this again...

* fixing clang-format

alright should be good this time

* fixing clang-format issues

using automatic clang-formatting

* initializing tileElement
2019-04-24 09:42:00 +01:00
Hielke Morsink ac7bc97736 Expose colour scheme in the tile inspector (#6116) 2019-04-22 15:49:09 +02:00
Hielke Morsink d8f1933a5b Show dash for station index for non-station elements 2019-04-22 15:25:29 +02:00
Duncan 46844e2218
Merge branch 'develop' into issue-9053 2019-04-21 19:50:20 +01:00
Michael Steenbeek 5a906b2378
Port more functions to Ride struct (#9119) 2019-04-20 22:22:39 +02:00
Michael Steenbeek 42a1a8704d
Use empty() for vectors; clean up bool comparisons (#9118) 2019-04-20 20:39:47 +02:00
Liam Parker 82c73e18c7 Fix #9067 - Prices rendering in unlimited money game state 2019-04-20 18:10:15 +02:00