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

Function gen_pen_key

plugins/design.cpp:106–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104};
105
106uint32_t gen_pen_key(bool n, bool s, bool e, bool w, bool is_drag_point,
107 bool is_mouse_over, bool inshape, bool extra_point) {
108 std::bitset<static_cast<size_t>(PenMask::NumFlags)> ret;
109 ret[PenMask::North] = n;
110 ret[PenMask::South] = s;
111 ret[PenMask::East] = e;
112 ret[PenMask::West] = w;
113 ret[PenMask::DragPoint] = is_drag_point;
114 ret[PenMask::MouseOver] = is_mouse_over;
115 ret[PenMask::InShape] = inshape;
116 ret[PenMask::ExtraPoint] = extra_point;
117
118 return ret.to_ulong();
119}
120
121Screen::Pen make_pen(const std::pair<int, int> &direction, bool is_drag_point,
122 bool is_mouse_over, bool inshape, bool extra_point) {

Callers 1

get_penFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected