Commit Graph
209 Commits
Author SHA1 Message Date
jazzysoggy f77611dcd2 Fix #17229: Rename G1_FLAG_BMP to G1_FLAG_HAS_TRANSPARENCY (#17441)
* Renamed All Instance of G1_FLAG_BMP

Renamed all instances of G1_FLAG_BMP to GA_FLAG_HAS_TRANSPARENCY

* Fixed comments and labels

Fixed comments and labels to be more in line with new definitions
2022-06-25 07:04:40 +01:00
Ted John 95661f4df2 Refactor audio sources 2022-06-06 23:41:14 +01:00
guljam 03882905c8 fix #17247 Closing scenery window resets transparency settings 2022-05-22 22:58:51 +02:00
Ted John 884ef6b8ac Change transparent trees to all vegetation 2022-03-19 00:07:06 +00:00
Ted John 46873dfc7f Fix build failures 2022-03-14 23:43:50 +00:00
Ted John 61f1e13c0b Refactor viewport flags 2022-03-14 21:57:05 +00:00
Ted John c68359662d Refactor visibility control 2022-03-14 21:57:05 +00:00
Ted John 8aafab2a70 Split paint item into element and entity 2022-03-14 21:55:15 +00:00
Kane 2e93e42a71 More finishing touches
- Changes all references of `VIEWPORT_FLAG_INVISIBLE_PEEPS` to `VIEWPORT_FLAG_INVISIBLE_GUESTS` and `VIEWPORT_FLAG_INVISIBLE_STAFF`
- Updates Invisible People menu item and shortcut.
- Added new viewport flags into the `viewport_set_visibility` function
- Invisible options only work if see-through is activated as well
- Added see-through supports

