Added SpriteBatch:remove(id)

This commit is contained in:
Alex Szpakowski
2013-02-11 18:27:57 -04:00
parent 842c01b4e5
commit ceb0ee6c7e
7 changed files with 137 additions and 18 deletions
@@ -23,6 +23,7 @@
// C
#include <cstring>
#include <deque>
// LOVE
#include "common/math.h"
@@ -64,6 +65,7 @@ public:
int add(float x, float y, float a, float sx, float sy, float ox, float oy, float kx, float ky, int index = -1);
int addq(Quad *quad, float x, float y, float a, float sx, float sy, float ox, float oy, float kx, float ky, int index = -1);
void remove(int index);
void clear();
void *lock();
@@ -126,6 +128,10 @@ private:
VertexBuffer *array_buf;
VertexIndex *element_buf;
// List of gaps in the SpriteBatch. Checked when adding sprites, and added
// to when removing them.
std::deque<int> gaps;
}; // SpriteBatch
} // opengl