MCPcopy Create free account
hub / github.com/DFHack/dfhack / scroll_world

Function scroll_world

plugins/edgescroll.cpp:193–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193static void scroll_world(world_map screen, int xdiff, int ydiff) {
194 const auto visitor = overloads {
195 [xdiff, ydiff](df::viewscreen_choose_start_sitest* s) {scroll_world_internal(s, xdiff, ydiff);},
196 [xdiff, ydiff](df::viewscreen_worldst* s) {scroll_world_internal(s, xdiff, ydiff);},
197 [xdiff, ydiff](df::viewscreen_new_regionst* s) {scroll_world_internal(s, xdiff, ydiff);},
198 };
199 std::visit(visitor, screen);
200}
201
202DFhackCExport command_result plugin_onupdate(color_ostream &out) {
203 // Apply a cooldown to any potential edgescrolls

Callers 1

Calls 1

scroll_world_internalFunction · 0.85

Tested by

no test coverage detected