* final merge fixes
This commit is contained in:
parent
648d7999c8
commit
14dc7ff4ed
4 changed files with 19 additions and 1 deletions
|
@ -7,6 +7,14 @@
|
|||
|
||||
#include "game.hpp"
|
||||
|
||||
#include "state/trace.hpp"
|
||||
#include "state/object.hpp"
|
||||
#include "state/missile.hpp"
|
||||
#include "state/player.hpp"
|
||||
#include "state/planet.hpp"
|
||||
#include "state/ship.hpp"
|
||||
#include "state/explosion.hpp"
|
||||
|
||||
class GameWindow : public endofthejedi::GLWindow {
|
||||
private:
|
||||
Game* m_game;
|
||||
|
|
|
@ -118,6 +118,14 @@ void endofthejedi::GLWindow::poll() {
|
|||
sleeptime = sleeptime - (unsigned int)(sleeptime/1000.0);
|
||||
}
|
||||
}
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC_RAW, ¤t);
|
||||
delta = diff(prev, current).tv_nsec;
|
||||
prev = current;
|
||||
if(delta > 0.0) {
|
||||
m_fps = (1000000000.0/delta);
|
||||
//std::cout << m_fps << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
void endofthejedi::GLWindow::stop() { m_running = false; }
|
||||
|
|
|
@ -4,9 +4,9 @@ void endofthejedi::RendererSimple::drawCircle(float x, float y, float radius,
|
|||
float r, float g, float b,
|
||||
int numSides) {
|
||||
glBegin(GL_TRIANGLE_FAN);
|
||||
glColor3f(r, g, b);
|
||||
glVertex2f(x, y); // center of circle
|
||||
for (int i = 0; i <= numSides; i++) {
|
||||
glColor3f(r, g, b);
|
||||
glVertex2f(x + (radius * cos(i * 2 * M_PI / numSides)),
|
||||
y + (radius * sin(i * 2 * M_PI / numSides)));
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#define ASIO_STANDALONE
|
||||
|
||||
#include "session.hpp"
|
||||
#include "game.hpp"
|
||||
#include "state/commands.hpp"
|
||||
|
|
Loading…
Reference in a new issue