aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/World.h64
-rw-r--r--include/common.h34
2 files changed, 23 insertions, 75 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
diff --git a/include/common.h b/include/common.h
index 48a068d..df5b6ac 100644
--- a/include/common.h
+++ b/include/common.h
@@ -1,4 +1,3 @@
-<<<<<<< HEAD
#ifndef COMMON_H
#define COMMON_H
@@ -30,36 +29,3 @@ extern SDL_GLContext mainGLContext;
extern bool gameRunning;
#endif // COMMON_H
-=======
-#ifndef COMMON_H
-#define COMMON_H
-
-typedef struct{float x; float y;}vec2;
-
-///THIS FILE IS USED FOR VARIABLES THAT WILL BE ACCESED BY MULTIPLE CLASSES/FILES
-
-#include <iostream>
-#include <cstdlib>
-#include <SDL2/SDL.h>
-#include <SDL2/SDL_image.h>
-#include <SDL2/SDL_opengl.h>
-#include <UIClass.h>
-#include <entities.h>
-#include <World.h>
-
-#define SCREEN_WIDTH 1280
-#define SCREEN_HEIGHT 800
-#define FULLSCREEN
-
-
-
-//SDL VARIABLES
-extern SDL_Window *window;
-extern SDL_Surface *renderSurface;
-extern SDL_GLContext mainGLContext;
-
-//WINODWS VARIABLES
-extern bool gameRunning;
-
-#endif // COMMON_H
->>>>>>> origin/master