#define GAME_NAME "Independent Study v.0.2 alpha"
-#define SCREEN_WIDTH 1920
-#define SCREEN_HEIGHT 1080
-#define FULLSCREEN
+#define SCREEN_WIDTH 1280
+#define SCREEN_HEIGHT 720
//#define FULLSCREEN
*
*/
-#define HLINE 3 // 3 as in 3 pixels
+#define HLINE 2 // 3 as in 3 pixels
/*
* Define 'our' random number generation library. Eventually these macros will be replaced
void singleDetect(Entity *e); // Handles an individual entity (gravity n' stuff)
public:
unsigned int lineCount; // Size of the array 'line' (aka the width of the world)
- unsigned int worldWidth;
World *toLeft,*toRight; // Pointers to areas to the left and right of this world. These are made public
// so that they can easily be set without a function.
World *infront;
void addPlatform(float x,float y,float w,float h); // Dynamically adds a platform to the platform array. These will be automatically
// drawn and handled by the world.
void addHole(unsigned int start,unsigned int end); // Create a hole in the world
+
+ int getWidth(void);
};
float worldGetYBase(World *w);
player->ground=false;
}
}
- if(SDL_KEY==SDLK_i)currentWorld=currentWorld->goWorldBack(player); // Go back a layer if possible
+ if(SDL_KEY==SDLK_i){
+ player->vel.y=.5;
+ player->ground=false;
+ currentWorld=currentWorld->goWorldBack(player); // Go back a layer if possible
+ }
if(SDL_KEY==SDLK_k)currentWorld=currentWorld->goWorldFront(player); // Go forward a layer if possible
if(SDL_KEY==SDLK_LSHIFT)player->speed = 3; // Sprint
if(SDL_KEY==SDLK_LCTRL)player->speed = .5;
}
void World::generate(unsigned int width){ // Generates the world and sets all variables contained in the World class.
- worldWidth = width;
unsigned int i;
float inc;
}
}
+int World::getWidth(void){
+ return -x_start;
+}
+
IndoorWorld::IndoorWorld(void){
}