diff --git a/scenes/assets_tag.h b/scenes/assets_tag.h index a38df9f..64330b3 100644 --- a/scenes/assets_tag.h +++ b/scenes/assets_tag.h @@ -11,6 +11,7 @@ typedef enum EntityTag { LEVEL_END_TAG, DESTRUCTABLE_ENT_TAG, DYNMEM_ENT_TAG, + URCHIN_ENT_TAG, } EntityTag_t; typedef enum SFXTag { diff --git a/scenes/game_systems.c b/scenes/game_systems.c index 7a644dd..6fa1f37 100644 --- a/scenes/game_systems.c +++ b/scenes/game_systems.c @@ -258,7 +258,7 @@ static void destroy_entity(Scene_t* scene, TileGrid_t* tilemap, Entity_t* p_ent) play_particle_emitter(&scene->part_sys, &emitter); play_sfx(scene->engine, ARROW_DESTROY_SFX); } - else if (p_ent->m_tag == NO_ENT_TAG) + else if (p_ent->m_tag == URCHIN_ENT_TAG) { ParticleEmitter_t emitter = { .spr = get_sprite(&scene->engine->assets, "p_spike"), diff --git a/scenes/items_ent.c b/scenes/items_ent.c index f0ee61a..081723f 100644 --- a/scenes/items_ent.c +++ b/scenes/items_ent.c @@ -250,7 +250,7 @@ Entity_t* create_urchin(EntityManager_t* ent_manager) // The hit box is larger than the bbox // Unfortunately, it's too late to incorporate the offset for the bbox component // So, offset the hitbox instead and external reposition it. - Entity_t* p_urchin = add_entity(ent_manager, NO_ENT_TAG); + Entity_t* p_urchin = add_entity(ent_manager, URCHIN_ENT_TAG); if (p_urchin == NULL) return NULL; CBBox_t* p_bbox = add_component(p_urchin, CBBOX_COMP_T); diff --git a/scenes/player_ent.c b/scenes/player_ent.c index 08b26c1..46b03e9 100644 --- a/scenes/player_ent.c +++ b/scenes/player_ent.c @@ -161,8 +161,6 @@ Entity_t* create_player_finish(EntityManager_t* ent_manager) p_cspr->current_idx = SPR_PLAYER_ENTER; p_cspr->transition_func = &player_finish_transition_func; - add_component(p_ent, CTILECOORD_COMP_T); - CLifeTimer_t* p_clifetimer = add_component(p_ent, CLIFETIMER_T); p_clifetimer->life_time = 0.9f; return p_ent;