You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
(59) |
Sep
(43) |
Oct
(95) |
Nov
(135) |
Dec
(108) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(229) |
Feb
(141) |
Mar
(59) |
Apr
(70) |
May
(64) |
Jun
(87) |
Jul
(57) |
Aug
(108) |
Sep
(74) |
Oct
(203) |
Nov
(141) |
Dec
(108) |
2009 |
Jan
(114) |
Feb
(91) |
Mar
(101) |
Apr
(69) |
May
(54) |
Jun
(82) |
Jul
(49) |
Aug
(109) |
Sep
(81) |
Oct
(93) |
Nov
(100) |
Dec
(79) |
2010 |
Jan
(46) |
Feb
(36) |
Mar
(135) |
Apr
(103) |
May
(116) |
Jun
(130) |
Jul
(52) |
Aug
(31) |
Sep
(46) |
Oct
(48) |
Nov
(98) |
Dec
(110) |
2011 |
Jan
(234) |
Feb
(184) |
Mar
(150) |
Apr
(43) |
May
(53) |
Jun
(52) |
Jul
(112) |
Aug
(72) |
Sep
(79) |
Oct
(23) |
Nov
(6) |
Dec
(30) |
2012 |
Jan
(39) |
Feb
(37) |
Mar
(49) |
Apr
(60) |
May
(63) |
Jun
(38) |
Jul
(33) |
Aug
(24) |
Sep
(20) |
Oct
(14) |
Nov
(23) |
Dec
(50) |
2013 |
Jan
(30) |
Feb
(32) |
Mar
(27) |
Apr
(41) |
May
(59) |
Jun
(21) |
Jul
(10) |
Aug
(73) |
Sep
(23) |
Oct
(60) |
Nov
(14) |
Dec
(15) |
2014 |
Jan
(4) |
Feb
(8) |
Mar
(11) |
Apr
(6) |
May
(27) |
Jun
(4) |
Jul
(29) |
Aug
(62) |
Sep
(11) |
Oct
(17) |
Nov
(58) |
Dec
(9) |
2015 |
Jan
(23) |
Feb
(3) |
Mar
(26) |
Apr
(47) |
May
(8) |
Jun
(28) |
Jul
(10) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Martin S. <mar...@us...> - 2008-02-29 12:58:44
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13120 Modified Files: graphics.c graphics.h Log Message: Fix:osd_core:Fixed navigation osd Index: graphics.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** graphics.c 27 Feb 2008 18:04:00 -0000 1.35 --- graphics.c 29 Feb 2008 12:58:43 -0000 1.36 *************** *** 96,105 **** struct graphics_font * ! graphics_font_new(struct graphics *gra, int size) { struct graphics_font *this_; this_=g_new0(struct graphics_font,1); ! this_->priv=gra->meth.font_new(gra->priv, &this_->meth, size); return this_; } --- 96,105 ---- struct graphics_font * ! graphics_font_new(struct graphics *gra, int size, int flags) { struct graphics_font *this_; this_=g_new0(struct graphics_font,1); ! this_->priv=gra->meth.font_new(gra->priv, &this_->meth, size, flags); return this_; } *************** *** 393,397 **** p.y=di->pnt[0].y+10; if (! gra->font[e->label_size]) ! gra->font[e->label_size]=graphics_font_new(gra, e->label_size*20); gra->meth.draw_text(gra->priv, gra->gc[2]->priv, gra->gc[1]->priv, gra->font[e->label_size]->priv, di->label, &p, 0x10000, 0); } --- 393,397 ---- p.y=di->pnt[0].y+10; if (! gra->font[e->label_size]) ! gra->font[e->label_size]=graphics_font_new(gra, e->label_size*20, 0); gra->meth.draw_text(gra->priv, gra->gc[2]->priv, gra->gc[1]->priv, gra->font[e->label_size]->priv, di->label, &p, 0x10000, 0); } *************** *** 400,404 **** if (di->label) { if (! gra->font[e->label_size]) ! gra->font[e->label_size]=graphics_font_new(gra, e->label_size*20); label_line(gra, gra->gc[2], gra->gc[1], gra->font[e->label_size], di->pnt, di->count, di->label); } --- 400,404 ---- if (di->label) { if (! gra->font[e->label_size]) ! gra->font[e->label_size]=graphics_font_new(gra, e->label_size*20, 0); label_line(gra, gra->gc[2], gra->gc[1], gra->font[e->label_size], di->pnt, di->count, di->label); } Index: graphics.h =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** graphics.h 27 Feb 2008 18:04:00 -0000 1.15 --- graphics.h 29 Feb 2008 12:58:43 -0000 1.16 *************** *** 38,42 **** void (*draw_image_warp)(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, int count, char *data); void (*draw_restore)(struct graphics_priv *gr, struct point *p, int w, int h); ! struct graphics_font_priv *(*font_new)(struct graphics_priv *gr, struct graphics_font_methods *meth, int size); struct graphics_gc_priv *(*gc_new)(struct graphics_priv *gr, struct graphics_gc_methods *meth); void (*background_gc)(struct graphics_priv *gr, struct graphics_gc_priv *gc); --- 38,42 ---- void (*draw_image_warp)(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct point *p, int count, char *data); void (*draw_restore)(struct graphics_priv *gr, struct point *p, int w, int h); ! struct graphics_font_priv *(*font_new)(struct graphics_priv *gr, struct graphics_font_methods *meth, int size, int flags); struct graphics_gc_priv *(*gc_new)(struct graphics_priv *gr, struct graphics_gc_methods *meth); void (*background_gc)(struct graphics_priv *gr, struct graphics_gc_priv *gc); *************** *** 107,111 **** void graphics_register_button_callback(struct graphics *this_, void (*callback)(void *data, int pressed, int button, struct point *p), void *data); void graphics_register_motion_callback(struct graphics *this_, void (*callback)(void *data, struct point *p), void *data); ! struct graphics_font *graphics_font_new(struct graphics *gra, int size); struct graphics_gc *graphics_gc_new(struct graphics *gra); void graphics_gc_destroy(struct graphics_gc *gc); --- 107,111 ---- void graphics_register_button_callback(struct graphics *this_, void (*callback)(void *data, int pressed, int button, struct point *p), void *data); void graphics_register_motion_callback(struct graphics *this_, void (*callback)(void *data, struct point *p), void *data); ! struct graphics_font *graphics_font_new(struct graphics *gra, int size, int flags); struct graphics_gc *graphics_gc_new(struct graphics *gra); void graphics_gc_destroy(struct graphics_gc *gc); |
From: Martin S. <mar...@us...> - 2008-02-29 12:58:44
|
Update of /cvsroot/navit/navit/src/osd/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13120/osd/core Modified Files: osd_core.c Log Message: Fix:osd_core:Fixed navigation osd Index: osd_core.c =================================================================== RCS file: /cvsroot/navit/navit/src/osd/core/osd_core.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** osd_core.c 28 Feb 2008 19:30:19 -0000 1.8 --- osd_core.c 29 Feb 2008 12:58:43 -0000 1.9 *************** *** 143,147 **** graphics_gc_set_linewidth(this->green, 2); ! this->font=graphics_font_new(this->gr, 200); navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_compass_draw), attr_position_coord_geo, this)); --- 143,147 ---- graphics_gc_set_linewidth(this->green, 2); ! this->font=graphics_font_new(this->gr, 200, 1); navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_compass_draw), attr_position_coord_geo, this)); *************** *** 291,295 **** graphics_gc_set_linewidth(this->white, 2); ! this->font=graphics_font_new(this->gr, 200); this->flag=graphics_image_new(this->gr, flag); navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_eta_draw), attr_position_coord_geo, this)); --- 291,295 ---- graphics_gc_set_linewidth(this->white, 2); ! this->font=graphics_font_new(this->gr, 200, 1); this->flag=graphics_image_new(this->gr, flag); navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_eta_draw), attr_position_coord_geo, this)); *************** *** 328,331 **** --- 328,332 ---- int active; char last_distance[16]; + char *last_name; }; *************** *** 334,342 **** { struct point p; - char navigation[16]; char distance[16]; ! int days=0,do_draw=1; ! time_t navigationt; ! struct tm tm,navigation_tm,navigation_tm0; struct attr attr; struct navigation *nav=NULL; --- 335,340 ---- { struct point p; char distance[16]; ! int do_draw=0; struct attr attr; struct navigation *nav=NULL; *************** *** 364,367 **** --- 362,376 ---- format_distance(distance, attr.u.num); } + if (this->active != 1 || strcmp(this->last_distance, distance) || this->last_name != name) { + this->active=1; + strcpy(this->last_distance, distance); + this->last_name=name; + do_draw=1; + } + } else { + if (this->active != 0) { + this->active=0; + do_draw=1; + } } if (mr) *************** *** 373,393 **** p.y=0; graphics_draw_rectangle(this->gr, this->bg, &p, this->w, this->h); ! image=g_strjoin(NULL,getenv("NAVIT_SHAREDIR"), "/xpm/", name, "_32.xpm", NULL); ! gr_image=graphics_image_new(this->gr, image); ! if (! gr_image) { ! g_free(image); ! image=g_strjoin(NULL,getenv("NAVIT_SHAREDIR"), "/xpm/unknown.xpm", NULL); gr_image=graphics_image_new(this->gr, image); } - dbg(1,"gr_image=%p\n", gr_image); - if (gr_image) { - p.x=(this->w-gr_image->width)/2; - p.y=(46-gr_image->height)/2; - graphics_draw_image(this->gr, this->white, &p, gr_image); - graphics_image_free(this->gr, gr_image); - } - p.x=12; - p.y=56; - graphics_draw_text(this->gr, this->white, NULL, this->font, distance, &p, 0x10000, 0); graphics_draw_mode(this->gr, draw_mode_end); } --- 382,404 ---- p.y=0; graphics_draw_rectangle(this->gr, this->bg, &p, this->w, this->h); ! if (this->active) { ! image=g_strjoin(NULL,getenv("NAVIT_SHAREDIR"), "/xpm/", name, "_32.xpm", NULL); gr_image=graphics_image_new(this->gr, image); + if (! gr_image) { + g_free(image); + image=g_strjoin(NULL,getenv("NAVIT_SHAREDIR"), "/xpm/unknown.xpm", NULL); + gr_image=graphics_image_new(this->gr, image); + } + dbg(1,"gr_image=%p\n", gr_image); + if (gr_image) { + p.x=(this->w-gr_image->width)/2; + p.y=(46-gr_image->height)/2; + graphics_draw_image(this->gr, this->white, &p, gr_image); + graphics_image_free(this->gr, gr_image); + } + p.x=12; + p.y=56; + graphics_draw_text(this->gr, this->white, NULL, this->font, distance, &p, 0x10000, 0); } graphics_draw_mode(this->gr, draw_mode_end); } *************** *** 411,415 **** graphics_gc_set_linewidth(this->white, 2); ! this->font=graphics_font_new(this->gr, 200); navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_navigation_draw), attr_position_coord_geo, this)); --- 422,426 ---- graphics_gc_set_linewidth(this->white, 2); ! this->font=graphics_font_new(this->gr, 200, 1); navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_navigation_draw), attr_position_coord_geo, this)); |
From: Martin S. <mar...@us...> - 2008-02-28 19:34:09
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6055 Modified Files: osm2navit.c Log Message: Fix:Tools:Cleanup country files Index: osm2navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/osm2navit.c,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** osm2navit.c 26 Feb 2008 18:29:46 -0000 1.62 --- osm2navit.c 28 Feb 2008 19:34:08 -0000 1.63 *************** *** 1774,1777 **** --- 1774,1793 ---- } } + + static void + remove_countryfiles(void) + { + int i; + char filename[32]; + struct country_table *co; + + for (i = 0 ; i < sizeof(country_table)/sizeof(struct country_table) ; i++) { + co=&country_table[i]; + if (co->size) { + sprintf(filename,"country_%d.bin", co->countryid); + unlink(filename); + } + } + } #endif *************** *** 2244,2247 **** --- 2260,2266 ---- remove("tilesdir.tmp"); remove("zipdir.tmp"); + #ifdef GENERATE_INDEX + remove_countryfiles(); + #endif } } |
From: Martin S. <mar...@us...> - 2008-02-28 19:30:48
|
Update of /cvsroot/navit/navit/src/osd/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3894/osd/core Modified Files: osd_core.c Log Message: Fix:Core:Fixed some navigation issues Index: osd_core.c =================================================================== RCS file: /cvsroot/navit/navit/src/osd/core/osd_core.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** osd_core.c 27 Feb 2008 23:55:18 -0000 1.7 --- osd_core.c 28 Feb 2008 19:30:19 -0000 1.8 *************** *** 360,364 **** if (item) { name=item_to_name(item->type); ! dbg(0,"name=%s\n", name); if (item_attr_get(item, attr_length, &attr)) { format_distance(distance, attr.u.num); --- 360,364 ---- if (item) { name=item_to_name(item->type); ! dbg(1,"name=%s\n", name); if (item_attr_get(item, attr_length, &attr)) { format_distance(distance, attr.u.num); *************** *** 380,384 **** gr_image=graphics_image_new(this->gr, image); } ! dbg(0,"gr_image=%p\n", gr_image); if (gr_image) { p.x=(this->w-gr_image->width)/2; --- 380,384 ---- gr_image=graphics_image_new(this->gr, image); } ! dbg(1,"gr_image=%p\n", gr_image); if (gr_image) { p.x=(this->w-gr_image->width)/2; |
From: Martin S. <mar...@us...> - 2008-02-28 19:30:27
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3894 Modified Files: navigation.c Log Message: Fix:Core:Fixed some navigation issues Index: navigation.c =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.c,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** navigation.c 27 Feb 2008 23:55:18 -0000 1.37 --- navigation.c 28 Feb 2008 19:30:09 -0000 1.38 *************** *** 190,194 **** struct navigation_itm *itm; struct navigation_command *cmd; ! dbg(2,"enter this_=%p end=%p\n", this_, end); while (this_->first && this_->first != end) { itm=this_->first; --- 190,196 ---- struct navigation_itm *itm; struct navigation_command *cmd; ! dbg(2,"enter this_=%p this_->first=%p this_->cmd_first=%p end=%p\n", this_, this_->first, this_->cmd_first, end); ! if (this_->cmd_first) ! dbg(2,"this_->cmd_first->itm=%p\n", this_->cmd_first->itm); while (this_->first && this_->first != end) { itm=this_->first; *************** *** 198,202 **** if (this_->first) this_->first->prev=NULL; ! if (this_->cmd_first && this_->cmd_first->itm == itm) { cmd=this_->cmd_first; this_->cmd_first=cmd->next; --- 200,204 ---- if (this_->first) this_->first->prev=NULL; ! if (this_->cmd_first && this_->cmd_first->itm == itm->next) { cmd=this_->cmd_first; this_->cmd_first=cmd->next; *************** *** 209,213 **** if (! this_->first && end) dbg(0,"end wrong\n"); ! dbg(2,"ret\n"); } --- 211,215 ---- if (! this_->first && end) dbg(0,"end wrong\n"); ! dbg(2,"ret this_->first=%p this_->cmd_first=%p\n",this_->first, this_->cmd_first); } *************** *** 334,345 **** { dbg(1,"enter %p %p %p\n",old, new, delta); ! if (new->item.type != old->item.type && (new->item.type == type_ramp || old->item.type == type_ramp)) { dbg(1, "maneuver_required: old or new is ramp\n"); - return 1; - } - if (is_same_street2(old, new)) { - dbg(1, "maneuver_required: is_same_street: no\n"); - return 0; - } #if 0 if (old->crossings_end == 2) { --- 336,346 ---- { dbg(1,"enter %p %p %p\n",old, new, delta); ! if (new->item.type == old->item.type || (new->item.type != type_ramp && old->item.type != type_ramp)) { ! if (is_same_street2(old, new)) { ! dbg(1, "maneuver_required: is_same_street: no\n"); ! return 0; ! } ! } else dbg(1, "maneuver_required: old or new is ramp\n"); #if 0 if (old->crossings_end == 2) { *************** *** 366,369 **** --- 367,371 ---- { struct navigation_command *ret=g_new0(struct navigation_command, 1); + dbg(1,"enter this_=%p itm=%p delta=%d\n", this_, itm, delta); ret->delta=delta; ret->itm=itm; |
From: Martin S. <mar...@us...> - 2008-02-27 23:55:16
|
Update of /cvsroot/navit/navit/src/osd/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20914/osd/core Modified Files: osd_core.c Log Message: Add:Core:Initial working on navigation osd Index: osd_core.c =================================================================== RCS file: /cvsroot/navit/navit/src/osd/core/osd_core.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** osd_core.c 27 Feb 2008 19:32:44 -0000 1.6 --- osd_core.c 27 Feb 2008 23:55:18 -0000 1.7 *************** *** 78,83 **** else if (distance >= 10000) sprintf(buffer,"%.1f km", distance/1000); ! else ! sprintf(buffer,"%.2f km", distance/1000); } --- 78,85 ---- else if (distance >= 10000) sprintf(buffer,"%.1f km", distance/1000); ! else if (distance >= 300) ! sprintf(buffer,"%.0f m", round(distance/25)*25); ! else ! sprintf(buffer,"%.0f m", round(distance/10)*10); } *************** *** 185,189 **** char eta[16]; char distance[16]; ! int days=0,do_draw=1; time_t etat; struct tm tm,eta_tm,eta_tm0; --- 187,191 ---- char eta[16]; char distance[16]; ! int days=0,do_draw=0; time_t etat; struct tm tm,eta_tm,eta_tm0; *************** *** 252,256 **** p.x=6; p.y=6; ! graphics_draw_image(this->gr, this->white, &p, this->flag); if (eta[0]) { p.x=28; --- 254,259 ---- p.x=6; p.y=6; ! if (this->flag) ! graphics_draw_image(this->gr, this->white, &p, this->flag); if (eta[0]) { p.x=28; *************** *** 316,319 **** --- 319,440 ---- } + struct osd_navigation { + struct point p; + int w,h; + struct graphics *gr; + struct graphics_gc *bg; + struct graphics_gc *white; + struct graphics_font *font; + int active; + char last_distance[16]; + }; + + static void + osd_navigation_draw(struct osd_navigation *this, struct navit *navit, struct vehicle *v) + { + struct point p; + char navigation[16]; + char distance[16]; + int days=0,do_draw=1; + time_t navigationt; + struct tm tm,navigation_tm,navigation_tm0; + struct attr attr; + struct navigation *nav=NULL; + struct map *map=NULL; + struct map_rect *mr=NULL; + struct item *item=NULL; + struct graphics_image *gr_image; + char *image; + char *name="unknown"; + + distance[0]='\0'; + + if (navit) + nav=navit_get_navigation(navit); + if (nav) + map=navigation_get_map(nav); + if (map) + mr=map_rect_new(map, NULL); + if (mr) + item=map_rect_get_item(mr); + if (item) { + name=item_to_name(item->type); + dbg(0,"name=%s\n", name); + if (item_attr_get(item, attr_length, &attr)) { + format_distance(distance, attr.u.num); + } + } + if (mr) + map_rect_destroy(mr); + + if (do_draw) { + graphics_draw_mode(this->gr, draw_mode_begin); + p.x=0; + p.y=0; + graphics_draw_rectangle(this->gr, this->bg, &p, this->w, this->h); + image=g_strjoin(NULL,getenv("NAVIT_SHAREDIR"), "/xpm/", name, "_32.xpm", NULL); + gr_image=graphics_image_new(this->gr, image); + if (! gr_image) { + g_free(image); + image=g_strjoin(NULL,getenv("NAVIT_SHAREDIR"), "/xpm/unknown.xpm", NULL); + gr_image=graphics_image_new(this->gr, image); + } + dbg(0,"gr_image=%p\n", gr_image); + if (gr_image) { + p.x=(this->w-gr_image->width)/2; + p.y=(46-gr_image->height)/2; + graphics_draw_image(this->gr, this->white, &p, gr_image); + graphics_image_free(this->gr, gr_image); + } + p.x=12; + p.y=56; + graphics_draw_text(this->gr, this->white, NULL, this->font, distance, &p, 0x10000, 0); + graphics_draw_mode(this->gr, draw_mode_end); + } + } + + static void + osd_navigation_init(struct osd_navigation *this, struct navit *nav) + { + struct graphics *navit_gr; + struct color c; + navit_gr=navit_get_graphics(nav); + this->gr=graphics_overlay_new(navit_gr, &this->p, this->w, this->h); + + this->bg=graphics_gc_new(this->gr); + c.r=0; c.g=0; c.b=0; + graphics_gc_set_foreground(this->bg, &c); + + this->white=graphics_gc_new(this->gr); + c.r=65535; c.g=65535; c.b=65535; + graphics_gc_set_foreground(this->white, &c); + graphics_gc_set_linewidth(this->white, 2); + + this->font=graphics_font_new(this->gr, 200); + navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_navigation_draw), attr_position_coord_geo, this)); + + osd_navigation_draw(this, nav, NULL); + } + + static struct osd_priv * + osd_navigation_new(struct navit *nav, struct osd_methods *meth, struct attr **attrs) + { + struct osd_navigation *this=g_new0(struct osd_navigation, 1); + struct attr *attr; + this->p.x=20; + this->p.y=-80; + this->w=60; + this->h=60; + this->active=-1; + attr=attr_search(attrs, NULL, attr_x); + if (attr) + this->p.x=attr->u.num; + attr=attr_search(attrs, NULL, attr_y); + if (attr) + this->p.y=attr->u.num; + navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_navigation_init), attr_navit, this)); + return (struct osd_priv *) this; + } + void plugin_init(void) *************** *** 321,324 **** --- 442,446 ---- plugin_register_osd_type("compass", osd_compass_new); plugin_register_osd_type("eta", osd_eta_new); + plugin_register_osd_type("navigation", osd_navigation_new); } |
From: Martin S. <mar...@us...> - 2008-02-27 23:55:13
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20914 Modified Files: navigation.c Log Message: Add:Core:Initial working on navigation osd Index: navigation.c =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.c,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** navigation.c 27 Feb 2008 19:30:55 -0000 1.36 --- navigation.c 27 Feb 2008 23:55:18 -0000 1.37 *************** *** 750,755 **** --- 750,758 ---- navigation_map_get_item(struct map_rect_priv *priv) { + struct item *ret; + int delta; if (!priv->cmd_next) return NULL; + ret=&priv->item; priv->cmd=priv->cmd_next; priv->itm=priv->itm_next; *************** *** 757,761 **** priv->cmd_next=priv->cmd->next; ! return &priv->item; } --- 760,787 ---- priv->cmd_next=priv->cmd->next; ! delta=priv->cmd->delta; ! dbg(1,"delta=%d\n", delta); ! if (delta < 0) { ! delta=-delta; ! if (delta < 45) ! ret->type=type_nav_left_1; ! else if (delta < 105) ! ret->type=type_nav_left_2; ! else if (delta < 165) ! ret->type=type_nav_left_3; ! else ! ret->type=type_none; ! } else { ! if (delta < 45) ! ret->type=type_nav_right_1; ! else if (delta < 105) ! ret->type=type_nav_right_2; ! else if (delta < 165) ! ret->type=type_nav_right_3; ! else ! ret->type=type_none; ! } ! dbg(1,"type=%d\n", ret->type); ! return ret; } |
From: Martin S. <mar...@us...> - 2008-02-27 22:27:53
|
Update of /cvsroot/navit/navit/src/xpm In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18512 Modified Files: Makefile.am Added Files: nav_left_1.xpm nav_left_2.xpm nav_right_1.xpm nav_right_2.xpm nav_straight.xpm Log Message: Add:Core:Added navigation icons from matth --- NEW FILE: nav_right_1.xpm --- /* XPM */ static char * turn_right_90_v2_sv_xpm[] = { "64 64 2 1", " c None", ". c #000000", " .. ", " ............... ", " ......................... ", " ................................. ", " ............................... ", " ............................ ", " .......................... ", " ........................ ", " ...................... ", " ....................... ", " ....................... ", " ........................ ", " ......................... ", " ......................... ", " .......................... ", " .......................... ", " .......................... ", " ........................... ", " ........................... ", " ................. ....... ", " ................ ...... ", " ............... ..... ", " ............... ... ", " ............. ... ", " ............. .. ", " ............ . ", " ........... ", " ............ ", " ........... ", " ........... ", " .......... ", " .......... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", ".......... ", ".......... ", ".......... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... ", "........... "}; --- NEW FILE: nav_left_2.xpm --- /* XPM */ static char * turn_left_v2_sv_xpm[] = { "64 64 2 1", " c None", ". c #000000", " ", " .. ", " ..... ", " ...... ", " ......... ", " ........... ", " ............. ", " ................ ", " ........................ ", " ................................. ", " ....................................... ", " ............................................. ", " ................................................. ", " ................................................... ", " .................................................. ", " ................................................ ", " .............................................. ", " ............................................ ", " ................ ....................... ", " ............. .................. ", " .......... ............... ", " ........ ............. ", " ..... ............. ", " ... ............ ", " ........... ", " .......... ", " ........... ", " .......... ", " .......... ", " .......... ", " .......... ", " ........... ", " ........... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " .......... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " .......... "}; --- NEW FILE: nav_left_1.xpm --- /* XPM */ static char * turn_left_90_v2_sv_xpm[] = { "64 64 2 1", " c None", ". c #000000", " . ", " ............. . ", " ........................ ", " ................................. ", " ............................... ", " ............................ ", " .......................... ", " ........................ ", " ...................... ", " ...................... ", " ....................... ", " ........................ ", " ......................... ", " ......................... ", " .......................... ", " .......................... ", " .......................... ", " .......................... ", " ........................... ", " ....... ................. ", " ...... ................ ", " .... ................ ", " ... .............. ", " .. ............. ", " .. ............. ", " . ............ ", " ........... ", " ............ ", " ........... ", " ........... ", " .......... ", " .......... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... ", " ........... "}; Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/xpm/Makefile.am,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Makefile.am 27 Feb 2008 20:22:27 -0000 1.14 --- Makefile.am 27 Feb 2008 22:27:48 -0000 1.15 *************** *** 1,4 **** include $(top_srcdir)/Makefile.inc ! xpm_DATA = airport.xpm attraction.xpm bank.xpm bar.xpm bus.xpm cafe.xpm camping.xpm car_dealer.xpm church.xpm cinema.xpm dumping-station.xpm exit.xpm fastfood.xpm firebrigade.xpm flag_bk_tr.xpm flag_bk_wh.xpm flag_bl_wh.xpm flag_wh_bk.xpm fuel.xpm golf.xpm highway_exit.xpm hospital.xpm hotel.xpm information.xpm library.xpm museum.xpm parking.xpm pharmacy.xpm picnic.xpm police.xpm post.xpm restaurant.xpm restroom.xpm skiing.xpm sports.xpm swimming.xpm telephone.xpm theater.xpm tower.xpm traffic_signals.xpm trailerpark.xpm unknown.xpm gc_tradi.xpm gc_multi.xpm gc_mystery.xpm gc_event.xpm xpm_DATA += gc_reference.xpm gc_webcam.xpm gc_question.xpm gc_stages.xpm xpm_DATA += shopping.xpm --- 1,4 ---- include $(top_srcdir)/Makefile.inc ! xpm_DATA = airport.xpm attraction.xpm bank.xpm bar.xpm bus.xpm cafe.xpm camping.xpm car_dealer.xpm church.xpm cinema.xpm dumping-station.xpm exit.xpm fastfood.xpm firebrigade.xpm flag_bk_tr.xpm flag_bk_wh.xpm flag_bl_wh.xpm flag_wh_bk.xpm fuel.xpm golf.xpm highway_exit.xpm hospital.xpm hotel.xpm information.xpm library.xpm museum.xpm nav_left_1.xpm nav_left_2.xpm nav_right_1.xpm nav_right_2.xpm nav_straight.xpm parking.xpm pharmacy.xpm picnic.xpm police.xpm post.xpm restaurant.xpm restroom.xpm skiing.xpm sports.xpm swimming.xpm telephone.xpm theater.xpm tower.xpm traffic_signals.xpm trailerpark.xpm unknown.xpm gc_tradi.xpm gc_multi.xpm gc_mystery.xpm gc_event.xpm xpm_DATA += gc_reference.xpm gc_webcam.xpm gc_question.xpm gc_stages.xpm xpm_DATA += shopping.xpm --- NEW FILE: nav_right_2.xpm --- /* XPM */ static char * turn_rightv2_sv_xpm[] = { "64 64 2 1", " c None", ". c #000000", " . ", " .. ", " ..... ", " ...... ", " ......... ", " ............ ", " ............. ", " ................ ", " ........................ ", " ................................. ", " ....................................... ", " ............................................. ", " .................................................. ", " ................................................... ", " .................................................. ", " ................................................ ", " .............................................. ", " ............................................ ", " ....................... ............... ", " .................. ............ ", " ............... ......... ", " ............. ........ ", " ............. ..... ", " ........... ... ", " ........... ", " ........... ", " ........... ", " .......... ", " .......... ", " .......... ", "........... ", "........... ", "........... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... ", ".......... "}; --- NEW FILE: nav_straight.xpm --- /* XPM */ static char * turn_straight_sv_xpm[] = { "64 64 2 1", " c None", ". c #000000", " ", " . ", " . ", " .. ", " ... ", " .... ", " ..... ", " ..... ", " ...... ", " ....... ", " ....... ", " ........ ", " ......... ", " ......... ", " ........... ", " ........... ", " ............ ", " ............. ", " ............. ", " .............. ", " ............... ", " ............... ", " ................ ", " ................. ", " .................. ", " ................... ", " ................... ", " .................... ", " ..................... ", " ..................... ", " ...................... ", " ....................... ", " ....................... ", " ......................... ", " ......................... ", " .......................... ", " ........................... ", " .... ............ .... ", " .. ............ ... ", " . ............ . ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ............ ", " ........... "}; |
From: Martin S. <mar...@us...> - 2008-02-27 22:07:35
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10052 Modified Files: Makefile.am Log Message: Fix:Core:Fixed typo Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/Makefile.am,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** Makefile.am 27 Feb 2008 21:40:19 -0000 1.32 --- Makefile.am 27 Feb 2008 22:07:12 -0000 1.33 *************** *** 23,27 **** map_data.h mapset.h maptype.h menu.h navigation.h navit.h osd.h \ param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h search.h speech.h statusbar.h \ ! transform.h track.h util.h vehicle.h xmlconfig.h \ osm2navit_SOURCES = osm2navit.c item.c debug.c zipfile.h --- 23,27 ---- map_data.h mapset.h maptype.h menu.h navigation.h navit.h osd.h \ param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h search.h speech.h statusbar.h \ ! transform.h track.h util.h vehicle.h xmlconfig.h osm2navit_SOURCES = osm2navit.c item.c debug.c zipfile.h |
From: Martin S. <mar...@us...> - 2008-02-27 22:03:33
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7613 Modified Files: mapset.c Log Message: Fix:Core:Search only in active maps Index: mapset.c =================================================================== RCS file: /cvsroot/navit/navit/src/mapset.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mapset.c 28 Aug 2007 17:31:11 -0000 1.4 --- mapset.c 27 Feb 2008 22:01:31 -0000 1.5 *************** *** 1,2 **** --- 1,3 ---- + #include <string.h> #include <glib.h> #include <glib/gprintf.h> *************** *** 101,105 **** if (this->search_attr->type >= attr_country_all && this->search_attr->type <= attr_country_name) break; ! this->map=g_list_next(this->map); if (! this->map) break; --- 102,108 ---- if (this->search_attr->type >= attr_country_all && this->search_attr->type <= attr_country_name) break; ! do { ! this->map=g_list_next(this->map); ! } while (this->map && ! map_get_active(this->map->data)); if (! this->map) break; |
From: Martin S. <mar...@us...> - 2008-02-27 21:40:17
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31330 Modified Files: Makefile.am zipfile.h Added Files: endianess.h Log Message: Patch:Added slightly modified Patch from lorenz_k|Thanks --- NEW FILE: endianess.h --- #ifndef __ENDIANESS_HANDLER__ #include <endian.h> /* Get machine dependent optimized versions of byte swapping functions. */ #include <byteswap.h> #ifdef __OPTIMIZE__ /* We can optimize calls to the conversion functions. Either nothing has to be done or we are using directly the byte-swapping functions which often can be inlined. */ #if __BYTE_ORDER == __BIG_ENDIAN #define le16_to_cpu(x) __bswap_16 (x) #define le32_to_cpu(x) __bswap_32 (x) #define le64_to_cpu(x) __bswap_64 (x) #define cpu_to_le16(x) __bswap_16 (x) #define cpu_to_le32(x) __bswap_32 (x) #define cpu_to_le64(x) __bswap_64 (x) #else #if __BYTE_ORDER == __LITTLE_ENDIAN #define le16_to_cpu(x) (x) #define le32_to_cpu(x) (x) #define cpu_to_le16(x) (x) #define cpu_to_le16(x) (x) #else #error "Unknown endianess" #endif #endif #endif #define __ENDIANESS_HANDLER__ #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/Makefile.am,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** Makefile.am 4 Jan 2008 19:29:22 -0000 1.31 --- Makefile.am 27 Feb 2008 21:40:19 -0000 1.32 *************** *** 19,27 **** profile.c route.c search.c speech.c transform.c track.c \ util.c vehicle.c xmlconfig.c attr.h attr_def.h callback.h color.h compass.h coord.h country.h \ ! cursor.h data.h data_window.h data_window_int.h debug.h destination.h draw_info.h \ file.h graphics.h gtkext.h gui.h item.h item_def.h log.h layer.h layout.h main.h map-share.h map.h\ map_data.h mapset.h maptype.h menu.h navigation.h navit.h osd.h \ param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h search.h speech.h statusbar.h \ ! transform.h track.h util.h vehicle.h xmlconfig.h osm2navit_SOURCES = osm2navit.c item.c debug.c zipfile.h --- 19,27 ---- profile.c route.c search.c speech.c transform.c track.c \ util.c vehicle.c xmlconfig.c attr.h attr_def.h callback.h color.h compass.h coord.h country.h \ ! cursor.h data.h data_window.h data_window_int.h debug.h destination.h draw_info.h endianess.h \ file.h graphics.h gtkext.h gui.h item.h item_def.h log.h layer.h layout.h main.h map-share.h map.h\ map_data.h mapset.h maptype.h menu.h navigation.h navit.h osd.h \ param.h phrase.h plugin.h point.h plugin_def.h projection.h popup.h route.h profile.h search.h speech.h statusbar.h \ ! transform.h track.h util.h vehicle.h xmlconfig.h \ osm2navit_SOURCES = osm2navit.c item.c debug.c zipfile.h Index: zipfile.h =================================================================== RCS file: /cvsroot/navit/navit/src/zipfile.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** zipfile.h 8 Nov 2007 19:21:13 -0000 1.2 --- zipfile.h 27 Feb 2008 21:40:20 -0000 1.3 *************** *** 1,2 **** --- 1,4 ---- + #ifndef __ZIPFILE_H__ + struct zip_lfh { int ziplocsig; *************** *** 48,49 **** --- 50,55 ---- char zipecom[0]; } __attribute__ ((packed)); + + #define __ZIPFILE_H__ + + #endif |
From: Martin S. <mar...@us...> - 2008-02-27 21:40:16
|
Update of /cvsroot/navit/navit/src/data/binfile In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31330/data/binfile Modified Files: binfile.c Log Message: Patch:Added slightly modified Patch from lorenz_k|Thanks Index: binfile.c =================================================================== RCS file: /cvsroot/navit/navit/src/data/binfile/binfile.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** binfile.c 22 Feb 2008 14:58:01 -0000 1.19 --- binfile.c 27 Feb 2008 21:40:20 -0000 1.20 *************** *** 16,19 **** --- 16,20 ---- #include "file.h" #include "zipfile.h" + #include "endianess.h" static int map_id; *************** *** 71,74 **** --- 72,122 ---- + static void minmax_to_cpu(struct minmax * mima) { + g_assert(mima != NULL); + mima->min = le16_to_cpu(mima->min); + mima->max = le16_to_cpu(mima->max); + } + + static void lfh_to_cpu(struct zip_lfh *lfh) { + g_assert(lfh != NULL); + lfh->ziplocsig = le32_to_cpu(lfh->ziplocsig); + lfh->zipver = le16_to_cpu(lfh->zipver); + lfh->zipgenfld = le16_to_cpu(lfh->zipgenfld); + lfh->zipmthd = le16_to_cpu(lfh->zipmthd); + lfh->ziptime = le16_to_cpu(lfh->ziptime); + lfh->zipdate = le16_to_cpu(lfh->zipdate); + lfh->zipcrc = le32_to_cpu(lfh->zipcrc); + lfh->zipsize = le32_to_cpu(lfh->zipsize); + lfh->zipuncmp = le32_to_cpu(lfh->zipuncmp); + lfh->zipfnln = le16_to_cpu(lfh->zipfnln); + lfh->zipxtraln = le16_to_cpu(lfh->zipxtraln); + } + + static void cd_to_cpu(struct zip_cd *zcd) { + g_assert(zcd != NULL); + zcd->zipccrc = le32_to_cpu(zcd->zipccrc); + zcd->zipcsiz = le32_to_cpu(zcd->zipcsiz); + zcd->zipcunc = le32_to_cpu(zcd->zipcunc); + zcd->zipcfnl = le16_to_cpu(zcd->zipcfnl); + zcd->zipcxtl = le16_to_cpu(zcd->zipcxtl); + zcd->zipccml = le16_to_cpu(zcd->zipccml); + zcd->zipdsk = le16_to_cpu(zcd->zipdsk); + zcd->zipint = le16_to_cpu(zcd->zipint); + zcd->zipext = le32_to_cpu(zcd->zipext); + zcd->zipofst = le32_to_cpu(zcd->zipofst); + } + + static void eoc_to_cpu(struct zip_eoc *eoc) { + g_assert(eoc != NULL); + eoc->zipesig = le32_to_cpu(eoc->zipesig); + eoc->zipedsk = le16_to_cpu(eoc->zipedsk); + eoc->zipecen = le16_to_cpu(eoc->zipecen); + eoc->zipenum = le16_to_cpu(eoc->zipenum); + eoc->zipecenn = le16_to_cpu(eoc->zipecenn); + eoc->zipecsz = le32_to_cpu(eoc->zipecsz); + eoc->zipeofst = le32_to_cpu(eoc->zipeofst); + eoc->zipecoml = le16_to_cpu(eoc->zipecoml); + } + static void map_destroy_binfile(struct map_priv *m) *************** *** 97,102 **** if (t->pos_coord >= t->pos_attr_start) break; ! c->x=*(t->pos_coord++); ! c->y=*(t->pos_coord++); c++; ret++; --- 145,150 ---- if (t->pos_coord >= t->pos_attr_start) break; ! c->x=le32_to_cpu(*(t->pos_coord++)); ! c->y=le32_to_cpu(*(t->pos_coord++)); c++; ret++; *************** *** 127,132 **** } while (t->pos_attr < t->pos_next) { ! size=*(t->pos_attr++); ! type=t->pos_attr[0]; if (type == attr_label) mr->label=1; --- 175,180 ---- } while (t->pos_attr < t->pos_next) { ! size=le32_to_cpu(*(t->pos_attr++)); ! type=le32_to_cpu(t->pos_attr[0]); if (type == attr_label) mr->label=1; *************** *** 193,196 **** --- 241,245 ---- t->start=NULL; lfh=(struct zip_lfh *)(file_data_read(f,cd->zipofst,sizeof(struct zip_lfh))); + lfh_to_cpu(lfh); zipfn=(char *)(file_data_read(f,cd->zipofst+sizeof(struct zip_lfh), lfh->zipfnln)); strncpy(buffer, zipfn, lfh->zipfnln); *************** *** 221,224 **** --- 270,274 ---- struct tile t; struct zip_cd *cd=(struct zip_cd *)(file_data_read(f, m->eoc->zipeofst + zipfile*m->cde_size, sizeof(struct zip_cd))); + cd_to_cpu(cd); dbg(1,"enter %p %d\n", mr, zipfile); t.zipfile_num=zipfile; *************** *** 269,273 **** int size,coord_size; struct tile *t=mr->t; ! size=*(t->pos++); if (size > 1024*1024 || size < 0) { fprintf(stderr,"size=0x%x\n", size); --- 319,323 ---- int size,coord_size; struct tile *t=mr->t; ! size=le32_to_cpu(*(t->pos++)); if (size > 1024*1024 || size < 0) { fprintf(stderr,"size=0x%x\n", size); *************** *** 278,283 **** } t->pos_next=t->pos+size; ! mr->item.type=*(t->pos++); ! coord_size=*(t->pos++); t->pos_coord_start=t->pos_coord=t->pos; t->pos_attr_start=t->pos_attr=t->pos_coord+coord_size; --- 328,333 ---- } t->pos_next=t->pos+size; ! mr->item.type=le32_to_cpu(*(t->pos++)); ! coord_size=le32_to_cpu(*(t->pos++)); t->pos_coord_start=t->pos_coord=t->pos; t->pos_attr_start=t->pos_attr=t->pos_coord+coord_size; *************** *** 346,359 **** if ((mr->item.type == type_submap) && (!mr->country_id)) { struct coord_rect r; ! r.lu.x=t->pos_coord[0]; ! r.lu.y=t->pos_coord[3]; ! r.rl.x=t->pos_coord[2]; ! r.rl.y=t->pos_coord[1]; mima=(struct minmax *)(t->pos_attr+2); if (!mr->m->eoc || !selection_contains(mr->sel, &r, mima)) { continue; } ! dbg(1,"pushing zipfile %d from %d\n", t->pos_attr[5], t->zipfile_num); ! push_zipfile_tile(mr, t->pos_attr[5]); continue; --- 396,410 ---- if ((mr->item.type == type_submap) && (!mr->country_id)) { struct coord_rect r; ! r.lu.x=le32_to_cpu(t->pos_coord[0]); ! r.lu.y=le32_to_cpu(t->pos_coord[3]); ! r.rl.x=le32_to_cpu(t->pos_coord[2]); ! r.rl.y=le32_to_cpu(t->pos_coord[1]); mima=(struct minmax *)(t->pos_attr+2); + minmax_to_cpu(mima); if (!mr->m->eoc || !selection_contains(mr->sel, &r, mima)) { continue; } ! dbg(1,"pushing zipfile %d from %d\n", le32_to_cpu(t->pos_attr[5]), t->zipfile_num); ! push_zipfile_tile(mr, le32_to_cpu(t->pos_attr[5])); continue; *************** *** 550,559 **** --- 601,614 ---- file_wordexp_destroy(wexp); magic=(int *)file_data_read(m->fi, 0, 4); + *magic = le32_to_cpu(*magic); if (*magic == 0x04034b50) { cde_index_size=sizeof(struct zip_cd)+sizeof("index")-1; m->eoc=(struct zip_eoc *)file_data_read(m->fi,m->fi->size-sizeof(struct zip_eoc), sizeof(struct zip_eoc)); + eoc_to_cpu(m->eoc); printf("magic 0x%x\n", m->eoc->zipesig); m->index_cd=(struct zip_cd *)file_data_read(m->fi,m->fi->size-sizeof(struct zip_eoc)-cde_index_size, cde_index_size); + cd_to_cpu(m->index_cd); first_cd=(struct zip_cd *)file_data_read(m->fi,m->eoc->zipeofst, sizeof(struct zip_cd)); + cd_to_cpu(first_cd); m->cde_size=sizeof(struct zip_cd)+first_cd->zipcfnl; m->zip_members=(m->eoc->zipecsz-cde_index_size)/m->cde_size+1; |
From: Martin S. <mar...@us...> - 2008-02-27 21:13:17
|
Update of /cvsroot/navit/navit/po In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19469 Modified Files: ru.po Log Message: Patch:NLS:Added patch from ubergitler|Thanks Index: ru.po =================================================================== RCS file: /cvsroot/navit/navit/po/ru.po,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ru.po 14 Feb 2008 20:16:26 -0000 1.2 --- ru.po 27 Feb 2008 21:13:21 -0000 1.3 *************** *** 8,12 **** "Project-Id-Version: Navit 0.1.0\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2008-02-14 21:09+0100\n" "PO-Revision-Date: 2008-01-24 15:46+0300\n" "Last-Translator: Rustam T. Usmanov\n" --- 8,12 ---- "Project-Id-Version: Navit 0.1.0\n" "Report-Msgid-Bugs-To: \n" ! "POT-Creation-Date: 2008-02-27 22:10+0100\n" "PO-Revision-Date: 2008-01-24 15:46+0300\n" [...1784 lines suppressed...] #: ../src/gui/gtk/gui_gtk_statusbar.c:48 ../src/gui/gtk/gui_gtk_statusbar.c:83 msgid "W" ! msgstr "Ð" #: ../src/gui/gtk/gui_gtk_statusbar.c:48 ../src/gui/gtk/gui_gtk_statusbar.c:83 msgid "NW" ! msgstr "СÐ" #: ../src/gui/gtk/gui_gtk_statusbar.c:105 *************** *** 654,655 **** --- 1640,1647 ---- msgid "Route 0000km 0+00:00 ETA" msgstr "ÐаÑÑÑÑÑ 0000км 0+00:00 Ð ÐÐ" + + #~ msgid "Moldova" + #~ msgstr "ÐолдавиÑ" + + #~ msgid "Palestinia" + #~ msgstr "ÐалеÑÑина" |
From: Martin S. <mar...@us...> - 2008-02-27 20:22:41
|
Update of /cvsroot/navit/navit/src/xpm In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv30996 Modified Files: Makefile.am Log Message: Fix:Core:Added missing xpm Index: Makefile.am =================================================================== RCS file: /cvsroot/navit/navit/src/xpm/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Makefile.am 9 Feb 2008 09:39:20 -0000 1.13 --- Makefile.am 27 Feb 2008 20:22:27 -0000 1.14 *************** *** 1,4 **** include $(top_srcdir)/Makefile.inc ! xpm_DATA = airport.xpm attraction.xpm bank.xpm bar.xpm bus.xpm cafe.xpm camping.xpm car_dealer.xpm church.xpm cinema.xpm dumping-station.xpm exit.xpm fastfood.xpm firebrigade.xpm flag_bk_tr.xpm flag_bk_wh.xpm flag_bl_wh.xpm fuel.xpm golf.xpm highway_exit.xpm hospital.xpm hotel.xpm information.xpm library.xpm museum.xpm parking.xpm pharmacy.xpm picnic.xpm police.xpm post.xpm restaurant.xpm restroom.xpm skiing.xpm sports.xpm swimming.xpm telephone.xpm theater.xpm tower.xpm traffic_signals.xpm trailerpark.xpm unknown.xpm gc_tradi.xpm gc_multi.xpm gc_mystery.xpm gc_event.xpm xpm_DATA += gc_reference.xpm gc_webcam.xpm gc_question.xpm gc_stages.xpm xpm_DATA += shopping.xpm --- 1,4 ---- include $(top_srcdir)/Makefile.inc ! xpm_DATA = airport.xpm attraction.xpm bank.xpm bar.xpm bus.xpm cafe.xpm camping.xpm car_dealer.xpm church.xpm cinema.xpm dumping-station.xpm exit.xpm fastfood.xpm firebrigade.xpm flag_bk_tr.xpm flag_bk_wh.xpm flag_bl_wh.xpm flag_wh_bk.xpm fuel.xpm golf.xpm highway_exit.xpm hospital.xpm hotel.xpm information.xpm library.xpm museum.xpm parking.xpm pharmacy.xpm picnic.xpm police.xpm post.xpm restaurant.xpm restroom.xpm skiing.xpm sports.xpm swimming.xpm telephone.xpm theater.xpm tower.xpm traffic_signals.xpm trailerpark.xpm unknown.xpm gc_tradi.xpm gc_multi.xpm gc_mystery.xpm gc_event.xpm xpm_DATA += gc_reference.xpm gc_webcam.xpm gc_question.xpm gc_stages.xpm xpm_DATA += shopping.xpm |
From: Martin S. <mar...@us...> - 2008-02-27 19:32:40
|
Update of /cvsroot/navit/navit/src/osd/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9569/osd/core Modified Files: osd_core.c Log Message: Add:osd_core:Added new osd eta Index: osd_core.c =================================================================== RCS file: /cvsroot/navit/navit/src/osd/core/osd_core.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** osd_core.c 27 Feb 2008 18:04:00 -0000 1.5 --- osd_core.c 27 Feb 2008 19:32:44 -0000 1.6 *************** *** 2,5 **** --- 2,6 ---- #include <stdio.h> #include <glib.h> + #include <stdlib.h> #include <string.h> #include "config.h" *************** *** 16,22 **** --- 17,26 ---- #include "color.h" #include "vehicle.h" + #include "navigation.h" + #include "map.h" struct compass { struct point p; + int w,h; struct graphics *gr; struct graphics_gc *bg; *************** *** 83,103 **** struct point p; struct attr attr_dir, destination_attr, position_attr; ! double dir; char buffer[16]; struct coord c1, c2; enum projection pro; - dbg(0,"enter 0x%x 0x%x 0x%x\n", this, nav, v); graphics_draw_mode(this->gr, draw_mode_begin); p.x=0; p.y=0; ! graphics_draw_rectangle(this->gr, this->bg, &p, 60, 80); p.x=30; p.y=30; graphics_draw_circle(this->gr, this->white, &p, 50); if (v && vehicle_position_attr_get(v, attr_position_direction, &attr_dir)) { ! handle(this->gr, this->white, &p, 20, -*attr_dir.u.numd); } - dbg(0,"calling navit_get_attr\n"); if (navit_get_attr(nav, attr_destination, &destination_attr) && v && vehicle_position_attr_get(v, attr_position_coord_geo, &position_attr)) { pro=destination_attr.u.pcoord->pro; --- 87,106 ---- struct point p; struct attr attr_dir, destination_attr, position_attr; ! double dir,vdir=0; char buffer[16]; struct coord c1, c2; enum projection pro; graphics_draw_mode(this->gr, draw_mode_begin); p.x=0; p.y=0; ! graphics_draw_rectangle(this->gr, this->bg, &p, this->w, this->h); p.x=30; p.y=30; graphics_draw_circle(this->gr, this->white, &p, 50); if (v && vehicle_position_attr_get(v, attr_position_direction, &attr_dir)) { ! vdir=*attr_dir.u.numd; ! handle(this->gr, this->white, &p, 20, -vdir); } if (navit_get_attr(nav, attr_destination, &destination_attr) && v && vehicle_position_attr_get(v, attr_position_coord_geo, &position_attr)) { pro=destination_attr.u.pcoord->pro; *************** *** 106,109 **** --- 109,113 ---- c2.y=destination_attr.u.pcoord->y; dir=atan2(c2.x-c1.x,c2.y-c1.y)*180.0/M_PI; + dir-=vdir; handle(this->gr, this->green, &p, 20, dir); format_distance(buffer, transform_distance(pro, &c1, &c2)); *************** *** 121,125 **** struct color c; navit_gr=navit_get_graphics(nav); ! this->gr=graphics_overlay_new(navit_gr, &this->p, 60, 80); this->bg=graphics_gc_new(this->gr); --- 125,129 ---- struct color c; navit_gr=navit_get_graphics(nav); ! this->gr=graphics_overlay_new(navit_gr, &this->p, this->w, this->h); this->bg=graphics_gc_new(this->gr); *************** *** 150,153 **** --- 154,159 ---- this->p.x=20; this->p.y=20; + this->w=60; + this->h=80; attr=attr_search(attrs, NULL, attr_x); if (attr) *************** *** 160,167 **** --- 166,324 ---- } + struct eta { + struct point p; + int w,h; + struct graphics *gr; + struct graphics_gc *bg; + struct graphics_gc *white; + struct graphics_font *font; + struct graphics_image *flag; + int active; + char last_eta[16]; + char last_distance[16]; + }; + + static void + osd_eta_draw(struct eta *this, struct navit *navit, struct vehicle *v) + { + struct point p; + char eta[16]; + char distance[16]; + int days=0,do_draw=1; + time_t etat; + struct tm tm,eta_tm,eta_tm0; + struct attr attr; + struct navigation *nav=NULL; + struct map *map=NULL; + struct map_rect *mr=NULL; + struct item *item=NULL; + + + eta[0]='\0'; + distance[0]='\0'; + + if (navit) + nav=navit_get_navigation(navit); + if (nav) + map=navigation_get_map(nav); + if (map) + mr=map_rect_new(map, NULL); + if (mr) + item=map_rect_get_item(mr); + if (item) { + if (item_attr_get(item, attr_destination_length, &attr)) { + format_distance(distance, attr.u.num); + } + if (item_attr_get(item, attr_destination_time, &attr)) { + etat=time(NULL); + tm=*localtime(&etat); + etat+=attr.u.num/10; + eta_tm=*localtime(&etat); + if (tm.tm_year != eta_tm.tm_year || tm.tm_mon != eta_tm.tm_mon || tm.tm_mday != eta_tm.tm_mday) { + eta_tm0=eta_tm; + eta_tm0.tm_sec=0; + eta_tm0.tm_min=0; + eta_tm0.tm_hour=0; + tm.tm_sec=0; + tm.tm_min=0; + tm.tm_hour=0; + days=(mktime(&eta_tm0)-mktime(&tm)+43200)/86400; + } + if (days) + sprintf(eta, "%d+%02d:%02d", days, eta_tm.tm_hour, eta_tm.tm_min); + else + sprintf(eta, " %02d:%02d", eta_tm.tm_hour, eta_tm.tm_min); + } + if (this->active != 1 || strcmp(this->last_distance, distance) || strcmp(this->last_eta, eta)) { + this->active=1; + strcpy(this->last_distance, distance); + strcpy(this->last_eta, eta); + do_draw=1; + } + } else { + if (this->active != 0) { + this->active=0; + do_draw=1; + } + } + if (mr) + map_rect_destroy(mr); + + if (do_draw) { + graphics_draw_mode(this->gr, draw_mode_begin); + p.x=0; + p.y=0; + graphics_draw_rectangle(this->gr, this->bg, &p, this->w, this->h); + p.x=6; + p.y=6; + graphics_draw_image(this->gr, this->white, &p, this->flag); + if (eta[0]) { + p.x=28; + p.y=28; + graphics_draw_text(this->gr, this->white, NULL, this->font, "ETA", &p, 0x10000, 0); + p.x=6; + p.y=42; + graphics_draw_text(this->gr, this->white, NULL, this->font, eta, &p, 0x10000, 0); + } + if (distance[0]) { + p.x=6; + p.y=56; + graphics_draw_text(this->gr, this->white, NULL, this->font, distance, &p, 0x10000, 0); + } + graphics_draw_mode(this->gr, draw_mode_end); + } + } + + static void + osd_eta_init(struct eta *this, struct navit *nav) + { + struct graphics *navit_gr; + struct color c; + char *flag=g_strjoin(NULL,getenv("NAVIT_SHAREDIR"), "/xpm/flag_wh_bk.xpm", NULL); + navit_gr=navit_get_graphics(nav); + this->gr=graphics_overlay_new(navit_gr, &this->p, this->w, this->h); + + this->bg=graphics_gc_new(this->gr); + c.r=0; c.g=0; c.b=0; + graphics_gc_set_foreground(this->bg, &c); + + this->white=graphics_gc_new(this->gr); + c.r=65535; c.g=65535; c.b=65535; + graphics_gc_set_foreground(this->white, &c); + graphics_gc_set_linewidth(this->white, 2); + + this->font=graphics_font_new(this->gr, 200); + this->flag=graphics_image_new(this->gr, flag); + navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_eta_draw), attr_position_coord_geo, this)); + + osd_eta_draw(this, nav, NULL); + g_free(flag); + } + + static struct osd_priv * + osd_eta_new(struct navit *nav, struct osd_methods *meth, struct attr **attrs) + { + struct eta *this=g_new0(struct eta, 1); + struct attr *attr; + this->p.x=-80; + this->p.y=20; + this->w=60; + this->h=60; + this->active=-1; + attr=attr_search(attrs, NULL, attr_x); + if (attr) + this->p.x=attr->u.num; + attr=attr_search(attrs, NULL, attr_y); + if (attr) + this->p.y=attr->u.num; + navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_eta_init), attr_navit, this)); + return (struct osd_priv *) this; + } + void plugin_init(void) { plugin_register_osd_type("compass", osd_compass_new); + plugin_register_osd_type("eta", osd_eta_new); } |
From: Martin S. <mar...@us...> - 2008-02-27 19:31:47
|
Update of /cvsroot/navit/navit/src/gui/gtk In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9149/gui/gtk Modified Files: gui_gtk_action.c Log Message: Fix:GTK:Removed outdated entry Index: gui_gtk_action.c =================================================================== RCS file: /cvsroot/navit/navit/src/gui/gtk/gui_gtk_action.c,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** gui_gtk_action.c 13 Jan 2008 22:47:57 -0000 1.30 --- gui_gtk_action.c 27 Feb 2008 19:31:52 -0000 1.31 *************** *** 384,388 **** <menuitem name=\"Visible Streets\" action=\"VisibleStreetsAction\" />\ <menuitem name=\"Visible Points\" action=\"VisiblePointsAction\" />\ - <menuitem name=\"Visible Routegraph\" action=\"VisibleRouteGraphAction\" />\ <placeholder name=\"DataMenuAdditions\" />\ </menu>\ --- 384,387 ---- |
From: Martin S. <mar...@us...> - 2008-02-27 19:30:58
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8720 Modified Files: navigation.c Log Message: Fix:Core:Minor fixes Index: navigation.c =================================================================== RCS file: /cvsroot/navit/navit/src/navigation.c,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** navigation.c 23 Jan 2008 20:18:42 -0000 1.35 --- navigation.c 27 Feb 2008 19:30:55 -0000 1.36 *************** *** 514,523 **** if (! mr) return; ! dbg(0,"enter\n"); ritem=map_rect_get_item(mr); if (ritem) { if (item_attr_get(ritem, attr_street_item, &street_item)) { sitem=street_item.u.item; ! dbg(0,"sitem=%p\n", sitem); itm=item_hash_lookup(this_->hash, sitem); dbg(2,"itm for item with id (0x%x,0x%x) is %p\n", sitem->id_hi, sitem->id_lo, itm); --- 514,523 ---- if (! mr) return; ! dbg(1,"enter\n"); ritem=map_rect_get_item(mr); if (ritem) { if (item_attr_get(ritem, attr_street_item, &street_item)) { sitem=street_item.u.item; ! dbg(1,"sitem=%p\n", sitem); itm=item_hash_lookup(this_->hash, sitem); dbg(2,"itm for item with id (0x%x,0x%x) is %p\n", sitem->id_hi, sitem->id_lo, itm); *************** *** 529,533 **** dbg(0,"not on track\n"); do { ! dbg(0,"item\n"); navigation_itm_new(this_, ritem); ritem=map_rect_get_item(mr); --- 529,533 ---- dbg(0,"not on track\n"); do { ! dbg(1,"item\n"); navigation_itm_new(this_, ritem); ritem=map_rect_get_item(mr); |
From: Martin S. <mar...@us...> - 2008-02-27 18:04:03
|
Update of /cvsroot/navit/navit/src/graphics/gtk_drawing_area In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3126/graphics/gtk_drawing_area Modified Files: graphics_gtk_drawing_area.c Log Message: Fix:Core:Fixed osd plugin Index: graphics_gtk_drawing_area.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** graphics_gtk_drawing_area.c 27 Feb 2008 09:33:07 -0000 1.34 --- graphics_gtk_drawing_area.c 27 Feb 2008 18:04:00 -0000 1.35 *************** *** 578,592 **** } } if (window) { if (overlay->background_ready) ! gdk_draw_drawable(parent->drawable, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], overlay->background, 0, 0, overlay->p.x, overlay->p.y, overlay->width, overlay->height); } else { ! gdk_draw_drawable(overlay->background, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], parent->drawable, overlay->p.x, overlay->p.y, 0, 0, overlay->width, overlay->height); overlay->background_ready=1; } ! gdk_draw_pixbuf(parent->drawable, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], pixbuf2, 0, 0, overlay->p.x, overlay->p.y, overlay->width, overlay->height, GDK_RGB_DITHER_NONE, 0, 0); if (window) ! gdk_draw_drawable(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], parent->drawable, overlay->p.x, overlay->p.y, overlay->p.x, overlay->p.y, overlay->width, overlay->height); #if 0 gdk_draw_drawable(gr->gra->drawable, --- 578,598 ---- } } + x=overlay->p.x; + if (x < 0) + x+=parent->width; + y=overlay->p.y; + if (y < 0) + y+=parent->height; if (window) { if (overlay->background_ready) ! gdk_draw_drawable(parent->drawable, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], overlay->background, 0, 0, x, y, overlay->width, overlay->height); } else { ! gdk_draw_drawable(overlay->background, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], parent->drawable, x, y, 0, 0, overlay->width, overlay->height); overlay->background_ready=1; } ! gdk_draw_pixbuf(parent->drawable, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], pixbuf2, 0, 0, x, y, overlay->width, overlay->height, GDK_RGB_DITHER_NONE, 0, 0); if (window) ! gdk_draw_drawable(widget->window, widget->style->fg_gc[GTK_WIDGET_STATE(widget)], parent->drawable, x, y, x, y, overlay->width, overlay->height); #if 0 gdk_draw_drawable(gr->gra->drawable, |
From: Martin S. <mar...@us...> - 2008-02-27 18:03:58
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3126 Modified Files: attr.h attr_def.h callback.h graphics.c graphics.h navit.c Log Message: Fix:Core:Fixed osd plugin Index: attr.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** attr.h 13 Jan 2008 11:29:06 -0000 1.15 --- attr.h 27 Feb 2008 18:04:00 -0000 1.16 *************** *** 40,43 **** --- 40,45 ---- struct route *route; struct navigation *navigation; + struct coord *coord; + struct pcoord *pcoord; } u; }; Index: callback.h =================================================================== RCS file: /cvsroot/navit/navit/src/callback.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** callback.h 19 Feb 2008 13:04:13 -0000 1.14 --- callback.h 27 Feb 2008 18:04:00 -0000 1.15 *************** *** 50,53 **** --- 50,61 ---- } + static inline struct callback *callback_new_attr_2(void (*func)(void), enum attr_type type, void *p1, void *p2) + { + void *p[2]; + p[0]=p1; + p[1]=p2; + return callback_new_attr(func, type, 2, p); + } + static inline struct callback *callback_new_2(void (*func)(void), void *p1, void *p2) { Index: attr_def.h =================================================================== RCS file: /cvsroot/navit/navit/src/attr_def.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** attr_def.h 19 Feb 2008 00:31:55 -0000 1.31 --- attr_def.h 27 Feb 2008 18:04:00 -0000 1.32 *************** *** 113,114 **** --- 113,119 ---- ATTR(navigation) ATTR2(0x0008ffff,type_object_end) + ATTR2(0x00090000,type_coord_begin) + ATTR2(0x0009ffff,type_coord_end) + ATTR2(0x000a0000,type_pcoord_begin) + ATTR(destination) + ATTR2(0x000affff,type_pcoord_end) Index: graphics.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.c,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** graphics.c 27 Feb 2008 09:20:27 -0000 1.34 --- graphics.c 27 Feb 2008 18:04:00 -0000 1.35 *************** *** 192,195 **** --- 192,206 ---- } + void + graphics_draw_text(struct graphics *this_, struct graphics_gc *gc1, struct graphics_gc *gc2, struct graphics_font *font, char *text, struct point *p, int dx, int dy) + { + this_->meth.draw_text(this_->priv, gc1->priv, gc2 ? gc2->priv : NULL, font->priv, text, p, dx, dy); + } + + void + graphics_draw_image(struct graphics *this_, struct graphics_gc *gc, struct point *p, struct graphics_image *img) + { + this_->meth.draw_image(this_->priv, gc->priv, p, img->priv); + } #include "attr.h" *************** *** 414,418 **** gra->meth.draw_image_warp(gra->priv, gra->gc[0]->priv, di->pnt, di->count, di->label); else ! dbg(0,"draw_image_warp not supported by graphics driver drawing '%s'\Å", di->label); break; default: --- 425,429 ---- gra->meth.draw_image_warp(gra->priv, gra->gc[0]->priv, di->pnt, di->count, di->label); else ! dbg(0,"draw_image_warp not supported by graphics driver drawing '%s'\n", di->label); break; default: Index: graphics.h =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** graphics.h 17 Feb 2008 16:58:16 -0000 1.14 --- graphics.h 27 Feb 2008 18:04:00 -0000 1.15 *************** *** 97,102 **** struct graphics_image; struct item; - struct point; struct layout; struct graphics *graphics_new(const char *type, struct attr **attrs); struct graphics *graphics_overlay_new(struct graphics *parent, struct point *p, int w, int h); --- 97,103 ---- struct graphics_image; struct item; struct layout; + struct point; + struct transformation; struct graphics *graphics_new(const char *type, struct attr **attrs); struct graphics *graphics_overlay_new(struct graphics *parent, struct point *p, int w, int h); *************** *** 119,122 **** --- 120,125 ---- void graphics_draw_circle(struct graphics *this_, struct graphics_gc *gc, struct point *p, int r); void graphics_draw_rectangle(struct graphics *this_, struct graphics_gc *gc, struct point *p, int w, int h); + void graphics_draw_text(struct graphics *this_, struct graphics_gc *gc1, struct graphics_gc *gc2, struct graphics_font *font, char *text, struct point *p, int dx, int dy); + void graphics_draw_image(struct graphics *this_, struct graphics_gc *gc, struct point *p, struct graphics_image *img); void display_add(struct displaylist *displaylist, struct item *item, int count, struct point *pnt, char *label); int graphics_ready(struct graphics *this_); Index: navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/navit.c,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** navit.c 19 Feb 2008 13:32:28 -0000 1.84 --- navit.c 27 Feb 2008 18:04:00 -0000 1.85 *************** *** 98,101 **** --- 98,103 ---- guint button_timeout, motion_timeout; struct log *textfile_debug_log; + struct pcoord destination; + int destination_valid; }; *************** *** 584,588 **** --- 586,596 ---- navit_set_destination(struct navit *this_, struct pcoord *c, char *description) { + if (c) { + this_->destination=*c; + this_->destination_valid=1; + } else + this_->destination_valid=0; navit_append_coord(this_, "destination.txt", c, "former_destination", description, this_->destinations, NULL, callback_cast(navit_set_destination_from_destination)); + callback_list_call_attr_1(this_->attr_cbl, attr_destination, this_); if (this_->route) { route_set_destination(this_->route, c); *************** *** 690,695 **** } fclose(f); ! if (route && flag) route_set_destination(route, &c); } } --- 698,706 ---- } fclose(f); ! if (route && flag) { ! this_->destination=c; ! this_->destination_valid=1; route_set_destination(route, &c); + } } } *************** *** 1279,1282 **** --- 1290,1298 ---- attr->u.str=g_strdup(this_->layout_current->name); break; + case attr_destination: + if (! this_->destination_valid) + return 0; + attr->u.pcoord=&this_->destination; + break; default: return 0; |
From: Martin S. <mar...@us...> - 2008-02-27 18:03:57
|
Update of /cvsroot/navit/navit/src/osd/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3126/osd/core Modified Files: osd_core.c Log Message: Fix:Core:Fixed osd plugin Index: osd_core.c =================================================================== RCS file: /cvsroot/navit/navit/src/osd/core/osd_core.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** osd_core.c 19 Feb 2008 13:04:14 -0000 1.4 --- osd_core.c 27 Feb 2008 18:04:00 -0000 1.5 *************** *** 2,5 **** --- 2,6 ---- #include <stdio.h> #include <glib.h> + #include <string.h> #include "config.h" #include "item.h" *************** *** 67,78 **** static void ! osd_compass_draw(struct compass *this, struct vehicle *v) { struct point p; ! struct coord *pos, *dest; ! double *vehicle_dir,dir,distance; ! int dx,dy; char buffer[16]; graphics_draw_mode(this->gr, draw_mode_begin); p.x=0; --- 68,92 ---- static void ! format_distance(char *buffer, double distance) ! { ! if (distance >= 100000) ! sprintf(buffer,"%.0f km", distance/1000); ! else if (distance >= 10000) ! sprintf(buffer,"%.1f km", distance/1000); ! else ! sprintf(buffer,"%.2f km", distance/1000); ! } ! ! static void ! osd_compass_draw(struct compass *this, struct navit *nav, struct vehicle *v) { struct point p; ! struct attr attr_dir, destination_attr, position_attr; ! double dir; char buffer[16]; + struct coord c1, c2; + enum projection pro; + dbg(0,"enter 0x%x 0x%x 0x%x\n", this, nav, v); graphics_draw_mode(this->gr, draw_mode_begin); p.x=0; *************** *** 82,114 **** p.y=30; graphics_draw_circle(this->gr, this->white, &p, 50); ! if (v) { ! vehicle_dir=vehicle_dir_get(v); ! handle(this->gr, this->white, &p, 20, -*vehicle_dir); ! #if 0 /* FIXME */ ! dest=route_get_destination(co->route); ! if (dest) { ! pos=vehicle_pos_get(co->vehicle); ! dx=dest->x-pos->x; ! dy=dest->y-pos->y; ! dir=atan2(dx,dy)*180.0/M_PI; ! #if 0 ! printf("dx %d dy %d dir=%f vehicle_dir=%f\n", dx, dy, dir, *vehicle_dir); ! #endif ! if (! co->flags->orient_north) ! dir-=*vehicle_dir; ! handle(comp->gr, comp->green, &p, 20, dir); p.x=8; p.y=72; ! distance=transform_distance(pos, dest)/1000.0; ! if (distance >= 100) ! sprintf(buffer,"%.0f km", distance); ! else if (distance >= 10) ! sprintf(buffer,"%.1f km", distance); ! else ! sprintf(buffer,"%.2f km", distance); ! ! comp->gr->draw_text(comp->gr, comp->green, NULL, comp->font, buffer, &p, 0x10000, 0); ! } ! #endif } graphics_draw_mode(this->gr, draw_mode_end); --- 96,114 ---- p.y=30; graphics_draw_circle(this->gr, this->white, &p, 50); ! if (v && vehicle_position_attr_get(v, attr_position_direction, &attr_dir)) { ! handle(this->gr, this->white, &p, 20, -*attr_dir.u.numd); ! } ! dbg(0,"calling navit_get_attr\n"); ! if (navit_get_attr(nav, attr_destination, &destination_attr) && v && vehicle_position_attr_get(v, attr_position_coord_geo, &position_attr)) { ! pro=destination_attr.u.pcoord->pro; ! transform_from_geo(pro, position_attr.u.coord_geo, &c1); ! c2.x=destination_attr.u.pcoord->x; ! c2.y=destination_attr.u.pcoord->y; ! dir=atan2(c2.x-c1.x,c2.y-c1.y)*180.0/M_PI; ! handle(this->gr, this->green, &p, 20, dir); ! format_distance(buffer, transform_distance(pro, &c1, &c2)); p.x=8; p.y=72; ! graphics_draw_text(this->gr, this->green, NULL, this->font, buffer, &p, 0x10000, 0); } graphics_draw_mode(this->gr, draw_mode_end); *************** *** 118,122 **** osd_compass_init(struct compass *this, struct navit *nav) { - struct point p; struct graphics *navit_gr; struct color c; --- 118,121 ---- *************** *** 138,142 **** graphics_gc_set_linewidth(this->green, 2); ! osd_compass_draw(this, NULL); } --- 137,144 ---- graphics_gc_set_linewidth(this->green, 2); ! this->font=graphics_font_new(this->gr, 200); ! navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_compass_draw), attr_position_coord_geo, this)); ! ! osd_compass_draw(this, nav, NULL); } *************** *** 154,158 **** if (attr) this->p.y=attr->u.num; ! navit_add_callback(nav, callback_new_attr_1(osd_compass_init, attr_navit, this)); return (struct osd_priv *) this; } --- 156,160 ---- if (attr) this->p.y=attr->u.num; ! navit_add_callback(nav, callback_new_attr_1(callback_cast(osd_compass_init), attr_navit, this)); return (struct osd_priv *) this; } |
From: Martin S. <mar...@us...> - 2008-02-27 18:03:57
|
Update of /cvsroot/navit/navit/src/xpm In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3126/xpm Added Files: flag_wh_bk.xpm Log Message: Fix:Core:Fixed osd plugin --- NEW FILE: flag_wh_bk.xpm --- /* XPM */ static char *flag_bk_wh[]={ "22 22 3 1 0 21", " c None", "+ c #ffffff", "* c #000000", "+++++++ ", "+***+++++++++ ", "+***+++***+++++++++ ", "+***+++***+++***+++ ", "++++******+++***+++ ", "++++***+++******+++ ", "++++***+++***+++**+ ", "+***++++++***+++**+ ", "+***+++***++++++**+ ", "+***+++***+++***+++ ", "++++******+++***+++ ", "++++***+++******+++ ", "++++++++++***+++**+ ", "+ +++++++++**+ ", "+ ++++++ ", "+ ", "+ ", "+ ", "+ ", "+ ", "+ ", "+ "}; |
From: Martin S. <mar...@us...> - 2008-02-27 09:33:04
|
Update of /cvsroot/navit/navit/src/graphics/gtk_drawing_area In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8699 Modified Files: graphics_gtk_drawing_area.c Log Message: Fix:graphics_gtk_drawing_area:Fixed documentation of draw_image_warp Index: graphics_gtk_drawing_area.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** graphics_gtk_drawing_area.c 26 Feb 2008 08:54:49 -0000 1.33 --- graphics_gtk_drawing_area.c 27 Feb 2008 09:33:07 -0000 1.34 *************** *** 533,539 **** --- 533,543 ---- h = imlib_image_get_height(); if (count == 3) { + /* 0 1 + 2 */ imlib_render_image_on_drawable_skewed(0, 0, w, h, p[0].x, p[0].y, p[1].x-p[0].x, p[1].y-p[0].y, p[2].x-p[0].x, p[2].y-p[0].y); } if (count == 2) { + /* 0 + 1 */ imlib_render_image_on_drawable_skewed(0, 0, w, h, p[0].x, p[0].y, p[1].x-p[0].x, 0, 0, p[1].y-p[0].y); } |
From: Martin S. <mar...@us...> - 2008-02-27 09:20:27
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3677 Modified Files: graphics.c map.h Log Message: Fix:Core:Fixed bbox handling of images Index: graphics.c =================================================================== RCS file: /cvsroot/navit/navit/src/graphics.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** graphics.c 26 Feb 2008 08:54:46 -0000 1.33 --- graphics.c 27 Feb 2008 09:20:27 -0000 1.34 *************** *** 411,415 **** case element_image: dbg(1,"image: '%s'\n", di->label); ! gra->meth.draw_image_warp(gra->priv, gra->gc[0]->priv, di->pnt, di->count, di->label); break; default: --- 411,418 ---- case element_image: dbg(1,"image: '%s'\n", di->label); ! if (gra->meth.draw_image_warp) ! gra->meth.draw_image_warp(gra->priv, gra->gc[0]->priv, di->pnt, di->count, di->label); ! else ! dbg(0,"draw_image_warp not supported by graphics driver drawing '%s'\Å", di->label); break; default: *************** *** 498,514 **** } } else { ! if (item->type == type_image && count == 2) { ! struct coord_rect r; ! r.lu=ca[0]; ! r.rl=ca[1]; ! if (! map_selection_contains_rect(sel, &r)) { ! dbg(1,"image not visible\n"); ! continue; ! } ! } else { ! if (! map_selection_contains_polygon(sel, ca, count)) { ! dbg(1,"polygon not visible\n"); ! continue; ! } } } --- 501,507 ---- } } else { ! if (! map_selection_contains_polygon(sel, ca, count)) { ! dbg(1,"polygon not visible\n"); ! continue; } } Index: map.h =================================================================== RCS file: /cvsroot/navit/navit/src/map.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** map.h 5 Jan 2008 22:46:19 -0000 1.13 --- map.h 27 Feb 2008 09:20:27 -0000 1.14 *************** *** 112,116 **** r.lu=c[0]; r.rl=c[0]; ! for (i = 1 ; i < count-1 ; i++) { if (c[i].x < r.lu.x) r.lu.x=c[i].x; --- 112,116 ---- r.lu=c[0]; r.rl=c[0]; ! for (i = 1 ; i < count ; i++) { if (c[i].x < r.lu.x) r.lu.x=c[i].x; *************** *** 125,129 **** } - /* prototypes */ enum projection; --- 125,128 ---- |
From: Martin S. <mar...@us...> - 2008-02-26 18:29:42
|
Update of /cvsroot/navit/navit/src In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv32638 Modified Files: osm2navit.c Log Message: Fix:Tools:Fixed osm2navit to work on 64 Bit again Index: osm2navit.c =================================================================== RCS file: /cvsroot/navit/navit/src/osm2navit.c,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** osm2navit.c 26 Feb 2008 08:52:33 -0000 1.61 --- osm2navit.c 26 Feb 2008 18:29:46 -0000 1.62 *************** *** 889,893 **** buffer=malloc(co->size); assert(buffer != NULL); ! idx=malloc(co->count*4); assert(idx != NULL); name=g_strdup_printf("country_%d.bin.unsorted", co->countryid); --- 889,893 ---- buffer=malloc(co->size); assert(buffer != NULL); ! idx=malloc(co->count*sizeof(void *)); assert(idx != NULL); name=g_strdup_printf("country_%d.bin.unsorted", co->countryid); *************** *** 903,907 **** p+=(*((int *)p)+1)*4; } ! qsort(idx, co->count, 4, sort_countries_compare); name=g_strdup_printf("country_%d.bin", co->countryid); f=fopen(name,"w"); --- 903,907 ---- p+=(*((int *)p)+1)*4; } ! qsort(idx, co->count, sizeof(void *), sort_countries_compare); name=g_strdup_printf("country_%d.bin", co->countryid); f=fopen(name,"w"); |
From: Martin S. <mar...@us...> - 2008-02-26 18:18:42
|
Update of /cvsroot/navit/navit In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27034 Modified Files: configure.in Log Message: Fix:Core:Fix check for Python.h Index: configure.in =================================================================== RCS file: /cvsroot/navit/navit/configure.in,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** configure.in 18 Feb 2008 17:03:12 -0000 1.77 --- configure.in 26 Feb 2008 18:18:45 -0000 1.78 *************** *** 355,363 **** PYTHON_LIBS="-L$py_libdir/config $py_libs $py_libc $py_libm -lpython$py_ver $py_liblocalmod $py_libbasemod" PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'` - AC_DEFINE(HAVE_PYTHON, 1, [Define to 1 if you have python]) - python=yes AC_MSG_RESULT($py_libdir) else AC_MSG_WARN([$py_libdir/config/Makefile or $py_prefix/include/python${py_ver}/Python.h missing, support for python disabled]) fi else --- 355,362 ---- PYTHON_LIBS="-L$py_libdir/config $py_libs $py_libc $py_libm -lpython$py_ver $py_liblocalmod $py_libbasemod" PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/[ \\t]*/ /g'` AC_MSG_RESULT($py_libdir) else AC_MSG_WARN([$py_libdir/config/Makefile or $py_prefix/include/python${py_ver}/Python.h missing, support for python disabled]) + enable_binding_python="no" fi else |