void
route_set_position_from_tracking(struct route *this, struct tracking *tracking)
{
- struct coord *c;
+ struct pcoord *c;
struct route_info *ret;
dbg(2,"enter\n");
if (this->pos)
route_info_free(this->pos);
this->pos=NULL;
- ret->c=*c;
- ret->lp=*c;
+ ret->c.x = c->x;
+ ret->c.y = c->y;
+ ret->lp.x=c->x;
+ ret->lp.y=c->y;
ret->pos=tracking_get_segment_pos(tracking);
ret->street=street_data_dup(tracking_get_street_data(tracking));
- route_info_distances(ret, projection_mg);
+ route_info_distances(ret, c->pro);
dbg(3,"c->x=0x%x, c->y=0x%x pos=%d item=(0x%x,0x%x)\n", c->x, c->y, ret->pos, ret->street->item.id_hi, ret->street->item.id_lo);
dbg(3,"street 0=(0x%x,0x%x) %d=(0x%x,0x%x)\n", ret->street->c[0].x, ret->street->c[0].y, ret->street->count-1, ret->street->c[ret->street->count-1].x, ret->street->c[ret->street->count-1].y);
this->pos=ret;
d=dx*sx;
else
d=dy*sy;
- m=d*rel/100+abs;
+ m=d*rel/100+abs;
sel->u.c_rect.lu.x-=m;
sel->u.c_rect.rl.x+=m;
sel->u.c_rect.lu.y+=m;