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

Method removeQuadAtIndex

core/renderer/TextureAtlas.cpp:300–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300void TextureAtlas::removeQuadAtIndex(ssize_t index)
301{
302 AXASSERT(index >= 0 && index < _totalQuads, "removeQuadAtIndex: Invalid index");
303
304 auto remaining = (_totalQuads - 1) - index;
305
306 // last object doesn't need to be moved
307 if (remaining)
308 {
309 // texture coordinates
310 memmove(&_quads[index], &_quads[index + 1], sizeof(_quads[0]) * remaining);
311 }
312
313 _totalQuads--;
314
315 _dirty = true;
316}
317
318void TextureAtlas::removeQuadsAtIndex(ssize_t index, ssize_t amount)
319{

Callers 1

removeSpriteFromAtlasMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected