mail[Wesnoth-commits] r44034 - in /branches/1.8/src: ./ ai/default/ ai/testing/


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by crazy-ivanovic on July 09, 2010 - 11:05:
Author: ivanovic
Date: Fri Jul  9 11:05:49 2010
New Revision: 44034

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44034&view=rev
Log:
add some casts to allow compilation for arm when some "float optimization" is 
used (otherwise compilation breaks!)

Modified:
    branches/1.8/src/ai/default/move.cpp
    branches/1.8/src/ai/testing/ca_default_move_to_targets.cpp
    branches/1.8/src/ai/testing/ca_testing_move_to_targets.cpp
    branches/1.8/src/unit_frame.cpp

Modified: branches/1.8/src/ai/default/move.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.8/src/ai/default/move.cpp?rev=44034&r1=44033&r2=44034&view=diff
==============================================================================
--- branches/1.8/src/ai/default/move.cpp (original)
+++ branches/1.8/src/ai/default/move.cpp Fri Jul  9 11:05:49 2010
@@ -477,7 +477,7 @@
                        raise_user_interact();
 
                        const move_cost_calculator calc(u->second, map_, 
units_, enemy_dstsrc);
-                       const double locStopValue = 
std::min(best_target->value / best_rating, 100.0);
+                       const double locStopValue = 
std::min(best_target->value / best_rating, (double) 100.0);
                        pathfind::plain_route cur_route = 
a_star_search(u->first, best_target->loc, locStopValue, &calc, map_.w(), 
map_.h());
 
                        if(cur_route.steps.empty()) {

Modified: branches/1.8/src/ai/testing/ca_default_move_to_targets.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.8/src/ai/testing/ca_default_move_to_targets.cpp?rev=44034&r1=44033&r2=44034&view=diff
==============================================================================
--- branches/1.8/src/ai/testing/ca_default_move_to_targets.cpp (original)
+++ branches/1.8/src/ai/testing/ca_default_move_to_targets.cpp Fri Jul  9 
11:05:49 2010
@@ -390,7 +390,7 @@
                        raise_user_interact();
 
                        const move_cost_calculator calc(u->second, map_, 
units_, enemy_dstsrc);
-                       const double locStopValue = 
std::min(best_target->value / best_rating, 100.0);
+                       const double locStopValue = 
std::min(best_target->value / best_rating, (double) 100.0);
                        pathfind::plain_route cur_route = 
pathfind::a_star_search(u->first, best_target->loc, locStopValue, &calc, 
map_.w(), map_.h());
 
                        if(cur_route.steps.empty()) {

Modified: branches/1.8/src/ai/testing/ca_testing_move_to_targets.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.8/src/ai/testing/ca_testing_move_to_targets.cpp?rev=44034&r1=44033&r2=44034&view=diff
==============================================================================
--- branches/1.8/src/ai/testing/ca_testing_move_to_targets.cpp (original)
+++ branches/1.8/src/ai/testing/ca_testing_move_to_targets.cpp Fri Jul  9 
11:05:49 2010
@@ -393,7 +393,7 @@
                        // but best_rating is too big for scout and support
                        // which give a too small locStopValue
                        // so keep costy A* for the moment.
-                       //const double locStopValue = 
std::min(best_target->value / best_rating, 100.0);
+                       //const double locStopValue = 
std::min(best_target->value / best_rating, (double) 100.0);
 
                        const double locStopValue = 500.0;
                        pathfind::plain_route cur_route = 
pathfind::a_star_search(u->first, best_target->loc, locStopValue, &calc, 
map_.w(), map_.h());

Modified: branches/1.8/src/unit_frame.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.8/src/unit_frame.cpp?rev=44034&r1=44033&r2=44034&view=diff
==============================================================================
--- branches/1.8/src/unit_frame.cpp (original)
+++ branches/1.8/src/unit_frame.cpp Fri Jul  9 11:05:49 2010
@@ -666,7 +666,7 @@
 
        /** engine provide a blend colour for poisoned units */
        result.blend_ratio = 
current_val.blend_ratio?current_val.blend_ratio:animation_val.blend_ratio;
-       if(primary && engine_val.blend_ratio) result.blend_ratio = 
std::min(result.blend_ratio + engine_val.blend_ratio,1.0);
+       if(primary && engine_val.blend_ratio) result.blend_ratio = 
std::min(result.blend_ratio + engine_val.blend_ratio, (double) 1.0);
 
        /** engine provide a highlight ratio for selected units and visible 
"invisible" units */
        result.highlight_ratio = 
current_val.highlight_ratio!=1.0?current_val.highlight_ratio:animation_val.highlight_ratio;




Related Messages


Powered by MHonArc, Updated Fri Jul 09 11:20:08 2010