Author: esr
Date: Sat Jun 23 21:46:29 2007
New Revision: 18421
URL: http://svn.gna.org/viewcvs/wesnoth?rev=18421&view=rev
Log:
Make fogged() a method of map_display that is overridden by a foffed()
method in the display subclass.
If fogging or shrouding stops working, suspect this commit.
Modified:
trunk/src/display.hpp
Modified: trunk/src/display.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/display.hpp?rev=18421&r1=18420&r2=18421&view=diff
==============================================================================
--- trunk/src/display.hpp (original)
+++ trunk/src/display.hpp Sat Jun 23 21:46:29 2007
@@ -142,6 +142,9 @@
gui::button::TYPE string_to_button_type(std::string type);
void create_buttons();
+ // Will be overridden in the display subclass
+ bool fogged(const gamemap::location& loc) const { return false; }
+
protected:
CVideo& screen_;
const gamemap& map_;
@@ -154,6 +157,7 @@
bool redraw_background_;
// Not set by the initializer
std::vector<gui::button> buttons_;
+
};
class display : public map_display
@@ -393,8 +397,8 @@
bool fogged(const gamemap::location& loc) const
{ return team_valid() ? teams_[currentTeam_].fogged(loc.x,
loc.y) : false; }
- //the viewing team is the team currently viewing the game. The playing
team
- //is the team whose turn it is
+ //the viewing team is the team currently viewing the game. The
+ //playing team is the team whose turn it is
size_t viewing_team() const { return currentTeam_; }
size_t playing_team() const { return activeTeam_; }
bool team_valid() const { return currentTeam_ < teams_.size(); }
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits