Commit Graph

205 Commits

Author SHA1 Message Date
Michael Steenbeek 35b4724626 Port large scenery to new structure 2018-09-16 21:34:50 +02:00
Michael Steenbeek 1d3baef9b7 Remove some C-style tile element functions 2018-09-16 21:34:04 +02:00
Gymnasiast 865a497115 Fix formatting 2018-09-13 20:14:44 +02:00
Michael Steenbeek a31176b7e7 Remove remnants of old small scenery code 2018-09-13 18:12:20 +02:00
Linus Unnebäck fd07be587a
Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
ζeh Matt b25cb8c793 Scale mouse delta by zoom when using shift. (#7868)
* Scale mouse delta by zoom when using shift.

* Clamp maximum height of object drag.

* Address code review comments; add changelog entry.
2018-08-12 11:47:46 +02:00
clang-format b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format 95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
clang-format e558660860 clang-format UI windows 2018-07-23 16:00:14 +02:00
Michael Steenbeek 1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Michael Steenbeek ec3a1e575e
Replace Math::Min and Max with std variants 2018-06-20 17:11:35 +02:00
Hielke Morsink 0cf256ac9e Ready copyright notice for clang-format
Clang-format sees the text behind `#pragma region` as code and formats it. Instead of stating the copyright and date there, it's now in the comment block right below it. The text "Copyright" is left in the `#pragma region` line, as clang-format sees it as a single identifier.

I took the opportunity to normalize the dates, and add the copyright notice to the source files where it was missing them (except for third-party and the generated resources.h file).
2018-06-15 14:07:34 +02:00
Ted John 9e9c2c072e Fix #7678: Crash when Loading or starting a new game...
...while having object selection window open

Close the object manager window before loading the next park.
2018-06-13 23:29:05 +01:00
Hielke Morsink 8aa122f54e Use empty initializer lists in the openrct2ui project 2018-06-05 14:37:24 +02:00
Ted John 92f6ac7333 Rename header files to match renamed source files 2018-06-01 09:38:30 +02:00
Aaron van Geffen bf44007197 Allow fine-tuning the virtual floor style (#7577)
The virtual floor by @JeroenDStout, introduced in the v0.1.2 release, has generally been well-received. However, some players find it too intrusive in its current appearance (cf. #7221). This PR gives them the option of a toned-down version, rather than having to turn it off completely.

![screenshot_20180528_221350](https://user-images.githubusercontent.com/604665/40628292-6e71358e-62c4-11e8-9293-e166e75d0da6.png)

The clear/transparent style, introduced by this PR, looks like the virtual floor as originally introduced in #6338:
![](https://user-images.githubusercontent.com/14242454/31050274-e3f0e62e-a645-11e7-9b10-ec26b733d631.gif)

The glassy/translucent style is the virtual floor as we've come to know it since the v0.1.2 release, and remains the default setting.
2018-05-30 13:09:50 +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
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
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 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
Ted John dd0573b235 Move in game console to UI library 2018-03-22 20:16:58 +00:00
Michał Janiszewski cd065d4f41 Reduce includes in common header 2018-03-20 00:27:58 +01:00
Michael Steenbeek 44524d1e6f Name unknown variable 2018-03-09 19:40:16 +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
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
Richard Jenkins 95dfcea6bd Implement #4984: Add option to highlight vomit, litter and handymen 2018-02-05 00:20:12 +00:00
Marijn van der Werf 4c956def67 Update UI imports 2018-01-18 22:57:55 +01:00
ZehMatt 84f2917f59 Use const and constexpr whenever possible. 2018-01-11 22:29:08 +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 d67aba09ad Make placing scenery set virtual floor height 2018-01-11 10:37:40 +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
Hielke Morsink 512dc2c721 Fix #6923: hovering over queues turns them into regular paths 2018-01-04 21:23:56 +01:00
Hielke Morsink eb4a8924d1 Refactor and clean up footpath-related code
This commit corrects some misused defines, and gave them clearer names.
For example, the slope mask was only useful for surface elements, so now
"SURFACE" is in its name. I also replaced any hard coded values that I
could find and knew their purpose off.
2018-01-03 10:57:37 +01:00
Marijn van der Werf 1e946fc0fe Move Dropdown to UI project 2017-12-16 15:47:38 +02:00
Marijn van der Werf 22966c1ad7 Fix graph land move 2017-12-16 15:47:38 +02:00
Michael Steenbeek 1a9975d683 Compile util and cheats as C++ 2017-12-14 10:03:21 +01:00
Michael Steenbeek 6dc49d643a Compile files in base dir as C++ 2017-12-13 08:03:48 +01:00
Marijn van der Werf 862ab26cc1 Move object selection window to UI module 2017-12-07 17:52:03 +01:00
Michael Steenbeek 407f1ad148
Create scenery_small_entry_has_flag() 2017-12-04 20:09:38 +01:00
Ted John 47a68e9e90 Add constant for maximum zoom level 2017-11-30 21:21:38 +00:00
Marijn van der Werf f19344aea6 Move tile inspector to UI module 2017-11-23 23:12:25 +01:00
Ted John 53493d0977 Name only flag for banner objects 2017-11-22 22:06:56 +00:00
Michael Steenbeek dd8464f907 Refactor small, large and wall scenery 2017-11-20 14:40:56 +01:00
Marijn van der Werf 3d7867791d Move scenery window to UI module 2017-11-18 21:07:21 +01:00
Michael Steenbeek bb483b0c5f Replace direct access to large scenery colour with helper functions 2017-11-17 22:54:54 +01:00
Enrico Paganin c2bf44ab1b Refactor scenery flags
Every SCENERY_GHOST_FLAG_X is connected with its respective
SCENERY_TYPE_xxx flag
2017-11-17 17:03:57 +01:00
Michael Steenbeek 3bd68947b9 Create functions for getting large scenery type and sequence 2017-11-17 12:56:08 +01:00
Marijn van der Werf bd0bd9e038 Move top toolbar to UI module 2017-11-11 23:57:19 +01:00
Renamed from src/openrct2/windows/TopToolbar.cpp (Browse further)