Add air pockets to level data
parent
9d5b54435b
commit
c02eba9548
|
@ -181,16 +181,6 @@ Entity_t* create_bomb(EntityManager_t* ent_manager, Vector2 launch_dir)
|
||||||
Entity_t* p_bomb = add_entity(ent_manager, DESTRUCTABLE_ENT_TAG);
|
Entity_t* p_bomb = add_entity(ent_manager, DESTRUCTABLE_ENT_TAG);
|
||||||
if (p_bomb == NULL) return NULL;
|
if (p_bomb == NULL) return NULL;
|
||||||
|
|
||||||
//p_bomb->position.x += (TILE_SIZE - 25) / 2;
|
|
||||||
//p_bomb->position.y += (TILE_SIZE - 25) / 2;
|
|
||||||
//if (launch_dir.x > 0)
|
|
||||||
//{
|
|
||||||
// p_bomb->position.x += TILE_SIZE/ 2;
|
|
||||||
//}
|
|
||||||
//else if (launch_dir.x < 0)
|
|
||||||
//{
|
|
||||||
// p_bomb->position.x -= TILE_SIZE / 2;
|
|
||||||
//}
|
|
||||||
|
|
||||||
add_component(p_bomb, CTILECOORD_COMP_T);
|
add_component(p_bomb, CTILECOORD_COMP_T);
|
||||||
add_component(p_bomb, CMOVEMENTSTATE_T);
|
add_component(p_bomb, CMOVEMENTSTATE_T);
|
||||||
|
|
|
@ -134,9 +134,15 @@ bool load_level_tilemap(LevelScene_t* scene, unsigned int level_num)
|
||||||
change_a_tile(&scene->data.tilemap, i, SOLID_TILE);
|
change_a_tile(&scene->data.tilemap, i, SOLID_TILE);
|
||||||
}
|
}
|
||||||
|
|
||||||
scene->data.tilemap.tiles[i].max_water_level = 4;
|
if (lvl_map.tiles[i].water > MAX_WATER_LEVEL) {
|
||||||
scene->data.tilemap.tiles[i].water_level = lvl_map.tiles[i].water;
|
scene->data.tilemap.tiles[i].max_water_level = 0;
|
||||||
scene->data.tilemap.tiles[i].wet = scene->data.tilemap.tiles[i].water_level > 0;
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
scene->data.tilemap.tiles[i].max_water_level = 4;
|
||||||
|
scene->data.tilemap.tiles[i].water_level = lvl_map.tiles[i].water;
|
||||||
|
scene->data.tilemap.tiles[i].wet = scene->data.tilemap.tiles[i].water_level > 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Two pass
|
// Two pass
|
||||||
for (size_t i = 0; i < scene->data.tilemap.n_tiles;i++)
|
for (size_t i = 0; i < scene->data.tilemap.n_tiles;i++)
|
||||||
|
|
Loading…
Reference in New Issue