The Battle for Wesnoth  1.19.0-dev
Macros | Functions | Variables
display.cpp File Reference

Routines to set up the display, scroll and zoom the map. More...

#include "display.hpp"
#include "arrow.hpp"
#include "color.hpp"
#include "draw.hpp"
#include "draw_manager.hpp"
#include "fake_unit_manager.hpp"
#include "filesystem.hpp"
#include "font/sdl_ttf_compat.hpp"
#include "font/text.hpp"
#include "preferences/game.hpp"
#include "halo.hpp"
#include "hotkey/command_executor.hpp"
#include "log.hpp"
#include "map/map.hpp"
#include "map/label.hpp"
#include "minimap.hpp"
#include "overlay.hpp"
#include "play_controller.hpp"
#include "reports.hpp"
#include "resources.hpp"
#include "show_dialog.hpp"
#include "synced_context.hpp"
#include "team.hpp"
#include "terrain/builder.hpp"
#include "time_of_day.hpp"
#include "tooltips.hpp"
#include "units/unit.hpp"
#include "units/animation_component.hpp"
#include "units/drawer.hpp"
#include "units/orb_status.hpp"
#include "video.hpp"
#include "whiteboard/manager.hpp"
#include <boost/algorithm/string/trim.hpp>
#include <algorithm>
#include <array>
#include <cmath>
#include <iomanip>
#include <numeric>
#include <utility>
Include dependency graph for display.cpp:

Go to the source code of this file.

Macros

#define ERR_DP   LOG_STREAM(err, log_display)
 
#define WRN_DP   LOG_STREAM(warn, log_display)
 
#define LOG_DP   LOG_STREAM(info, log_display)
 
#define DBG_DP   LOG_STREAM(debug, log_display)
 
#define zoom_levels   (game_config::zoom_levels)
 
#define final_zoom_index   (static_cast<int>(zoom_levels.size()) - 1)
 
#define DefaultZoom   (game_config::tile_size)
 
#define SmallZoom   (DefaultZoom / 2)
 
#define MinZoom   (zoom_levels.front())
 
#define MaxZoom   (zoom_levels.back())
 

Functions

static int get_zoom_levels_index (unsigned int zoom_level)
 
static unsigned calculate_fps (unsigned frametime)
 

Variables

static lg::log_domain log_display ("display")
 

Detailed Description

Routines to set up the display, scroll and zoom the map.

Definition in file display.cpp.

Macro Definition Documentation

◆ DBG_DP

#define DBG_DP   LOG_STREAM(debug, log_display)

Definition at line 75 of file display.cpp.

◆ DefaultZoom

#define DefaultZoom   (game_config::tile_size)

Definition at line 80 of file display.cpp.

◆ ERR_DP

#define ERR_DP   LOG_STREAM(err, log_display)

Definition at line 72 of file display.cpp.

◆ final_zoom_index

#define final_zoom_index   (static_cast<int>(zoom_levels.size()) - 1)

Definition at line 79 of file display.cpp.

◆ LOG_DP

#define LOG_DP   LOG_STREAM(info, log_display)

Definition at line 74 of file display.cpp.

◆ MaxZoom

#define MaxZoom   (zoom_levels.back())

Definition at line 83 of file display.cpp.

◆ MinZoom

#define MinZoom   (zoom_levels.front())

Definition at line 82 of file display.cpp.

◆ SmallZoom

#define SmallZoom   (DefaultZoom / 2)

Definition at line 81 of file display.cpp.

◆ WRN_DP

#define WRN_DP   LOG_STREAM(warn, log_display)

Definition at line 73 of file display.cpp.

◆ zoom_levels

#define zoom_levels   (game_config::zoom_levels)

Definition at line 78 of file display.cpp.

Function Documentation

◆ calculate_fps()

static unsigned calculate_fps ( unsigned  frametime)
static

Definition at line 1335 of file display.cpp.

Referenced by display::update_fps_label().

◆ get_zoom_levels_index()

static int get_zoom_levels_index ( unsigned int  zoom_level)
static

Definition at line 94 of file display.cpp.

References MaxZoom, MinZoom, and zoom_levels.

Referenced by display::display(), and display::set_zoom().

Variable Documentation

◆ log_display

lg::log_domain log_display("display") ( "display"  )
static