diff options
Diffstat (limited to 'include/World.h')
-rw-r--r-- | include/World.h | 64 |
1 files changed, 23 insertions, 41 deletions
diff --git a/include/World.h b/include/World.h index dd133b9..d8440a0 100644 --- a/include/World.h +++ b/include/World.h @@ -1,42 +1,24 @@ -<<<<<<< HEAD -#ifndef WORLD_H -#define WORLD_H - -#include <common.h> - -class World { -private: - struct line_t { - // x = 2.0 (window width) / HLINES - float start; // Where to change to dirt, going down (y) - } *line; - unsigned int lineCount; -public: - World(float width); - void draw(void); -}; - +#ifndef WORLD_H
+#define WORLD_H
+
+#include <common.h>
+
+#define goWorldLeft(w) if(w->toLeft){w=w->toLeft;}
+#define goWorldRight(w) if(w->toRight){w=w->toRight;}
+
+class World {
+private:
+ struct line_t {
+ // x = 2.0 (window width) / HLINES
+ double start; // Where to change to dirt, going down (y)
+ } *line;
+ unsigned int lineCount;
+public:
+ World *toLeft,*toRight;
+ World(void);
+ World(const float width,World *l,World *r);
+ void draw(void);
+ void detect(vec2 *v,const float width);
+};
+
#endif // WORLD_H -======= -#ifndef WORLD_H -#define WORLD_H - -#include <common.h> - -#define HLINE (2.0f/(SCREEN_WIDTH/4)) - -class World { -private: - struct line_t { - // x = 2.0 (window width) / HLINES - double start; // Where to change to dirt, going down (y) - } *line; - unsigned int lineCount; -public: - World(float width); - void draw(void); - void detect(vec2 *v,const float width); -}; - -#endif // WORLD_H ->>>>>>> origin/master |