forked from floft/sprouts
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtexture_atlas.cpp
41 lines (36 loc) · 936 Bytes
/
texture_atlas.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
#include "texture_atlas.h"
#include <iostream>
#include <cstdlib>
using namespace std;
/**************
*Description:
*Input:
*Output:
**************/
namespace
{
Image loadImage()
{
try
{
return Image(L"textures.png");
}
catch(exception &e)
{
cerr << "error : " << e.what() << endl;
exit(1);
}
}
}
const Image TextureAtlas::texture = loadImage();
const TextureAtlas TextureAtlas::Font8x8(0, 0, 128, 128),
TextureAtlas::Line(128, 0, 1, 1),
TextureAtlas::Point(128, 1, 1, 1),
TextureAtlas::ButtonLeftDiffuse(0, 128 + 16, 8, 16),
TextureAtlas::ButtonRightDiffuse(24, 128 + 16, 8, 16),
TextureAtlas::ButtonMiddleDiffuse(8, 128 + 16, 16, 16),
TextureAtlas::ButtonLeftSpecular(0, 128, 8, 16),
TextureAtlas::ButtonRightSpecular(24, 128, 8, 16),
TextureAtlas::ButtonMiddleSpecular(8, 128, 16, 16),
TextureAtlas::MenuGearBottom(64, 192, 64, 64),
TextureAtlas::MenuGearTop(0, 192, 64, 64);