2016-10-16 19:21:50 +02:00
|
|
|
#ifndef RWGAME_GAMEBASE_HPP
|
|
|
|
#define RWGAME_GAMEBASE_HPP
|
2018-12-09 22:43:42 +01:00
|
|
|
|
2016-10-16 19:21:50 +02:00
|
|
|
#include "GameWindow.hpp"
|
2018-12-12 18:51:04 +01:00
|
|
|
#include "RWConfig.hpp"
|
2016-10-16 19:21:50 +02:00
|
|
|
|
2018-12-09 22:43:42 +01:00
|
|
|
#include <boost/program_options.hpp>
|
2016-10-16 19:21:50 +02:00
|
|
|
|
2018-12-09 22:43:42 +01:00
|
|
|
class Logger;
|
2016-10-16 19:21:50 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Handles basic window and setup
|
|
|
|
*/
|
|
|
|
class GameBase {
|
|
|
|
public:
|
2018-12-12 18:51:04 +01:00
|
|
|
GameBase(Logger& inlog, const std::optional<RWArgConfigLayer> &args);
|
2018-01-01 04:21:58 +01:00
|
|
|
|
|
|
|
virtual ~GameBase() = 0;
|
2016-10-16 19:21:50 +02:00
|
|
|
|
|
|
|
GameWindow& getWindow() {
|
|
|
|
return window;
|
|
|
|
}
|
|
|
|
|
2018-12-12 18:51:04 +01:00
|
|
|
const RWConfig& getConfig() const {
|
2016-10-16 19:21:50 +02:00
|
|
|
return config;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
2018-12-12 18:51:04 +01:00
|
|
|
RWConfig buildConfig(const std::optional<RWArgConfigLayer> &args);
|
2016-10-16 19:21:50 +02:00
|
|
|
Logger& log;
|
2018-05-19 23:55:27 +02:00
|
|
|
GameWindow window{};
|
2018-12-12 18:51:04 +01:00
|
|
|
RWConfig config{};
|
2016-10-16 19:21:50 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|