mail[Wesnoth-commits] r36549 - in /trunk/src: actions.hpp callable_objects.hpp team.cpp team.hpp unit.cpp unit.hpp unit_frame.cpp


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

Header


Content

Posted by e0204097 on July 04, 2009 - 23:21:
Author: euschn
Date: Fri Jul  3 14:32:51 2009
New Revision: 36549

URL: http://svn.gna.org/viewcvs/wesnoth?rev=36549&view=rev
Log:
added a vector<unit> recall_list_ to class team. changed a few includes and 
forward declarations to be able to reference unit in team

Modified:
    trunk/src/actions.hpp
    trunk/src/callable_objects.hpp
    trunk/src/team.cpp
    trunk/src/team.hpp
    trunk/src/unit.cpp
    trunk/src/unit.hpp
    trunk/src/unit_frame.cpp

Modified: trunk/src/actions.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/actions.hpp?rev=36549&r1=36548&r2=36549&view=diff
==============================================================================
--- trunk/src/actions.hpp (original)
+++ trunk/src/actions.hpp Fri Jul  3 14:32:51 2009
@@ -36,6 +36,7 @@
 #include "unit.hpp"
 #include "unit_map.hpp"
 #include "unit_types.hpp"
+#include "time_of_day.hpp"
 
 #include <deque>
 #include <sstream>

Modified: trunk/src/callable_objects.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/callable_objects.hpp?rev=36549&r1=36548&r2=36549&view=diff
==============================================================================
--- trunk/src/callable_objects.hpp (original)
+++ trunk/src/callable_objects.hpp Fri Jul  3 14:32:51 2009
@@ -20,6 +20,7 @@
 #include "formula_callable.hpp"
 #include "map.hpp"
 #include "unit.hpp"
+#include "team.hpp"
 #include "foreach.hpp"
 
 #define CALLABLE_WRAPPER_START(klass) \

Modified: trunk/src/team.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/team.cpp?rev=36549&r1=36548&r2=36549&view=diff
==============================================================================
--- trunk/src/team.cpp (original)
+++ trunk/src/team.cpp Fri Jul  3 14:32:51 2009
@@ -370,7 +370,8 @@
                enemies_(),
                seen_(),
                ally_shroud_(),
-               ally_fog_()
+               ally_fog_(),
+               recall_list_()
 {
        fog_.set_enabled( utils::string_bool(cfg["fog"]) );
        shroud_.set_enabled( utils::string_bool(cfg["shroud"]) );

Modified: trunk/src/team.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/team.hpp?rev=36549&r1=36548&r2=36549&view=diff
==============================================================================
--- trunk/src/team.hpp (original)
+++ trunk/src/team.hpp Fri Jul  3 14:32:51 2009
@@ -20,6 +20,7 @@
 #include "map_location.hpp"
 #include "viewpoint.hpp"
 #include "savegame_config.hpp"
+#include "unit.hpp"
 
 class gamemap;
 struct time_of_day;
@@ -159,6 +160,7 @@
                { countdown_time_ = amount; }
        int action_bonus_count() const { return action_bonus_count_; }
        void set_action_bonus_count(const int count) { action_bonus_count_ = 
count; }
+       std::vector<unit>& recall_list() {return recall_list_;}
        void set_current_player(const std::string player)
                { info_.current_player = player; }
 
@@ -337,6 +339,8 @@
        int countdown_time_;
        int action_bonus_count_;
 
+       std::vector<unit> recall_list_;
+
        bool calculate_enemies(size_t index) const;
        bool calculate_is_enemy(size_t index) const;
        mutable std::vector<bool> enemies_;

Modified: trunk/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=36549&r1=36548&r2=36549&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Fri Jul  3 14:32:51 2009
@@ -35,6 +35,7 @@
 #include "unit_abilities.hpp"
 #include "terrain_filter.hpp"
 #include "formula_string_utils.hpp"
+#include "team.hpp"
 
 static lg::log_domain log_unit("unit");
 #define DBG_UT LOG_STREAM(debug, log_unit)
@@ -889,6 +890,10 @@
        return(colour);
 }
 
+std::string unit::side_id() const {return 
teams_manager::get_teams()[side()-1].save_id(); }
+
+Uint32 unit::team_rgb() const { return(team::get_side_rgb(side())); }
+
 void unit::set_movement(int moves)
 {
        hold_position_ = false;

Modified: trunk/src/unit.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.hpp?rev=36549&r1=36548&r2=36549&view=diff
==============================================================================
--- trunk/src/unit.hpp (original)
+++ trunk/src/unit.hpp Fri Jul  3 14:32:51 2009
@@ -22,7 +22,6 @@
 #include "map_location.hpp"
 #include "portrait.hpp"
 #include "race.hpp"
-#include "team.hpp"
 #include "unit_types.hpp"
 #include "unit_map.hpp"
 
@@ -31,6 +30,8 @@
 class game_display;
 class game_state;
 class vconfig;
+class team;
+class unit_type;
 
 #include <set>
 #include <string>
@@ -122,8 +123,8 @@
        /** Set to true for some scenario-specific units which should not be 
renamed */
        bool unrenamable() const { return unrenamable_; }
        int side() const { return side_; }
-       std::string side_id() const {return 
teams_manager::get_teams()[side()-1].save_id(); }
-       Uint32 team_rgb() const { return(team::get_side_rgb(side())); }
+       std::string side_id() const;
+       Uint32 team_rgb() const;
        const std::string& team_color() const { return flag_rgb_; }
        unit_race::GENDER gender() const { return gender_; }
        void set_side(unsigned int new_side) { side_ = new_side; }

Modified: trunk/src/unit_frame.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_frame.cpp?rev=36549&r1=36548&r2=36549&view=diff
==============================================================================
--- trunk/src/unit_frame.cpp (original)
+++ trunk/src/unit_frame.cpp Fri Jul  3 14:32:51 2009
@@ -19,9 +19,9 @@
 #include "game_display.hpp"
 #include "halo.hpp"
 #include "sound.hpp"
+#include "unit_frame.hpp"
 
 #define UNIT_FRAME_H_PART2
-#include "unit_frame.hpp"
 
 
 progressive_string::progressive_string(const std::string & data,int 
duration) :
@@ -152,7 +152,6 @@
 template class progressive_<double>;
 
 #undef UNIT_FRAME_H_PART2
-#include "unit_frame.hpp"
 
 frame_parameters::frame_parameters() :
        image(),




Related Messages


Powered by MHonArc, Updated Sun Jul 05 00:20:28 2009