17 #ifndef GAME_DISPLAY_H_INCLUDED
18 #define GAME_DISPLAY_H_INCLUDED
42 boost::weak_ptr<wb::manager>
wb,
virtual void highlight_hex(map_location hex)
Function to highlight a location.
void invalidate_unit_after_move(const map_location &src, const map_location &dst)
Same as invalidate_unit() if moving the displayed unit.
std::string attack_indicator_direction() const
Function to get attack direction suffix.
::tod_manager * tod_manager
static game_display * create_dummy_display(CVideo &video)
static int & debug_highlight(const map_location &loc)
annotate hex with number, useful for debugging or UI prototype
std::string current_team_name() const
map_location attack_indicator_src_
void invalidate_unit()
Function to invalidate that unit status displayed on the sidebar.
void float_label(const map_location &loc, const std::string &text, const SDL_Color &color)
Function to float a label above a tile.
DIRECTION get_relative_dir(const map_location &loc, map_location::RELATIVE_DIR_MODE mode) const
GLint GLint GLint GLint GLint GLint y
map_location displayedUnitHex_
static display * singleton_
no linger overlay, show fog and shroud.
void draw_invalidated()
Only called when there's actual redrawing to do.
void new_turn()
Update lighting settings.
static std::map< map_location, int > debugHighlights_
Unit and team statistics.
GLdouble GLdouble GLdouble b
const tod_manager & get_tod_man() const
Allows this class to properly implement filter context, used for animations.
Object which defines a time of day with associated bonuses, image, sounds etc.
This class stores all the data for a single 'side' (in game nomenclature).
void scroll_to_leader(int side, SCROLL_TYPE scroll_type=ONSCREEN, bool force=true)
Scrolls to the leader of a certain side.
const time_of_day & get_time_of_day(const map_location &loc) const
void pre_draw()
game_display pre_draw does specific things related e.g.
virtual void select_hex(map_location hex)
Function to display a location as selected.
const map_location & displayed_unit_hex() const
Virtual functions shadowed in game_display.
void highlight_another_reach(const pathfind::paths &paths_list)
Add more paths to highlight.
bool invalidateGameStatus_
void highlight_reach(const pathfind::paths &paths_list)
Sets the paths that are currently displayed as available for the unit to move along.
map_display and display: classes which take care of displaying the map and game-data on the screen...
void set_game_mode(const tgame_mode game_mode)
Structure which holds a single route and marks for special events.
void needs_rebuild(bool b)
Sets whether the screen (map visuals) needs to be rebuilt. This is typically after the map has been c...
pathfind::marked_route route_
void draw_sidebar()
Called near the end of a draw operation, derived classes can use this to render a specific sidebar...
tgame_mode
Sets the linger mode for the display.
A terrain string which is converted to a terrain is a string with 1 or 2 layers the layers are separa...
Encapsulates the map of the game.
void unhighlight_reach()
Reset highlighting of paths.
void post_draw()
Calls the whiteboard's post-draw method.
int playing_side() const
The playing team is the team whose turn it is.
static void clear_debug_highlights()
GLint GLint GLint GLint GLint x
const tod_manager * tod_manager_
void reset_tod_manager(const tod_manager &tod_manager)
game_display(game_board &board, CVideo &video, boost::weak_ptr< wb::manager > wb, reports &reports_object, const tod_manager &tod_manager, const config &theme_cfg, const config &level, bool dummy=false)
display_chat_manager & get_chat_manager()
bool has_time_area() const
void post_commit()
Hook for actions to take right after draw() calls drawing_buffer_commit No action here by default...
const std::set< std::string > & observers() const
CVideo & video()
Gets the underlying screen object.
Object which contains all the possible locations a unit can move to, with associated best routes to t...
Container associating units to locations.
void set_playing_team(size_t team)
Sets the team controlled by the player using the computer.
map_location attack_indicator_dst_
virtual bool in_game() const
void draw_movement_info(const map_location &loc)
Draws the movement info (turns available) for a given location.
A config object defines a single node in a WML file, with access to child nodes.
void set_route(const pathfind::marked_route *route)
Sets the route along which footsteps are drawn to show movement of a unit.
boost::scoped_ptr< display_chat_manager > chat_man_
void clear_attack_indicator()
This module contains various pathfinding functions and utilities.
static std::string write_direction(DIRECTION dir)
void draw_hex(const map_location &loc)
Redraws a single gamemap location.
GLsizei const GLcharARB ** string
void display_unit_hex(map_location hex)
Change the unit to be displayed in the sidebar.
std::multimap< map_location, overlay > overlay_map
t_translation::t_terrain get_terrain_on(int palx, int paly, int x, int y)
void set_attack_indicator(const map_location &src, const map_location &dst)
Set the attack direction indicator.
static game_display * get_singleton()
bool maybe_rebuild()
Rebuilds the screen if needs_rebuild(true) was previously called, and resets the flag.
void operator=(const game_display &)