MCPcopy Create free account
hub / github.com/assaultcube/AC / addselection

Function addselection

source/src/editing.cpp:153–159  ·  view source on GitHub ↗

add a selection to the list

Source from the content-addressed store, hash-verified

151
152// add a selection to the list
153void addselection(int x, int y, int xs, int ys, int h)
154{
155 block &s = sels.add();
156 if(h == -999 && !OUTBORD(x + xs / 2, y + ys / 2)) h = S(x + xs / 2, y + ys / 2)->floor;
157 s.x = x; s.y = y; s.xs = xs; s.ys = ys; s.h = h;
158 if(!correctsel(s)) { sels.drop(); }
159}
160
161// reset all selections
162void resetselections()

Callers 3

editing.cppFile · 0.85
makeselFunction · 0.85
restorepositionFunction · 0.85

Calls 3

correctselFunction · 0.85
addMethod · 0.45
dropMethod · 0.45

Tested by

no test coverage detected