1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-18 16:32:32 +02:00
openrw/rwgame/ingamestate.hpp
Daniel Evans 868883fd36 Add Debugger functionality
* Include Angluar JS for UI
* Improve styling slightly
* Add Interrupt/Continue buttons and api URLs
* List of threads when game is paused
2015-07-03 02:52:43 +01:00

57 lines
1.1 KiB
C++

#ifndef INGAMESTATE_HPP
#define INGAMESTATE_HPP
#include "State.hpp"
class PlayerController;
class IngameState : public State
{
enum CameraMode
{
CAMERA_CLOSE = 0,
CAMERA_NORMAL = 1,
CAMERA_FAR = 2,
CAMERA_TOPDOWN = 3,
/** Used for counting - not a valid camera mode */
CAMERA_MAX
};
bool started;
std::string save;
bool newgame;
ViewCamera _look;
/** Player input */
glm::vec3 _movement;
glm::vec3 cameraPosition;
/** Timer to hold user camera position */
float autolookTimer;
CameraMode camMode;
public:
/**
* @brief IngameState
* @param game
* @param newgame
* @param game An empty string, a save game to load, or the string "test".
*/
IngameState(RWGame* game, bool newgame = true, const std::string& save = "");
void startTest();
void startGame();
virtual void enter();
virtual void exit();
virtual void tick(float dt);
virtual void draw(GameRenderer* r);
virtual void handleEvent(const sf::Event& event);
virtual void handlePlayerInput(const sf::Event& event);
virtual bool shouldWorldUpdate();
const ViewCamera& getCamera();
};
#endif // INGAMESTATE_HPP