Skip to content

Add new map drawing functions #4703

@tatoyoda600

Description

@tatoyoda600

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions