-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsource.cpp
More file actions
50 lines (41 loc) · 1.29 KB
/
source.cpp
File metadata and controls
50 lines (41 loc) · 1.29 KB
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
49
50
#include <SFML/Graphics.hpp>
#include <boost/format.hpp>
#include "setting.h"
#include "source.h"
#include "placement.h"
namespace source
{
namespace colorHint
{
sf::Sprite prev, cur, next;
sf::Texture prevT, curT, nextT;
}
sf::Sprite bg, cover, logo;
sf::Texture bgTexture, coverTexture, logoTexture;
sf::Font renderFont;
void refreshHints()
{
using namespace colorHint;
using boost::format;
prevT = curT;
curT.loadFromFile((format(".\\src\\sand\\%d.png") % placement::curType).str());
nextT.loadFromFile((format(".\\src\\sand\\%d.png") % placement::nextType).str());
prev.setTexture(prevT, true);
cur.setTexture(curT, true);
next.setTexture(nextT, true);
}
void loadSource()
{
renderFont.loadFromFile(".\\src\\HighPixel.ttf");
bgTexture.loadFromFile(".\\src\\bg.png");
coverTexture.loadFromFile(".\\src\\cover.png");
logoTexture.loadFromFile(".\\src\\logo.png");
bg.setTexture(bgTexture);
cover.setTexture(coverTexture);
logo.setTexture(logoTexture);
using boost::format;
using colorHint::curT;
curT.loadFromFile((format(".\\src\\sand\\%d.png") % placement::curType).str());
refreshHints();
}
}