[Change] Simplifies spfx_destroy, performs a little better..

This commit is contained in:
Allanis 2013-02-26 23:50:00 +00:00
parent ce7480d928
commit be7a2b7791

View File

@ -142,10 +142,8 @@ void spfx_clear(void) {
} }
static void spfx_destroy(SPFX* layer, int* nlayer, int spfx) { static void spfx_destroy(SPFX* layer, int* nlayer, int spfx) {
int i;
(*nlayer)--; (*nlayer)--;
for(i = spfx; i < *nlayer; i++) memmove(&layer[spfx], &layer[spfx+1], (*nlayer-spfx)*sizeof(SPFX));
memcpy(&layer[i], &layer[i+1], sizeof(SPFX));
} }
void spfx_update(const double dt) { void spfx_update(const double dt) {