1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-10-05 08:37:20 +02:00
openrw/rwgame/game.hpp
Daniel Evans ba7eb63941 Refactor and cleanup camera control.
rwengine
+ Make renderWorld() take a ViewCamera parameter.
+ add rotation and getView to ViewCamera
+ correct directions for vehicle and character movement.

rwgame
+ Remove GenericState
+ Add State::getCamera() to control the ViewCamera used for rendering
+ Clean up state camera control
+ Remove now unused view parameters from main
2014-08-12 21:15:26 +01:00

28 lines
640 B
C++

#ifndef GAME_HPP
#define GAME_HPP
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <engine/GameObject.hpp>
#include <engine/GameWorld.hpp>
constexpr double PiOver180 = 3.1415926535897932384626433832795028/180;
// TODO: Move all of this stuff so it's not just lying around.
bool hitWorldRay(glm::vec3& hit, glm::vec3& normal, GameObject** object = nullptr);
bool hitWorldRay(const glm::vec3& start, const glm::vec3& direction,
glm::vec3& hit, glm::vec3& normal, GameObject** object = nullptr);
sf::Window& getWindow();
GameWorld* getWorld();
sf::Font& getFont();
void skipTime(float time);
#endif // GAME_HPP