int editor_track_draw_current_new_direction_road(){ RoadMapPen layer_pens[LAYER_PROJ_AREAS]; NavigateSegment segment; RoadMapPosition intersection; int distance; int i; if (points_count < 1) return 0; roadmap_square_set_current(TrackConfirmedLine.line.square); if (!roadmap_line_route_is_low_weight (TrackConfirmedLine.line.line_id)) { return 0; } segment.square = TrackConfirmedLine.line.square; segment.line = TrackConfirmedLine.line.line_id; roadmap_line_from(TrackConfirmedLine.line.line_id, &segment.from_pos); roadmap_line_to(TrackConfirmedLine.line.line_id, &segment.to_pos); roadmap_line_shapes (TrackConfirmedLine.line.line_id, &segment.first_shape, &segment.last_shape); segment.shape_initial_pos = segment.from_pos; for (i = 0; i < LAYER_PROJ_AREAS; i++) { layer_pens[i] = roadmap_layer_get_pen (roadmap_line_cfcc(TrackConfirmedLine.line.line_id),1, i); } navigate_instr_fix_line_end(track_point_pos(points_count - 1), &segment, TrackConfirmedStreet.line_direction == ROUTE_DIRECTION_WITH_LINE ? LINE_END : LINE_START); if (!editor_override_exists(TrackConfirmedLine.line.line_id, TrackConfirmedLine.line.square)){ distance = roadmap_math_get_distance_from_segment (track_point_pos(points_count - 1), &segment.from_pos, &segment.to_pos, &intersection, NULL); if (TrackConfirmedStreet.line_direction == ROUTE_DIRECTION_WITH_LINE) distance = roadmap_math_distance (&intersection, &segment.from_pos); else distance = roadmap_math_distance (&intersection, &segment.to_pos); roadmap_ticker_set_last_event(road_munching_event); editor_points_display(distance); } roadmap_screen_draw_one_line (&segment.from_pos, &segment.to_pos, 0, &segment.shape_initial_pos, segment.first_shape, segment.last_shape, NULL, layer_pens, LAYER_PROJ_AREAS, -1, 0, 0, 0); return 0; }
void roadmap_ticker_show(void){ char text[256]; gTickerHide = FALSE; if (! roadmap_message_format (text, sizeof(text), "%*|%X")) { roadmap_message_set('*', "%d", 0); roadmap_ticker_set_last_event(default_event); } if (gTickerSupressHide) roadmap_main_remove_periodic (roadmap_ticker_supress_hide); roadmap_main_set_periodic (15000, roadmap_ticker_supress_hide); gTickerSupressHide = TRUE; if (!roadmap_screen_refresh()) roadmap_screen_redraw(); }