Commit Graph

679 Commits

Author SHA1 Message Date
Aaron van Geffen 248585281c Fix #6221: Make invention list resizeable. 2018-05-27 00:37:45 +02:00
Aaron van Geffen 7a107264df Tile inspector: clip overly long object name strings. 2018-05-26 01:20:46 +02:00
Aaron van Geffen 146235931f Tile inspector: use SCROLLABLE_ROW_HEIGHT constant.
The tile inspector window was using its own LIST_ITEM_HEIGHT constant,
instead of the SCROLLABLE_ROW_HEIGHT constant commonly used in other windows.

This fixes CJK text overlapping.
2018-05-26 01:20:29 +02:00
Hielke Morsink 1a9dc7beee
Fix #7564 Some buttons are not greyed out when they should (#7565) 2018-05-25 23:09:52 +02:00
Aaron van Geffen 8a724c3983 Hide speed and length statistics for flat ride TD6 files (#7563)
This hides the speed and length statistics in the track design list when viewing designs for non-tracked rides.

Fixes #7507.
2018-05-25 23:01:27 +02:00
Aaron van Geffen a2f39079a7
Merge pull request #7556 from Gymnasiast/tile-element-cleanup
Replace all occurrences of tile_element_is_last_for_tile()
2018-05-25 13:34:28 +02:00
Hielke Morsink c50011aa3e Re-add zebra stripes and light text 2018-05-25 00:46:21 +02:00
Hielke Morsink 59c7b097ee Add Ctrl + Click to select tile elements
Co-authored-by: wolfreak99 <jbminor1991@gmail.com>
2018-05-25 00:46:20 +02:00
Hielke Morsink 0d77c279aa Fix: buttons sometimes stay pressed
In the invalidate function of the tile inspector, the checkboxes get checked to match the selected tile element. Some of those checkboxes share their widget index with buttons from other pages. When a checkbox is checked, the it's set to be "pressed", which causes the butons in the other tabs so appear that way. This behaviour is fixed by unpressing widgets when switching to another page.
2018-05-25 00:46:20 +02:00
Hielke Morsink fe40005372 Automatically set the correct page
Instead of having to set the page and setup the widgets correctly when a new elements gets selected, it now switches automatically on invalidation to the correct tab. This fixes the issue where pasted elements were selected but the page for them not shown, and removes two of the intents that were made for the tile inspector.
2018-05-25 00:46:20 +02:00
Hielke Morsink 4b25a71924 #5832 Resize tile inspector automatically when selecting a tile element 2018-05-25 00:46:19 +02:00
Hielke Morsink f79589527d Adjust list style to match other lists
- No odd/even checked colours
- Black text (white on hover)
- Darker background
- Solid fill background for hovered and selected element
2018-05-25 00:46:19 +02:00
Hielke Morsink 4c1097d5b1 Minor code cleanups 2018-05-25 00:46:19 +02:00
Michael Steenbeek b573bd49b3 Replace all occurrences of tile_element_is_last_for_tile() 2018-05-24 11:44:53 +02:00
Aaron van Geffen ca16fe8e62 Fix refurbishment confirmation window not closing in multiplayer mode. 2018-05-23 16:33:37 +02:00
jensj12 3f0308a517 Fix Travis builds 2018-05-23 16:33:37 +02:00
jensj12 50e3f8b4f6 Cleanup of ride_demolish 2018-05-23 16:33:37 +02:00
jensj12 23dc6bb9d3 Add button to refurbish ride
Add a button to refurbish the selected ride. The cost for this is 35% of the
build price and may only be done if the ride is closed and empty.
2018-05-23 16:33:37 +02:00
deurklink 996ca5a880 Fix #7528: Tab changing in park pricing window happens on mousedown instead of mouseup (#7542) 2018-05-19 14:57:05 +02:00
wolfreak99 8c9b56d0f2 Keep "Save track design" dropdown open (#7531) 2018-05-19 14:13:08 +02:00
Ted John 34531f7afb
Fix signed/unsigned mismatch warnings (#7529)
Unignore MSVC warning: C4245:
'conversion_type': conversion from 'type1' to 'type2', signed/unsigned mismatch
2018-05-16 21:22:17 +01:00
Michał Janiszewski a2ef4bd699
Exclude pre-formatted blocks from clang-format (#7520)
[ci skip]
2018-05-16 20:41:29 +02:00
Aaron van Geffen 829ac11bec
Merge pull request #7519 from IntelOrca/refactor/new-object-types-prep
Refactor code around object types
2018-05-15 15:10:16 +02:00
Aaron van Geffen 19442eb6c2
Merge pull request #7510 from Broxzier/feature/horizontal-clipping
Horizontal Clipping
2018-05-15 14:55:05 +02:00
Aaron van Geffen 59e682a835
Merge pull request #6807 from ZehMatt/ga-removewall
Refactors GAME_COMMAND_REMOVE_WALL to a GameAction.
2018-05-15 09:54:37 +02:00
Ted John 6f00e6aafe Make ObjectRepositoryItem C++ 2018-05-15 00:36:35 +01:00
Ted John f8271e93b0 Refactor code base to allow easy addition of new object types 2018-05-15 00:32:36 +01:00
Michael Steenbeek fcf507e051
Spin off shop item stuff to separate files 2018-05-14 19:21:43 +02:00
Hielke Morsink 9f0d820b7c Use TileCoordsXYZD for wall locations 2018-05-14 12:36:45 +02:00
Hielke Morsink 5b64abd7aa Keep 'select area' button pressed while the tool is active 2018-05-12 14:48:22 +02:00
Hielke Morsink 1324b6ae8f Add group boxes and clear button 2018-05-12 14:26:03 +02:00
Hielke Morsink 4e5f5de1a3 Update the year in copyright notice for changed files 2018-05-12 14:24:51 +02:00
Hielke Morsink 9034a0bce9 Restore old selection when the tool gets interupted
And re-type the selection variables to use LocationXY8 instead of storing them separately.
2018-05-12 14:24:47 +02:00
Hielke Morsink 28c1dbaf5a Show hovered tile selection 2018-05-12 14:24:06 +02:00
Hielke Morsink f1bbf077d6 Add clip selection
This allows the user to select an area of tiles. Anything outside of this area won't be drawn.
2018-05-12 14:24:01 +02:00
Ted John 35df72e61f Remove use of gCurrentLanguage 2018-05-11 20:39:00 +01:00
Ted John 7b28078da2 Remove use of gUseTrueTypeFont 2018-05-11 20:37:48 +01:00
Aaron van Geffen afd1dee580 Leftover cleanup of unnecessarily setting widget types. 2018-05-11 19:39:51 +02:00
Aaron van Geffen 56b9f5ff16 Removed unused string from audio options. 2018-05-11 19:39:47 +02:00
Aaron van Geffen 5ecb2d951e Draw misc options' dropdown captions directly through widgets. 2018-05-11 19:39:47 +02:00
Aaron van Geffen fe044477c2 Draw interface options' dropdown captions directly through widgets. 2018-05-11 19:39:47 +02:00
Aaron van Geffen bf817d2312 Draw culture options' dropdown captions directly through widgets. 2018-05-11 19:39:47 +02:00
Aaron van Geffen 13f3fb3448 Draw audio options' dropdown captions directly through widgets. 2018-05-11 19:39:47 +02:00
Aaron van Geffen adf3e55d9b Draw display options' dropdown captions directly through widgets. 2018-05-11 19:39:47 +02:00
ZehMatt 5e4cdeb78b Refactor out references to compatibility function wall_remove 2018-05-11 12:33:57 +02:00
ZehMatt b0f7435e9d Refactor GAME_COMMAND_REMOVE_WALL to game action. 2018-05-11 12:32:14 +02:00
rwjuk 9a167bb9d3 Disable saving without scenery for flat rides 2018-05-10 20:54:53 +02:00
Richard Jenkins 41f0b181bf Display flat rides correctly in previews 2018-05-10 20:54:53 +02:00
rwjuk 066980a9d4 Initial implementation of track saving for flat rides 2018-05-10 20:54:53 +02:00
Duncan 7b8507cb22
Merge pull request #7404 from OpenRCT2/peep
Peep Refactor
2018-05-08 20:22:39 +01:00
Michael Steenbeek 907d318e1c
Make Ride Groups more C++-like 2018-05-07 20:18:06 +02:00
deurklink 0d332cdf68 Implement #7459: Allow opening and closing of parks that use no mone 2018-05-07 19:48:47 +02:00
Hielke Morsink afac7f6557 Make more global functions part of rct_peep 2018-05-05 11:42:43 +01:00
duncanspumpkin fcb66b7449 Start refactoring pathfinding to use tileCoords 2018-05-05 11:42:34 +01:00
Hielke Morsink 6e02d6af4c Make peep_has_food, has_item and has_drink member functions 2018-05-05 11:13:22 +01:00
Aaron van Geffen e92264a2af Fix #7484: Incorrect label offsets in New Campaign window 2018-05-04 10:45:14 +02:00
Hielke Morsink a86482576f Land Line Tools (select land edges/row of tiles)
(This commit is multiple commits squashed together, to make rebasing and merging easier. Many of the commits undid or slightly altered previous changes.)

This Extends the land-tool by allowing the player to select an edge of a surface tile, and to select a row of tiles. Both work by holding down the Ctrl key (same key for keeping the same base-height for other tools). When using a single-sized tool, the selection will become the edge, and when using a selection area of 2x2 or higher, the selection becomes a row of tiles.

The tables `tile_element_raise_styles` and `tile_element_lower_styles` hold the data for how slopes should change when a tile gets raised or lowered with the land tool. Each row represents a selection, and each column the slope type.

Co-authored-by: Adam T <32143337+Despotico@users.noreply.github.com>
2018-05-03 23:03:07 +02:00
Michael Steenbeek 5f9d40be7a
Replace tile_element_get_type() with struct method 2018-05-02 19:27:04 +02:00
Michael Steenbeek b725916808 Use TitleCase 2018-05-02 13:27:53 +02:00
Michael Steenbeek ef433df26a Clean up tile element usage, introduce struct methods 2018-05-02 11:58:12 +02:00
oli414 3bff12c081 Seperate surface tile element 2018-05-01 16:33:16 +02:00
Aaron van Geffen 735cc2df89 Take line height into account in scenario selection screen 2018-05-01 13:58:46 +02:00
Toby Hinloopen 2fc01cb698 Fix #7424: Do not auto-rotate shops to face queue paths 2018-04-30 14:54:26 +02:00
Olivier Wervers 7713cdac4d Replace month count magic numbers 2018-04-29 20:46:46 +02:00
Michael Steenbeek 2d92ecf10b Fix #7436: Only the first 32 vehicles of a train can be painted 2018-04-26 10:33:54 +02:00
Hielke Morsink 30063984e6
Delete unused function arguments or mark them so (#7426)
This aims to make future refactoring easier. The arguments are removed where possible, but kept and marked with C++17's [[maybe_unused]] where they could not be removed (e.g. when they are used as a callback, rather than called directly).

I've skipped the rides/<category>/* and peep/* source files, because the rides source files are mostly generated and have a ton of unused variables, and the peep source files are being refactored.
I've also skipped most of window/* source files, because most of the functions are used as callbacks and will be bulk-renamed at some point.
2018-04-20 13:56:37 +02:00
Aaron van Geffen 11207f9c41 Re-introduce zebra striping. 2018-04-16 22:11:53 +02:00
Aaron van Geffen 97d1c296a4 Increase row height for object load error window. 2018-04-16 22:11:53 +02:00
Albert Morgese a3b04a67b2 Implement #1675: Auto-rotate shops to face footpaths 2018-04-16 20:02:46 +02:00
duncanspumpkin 765500adfa Label offsets and functions
Actually save before commiting

Label more peep vars.

Remove unread var

Further refactoring

Fix mistake in map element type
2018-04-11 18:16:09 +01:00
Ted John 1cd88a1641
Fix #7367: 'invalid name for park' shown when opening a scenario (#7394)
Apply extra changes from my own implementation of ParkSetNameAction
which re-introduces logging and calls the action directly from the UI
layer.
2018-04-10 17:14:32 +01:00
Hielke Morsink dc673a64d8 Give context the ownership of repositories and the object manager (#7340)
This makes them no longer a singleton, which fixes annoying behaviour when launching multiple contexts in one game session.
2018-04-10 13:19:23 +01:00
Ted John 124fb0df90 Fix out of bounds error in window_editor_object_selection_scroll_mouseover 2018-04-09 17:46:43 +01:00
NathanZabriskie cc256997ef Opening the mini-map reverts the size of the land tool to 1x1, regardless of what was selected before. #7382 (#7387)
* Opening the mini-map reverts the size of the land tool to 1x1, regardless of what was selected before. #7382
* Updated changelog and contributors
2018-04-08 19:34:36 +02:00
Duncan 0ab3d0955c
Merge pull request #7310 from OpenRCT2/json-objects
Add support for new JSON object format
2018-04-08 10:45:55 +01:00
Fusxfaranto 69bb1cdf82 Use STR_NONE over magic number, and conform to style guide 2018-03-31 10:54:41 +02:00
Fusxfaranto 74361dcf87 Add different titles for multiplayer window tabs (#2989) 2018-03-31 10:54:41 +02:00
Ted John 63e9275b60 Protect against unknown ride types 2018-03-30 16:58:12 +01:00
Michał Janiszewski fa11f05dba Remove unused variable 2018-03-27 20:46:12 +02:00
Gymnasiast 566af0c4f7 Remove residual usages of rideEntry->enabledTrackPieces 2018-03-27 20:40:50 +02:00
Duncan 1b2b020246
Merge pull request #7343 from ZehMatt/ga-stringbased
Implement some game actions for naming things
2018-03-27 18:55:28 +01:00
ZehMatt 417a2586b6 Implement game action for banner naming. 2018-03-27 16:29:53 +02:00
Michael Steenbeek 3d86ec2bc0 Remove dead code from research 2018-03-26 20:36:16 +02:00
Hielke Morsink 9ddda9ac77 Move comment 2018-03-24 13:34:05 +01:00
Hielke Morsink 6528a2fe37 Invalidate window when populating list
The new comment is there for clarity, because this confused me for a sec.
2018-03-24 13:25:40 +01:00
Hielke Morsink 45a92a7356 Fix #5210 Unable to open system dialog for saving
The reason the file dialog failed to open (on Windows at least) is that the dialog would be used to save a file, yet a folder was provided as the default path. This commit attempts to append a logical filename to the path, including an extension.
2018-03-24 13:25:40 +01:00
Hielke Morsink c5aececcb1 Set scenario save path upon successfully loading a park
Instead of setting the path when clicking on a file in the loadsave dialog, it's now set when the park gets actually loaded.

This fixes the System Dialog not showing when saving a park loaded from command.
2018-03-24 13:24:39 +01:00
ZehMatt 199a3e33f4 Implement game action for sign naming. 2018-03-24 05:19:19 +01:00
Ted John a913fd2d4a
Merge pull request #7266 from IntelOrca/feature/interactive-stdinout
Make stdin / stdout a game console
2018-03-23 22:19:08 +00:00
xp4xbox 674e094b3a Add shortcut definition for 'View Path Issues' and 'Cutaway View' 2018-03-23 10:37:13 +01:00
Ted John dd0573b235 Move in game console to UI library 2018-03-22 20:16:58 +00:00
Michael Steenbeek 61ddbd918b Add option to freeze all staff to Cheats window 2018-03-22 09:32:20 +01:00
Michael Steenbeek 919533d7c2 Show ride and vehicle names in research list 2018-03-21 22:04:10 +01:00
Ted John 5245b35a90
Merge pull request #7286 from IntelOrca/refactor/gameaction-parksetloan
Implement some more basic game actions:
- ParkMarketingAction
- ParkSetLoanAction
- ParkSetResearchFundingAction
- StaffSetColourAction
2018-03-20 13:38:56 +00:00
thyeggman ccb1b330a5 Option for early scenario completion (#7187) 2018-03-20 12:58:59 +01:00
Ted John 9b604310a2 Implement game action for staff set colour 2018-03-20 09:31:39 +01:00
Ted John 708843b526 Implement game action for park marketing 2018-03-20 09:31:39 +01:00
Ted John 5a803d2551 Implement game action for park set research funding 2018-03-20 09:31:39 +01:00
Ted John 16a7e21ffa Implement game action for park set loan 2018-03-20 09:31:39 +01:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Aaron van Geffen 7bc63dc30a Themes window: use header widgets; minor code clean up. 2018-03-19 10:36:39 +01:00
Aaron van Geffen 8ab568a6a9 Multiplayer: use table header widgets for column headers. 2018-03-19 10:36:39 +01:00
Aaron van Geffen f6933aea4e Multiplayer information: take font line height into account. 2018-03-19 08:34:16 +01:00
Aaron van Geffen a61c84d3b0 Increase button height in server list window. 2018-03-19 08:34:16 +01:00
Aaron van Geffen ca4e1a36fb Fix widget dimensions for 'Start server' window. 2018-03-19 08:34:16 +01:00
Aaron van Geffen 686fedc671 Player window: use LIST_ROW_HEIGHT. 2018-03-19 08:34:16 +01:00
Aaron van Geffen 32e0f12f5b Multiplayer window: use SCROLLABLE_ROW_HEIGHT in scrollpaint. 2018-03-19 08:34:16 +01:00
Aaron van Geffen c0bc2da529 Increase button height in save prompt window. 2018-03-19 08:34:16 +01:00
xp4xbox 463cb7ab26 Fix #5339: Change scenery eyedropper to use a relevant icon. 2018-03-19 08:33:59 +01:00
Michał Janiszewski 4dd0995efb Move cmath out of common.h 2018-03-18 23:29:13 +01:00
Michał Janiszewski 5c6e28284b Move cstddef out of common.h 2018-03-18 23:29:13 +01:00
Aaron van Geffen bab1ef465a Automatically scroll once a new month appears in Finances. 2018-03-18 22:41:34 +01:00
Aaron van Geffen df6a86d9bf Leverage more historical data in Finances window.
This adds a horizontal scrollbar to the summary page.
2018-03-18 22:41:34 +01:00
Hielke Morsink 1cd3e5e49c use GAME_COMMAND_FLAG_APPLY instead of hardcoded value 2018-03-18 12:21:24 +01:00
Michał Janiszewski f045370fcf Improve track preview window with OpenGL renderer
This adds a warning to track preview window explaining it's not
supported with OpenGL renderer. Also fixes the issue whereby no stats
were printed because of early exit.
2018-03-16 22:41:08 +01:00
Michał Janiszewski 10dabfa15c Fix strncpy usage in GuestList.cpp 2018-03-14 22:11:01 +01:00
Aaron van Geffen c21143505f Fix #7203: Undefined string in custom currency window. 2018-03-14 13:35:51 +01:00
Michał Janiszewski 764520076f
Reduce header inclusion
* Update includes in PlatformEnvironment.cpp

* Update includes in ParkImporter.h

* Update includes of OpenRCT2.h

* Update includes in Intro.h

* Remove unused include from Input.cpp

* Update includes of Imaging.h

* Update includes in Game.h

* Update includes in Editor.h

* Update includes of Context.cpp

* Update includes in Cheats.cpp, CmdlineSprite.cpp

* Update includes of some source files

* Update includes in some cpp files

* Update includes in some cpp files

* Update includes in TextureCache.h

* Fix tests

* Update includes in Font.cpp

* Update includes in LightFX files

* Update some includes

* Fix GCC builds

* Update some includes

* Update some includes

* Update includes in FontsFamilies.*

* Update includes of Console.h

* Improve includes in Window.h

* Improve headers in Viewport.h/Window.h

* Fix MSVC build

* Fix network-less builds

* Reduce inclusion of Map.h
2018-03-13 13:14:02 +01:00
Ted John 74228ed35f Use iterators again for removing empty headings
Improving on f00aa15096, continue to use iterator and just set it to the result of erase.
2018-03-10 13:58:49 +00:00
Ted John f00aa15096 Fix assert in debug mode in initialise_list_items
Erasing vector iterators causes the iterator to become invalid, so use an index instead for the loop.
2018-03-10 10:52:32 +00:00
Michael Steenbeek 5411c77358 Clean up more direct access to tile elements 2018-03-09 19:40:16 +01:00
Michael Steenbeek 44524d1e6f Name unknown variable 2018-03-09 19:40:16 +01:00
Ted John e318e0948a Fix a few assertions that were found when using debug CRT 2018-03-09 16:28:47 +01:00
Hielke Morsink a8f167c45d Fix a few typos
'vehichle' -> 'vehicle'
'none zero' and 'non zero' -> 'nonzero'
2018-03-09 15:58:12 +01:00
Michael Steenbeek 88af2d3954 Rename sub_6CA2DF() to window_ride_construction_update_state() 2018-03-09 09:17:24 +01:00
Joshua Moerman d6c28b2fa4 Using some more CoordsXY instead of separate xy in Map.cpp 2018-03-08 23:41:33 +01:00
Joshua Moerman 426c21eb56 Uses some more informative types in Map.cpp 2018-03-08 23:41:33 +01:00
Joshua Moerman c2eb735871 Replaces magic numbers with appropriate constants 2018-03-08 23:41:33 +01:00
Joshua Moerman e5d143b748 Simplifies map_window_get_pixel_colour_ride
- Splits uint32 into two uint16
- Reuse code for unowned land colour
2018-03-08 23:41:33 +01:00
Michael Steenbeek 1fa2fa8f80
Refactor ride->entrances and ride->exits 2018-03-07 19:10:50 +01:00
ZehMatt e3708c0593 Split special direction to new parameter. 2018-03-05 00:17:34 +01:00
ZehMatt bdc1cf8adc Refactor GAME_COMMAND_MAZE_SET_TRACK to game action. 2018-03-05 00:17:34 +01:00
Aaron van Geffen ba1d269227 Move all Virtual Floor code from Map to its own file. 2018-03-04 19:28:56 +01:00
Gymnasiast 7a2a73b418 Fix #7205: Park entrance fee cannot be set higher than £100 2018-02-21 22:37:54 +01:00
Michał Janiszewski 08bcbe3912 Make network version a variable to reduce recompilations 2018-02-21 22:21:09 +01:00
Michael Steenbeek 2de6529cf5 Use big coordinates for PeepSpawn's Z coordinate 2018-02-21 09:50:07 +01:00
wolfreak99 2d8c473f75 Sync Peep Spawn over network 2018-02-19 21:11:14 +01:00
Michael Steenbeek bde913ee16 Rename SmallCoords and BigCoords 2018-02-15 22:26:50 +01:00
Michael Steenbeek a2260929dd Replace rct_xy_element with BigCoordsXYE 2018-02-15 22:26:50 +01:00
Michael Steenbeek d481cca2ed
Remove some redundant casts and fix rct_sprite::AsDuck() 2018-02-15 13:04:25 +01:00
Hielke Morsink 55979a3fff Remove and replace C typedefs
`typedef struct/union/enum name { ... } name_again;` is not needed whe compiling C++, moving the name at the back to be in front of the object and removing `typedef` makes it usable the very same way.
This also replaces typedefs with the using keyword. They have better readability, especially for function pointer types, and would allow more flexibility when used with templates.
2018-02-14 09:42:26 +01:00
Ted John d22572d0b9 Remove rct_object_entry_extended 2018-02-12 12:48:41 +00:00
Ted John 4d8fe051e8 Remove most usages of object_entry_groups 2018-02-12 12:48:41 +00:00
Ted John d905dde070 Simplify selected object flags 2018-02-12 12:48:41 +00:00
Hielke Morsink 8e55c811f6 Check for server version instead of address (#7155) 2018-02-09 19:16:54 +00:00
Gymnasiast f003366d22 Remove STEX selection from Object Selection window 2018-02-09 13:47:15 +01:00
Gymnasiast b1ab852fb7 Add object_entry_get_type() 2018-02-09 13:47:15 +01:00
Ted John 504e635933
Merge pull request #7150 from Broxzier/absolute-path
Make custom paths absolute and show full path in load/save window
2018-02-08 17:25:52 +00:00
Ted John 9f533d7265
Merge pull request #7143 from IntelOrca/refactor/server-list
Refactor server list
2018-02-08 17:25:37 +00:00
Hielke Morsink ced75956d1 Populate loadsave window with absolute path
When pressing "up", the code would look for the parent in the given path, which doesn't work well with relative paths. This commit fixes this behaviour.
2018-02-08 14:23:21 +01:00
Michał Janiszewski 20f95d073a Fix remaining uses of WC_LOADSAVE intent 2018-02-07 23:14:29 +01:00
Ted John 9d50a36f2c More improvements to server list 2018-02-07 19:23:44 +00:00
Ted John c7128ec988 Refactor ServerList more 2018-02-07 13:01:36 +00:00
Ted John c42a63c52c Refactor memory handling in ServerList more 2018-02-07 12:51:52 +00:00
Ted John 5d51676523 Refactor memory handling in ServerList 2018-02-07 12:51:52 +00:00
Hielke Morsink 915dbdf869 Add button to tile inspector to make entrances usable
With this, entrances and exits that have been moved away from its original XY
location can be made usable. Only one entrance or exit will be usable per
station.
2018-02-06 19:09:51 +01:00
Gymnasiast e3c0f6606d Clean up Intent.{cpp,h}
This gets rid of the C transfer functions, add licence and does some alignment fixes
2018-02-05 23:23:26 +01:00
Gymnasiast 778ba466c5 Remove almost every extern C block 2018-02-05 16:20:15 +01:00
Richard Jenkins 95dfcea6bd Implement #4984: Add option to highlight vomit, litter and handymen 2018-02-05 00:20:12 +00:00
Ted John 522e113929 Fix wrong highlighted tab in object selection window 2018-02-04 12:34:41 +00:00
Michael Steenbeek 9bd812c855 Move most of _legacy.c to C++ (#7117) 2018-02-02 23:11:41 +01:00
Marijn van der Werf 7efaf3dd80 Decrease dependency of world on windows 2018-02-01 13:59:46 +01:00
Michael Steenbeek b4018d398c
Add more object source filters 2018-01-31 13:07:20 +01:00
duncanspumpkin 96f664abb9 Fix Water Ride spinning on slope bug. Name flags. Refactor
There was a bug in the spinning water ride code that would mean that it would never trigger the stopping of spinning when going up a lift. This mistake was made during implementation of the function.
2018-01-30 12:53:50 +00:00
Gymnasiast 6bd0b2baea Show ride group name in Object Selection 2018-01-29 20:09:05 +01:00
Gymnasiast e8b2a3df0d Slight research refactor 2018-01-29 12:52:12 +01:00
Gymnasiast 981b67a90f Reorder edge textures 2018-01-27 23:22:24 +01:00
Ted John 8f1100c986
Merge pull request #7066 from IntelOrca/refactor/memory-operations
Refactor memory operations 1
2018-01-26 11:41:19 +00:00
pss9205 6b716dc157 Fix #7021: Extra rating factors overflow the vehicle tab in Korean (#7073) 2018-01-23 16:06:37 +01:00
Michael Steenbeek fdeaaa5631
Allow selecting RCT1 map edges in land tool 2018-01-21 17:18:00 +01:00
Ted John 02d783a993 Fix build 2018-01-21 12:41:42 +00:00
Ted John cebe13984f Remove most of remaining memory functions from libopenrct2ui 2018-01-21 11:17:41 +00:00
Ted John 7f8b795842 Refactor memory handling in EditorObjectSelection.cpp 2018-01-21 11:17:41 +00:00
Ted John 589e0f40d0 Refactor memory handling in Map.cpp 2018-01-21 11:17:41 +00:00
Ted John cb44dc5c21 Fix changelog 2018-01-21 11:17:41 +00:00
Ted John b52333f532 Refactor memory handling in TitleScenarioSelect.cpp 2018-01-21 11:17:40 +00:00
Ted John 4d57a4b03a Refactor memory handling in TrackDesignPlace.cpp 2018-01-21 11:17:40 +00:00
Ted John cbbb35bf79 Refactor memory handling in ObjectLoadError.cpp 2018-01-21 11:17:40 +00:00
Ted John badb90ba20 Refactor memory handling in Changelog.cpp 2018-01-21 11:17:40 +00:00
Ted John ba5bc415c7 Refactor memory handling in window sources 2018-01-21 11:17:40 +00:00
Richard Jenkins 104419f6b2 Fix #7060: Ride window settings can underflow 2018-01-20 20:34:39 +00:00
Ted John 6d63729a40 Fix MSVC 2018-01-18 22:59:30 +00:00
Marijn van der Werf 4c956def67 Update UI imports 2018-01-18 22:57:55 +01:00
Ted John cb720025fa Replace platform_enumerate_directories_begin with FileScanner code
This is isn't a particularly pretty implementation but it is only temporary until we can use std::filesystem.
2018-01-18 11:38:52 +01:00
Ted John 6fd56d140d Remove remaining uses of platform_enumerate_files_begin 2018-01-18 11:38:52 +01:00
Aaron van Geffen a1e7a18a67 Cheats window: format braces et cetera. 2018-01-16 23:22:52 +01:00
Aaron van Geffen c951c7b539 Ride cheats: reorder and group cheats in boxes by function.
* Change button order.
* Move checkboxes into a more logical order.
* Add group boxes around checkboxes.
2018-01-16 23:22:52 +01:00
Ted John 68202db51c Make ClimateWeatherData and ClimateWeatherGloomColours internal to Climate.cpp 2018-01-14 01:06:47 +00:00
Ted John 83cdd56825 Unify current and next climate state into common struct 2018-01-14 01:06:47 +00:00
Michael Steenbeek 037b236d8f Add the RCT1 edge styles 2018-01-13 15:39:22 +01:00
Aaron van Geffen c581656693 Add extra padding to label text in track install window.
Also fixes the window height, not just to accommodate the extra padding,
but also to accommodate the 'space required' field.
2018-01-12 22:29:32 +01:00
ZehMatt 84f2917f59 Use const and constexpr whenever possible. 2018-01-11 22:29:08 +01:00
Aaron van Geffen 81398d9225 Reset resize widget's top position properly when invalidating. 2018-01-11 20:27:40 +01:00
Aaron van Geffen 4d219c3abe Refactor name and path into std::string, too. 2018-01-11 20:27:40 +01:00
Aaron van Geffen eb0ad92e6d Use std::vector as LoadSaveListItem container. 2018-01-11 20:27:40 +01:00
Aaron van Geffen fce2996a73 Format braces in LoadSave.cpp. 2018-01-11 20:27:40 +01:00
Aaron van Geffen aa82df2647 Experimental: use system date/time settings on Windows. 2018-01-11 20:27:40 +01:00
Aaron van Geffen ada31ede29 Change header/sort button appearance. 2018-01-11 20:27:40 +01:00
Aaron van Geffen 9d96377e9b Infer optimal date width when opening load/save window.
In order to accomodate MSVC, we're not using strptime.
2018-01-11 20:27:40 +01:00
Aaron van Geffen 004e60ccc6 Use virtual columns to align date and time.
This also makes the date column use a fixed width. Useful when resizing.
2018-01-11 20:27:40 +01:00
Aaron van Geffen ca172b46c1 Make load/save window resizeable. 2018-01-11 20:27:40 +01:00
Aaron van Geffen c77b00898d Show formatted dates in load/save window. 2018-01-11 20:27:40 +01:00
Michael Steenbeek cd5a1ba888 Compile files in world folder as C++ 2018-01-11 13:25:09 +01:00
Aaron van Geffen 1d7bec8a11 Make the virtual floor optional, on by default. 2018-01-11 10:37:40 +01:00
Aaron van Geffen 4246b84130 Invalidate virtual floor once selection has changed.
Cache the position of the last invalidate call to prevent a big dip in performance.
2018-01-11 10:37:40 +01:00
Jeroen D Stout 0268be92cb Prevent ride construction from setting tiles when scenery tool is active 2018-01-11 10:37:40 +01:00
Jeroen D Stout d67aba09ad Make placing scenery set virtual floor height 2018-01-11 10:37:40 +01:00
Michał Janiszewski 469e142c7b Change casing of header files 2018-01-11 09:30:09 +01:00
Michael Steenbeek ddd8479827 Move some research logic out of the Inventions window 2018-01-10 16:31:13 +01:00
Michael Steenbeek 0995ab9910 Fold gResearchNextCategory into gResearchNextItem 2018-01-10 15:31:47 +01:00
Michael Steenbeek d2de1a4a95 Abstract access to gResearchedRide{Types,Entries} 2018-01-10 15:31:47 +01:00
Michael Steenbeek 3d9466a2f6 Fix refactor mistake 2018-01-10 12:05:06 +01:00
Michael Steenbeek 55b473d866 Rename gResearchLastItemSubject to gResearchLastItem 2018-01-09 21:35:10 +01:00
Michael Steenbeek 0ae5d7d476 Remove research_remove_non_separate_vehicle_types()
This removes more usages of the SEPARATE_RIDE flag.
2018-01-09 21:35:10 +01:00
Michael Steenbeek 6a88d6e04d Move and rename RCT{1,2,12}.h 2018-01-09 13:36:41 +01:00
Michael Steenbeek 6088a084a2 Replace 0x40 with COLOUR_FLAG_INSET 2018-01-09 10:37:09 +01:00
Michael Steenbeek 857e64590d Name some rct(1)_peep fields 2018-01-09 10:35:07 +01:00
Aaron van Geffen c9b48beea0 Replace WWT_CLOSEBOX with WWT_BUTTON where not used as a close button. 2018-01-08 00:02:25 +01:00
Aaron van Geffen e61194961f Rename WWT_25 to WWT_PLACEHOLDER.
This is only used in the bottom toolbar as a placeholder,
while still capturing events.
2018-01-08 00:01:45 +01:00
Aaron van Geffen 12e3e171f1 Refactor WWT_24 into WWT_LABEL. 2018-01-08 00:01:45 +01:00
Aaron van Geffen ecc1cfed2a Rename WWT_DROPDOWN_BUTTON to WWT_BUTTON.
The previous name implied an exclusive association with dropdowns.
While used to display the dropdown triangle button, this is not an
exclusive use.
2018-01-08 00:01:32 +01:00
Aaron van Geffen 8ad1bc9b86 Rename WWT_14 to WWT_LABEL.
This is used for left-aligned label text.
2018-01-07 23:54:51 +01:00
Aaron van Geffen fad8494ccc Rename WWT_12 to WWT_LABEL_CENTRED.
This is used for centred textual labels.
2018-01-07 23:54:51 +01:00
Aaron van Geffen 9a2d3b226c Rename WWT_13 to WWT_TABLE_HEADER.
This is used for left-aligned header buttons for data tables.
2018-01-07 23:54:51 +01:00
Aaron van Geffen c023f6a3f7 Moved console command, window invalidation, fix help. 2018-01-07 23:53:47 +01:00
Aaron van Geffen bf1bb33b86 Properly invalidate widgets after using date spinners. 2018-01-07 23:53:47 +01:00
Harrison Gentry 752d9bc89d Add cheat and console command to set game date.
Run "date" command on cmdline to set date.

Ex:
$ date 0004 06 13
sets date to June 13th, year 4
2018-01-07 23:53:47 +01:00
Gymnasiast 2ecbac1550 Fix #6972: Last development field is identical to progress field 2018-01-07 22:28:08 +01:00
Michael Steenbeek 7d5de63484 Refactor rct_research_item, refactor access to rct_research_item
This takes away a lot of the bitshift and bit mask trickery previously used.
2018-01-07 15:33:44 +01:00
Ted John c3eab7ead6 Refactor window.c to C++ 2018-01-07 12:39:58 +01:00
Ted John 83d1b6eb8f Refactor widget.c to C++ 2018-01-07 12:39:58 +01:00
Ted John f18595a1c1 Refactor viewport.c to C++ 2018-01-07 12:39:58 +01:00
Ted John c974daf467 Refactor console.c to C++ 2018-01-07 12:39:58 +01:00
Ted John b781291b58 Refactor chat.c to C++ 2018-01-07 12:39:58 +01:00
Michael Steenbeek 755add6c9a
Compile localisation folder as C++ 2018-01-06 18:32:25 +01:00
Aaron van Geffen 15a4f67f14 Restore tab-specific widget dimensions for Finances window. 2018-01-06 16:42:48 +00:00
Richard Jenkins 9bb7b66157 Fix #6948 & #6949: Removing or trying to build a ride freezes game 2018-01-06 13:49:29 +00:00
Ted John 3dcbebcf68 Refactor drawing.c to C++ 2018-01-05 22:57:57 +01:00
Ted John 559ec8a404 Refactor font.c to C++ 2018-01-05 22:57:54 +01:00
Harrison Gentry 5862cd9d40 Fix guest counter to say '1 guest' instead of '1 guests' 2018-01-05 08:58:17 +01:00
Aaron van Geffen 81905fc161 Vertically align widgets in lower-left bottom toolbar. 2018-01-05 00:44:59 +01:00
Hielke Morsink 512dc2c721 Fix #6923: hovering over queues turns them into regular paths 2018-01-04 21:23:56 +01:00
Michael Steenbeek 31bf792538 Refactor research - spike 1
This involves refactoring gResearchedRideTypes and gResearchedRideEntries
and the functions involved.

Also renames some functions in order to better express what they do.
2018-01-04 17:44:51 +01:00
Hielke Morsink 3dd98c7aa2 Apply coding style 2018-01-04 07:58:31 +01:00
Hielke Morsink a6e4c1d677 Remove undefined function declaration 2018-01-04 07:58:31 +01:00
Hielke Morsink 7d37798f19 Reduce duplicated code in finances window
All of the pages share some common widgets (title, close button, background, tabs). To
reduce code duplication here, I've moved those values to a define that then gets used
for each of the pages.
The same thing applies to enabled widgets. One additional change is that left bitshifts
from `1` have been changed to `1ULL`.
2018-01-04 07:58:31 +01:00
Aaron van Geffen 0138df5dd8 Centre overall viewports on geometric centre. 2018-01-04 07:57:27 +01:00
Aaron van Geffen 92bcc5f579 For overall views, show small rides zoomed in all the way. 2018-01-04 07:57:27 +01:00
Michał Janiszewski 33a94fe1bb Use C++ headers in C++ code 2018-01-04 07:36:54 +01:00
Michał Janiszewski b2bc974fe7
Use nullptr where possible 2018-01-04 06:58:44 +01:00