World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
GameFactory.cpp
См. документацию.
2 
4 #include "src/Application/Game.h"
5 
9 
10 std::shared_ptr<const Configuration> GameFactory::CreateConfiguration(const std::string &command_line) {
11  auto config = std::make_shared<Configuration>();
12  config->command_line = command_line;
13 
14  return config;
15 }
16 
17 std::shared_ptr<Game> GameFactory::CreateGame(const std::string &command_line) {
18  auto config = CreateConfiguration(command_line);
19 
20  auto game = std::make_shared<Game>();
21  if (game) {
22  if (game->Configure(config)) {
23  return game;
24  }
25  }
26  return nullptr;
27 }
Game.h
GameFactory.h
Configuration.h
Application::GameFactory
Definition: GameFactory.h:10
Application::GameFactory::CreateConfiguration
std::shared_ptr< const Configuration > CreateConfiguration(const std::string &command_line)
Definition: GameFactory.cpp:10
Application::Game
Definition: Game.h:19
Application::GameFactory::CreateGame
std::shared_ptr< Game > CreateGame(const std::string &command_line)
Definition: GameFactory.cpp:17
string
GLsizei const GLchar *const * string
Definition: SDL_opengl_glext.h:691
Application::config
ApplicationConfig config
Definition: Application.h:21
Application::Configuration
Definition: Configuration.h:7
config
EGLConfig config
Definition: SDL_egl.h:1149