-
Notifications
You must be signed in to change notification settings - Fork 480
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
Add painting tiles to the world map port #4711
Add painting tiles to the world map port #4711
Conversation
(no getTileMapPort yet)
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.
needs docs in Lua API.rst
and changelog.txt
// GUI_HOOK_DECLARE(get_tile_map_port, Pen, (int x, int y, int32_t * df::graphic_map_portst::*texpos_field)); | ||
GUI_HOOK_DECLARE(set_tile_map_port, bool, (const Pen &pen, int x, int y, int32_t * df::graphic_map_portst::*texpos_field)); |
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.
don't bother with this. This is a deprecated construct leftover from TWBT. You can just directly implement the new paint function without the GUI_HOOK redirection.
/// Retrieves one world map tile from the buffer | ||
// DFHACK_EXPORT Pen readTile(int x, int y, int32_t * df::graphic_map_portst::*texpos_field = NULL); |
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.
why not support this too?
@@ -365,6 +365,41 @@ Pen Screen::readTile(int x, int y, bool map, int32_t * df::graphic_viewportst::* | |||
return doGetTile(x, y, map, texpos_field); | |||
} | |||
|
|||
static bool doSetTile_map_port(const Pen &pen, int x, int y, int32_t * df::graphic_map_portst::*texpos_field) { |
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.
make sure you handle ASCII mode properly
also, please target this PR to |
to create a PR based on $ git checkout develop
$ git pull
$ git checkout -b world-map-port-tiles2
$ git cherry-pick world-map-port-tiles (assumes that your you'd then start a new PR from that new branch |
new shiny |
You are now able to paint world map tiles!
missing: getTileMapPort
Closes #4703