You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
The text was updated successfully, but these errors were encountered:
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
'sdoSetTile_map
function is called to draw the tiles, which writes to buffers ingps->main_viewport
, but for map screens it would need to instead write togps->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 referencegraphic_map_portst
instead ofgraphic_viewportst
, with the default probably beingdf::graphic_map_portst::screentexpos_interface
.An example of what it looks like when the correct buffer is used to draw to the world map:
The text was updated successfully, but these errors were encountered: