C:/Documents and Settings/jegan/Desktop/projectX/main.cpp

Go to the documentation of this file.
00001 /*
00002  * Small SDL example to demonstrate dynamically loading 
00003  * OpenGL lib and functions
00004  *
00005  * (FYI it was supposed to look like snow in the wind or something...)
00006  *
00007  * Compile with :
00008  * gcc testdyngl.c `sdl-config --libs --cflags` -o testdyngl -DHAVE_OPENGL
00009  *
00010  * You can specify a different OpenGL lib on the command line, i.e. :
00011  * ./testdyngl  /usr/X11R6/lib/libGL.so.1.2
00012  * or
00013  * ./testdyngl  /usr/lib/libGL.so.1.0.4496
00014  *
00015  */
00016 #include <stdio.h>
00017 #include <stdlib.h>
00018 #include <string>
00019 #include <iostream>
00020 
00021 #include "SDL.h"
00022 #include "Person.h"
00023 #include "SDL_image.h"
00024 #include "SDL_mixer.h"
00025 #include "Level.h"
00026 
00027 #include "List.h"
00028 #include "Parser.h"
00029 #include "CollisionHandler.h"
00030 #include "CommandManager.h"
00031 #include "Command.h"
00032 
00033 #include "Screen.h"
00034 #include "Game.h"
00035 #include "Menu.h"
00036 
00037 using namespace std;
00038 
00039 int main(int argc,char *argv[])
00040 {               
00041         // Init SDL video
00042         Screen* screen = Screen::instance();
00043         glfuncs* f = glfuncs::instance();
00044 
00045         //Initialize SDL_mixer
00046     if( Mix_OpenAudio( 22050, MIX_DEFAULT_FORMAT, 2, 512 ) == -1 )
00047     {
00048         return false;    
00049     }
00050 
00051         Mix_AllocateChannels( 16 );
00052 
00053 
00054 
00055         bool leave = false;
00056         /*Game game = Game();
00057 
00058         for(;;)
00059         {
00060                 if( !game.mainLoop() )
00061                         break;
00062                 else
00063                 {
00064                         game.resetLevel();
00065                 }
00066         }*/
00067 
00068         List* menuInfo = Parser::parse("menus/main.txt");
00069         TitleScreenMenu  menu = TitleScreenMenu(menuInfo);
00070         delete menuInfo;
00071         menu.mainLoop();
00072         
00073         SDL_Quit();
00074         return 0;
00075 }

Generated on Fri May 5 00:20:19 2006 for ProjectX by  doxygen 1.4.6-NO