- Regression: Exclude ride from invisible no longer works (ride is still see-through)
2022-03-14 21:40:27 +00:00
Kane 9f78c6f0ce Add option to see-through vehicles 2022-03-14 21:36:47 +00:00
Ted John 90718ca81c Refactor patrol area class to new file 2022-03-11 18:39:04 +00:00
Hielke Morsink ba85cf4873 Close #15896: Refactor out the ZoomLevel operators 2022-02-26 23:14:59 +01:00
ζeh Matt d7f5003943 Introduce EntityId and refactor everything 2022-02-16 18:56:39 +02:00
Ted John 454bfb0a8f Refactor map size to allow for rectangle maps 2022-02-14 23:15:59 +00:00
ζeh Matt 269673e3aa Profiler update (#16463)
* Add more functions to be profiled

* Add isEnabled method to Profiler scripting interface

* Bump up scripting version

* Apply review suggestions
2022-01-29 15:29:08 +02:00
ζeh MattandTed John 993b168bfd Implement profiler (#16194)
* Implement profiling API

* Add console commands for the profiler

* Remove accidental line

* Correct csv output

* Add copyright notice

* Add missing override

* Add default virtual destructor

* Explicitly pass template argument

* Use static

* Add plugin API for profiler

* Add more profile calls

* Workaround for GCC hopefully

* Add missing static keyword

* Use uint64 for call count

* Reduce name length see if CI passes

* Improve handling of function names

* Work around (broken) static inline variables

* Fix missing include

* Disable profiler for clang 5 and older

* Update copyright date

* Profile UpdateAllMiscEntities

* Apply review suggestions

Co-authored-by: Ted John <ted@brambles.org>
2022-01-18 20:21:20 +02:00
Hielke Morsink e33d71346a Prevent underground view during title sequence 2022-01-11 17:31:01 +01:00
Michael Steenbeek 25cb49f8ce Pass paint_session as reference 2021-12-19 14:48:00 +00:00
Ted John e165de7482 Refactor paint structs to use ImageId and extend size of image list (#16258)
* Move to image ID for paint struct

* Move image list to be past the end of legacy limit

* Extend image list size

* Introduce constants for image list size

* Use std::array to store internal paint struct
2021-12-18 07:40:10 +00:00
Ted John a17f1990f2 Refactor some viewport code to use ImageId 2021-12-11 23:06:21 +00:00
Ted John 2108322806 Use ImageId for picked up peep 2021-12-07 20:17:22 +00:00
Hielke Morsink bd338fc7d2 Add DISABLE_OPENGL guard in ZoomLevel::min 2021-12-01 00:11:48 +01:00
Hielke Morsink 0f2dffcc16 Apply review suggestions 2021-12-01 00:11:45 +01:00
Hielke Morsink 53d9bfa8b4 Update implicit zoom conversions 2021-12-01 00:08:35 +01:00
Hielke Morsink 3f669cae85 Use zoomlevel some more 2021-11-30 19:11:32 +01:00
Hielke Morsink f3735dc076 Use ZoomLevel for viewport and ride window 2021-11-30 19:11:08 +01:00
ζeh Matt 9f23449ffb Move Staff/Guest/Peep to entity 2021-11-26 18:26:19 +02:00
ζeh Matt 7c726e2a0c Fix includes 2021-11-24 16:48:33 +02:00
Duncan 3f19d6f7d7 Split Peep header Guest into separate header (#15810)
* Move guest functions and classes to guest header

* Reduce includes of Peep.h
2021-10-28 21:38:23 +01:00
Sijmen cec8447c6f Refactor Viewport.cpp to use ScreenRect (#15790) 2021-10-27 00:13:38 -03:00
Michał Janiszewski 1b4875e528 Extract math-related functions from common.h to Math.hpp
Saves wide inclusion of <stdexcept> header, which pulls in <string>
2021-10-09 21:43:06 +02:00
ζeh Matt fa340cb5a1 Add parallel drawing if engine allows it 2021-10-06 17:24:39 +03:00
ζeh Matt 6ad4150085 Introduce rendering engine flag for parallel drawing 2021-10-06 17:15:40 +03:00
Michael Steenbeek 317e562845 Merge pull request #15495 from ZehMatt/refactor/xyz-access
Use GetLocation in more places
2021-10-01 14:02:34 +02:00
Hielke Morsink 94144bcd89 Remove some dead code
Reported by clang
clang-analyzer-deadcode.DeadStores
2021-09-30 10:40:32 +02:00
ζeh Matt eb2de0222b Use GetLocation in more places 2021-09-28 03:16:04 +03:00
Hielke Morsink 53c22c9b4b Check for nullptr explicitly (#15458) 2021-09-24 20:05:50 +02:00
Duncan a268350615 Fix #15439: Ride viewport is partially grey
The ride viewport does not work the same as other viewports due to the selection of views that it has. After refactoring the focus system to use a more streamlined approach the ride viewport lost its invalidation on resizing. If the ride window was to use the same viewport update code as say the guest window then the viewport focus still ends up incorrect due to it no longer centring the focus. Therefore the best approach was to lose the focus on resize and force a recalculation of it.

Also renamed Focus2 to Focus as Focus2 was meant to just be fill in whilst removing the original focus structs.
2021-09-21 11:06:04 +02:00
Duncan fa57b6aea0 Remove focus union and replace with typed focus (#15426)
* Remove focus union and replace with typed focus

This if for the NSF to allow for CoordsXYZ

* Remove legacy structures

* Rework viewport_create to deduplicate logic

* Simplify yet further

* Apply review comments

* Remove intermediate
2021-09-18 20:34:38 +01:00
Hielke Morsink 4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
Hielke Morsink 28681eebc0 Merge pull request #15407 from ZehMatt/refactor/optional-use
Make use of std::optional strict
2021-09-14 17:45:18 +02:00
Kane b35fd28c55 Feature #7682: Lock camera to vehicle in main window
Pressing the "Locate" button in the Ride window when selected on a "Vehicle/Train" will now have the main viewport track the vehicle.
2021-09-13 20:44:52 +02:00
ζeh Matt 59a6c34db4 Make use of std::optional strict 2021-09-13 20:02:32 +03:00
Hielke Morsink d42bc9a469 Merge pull request #15383 from Broxzier/refactor/smart-follow-cleanup 2021-09-10 20:13:23 +02:00
Hielke Morsink f966c229c0 Refactor out unnecessary Is<Guest/Staff> checks 2021-09-09 18:44:52 +02:00
Michael Steenbeek 624a32e93b Make Coords isNull/setNull functions TitleCase (#15382) 2021-09-08 20:48:53 -03:00
Hielke Morsink 2b51b91524 Make peep argument const 2021-09-08 22:59:58 +02:00
Hielke Morsink d3263ef6b7 Make smart follow functions easier to follow
Opted for a switch case instead of if-else if-else if-else
Reuse entity - is already checked for null and doesn't change
Remove unnecessary else blocks after if-block that returns
2021-09-08 22:55:08 +02:00
Duncan b2d0b54d13 Fix viewport interaction when zoomed (#15318)
Mistake made when increasing the type size from 16 to 32bit
2021-09-01 06:15:45 +01:00
ζeh Matt 5bf882587a Use constexpr where applicable in Viewport.cpp 2021-08-27 18:24:08 +03:00