}\r
glEnd();\r
}\r
+#include <stdio.h>\r
void World::detect(vec2 *v,const float width){\r
unsigned int i;\r
for(i=0;i<lineCount;i++){\r
}else if(v->x+width>(HLINE*i)-1&&v->x+width<(HLINE*i)-1+HLINE){\r
v->x=(HLINE*i)-1-width;\r
}else{\r
- v->y=line[i].start;\r
+ v->y=line[i].start+HLINE/4;\r
}\r
- }else if(v->y>line[i].start+HLINE/2){\r
- v->y-=HLINE/4;\r
+ }else if(v->y>line[i].start+HLINE/4){\r
+ //v->y-=HLINE/8;\r
}\r
}\r
}\r
ui.handleEvents(); // Handle events
player.vel.x = 0;
+ currentWorld->detect(&player.loci,player.width);
//std::cout << player.vel.x << std::endl;
//std::cout << player.velg.y << std::endl;