|
|
@ -19,8 +19,6 @@ |
|
|
|
|
|
|
|
#include "game.hpp"
|
|
|
|
#include "resources/string-table.hpp"
|
|
|
|
#include "states/game-state.hpp"
|
|
|
|
#include "states/sandbox-state.hpp"
|
|
|
|
#include "filesystem.hpp"
|
|
|
|
#include "timestamp.hpp"
|
|
|
|
#include "ui/ui.hpp"
|
|
|
@ -70,7 +68,6 @@ |
|
|
|
#include "debug/ansi-escape-codes.hpp"
|
|
|
|
|
|
|
|
Game::Game(int argc, char* argv[]): |
|
|
|
currentState(nullptr), |
|
|
|
window(nullptr) |
|
|
|
{ |
|
|
|
// Determine application name
|
|
|
@ -110,8 +107,6 @@ Game::Game(int argc, char* argv[]): |
|
|
|
eventDispatcher.subscribe<ScheduledFunctionEvent>(this); |
|
|
|
toggleFullscreenDisabled = false; |
|
|
|
|
|
|
|
sandboxState = new SandboxState(this); |
|
|
|
|
|
|
|
float3x3 m1; |
|
|
|
float3x3 m2; |
|
|
|
float3x3 m3 = m1 + m2; |
|
|
@ -129,20 +124,6 @@ Game::~Game() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void Game::changeState(GameState* state) |
|
|
|
{ |
|
|
|
if (currentState != nullptr) |
|
|
|
{ |
|
|
|
currentState->exit(); |
|
|
|
} |
|
|
|
|
|
|
|
currentState = state; |
|
|
|
if (currentState != nullptr) |
|
|
|
{ |
|
|
|
currentState->enter(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
std::string Game::getString(const std::string& name, std::optional<std::size_t> languageIndex) const |
|
|
|
{ |
|
|
|
std::string value; |
|
|
@ -639,20 +620,12 @@ void Game::setup() |
|
|
|
StateMachine::changeState(&splashState); |
|
|
|
#endif
|
|
|
|
} |
|
|
|
|
|
|
|
//changeState(sandboxState);
|
|
|
|
} |
|
|
|
|
|
|
|
void Game::update(float t, float dt) |
|
|
|
{ |
|
|
|
this->time = t; |
|
|
|
|
|
|
|
// Execute current state
|
|
|
|
if (currentState != nullptr) |
|
|
|
{ |
|
|
|
currentState->execute(); |
|
|
|
} |
|
|
|
|
|
|
|
// Update systems
|
|
|
|
systemManager->update(t, dt); |
|
|
|
|
|
|
|