Beispiel #1
0
cell * create_cell_work(MN * mn, cell * ci, char bdiff, char dflag)
{
 cell * c = new_cell();
 accept_cell (c,(c_comp *)comp_to_kit(mn));
 c->basflg=c->bas1=c->bas2=c->bas3=c->bas4=0;
 c->difflg=dflag;
 c->bdiff=bdiff; c->reasno=0; c->cg_flag=0; c->dens=255;
 if (if_dust(c) & 0x0c)   c->flg=c_f_dust;
 else			c->flg=c_f_bad;
 set_bad_cell(c);
 c->col        += ci->col;
 c->r_col      += ci->r_col;
 c->row        += ci->row;
 c->r_row      += ci->r_row;
 c->env->upper += ci->r_row;
 c->env->left  += ci->r_col;
 if( ci->pos_inc&erect_rot )
   {
   c->pos_inc   = erect_rot;
   c->stick_inc = ci->stick_inc;
   }
 else
   {
   c->stick_inc = NO_INCLINE;
   c->pos_inc   = erect_no;
   }
 insert_cell(c,ci);
 return c;
}
Beispiel #2
0
cell * rest_cell(void *k, cell *ci)
{
 cell * c = new_cell();
 rest_kit((puchar) c, k);
 insert_cell(c,ci);
 return c;
}
Beispiel #3
0
cell * create_cell(MN * mn, cell * ci, char bdiff, char dflag) {
	cell * c = new_cell();
	accept_cell(c, (c_comp *) comp_to_kit(mn));
	c->basflg = c->bas1 = c->bas2 = c->bas3 = c->bas4 = 0;
	c->difflg = dflag;
	c->bdiff = bdiff;
	c->reasno = 0;
	c->cg_flag = 0;
	c->dens = 255;
	if (if_dust(c) & 0x0c)
		c->flg = c_f_dust;
	else
		c->flg = c_f_bad;
	set_bad_cell(c);
	c->pos_inc = erect_no;
	c->accent_leader = 0;
	c->bottom_accent = 0;
	c->n_baton = NO_BATONS;
	c->flg_new = 0;
	c->save_stick_inc = c->stick_inc = NO_INCLINE;
	c->cg_flag_fine = 0;
	c->dupstart = 0;
	c->dupend = 0;
	c->dlang_dup = 0; // Nick 17.02.2001 - was error!
	insert_cell(c, ci);
	return c;
}
Beispiel #4
0
void
calculate_grid_backtrack(void)
{
    int next_cell;

    for (int m = 0; m < 9; m++) {
        for (int n = 0; n < 9; n++) {
            next_cell = (int)random_in_range(9);
            insert_cell(m, n, next_cell);
        }
    }
}
Beispiel #5
0
 void insert(K &&key, V &&value)
 {
     insert_cell(new b_tree_cell{std::move(key), std::move(value)});
 }
Beispiel #6
0
 void insert(const K &key, const V &value)
 {
     insert_cell(new b_tree_cell{key, value});
 }