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 new map drawing functions #4703

Open
tatoyoda600 opened this issue Jun 11, 2024 · 0 comments · May be fixed by #4767
Open

Add new map drawing functions #4703

tatoyoda600 opened this issue Jun 11, 2024 · 0 comments · May be fixed by #4767

Comments

@tatoyoda600
Copy link
Contributor

Add new functions to handle drawing to world maps.
Screen::paintTile / dfhack.screen.paintTile and the functions derived from these don't work with world map screens. They can be used, just sprites won't be sized correctly and transparency won't be applied.

Internally, Screen.cpp's doSetTile_map function is called to draw the tiles, which writes to buffers in gps->main_viewport, but for map screens it would need to instead write to gps->main_map_port instead.
Most of the logic can probably be copied over with minimal modifications, but the texpos_field parameter's type would have to change to reference graphic_map_portst instead of graphic_viewportst, with the default probably being df::graphic_map_portst::screentexpos_interface.

An example of what it looks like when the correct buffer is used to draw to the world map:
image

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 a pull request may close this issue.

1 participant