inline std::string join(const std::string& dir, const std::string& path)
 {
    char last = dir.size() ? DIR_BACK(dir) : '\0';
    std::string sep;
    if (last != '/' && last != '\\')
       sep = "/";
    return dir + sep + path;
 }
Пример #2
0
void
bridgefall(struct sctstr *sp)
{
    int i;
    struct sctstr sect;
    int nx;
    int ny;

    for (i = 1; i <= 6; i++) {
	nx = sp->sct_x + diroff[i][0];
	ny = sp->sct_y + diroff[i][1];
	getsect(nx, ny, &sect);
	if (sect.sct_type == SCT_BSPAN
	    && !bridge_support_at(&sect, DIR_BACK(i))) {
	    knockdown(&sect);
	    putsect(&sect);
	}
    }
}