File: billard.h

package info (click to toggle)
flying 6.20-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 752 kB
  • ctags: 1,873
  • sloc: cpp: 10,966; makefile: 189
file content (78 lines) | stat: -rw-r--r-- 1,705 bytes parent folder | download | duplicates (4)
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
73
74
75
76
77
78
#ifndef _billard_h
#define _billard_h

#ifndef _real_h
#	include "real.h"
#endif
#ifndef _game_h
#	include "game.h"
#endif

class ShadedBallMover;		// forward
class Wall;

class Billard : public Game {
	public:
		Billard(double wx, double wy);
		virtual ~Billard();

		virtual const Real & GetPresetA() const;
		virtual const Real & GetPresetHaft() const;
		virtual const Real & GetSlowGranularity() const;

		virtual const Real AreaOffX() const;
		virtual const Real AreaOffY() const;
		virtual const Real AreaWidth() const;
		virtual const Real AreaHeight() const;

		virtual const Real PAreaOffX() const;
		virtual const Real PAreaOffY() const;
		virtual const Real PAreaWidth() const;
		virtual const Real PAreaHeight() const;

		virtual const Real TAreaOffX() const;
		virtual const Real TAreaOffY() const;
		virtual const Real TAreaWidth() const;
		virtual const Real TAreaHeight() const;

		virtual void InitPlayground();
		virtual void DrawBackground() const;

		void InitTable();
		virtual int SelectTable( int col );

	public:
		static Real PresetA;
		static Real PresetHaft;
		static Real SlowGranularity;
		static Real FrameOffset;
		static Real InnerCushion;
		static Real OuterCushion;

	protected:
		void InitArea( double width, double height );
		Real area_off_x;
		Real area_off_y;
		Real area_width;
		Real area_height;

		ShadedBallMover	*m;

		ColorId		table_col;
		ColorId		outer_cushion_col;
		ColorId		inner_cushion_col;
		ColorId		marker_col;

		ColorId		table_line_col;
		ColorId		table_light_col;
		ColorId		table_dark_col;

		void	DrawMarker( const Real &midx, const Real &midy, const Real &ox, const Real &oy ) const;

	private:
		Wall			*w[4];

friend class Konfi;
};

#endif