summaryrefslogtreecommitdiff
path: root/noncore/games/zlines/linesboard.h
authorzecke <zecke>2004-02-17 16:24:32 (UTC)
committer zecke <zecke>2004-02-17 16:24:32 (UTC)
commit62b3979c6b23627eeca3b89f6feb491cdab97b08 (patch) (unidiff)
tree8545969e2a2bf63a618b50e4b0d8fbf7f73bedbd /noncore/games/zlines/linesboard.h
parent1207607ebbc59841718b79508fc222cb4eee9fde (diff)
downloadopie-62b3979c6b23627eeca3b89f6feb491cdab97b08.zip
opie-62b3979c6b23627eeca3b89f6feb491cdab97b08.tar.gz
opie-62b3979c6b23627eeca3b89f6feb491cdab97b08.tar.bz2
Add the zLines port to Opie
Diffstat (limited to 'noncore/games/zlines/linesboard.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/zlines/linesboard.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/noncore/games/zlines/linesboard.h b/noncore/games/zlines/linesboard.h
new file mode 100644
index 0000000..97697cd
--- a/dev/null
+++ b/noncore/games/zlines/linesboard.h
@@ -0,0 +1,103 @@
1/***************************************************************************
2 linesboard.h - description
3 -------------------
4 begin : Fri May 19 2000
5 copyright : (C) 2000 by Roman Merzlyakov
6 email : roman@sbrf.barrt.ru
7 copyright : (C) 2000 by Roman Razilov
8 email : Roman.Razilov@gmx.de
9 ***************************************************************************/
10
11/***************************************************************************
12 * *
13 * This program is free software; you can redistribute it and/or modify *
14 * it under the terms of the GNU General Public License as published by *
15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. *
17 * *
18 ***************************************************************************/
19#ifndef __linesboard_h
20#define __linesboard_h
21
22#include <qwidget.h>
23#include <qpixmap.h>
24#include <qtimer.h>
25
26#include "field.h"
27//#include "shotcounter.h"
28#include "ballpainter.h"
29
30#ifdef Q_WS_QWS
31 #define debug (void)
32#else
33 #define debug qDebug
34#endif
35#define fatal qFatal
36#define warning qWarning
37
38class LinesBoard : public Field
39{
40 Q_OBJECT
41public:
42 LinesBoard( BallPainter * abPainter, QWidget* parent=0, const char* name=0 );
43 ~LinesBoard();
44
45 int width();
46 int height();
47 int wHint();
48 int hHint();
49// void doAfterBalls();
50 void placeBalls(int nextBalls[BALLSDROP]);
51 void undo();
52
53signals:
54 void endTurn();
55 void endGame();
56 void eraseLine(int nb);
57
58private:
59 int anim;
60
61 struct Waypoints {
62 int x,y;
63 } *way;
64 int nextBalls[BALLSDROP];
65
66 int animmax;
67
68 //used for running and animation phase
69 int painting;
70 int animstep;
71 int animdelaycount;
72 int animdelaystart;
73 int direction;
74
75
76 int nextBallToPlace;
77 int jumpingCol;
78 int jumpingRow;
79
80
81 QTimer* timer;
82// ShotCounter* shCounter;
83 BallPainter* bPainter;
84
85 void paintEvent( QPaintEvent* );
86 void mousePressEvent( QMouseEvent* );
87
88 void AnimStart(int panim);
89 void AnimNext();
90 int AnimEnd();
91 int getAnim(int x, int y ); // returns if the specifyed cell is animated..
92 void AnimJump( int col, int row );
93
94 int erase5Balls();
95 bool existPath(int ax, int ay, int bx, int by);
96 void placeBall();
97
98protected slots:
99 void timerSlot();
100
101};
102
103#endif