1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 03:12:36 +01:00
openrw/rwgame/GameBase.hpp
Anonymous Maarten 8b38fda984 rwgame: merge argument + configuration file parsing + add tests
- 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)
2018-12-28 00:58:10 +01:00

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