The Battle for Wesnoth 1.21.0-dev
 
Loading...
Searching...
No Matches
minimap.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2003 - 2025
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
21class gamemap;
22class team;
23class unit_map;
24struct map_location;
25struct rect;
26
27namespace image {
28/**
29 * Prepares the minimap texture and returns a function which will render it to the current rendering target when invoked.
30 */
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:176
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
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:46
An abstract description of a rectangle with integer coordinates.
Definition rect.hpp:49