00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
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
00042 Screen* screen = Screen::instance();
00043 glfuncs* f = glfuncs::instance();
00044
00045
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
00057
00058
00059
00060
00061
00062
00063
00064
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 }