Fix constness of display::get_time_of_day and make it public
This commit is contained in:
parent
e229df747d
commit
6755770b22
3 changed files with 5 additions and 4 deletions
|
@ -478,6 +478,8 @@ public:
|
|||
void set_report_content(const reports::TYPE which_report, const std::string &content);
|
||||
std::map<reports::TYPE, std::string> get_report_contents() const {return report_;};
|
||||
|
||||
virtual const time_of_day get_time_of_day(const map_location& /*loc*/) const {return time_of_day();}
|
||||
|
||||
protected:
|
||||
/** Clear the screen contents */
|
||||
void clear_screen();
|
||||
|
@ -514,7 +516,6 @@ protected:
|
|||
*/
|
||||
virtual void draw_hex(const map_location& loc);
|
||||
|
||||
virtual const time_of_day get_time_of_day(const map_location& /*loc*/) {return time_of_day();}
|
||||
/**
|
||||
* @returns the image type to be used for the passed hex
|
||||
* (mostly to do with brightening like for mouseover)
|
||||
|
|
|
@ -412,7 +412,7 @@ void game_display::draw_hex(const map_location& loc)
|
|||
//simulate_delay += 1;
|
||||
}
|
||||
|
||||
const time_of_day game_display::get_time_of_day(const map_location& loc)
|
||||
const time_of_day game_display::get_time_of_day(const map_location& loc) const
|
||||
{
|
||||
return tod_manager_.get_time_of_day(0,loc);
|
||||
}
|
||||
|
|
|
@ -143,6 +143,8 @@ public:
|
|||
/** Same as invalidate_unit() if moving the displayed unit. */
|
||||
void invalidate_unit_after_move(const map_location& src, const map_location& dst);
|
||||
|
||||
const time_of_day get_time_of_day(const map_location& loc) const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* game_display pre_draw does specific things related e.g. to unit rendering
|
||||
|
@ -160,8 +162,6 @@ protected:
|
|||
|
||||
void draw_hex(const map_location& loc);
|
||||
|
||||
const time_of_day get_time_of_day(const map_location& loc);
|
||||
|
||||
/**
|
||||
* Animated hex invalidation specific to gameplay
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue