Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

/home/rdbrown/doxygen/cse125g1/src/game/client/endgameGS.cpp

00001 #include "endgameGS.h"
00002 #include <iostream>
00003 
00004 #include "textures.h"
00005 #include "ActiveGS.h"
00006 #include "Music.h"
00007 
00008 static GameState *thisGS;
00009 void exitGame()
00010 {
00011         exit(0);
00012 }
00013 void EndGameGS::init() {  
00014         fire = new Fire(TEXTURE_PARTICLE);
00015     thisGS = this;
00016 
00017         InputSetKeyDown(27,exitGame);
00018     // Hook up the startup callback.    
00019     callback = new EndGameGSback(this);
00020     client->setGameCallback(callback);
00021 
00022         //scoreMenu->update();
00023         glutPostRedisplay();
00024         playMusic(1);
00025         // This just starts it now
00026     //cerr << "STARTUP - EndGameGS::init()" << endl;
00027 }
00028 
00029 void EndGameGS::startGame() {
00030     //cerr << "STARTUP - EndGameGS startGame()" << endl;
00031     setGameState(new ActiveGS(client));
00032 }
00033 
00034 void EndGameGS::exit() {
00035     //menuClear();
00036 }
00037 
00038 void EndGameGS::update() {
00039 
00040 }
00041 
00042 void EndGameGS::display() {
00043     //This stuff should probably be done in display
00044         glPushMatrix();
00045         // reset matrix
00046         glLoadIdentity();
00047         fire->draw();
00048         glPopMatrix();
00049 
00050         scoreMenu->render();
00051 
00052         glColor3f(1,0,0);
00053         char * string = "GAME OVER";
00054     glRasterPos2f(500, 500);
00055     for(int i = 0; i < 10; i++) {
00056         glutBitmapCharacter(GLUT_BITMAP_9_BY_15, string[i]);
00057     }
00058     glutSwapBuffers();
00059     //glutPostRedisplay();
00060 
00061 }
00062 
00063 

Generated on Thu Aug 18 16:03:08 2005 for Robin Hood: Thieves & Knights by doxygen1.2.18