-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTextureTools.h
37 lines (30 loc) · 862 Bytes
/
TextureTools.h
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
//
// TextureTools.h
// TankGame
//
// Created by Jacob Gonzalez on 11/04/2015.
// Copyright (c) 2015 Jacob Gonzalez. All rights reserved.
//
#ifndef TEXTURE_TOOLS_H
#define TEXTURE_TOOLS_H
#include "StringTools.h"
#include <cstdio>
#include <ctime>
#include <fstream>
#include <map>
// :: static utility class for loading and getting textures ::
// :: Todo: turn into singleton Textures class? ::
class TextureTools
{
public:
// : loads a texture map file into the _texture_map :
static bool load_texture_file(std::string filename);
// : gets the texture for a key :
static std::string get_texture(std::string key);
private:
// : static texture map :
static std::map<std::string, std::string> _texture_map;
// : for initing the map :
static std::map<std::string, std::string> _init_map();
};
#endif // TEXTURE_TOOLS_H