mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-07 03:12:36 +01:00
8b38fda984
- definition of arguments an configuration parameters is centralized in rwgame/RWConfig.inc - argument parsing is tested - the try/catch in main is less weird now (imho)
35 lines
618 B
C++
35 lines
618 B
C++
#ifndef RWGAME_GAMEBASE_HPP
|
|
#define RWGAME_GAMEBASE_HPP
|
|
#include "GameWindow.hpp"
|
|
#include "RWConfig.hpp"
|
|
|
|
#include <core/Logger.hpp>
|
|
|
|
#include <map>
|
|
|
|
/**
|
|
* @brief Handles basic window and setup
|
|
*/
|
|
class GameBase {
|
|
public:
|
|
GameBase(Logger& inlog, const std::optional<RWArgConfigLayer> &args);
|
|
|
|
virtual ~GameBase() = 0;
|
|
|
|
GameWindow& getWindow() {
|
|
return window;
|
|
}
|
|
|
|
const RWConfig& getConfig() const {
|
|
return config;
|
|
}
|
|
|
|
protected:
|
|
RWConfig buildConfig(const std::optional<RWArgConfigLayer> &args);
|
|
Logger& log;
|
|
GameWindow window{};
|
|
RWConfig config{};
|
|
};
|
|
|
|
#endif
|