World of Might and Magic
0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
GameFactory.cpp
См. документацию.
1
#include "
src/Application/GameFactory.h
"
2
3
#include "
src/Application/Configuration.h
"
4
#include "
src/Application/Game.h
"
5
6
using
Application::GameFactory
;
7
using
Application::Configuration
;
8
using
Application::Game
;
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
src
Application
GameFactory.cpp
Документация по World of Might and Magic. Последние изменения: Вт 7 Апр 2020 22:03:45. Создано системой
1.8.17