source/Game.cpp: use PlatformApplication::create()
This commit is contained in:
parent
b91b9f3768
commit
2eec1c9f75
1 changed files with 3 additions and 12 deletions
|
|
@ -4,27 +4,18 @@
|
|||
#include <Spectre/Game/FPSCounter.h>
|
||||
#include <Spectre/Input/InputModule.h>
|
||||
#include <Spectre/System/MessageHandler.h>
|
||||
#include <Spectre/System/MessageQueue.h>
|
||||
#include <Spectre/Game.h>
|
||||
|
||||
#include <Platform/PlatformApplication.h>
|
||||
#include <Platform/PlatformMisc.h>
|
||||
|
||||
// TODO: move this to Application::create()
|
||||
#ifdef _WIN32
|
||||
#include <Platform/Win32/Win32Application.h>
|
||||
typedef sp::Win32Application ApplicationType;
|
||||
#elif defined(__linux__) || defined(unix) || defined(__unix) || defined(__unix__)
|
||||
#include <Platform/Unix/UnixApplication.h>
|
||||
typedef sp::UnixApplication ApplicationType;
|
||||
#else
|
||||
#error "No Application implementation exists"
|
||||
#endif
|
||||
|
||||
namespace sp {
|
||||
|
||||
Game::Game() :
|
||||
m_running(false)
|
||||
{
|
||||
m_platform = new ApplicationType();
|
||||
m_platform = PlatformApplication::create();
|
||||
m_graphics = new Graphics(m_platform);
|
||||
m_input = new InputModule(&m_platform->getInput());
|
||||
m_messageHandler = new MessageHandler();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue