00001 #ifndef _MAIN_H_ 00002 #define _MAIN_H_ 00003 00004 #include <iostream> 00005 #include <vector> 00006 #include <ctime> 00007 #include <string> 00008 using namespace std; 00009 00010 #include "SDL.h" 00011 #include "SDL_ttf.h" 00012 #include "SDL_net.h" 00013 //#include "SDL_thread.h" 00014 #include "tcputil.h" 00015 00016 #include <GL/gl.h> 00017 #include <GL/glu.h> 00018 00019 #include <AL/al.h> 00020 #include <AL/alut.h> 00021 00022 #include "Camera.h" 00023 #include "Config.h" 00024 #include "GLExtensions.h" 00025 #include "LoadScreen.h" 00026 #include "MainMenu.h" 00027 #include "World.h" 00028 00029 bool initializeSDL(); 00030 bool createWindow(string windowName, bool fullScreen = false); 00031 bool toggleFullScreen(); 00032 void initializeGL(); 00033 void resizeOpenGL(); 00034 void renderLoop(); 00035 void renderScene(); 00036 bool isExtensionSupported(string ext); 00037 //int netThreadFunc(void *userData); 00038 //int mainThreadFunc(void *userData); 00039 00040 // globals 00041 int videoFlags; 00042 SDL_Surface *mainWindow = 0; 00043 //Camera camera; 00044 World *world = 0; // holds a pointer to the world 00045 // online play ? 00046 bool online; 00047 //SDL_Thread *netThread = NULL, *mainThread = NULL; 00048 // for SDL_net 00049 SDLNet_SocketSet set; 00050 TCPsocket sock; 00051 bool quitting; 00052 00053 #endif