diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/World.h | 63 | ||||
-rw-r--r-- | include/common.h | 96 | ||||
-rw-r--r-- | include/entities.h | 81 |
3 files changed, 163 insertions, 77 deletions
diff --git a/include/World.h b/include/World.h index e405059..dd133b9 100644 --- a/include/World.h +++ b/include/World.h @@ -1,21 +1,42 @@ -#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
+<<<<<<< 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); +}; + +#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 782ebd6..48a068d 100644 --- a/include/common.h +++ b/include/common.h @@ -1,31 +1,65 @@ -#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
+<<<<<<< HEAD +#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 720 +//#define FULLSCREEN + +#define HLINE (2.0f / (SCREEN_WIDTH / 4)) + +//SDL VARIABLES +extern SDL_Window *window; +extern SDL_Surface *renderSurface; +extern SDL_GLContext mainGLContext; + +//WINDOW VARIABLES +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 diff --git a/include/entities.h b/include/entities.h index 3ecf014..89d9ec3 100644 --- a/include/entities.h +++ b/include/entities.h @@ -1,26 +1,57 @@ -#ifndef ENTITIES_H
-#define ENTITIES_H
-
-#include <common.h>
-
-
-class Entities{
-public:
- float width;
- float height;
- float speed;
- int type;
- vec2 loc;
-
- void spawn(float, float);
-
-
-};
-
-class Player : public Entities{
-public:
- Player();
- ~Player();
-};
-
+<<<<<<< HEAD +#ifndef ENTITIES_H +#define ENTITIES_H + +#include <common.h> + + +class Entities{ +public: + float width; + float height; + float speed; + int type; + vec2 loc; + vec2 loci; + vec2 vel; + vec2 velg; + + void spawn(float, float); + + +}; + +class Player : public Entities{ +public: + Player(); + ~Player(); +}; + +======= +#ifndef ENTITIES_H +#define ENTITIES_H + +#include <common.h> + + +class Entities{ +public: + float width; + float height; + float speed; + int type; + vec2 loc; + + void spawn(float, float); + + +}; + +class Player : public Entities{ +public: + Player(); + ~Player(); +}; + +>>>>>>> origin/master #endif //ENTITIES_H
\ No newline at end of file |