-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finish migrating tileset layers to classes #2346
Merged
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
9a41709
Make is_extra_drawing_enabled const-correct
lmoureaux c0feba8
Allow class-based layers to use info about extras
lmoureaux 6e77596
Use extrastyle_id in estyle_hash
lmoureaux e2eefe6
Tilespec: expose make_tag_terrain_list
lmoureaux 9f1a857
Tilespec: expose dir_get_tileset_name
lmoureaux 72eb60f
Tilespec: Create a load_sprite() overload taking a list of possible tags
lmoureaux 7f20455
Tilespec: move extra-related definitions to layer.h
lmoureaux e1cf358
Move water drawing (CARDINAL/RIVER extras) to layer_water
lmoureaux 2cea04d
Make layer_darkness load its own sprites
lmoureaux 2b0048b
Migrate loading special sprites to layer_special
lmoureaux 9183b45
Add a draw_sprite constructor taking QPoint offsets
lmoureaux 250442f
Move layer_units drawing and initialization to the class
lmoureaux 7c5dcc3
Use QPoint-based offsets more consistently
lmoureaux 942725d
Move LAYER_FOG to a class
lmoureaux 578d9c7
Standardize layer::load_sprites()
lmoureaux 8c2ecd5
Move LAYER_GRID1 and 2 to class layer_grid
lmoureaux bfa4c16
Move LAYER_EDITOR to class layer_editor
lmoureaux f2e2460
Move LAYER_GOTO to class layer_goto
lmoureaux c8a6cf0
Migrate LAYER_CITY2 to class layer_city_size
lmoureaux 91ab41f
Migrate LAYER_CITY1 to class layer_city
lmoureaux a09846b
Migrate LAYER_OVERLAYS to class layer_overlays
lmoureaux c9ceebe
Add a common base for layers using activity sprites
lmoureaux d37e1e8
Fix trying to fetch goto state on unknown tiles
lmoureaux f77c1d0
Port LAYER_INFRAWORK to class layer_infrawork
lmoureaux b9052c5
Port LAYER_ROADS to class layer_roads
lmoureaux ac8eb0c
Fix some offsets in city layers
lmoureaux 16cdaba
Expose valid tileset directions
lmoureaux f21b5f0
Move road drawing to layer_roads
lmoureaux 445fffd
Remove fill_sprite_array() from tilespec.cpp
lmoureaux 335e672
Remove unused includes from tilespec.cpp
lmoureaux e4cba69
Update POTFILES
lmoureaux ce57556
Use QPoint in drawn_sprite and related APIs
lmoureaux 3363dc7
Remove ADD_SPRITE_FULL
lmoureaux 030cee0
Fix make_tag_terrain_list when the terrain has no graphic_alt
lmoureaux f431bef
Fix initializing tileset extra data after terrains
lmoureaux 004aaaa
Use std::vector::insert more now that drawn_sprite is assignable
lmoureaux 0b23b0a
Replace sprite_vector with vector<QPixmap *>
lmoureaux a47eb4c
Add a function in the layer class to load a sprite
lmoureaux 5b42d04
Don't use tiles_lookup_sprite_tag_alt in helpdlg
lmoureaux d648de8
Use QSize for sprite sizes in tilespec.cpp
lmoureaux 3a2b056
clang-format
lmoureaux 0ad45cb
Add missing <array> includes
lmoureaux 49328e8
Check that at least one unit.hp_ sprite is present
lmoureaux 51ff22c
Tidy up layer_fog a little
lmoureaux 5e4e707
Add a silent mode when loading optional sprites
lmoureaux f3245dd
Direct all tileset-related messages to a logging category
lmoureaux 63d7383
Switch "already have a sprite for" to a qCWarning
lmoureaux 204a0de
Disable tileset INFO messages by default
lmoureaux 6ff7183
Don't show the "city is occupied" sprite in city_icon_widget
lmoureaux f7febe4
city_size_offset is relative to full_tile_offset
lmoureaux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std library, need an include in header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only needed in the header if used there (which is the case). But
vector
is somehow magically included everywhere already, I'm not sure which header does that. If you want we can runiwyu
in another PR...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i'll do a fresh compile on clang as a test as well