Refactor and fixes
This commit is contained in:
+1
-26
@@ -5,6 +5,7 @@
|
||||
#include <memory>
|
||||
#include <stdexcept>
|
||||
#include "typedefs.h"
|
||||
#include "settings.h"
|
||||
|
||||
class Assets;
|
||||
class Level;
|
||||
@@ -13,32 +14,6 @@ namespace gui {
|
||||
class GUI;
|
||||
}
|
||||
|
||||
struct EngineSettings {
|
||||
/* Window width (pixels) */
|
||||
int displayWidth;
|
||||
/* Window height (pixels) */
|
||||
int displayHeight;
|
||||
/* Anti-aliasing samples */
|
||||
int displaySamples;
|
||||
/* GLFW swap interval value, 0 - unlimited fps, 1 - vsync*/
|
||||
int displaySwapInterval;
|
||||
/* Window title */
|
||||
const char* displayTitle;
|
||||
/* Max milliseconds that engine uses for chunks loading only */
|
||||
uint chunksLoadSpeed;
|
||||
/* Radius of chunks loading zone (chunk is unit) */
|
||||
uint chunksLoadDistance;
|
||||
/* Buffer zone where chunks are not unloading (chunk is unit)*/
|
||||
uint chunksPadding;
|
||||
/* Fog opacity is calculated as `pow(depth*k, fogCurve)` where k depends on chunksLoadDistance.
|
||||
Use values in range [1.0 - 2.0] where 1.0 is linear, 2.0 is quadratic
|
||||
*/
|
||||
float fogCurve;
|
||||
};
|
||||
|
||||
void load_settings(EngineSettings& settings, std::string filename);
|
||||
void save_settings(EngineSettings& settings, std::string filename);
|
||||
|
||||
class initialize_error : public std::runtime_error {
|
||||
public:
|
||||
initialize_error(const std::string& message) : std::runtime_error(message) {}
|
||||
|
||||
Reference in New Issue
Block a user