Robot Devastation
DeadScreen.hpp
1 // Authors: see AUTHORS.md at project root.
2 // CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
3 // URL: https://github.com/asrob-uc3m/robotDevastation
4 
5 #ifndef __RD_DEAD_SCREEN_HPP__
6 #define __RD_DEAD_SCREEN_HPP__
7 
8 #include <string>
9 
10 #include <SDL.h>
11 #include <SDL_ttf.h>
12 
13 #include "Screen.hpp"
14 #include "ImageManager.hpp"
15 
16 namespace rd {
17 
23 class DeadScreen : public Screen
24 {
25  public:
26  DeadScreen();
27  virtual bool init();
28  virtual bool cleanup();
29  virtual bool drawScreen(void *screen);
30  virtual ~DeadScreen();
31  virtual bool update(const std::string & parameter, const std::string & value);
32  virtual bool update(const std::string & parameter, const Image & value);
33 
34  //-- Available parameters:
35  static const std::string PARAM_REMAINING_TIME;
36  static const std::string PARAM_LAST_CAMERA_FRAME;
37 
38  protected:
39  static const std::string SKULL_PATH;
40  static const std::string FONT_PATH;
41 
42  private:
43  TTF_Font * font;
44  SDL_Surface * text_surface;
45  SDL_Surface * skull_image;
46  SDL_Surface * camera_frame;
47  static const SDL_Color TEXT_COLOR;
48 
49  std::string remaining_time;
50  Image last_camera_frame;
51 };
52 
53 }
54 
55 #endif // __RD_DEAD_SCREEN_HPP__
rd::DeadScreen
A User Interface.
Definition: DeadScreen.hpp:23
rd
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
rd::Screen
A User Interface.
Definition: Screen.hpp:24