5 #ifndef __RD_GAME_SCREEN_HPP__
6 #define __RD_GAME_SCREEN_HPP__
18 #include "ImageManager.hpp"
33 virtual bool cleanup();
34 virtual bool drawScreen(
void *screen);
36 virtual bool update(
const std::string & parameter,
const std::string & value);
37 virtual bool update(
const std::string & parameter,
const Player & value);
38 virtual bool update(
const std::string & parameter,
const std::vector<Player> & value);
39 virtual bool update(
const std::string & parameter,
const std::vector<Target> & value);
40 virtual bool update(
const std::string & parameter,
const Weapon & value);
41 virtual bool update(
const std::string & parameter,
const Image & value);
44 static const std::string PARAM_CAMERA_FRAME;
45 static const std::string PARAM_MYSELF;
46 static const std::string PARAM_PLAYERS;
47 static const std::string PARAM_TARGETS;
48 static const std::string PARAM_WEAPON;
51 bool drawUserUI(SDL_Surface * screen,
const Player & user,
const Weapon & weapon);
52 bool drawPlayerUI( SDL_Surface * screen,
const Player & player,
int x,
int y);
53 bool drawTargetUI( SDL_Surface * screen,
const Target & target,
const Player & player_data);
54 bool drawScope( SDL_Surface * screen );
59 static const int SCREEN_HEIGHT = 480;
62 static const int PLAYER_NAME_H = 15;
63 static const int PLAYER_NAME_W = 65;
64 static const int HEALTH_BAR_H = 10;
65 static const int HEALTH_BAR_W = 80;
68 static const int TARGET_THICKNESS = 2;
69 static const int TARGET_TEXT_BOX_HEIGHT = 15;
70 static const int TARGET_HEALTH_BAR_H = 5;
73 static const int SCOPE_VERT_W = 4;
74 static const int SCOPE_VERT_H = 50;
75 static const int SCOPE_VERT_H_SPACE = 20;
77 static const int SCOPE_HORIZ_W = 50;
78 static const int SCOPE_HORIZ_H = 4;
79 static const int SCOPE_HORIZ_W_SPACE = 20;
82 static const int USER_HEALTH_MARGIN_X = 10;
83 static const int USER_HEALTH_MARGIN_Y = 20;
84 static const int USER_HEALTH_W = 20;
85 static const int USER_HEALTH_BOTTOM_Y = 50;
87 static const int AMMO_BAR_MARGIN_X =20;
88 static const int AMMO_BAR_MARGIN_Y = 20;
89 static const int AMMO_BAR_W = 200;
90 static const int AMMO_BAR_H = 15;
92 static const int WEAPON_NAME_WIDTH = 100;
93 static const int WEAPON_NAME_HEIGHT = 10;
95 static const int AMMO_TEXT_WIDTH = 50;
96 static const int AMMO_TEXT_HEIGHT = 10;
102 SDL_Surface * camera_frame_surface;
103 TTF_Font *player_font, *target_font, *weapon_font;
105 static const SDL_Color greencolor;
106 static const SDL_Color redcolor;
107 static const SDL_Color bluecolor;
110 std::vector<Player> players;
111 std::vector<Target> targets;
119 #endif //-- __RD_GAME_SCREEN_HPP__