Skip to content
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

Closed

Conversation

Crystalwarrior
Copy link
Contributor

@Crystalwarrior Crystalwarrior commented Jun 13, 2024

You are now able to paint world map tiles!

image

missing: getTileMapPort

Closes #4703

@Crystalwarrior Crystalwarrior changed the base branch from develop to adv-beta June 13, 2024 21:11
Copy link
Member

@myk002 myk002 left a 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

Comment on lines +325 to +326
// 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));
Copy link
Member

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.

Comment on lines +210 to +211
/// 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);
Copy link
Member

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) {
Copy link
Member

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

@myk002
Copy link
Member

myk002 commented Jun 13, 2024

also, please target this PR to develop, not adv-beta. This is functionality that is not specific to the adventure mode beta (though the travel map support may be). We don't know how long it will be before the v51 is released, and this API will be useful for implementing embark-assistant and the world map site finder that so many people have been asking for.

@Crystalwarrior Crystalwarrior changed the base branch from adv-beta to develop June 25, 2024 15:03
@Crystalwarrior Crystalwarrior changed the base branch from develop to adv-beta June 25, 2024 15:03
@myk002
Copy link
Member

myk002 commented Jun 27, 2024

to create a PR based on develop:

$ git checkout develop
$ git pull
$ git checkout -b world-map-port-tiles2
$ git cherry-pick world-map-port-tiles

(assumes that your develop branch is up to date with upstream)

you'd then start a new PR from that new branch

@Crystalwarrior
Copy link
Contributor Author

new shiny

#4767

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants