Author: silene
Date: Thu May 21 16:57:40 2009
New Revision: 35786
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35786&view=rev
Log:
Removed redundant parameters from unit::set_selecting.
Modified:
trunk/src/mouse_events.cpp
trunk/src/unit.cpp
trunk/src/unit.hpp
Modified: trunk/src/mouse_events.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/mouse_events.cpp?rev=35786&r1=35785&r2=35786&view=diff
==============================================================================
--- trunk/src/mouse_events.cpp (original)
+++ trunk/src/mouse_events.cpp Thu May 21 16:57:40 2009
@@ -471,7 +471,7 @@
// selection have impact only if we are not observing and it's
our unit
if (!browse && !commands_disabled && u->second.side() ==
gui().viewing_side()) {
sound::play_UI_sound("select-unit.wav");
- u->second.set_selecting(gui(), u->first);
+ u->second.set_selecting();
game_events::fire("select", hex);
}
Modified: trunk/src/unit.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=35786&r1=35785&r2=35786&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Thu May 21 16:57:40 2009
@@ -1812,12 +1812,15 @@
start_animation(INT_MAX,loc,choose_animation(disp,loc,"idling"),true,false,"",0,STATE_FORGET);
}
-void unit::set_selecting(const game_display &disp,const map_location& loc)
-{
+void unit::set_selecting()
+{
+ const game_display *disp = game_display::get_singleton();
if (preferences::show_standing_animations()) {
-
start_animation(INT_MAX,loc,choose_animation(disp,loc,"selected"),true,false,"",0,STATE_FORGET);
+ start_animation(INT_MAX, loc_, choose_animation(*disp, loc_,
"selected"),
+ true, false, "", 0, STATE_FORGET);
} else {
-
start_animation(INT_MAX,loc,choose_animation(disp,loc,"_disabled_selected_"),true,false,"",0,STATE_FORGET);
+ start_animation(INT_MAX, loc_, choose_animation(*disp, loc_,
"_disabled_selected_"),
+ true, false, "", 0, STATE_FORGET);
}
}
Modified: trunk/src/unit.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.hpp?rev=35786&r1=35785&r2=35786&view=diff
==============================================================================
--- trunk/src/unit.hpp (original)
+++ trunk/src/unit.hpp Thu May 21 16:57:40 2009
@@ -210,7 +210,7 @@
{ set_standing(loc_, with_bars); }
void set_idling(const game_display& disp,const map_location& loc);
- void set_selecting(const game_display& disp,const map_location& loc);
+ void set_selecting();
unit_animation* get_animation() { return anim_;};
const unit_animation* get_animation() const { return anim_;};
void set_facing(map_location::DIRECTION dir);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits