World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
EngineFactory.cpp
См. документацию.
1 #include "Engine/EngineFactory.h"
2 
4 
5 
9 
10 
11 std::shared_ptr<Engine> EngineFactory::CreateEngine(const std::string &command_line) {
12  EngineConfigFactory engineConfigFactory;
13  auto config = engineConfigFactory.CreateFromCommandLine(command_line);
14 
15  auto engine = std::make_shared<Engine>();
16  if (engine) {
17  if (engine->Configure(config)) {
18  return engine;
19  }
20  }
21  return nullptr;
22 }
Engine_::EngineConfig
Definition: EngineConfig.h:35
Engine_::EngineConfigFactory::CreateFromCommandLine
std::shared_ptr< EngineConfig > CreateFromCommandLine(const std::string &cmd)
Definition: EngineConfigFactory.cpp:87
engine
std::shared_ptr< Engine > engine
Definition: Engine.cpp:130
EngineFactory.h
EngineConfigFactory.h
Engine_::EngineFactory
Definition: EngineFactory.h:11
Engine_::EngineConfigFactory
Definition: EngineConfigFactory.h:15
string
GLsizei const GLchar *const * string
Definition: SDL_opengl_glext.h:691
config
EGLConfig config
Definition: SDL_egl.h:1149