/*! -------------------------------------------------------------------- \file main.cpp \brief Main application function \author Roy Thompson \date 2002-11-09 // ------------------------------------------------------------------*/ #ifndef IGNORE_DEPEND #include #include #endif #include "main.h" #include "game.h" //--------------------------------------------------------------------- // main // //! main application function // //--------------------------------------------------------------------- int main (int argc, char** argv) { // initialize glut rendering glutInit(&argc, argv); // check for level description file argument if (argc < 2) { cerr << endl << " USAGE: " << argv[0] << " " << endl << " (please provide a level description file to load)" << endl << endl; return 1; } bool soundOn = true; if (argc > 2) { if (strcmp(argv[2], "-nosound") == 0) { soundOn = false; } } // create the game and initialize Game game; if (!game.Init(argv[1], soundOn)) { cerr << "Error Initializing game." << endl; return 1; } // enter the game loop game.Run(); return 0; // everything went OK }