MCPcopy Create free account
hub / github.com/axmolengine/axmol / removeQuadsAtIndex

Method removeQuadsAtIndex

core/renderer/TextureAtlas.cpp:318–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318void TextureAtlas::removeQuadsAtIndex(ssize_t index, ssize_t amount)
319{
320 AXASSERT(index >= 0 && amount >= 0 && index + amount <= _totalQuads,
321 "removeQuadAtIndex: index + amount out of bounds");
322
323 auto remaining = (_totalQuads) - (index + amount);
324
325 _totalQuads -= amount;
326
327 if (remaining)
328 {
329 memmove(&_quads[index], &_quads[index + amount], sizeof(_quads[0]) * remaining);
330 }
331
332 _dirty = true;
333}
334
335void TextureAtlas::removeAllQuads()
336{

Callers 1

removeChildMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected