Conquer Chess
Chess and Starcraft combined
Loading...
Searching...
No Matches
map_textures.h
Go to the documentation of this file.
1#ifndef MAP_TEXTURES_H
2#define MAP_TEXTURES_H
3
4#ifndef LOGIC_ONLY
5
6#include "race.h"
7
8#include <SFML/Graphics.hpp>
9
12{
13public:
15
16 std::string get_filename(
17 const race race
18 ) const noexcept;
19
20 int get_n_textures() const noexcept
21 {
22 return sizeof(*this)
23 / sizeof(m_textures.at(race::classic))
24 ;
25 }
26
28 sf::Texture& get_map(
29 const race race
30 );
31
32private:
33
34 std::map<race, sf::Texture> m_textures;
35};
36
37#endif // LOGIC_ONLY
38
39#endif // TEXTURES_H
The textures for the game maps.
Definition map_textures.h:12
map_textures()
Definition map_textures.cpp:9
std::string get_filename(const race race) const noexcept
Definition map_textures.cpp:25
sf::Texture & get_map(const race race)
Get texture of a piece.
Definition map_textures.cpp:34
int get_n_textures() const noexcept
Definition map_textures.h:20
race
The chess race.
Definition race.h:10
@ classic