-rw-r--r-- | noncore/games/kbill/Game.cc | 0 | ||||
-rw-r--r-- | noncore/games/kbill/Game.h | 2 | ||||
-rw-r--r-- | noncore/games/kbill/field.cpp | 0 | ||||
-rw-r--r-- | noncore/games/kbill/inputbox.cpp | 2 | ||||
-rw-r--r-- | noncore/games/kbill/kbill.h | 2 |
5 files changed, 4 insertions, 2 deletions
diff --git a/noncore/games/kbill/Game.cc b/noncore/games/kbill/Game.cc index 624b50b..4cd5322 100644 --- a/noncore/games/kbill/Game.cc +++ b/noncore/games/kbill/Game.cc | |||
diff --git a/noncore/games/kbill/Game.h b/noncore/games/kbill/Game.h index 4473936..5c9c497 100644 --- a/noncore/games/kbill/Game.h +++ b/noncore/games/kbill/Game.h | |||
@@ -1,55 +1,55 @@ | |||
1 | #ifndef GAME_H | 1 | #ifndef GAME_H |
2 | #define GAME_H | 2 | #define GAME_H |
3 | 3 | ||
4 | #include "objects.h" | 4 | #include "objects.h" |
5 | 5 | ||
6 | class Game { | 6 | class Game { |
7 | unsigned state; | 7 | int state; |
8 | int efficiency; | 8 | int efficiency; |
9 | public: | 9 | public: |
10 | unsigned score, level, iteration; | 10 | unsigned score, level, iteration; |
11 | Picture logo; | 11 | Picture logo; |
12 | int grabbed; | 12 | int grabbed; |
13 | 13 | ||
14 | static const unsigned short scrwidth = 240; | 14 | static const unsigned short scrwidth = 240; |
15 | static const unsigned short scrheight = 290; | 15 | static const unsigned short scrheight = 290; |
16 | 16 | ||
17 | static const int PLAYING = 1; | 17 | static const int PLAYING = 1; |
18 | static const int BETWEEN = 2; | 18 | static const int BETWEEN = 2; |
19 | static const int END = 3; | 19 | static const int END = 3; |
20 | static const int WAITING = 4; | 20 | static const int WAITING = 4; |
21 | 21 | ||
22 | static const int DEFAULTC = 0; /* cursors */ | 22 | static const int DEFAULTC = 0; /* cursors */ |
23 | static const int DOWNC = -1; | 23 | static const int DOWNC = -1; |
24 | static const int BUCKETC = -2; | 24 | static const int BUCKETC = -2; |
25 | 25 | ||
26 | static const int ENDGAME = 200; /* dialog window IDs */ | 26 | static const int ENDGAME = 200; /* dialog window IDs */ |
27 | static const int ENTERNAME = 201; | 27 | static const int ENTERNAME = 201; |
28 | static const int HIGHSCORE = 202; | 28 | static const int HIGHSCORE = 202; |
29 | static const int SCORE = 203; | 29 | static const int SCORE = 203; |
30 | 30 | ||
31 | static const int ENDLEVEL = -1; /* Codes for updating score */ | 31 | static const int ENDLEVEL = -1; /* Codes for updating score */ |
32 | static const int BILLPOINTS = 5; | 32 | static const int BILLPOINTS = 5; |
33 | 33 | ||
34 | static const int EMPTY = -2; /* Grabbed object */ | 34 | static const int EMPTY = -2; /* Grabbed object */ |
35 | static const int BUCKET = -1; | 35 | static const int BUCKET = -1; |
36 | 36 | ||
37 | int RAND(int lb, int ub); | 37 | int RAND(int lb, int ub); |
38 | int MAX(int x, int y); | 38 | int MAX(int x, int y); |
39 | int MIN(int x, int y); | 39 | int MIN(int x, int y); |
40 | int INTERSECT(int x1, int y1, int w1, int h1, int x2, int y2, int w2, | 40 | int INTERSECT(int x1, int y1, int w1, int h1, int x2, int y2, int w2, |
41 | int h2); | 41 | int h2); |
42 | 42 | ||
43 | void setup_level (unsigned int lev); | 43 | void setup_level (unsigned int lev); |
44 | void start(unsigned int lev); | 44 | void start(unsigned int lev); |
45 | void quit(); | 45 | void quit(); |
46 | void update_info(); | 46 | void update_info(); |
47 | void update_score (int action); | 47 | void update_score (int action); |
48 | void warp_to_level (unsigned int lev); | 48 | void warp_to_level (unsigned int lev); |
49 | void button_press(int x, int y); | 49 | void button_press(int x, int y); |
50 | void button_release(int x, int y); | 50 | void button_release(int x, int y); |
51 | void update(); | 51 | void update(); |
52 | void main(int argc, char **argv); | 52 | void main(int argc, char **argv); |
53 | }; | 53 | }; |
54 | 54 | ||
55 | #endif | 55 | #endif |
diff --git a/noncore/games/kbill/field.cpp b/noncore/games/kbill/field.cpp index a974ab2..0dd8d72 100644 --- a/noncore/games/kbill/field.cpp +++ b/noncore/games/kbill/field.cpp | |||
diff --git a/noncore/games/kbill/inputbox.cpp b/noncore/games/kbill/inputbox.cpp index 5087fbb..7aaebe7 100644 --- a/noncore/games/kbill/inputbox.cpp +++ b/noncore/games/kbill/inputbox.cpp | |||
@@ -1,50 +1,50 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | inputbox.cpp - description | 2 | inputbox.cpp - description |
3 | ------------------- | 3 | ------------------- |
4 | begin : Sat Jan 1 2000 | 4 | begin : Sat Jan 1 2000 |
5 | copyright : (C) 2000 by Jurrien Loonstra | 5 | copyright : (C) 2000 by Jurrien Loonstra |
6 | email : j.h.loonstra@st.hanze.nl | 6 | email : j.h.loonstra@st.hanze.nl |
7 | ***************************************************************************/ | 7 | ***************************************************************************/ |
8 | 8 | ||
9 | /*************************************************************************** | 9 | /*************************************************************************** |
10 | * * | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * | 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 * | 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 * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * |
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | 17 | ||
18 | #include "inputbox.h" | 18 | #include "inputbox.h" |
19 | InputBox::InputBox(QWidget *parent, const char *name, const char *caption, const char *text) : QDialog(parent, name, TRUE) { | 19 | InputBox::InputBox(QWidget *parent, const char *name, const char *, const char *) : QDialog(parent, name, TRUE) { |
20 | // setCaption(caption); | 20 | // setCaption(caption); |
21 | // | 21 | // |
22 | // question = new QLabel(this); | 22 | // question = new QLabel(this); |
23 | // question->setText(text); | 23 | // question->setText(text); |
24 | // question->setGeometry(10, 10, 240, 50); | 24 | // question->setGeometry(10, 10, 240, 50); |
25 | // | 25 | // |
26 | // input = new QLineEdit(this); | 26 | // input = new QLineEdit(this); |
27 | // input->setGeometry(10, 60, 240, 30); | 27 | // input->setGeometry(10, 60, 240, 30); |
28 | // input->setFocus(); | 28 | // input->setFocus(); |
29 | // input->setMaxLength(19); | 29 | // input->setMaxLength(19); |
30 | // | 30 | // |
31 | // ok = new QPushButton( "Ok", this ); | 31 | // ok = new QPushButton( "Ok", this ); |
32 | // ok->setGeometry(10, 100, 100,30 ); | 32 | // ok->setGeometry(10, 100, 100,30 ); |
33 | // ok->setDefault(TRUE); | 33 | // ok->setDefault(TRUE); |
34 | // connect( ok, SIGNAL(clicked()), SLOT(accept()) ); | 34 | // connect( ok, SIGNAL(clicked()), SLOT(accept()) ); |
35 | // | 35 | // |
36 | // cancel = new QPushButton( "Cancel", this ); | 36 | // cancel = new QPushButton( "Cancel", this ); |
37 | // cancel->setGeometry(150, 100, 100,30 ); | 37 | // cancel->setGeometry(150, 100, 100,30 ); |
38 | // connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); | 38 | // connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); |
39 | } | 39 | } |
40 | 40 | ||
41 | InputBox::~InputBox(){ | 41 | InputBox::~InputBox(){ |
42 | delete ok; | 42 | delete ok; |
43 | delete cancel; | 43 | delete cancel; |
44 | delete question; | 44 | delete question; |
45 | delete input; | 45 | delete input; |
46 | } | 46 | } |
47 | 47 | ||
48 | QString InputBox::getText() const{ | 48 | QString InputBox::getText() const{ |
49 | return input->text(); | 49 | return input->text(); |
50 | } | 50 | } |
diff --git a/noncore/games/kbill/kbill.h b/noncore/games/kbill/kbill.h index fbc0c6c..da1a111 100644 --- a/noncore/games/kbill/kbill.h +++ b/noncore/games/kbill/kbill.h | |||
@@ -1,54 +1,56 @@ | |||
1 | /*************************************************************************** | 1 | /*************************************************************************** |
2 | kbill.h - description | 2 | kbill.h - description |
3 | ------------------- | 3 | ------------------- |
4 | begin : Thu Dec 30 16:55:55 CET 1999 | 4 | begin : Thu Dec 30 16:55:55 CET 1999 |
5 | copyright : (C) 1999 by Jurrien Loonstra | 5 | copyright : (C) 1999 by Jurrien Loonstra |
6 | email : j.h.loonstra@st.hanze.nl | 6 | email : j.h.loonstra@st.hanze.nl |
7 | ***************************************************************************/ | 7 | ***************************************************************************/ |
8 | 8 | ||
9 | /*************************************************************************** | 9 | /*************************************************************************** |
10 | * * | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * | 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 * | 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 * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * |
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | 17 | ||
18 | #ifndef KBILL_H | 18 | #ifndef KBILL_H |
19 | #define KBILL_H | 19 | #define KBILL_H |
20 | 20 | ||
21 | 21 | ||
22 | 22 | ||
23 | #include <qmainwindow.h> | 23 | #include <qmainwindow.h> |
24 | #include <qwidget.h> | 24 | #include <qwidget.h> |
25 | #include <qpopupmenu.h> | 25 | #include <qpopupmenu.h> |
26 | 26 | ||
27 | #include "field.h" | 27 | #include "field.h" |
28 | 28 | ||
29 | class KBill : public QMainWindow | 29 | class KBill : public QMainWindow |
30 | { | 30 | { |
31 | Q_OBJECT | 31 | Q_OBJECT |
32 | public: | 32 | public: |
33 | KBill(); | 33 | KBill(); |
34 | ~KBill(); | 34 | ~KBill(); |
35 | Field* getField(); | 35 | Field* getField(); |
36 | private: | 36 | private: |
37 | QMenuBar *menu; | 37 | QMenuBar *menu; |
38 | QPopupMenu *file, *help; | 38 | QPopupMenu *file, *help; |
39 | Field *field; | 39 | Field *field; |
40 | int pauseid; | 40 | int pauseid; |
41 | |||
41 | protected slots: | 42 | protected slots: |
42 | void Quit(); | 43 | void Quit(); |
43 | void About(); | 44 | void About(); |
44 | void NewGame(); | 45 | void NewGame(); |
45 | void Pause(); | 46 | void Pause(); |
46 | void WarpTo(); | 47 | void WarpTo(); |
47 | void Story(); | 48 | void Story(); |
48 | void Rules(); | 49 | void Rules(); |
49 | void ViewHighScores(); | 50 | void ViewHighScores(); |
50 | 51 | ||
52 | protected: | ||
51 | friend class UI; | 53 | friend class UI; |
52 | }; | 54 | }; |
53 | 55 | ||
54 | #endif | 56 | #endif |