Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Splash Header

By: a guest on Aug 7th, 2012  |  syntax: C++  |  size: 0.73 KB  |  views: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // Splash screen for my game
  2.  
  3. #ifndef _SPLASH_H_
  4. #define _SPLASH_H_
  5.  
  6. #include "SDL/SDL.h"
  7. #include "SDL/SDL_image.h"
  8. #include "SDL/SDL_ttf.h"
  9. #include "gamestate.h"
  10. #include "image.h"
  11. #include "particle.h"
  12.  
  13. extern bool running;
  14. extern bool changeStates;
  15. extern SDL_Surface* gameScreen;
  16. extern Gamestate* nextState;
  17.  
  18. using namespace std;
  19.  
  20. class Splash : public Gamestate{
  21.         private: // Variables
  22.                 SDL_Rect background;
  23.                 Uint32 whiteColor;
  24.                 Emitter *ps;
  25.         public: // The default methods for the gameloop
  26.                 Splash(){ps = new Emitter(100, 100, 100, "data/particle.png", "data/dot.png");};
  27.                 ~Splash(){delete ps;};
  28.                 bool Init();
  29.                 void Event(SDL_Event* Event);
  30.                 void Loop();
  31.                 void Render();
  32.                 void Cleanup();
  33. };
  34.  
  35. #endif