Author: martinxyz
Date: Mon Jun 4 22:29:21 2007
New Revision: 18082
URL: http://svn.gna.org/viewcvs/wesnoth?rev=18082&view=rev
Log:
reduced "sea sickness" effect when scrolling at accelerated speed
Modified:
trunk/changelog
trunk/src/display.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=18082&r1=18081&r2=18082&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Mon Jun 4 22:29:21 2007
@@ -27,6 +27,7 @@
* ability to view a list of MP servers with the Join Game dialog
* fixed blinking tooltips when clock is updated (bug #9209)
* footsteps are now erased at the end of the unit's move
+ * reduced "sea sickness" effect when scrolling at accelerated speed
* Miscellaneous and bugfixes
* fix bug #4299: word wrap for menus with very long option strings
* various bugfixes and code cleanups
Modified: trunk/src/display.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.cpp?rev=18082&r1=18081&r2=18082&view=diff
==============================================================================
--- trunk/src/display.cpp (original)
+++ trunk/src/display.cpp Mon Jun 4 22:29:21 2007
@@ -622,10 +622,6 @@
int t_prev = SDL_GetTicks();
- // those values might need some fine-tuning:
- const double accel_time = 0.3; // seconds until full speed is reached
- const double decel_time = 0.4; // seconds from full speed to stop
-
double velocity = 0.0;
while (dist_moved < dist_total) {
events::pump();
@@ -639,6 +635,10 @@
t_prev = t;
//std::cout << t << " " << hypot(x_old, y_old) << "\n";
+
+ // those values might need some fine-tuning:
+ const double accel_time = 0.3 / turbo_speed(); // seconds until
full speed is reached
+ const double decel_time = 0.4 / turbo_speed(); // seconds from
full speed to stop
double velocity_max = preferences::scroll_speed() * 60.0;
velocity_max *= turbo_speed();
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits