File: pool.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 (68 lines) | stat: -rw-r--r-- 1,304 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
#ifndef _pool_h
#define _pool_h

#ifndef _real_h
#	include "real.h"
#endif
#ifndef _billard_h
#	include "billard.h"
#endif

class Pocket;
class PocketConnector;

class Pool : public Billard {
	public:
		static Real TableWidth;
		static Real TableHeight;

	public:
		Pool(double dx=TableWidth, double dy=TableHeight);
		virtual ~Pool();

		void InitArea( double wx, double wy );
		void InitTable( double Rad = 0.0 );
		virtual void InitPlayground();
		virtual void DrawBackground() const;

		virtual int SelectTable( int col );

		virtual const Real & GetNormalBallSize() 		const;

		virtual void ResetGame();
		virtual void InPocket( Ball *b );
		virtual void AllBallsStopped();
		virtual int  IsSelectable(Ball *b);

	protected:
		Pocket				*p[6];
		Ball					*cueball;
		Vec2					cuedef;				// Default for cueball
		Vec2					tridef;				// Triangle-Position

		int	cue_in_pocket;

		void Triangle( double x, double y );
						 Real po;					// Offset von KeeperLine

		ColorId		cue_col;
		ColorId		pocket_col;

	private:
		static const int  nPockets;

		PocketConnector	*pcon;


	public:
		static Real Offset;
		static Real PocketRadius;
		static Real BallRadius;
		static Real EdgeRadius;
		static Real EdgeAngle;
		static Real MidAngle;
		static Real	PocketHeight;
		static Real PocketFrame;
};

#endif