00001 #ifndef _PERIHELION_
00002 #define _PERIHELION_
00003
00004 #include <SDL.h>
00005
00006 #include <string>
00007
00008 using namespace std;
00009
00010 #include "graphics.h"
00011 #include "sound.h"
00012
00019 class Perihelion {
00020 public:
00021 enum screens{START, NEW_PLAYER, CONTINUE, PREFERENCES};
00022 enum colors{RED, BLUE, GREEN, YELLOW};
00023 enum races{PANTYCIAN};
00024
00025 Perihelion();
00026 Perihelion(bool fullscreen);
00027 ~Perihelion();
00028
00029 void runGUI();
00030
00031 private:
00032 Graphics graphics;
00033 Sound sound;
00034
00035 int currentButton;
00036 bool quitProgram;
00037 screens currentScreen;
00038
00039 string playerName;
00040 string serverName;
00041 colors playerColor;
00042 races playerRace;
00043
00044 SDL_Surface* SS;
00045 SDL_Surface* SSButtons;
00046 SDL_Surface* NPS;
00047 SDL_Surface* NPSButtons;
00048 SDL_Surface* NPSColors;
00049 SDL_Surface* CommonButtons;
00050 SDL_Surface* CS;
00051 SDL_Surface* Preferences;
00052
00056 void commonInit();
00057
00058 void draw();
00059
00060 void drawStartS(SDL_Surface* screen);
00061 void drawNewPlayerS(SDL_Surface* screen);
00062 void drawContinueS(SDL_Surface* screen);
00063 void drawPreferencesS(SDL_Surface* screen);
00064
00065 void loadData();
00066
00067 void newGame();
00068
00069 void unloadData();
00070
00071 void processDown();
00072 void processKey(SDL_keysym keysym);
00073 void processLeft();
00074 void processRight();
00075 void processReturn();
00076 void processUp();
00077
00078
00079 void processDownSS();
00080 void processReturnSS();
00081 void processUpSS();
00082
00083
00084 void processDownNPS();
00085 void processLeftNPS();
00086 void processRightNPS();
00087 void processReturnNPS();
00088 void processUpNPS();
00089
00090
00091 void processDownCS();
00092 void processReturnCS();
00093 void processUpCS();
00094
00095
00096 void processDownPS();
00097 void processReturnPS();
00098 void processUpPS();
00099 };
00100
00101 #endif
00102