Debian Codegraph @

src/player.h

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 /***************************************************************************
2 player.h - description
3 -------------------
4 begin : Sat Sep 30 2000
5 copyright : (C) 2000 by Waldemar Baraldi
6 email : [email protected]
7 ***************************************************************************/
8
9 /***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18 #ifndef PLAYER_H
19 #define PLAYER_H
20
21 #include "animatedcanvas.h"
22 #include "pipe.h"
23 #include "pipequeue.h"
24 #include "eventstream.h"
25 #include "board.h"
26 #include "score.h"
27
28 class Player : protected AnimatedCanvas{
29
30 public:
31
32 static const int PlayerWidth=88;
33 static const int PlayerHeight=240;
34 static const int StartLives=3;
35 static const int LivesX=10;
36 static const int LivesY=230;
37 static const int LivesWidth=9;
38 static const int LivesHeight=9;
39
40 Player(EventStream * es);
41 virtual ~Player();
42
43 int width();
44 int height();
45
46 void setPos(int x, int y);
47 void setStartRowColumn(int row, int column);
48 void setBoard(Board * bd);
49
50 inline void setRestrictionCoef(unsigned int coef);
51 inline void setFixedCoef(unsigned int coef);
52
53 void incLives();
54 void decLives();
55 unsigned int lives();
56 bool isChanged();
57 void incScore(Bonus bonus);
58 void setRequired(int required);
59 void incRequired(int inc);
60 void decRequired(int dec);
61 unsigned int scoreValue();
62
63 void play();
64 void paint(VideoManager * vm);
65 void tick();
66
67 protected:
68
69 unsigned int nlives;
70 unsigned int rest_coef;
71 unsigned int fixed_coef;
72 int start_row, start_column;
73 bool change;
74 Pointer * pointer;
75 PipeQueue * queue;
76 EventStream * stream;
77 Board * board;
78 Score * score;
79 Score * required;
80 };
81
82 #endif
83