[Scummvm-git-logs] scummvm master -> 7d8cff02313d8b7829acb9ad66ed35e853703ec1
dreammaster
dreammaster at scummvm.org
Sat May 27 05:23:56 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7d8cff0231 TITANIC: Fix calculation of acceleration powers table
Commit: 7d8cff02313d8b7829acb9ad66ed35e853703ec1
https://github.com/scummvm/scummvm/commit/7d8cff02313d8b7829acb9ad66ed35e853703ec1
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-05-26T23:23:45-04:00
Commit Message:
TITANIC: Fix calculation of acceleration powers table
Changed paths:
engines/titanic/star_control/star_control_sub23.cpp
diff --git a/engines/titanic/star_control/star_control_sub23.cpp b/engines/titanic/star_control/star_control_sub23.cpp
index 6e0b99f..a9a8b05 100644
--- a/engines/titanic/star_control/star_control_sub23.cpp
+++ b/engines/titanic/star_control/star_control_sub23.cpp
@@ -89,15 +89,13 @@ void CStarControlSub23::proc6(int val1, int val2, float val) {
_field48 = 31;
_field3C = (double)val2 * _field38;
- if (_powers.empty())
- _powers.resize(32);
-
// Calculate the powers table
- double exponent = 0.0, total = 0.0;
+ double base = 0.0, total = 0.0;
+ _powers.resize(32);
for (int idx = 31; idx >= 0; --idx) {
- _powers[idx] = pow(4.0, exponent);
+ _powers[idx] = pow(base, 4.0);
total += _powers[idx];
- exponent += 0.03125;
+ base += 0.03125;
}
for (int idx = 0; idx < 32; ++idx) {
More information about the Scummvm-git-logs
mailing list