diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-01 16:45:26 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-06-01 16:45:26 +0200 |
commit | 8a7a3e0acc603896b9297fd82f99f91923be1b33 (patch) | |
tree | 42f1b64734fa4aa1b8829e7a6cd4a109f6b1e933 /src/lib/eiotas_particle.c | |
parent | 1373440eb043ebd121a6827aa28e4832cb959efe (diff) | |
download | edoors-8a7a3e0acc603896b9297fd82f99f91923be1b33.zip edoors-8a7a3e0acc603896b9297fd82f99f91923be1b33.tar.gz |
Particle, add Eina_Stringshare struct fields : cur_action, cur_door, cur_room
Diffstat (limited to 'src/lib/eiotas_particle.c')
-rw-r--r-- | src/lib/eiotas_particle.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/eiotas_particle.c b/src/lib/eiotas_particle.c index 6148845..35f3691 100644 --- a/src/lib/eiotas_particle.c +++ b/src/lib/eiotas_particle.c @@ -35,6 +35,9 @@ Eiotas_Particle* eiotas_particle_alloc() particle->link_fields = eina_array_new(EIOTAS_PARTICLE_ARRAY_STEP); particle->link_value = NULL; particle->cur_dst = 0; + particle->cur_action = NULL; + particle->cur_door = NULL; + particle->cur_room = NULL; return particle; } @@ -56,6 +59,9 @@ void eiotas_particle_free(Eiotas_Particle *particle) EINA_ARRAY_ITER_NEXT(particle->link_fields, i, s, it) eina_stringshare_del(s); eina_array_free(particle->link_fields); if(particle->link_value) eina_stringshare_del(particle->link_value); + if(particle->cur_action) eina_stringshare_del(particle->cur_action); + if(particle->cur_door) eina_stringshare_del(particle->cur_door); + if(particle->cur_room) eina_stringshare_del(particle->cur_room); free(particle); } @@ -80,6 +86,12 @@ EAPI void eiotas_particle_reset(Eiotas_Particle *particle) eina_array_clean(particle->link_fields); if(particle->link_value) eina_stringshare_del(particle->link_value); particle->link_value = NULL; + if(particle->cur_action) eina_stringshare_del(particle->cur_action); + particle->cur_action = NULL; + if(particle->cur_door) eina_stringshare_del(particle->cur_door); + particle->cur_door = NULL; + if(particle->cur_room) eina_stringshare_del(particle->cur_room); + particle->cur_room = NULL; } EAPI void eiotas_particle_init(Eiotas_Particle *particle, Eiotas_Iota *iota) |