/[zanavi_public1]/navit/navit/navit.c
ZANavi

Diff of /navit/navit/navit.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 42 Revision 43
890 890
891 891
892 // distance = speed * this_->autozoom_secs; 892 // distance = speed * this_->autozoom_secs;
893 if (speed > 109) 893 if (speed > 109)
894 { 894 {
895 distance = speed * 10; 895 distance = (float)speed * 17.4f;
896 }
897 else if (speed > 75)
898 {
899 distance = (float)speed * 14.3f;
896 } 900 }
897 else 901 else
898 { 902 {
899 distance = speed * 5; 903 distance = (float)speed * 7.3f;
900 } 904 }
905
906 // dbg(0,"autozoom: dis1=%f\n", distance);
901 907
902 // if overspill > 1 ? 908 // if overspill > 1 ?
903 if (global_overspill_factor > 1.0f) 909 if (global_overspill_factor > 1.0f)
904 { 910 {
905 distance = distance * global_overspill_factor; 911 distance = distance * global_overspill_factor;
910 scale = transform_get_scale(this_->trans); 916 scale = transform_get_scale(this_->trans);
911 917
912 transform_get_size(this_->trans, &w, &h); 918 transform_get_size(this_->trans, &w, &h);
913 transform(this_->trans, transform_get_projection(this_->trans), center, &pc, 1, 0, 0, NULL); 919 transform(this_->trans, transform_get_projection(this_->trans), center, &pc, 1, 0, 0, NULL);
914 920
921#if 0
922 // dbg(0,"autozoom:ovrspll=%f\n", global_overspill_factor);
915 // dbg(0,"autozoom: dist=%d\n", distance); 923 dbg(0,"autozoom: dist=%f\n", distance);
916 // dbg(0,"autozoom: scale=%d\n", (int)scale); 924 dbg(0,"autozoom: scale=%d\n", (int)scale);
917 // dbg(0,"autozoom:o speed=%d\n", speed); 925 dbg(0,"autozoom:o speed=%d\n", speed);
918 // dbg(0,"autozoom:n speed=%d\n", global_old_vehicle_speed); 926 dbg(0,"autozoom:n speed=%d\n", global_old_vehicle_speed);
927#endif
919 928
920 /* We make sure that the point we want to see is within a certain range 929 /* We make sure that the point we want to see is within a certain range
921 * around the vehicle. The radius of this circle is the size of the 930 * around the vehicle. The radius of this circle is the size of the
922 * screen. This doesn't necessarily mean the point is visible because of 931 * screen. This doesn't necessarily mean the point is visible because of
923 * perspective etc. Quite rough, but should be enough. */ 932 * perspective etc. Quite rough, but should be enough. */
934 if (new_scale < this_->autozoom_min) 943 if (new_scale < this_->autozoom_min)
935 { 944 {
936 new_scale = this_->autozoom_min; 945 new_scale = this_->autozoom_min;
937 } 946 }
938 947
948#if 0
939 // dbg(0,"autozoom:w n.scale=%d o.scale=%d\n", (int)new_scale, (int)scale); 949 dbg(0,"autozoom:w n.scale=%d o.scale=%d\n", (int)new_scale, (int)scale);
950#endif
940 951
941 //if (abs(new_scale - scale) < 2) 952 //if (abs(new_scale - scale) < 2)
942 //{ 953 //{
943 // return; // Smoothing 954 // return; // Smoothing
944 //} 955 //}

Legend:
Removed from v.42  
changed lines
  Added in v.43

   
Visit the ZANavi Wiki