GlistEngine
Loading...
Searching...
No Matches
gObject.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 Nitra Games Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef ENGINE_BASE_GOBJECT_H_
18#define ENGINE_BASE_GOBJECT_H_
19
20#include "gUtils.h"
21#include <cxxabi.h>
22#include "stb/stb_image.h"
23//#include "gConfig.h"
24
25
26// TODO Change hardcoded engine path
27// Only use this function for development purposes. Never use that within release build.
28static std::string gGetEngineDir() {
29 return "C:/dev/glist/glistengine/engine/";
30}
31
32
33class gObject {
34public:
36
38
44 static std::string gGetAppDir();
45
51 static std::string gGetAssetsDir();
52
65 static void gSetAssetsDir(std::string assetsDir);
66
72 static std::string gGetFilesDir();
73
79 static std::string gGetImagesDir();
80
86 static std::string gGetFontsDir();
87
93 static std::string gGetModelsDir();
94
100 static std::string gGetTexturesDir();
101
107 static std::string gGetShadersDir();
108
114 static std::string gGetSoundsDir();
115
121 static std::string gGetDatabasesDir();
122 static std::string gGetVideosDir();
123
130 void logi(std::string message);
131
138 void logd(std::string message);
139
146 void logw(std::string message);
147
155 void loge(std::string message);
156
163 void logi(std::string tag, std::string message);
164
171 void logd(std::string tag, std::string message);
172
179 void logw(std::string tag, std::string message);
180
188 void loge(std::string tag, std::string message);
189
190 // For internal access. Do not invoke this function directly
191 static void setCurrentResolution(int scalingNo, int currentResolutionNo);
192
193protected:
196private:
197 static std::string exepath;
198 static std::string assetsdir;
199 static bool initializedpaths;
200
201 static void initPaths();
202};
203
204#endif /* ENGINE_BASE_GOBJECT_H_ */
Definition gObject.h:33
void logi(std::string message)
static const int LOGLEVEL_DEBUG
Definition gObject.h:35
static std::string gGetFilesDir()
void logd(std::string tag, std::string message)
static std::string gGetVideosDir()
static std::string gGetAppDir()
static std::string gGetModelsDir()
static const int LOGLEVEL_WARNING
Definition gObject.h:35
static const int LOGLEVEL_ERROR
Definition gObject.h:35
static std::string gGetDatabasesDir()
static const int LOGLEVEL_INFO
Definition gObject.h:35
void logi(std::string tag, std::string message)
void loge(std::string message)
static std::string gGetTexturesDir()
static std::string gGetSoundsDir()
static std::string gGetAssetsDir()
static int releasescaling
Definition gObject.h:195
static void gSetAssetsDir(std::string assetsDir)
static std::string gGetShadersDir()
static const int LOGLEVEL_SILENT
Definition gObject.h:35
void logd(std::string message)
static int releaseresolution
Definition gObject.h:195
void loge(std::string tag, std::string message)
static std::string gGetFontsDir()
static int renderpassno
Definition gObject.h:194
static void setCurrentResolution(int scalingNo, int currentResolutionNo)
void logw(std::string tag, std::string message)
static int renderpassnum
Definition gObject.h:194
static std::string gGetImagesDir()
void logw(std::string message)