The Battle for Wesnoth  1.19.0-dev
minimap.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 - 2024
3  by David White <dave@whitevine.net>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 #pragma once
17 
18 #include <functional>
19 #include <map>
20 
21 class gamemap;
22 class team;
23 class unit_map;
24 struct map_location;
25 struct rect;
26 
27 namespace image {
28 /**
29  * Prepares the minimap texture and returns a function which will render it to the current rendering target when invoked.
30  */
31 std::function<rect(rect)> prep_minimap_for_rendering(
32  const gamemap& map,
33  const team* vw = nullptr,
34  const unit_map* units = nullptr,
35  const std::map<map_location, unsigned int>* reach_map = nullptr,
36  bool ignore_terrain_disabled = false);
37 }
Encapsulates the map of the game.
Definition: map.hpp:172
This class stores all the data for a single 'side' (in game nomenclature).
Definition: team.hpp:74
Container associating units to locations.
Definition: map.hpp:98
void rect(const SDL_Rect &rect)
Draw a rectangle.
Definition: draw.cpp:150
Functions to load and save images from/to disk.
std::function< rect(rect)> prep_minimap_for_rendering(const gamemap &map, const team *vw, const unit_map *units, const std::map< map_location, unsigned int > *reach_map, bool ignore_terrain_disabled)
Prepares the minimap texture and returns a function which will render it to the current rendering tar...
Definition: minimap.cpp:40
Encapsulates the map of the game.
Definition: location.hpp:38
An abstract description of a rectangle with integer coordinates.
Definition: rect.hpp:47