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

Function blockcopy

source/src/worldlight.cpp:358–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356// utility functions also used by editing code
357
358block *blockcopy(const block &s)
359{
360 block *b = (block *)new uchar[sizeof(block)+s.xs*s.ys*sizeof(sqr)];
361 *b = s;
362 sqr *q = (sqr *)(b+1), *r = S(s.x,s.y);
363 size_t bs = s.xs * sizeof(sqr);
364 loopirev(s.ys) { memcpy(q, r, bs); q += s.xs; r += ssize; }
365 return b;
366}
367
368void blocktexusage(const block &b, uchar *used)
369{

Callers 8

empty_worldFunction · 0.85
preparedynlightFunction · 0.85
makeundoFunction · 0.85
editundoFunction · 0.85
editredoFunction · 0.85
loopvFunction · 0.85
movemapFunction · 0.85
selfliprotateFunction · 0.85

Calls 1

loopirevFunction · 0.70

Tested by

no test coverage detected