int main(int argc, char** argv) { glutInit(&argc, argv); cameraX = 0; cameraY = 30; cameraZ = 150; eyeX = 0; eyeY = 0; eyeZ = 0; lastLevel = 0; cameraAcceleration = 0.1; timerTime = 2 * 1000; lastLevel += ((rand() % 10) + 40); jump = false; characterSpeed = 0.8; jumpTime = clock(); jumpBeginY = clock(); /* int x = ((rand() % 10) + 45); int direction = ((rand() % 10) - 15);*/ int x = ((rand() % 10) + 705); int direction = 0; character.x = direction; character.y = lastLevel + 5; Level level1 = *new Level(x, lastLevel, direction); level1.levelBefore = new Level(-1000021, -111, 0); Levels.push_back(level1); character.setLevel(level1); glutInitWindowSize(800, 1000); glutInitWindowPosition(50, 50); glutCreateWindow("Icy Tower"); glutDisplayFunc(Display); glutIdleFunc(Anim); glutKeyboardFunc(key); glutMouseFunc(Mouse); glutTimerFunc(0, Timer, 0); glutTimerFunc(0, Timer2, 0); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH); glClearColor(1.0f, 1.0f, 1.0f, 0.0f); glEnable(GL_DEPTH_TEST); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glEnable(GL_LIGHT1); glEnable(GL_NORMALIZE); glEnable(GL_COLOR_MATERIAL); glShadeModel(GL_SMOOTH); character.c.Load("Models/character.3ds"); banana.Load("Models/banana.3ds"); level.Load("Textures/brick3.bmp"); skyFront.Load("Textures/brick.bmp"); skyBack.Load("Textures/brick.bmp"); skyLeft.Load("Textures/brick2.bmp"); skyRight.Load("Textures/brick2.bmp"); skyUp.Load("Textures/brick.bmp"); skyDown.Load("Textures/grass2.bmp"); glutMainLoop(); }