File: drawer.h

package info (click to toggle)
rafkill 1.2.2-3.3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 13,268 kB
  • sloc: cpp: 13,508; makefile: 64; sh: 14
file content (72 lines) | stat: -rw-r--r-- 1,239 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef _drawer_h
#define _drawer_h

#include <vector>
#include "bitmap.h"

using namespace std;

class SpaceObject;
class PlayerObject;
class ExplosionClass;

const int MAX_WARNING_SHADE = 40;
const int MAX_ATTRIBUTE_COLOR = 100;

/* Drawer:
 * Draws all the objects and everything you see on the screen
 */
class Drawer{
public:

	Drawer();

	void Draw( const vector< SpaceObject * > * objects, const SpaceObject * player, ExplosionClass ** expl, int MAX_EXPL );
	void fadeToBlack( int num );

	inline void setDrawTrans(){
		drawTrans = true;
	}

	inline void setDrawSolid(){
		drawTrans = false;
	}

	inline void setDrawLand(bool value){
		draw_land = value;
	}

	~Drawer();

protected:

	void drawHud( const PlayerObject * player );
	void showAttribute( int amount, int MAX, int start_x, int offset, int * shade );
	void drawLand( int view, int y1 );

	Bitmap * loadLand();

protected:
	int land_counter;
	Bitmap * work;
	Bitmap * radar;
	Bitmap * land;
	Bitmap * transBuffer;

	int warning_shade[ MAX_WARNING_SHADE ];
	int warning_shade_color;

	int view_port;

	int level_speech;

	int shade_energy[ MAX_ATTRIBUTE_COLOR ];
	int shade_shield[ MAX_ATTRIBUTE_COLOR ];

	bool draw_land;
	bool drawTrans;

	// Bitmap * Screen;
};

#endif