Better drawing of layout tiles
This commit is contained in:
@@ -114,8 +114,20 @@ growth_module::growth_module(flecs::world &ecs)
|
||||
.ptr());
|
||||
if (!neighbor_e.is_valid()) {
|
||||
outside = true;
|
||||
break;
|
||||
if (id == west_id)
|
||||
e.add<WorldEditor::components::
|
||||
outside_wall_west>();
|
||||
else if (id == east_id)
|
||||
e.add<WorldEditor::components::
|
||||
outside_wall_east>();
|
||||
else if (id == north_id)
|
||||
e.add<WorldEditor::components::
|
||||
outside_wall_north>();
|
||||
else if (id == south_id)
|
||||
e.add<WorldEditor::components::
|
||||
outside_wall_south>();
|
||||
}
|
||||
#if 0
|
||||
if (!e.parent()
|
||||
.get<WorldEditor::components::
|
||||
buildings_layout_grid_floor>()
|
||||
@@ -123,26 +135,30 @@ growth_module::growth_module(flecs::world &ecs)
|
||||
outside = true;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
flecs::log::dbg("outside: %d", outside);
|
||||
#if 0
|
||||
for (i = 0; i < (int)neighbors.size(); i++) {
|
||||
int id = neighbors[i];
|
||||
print_line("id=" + itos(id));
|
||||
String neighbor_name = "cell_" + itos(id);
|
||||
flecs::entity neighbor_e =
|
||||
e.parent().lookup(neighbor_name.ascii().ptr());
|
||||
if (!neighbor_e.is_valid())
|
||||
continue;
|
||||
const WorldEditor::components::buildings_layout_grid_cell
|
||||
*neighbor_cell = neighbor_e.get<
|
||||
WorldEditor::components::
|
||||
buildings_layout_grid_cell>();
|
||||
if (cell.type != neighbor_cell->type) {
|
||||
border = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef MAKE_BORDER
|
||||
for (i = 0; i < (int)neighbors.size(); i++) {
|
||||
int id = neighbors[i];
|
||||
print_line("id=" + itos(id));
|
||||
String neighbor_name =
|
||||
"cell_" + itos(id);
|
||||
flecs::entity neighbor_e =
|
||||
e.parent().lookup(
|
||||
neighbor_name.ascii()
|
||||
.ptr());
|
||||
if (!neighbor_e.is_valid())
|
||||
continue;
|
||||
const WorldEditor::components::buildings_layout_grid_cell
|
||||
*neighbor_cell = neighbor_e.get<
|
||||
WorldEditor::components::
|
||||
buildings_layout_grid_cell>();
|
||||
if (cell.type != neighbor_cell->type) {
|
||||
border = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (outside) {
|
||||
e.add<WorldEditor::components::
|
||||
|
||||
Reference in New Issue
Block a user