Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // FINDING EMO - AquaticRace.cpp
- //
- // Aquatic Racing mini game code
- //
- // Coded By Richard Scollon
- #include <gl\glut.h>
- #include <gl\gl.h>
- #include <gl\glu.h>
- #include <stdlib.h>
- #include <conio.h>
- #include <stdio.h>
- void DrawMainMenu(void) {
- glClear(GL_COLOR_BUFFER_BIT);
- glColor3f(0.0, 0.0, 0.0);
- glMatrixMode(GL_MODELVIEW);
- glLoadIdentity();
- glEnable (GL_TEXTURE_2D);
- //draw menu splash and attach texture
- glRecti(0,0,800,600);
- glColor3f(1.0f, 1.0f, 1.0f);
- output(400,375,"Press Enter to start a new game");
- output(350,375,"Press L to load game");
- output(300,375,"Press K to view game controls");
- output(250,375,"Press C to view game credits");
- output(200,375,"Press Esc to Exit game");
- }
- void processNormalKeys(unsigned char key, int x, int y) {
- //Exit when user presses Esc
- if (key == 27)
- exit(0);
- //Load newgame menu
- if (key == 13)
- load NewGame.cpp
- //load load game menu
- if (key == "l")
- //open the credits menu
- if (key == "c")
- load Credits.cpp
- //open the controls menu
- if (key == "k")
- load Controls.cpp
- int main(int argc, char **argv)
- {
- glutInit(&argc, argv);
- glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
- glutInitWindowPosition(0,0);
- glutInitWindowSize(600,800);
- glutCreateWindow("Finding Emo");
- glutIgnoreKeyRepeat(1);
- glutKeyboardFunc(processNormalKeys);
- glutDisplayFunc(DrawMainMenu);
- glutMainLoop();
- return(0);
- }
Add Comment
Please, Sign In to add comment