From a55903b8784df7c7033983212ca974e472c51dbf Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 11 Sep 2015 22:34:39 -0400 Subject: basic layered worlds :) --- include/World.h | 6 ++++++ include/common.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/World.h b/include/World.h index 08ecabb..91eb81e 100644 --- a/include/World.h +++ b/include/World.h @@ -6,6 +6,8 @@ #define goWorldLeft(w) if(w->toLeft){w=w->toLeft;} #define goWorldRight(w) if(w->toRight){w=w->toRight;} +#define LAYER_SCALE 1 + class World { private: struct line_t { @@ -13,7 +15,9 @@ private: double start; // Where to change to dirt, going down (y) } __attribute__ ((packed)) *line; unsigned int lineCount; + bool root; public: + World *behind,*infront; World *toLeft,*toRight; World(void); World(const float width,World *l,World *r); @@ -22,6 +26,8 @@ public: float getWidth(void); void saveToFile(FILE *f,World *parent); void loadFromFile(FILE *f,World *parent); + void addLayer(void); + void setRoot(void); }; #endif // WORLD_H diff --git a/include/common.h b/include/common.h index 2a6d66b..559bfd2 100644 --- a/include/common.h +++ b/include/common.h @@ -16,7 +16,7 @@ typedef struct{float x; float y;}vec2; #define SCREEN_WIDTH 1280 #define SCREEN_HEIGHT 800 -#define FULLSCREEN +//#define FULLSCREEN #define HLINE (2.0f / (SCREEN_WIDTH / 4)) -- cgit v1.2.3