From a075f1b6c2c65570ab7b249b12efefcfcc442e95 Mon Sep 17 00:00:00 2001 From: drumsetmonkey Date: Tue, 10 Nov 2015 08:38:30 -0500 Subject: Added spawn world --- include/world.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/world.h b/include/world.h index 9d7a33b..48ca47b 100644 --- a/include/world.h +++ b/include/world.h @@ -4,6 +4,11 @@ #include // For HLINE, vec2, OpenGL utilities, etc. #include +#define GEN_INC 10 // Defines at what interval y values should be calculated for the array 'line'. + // As explained in World(), the last few lines in the array 'line' are incorrectly calculated + // or not calculated at all, so GEN_INC is also used to decrease 'lineCount' in functions like draw() + // and detect(). + struct line_t { bool gs; float y,gh[2]; @@ -95,7 +100,7 @@ public: */ virtual void generate(unsigned int width); - void generateFunc(unsigned int width,unsigned int (*func)(unsigned int)); + void generateFunc(unsigned int width,float(*func)(float)); /* * Looks for the furthest back layer in this world and adds a new layer of width `width` behind it. -- cgit v1.2.3