diff --git a/src/Game.h b/src/Game.h index 15fe7de..a16bab3 100644 --- a/src/Game.h +++ b/src/Game.h @@ -6,8 +6,8 @@ #define WIDTH 1000 #define HEIGHT 500 -#define GROUND_Y 400 -#define SPEC_Y 150 +#define GROUND_Y (HEIGHT * 0.8) +#define SPEC_Y (HEIGHT * 0.3) class Window; class Game { diff --git a/src/Window.cpp b/src/Window.cpp index f87a718..e8cfc15 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -19,8 +19,8 @@ void Window::paintEvent(QPaintEvent *event) { game.draw(output); label->setPixmap(output.scaled(label->size())); update(); - auto now = std::chrono::high_resolution_clock::now(); - auto diff = duration_cast((now - tp)); + auto now = high_resolution_clock::now(); + auto diff = duration_cast((now - tp)); double seconds = double(diff.count()) / 1000. / 1000. / 1000. ; currentFPS = 1 / seconds; tp = now;