CPreGame.h 967 B

1234567891011121314151617181920212223242526272829303132333435
  1. #include "SDL.h"
  2. #include "CSemiDefHandler.h"
  3. #include "CSemiLodHandler.h"
  4. //struct AnimatedPic
  5. //{
  6. // std::vector<SDL_Surface*> frames;
  7. // ~AnimatedPic()
  8. // {
  9. // for (int i=0;i<frames.size();i++)
  10. // {
  11. // SDL_FreeSurface(frames[i]);
  12. // delete frames[i];
  13. // }
  14. // }
  15. //};
  16. class CPreGame
  17. {
  18. public:
  19. enum EState { //where are we?
  20. mainMenu, ScenarioList
  21. } state;
  22. struct menuItems {
  23. SDL_Surface * background;
  24. CSemiDefHandler *newGame, *loadGame, *highScores,*credits, *quit;
  25. SDL_Rect lNewGame, lLoadGame, lHighScores, lCredits, lQuit;
  26. int highlighted;//0=none; 1=new game; 2=load game; 3=high score; 4=credits; 5=quit
  27. } * ourMainMenu, * newGameManu;
  28. std::string map; //selected map
  29. std::vector<CSemiLodHandler *> handledLods;
  30. CPreGame(); //c-tor
  31. void showMainMenu();
  32. void runLoop(); // runs mainloop of PreGame
  33. void initMainMenu(); //loads components for main menu
  34. void highlightButton(int which, int on);
  35. };