-
Notifications
You must be signed in to change notification settings - Fork 0
/
TextureManager.cpp
48 lines (45 loc) · 1.35 KB
/
TextureManager.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// Created by Louis GARCZYNSKI on 4/1/16.
//
#include "TextureManager.hpp"
SpriteManager::SpriteManager()
{
if (!board.loadFromFile("./textures/board.png"))
{
throw std::logic_error("Could not load board texture");
}
if (!stone_black.loadFromFile("./textures/stone_black.png"))
{
throw std::logic_error("Could not load black stone texture");
}
if (!stone_white.loadFromFile("./textures/stone_white.png"))
{
throw std::logic_error("Could not load white stone texture");
}
if (!stone_suggestion.loadFromFile("./textures/stone_suggestion.png"))
{
throw std::logic_error("Could not load suggestion stone texture");
}
if (!stone_preview.loadFromFile("./textures/stone_preview.png"))
{
throw std::logic_error("Could not load preview stone texture");
}
if (!stone_preview_taboo.loadFromFile("./textures/stone_preview_taboo.png"))
{
throw std::logic_error("Could not load preview taboo stone texture");
}
if (!font.loadFromFile("./textures/font.otf"))
{
throw std::logic_error("Could not load preview taboo stone texture");
}
if (!highlight.loadFromFile("./textures/highlight.png"))
{
throw std::logic_error("Could not load preview highlight texture");
}
stone_black.setSmooth(true);
stone_white.setSmooth(true);
stone_suggestion.setSmooth(true);
stone_preview.setSmooth(true);
stone_preview_taboo.setSmooth(true);
highlight.setSmooth(true);
}