1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 07:14:31 +01:00
Commit Graph

160 Commits

Author SHA1 Message Date
Gymnasiast
5309c80e29 Remove snake_case in interface folder 2023-01-16 22:20:41 +01:00
Duncan
7f5934cc95 Remove snake_case from second chunk of Drawing (#19166) 2023-01-16 18:52:17 +00:00
Duncan
8a8d3105f3 Remove snake_case from first chunk of Drawing (#19164)
* Remove snake_case from first chunk of Drawing

* Address formatting
2023-01-16 13:50:43 +00:00
James103
73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
frutiemax
76faa77f6b Part of #16152: Use BoundBoxXYZ for PaintAddImageAsChild 2022-11-27 18:33:11 +00:00
Michał Janiszewski
3e4e8bccc5 Pass ImageId by value instead by const-ref
ImageId struct is 8-bytes large and can fit in CPU register. Passing it
by value lets compiler pass it in register instead of forcing to
reference it from memory.

In my tests this brings
[dome park](https://github.com/OpenRCT2/OpenRCT2/files/6134362/dome-export.zip)
benchgfx results from 42.16s down to 41.08s, or by 2.5%.
2022-11-12 00:06:05 +01:00
Hielke Morsink
31dd4bf604 Use lower-case u integral suffix 2022-10-29 16:33:05 +02:00
Gymnasiast
14f9a75e0a Refactor FontSpriteBase and font size into FontStyle 2022-10-19 11:59:26 +02:00
Hielke Morsink
abac080d3e Rename public general config data members 2022-10-16 21:46:01 +02:00
Rik Smeets
c80bd455e9 Code style: Remove struct snakes from Paint (#18341) 2022-10-14 20:26:36 +02:00
Duncan
406b73d904 Remove final snakes from map and world (#18304) 2022-10-12 09:14:45 -03:00
Rik Smeets
c5904d81d6 Code Style: Remove snakes from paint tile elements (#18212) 2022-10-05 21:27:38 +02:00
73
8c3ff1bfa8 Replace Transparancy with Transparency 2022-10-04 18:28:15 +02:00
Michał Janiszewski
bcce0c2d12 Fix leak in PaintEntryPool::Chain::operator= (#18183)
Inspired by #18178
2022-10-03 22:53:33 +00:00
73
b9e677945d Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Gymnasiast
a69a8fa7e8 Remove uint32_t overloads in Paint functions 2022-09-29 21:17:16 +02:00
Michael Steenbeek
6f3790cf98 Modify ride drawing code to use ImageId 2022-09-28 21:36:56 +02:00
Michael Steenbeek
7bb7d97bdc More bound box refactors 2022-09-27 21:20:49 +02:00
Gymnasiast
d3fd31c611 Rename rct_string_id to StringId 2022-07-31 22:30:13 +02:00
Duncan
d09140aaed Minor Paint refactor (#17144)
* Tidy up masked paint code

Its only used by surface elements and only then by attached ps's so no need to support it in the normal ps.

* Remove unneeded function
2022-05-06 06:46:50 +01:00
Ted John
c68359662d Refactor visibility control 2022-03-14 21:57:05 +00:00
Ted John
9794be6a09 Hide trees using colourify function 2022-03-14 21:55:15 +00:00
Ted John
8aafab2a70 Split paint item into element and entity 2022-03-14 21:55:15 +00:00
Ted John
79989a5e84 Fix transparency issues 2022-03-14 21:55:15 +00:00
Kane
b83e21a953 Improve code readability (added parentheses) 2022-03-14 21:43:12 +00:00
Kane
3d3271a5ec Misc. clean ups
Define see-through paint colours in Paint.h for global use
Color staff sprite button
Change ride->is_visible bool to ignore_invisible_flag bool
Add shortcut to open transparency options (CTRL+T)
2022-03-14 21:41:49 +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
204f8ceac1 Add new Transparency options window.
Remove added options from Top Toolbar.
Move invisible ride code into ride paint functions.
Move invisible vehicle code into sprite paint function.
2022-03-14 21:37:41 +00:00
Kane
4856c3adaf Implement invisible rides, paths & scenery 2022-03-14 21:37:18 +00:00
Kane
9f78c6f0ce Add option to see-through vehicles 2022-03-14 21:36:47 +00:00
duncanspumpkin
68d0d05d49 Remove extra non rotated PaintAddImageAsChild 2022-03-11 21:45:12 +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 Matt
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
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
4288589f11 Refactor large scenery to use ImageId 2021-12-11 23:07:56 +00:00
Ted John
c55fa94af5 Refactor paint wall to use ImageId 2021-12-11 23:06:21 +00:00
Ted John
bd9f7d56c5 Fix #16130: Crash when using see-through rides or scenery 2021-12-05 23:33:09 +01:00
Ted John
5f9d03e9df Refactor ImageId and use in more functions 2021-12-03 19:59:33 +01:00
Hielke Morsink
53d9bfa8b4 Update implicit zoom conversions 2021-12-01 00:08:35 +01:00
ζeh Matt
9f2e8372ae Rename sprite_paint_setup to EntityPaintSetup 2021-11-27 16:17:02 +02:00
ζeh Matt
7a0fb048f8 Move reorganize structure of Paint.Sprite 2021-11-27 16:16:10 +02:00
Hielke Morsink
9dd20ec619 Improve array formatting
For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
2021-10-17 18:21:45 +02: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
Soham Roy
4d27417fd2 Fix #11354: Coding style causes undefined behaviour
An underscore followed by a capital letter used as a prefix might cause
undefined behaviour
2021-10-05 13:58:50 +02:00
ζeh Matt
4ea8902587 Refactor arg passing to sprite_paint_setup 2021-09-27 22:48:06 +03:00
Hielke Morsink
53c22c9b4b Check for nullptr explicitly (#15458) 2021-09-24 20:05:50 +02:00
ζeh Matt
2e8d40b5e3 Fix out of bounds regression from #15391 2021-09-10 22:34:18 +03:00
ζeh Matt
0b12076f2f Fix #15390: Revert quadrant distribution change and cleanup 2021-09-10 17:35:44 +03:00
ζeh Matt
6a7fe6a5e2 Fix #15376: Extend the X axis on rotation 0 to cover corners
Also make the code branchless
2021-09-08 23:13:19 +03:00