World


Description

World.h contains functions to create and draw worlds, and provide basic object detection.


The standard form of world generation in World.h is an array of randomly sized vertical lines. The width of each line is defined as a single HLINE, a macro defined in common.h. ...

class World

private:
struct line_t {
float start;
} *line;
unsigned int lineCount;
public:
World(float width);
void draw(void);
void detect(vec2 *v,const float width);