| 298 | } |
| 299 | |
| 300 | void 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 | |
| 318 | void TextureAtlas::removeQuadsAtIndex(ssize_t index, ssize_t amount) |
| 319 | { |
no outgoing calls
no test coverage detected