File: pool8.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 (80 lines) | stat: -rw-r--r-- 1,632 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
79
80
#ifndef _pool8_h
#define _pool8_h

#ifndef _pool_h
#	include "pool.h"
#endif

class HalfBallMover;

class Pool8 : public Pool {
	public:
		Pool8(double ft);						// Parameter: Tischgr��e in Fu�
		virtual ~Pool8();

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

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

	protected:
		virtual void Triangle( const Vec2 &v );
		ColorId	black_col;
		ColorId	full_col;		// f�r Normal-Mode
		ColorId	half_col;		// f�r Normal-Mode
		ColorId	ball_col[7];	// f�r Deluxe-Mode

		HalfBallMover	*mh;

		Ball	*ball[15];		// 0-6 full // 7 black // 8-15 half
		Vec2	ball_p[15];		// default positions for these balls
		int	balls_in_pocket;
};

class Pool9 : public Pool8 {
	public:
		Pool9( double ft ) : Pool8(ft)	{}
		virtual ~Pool9();

	protected:
		virtual void Triangle( const Vec2 &v );
};

class Pool8Demo : public Pool8 {
	public:
		Pool8Demo( double ft, double s=100.0 ) : Pool8(ft), shot_speed(s)	{}
		virtual ~Pool8Demo();

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

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

	protected:
		Real			shot_speed;

	public:
		static Real	PresetA;
		static Real	SlowGranularity;
};

#ifdef DEBUG
class Pool8Test : public Pool8Demo {
	public:
		Pool8Test( double ft, double s=100.0 ) : Pool8Demo(ft,s)		{}
		virtual ~Pool8Test();
		virtual void InitPlayground();
		virtual void DrawBackground() const;

	private:
		class TestField	*field_queue;

friend class TestField;
};
#endif

#endif