Colobot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
src
app
gamedata.h
Go to the documentation of this file.
1
// * This file is part of the COLOBOT source code
2
// * Copyright (C) 2014, Polish Portal of Colobot (PPC)
3
// *
4
// * This program is free software: you can redistribute it and/or modify
5
// * it under the terms of the GNU General Public License as published by
6
// * the Free Software Foundation, either version 3 of the License, or
7
// * (at your option) any later version.
8
// *
9
// * This program is distributed in the hope that it will be useful,
10
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// * GNU General Public License for more details.
13
// *
14
// * You should have received a copy of the GNU General Public License
15
// * along with this program. If not, see http://www.gnu.org/licenses/.
16
22
#pragma once
23
24
#include "
common/singleton.h
"
25
26
#include <string>
27
#include <vector>
28
33
enum
DataDir
34
{
35
DIR_AI,
36
DIR_FONT
,
37
DIR_HELP
,
38
DIR_ICON
,
39
DIR_LEVEL
,
40
DIR_MODEL
,
41
DIR_MUSIC
,
42
DIR_SOUND
,
43
DIR_TEXTURE
,
44
45
DIR_MAX
46
};
47
48
class
CGameData
:
public
CSingleton
<CGameData>
49
{
50
public
:
51
CGameData
();
52
~
CGameData
();
53
54
void
Init();
55
void
SetDataDir(std::string path);
56
void
AddMod(std::string path);
57
58
std::string GetFilePath(
DataDir
dir,
const
std::string &subpath);
59
std::string GetDataPath(
const
std::string &subpath);
60
61
private
:
62
bool
m_dataDirSet;
63
std::vector<std::string> m_dataDirs;
64
const
char
* m_standardDataDirs[
DIR_MAX
];
65
};
66
Generated on Sat Jul 5 2014 09:25:01 for Colobot by
1.8.1.2