| 316 | } |
| 317 | |
| 318 | void 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 | |
| 335 | void TextureAtlas::removeAllQuads() |
| 336 | { |