Widget refactorings, turned draw functions into normal member functions.#1012
Widget refactorings, turned draw functions into normal member functions.#1012AaronVanGeffen merged 10 commits intoOpenLoco:masterfrom Truenya:master
Conversation
|
There are a few variables i think that you will have to rename due to hiding of member variables |
src/OpenLoco/Widget.cpp
Outdated
| if (window->flags & WindowFlags::flag_11) | ||
| { | ||
| image = 0x20000000 | 2322 | ((colour & 0x7F) << 19); | ||
| frame = 0x20000000 | 2322 | ((colour & 0x7F) << 19); |
There was a problem hiding this comment.
There is a function that could be used for this instead to clear it up.
imageId = Gfx::recolour(2322, Colour::opaque(colour))
There was a problem hiding this comment.
Image 2322 is the frame's background image (800px wide). Please add a constant to Graphics/ImageIds.h for it. (Note that the file is ordered sequentially.)
There was a problem hiding this comment.
Added constant, named frame_background_image in right order.
|
Could you address the formatting issues with this PR? See the clang-format CI. There's not much use in merging master into this branch when there are no conflicts, by the way. We prefer to avoid nested merge commits, anyway. |
src/OpenLoco/Widget.cpp
Outdated
| // TODO: Remove image addition | ||
| uint32_t image = widget->image + 2; | ||
| // TODO: Remove added_image addition | ||
| uint32_t added_image = image + 2; |
There was a problem hiding this comment.
Can you apply all the comments I had to the whole set of your changes not just the first ones.
There was a problem hiding this comment.
I am verry sorry, forgot some variables.
Now it shoud be fine.
|
Correct those minor 3 comments and I think this is good to merge. |
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>
…ature/mac-docker * 'master' of https://github.com/OpenLoco/OpenLoco: (536 commits) Mention code style in readme (OpenLoco#1047) Remove redundant rotate function (OpenLoco#1046) Link up implemented function (OpenLoco#1043) Fix use of constants for coord limits (OpenLoco#1037) validCoords: remove template parameter and name type (OpenLoco#1033) Add coordinate validation to tile loops with offsets (OpenLoco#1031) Implement ChangeCompanyColour game command (OpenLoco#1029) Implement colour picker dropdowns (OpenLoco#1028) Implement StationManager::generateNewStationName (OpenLoco#1020) Station rename command (OpenLoco#984) Fix access to embedded object name (OpenLoco#1022) Reduce inclusion of StringIds.h in header files (OpenLoco#985) Implement the station name background paint (OpenLoco#1023) Force alignment on TileManager::createAnimation hook Merge duplicated flags and use accessors (OpenLoco#1025) Remove use of global stringformatbuffer where not required (OpenLoco#1024) Refactor calls to tryCreateInitialMovementSound (OpenLoco#1018) Turn widget draw functions into Widget struct member functions (OpenLoco#1012) Allow filtering the vehicle list by station or cargo (OpenLoco#997) Restore game command table alignment ...
No description provided.