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

Function design_draw_shape

plugins/design.cpp:236–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236static int design_draw_shape(lua_State *L) {
237 if (arr.size() == 0) {
238 design_load_shape(L);
239 }
240
241 for (auto x : arr) {
242 for (auto y : x.second) {
243 Screen::Pen pen;
244 get_pen(&pen, NULL, x.first, y.first, arr);
245 df::coord2d pos(x.first - *window_x, y.first - *window_y);
246 Screen::paintTile(pen, pos.x, pos.y, true);
247 }
248 }
249
250 return 0;
251}
252
253static int design_draw_points(lua_State *L) {
254 bool is_graphics_mode = Screen::inGraphicsMode();

Callers

nothing calls this directly

Calls 4

design_load_shapeFunction · 0.85
get_penFunction · 0.85
paintTileFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected