summaryrefslogtreecommitdiff
path: root/sim.hpp
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-11 14:21:18 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-11 14:21:18 -0500
commitb9721dc1fe7975ab8015ac240981dbe426c073b3 (patch)
treedbf8a4a60c11575fe0be81f428a16bd196cba8c4 /sim.hpp
parentbdb6a983a84995c144e7452cb4052de2b649577c (diff)
editor fully working
Diffstat (limited to 'sim.hpp')
-rw-r--r--sim.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/sim.hpp b/sim.hpp
index bbcc6e8..3f6c025 100644
--- a/sim.hpp
+++ b/sim.hpp
@@ -133,7 +133,7 @@ typedef struct {
float start_angle;
v2 center;
- float size;
+ float radius; // half of the width of the platform
float angle;
bool moves; // does this platform move?
@@ -166,6 +166,7 @@ typedef struct {
bool initialized;
float win_width, win_height; // width,height of window in pixels
+ float aspect_ratio; // width / height
v2 mouse_pos; // mouse position in Box2D (not GL) coordinates
bool shift, ctrl; // is either shift/ctrl key down?
@@ -190,10 +191,16 @@ typedef struct {
b2World *world; // Box2D world
Ball ball;
+ float furthest_ball_x_pos; // furthest distance the ball has reached
+ float stuck_time; // amount of time furthest_ball_x_pos hasn't changed for
+
float bottom_y; // y-position of "floor" (if y goes below here, it's over)
float left_x; // y-position of left wall
+ v2 pan; // pan for the editor
+
Font font;
+ Font small_font;
Platform platform_building; // the platform the user is currently placing