summaryrefslogtreecommitdiff
path: root/noncore/games
authorchicken <chicken>2004-03-01 20:30:56 (UTC)
committer chicken <chicken>2004-03-01 20:30:56 (UTC)
commit7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc (patch) (unidiff)
tree0ec283bce345770910a2630e868afcde3d7c3dc9 /noncore/games
parent054b3c3e032bdb0a6061a3345487b4ff877eebfd (diff)
downloadopie-7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc.zip
opie-7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc.tar.gz
opie-7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc.tar.bz2
fix includes
Diffstat (limited to 'noncore/games') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/backgammon/backgammon.cpp3
-rw-r--r--noncore/games/backgammon/filedialog.cpp4
-rw-r--r--noncore/games/backgammon/main.cpp1
-rw-r--r--noncore/games/backgammon/moveengine.cpp1
-rw-r--r--noncore/games/backgammon/themedialog.cpp2
-rw-r--r--noncore/games/bounce/game.cpp1
-rw-r--r--noncore/games/bounce/kbounce.cpp4
-rw-r--r--noncore/games/bounce/main.cpp1
-rw-r--r--noncore/games/buzzword/buzzword.cpp1
-rw-r--r--noncore/games/buzzword/main.cpp1
-rw-r--r--noncore/games/fifteen/fifteen.cpp5
-rw-r--r--noncore/games/go/gowidget.cpp4
-rw-r--r--noncore/games/go/main.cpp1
-rw-r--r--noncore/games/kbill/MCursor.cc5
-rw-r--r--noncore/games/kbill/Picture.cc2
-rw-r--r--noncore/games/kbill/UI.cpp3
-rw-r--r--noncore/games/kbill/field.cpp1
-rw-r--r--noncore/games/kbill/inputbox.cpp1
-rw-r--r--noncore/games/kbill/kbill.cpp4
-rw-r--r--noncore/games/kcheckers/kcheckers.cpp1
-rw-r--r--noncore/games/kcheckers/main.cpp2
-rw-r--r--noncore/games/kpacman/board.cpp3
-rw-r--r--noncore/games/kpacman/keys.cpp5
-rw-r--r--noncore/games/kpacman/kpacman.cpp5
-rw-r--r--noncore/games/kpacman/kpacmanwidget.cpp5
-rw-r--r--noncore/games/kpacman/monster.cpp1
-rw-r--r--noncore/games/kpacman/pacman.cpp1
-rw-r--r--noncore/games/kpacman/painter.cpp10
-rw-r--r--noncore/games/kpacman/referee.cpp9
-rw-r--r--noncore/games/kpacman/score.cpp6
-rw-r--r--noncore/games/kpacman/status.cpp2
-rw-r--r--noncore/games/mindbreaker/mindbreaker.cpp4
-rw-r--r--noncore/games/minesweep/main.cpp1
-rw-r--r--noncore/games/minesweep/minefield.cpp4
-rw-r--r--noncore/games/minesweep/minesweep.cpp5
-rw-r--r--noncore/games/oyatzee/oyatzee.cpp6
-rw-r--r--noncore/games/parashoot/base.cpp2
-rw-r--r--noncore/games/parashoot/cannon.cpp1
-rw-r--r--noncore/games/parashoot/helicopter.cpp1
-rw-r--r--noncore/games/parashoot/interface.cpp4
-rw-r--r--noncore/games/parashoot/main.cpp1
-rw-r--r--noncore/games/parashoot/man.cpp1
-rw-r--r--noncore/games/qasteroids/main.cpp1
-rw-r--r--noncore/games/qasteroids/toplevel.cpp2
-rw-r--r--noncore/games/qasteroids/view.cpp3
-rw-r--r--noncore/games/sfcave/helpwindow.cpp2
-rw-r--r--noncore/games/snake/interface.cpp4
-rw-r--r--noncore/games/snake/main.cpp1
-rw-r--r--noncore/games/snake/snake.cpp2
-rw-r--r--noncore/games/solitaire/canvascard.cpp5
-rw-r--r--noncore/games/solitaire/canvascardgame.cpp8
-rw-r--r--noncore/games/solitaire/canvascardwindow.cpp5
-rw-r--r--noncore/games/solitaire/canvasshapes.cpp2
-rw-r--r--noncore/games/solitaire/card.cpp3
-rw-r--r--noncore/games/solitaire/cardpile.cpp2
-rw-r--r--noncore/games/solitaire/chicanecardgame.cpp1
-rw-r--r--noncore/games/solitaire/freecellcardgame.cpp1
-rw-r--r--noncore/games/solitaire/harpcardgame.cpp1
-rw-r--r--noncore/games/solitaire/main.cpp1
-rw-r--r--noncore/games/solitaire/patiencecardgame.cpp1
-rw-r--r--noncore/games/solitaire/teeclubcardgame.cpp1
-rw-r--r--noncore/games/tetrix/main.cpp1
-rw-r--r--noncore/games/tetrix/ohighscoredlg.cpp3
-rw-r--r--noncore/games/tetrix/qtetrix.cpp3
-rw-r--r--noncore/games/tetrix/qtetrixb.cpp2
-rw-r--r--noncore/games/tictac/main.cpp1
-rw-r--r--noncore/games/tictac/tictac.cpp4
-rw-r--r--noncore/games/wordgame/main.cpp1
-rw-r--r--noncore/games/wordgame/wordgame.cpp9
-rw-r--r--noncore/games/zlines/ballpainter.cpp3
-rw-r--r--noncore/games/zlines/field.cpp1
-rw-r--r--noncore/games/zlines/klines.cpp9
-rw-r--r--noncore/games/zlines/linesboard.cpp3
-rw-r--r--noncore/games/zlines/main.cpp1
-rw-r--r--noncore/games/zlines/mwidget.cpp1
-rw-r--r--noncore/games/zsame/StoneWidget.cpp5
-rw-r--r--noncore/games/zsame/ZSameWidget.cpp7
77 files changed, 2 insertions, 223 deletions
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp
index e9e5467..51020a0 100644
--- a/noncore/games/backgammon/backgammon.cpp
+++ b/noncore/games/backgammon/backgammon.cpp
@@ -1,39 +1,36 @@
1#include "backgammon.h" 1#include "backgammon.h"
2 2
3#include "aidialog.h" 3#include "aidialog.h"
4#include "filedialog.h" 4#include "filedialog.h"
5#include "playerdialog.h" 5#include "playerdialog.h"
6#include "rulesdialog.h" 6#include "rulesdialog.h"
7#include "themedialog.h" 7#include "themedialog.h"
8 8
9#include <qdatetime.h>
10#include <qfile.h> 9#include <qfile.h>
11#include <qlayout.h> 10#include <qlayout.h>
12#include <qmessagebox.h> 11#include <qmessagebox.h>
13#include <qstring.h>
14#include <qtimer.h> 12#include <qtimer.h>
15#include <qmainwindow.h>
16#include <qpe/qpeapplication.h> 13#include <qpe/qpeapplication.h>
17#include <qpe/config.h> 14#include <qpe/config.h>
18#include <qmenubar.h> 15#include <qmenubar.h>
19#include <qpe/resource.h> 16#include <qpe/resource.h>
20 17
21#include <stdlib.h> 18#include <stdlib.h>
22 19
23 20
24BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) 21BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
25 : QMainWindow(parent, name, fl) 22 : QMainWindow(parent, name, fl)
26{ 23{
27 if (!name) setName("BackGammon"); 24 if (!name) setName("BackGammon");
28 setCaption(tr( "Backgammon") ); 25 setCaption(tr( "Backgammon") );
29 setIcon( Resource::loadPixmap( "backgammon" ) ); 26 setIcon( Resource::loadPixmap( "backgammon" ) );
30 //general counter varaible 27 //general counter varaible
31 int a=0; 28 int a=0;
32 //the game engine 29 //the game engine
33 move=new MoveEngine(); 30 move=new MoveEngine();
34 31
35 //load the default theme 32 //load the default theme
36 Config conf("backgammon"); 33 Config conf("backgammon");
37 if(!conf.isValid()) 34 if(!conf.isValid())
38 { 35 {
39 qDebug("config file does not exist"); 36 qDebug("config file does not exist");
diff --git a/noncore/games/backgammon/filedialog.cpp b/noncore/games/backgammon/filedialog.cpp
index a5e71c9..e0a2914 100644
--- a/noncore/games/backgammon/filedialog.cpp
+++ b/noncore/games/backgammon/filedialog.cpp
@@ -1,31 +1,27 @@
1#include "filedialog.h" 1#include "filedialog.h"
2 2
3#include <qdir.h> 3#include <qdir.h>
4#include <qfileinfo.h>
5#include <qmessagebox.h>
6#include <qpixmap.h>
7#include <qpushbutton.h>
8#include <qpe/qpeapplication.h> 4#include <qpe/qpeapplication.h>
9 5
10FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const char* name,bool modal,WFlags f) 6FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const char* name,bool modal,WFlags f)
11 :QDialog(parent,name,modal,f) 7 :QDialog(parent,name,modal,f)
12{ 8{
13 setCaption(header); 9 setCaption(header);
14 ext=extension; 10 ext=extension;
15 dirselector=new QListView(this); 11 dirselector=new QListView(this);
16 dirselector->setGeometry(1,10,235,200); 12 dirselector->setGeometry(1,10,235,200);
17 dirselector->addColumn("Files"); 13 dirselector->addColumn("Files");
18 connect(dirselector,SIGNAL(clicked(QListViewItem*)),this,SLOT(selectorclicked(QListViewItem*))); 14 connect(dirselector,SIGNAL(clicked(QListViewItem*)),this,SLOT(selectorclicked(QListViewItem*)));
19 15
20 getCurrentDir(); 16 getCurrentDir();
21 17
22 file_name="user"; 18 file_name="user";
23 fileinput=new QLineEdit(file_name,this); 19 fileinput=new QLineEdit(file_name,this);
24 fileinput->setGeometry(1,220,235,20); 20 fileinput->setGeometry(1,220,235,20);
25 21
26 QPEApplication::showDialog( this ); 22 QPEApplication::showDialog( this );
27} 23}
28 24
29FileDialog::~FileDialog() 25FileDialog::~FileDialog()
30{} 26{}
31 27
diff --git a/noncore/games/backgammon/main.cpp b/noncore/games/backgammon/main.cpp
index 58ced10..6316040 100644
--- a/noncore/games/backgammon/main.cpp
+++ b/noncore/games/backgammon/main.cpp
@@ -1,8 +1,7 @@
1#include <qpe/qpeapplication.h>
2#include "backgammon.h" 1#include "backgammon.h"
3 2
4#include <opie/oapplicationfactory.h> 3#include <opie/oapplicationfactory.h>
5 4
6OPIE_EXPORT_APP( OApplicationFactory<BackGammon> ) 5OPIE_EXPORT_APP( OApplicationFactory<BackGammon> )
7 6
8 7
diff --git a/noncore/games/backgammon/moveengine.cpp b/noncore/games/backgammon/moveengine.cpp
index 37b73a6..7de7147 100644
--- a/noncore/games/backgammon/moveengine.cpp
+++ b/noncore/games/backgammon/moveengine.cpp
@@ -1,27 +1,26 @@
1#include "moveengine.h" 1#include "moveengine.h"
2 2
3#include <qmessagebox.h>
4#include <qtimer.h> 3#include <qtimer.h>
5#include <stdlib.h> 4#include <stdlib.h>
6 5
7MoveEngine::MoveEngine() 6MoveEngine::MoveEngine()
8 : QObject() 7 : QObject()
9{ 8{
10 int offset=7; 9 int offset=7;
11 int a=0; //counter variable 10 int a=0; //counter variable
12 int xfill[]={210,185,170,155,140,125,110,85,70,55,40,25,10,10,25,40,55,70,85,110,125,140,155,170,185,210}; 11 int xfill[]={210,185,170,155,140,125,110,85,70,55,40,25,10,10,25,40,55,70,85,110,125,140,155,170,185,210};
13 for(a=0;a<26;a++) 12 for(a=0;a<26;a++)
14 { 13 {
15 x_coord[a]=xfill[a]; 14 x_coord[a]=xfill[a];
16 } 15 }
17 16
18 int yfill[]={10,25,40,55,70,10+offset,25+offset,40+offset,55+offset,25,40,55, 25+offset,40+offset,40}; 17 int yfill[]={10,25,40,55,70,10+offset,25+offset,40+offset,55+offset,25,40,55, 25+offset,40+offset,40};
19 int zfill[]={1,1,1,1,1,2,2,2,2,3,3,3,4,4,5}; 18 int zfill[]={1,1,1,1,1,2,2,2,2,3,3,3,4,4,5};
20 for(a=0;a<15;a++) 19 for(a=0;a<15;a++)
21 { 20 {
22 yup_coord[a]=yfill[a]; 21 yup_coord[a]=yfill[a];
23 ylow_coord[a]=185-(yfill[a]); 22 ylow_coord[a]=185-(yfill[a]);
24 z_coord[a]=zfill[a]; 23 z_coord[a]=zfill[a];
25 } 24 }
26 for(a=0;a<5;a++) 25 for(a=0;a<5;a++)
27 { 26 {
diff --git a/noncore/games/backgammon/themedialog.cpp b/noncore/games/backgammon/themedialog.cpp
index f342381..afd6a1b 100644
--- a/noncore/games/backgammon/themedialog.cpp
+++ b/noncore/games/backgammon/themedialog.cpp
@@ -1,30 +1,28 @@
1#include "themedialog.h" 1#include "themedialog.h"
2 2
3#include <qdir.h> 3#include <qdir.h>
4#include <qfileinfo.h>
5#include <qlabel.h> 4#include <qlabel.h>
6#include <qpushbutton.h>
7#include <qpe/qpeapplication.h> 5#include <qpe/qpeapplication.h>
8 6
9 7
10ThemeDialog::ThemeDialog(QWidget* parent,const char* name,bool modal,WFlags f) 8ThemeDialog::ThemeDialog(QWidget* parent,const char* name,bool modal,WFlags f)
11 :QDialog(parent,name,modal,f) 9 :QDialog(parent,name,modal,f)
12{ 10{
13 setCaption("Theme Dialog"); 11 setCaption("Theme Dialog");
14 QLabel* labelname=new QLabel("name",this); 12 QLabel* labelname=new QLabel("name",this);
15 labelname->setGeometry(0,5,40,20); 13 labelname->setGeometry(0,5,40,20);
16 lineName=new QLineEdit("user",this); 14 lineName=new QLineEdit("user",this);
17 lineName->setGeometry(40,5,195,20); 15 lineName->setGeometry(40,5,195,20);
18 16
19 QLabel* labelboard=new QLabel("board",this); 17 QLabel* labelboard=new QLabel("board",this);
20 labelboard->setGeometry(0,30,40,20); 18 labelboard->setGeometry(0,30,40,20);
21 boxboard=new QComboBox(this,""); 19 boxboard=new QComboBox(this,"");
22 boxboard->setGeometry(40,30,195,20); 20 boxboard->setGeometry(40,30,195,20);
23 fillBox("boards",boxboard); 21 fillBox("boards",boxboard);
24 22
25 QLabel* labelpiecesA=new QLabel("pieces1",this); 23 QLabel* labelpiecesA=new QLabel("pieces1",this);
26 labelpiecesA->setGeometry(0,70,40,20); 24 labelpiecesA->setGeometry(0,70,40,20);
27 boxpiecesA=new QComboBox(this); 25 boxpiecesA=new QComboBox(this);
28 boxpiecesA->setGeometry(40,70,195,20); 26 boxpiecesA->setGeometry(40,70,195,20);
29 fillBox("pieces",boxpiecesA); 27 fillBox("pieces",boxpiecesA);
30 28
diff --git a/noncore/games/bounce/game.cpp b/noncore/games/bounce/game.cpp
index 6ded218..c07f453 100644
--- a/noncore/games/bounce/game.cpp
+++ b/noncore/games/bounce/game.cpp
@@ -1,47 +1,46 @@
1/* 1/*
2 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de> 2 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de>
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public 14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the Free 15 * License along with this program; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 17 */
18 18
19 19
20#include <stdlib.h> 20#include <stdlib.h>
21#include <qtimer.h> 21#include <qtimer.h>
22#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
23#include <qimage.h>
24 23
25#include "game.h" 24#include "game.h"
26 25
27#define TILE_SIZE 9 26#define TILE_SIZE 9
28 27
29#define TILE_FIRST ((FIELD_WIDTH-2)*(FIELD_HEIGHT-2)) 28#define TILE_FIRST ((FIELD_WIDTH-2)*(FIELD_HEIGHT-2))
30#define TILE_FREE (TILE_FIRST + 0) 29#define TILE_FREE (TILE_FIRST + 0)
31#define TILE_BORDER (TILE_FIRST + 1) 30#define TILE_BORDER (TILE_FIRST + 1)
32#define TILE_WALLEND (TILE_FIRST + 2) 31#define TILE_WALLEND (TILE_FIRST + 2)
33#define TILE_WALLUP (TILE_FIRST + 3) 32#define TILE_WALLUP (TILE_FIRST + 3)
34#define TILE_WALLDOWN (TILE_FIRST + 4) 33#define TILE_WALLDOWN (TILE_FIRST + 4)
35#define TILE_WALLLEFT (TILE_FIRST + 5) 34#define TILE_WALLLEFT (TILE_FIRST + 5)
36#define TILE_WALLRIGHT (TILE_FIRST + 6) 35#define TILE_WALLRIGHT (TILE_FIRST + 6)
37 36
38#define GAME_DELAY 15 37#define GAME_DELAY 15
39#define BALL_ANIM_DELAY 60 38#define BALL_ANIM_DELAY 60
40#define WALL_DELAY 100 39#define WALL_DELAY 100
41 40
42#define MS2TICKS( ms ) ((ms)/GAME_DELAY) 41#define MS2TICKS( ms ) ((ms)/GAME_DELAY)
43 42
44Arrow::Arrow(QCanvasPixmapArray* array, QCanvas* canvas) 43Arrow::Arrow(QCanvasPixmapArray* array, QCanvas* canvas)
45 : QCanvasSprite( array, canvas ) 44 : QCanvasSprite( array, canvas )
46{ 45{
47 m_vertical = true; 46 m_vertical = true;
diff --git a/noncore/games/bounce/kbounce.cpp b/noncore/games/bounce/kbounce.cpp
index 211f0ff..3b0cb6f 100644
--- a/noncore/games/bounce/kbounce.cpp
+++ b/noncore/games/bounce/kbounce.cpp
@@ -1,52 +1,48 @@
1/* 1/*
2 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de> 2 * Copyright (C) 2000 Stefan Schimanski <1Stein@gmx.de>
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License,Life or (at your option) any later version. 7 * version 2 of the License,Life or (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public 14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the Free 15 * License along with this program; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 17 */
18 18
19#include <qlayout.h> 19#include <qlayout.h>
20#include <qtimer.h> 20#include <qtimer.h>
21#include <qlcdnumber.h>
22#include <qmessagebox.h> 21#include <qmessagebox.h>
23#include <qmainwindow.h>
24#include <qpe/qpeapplication.h>
25 22
26#include "kbounce.h" 23#include "kbounce.h"
27#include "game.h" 24#include "game.h"
28#include <qlabel.h>
29 25
30KJezzball::KJezzball(QWidget *p, const char* n, WFlags f) 26KJezzball::KJezzball(QWidget *p, const char* n, WFlags f)
31 : QMainWindow(p,n,f), m_gameWidget( 0 ) 27 : QMainWindow(p,n,f), m_gameWidget( 0 )
32{ 28{
33 setCaption(tr("Bounce")); 29 setCaption(tr("Bounce"));
34 // setup variables 30 // setup variables
35 m_game.level = 1; 31 m_game.level = 1;
36 m_game.score = 0; 32 m_game.score = 0;
37 m_state = Idle; 33 m_state = Idle;
38 34
39 35
40 menu = menuBar(); 36 menu = menuBar();
41 game = new QPopupMenu; 37 game = new QPopupMenu;
42 game->insertItem(tr("&New game"), this, SLOT(newGame()), Key_N ); 38 game->insertItem(tr("&New game"), this, SLOT(newGame()), Key_N );
43 game->insertItem(tr("&Pause game"), this, SLOT(pauseGame()), Key_P ); 39 game->insertItem(tr("&Pause game"), this, SLOT(pauseGame()), Key_P );
44 game->insertSeparator(); 40 game->insertSeparator();
45 game->insertItem(tr("&About"), this, SLOT(about())); 41 game->insertItem(tr("&About"), this, SLOT(about()));
46 menu->insertItem( tr("&Game"), game ); 42 menu->insertItem( tr("&Game"), game );
47 43
48 // create widgets 44 // create widgets
49 m_view = new QWidget( this, "m_view" ); 45 m_view = new QWidget( this, "m_view" );
50 setCentralWidget( m_view ); 46 setCentralWidget( m_view );
51 47
52 m_layout = new QGridLayout( m_view ); 48 m_layout = new QGridLayout( m_view );
diff --git a/noncore/games/bounce/main.cpp b/noncore/games/bounce/main.cpp
index 9ea86a6..a070c4b 100644
--- a/noncore/games/bounce/main.cpp
+++ b/noncore/games/bounce/main.cpp
@@ -1,24 +1,23 @@
1/* 1/*
2 * Copyright (C) 2000 Stefan Schimanski <schimmi@kde.org> 2 * Copyright (C) 2000 Stefan Schimanski <schimmi@kde.org>
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public 14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the Free 15 * License along with this program; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 17 */
18 18
19#include <qpe/qpeapplication.h>
20#include "kbounce.h" 19#include "kbounce.h"
21#include <opie/oapplicationfactory.h> 20#include <opie/oapplicationfactory.h>
22 21
23OPIE_EXPORT_APP( OApplicationFactory<KJezzball> ) 22OPIE_EXPORT_APP( OApplicationFactory<KJezzball> )
24 23
diff --git a/noncore/games/buzzword/buzzword.cpp b/noncore/games/buzzword/buzzword.cpp
index f746065..13eb481 100644
--- a/noncore/games/buzzword/buzzword.cpp
+++ b/noncore/games/buzzword/buzzword.cpp
@@ -1,44 +1,43 @@
1/* 1/*
2 * Copyright (C) 2002 Martin Imobersteg <imm@gmx.ch> 2 * Copyright (C) 2002 Martin Imobersteg <imm@gmx.ch>
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public 5 * modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License,Life or (at your option) any later version. 7 * version 2 of the License,Life or (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public 14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the Free 15 * License along with this program; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 17 */
18 18
19#include <qlayout.h> 19#include <qlayout.h>
20#include <qmessagebox.h>
21#include <qmainwindow.h> 20#include <qmainwindow.h>
22#include <qlabel.h> 21#include <qlabel.h>
23#include <qgrid.h> 22#include <qgrid.h>
24#include <qcolor.h> 23#include <qcolor.h>
25#include <qbutton.h> 24#include <qbutton.h>
26#include <qfile.h> 25#include <qfile.h>
27#include <qtextstream.h> 26#include <qtextstream.h>
28#include <qstringlist.h> 27#include <qstringlist.h>
29#include <qmessagebox.h> 28#include <qmessagebox.h>
30#include <qdir.h> 29#include <qdir.h>
31 30
32#include <math.h> 31#include <math.h>
33#include <stdlib.h> 32#include <stdlib.h>
34 33
35#include <qpe/qpeapplication.h> 34#include <qpe/qpeapplication.h>
36 35
37#include "buzzword.h" 36#include "buzzword.h"
38 37
39BuzzLabel::BuzzLabel( QWidget *parent, const char *name ) 38BuzzLabel::BuzzLabel( QWidget *parent, const char *name )
40: QLabel( parent, name ) 39: QLabel( parent, name )
41{ 40{
42} 41}
43 42
44void BuzzLabel::mousePressEvent(QMouseEvent *e) 43void BuzzLabel::mousePressEvent(QMouseEvent *e)
diff --git a/noncore/games/buzzword/main.cpp b/noncore/games/buzzword/main.cpp
index 67f2c26..95b3176 100644
--- a/noncore/games/buzzword/main.cpp
+++ b/noncore/games/buzzword/main.cpp
@@ -1,24 +1,23 @@
1/* 1/*
2 * Copyright (C) 2002 Martin Imobersteg <imm@gmx.ch> 2 * Copyright (C) 2002 Martin Imobersteg <imm@gmx.ch>
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public 5 * modify it under the terms of the GNU General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License,Life or (at your option) any later version. 7 * version 2 of the License,Life or (at your option) any later version.
8 * 8 *
9 * This program is distributed in the hope that it will be useful, 9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details. 12 * Library General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU Library General Public 14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the Free 15 * License along with this program; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 17 */
18 18
19#include <qpe/qpeapplication.h>
20#include <opie/oapplicationfactory.h> 19#include <opie/oapplicationfactory.h>
21 20
22#include "buzzword.h" 21#include "buzzword.h"
23 22
24OPIE_EXPORT_APP( OApplicationFactory<BuzzWord> ) 23OPIE_EXPORT_APP( OApplicationFactory<BuzzWord> )
diff --git a/noncore/games/fifteen/fifteen.cpp b/noncore/games/fifteen/fifteen.cpp
index b4e0308..506e87a 100644
--- a/noncore/games/fifteen/fifteen.cpp
+++ b/noncore/games/fifteen/fifteen.cpp
@@ -4,57 +4,52 @@
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "fifteen.h" 21#include "fifteen.h"
22 22
23#include <qtopia/resource.h> 23#include <qtopia/resource.h>
24#include <qtopia/config.h> 24#include <qtopia/config.h>
25 25
26#include <qvbox.h> 26#include <qvbox.h>
27#include <qaction.h> 27#include <qaction.h>
28#include <qlayout.h>
29#include <qpainter.h> 28#include <qpainter.h>
30#include <qpopupmenu.h>
31#include <qmessagebox.h> 29#include <qmessagebox.h>
32#include <qtoolbar.h> 30#include <qtoolbar.h>
33#include <qmenubar.h> 31#include <qmenubar.h>
34#include <qstringlist.h>
35#include <qapplication.h>
36#include <qtoolbutton.h>
37 32
38#include <stdlib.h> 33#include <stdlib.h>
39#include <time.h> 34#include <time.h>
40 35
41FifteenMainWindow::FifteenMainWindow(QWidget *parent, const char* name, WFlags fl) 36FifteenMainWindow::FifteenMainWindow(QWidget *parent, const char* name, WFlags fl)
42 : QMainWindow( parent, name, fl ) 37 : QMainWindow( parent, name, fl )
43{ 38{
44 // random seed 39 // random seed
45 srand(time(0)); 40 srand(time(0));
46 setCaption( tr("Fifteen Pieces") ); 41 setCaption( tr("Fifteen Pieces") );
47 42
48 QToolBar *toolbar = new QToolBar(this); 43 QToolBar *toolbar = new QToolBar(this);
49 toolbar->setHorizontalStretchable( FALSE ); 44 toolbar->setHorizontalStretchable( FALSE );
50 QMenuBar *menubar = new QMenuBar( toolbar ); 45 QMenuBar *menubar = new QMenuBar( toolbar );
51 menubar->setMargin(0); 46 menubar->setMargin(0);
52 QPopupMenu *game = new QPopupMenu( this ); 47 QPopupMenu *game = new QPopupMenu( this );
53 48
54 QWidget *spacer = new QWidget( toolbar ); 49 QWidget *spacer = new QWidget( toolbar );
55 spacer->setBackgroundMode( PaletteButton ); 50 spacer->setBackgroundMode( PaletteButton );
56 toolbar->setStretchableWidget( spacer ); 51 toolbar->setStretchableWidget( spacer );
57 52
58 53
59 setToolBarsMovable( FALSE ); 54 setToolBarsMovable( FALSE );
60 QVBox *vbox = new QVBox( this ); 55 QVBox *vbox = new QVBox( this );
diff --git a/noncore/games/go/gowidget.cpp b/noncore/games/go/gowidget.cpp
index cf89267..79820b1 100644
--- a/noncore/games/go/gowidget.cpp
+++ b/noncore/games/go/gowidget.cpp
@@ -3,60 +3,56 @@
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "gowidget.h" 21#include "gowidget.h"
22 22
23#include <qpe/config.h> 23#include <qpe/config.h>
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25 25
26#include <qpainter.h> 26#include <qpainter.h>
27#include <qpixmap.h>
28#include <qpe/qpetoolbar.h> 27#include <qpe/qpetoolbar.h>
29#include <qmenubar.h> 28#include <qmenubar.h>
30#include <qpopupmenu.h>
31#include <qaction.h> 29#include <qaction.h>
32#include <qapplication.h> //processEvents() 30#include <qapplication.h> //processEvents()
33#include <qlabel.h> 31#include <qlabel.h>
34 32
35//#include <stdio.h> 33//#include <stdio.h>
36 34
37#include "amigo.h"
38#include "goplayutils.h"
39 35
40static const enum bVal computer_color = BLACK; 36static const enum bVal computer_color = BLACK;
41 37
42static int current_handicap = 1; 38static int current_handicap = 1;
43 39
44static QBrush *goBrush; 40static QBrush *goBrush;
45//static QImage *newBlackStone; 41//static QImage *newBlackStone;
46//static QImage *blackStone; 42//static QImage *blackStone;
47//static QImage *whiteStone; 43//static QImage *whiteStone;
48static QPixmap *newBlackStone; 44static QPixmap *newBlackStone;
49static QPixmap *blackStone; 45static QPixmap *blackStone;
50static QPixmap *whiteStone; 46static QPixmap *whiteStone;
51 47
52static bool smallStones = FALSE; 48static bool smallStones = FALSE;
53 49
54GoMainWidget::GoMainWidget( QWidget *parent, const char* name, WFlags fl) : 50GoMainWidget::GoMainWidget( QWidget *parent, const char* name, WFlags fl) :
55 QMainWindow( parent, name, fl ) 51 QMainWindow( parent, name, fl )
56{ 52{
57 setToolBarsMovable( FALSE ); 53 setToolBarsMovable( FALSE );
58 GoWidget *go = new GoWidget(this); 54 GoWidget *go = new GoWidget(this);
59 55
60 setCentralWidget(go); 56 setCentralWidget(go);
61 toolbar = new QToolBar(this); 57 toolbar = new QToolBar(this);
62 toolbar->setHorizontalStretchable( TRUE ); 58 toolbar->setHorizontalStretchable( TRUE );
diff --git a/noncore/games/go/main.cpp b/noncore/games/go/main.cpp
index f24e3c3..66f34ab 100644
--- a/noncore/games/go/main.cpp
+++ b/noncore/games/go/main.cpp
@@ -1,28 +1,27 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "gowidget.h" 21#include "gowidget.h"
22 22
23#include <qpe/qpeapplication.h>
24 23
25#include <opie/oapplicationfactory.h> 24#include <opie/oapplicationfactory.h>
26 25
27OPIE_EXPORT_APP( OApplicationFactory<GoMainWidget> ) 26OPIE_EXPORT_APP( OApplicationFactory<GoMainWidget> )
28 27
diff --git a/noncore/games/kbill/MCursor.cc b/noncore/games/kbill/MCursor.cc
index a3cb340..c581693 100644
--- a/noncore/games/kbill/MCursor.cc
+++ b/noncore/games/kbill/MCursor.cc
@@ -1,47 +1,42 @@
1/*************************************************************************** 1/***************************************************************************
2 MCursor.cc - description 2 MCursor.cc - description
3 ------------------- 3 -------------------
4 begin : Thu Dec 30 1999 4 begin : Thu Dec 30 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#include "MCursor.h" 17#include "MCursor.h"
18#include "objects.h"
19 18
20#include <qcursor.h>
21#include <qbitmap.h>
22#include <qwidget.h>
23#include <qstring.h>
24#ifdef KDEVER 19#ifdef KDEVER
25#include <kapp.h> 20#include <kapp.h>
26#include <kstandarddirs.h> 21#include <kstandarddirs.h>
27#endif 22#endif
28#include <iostream> 23#include <iostream>
29#include <qpe/resource.h> 24#include <qpe/resource.h>
30MCursor::~MCursor() { 25MCursor::~MCursor() {
31 delete cursor; 26 delete cursor;
32} 27}
33 28
34void MCursor::load(const char *name, int masked) { 29void MCursor::load(const char *name, int masked) {
35 30
36 #ifdef KDEVER 31 #ifdef KDEVER
37 QString file, mfile; 32 QString file, mfile;
38 KStandardDirs dirs; 33 KStandardDirs dirs;
39 34
40 35
41 file = dirs.findResource("data","kbill/bitmaps/" + QString::fromLocal8Bit(name) + ".xbm"); 36 file = dirs.findResource("data","kbill/bitmaps/" + QString::fromLocal8Bit(name) + ".xbm");
42 37
43 QBitmap bitmap, mask; 38 QBitmap bitmap, mask;
44 if (bitmap.load(file) == FALSE) { 39 if (bitmap.load(file) == FALSE) {
45 std::cerr << "cannot open " << file << std::endl; 40 std::cerr << "cannot open " << file << std::endl;
46 exit(1); 41 exit(1);
47 } 42 }
diff --git a/noncore/games/kbill/Picture.cc b/noncore/games/kbill/Picture.cc
index fe0eff8..9d46257 100644
--- a/noncore/games/kbill/Picture.cc
+++ b/noncore/games/kbill/Picture.cc
@@ -1,46 +1,44 @@
1/*************************************************************************** 1/***************************************************************************
2 Picture.cc - description 2 Picture.cc - description
3 ------------------- 3 -------------------
4 begin : Thu Dec 30 1999 4 begin : Thu Dec 30 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#include "Picture.h" 17#include "Picture.h"
18#include "objects.h"
19 18
20#include <iostream> 19#include <iostream>
21 20
22#include <qstring.h>
23#include <qpe/resource.h> 21#include <qpe/resource.h>
24#ifdef KDEVER 22#ifdef KDEVER
25#include <kapp.h> 23#include <kapp.h>
26#include <kstandarddirs.h> 24#include <kstandarddirs.h>
27#include <kdebug.h> 25#include <kdebug.h>
28#endif 26#endif
29void Picture::load(const char *name, int index) { 27void Picture::load(const char *name, int index) {
30 //QString dir = KApplication::kde_datadir(), file; 28 //QString dir = KApplication::kde_datadir(), file;
31 // QString dir = locate("data",""),file; 29 // QString dir = locate("data",""),file;
32 // dir += "/kbill/"; 30 // dir += "/kbill/";
33 // if (index>=0) 31 // if (index>=0)
34 // file.sprintf ("%spixmaps/%s_%d.xpm", (const char *)dir, name, index); 32 // file.sprintf ("%spixmaps/%s_%d.xpm", (const char *)dir, name, index);
35 // else 33 // else
36 // file.sprintf("%spixmaps/%s.xpm", (const char *)dir, name); 34 // file.sprintf("%spixmaps/%s.xpm", (const char *)dir, name);
37#ifdef KDEVER 35#ifdef KDEVER
38 KStandardDirs dirs; 36 KStandardDirs dirs;
39 QString file; 37 QString file;
40 38
41 if (index>=0) { 39 if (index>=0) {
42 //kdDebug() << "Here"; 40 //kdDebug() << "Here";
43 QString sindex; 41 QString sindex;
44 sindex.setNum(index); 42 sindex.setNum(index);
45 // kdDebug() << "kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm"; 43 // kdDebug() << "kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm";
46 file = dirs.findResource("data","kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm"); 44 file = dirs.findResource("data","kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm");
diff --git a/noncore/games/kbill/UI.cpp b/noncore/games/kbill/UI.cpp
index 2afaf9b..611cebf 100644
--- a/noncore/games/kbill/UI.cpp
+++ b/noncore/games/kbill/UI.cpp
@@ -1,49 +1,46 @@
1/*************************************************************************** 1/***************************************************************************
2 UI.cc - description 2 UI.cc - description
3 ------------------- 3 -------------------
4 begin : Thu Dec 30 1999 4 begin : Thu Dec 30 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#include "kbill.h"
18#include "objects.h" 17#include "objects.h"
19#include "Strings.h" 18#include "Strings.h"
20#ifdef KDEVER 19#ifdef KDEVER
21#include <kapplication.h> 20#include <kapplication.h>
22#endif 21#endif
23#include <qpixmap.h>
24#include <qmessagebox.h> 22#include <qmessagebox.h>
25#include <qnamespace.h>
26 23
27#include "inputbox.h" 24#include "inputbox.h"
28 25
29/**************************/ 26/**************************/
30/* Timer control routines */ 27/* Timer control routines */
31/**************************/ 28/**************************/
32 29
33UI::~UI() { 30UI::~UI() {
34 paint.end(); 31 paint.end();
35 delete pix; 32 delete pix;
36} 33}
37 34
38void UI::restart_timer() { 35void UI::restart_timer() {
39 field->startTimer(); 36 field->startTimer();
40} 37}
41 38
42void UI::kill_timer() { 39void UI::kill_timer() {
43 field->stopTimer(); 40 field->stopTimer();
44} 41}
45 42
46/*******************/ 43/*******************/
47/* Window routines */ 44/* Window routines */
48/*******************/ 45/*******************/
49 46
diff --git a/noncore/games/kbill/field.cpp b/noncore/games/kbill/field.cpp
index a1b3560..a974ab2 100644
--- a/noncore/games/kbill/field.cpp
+++ b/noncore/games/kbill/field.cpp
@@ -1,42 +1,41 @@
1/*************************************************************************** 1/***************************************************************************
2 field.cpp - description 2 field.cpp - description
3 ------------------- 3 -------------------
4 begin : Thu Dec 30 1999 4 begin : Thu Dec 30 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#include <qpainter.h>
19 18
20#include "objects.h" 19#include "objects.h"
21 20
22#include "field.h" 21#include "field.h"
23 22
24Field::Field(QWidget *parent, const char *name ) : QWidget(parent,name) { 23Field::Field(QWidget *parent, const char *name ) : QWidget(parent,name) {
25 setFixedSize(game.scrwidth, game.scrheight); 24 setFixedSize(game.scrwidth, game.scrheight);
26 setBackgroundColor(white); 25 setBackgroundColor(white);
27 timer = new QTimer(this); 26 timer = new QTimer(this);
28 27
29 playing = false; 28 playing = false;
30 29
31 connect(timer, SIGNAL(timeout()), SLOT(Timer())); 30 connect(timer, SIGNAL(timeout()), SLOT(Timer()));
32} 31}
33 32
34Field::~Field(){ 33Field::~Field(){
35 delete timer; 34 delete timer;
36} 35}
37 36
38void Field::setPixmap(QPixmap *pix) { 37void Field::setPixmap(QPixmap *pix) {
39 this->pix = pix; 38 this->pix = pix;
40} 39}
41 40
42// -------------------------------------------------------- 41// --------------------------------------------------------
diff --git a/noncore/games/kbill/inputbox.cpp b/noncore/games/kbill/inputbox.cpp
index b191ea8..5087fbb 100644
--- a/noncore/games/kbill/inputbox.cpp
+++ b/noncore/games/kbill/inputbox.cpp
@@ -1,43 +1,42 @@
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#include <qdialog.h>
20InputBox::InputBox(QWidget *parent, const char *name, const char *caption, const char *text) : QDialog(parent, name, TRUE) { 19InputBox::InputBox(QWidget *parent, const char *name, const char *caption, const char *text) : QDialog(parent, name, TRUE) {
21 // setCaption(caption); 20 // setCaption(caption);
22// 21//
23 // question = new QLabel(this); 22 // question = new QLabel(this);
24 // question->setText(text); 23 // question->setText(text);
25 // question->setGeometry(10, 10, 240, 50); 24 // question->setGeometry(10, 10, 240, 50);
26// 25//
27 // input = new QLineEdit(this); 26 // input = new QLineEdit(this);
28// input->setGeometry(10, 60, 240, 30); 27// input->setGeometry(10, 60, 240, 30);
29 // input->setFocus(); 28 // input->setFocus();
30 // input->setMaxLength(19); 29 // input->setMaxLength(19);
31// 30//
32// ok = new QPushButton( "Ok", this ); 31// ok = new QPushButton( "Ok", this );
33// ok->setGeometry(10, 100, 100,30 ); 32// ok->setGeometry(10, 100, 100,30 );
34 // ok->setDefault(TRUE); 33 // ok->setDefault(TRUE);
35// connect( ok, SIGNAL(clicked()), SLOT(accept()) ); 34// connect( ok, SIGNAL(clicked()), SLOT(accept()) );
36// 35//
37// cancel = new QPushButton( "Cancel", this ); 36// cancel = new QPushButton( "Cancel", this );
38// cancel->setGeometry(150, 100, 100,30 ); 37// cancel->setGeometry(150, 100, 100,30 );
39// connect( cancel, SIGNAL(clicked()), SLOT(reject()) ); 38// connect( cancel, SIGNAL(clicked()), SLOT(reject()) );
40} 39}
41 40
42InputBox::~InputBox(){ 41InputBox::~InputBox(){
43 delete ok; 42 delete ok;
diff --git a/noncore/games/kbill/kbill.cpp b/noncore/games/kbill/kbill.cpp
index 18a6875..74d7c75 100644
--- a/noncore/games/kbill/kbill.cpp
+++ b/noncore/games/kbill/kbill.cpp
@@ -1,49 +1,45 @@
1/*************************************************************************** 1/***************************************************************************
2 kbill.cpp - description 2 kbill.cpp - 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#include <qmessagebox.h> 18#include <qmessagebox.h>
19#include <qmultilinedit.h>
20#include <qmenubar.h> 19#include <qmenubar.h>
21#include <qtextbrowser.h> 20#include <qtextbrowser.h>
22#include <qfont.h>
23#include <qwidget.h>
24#include "kbill.h" 21#include "kbill.h"
25#include "inputbox.h"
26#include "helpdialog.h" 22#include "helpdialog.h"
27#include "objects.h" 23#include "objects.h"
28#include "Strings.h" 24#include "Strings.h"
29 25
30KBill::KBill() : QMainWindow() { 26KBill::KBill() : QMainWindow() {
31 setCaption(tr("kBill")); 27 setCaption(tr("kBill"));
32 file = new QPopupMenu(); 28 file = new QPopupMenu();
33 file->insertItem(tr("New game"), this, SLOT(NewGame())); 29 file->insertItem(tr("New game"), this, SLOT(NewGame()));
34 pauseid = file->insertItem(tr("Pause game"), this, SLOT(Pause())); 30 pauseid = file->insertItem(tr("Pause game"), this, SLOT(Pause()));
35 //these are dissabled until I fix them 31 //these are dissabled until I fix them
36 //file->insertItem(tr("Warp to level..."), this, SLOT(WarpTo())); 32 //file->insertItem(tr("Warp to level..."), this, SLOT(WarpTo()));
37 //file->insertItem(tr("View high scores"), this, SLOT(ViewHighScores())); 33 //file->insertItem(tr("View high scores"), this, SLOT(ViewHighScores()));
38 34
39 35
40 help = new QPopupMenu(); 36 help = new QPopupMenu();
41 help->insertItem(tr("Story of kBill"), this, SLOT(Story())); 37 help->insertItem(tr("Story of kBill"), this, SLOT(Story()));
42 help->insertItem(tr("Rules"), this, SLOT(Rules())); 38 help->insertItem(tr("Rules"), this, SLOT(Rules()));
43 39
44 40
45 menu = new QMenuBar(this); 41 menu = new QMenuBar(this);
46 menu->insertItem(tr("&File"), file); 42 menu->insertItem(tr("&File"), file);
47 menu->insertSeparator(); 43 menu->insertSeparator();
48 menu->insertItem(tr("&Help"), help); 44 menu->insertItem(tr("&Help"), help);
49 45
diff --git a/noncore/games/kcheckers/kcheckers.cpp b/noncore/games/kcheckers/kcheckers.cpp
index 2eb37e5..a27dd18 100644
--- a/noncore/games/kcheckers/kcheckers.cpp
+++ b/noncore/games/kcheckers/kcheckers.cpp
@@ -1,27 +1,26 @@
1 1
2#include <qimage.h> 2#include <qimage.h>
3#include <qframe.h>
4#include <qlayout.h> 3#include <qlayout.h>
5#include <qmenubar.h> 4#include <qmenubar.h>
6#include <qtoolbar.h> 5#include <qtoolbar.h>
7#include <qpe/config.h> 6#include <qpe/config.h>
8#include <qwhatsthis.h> 7#include <qwhatsthis.h>
9#include <qtoolbutton.h> 8#include <qtoolbutton.h>
10#include <qmessagebox.h> 9#include <qmessagebox.h>
11#include <qapplication.h> 10#include <qapplication.h>
12 11
13#include "kcheckers.h" 12#include "kcheckers.h"
14#include "echeckers.h" 13#include "echeckers.h"
15#include "rcheckers.h" 14#include "rcheckers.h"
16 15
17#include "pics/logo.xpm" 16#include "pics/logo.xpm"
18#include "pics/undo.xpm" 17#include "pics/undo.xpm"
19#include "pics/exit.xpm" 18#include "pics/exit.xpm"
20#include "pics/help.xpm" 19#include "pics/help.xpm"
21#include "pics/wood1.xpm" 20#include "pics/wood1.xpm"
22#include "pics/wood2.xpm" 21#include "pics/wood2.xpm"
23#include "pics/wood3.xpm" 22#include "pics/wood3.xpm"
24#include "pics/green1.xpm" 23#include "pics/green1.xpm"
25#include "pics/green2.xpm" 24#include "pics/green2.xpm"
26#include "pics/green3.xpm" 25#include "pics/green3.xpm"
27#include "pics/marble1.xpm" 26#include "pics/marble1.xpm"
diff --git a/noncore/games/kcheckers/main.cpp b/noncore/games/kcheckers/main.cpp
index 6ac570a..e22dbcc 100644
--- a/noncore/games/kcheckers/main.cpp
+++ b/noncore/games/kcheckers/main.cpp
@@ -1,10 +1,8 @@
1 1
2#include <qpe/qpeapplication.h>
3#include <qfont.h>
4 2
5#include "kcheckers.h" 3#include "kcheckers.h"
6#include <opie/oapplicationfactory.h> 4#include <opie/oapplicationfactory.h>
7 5
8OPIE_EXPORT_APP( OApplicationFactory<KCheckers> ) 6OPIE_EXPORT_APP( OApplicationFactory<KCheckers> )
9 7
10 8
diff --git a/noncore/games/kpacman/board.cpp b/noncore/games/kpacman/board.cpp
index f95f699..f82b5f9 100644
--- a/noncore/games/kpacman/board.cpp
+++ b/noncore/games/kpacman/board.cpp
@@ -1,34 +1,31 @@
1 1
2#include "portable.h"
3 2
4#if defined( KDE2_PORT ) 3#if defined( KDE2_PORT )
5#include <kapp.h> 4#include <kapp.h>
6#include <klocale.h> 5#include <klocale.h>
7#endif 6#endif
8 7
9#include <qrect.h>
10#include <qregexp.h>
11#include <qmessagebox.h> 8#include <qmessagebox.h>
12#include <qfile.h> 9#include <qfile.h>
13#include <qtextstream.h> 10#include <qtextstream.h>
14 11
15#include "board.h" 12#include "board.h"
16#include "bitmaps.h" 13#include "bitmaps.h"
17 14
18Board::Board(int size) : QArray<int> (size) 15Board::Board(int size) : QArray<int> (size)
19{ 16{
20 sz = size; // set size of board 17 sz = size; // set size of board
21 18
22 map = ""; 19 map = "";
23 mapName = ""; // no map loaded so far 20 mapName = ""; // no map loaded so far
24 21
25 init(None); // initialize varibales 22 init(None); // initialize varibales
26} 23}
27 24
28void Board::init(Image image, QString levelName) 25void Board::init(Image image, QString levelName)
29{ 26{
30 prisonEntry = OUT; 27 prisonEntry = OUT;
31 prisonExit = OUT; 28 prisonExit = OUT;
32 fruitHome = OUT; 29 fruitHome = OUT;
33 fruitPosition = OUT; 30 fruitPosition = OUT;
34 pacmanHome = OUT; 31 pacmanHome = OUT;
diff --git a/noncore/games/kpacman/keys.cpp b/noncore/games/kpacman/keys.cpp
index 07ce135..5200bc2 100644
--- a/noncore/games/kpacman/keys.cpp
+++ b/noncore/games/kpacman/keys.cpp
@@ -1,49 +1,44 @@
1 1
2#include "portable.h" 2#include "portable.h"
3 3
4#if defined( KDE2_PORT ) 4#if defined( KDE2_PORT )
5#include <kapp.h> 5#include <kapp.h>
6#include <kconfig.h> 6#include <kconfig.h>
7#include <klocale.h> 7#include <klocale.h>
8#include <kstddirs.h> 8#include <kstddirs.h>
9#include <kaccel.h> 9#include <kaccel.h>
10 10
11#include <keys.h> 11#include <keys.h>
12#include <keys.moc> 12#include <keys.moc>
13#elif defined( QPE_PORT ) 13#elif defined( QPE_PORT )
14#include <qaccel.h> 14#include <qaccel.h>
15#include <qpe/qpeapplication.h> 15#include <qpe/qpeapplication.h>
16#include <qpe/config.h> 16#include <qpe/config.h>
17#include "keys.h" 17#include "keys.h"
18#endif 18#endif
19 19
20#include <qpushbt.h> 20#include <qpushbt.h>
21#include <qlabel.h>
22#include <qframe.h>
23#include <qkeycode.h>
24#include <qpixmap.h>
25#include <qstring.h>
26 21
27Keys::Keys( QWidget *parent, const char *name) 22Keys::Keys( QWidget *parent, const char *name)
28 : QDialog( parent, name, TRUE ) 23 : QDialog( parent, name, TRUE )
29{ 24{
30 //KStandardDirs *dirs = KGlobal::dirs(); 25 //KStandardDirs *dirs = KGlobal::dirs();
31 26
32 QPushButton *okButton = new QPushButton(this); 27 QPushButton *okButton = new QPushButton(this);
33 okButton->setText(tr("Ok")); 28 okButton->setText(tr("Ok"));
34 okButton->setFixedSize(okButton->size()); 29 okButton->setFixedSize(okButton->size());
35 connect( okButton, SIGNAL(clicked()),this, SLOT(ok()) ); 30 connect( okButton, SIGNAL(clicked()),this, SLOT(ok()) );
36 okButton->move(20,210); 31 okButton->move(20,210);
37 32
38 QPushButton *defaultButton = new QPushButton(this); 33 QPushButton *defaultButton = new QPushButton(this);
39 defaultButton->setText(tr("Defaults")); 34 defaultButton->setText(tr("Defaults"));
40 defaultButton->setFixedSize(defaultButton->size()); 35 defaultButton->setFixedSize(defaultButton->size());
41 connect( defaultButton, SIGNAL(clicked()),this, SLOT(defaults()) ); 36 connect( defaultButton, SIGNAL(clicked()),this, SLOT(defaults()) );
42 defaultButton->move(140,210); 37 defaultButton->move(140,210);
43 38
44 QPushButton *cancelButton = new QPushButton(this); 39 QPushButton *cancelButton = new QPushButton(this);
45 cancelButton->setText(tr("Cancel")); 40 cancelButton->setText(tr("Cancel"));
46 cancelButton->setFixedSize(cancelButton->size()); 41 cancelButton->setFixedSize(cancelButton->size());
47 connect( cancelButton, SIGNAL(clicked()),this, SLOT(reject()) ); 42 connect( cancelButton, SIGNAL(clicked()),this, SLOT(reject()) );
48 cancelButton->move(260,210); 43 cancelButton->move(260,210);
49 44
diff --git a/noncore/games/kpacman/kpacman.cpp b/noncore/games/kpacman/kpacman.cpp
index df27c76..be2e46d 100644
--- a/noncore/games/kpacman/kpacman.cpp
+++ b/noncore/games/kpacman/kpacman.cpp
@@ -1,43 +1,38 @@
1 1
2#include "portable.h" 2#include "portable.h"
3 3
4#if defined( KDE2_PORT ) 4#if defined( KDE2_PORT )
5#include <kpacman.h> 5#include <kpacman.h>
6#include <kpacman.moc> 6#include <kpacman.moc>
7#include <kcolordlg.h> 7#include <kcolordlg.h>
8#elif defined( QPE_PORT ) 8#elif defined( QPE_PORT )
9#include <qmenubar.h> 9#include <qmenubar.h>
10#include <qpe/config.h> 10#include <qpe/config.h>
11#include <qapplication.h> 11#include <qapplication.h>
12#include "kpacman.h" 12#include "kpacman.h"
13#endif 13#endif
14 14
15#include <qkeycode.h>
16#include <qcolor.h>
17#include <qstring.h>
18#include <qpopmenu.h>
19#include <qmsgbox.h>
20 15
21Kpacman::Kpacman(QWidget *parent, const char *name) 16Kpacman::Kpacman(QWidget *parent, const char *name)
22 : KTMainWindow(parent, name) 17 : KTMainWindow(parent, name)
23{ 18{
24 schemesPopup = new QList<QPopupMenu>; 19 schemesPopup = new QList<QPopupMenu>;
25 schemesPopup->setAutoDelete(TRUE); 20 schemesPopup->setAutoDelete(TRUE);
26 21
27 menu(); 22 menu();
28 23
29 m_view = new QWidget( this, "m_view" ); 24 m_view = new QWidget( this, "m_view" );
30 m_view->setBackgroundColor( black ); 25 m_view->setBackgroundColor( black );
31 m_layout = new QGridLayout( m_view ); 26 m_layout = new QGridLayout( m_view );
32 m_layout->setMargin( 7 ); 27 m_layout->setMargin( 7 );
33 28
34 view = new KpacmanWidget( this, QString(name)+"widget"); 29 view = new KpacmanWidget( this, QString(name)+"widget");
35 m_layout->addWidget( view, 0, 0 ); 30 m_layout->addWidget( view, 0, 0 );
36 31
37 setCaption( tr("KPacman") ); 32 setCaption( tr("KPacman") );
38 33
39 view->referee->setFocus(); 34 view->referee->setFocus();
40 35
41 connect(view->referee, SIGNAL(setScore(int, int)), 36 connect(view->referee, SIGNAL(setScore(int, int)),
42 view->score, SLOT(setScore(int, int))); 37 view->score, SLOT(setScore(int, int)));
43 connect(view->referee, SIGNAL(setPoints(int)), 38 connect(view->referee, SIGNAL(setPoints(int)),
diff --git a/noncore/games/kpacman/kpacmanwidget.cpp b/noncore/games/kpacman/kpacmanwidget.cpp
index 823d2bf..9631495 100644
--- a/noncore/games/kpacman/kpacmanwidget.cpp
+++ b/noncore/games/kpacman/kpacmanwidget.cpp
@@ -1,45 +1,40 @@
1 1
2#include "portable.h" 2#include "portable.h"
3 3
4#if defined( KDE2_PORT ) 4#if defined( KDE2_PORT )
5#include <kapp.h> 5#include <kapp.h>
6#include <kconfig.h> 6#include <kconfig.h>
7#include <kstddirs.h> 7#include <kstddirs.h>
8#include <kpacmanwidget.h> 8#include <kpacmanwidget.h>
9#include <kpacmanwidget.moc> 9#include <kpacmanwidget.moc>
10#elif defined( QPE_PORT ) 10#elif defined( QPE_PORT )
11#include <qpe/qpeapplication.h> 11#include <qpe/qpeapplication.h>
12#include <qpe/config.h> 12#include <qpe/config.h>
13#include "kpacmanwidget.h" 13#include "kpacmanwidget.h"
14#endif 14#endif
15 15
16#include <qmessagebox.h>
17 16
18#include "bitfont.h"
19#include "score.h"
20#include "referee.h"
21#include "status.h"
22 17
23KpacmanWidget::KpacmanWidget( QWidget *parent, const char *name) 18KpacmanWidget::KpacmanWidget( QWidget *parent, const char *name)
24 : QWidget( parent, name ) 19 : QWidget( parent, name )
25{ 20{
26 score = 0l; 21 score = 0l;
27 referee = 0l; 22 referee = 0l;
28 status = 0l; 23 status = 0l;
29 bitfont = NULL; 24 bitfont = NULL;
30 fontName = ""; 25 fontName = "";
31 26
32 scheme = mode = -1; 27 scheme = mode = -1;
33 confScheme(); 28 confScheme();
34 29
35 score = new Score(this, name, scheme, mode, bitfont); 30 score = new Score(this, name, scheme, mode, bitfont);
36 referee = new Referee( this, name, scheme, mode, bitfont); 31 referee = new Referee( this, name, scheme, mode, bitfont);
37 status = new Status(this, name, scheme, mode); 32 status = new Status(this, name, scheme, mode);
38 33
39 setBackgroundColor( black ); 34 setBackgroundColor( black );
40} 35}
41 36
42KpacmanWidget::~KpacmanWidget() 37KpacmanWidget::~KpacmanWidget()
43{ 38{
44} 39}
45 40
diff --git a/noncore/games/kpacman/monster.cpp b/noncore/games/kpacman/monster.cpp
index 2f402b4..80b4655 100644
--- a/noncore/games/kpacman/monster.cpp
+++ b/noncore/games/kpacman/monster.cpp
@@ -1,26 +1,25 @@
1#include "monster.h" 1#include "monster.h"
2#include "board.h"
3 2
4Monster::Monster(Board *b, int mid) 3Monster::Monster(Board *b, int mid)
5{ 4{
6 board = b; 5 board = b;
7 ID = mid; 6 ID = mid;
8 7
9 setREM(0); 8 setREM(0);
10 setHarmless(0, 0, 0); 9 setHarmless(0, 0, 0);
11 setArrested(0, 0); 10 setArrested(0, 0);
12 setFreedom(board->position(prisonexit)); 11 setFreedom(board->position(prisonexit));
13 if (mid == 0) 12 if (mid == 0)
14 setPrison(board->position(prisonentry)); 13 setPrison(board->position(prisonentry));
15 else 14 else
16 setPrison(board->position(monsterhome, mid)); 15 setPrison(board->position(monsterhome, mid));
17 16
18 actualPosition = lastPosition = OUT; 17 actualPosition = lastPosition = OUT;
19 feetPosition = 0; 18 feetPosition = 0;
20 IQ = 0; 19 IQ = 0;
21 maxBodyPixmaps = 0; 20 maxBodyPixmaps = 0;
22 maxEyesPixmaps = 0; 21 maxEyesPixmaps = 0;
23} 22}
24 23
25void Monster::setMaxPixmaps(int maxBody, int maxEyes) 24void Monster::setMaxPixmaps(int maxBody, int maxEyes)
26{ 25{
diff --git a/noncore/games/kpacman/pacman.cpp b/noncore/games/kpacman/pacman.cpp
index 40f60a8..82524b4 100644
--- a/noncore/games/kpacman/pacman.cpp
+++ b/noncore/games/kpacman/pacman.cpp
@@ -1,26 +1,25 @@
1#include "pacman.h" 1#include "pacman.h"
2#include "board.h"
3 2
4Pacman::Pacman(Board *b) 3Pacman::Pacman(Board *b)
5{ 4{
6 board = b; 5 board = b;
7 setDemo(FALSE); 6 setDemo(FALSE);
8 setAlive(0); 7 setAlive(0);
9 actualPosition = lastPosition = OUT; 8 actualPosition = lastPosition = OUT;
10 mouthPosition = 0; 9 mouthPosition = 0;
11 lastPix = 0; 10 lastPix = 0;
12 maxPixmaps = 0; 11 maxPixmaps = 0;
13} 12}
14 13
15void Pacman::setMaxPixmaps(int max) 14void Pacman::setMaxPixmaps(int max)
16{ 15{
17 if (actualDirection == X && lastPix >= 0) { 16 if (actualDirection == X && lastPix >= 0) {
18 actualDirection = lastPix / (maxPixmaps/4); 17 actualDirection = lastPix / (maxPixmaps/4);
19 if (max < maxPixmaps) 18 if (max < maxPixmaps)
20 mouthPosition = 0; 19 mouthPosition = 0;
21 else 20 else
22 mouthPosition = lastPix % (maxPixmaps/4); 21 mouthPosition = lastPix % (maxPixmaps/4);
23 maxPixmaps = max; 22 maxPixmaps = max;
24 23
25 lastPix = pix(); 24 lastPix = pix();
26 25
diff --git a/noncore/games/kpacman/painter.cpp b/noncore/games/kpacman/painter.cpp
index d8c7460..410d3f5 100644
--- a/noncore/games/kpacman/painter.cpp
+++ b/noncore/games/kpacman/painter.cpp
@@ -1,48 +1,40 @@
1 1
2#include "portable.h" 2#include "portable.h"
3 3
4#if defined( KDE2_PORT ) 4#if defined( KDE2_PORT )
5#include <kapp.h> 5#include <kapp.h>
6#include <kconfig.h> 6#include <kconfig.h>
7#include <kstddirs.h> 7#include <kstddirs.h>
8#elif defined( QPE_PORT ) 8#elif defined( QPE_PORT )
9#include <qpe/qpeapplication.h> 9#include <qpe/qpeapplication.h>
10#include <qpe/config.h> 10#include <qpe/config.h>
11#endif 11#endif
12 12
13#include <qcolor.h> 13
14#include <qpainter.h>
15#include <qpixmap.h>
16#include <qbitmap.h>
17#include <qrect.h>
18#include <qstring.h>
19
20#include <qmessagebox.h>
21#include <qfileinfo.h> 14#include <qfileinfo.h>
22 15
23#include "painter.h" 16#include "painter.h"
24#include "board.h"
25 17
26Painter::Painter( Board *b, QWidget *parent, int Scheme, int Mode, Bitfont *font) 18Painter::Painter( Board *b, QWidget *parent, int Scheme, int Mode, Bitfont *font)
27{ 19{
28 w = parent; 20 w = parent;
29 board = b; 21 board = b;
30 22
31 pointPix = NULL; 23 pointPix = NULL;
32 wallPix = NULL; 24 wallPix = NULL;
33 prisonPix = NULL; 25 prisonPix = NULL;
34 energizerPix = NULL; 26 energizerPix = NULL;
35 fruitPix = NULL; 27 fruitPix = NULL;
36 pacmanPix = NULL; 28 pacmanPix = NULL;
37 dyingPix = NULL; 29 dyingPix = NULL;
38 eyesPix = NULL; 30 eyesPix = NULL;
39 monsterPix = NULL; 31 monsterPix = NULL;
40 fruitScorePix = NULL; 32 fruitScorePix = NULL;
41 monsterScorePix = NULL; 33 monsterScorePix = NULL;
42 34
43 lastPointPixmapName = ""; 35 lastPointPixmapName = "";
44 lastWallPixmapName = ""; 36 lastWallPixmapName = "";
45 lastPrisonPixmapName = ""; 37 lastPrisonPixmapName = "";
46 lastEnergizerPixmapName = ""; 38 lastEnergizerPixmapName = "";
47 lastFruitPixmapName = ""; 39 lastFruitPixmapName = "";
48 lastPacmanPixmapName = ""; 40 lastPacmanPixmapName = "";
diff --git a/noncore/games/kpacman/referee.cpp b/noncore/games/kpacman/referee.cpp
index 1b810d8..2d0f3be 100644
--- a/noncore/games/kpacman/referee.cpp
+++ b/noncore/games/kpacman/referee.cpp
@@ -1,54 +1,45 @@
1 1
2#include "portable.h" 2#include "portable.h"
3 3
4#if defined( KDE2_PORT ) 4#if defined( KDE2_PORT )
5#include <kapp.h> 5#include <kapp.h>
6#include <kconfig.h> 6#include <kconfig.h>
7#include <kstddirs.h> 7#include <kstddirs.h>
8#include <kaccel.h> 8#include <kaccel.h>
9#include <referee.h> 9#include <referee.h>
10#include <referee.moc> 10#include <referee.moc>
11#elif defined( QPE_PORT ) 11#elif defined( QPE_PORT )
12#include <qaccel.h> 12#include <qaccel.h>
13#include <qpe/qpeapplication.h> 13#include <qpe/qpeapplication.h>
14#include <qpe/config.h> 14#include <qpe/config.h>
15#include "referee.h" 15#include "referee.h"
16#endif 16#endif
17 17
18#include <qdatetm.h>
19#include <stdlib.h> 18#include <stdlib.h>
20#include <qtimer.h> 19#include <qtimer.h>
21#include <qevent.h>
22#include <qcolor.h>
23#include <qkeycode.h>
24#include <qfileinfo.h> 20#include <qfileinfo.h>
25 21
26#include "board.h"
27#include "pacman.h"
28#include "monster.h"
29#include "fruit.h"
30#include "painter.h"
31 22
32Referee::Referee( QWidget *parent, const char *name, int Scheme, int Mode, Bitfont *font) 23Referee::Referee( QWidget *parent, const char *name, int Scheme, int Mode, Bitfont *font)
33 : QWidget( parent, name ) 24 : QWidget( parent, name )
34{ 25{
35 gameState.resize(12); 26 gameState.resize(12);
36 gameTimer = 0; 27 gameTimer = 0;
37 energizerTimer = 0; 28 energizerTimer = 0;
38 29
39 focusedPause = FALSE; 30 focusedPause = FALSE;
40 setFocusPolicy(QWidget::StrongFocus); 31 setFocusPolicy(QWidget::StrongFocus);
41 32
42 initKeys(); 33 initKeys();
43 34
44 scheme = Scheme; 35 scheme = Scheme;
45 mode = Mode; 36 mode = Mode;
46 confScheme(); 37 confScheme();
47 38
48 board = new Board(BoardWidth*BoardHeight); 39 board = new Board(BoardWidth*BoardHeight);
49 40
50 pix = new Painter(board, this, scheme, mode, font); 41 pix = new Painter(board, this, scheme, mode, font);
51 setFixedSize(pix->levelPix().size()); 42 setFixedSize(pix->levelPix().size());
52 43
53 pacman = new Pacman(board); 44 pacman = new Pacman(board);
54 45
diff --git a/noncore/games/kpacman/score.cpp b/noncore/games/kpacman/score.cpp
index e91771b..6878b81 100644
--- a/noncore/games/kpacman/score.cpp
+++ b/noncore/games/kpacman/score.cpp
@@ -1,53 +1,47 @@
1 1
2#include "portable.h" 2#include "portable.h"
3 3
4#if defined( KDE2_PORT ) 4#if defined( KDE2_PORT )
5#include <score.h> 5#include <score.h>
6#include <score.moc> 6#include <score.moc>
7 7
8#include <kaccel.h> 8#include <kaccel.h>
9#include <kapp.h> 9#include <kapp.h>
10#include <kconfig.h> 10#include <kconfig.h>
11#include <kstddirs.h> 11#include <kstddirs.h>
12#include <kmessagebox.h> 12#include <kmessagebox.h>
13#elif defined( QPE_PORT ) 13#elif defined( QPE_PORT )
14#include <qaccel.h> 14#include <qaccel.h>
15#include <qpe/config.h> 15#include <qpe/config.h>
16#include "score.h" 16#include "score.h"
17#endif 17#endif
18 18
19#include <stdlib.h> 19#include <stdlib.h>
20#include <ctype.h> 20#include <ctype.h>
21 21
22#include <qpixmap.h>
23#include <qstring.h>
24#include <qdstream.h>
25#include <qkeycode.h>
26#include <qtimer.h> 22#include <qtimer.h>
27#include <qfileinfo.h>
28 23
29#include "bitfont.h"
30 24
31Score::Score(QWidget *parent, const char *name, int Scheme, int Mode, Bitfont *font) : QWidget(parent, name) 25Score::Score(QWidget *parent, const char *name, int Scheme, int Mode, Bitfont *font) : QWidget(parent, name)
32{ 26{
33 setFocusPolicy(QWidget::StrongFocus); 27 setFocusPolicy(QWidget::StrongFocus);
34 28
35 paused = FALSE; 29 paused = FALSE;
36 30
37 lastScore = -1; 31 lastScore = -1;
38 lastPlayer = -1; 32 lastPlayer = -1;
39 33
40 cursorBlinkTimer = 0; 34 cursorBlinkTimer = 0;
41 cursorBlinkMS = -1; 35 cursorBlinkMS = -1;
42 cursor.x = -1; 36 cursor.x = -1;
43 cursor.y = -1; 37 cursor.y = -1;
44 cursor.on = FALSE; 38 cursor.on = FALSE;
45 cursor.chr = QChar('?'); 39 cursor.chr = QChar('?');
46 40
47 initKeys(); 41 initKeys();
48 42
49 scheme = Scheme; 43 scheme = Scheme;
50 mode = Mode; 44 mode = Mode;
51 confScheme(); 45 confScheme();
52 46
53 bitfont = font; 47 bitfont = font;
diff --git a/noncore/games/kpacman/status.cpp b/noncore/games/kpacman/status.cpp
index 2a17c21..02ff63d 100644
--- a/noncore/games/kpacman/status.cpp
+++ b/noncore/games/kpacman/status.cpp
@@ -1,42 +1,40 @@
1 1
2#include "portable.h" 2#include "portable.h"
3 3
4#if defined( KDE2_PORT ) 4#if defined( KDE2_PORT )
5#include <kapp.h> 5#include <kapp.h>
6#include <klocale.h> 6#include <klocale.h>
7#include <kstddirs.h> 7#include <kstddirs.h>
8#include <status.h> 8#include <status.h>
9#include <status.moc> 9#include <status.moc>
10#elif defined( QPE_PORT ) 10#elif defined( QPE_PORT )
11#include <qpe/qpeapplication.h> 11#include <qpe/qpeapplication.h>
12#include <qpe/config.h> 12#include <qpe/config.h>
13#include "status.h" 13#include "status.h"
14#endif 14#endif
15 15
16#include <qpixmap.h>
17#include <qbitmap.h> 16#include <qbitmap.h>
18#include <qstring.h>
19#include <qmsgbox.h> 17#include <qmsgbox.h>
20#include <qfileinfo.h> 18#include <qfileinfo.h>
21 19
22Status::Status( QWidget *parent, const char *name, int Scheme, int Mode ) : 20Status::Status( QWidget *parent, const char *name, int Scheme, int Mode ) :
23 QWidget( parent, name ) 21 QWidget( parent, name )
24{ 22{
25 qWarning("Status::Status"); 23 qWarning("Status::Status");
26 actualLifes = 0; 24 actualLifes = 0;
27 actualLevel = 0; 25 actualLevel = 0;
28 26
29 lifesPix = NULL; 27 lifesPix = NULL;
30 levelPix = NULL; 28 levelPix = NULL;
31 29
32 scheme = Scheme; 30 scheme = Scheme;
33 mode = Mode; 31 mode = Mode;
34 level = 0; 32 level = 0;
35 33
36 confScheme(); 34 confScheme();
37} 35}
38 36
39QList<QPixmap> *Status::loadPixmap(QWidget *parent, QString pixmapName, 37QList<QPixmap> *Status::loadPixmap(QWidget *parent, QString pixmapName,
40 QList<QPixmap> *pixmaps) 38 QList<QPixmap> *pixmaps)
41{ 39{
42 if (pixmaps == NULL) { 40 if (pixmaps == NULL) {
diff --git a/noncore/games/mindbreaker/mindbreaker.cpp b/noncore/games/mindbreaker/mindbreaker.cpp
index e1f43d0..2b924c6 100644
--- a/noncore/games/mindbreaker/mindbreaker.cpp
+++ b/noncore/games/mindbreaker/mindbreaker.cpp
@@ -4,54 +4,50 @@
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "mindbreaker.h" 21#include "mindbreaker.h"
22 22
23#include <qtopia/resource.h> 23#include <qtopia/resource.h>
24#include <qtopia/config.h> 24#include <qtopia/config.h>
25#include <qtopia/qpeapplication.h> 25#include <qtopia/qpeapplication.h>
26#include <qtoolbar.h> 26#include <qtoolbar.h>
27 27
28#include <qpainter.h>
29#include <qpixmap.h>
30#include <qtoolbutton.h> 28#include <qtoolbutton.h>
31#include <qpushbutton.h>
32#include <qmessagebox.h> 29#include <qmessagebox.h>
33#include <qlabel.h>
34#include <qlayout.h> 30#include <qlayout.h>
35#include <qtimer.h> 31#include <qtimer.h>
36 32
37#include <stdlib.h> 33#include <stdlib.h>
38#include <sys/time.h> 34#include <sys/time.h>
39#include <unistd.h> 35#include <unistd.h>
40 36
41static int pegRTTI = 3393393; 37static int pegRTTI = 3393393;
42 38
43static int adjusted_panel_height; 39static int adjusted_panel_height;
44static int adjusted_panel_width; 40static int adjusted_panel_width;
45 41
46static int adjusted_bin_margin; 42static int adjusted_bin_margin;
47static int adjusted_peg_size; 43static int adjusted_peg_size;
48static int adjusted_answerpeg_size; 44static int adjusted_answerpeg_size;
49 45
50static int adjusted_title_height; 46static int adjusted_title_height;
51static int adjusted_title_width; 47static int adjusted_title_width;
52 48
53static int adjusted_first_peg_x_diff; 49static int adjusted_first_peg_x_diff;
54static int adjusted_first_peg_y_diff; 50static int adjusted_first_peg_y_diff;
55static int adjusted_peg_spacing; 51static int adjusted_peg_spacing;
56 52
57static int adjusted_answerpegx; 53static int adjusted_answerpegx;
diff --git a/noncore/games/minesweep/main.cpp b/noncore/games/minesweep/main.cpp
index bd70f7c..e187be5 100644
--- a/noncore/games/minesweep/main.cpp
+++ b/noncore/games/minesweep/main.cpp
@@ -1,27 +1,26 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "minesweep.h" 21#include "minesweep.h"
22 22
23#include <qpe/qpeapplication.h>
24#include <opie/oapplicationfactory.h> 23#include <opie/oapplicationfactory.h>
25 24
26OPIE_EXPORT_APP( OApplicationFactory<MineSweep> ) 25OPIE_EXPORT_APP( OApplicationFactory<MineSweep> )
27 26
diff --git a/noncore/games/minesweep/minefield.cpp b/noncore/games/minesweep/minefield.cpp
index 1790110..72c05b0 100644
--- a/noncore/games/minesweep/minefield.cpp
+++ b/noncore/games/minesweep/minefield.cpp
@@ -1,52 +1,48 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "minefield.h" 20#include "minefield.h"
21 21
22#include <qtopia/config.h> 22#include <qtopia/config.h>
23#include <qtopia/qpeapplication.h> 23#include <qtopia/qpeapplication.h>
24 24
25#include <qpainter.h>
26#include <qdrawutil.h>
27#include <qpixmap.h>
28#include <qimage.h>
29#include <qtimer.h> 25#include <qtimer.h>
30 26
31#include <stdlib.h> 27#include <stdlib.h>
32 28
33static const char *pix_flag[]={ 29static const char *pix_flag[]={
34"13 13 3 1", 30"13 13 3 1",
35"# c #000000", 31"# c #000000",
36"x c #ff0000", 32"x c #ff0000",
37". c None", 33". c None",
38".............", 34".............",
39".............", 35".............",
40".....#xxxxxx.", 36".....#xxxxxx.",
41".....#xxxxxx.", 37".....#xxxxxx.",
42".....#xxxxxx.", 38".....#xxxxxx.",
43".....#xxxxxx.", 39".....#xxxxxx.",
44".....#.......", 40".....#.......",
45".....#.......", 41".....#.......",
46".....#.......", 42".....#.......",
47".....#.......", 43".....#.......",
48"...#####.....", 44"...#####.....",
49"..#######....", 45"..#######....",
50"............."}; 46"............."};
51 47
52static const char *pix_mine[]={ 48static const char *pix_mine[]={
diff --git a/noncore/games/minesweep/minesweep.cpp b/noncore/games/minesweep/minesweep.cpp
index d707dab..4a6a92c 100644
--- a/noncore/games/minesweep/minesweep.cpp
+++ b/noncore/games/minesweep/minesweep.cpp
@@ -6,56 +6,51 @@
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "minesweep.h" 21#include "minesweep.h"
22#include "minefield.h" 22#include "minefield.h"
23 23
24#include <qtopia/qpeapplication.h> 24#include <qtopia/qpeapplication.h>
25#include <qtopia/resource.h> 25#include <qtopia/resource.h>
26#include <qtopia/config.h> 26#include <qtopia/config.h>
27 27
28#include <qtoolbar.h> 28#include <qtoolbar.h>
29#include <qmenubar.h> 29#include <qmenubar.h>
30#include <qpopupmenu.h>
31#include <qpushbutton.h> 30#include <qpushbutton.h>
32#include <qlcdnumber.h> 31#include <qlcdnumber.h>
33#include <qmessagebox.h>
34#include <qtimer.h> 32#include <qtimer.h>
35#include <qpalette.h>
36#include <qapplication.h>
37#include <qlayout.h>
38#include <qlabel.h> 33#include <qlabel.h>
39 34
40#include <stdlib.h> 35#include <stdlib.h>
41#include <time.h> 36#include <time.h>
42 37
43 38
44 39
45 40
46static const char *pix_new[]={ 41static const char *pix_new[]={
47"20 20 3 1", 42"20 20 3 1",
48" c None", 43" c None",
49"# c #00FF00", 44"# c #00FF00",
50". c #000000", 45". c #000000",
51" ", 46" ",
52" ...... ", 47" ...... ",
53" ..######.. ", 48" ..######.. ",
54" .##########. ", 49" .##########. ",
55" .############. ", 50" .############. ",
56" .##############. ", 51" .##############. ",
57" .##############. ", 52" .##############. ",
58" .################. ", 53" .################. ",
59" .################. ", 54" .################. ",
60" .################. ", 55" .################. ",
61" .################. ", 56" .################. ",
diff --git a/noncore/games/oyatzee/oyatzee.cpp b/noncore/games/oyatzee/oyatzee.cpp
index 0bd22f6..86318db 100644
--- a/noncore/games/oyatzee/oyatzee.cpp
+++ b/noncore/games/oyatzee/oyatzee.cpp
@@ -1,36 +1,30 @@
1#include "oyatzee.h" 1#include "oyatzee.h"
2 2
3#include <qmessagebox.h> 3#include <qmessagebox.h>
4#include <qapplication.h>
5#include <qdir.h>
6#include <qlabel.h>
7#include <qpushbutton.h> 4#include <qpushbutton.h>
8#include <qtimer.h>
9#include <qvbox.h>
10#include <qpainter.h> 5#include <qpainter.h>
11#include <qlayout.h> 6#include <qlayout.h>
12#include <qpoint.h>
13 7
14#include <stdlib.h> 8#include <stdlib.h>
15 9
16OYatzee::OYatzee( QWidget *parent , const char *name, WFlags fl ) : QMainWindow( parent , name , fl ) 10OYatzee::OYatzee( QWidget *parent , const char *name, WFlags fl ) : QMainWindow( parent , name , fl )
17{ 11{
18 QWidget *thing = new QWidget( this ); 12 QWidget *thing = new QWidget( this );
19 setCentralWidget( thing ); 13 setCentralWidget( thing );
20 14
21 setCaption( tr( "OYatzee" ) ); 15 setCaption( tr( "OYatzee" ) );
22 16
23 setPlayerNumber( 4 ); 17 setPlayerNumber( 4 );
24 setRoundsNumber( 1 ); 18 setRoundsNumber( 1 );
25 19
26 lastPlayerFinished = false; 20 lastPlayerFinished = false;
27 currentPlayer = 1; 21 currentPlayer = 1;
28 22
29 ps.append( new Player( "Carsten" ) ); 23 ps.append( new Player( "Carsten" ) );
30 ps.append( new Player( "Julia" ) ); 24 ps.append( new Player( "Julia" ) );
31 ps.append( new Player( "Christine" ) ); 25 ps.append( new Player( "Christine" ) );
32 ps.append( new Player( "Stephan" ) ); 26 ps.append( new Player( "Stephan" ) );
33 27
34 28
35 QVBoxLayout *vbox = new QVBoxLayout( thing ); 29 QVBoxLayout *vbox = new QVBoxLayout( thing );
36 30
diff --git a/noncore/games/parashoot/base.cpp b/noncore/games/parashoot/base.cpp
index cdf1dfa..5f3c79d 100644
--- a/noncore/games/parashoot/base.cpp
+++ b/noncore/games/parashoot/base.cpp
@@ -1,50 +1,48 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "codes.h" 20#include "codes.h"
21#include "base.h" 21#include "base.h"
22#include "man.h"
23 22
24#include <qtopia/resource.h> 23#include <qtopia/resource.h>
25 24
26#include <qregexp.h>
27 25
28int damage; 26int damage;
29 27
30Base::Base(QCanvas* canvas) : 28Base::Base(QCanvas* canvas) :
31 QCanvasSprite(0, canvas), 29 QCanvasSprite(0, canvas),
32 kaboom("landmine"), 30 kaboom("landmine"),
33 ohdear("crmble01") 31 ohdear("crmble01")
34{ 32{
35 basearray = new QCanvasPixmapArray(); 33 basearray = new QCanvasPixmapArray();
36 QString b0 = Resource::findPixmap("parashoot/b0001"); 34 QString b0 = Resource::findPixmap("parashoot/b0001");
37 b0.replace(QRegExp("0001"),"%1"); 35 b0.replace(QRegExp("0001"),"%1");
38 basearray->readPixmaps(b0, 4); 36 basearray->readPixmaps(b0, 4);
39 setSequence(basearray); 37 setSequence(basearray);
40 setFrame(0); 38 setFrame(0);
41 move(2, canvas->height()-50); 39 move(2, canvas->height()-50);
42 setZ(10); 40 setZ(10);
43 show(); 41 show();
44 damage = 0; 42 damage = 0;
45} 43}
46 44
47void Base::damageBase() 45void Base::damageBase()
48{ 46{
49 damage++; 47 damage++;
50 48
diff --git a/noncore/games/parashoot/cannon.cpp b/noncore/games/parashoot/cannon.cpp
index 5671351..330d850 100644
--- a/noncore/games/parashoot/cannon.cpp
+++ b/noncore/games/parashoot/cannon.cpp
@@ -1,47 +1,46 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include <qtopia/resource.h> 21#include <qtopia/resource.h>
22 22
23#include <qregexp.h>
24 23
25#include "codes.h" 24#include "codes.h"
26#include "cannon.h" 25#include "cannon.h"
27 26
28Cannon::Cannon(QCanvas* canvas) : 27Cannon::Cannon(QCanvas* canvas) :
29 QCanvasSprite(0, canvas) 28 QCanvasSprite(0, canvas)
30{ 29{
31shotsfired=0; 30shotsfired=0;
32 index = 8; 31 index = 8;
33 cannonx = 0; 32 cannonx = 0;
34 cannony = 0; 33 cannony = 0;
35 cannonarray = new QCanvasPixmapArray(); 34 cannonarray = new QCanvasPixmapArray();
36 QString c0 = Resource::findPixmap("parashoot/can0001"); 35 QString c0 = Resource::findPixmap("parashoot/can0001");
37 c0.replace(QRegExp("0001"),"%1"); 36 c0.replace(QRegExp("0001"),"%1");
38 cannonarray->readPixmaps(c0,17); 37 cannonarray->readPixmaps(c0,17);
39 setSequence(cannonarray); 38 setSequence(cannonarray);
40 setFrame(index); 39 setFrame(index);
41 40
42 reposition(); 41 reposition();
43 42
44 movedir = NoDir; 43 movedir = NoDir;
45 moveDelay = 0; 44 moveDelay = 0;
46 setAnimated(TRUE); 45 setAnimated(TRUE);
47 show(); 46 show();
diff --git a/noncore/games/parashoot/helicopter.cpp b/noncore/games/parashoot/helicopter.cpp
index 036b21e..7d91cd1 100644
--- a/noncore/games/parashoot/helicopter.cpp
+++ b/noncore/games/parashoot/helicopter.cpp
@@ -3,49 +3,48 @@
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "helicopter.h" 21#include "helicopter.h"
22#include "man.h" 22#include "man.h"
23#include "codes.h" 23#include "codes.h"
24 24
25#include <qtopia/resource.h> 25#include <qtopia/resource.h>
26 26
27#include <qregexp.h>
28 27
29static QList<Helicopter> all; 28static QList<Helicopter> all;
30 29
31Helicopter::Helicopter(QCanvas* canvas) : 30Helicopter::Helicopter(QCanvas* canvas) :
32 QCanvasSprite(0, canvas), 31 QCanvasSprite(0, canvas),
33 chikachika("aland01") 32 chikachika("aland01")
34{ 33{
35 all.append(this); 34 all.append(this);
36 hits = 0; 35 hits = 0;
37 QCanvasPixmapArray* helicopterarray = new QCanvasPixmapArray(); 36 QCanvasPixmapArray* helicopterarray = new QCanvasPixmapArray();
38 QString h0 = Resource::findPixmap("parashoot/helicopter0001"); 37 QString h0 = Resource::findPixmap("parashoot/helicopter0001");
39 h0.replace(QRegExp("0001"),"%1"); 38 h0.replace(QRegExp("0001"),"%1");
40 helicopterarray->readPixmaps(h0,4 ); 39 helicopterarray->readPixmaps(h0,4 );
41 40
42 setSequence(helicopterarray); 41 setSequence(helicopterarray);
43 setAnimated(true); 42 setAnimated(true);
44 move(canvas->width(), 5); 43 move(canvas->width(), 5);
45 setVelocity(-2, 0); 44 setVelocity(-2, 0);
46 chikachika.playLoop(); 45 chikachika.playLoop();
47 show(); 46 show();
48} 47}
49 48
50Helicopter::~Helicopter() 49Helicopter::~Helicopter()
51{ 50{
diff --git a/noncore/games/parashoot/interface.cpp b/noncore/games/parashoot/interface.cpp
index 948b92c..5c9b0ef 100644
--- a/noncore/games/parashoot/interface.cpp
+++ b/noncore/games/parashoot/interface.cpp
@@ -3,52 +3,48 @@
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "interface.h" 21#include "interface.h"
22#include "man.h" 22#include "man.h"
23 23
24#include <qtopia/qpeapplication.h> 24#include <qtopia/qpeapplication.h>
25#include <qtopia/resource.h> 25#include <qtopia/resource.h>
26 26
27#include <qlabel.h>
28#include <qmessagebox.h>
29#include <qapplication.h>
30#include <qstyle.h>
31#include <qtoolbar.h> 27#include <qtoolbar.h>
32#include <qtoolbutton.h> 28#include <qtoolbutton.h>
33 29
34ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) : 30ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
35 QMainWindow(parent,name,f), 31 QMainWindow(parent,name,f),
36 canvas( 232, 258 ), 32 canvas( 232, 258 ),
37 cannon(NULL), 33 cannon(NULL),
38 base(NULL), 34 base(NULL),
39 gamestopped( true ), 35 gamestopped( true ),
40 waitover( false ), 36 waitover( false ),
41 fanfare("level_up"), 37 fanfare("level_up"),
42 score(0) 38 score(0)
43{ 39{
44 QPEApplication::grabKeyboard(); 40 QPEApplication::grabKeyboard();
45 QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff ); 41 QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff );
46 42
47 updatespeed = 80; 43 updatespeed = 80;
48 canvas.setAdvancePeriod(80); 44 canvas.setAdvancePeriod(80);
49 45
50 pb = new QCanvasView(&canvas, this); 46 pb = new QCanvasView(&canvas, this);
51 pb->setFocus(); 47 pb->setFocus();
52 48
53 setToolBarsMovable( FALSE ); 49 setToolBarsMovable( FALSE );
54 50
diff --git a/noncore/games/parashoot/main.cpp b/noncore/games/parashoot/main.cpp
index ee36d26..40f809f 100644
--- a/noncore/games/parashoot/main.cpp
+++ b/noncore/games/parashoot/main.cpp
@@ -1,27 +1,26 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "interface.h" 21#include "interface.h"
22 22
23#include <qpe/qpeapplication.h>
24#include <opie/oapplicationfactory.h> 23#include <opie/oapplicationfactory.h>
25 24
26OPIE_EXPORT_APP( OApplicationFactory<ParaShoot> ) 25OPIE_EXPORT_APP( OApplicationFactory<ParaShoot> )
27 26
diff --git a/noncore/games/parashoot/man.cpp b/noncore/games/parashoot/man.cpp
index 94807c2..0a151b0 100644
--- a/noncore/games/parashoot/man.cpp
+++ b/noncore/games/parashoot/man.cpp
@@ -3,49 +3,48 @@
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "codes.h" 21#include "codes.h"
22#include "man.h" 22#include "man.h"
23#include "base.h" 23#include "base.h"
24 24
25#include <qtopia/resource.h> 25#include <qtopia/resource.h>
26 26
27#include <qregexp.h>
28 27
29int mancount; 28int mancount;
30 29
31Man::Man(QCanvas* canvas) : 30Man::Man(QCanvas* canvas) :
32 QCanvasSprite(0, canvas), 31 QCanvasSprite(0, canvas),
33 splat("lose") // No tr 32 splat("lose") // No tr
34{ 33{
35 manarray = new QCanvasPixmapArray(); 34 manarray = new QCanvasPixmapArray();
36 QString m0 = Resource::findPixmap("parashoot/man0001"); 35 QString m0 = Resource::findPixmap("parashoot/man0001");
37 m0.replace(QRegExp("0001"),"%1"); 36 m0.replace(QRegExp("0001"),"%1");
38 manarray->readPixmaps(m0, 7); 37 manarray->readPixmaps(m0, 7);
39 setSequence(manarray); 38 setSequence(manarray);
40 setAnimated(true); 39 setAnimated(true);
41 mancount++; 40 mancount++;
42 dead = false; 41 dead = false;
43 start(); 42 start();
44} 43}
45 44
46Man::Man(QCanvas* canvas, int x, int y) : 45Man::Man(QCanvas* canvas, int x, int y) :
47 QCanvasSprite(0, canvas), 46 QCanvasSprite(0, canvas),
48 splat("bang") // No tr 47 splat("bang") // No tr
49{ 48{
50 manarray = new QCanvasPixmapArray(); 49 manarray = new QCanvasPixmapArray();
51 QString m0 = Resource::findPixmap("parashoot/man0001"); 50 QString m0 = Resource::findPixmap("parashoot/man0001");
diff --git a/noncore/games/qasteroids/main.cpp b/noncore/games/qasteroids/main.cpp
index c762990..18a13eb 100644
--- a/noncore/games/qasteroids/main.cpp
+++ b/noncore/games/qasteroids/main.cpp
@@ -1,27 +1,26 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "toplevel.h" 21#include "toplevel.h"
22 22
23#include <qpe/qpeapplication.h>
24#include <opie/oapplicationfactory.h> 23#include <opie/oapplicationfactory.h>
25 24
26 25
27OPIE_EXPORT_APP( OApplicationFactory<KAstTopLevel> ) 26OPIE_EXPORT_APP( OApplicationFactory<KAstTopLevel> )
diff --git a/noncore/games/qasteroids/toplevel.cpp b/noncore/games/qasteroids/toplevel.cpp
index c4fea89..9053d3d 100644
--- a/noncore/games/qasteroids/toplevel.cpp
+++ b/noncore/games/qasteroids/toplevel.cpp
@@ -8,53 +8,51 @@
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************//* 19**********************************************************************//*
20 * KAsteroids - Copyright (c) Martin R. Jones 1997 20 * KAsteroids - Copyright (c) Martin R. Jones 1997
21 * 21 *
22 * Part of the KDE project 22 * Part of the KDE project
23 */ 23 */
24 //--- toplevel.cpp --- 24 //--- toplevel.cpp ---
25 25
26#include "toplevel.h" 26#include "toplevel.h"
27#include "ledmeter.h" 27#include "ledmeter.h"
28 28
29#include <qpe/qpeapplication.h> 29#include <qpe/qpeapplication.h>
30#include <qpe/resource.h> 30#include <qpe/resource.h>
31 31
32#include <qaccel.h>
33#include <qlabel.h> 32#include <qlabel.h>
34#include <qlayout.h> 33#include <qlayout.h>
35#include <qlcdnumber.h> 34#include <qlcdnumber.h>
36#include <qpushbutton.h>
37 35
38#include <sys/utsname.h> 36#include <sys/utsname.h>
39 37
40 38
41 #define SB_SCORE1 39 #define SB_SCORE1
42 #define SB_LEVEL2 40 #define SB_LEVEL2
43 #define SB_SHIPS3 41 #define SB_SHIPS3
44 42
45struct SLevel 43struct SLevel
46{ 44{
47 int nrocks; 45 int nrocks;
48 double rockSpeed; 46 double rockSpeed;
49}; 47};
50 48
51 #define MAX_LEVELS16 49 #define MAX_LEVELS16
52 50
53SLevel levels[MAX_LEVELS] = 51SLevel levels[MAX_LEVELS] =
54{ 52{
55 { 1, 0.4 }, 53 { 1, 0.4 },
56 { 1, 0.6 }, 54 { 1, 0.6 },
57 { 2, 0.5 }, 55 { 2, 0.5 },
58 { 2, 0.7 }, 56 { 2, 0.7 },
59 { 2, 0.8 }, 57 { 2, 0.8 },
60 { 3, 0.6 }, 58 { 3, 0.6 },
diff --git a/noncore/games/qasteroids/view.cpp b/noncore/games/qasteroids/view.cpp
index 448a54a..352c63b 100644
--- a/noncore/games/qasteroids/view.cpp
+++ b/noncore/games/qasteroids/view.cpp
@@ -5,51 +5,48 @@
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************//* 19**********************************************************************//*
20 * KAsteroids - Copyright (c) Martin R. Jones 1997 20 * KAsteroids - Copyright (c) Martin R. Jones 1997
21 * 21 *
22 * Part of the KDE project 22 * Part of the KDE project
23 */ 23 */
24 24
25#include "view.h" 25#include "view.h"
26 26
27#include <qpe/resource.h> 27#include <qpe/resource.h>
28 28
29#include <qapplication.h>
30#include <qkeycode.h>
31#include <qaccel.h>
32 29
33#include <stdlib.h> 30#include <stdlib.h>
34#include <math.h> 31#include <math.h>
35 32
36#define IMG_BACKGROUND "qasteroids/bg.png" 33#define IMG_BACKGROUND "qasteroids/bg.png"
37 34
38#define REFRESH_DELAY 33 35#define REFRESH_DELAY 33
39#define SHIP_SPEED 0.3 36#define SHIP_SPEED 0.3
40#define MISSILE_SPEED 10.0 37#define MISSILE_SPEED 10.0
41#define SHIP_STEPS 64 38#define SHIP_STEPS 64
42#define ROTATE_RATE 2 39#define ROTATE_RATE 2
43#define SHIELD_ON_COST 1 40#define SHIELD_ON_COST 1
44#define SHIELD_HIT_COST 30 41#define SHIELD_HIT_COST 30
45#define BRAKE_ON_COST 4 42#define BRAKE_ON_COST 4
46 43
47#define MAX_ROCK_SPEED 2.5 44#define MAX_ROCK_SPEED 2.5
48#define MAX_POWERUP_SPEED 1.5 45#define MAX_POWERUP_SPEED 1.5
49 #define MAX_SHIP_SPEED 8 46 #define MAX_SHIP_SPEED 8
50#define MAX_BRAKES 5 47#define MAX_BRAKES 5
51#define MAX_SHIELDS 5 48#define MAX_SHIELDS 5
52 #define MAX_FIREPOWER 5 49 #define MAX_FIREPOWER 5
53 50
54#define TEXT_SPEED 4 51#define TEXT_SPEED 4
55 52
diff --git a/noncore/games/sfcave/helpwindow.cpp b/noncore/games/sfcave/helpwindow.cpp
index 544e237..8a5d034 100644
--- a/noncore/games/sfcave/helpwindow.cpp
+++ b/noncore/games/sfcave/helpwindow.cpp
@@ -1,44 +1,42 @@
1/*************************************************************************** 1/***************************************************************************
2 helpwindow.cpp - description 2 helpwindow.cpp - description
3 ------------------- 3 -------------------
4 begin : Sun Sep 8 2002 4 begin : Sun Sep 8 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
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 <qwidget.h>
19#include <qlayout.h> 18#include <qlayout.h>
20#include <qstring.h>
21#include <qtextview.h> 19#include <qtextview.h>
22 20
23#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
24 22
25#include "helpwindow.h" 23#include "helpwindow.h"
26 24
27 25
28#define HELP_TEXT \ 26#define HELP_TEXT \
29"<qt><h1>SFCave Help</h1><p> " \ 27"<qt><h1>SFCave Help</h1><p> " \
30"SFCave is a flying game for the Zaurus.<br><br> " \ 28"SFCave is a flying game for the Zaurus.<br><br> " \
31"The aim is to stay alive for as long as possible and get the highest score " \ 29"The aim is to stay alive for as long as possible and get the highest score " \
32"you can.<br><br>" \ 30"you can.<br><br>" \
33"There are three game types currently - SFCave, Gates, and Fly.<br>" \ 31"There are three game types currently - SFCave, Gates, and Fly.<br>" \
34"<b>SFCave</b> is a remake of the classic SFCave game - fly through the " \ 32"<b>SFCave</b> is a remake of the classic SFCave game - fly through the " \
35"cavern avoiding all the blocks that just happen to be hanging in " \ 33"cavern avoiding all the blocks that just happen to be hanging in " \
36"midair<br><br>" \ 34"midair<br><br>" \
37"<b>Gates</b> is similar to SFCave but instead you must fly through the " \ 35"<b>Gates</b> is similar to SFCave but instead you must fly through the " \
38"without crashing.<br><br>" \ 36"without crashing.<br><br>" \
39"<b>Fly</b> is somewhat different to SFCave and above. Instead, you have " \ 37"<b>Fly</b> is somewhat different to SFCave and above. Instead, you have " \
40"are flying in the open air above a scrolling landscape, and the aim is to " \ 38"are flying in the open air above a scrolling landscape, and the aim is to " \
41"hug the ground - the closer to the land you fly the more points " \ 39"hug the ground - the closer to the land you fly the more points " \
42"scored.<br><br><br>" \ 40"scored.<br><br><br>" \
43"Basic instruction - Press <b>Up</B> or <b>Down</b> on the circle pad to " \ 41"Basic instruction - Press <b>Up</B> or <b>Down</b> on the circle pad to " \
44"start a new game, press the middle of the pad to apply thrust (makes you " \ 42"start a new game, press the middle of the pad to apply thrust (makes you " \
diff --git a/noncore/games/snake/interface.cpp b/noncore/games/snake/interface.cpp
index 2c60693..b5fb5bf 100644
--- a/noncore/games/snake/interface.cpp
+++ b/noncore/games/snake/interface.cpp
@@ -1,54 +1,50 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "interface.h" 21#include "interface.h"
22 22
23#include <qpe/resource.h> 23#include <qpe/resource.h>
24#include <qpe/qpeapplication.h>
25 24
26#include <qpe/qpetoolbar.h> 25#include <qpe/qpetoolbar.h>
27#include <qtoolbutton.h> 26#include <qtoolbutton.h>
28#include <qstyle.h>
29#include <qapplication.h>
30#include <qmessagebox.h>
31 27
32SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : 28SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) :
33 QMainWindow(parent,name,f), 29 QMainWindow(parent,name,f),
34 canvas(232, 258) 30 canvas(232, 258)
35{ 31{
36 setCaption( tr("Snake") ); 32 setCaption( tr("Snake") );
37 QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff ); 33 QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff );
38 QPixmap bg = Resource::loadPixmap("snake/grass"); 34 QPixmap bg = Resource::loadPixmap("snake/grass");
39 canvas.setBackgroundPixmap(bg); 35 canvas.setBackgroundPixmap(bg);
40 canvas.setUpdatePeriod(100); 36 canvas.setUpdatePeriod(100);
41 snake = 0; 37 snake = 0;
42 38
43 cv = new QCanvasView(&canvas, this); 39 cv = new QCanvasView(&canvas, this);
44 40
45 pauseTimer = new QTimer(this); 41 pauseTimer = new QTimer(this);
46 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) ); 42 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) );
47 43
48 setToolBarsMovable( FALSE ); 44 setToolBarsMovable( FALSE );
49 45
50 QToolBar* toolbar = new QToolBar( this); 46 QToolBar* toolbar = new QToolBar( this);
51 toolbar->setHorizontalStretchable( TRUE ); 47 toolbar->setHorizontalStretchable( TRUE );
52 48
53 QPixmap newicon = Resource::loadPixmap("ksnake"); 49 QPixmap newicon = Resource::loadPixmap("ksnake");
54 setIcon(newicon); 50 setIcon(newicon);
diff --git a/noncore/games/snake/main.cpp b/noncore/games/snake/main.cpp
index 77a2769..9a9b167 100644
--- a/noncore/games/snake/main.cpp
+++ b/noncore/games/snake/main.cpp
@@ -1,29 +1,28 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "interface.h" 21#include "interface.h"
22 22
23#include <qpe/qpeapplication.h>
24#include <opie/oapplicationfactory.h> 23#include <opie/oapplicationfactory.h>
25 24
26 25
27OPIE_EXPORT_APP( OApplicationFactory<SnakeGame> ) 26OPIE_EXPORT_APP( OApplicationFactory<SnakeGame> )
28 27
29 28
diff --git a/noncore/games/snake/snake.cpp b/noncore/games/snake/snake.cpp
index 9f19841..8a683ab 100644
--- a/noncore/games/snake/snake.cpp
+++ b/noncore/games/snake/snake.cpp
@@ -1,51 +1,49 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "snake.h" 21#include "snake.h"
22#include "target.h" 22#include "target.h"
23#include "codes.h"
24 23
25#include <qpe/resource.h> 24#include <qpe/resource.h>
26 25
27#include <qregexp.h>
28 26
29static int Piecekey[4][4] = { {6, 0, 4, 3 }, {0, 6, 2, 1 }, { 1, 3, 5, 0 }, {2, 4, 0, 5 } }; 27static int Piecekey[4][4] = { {6, 0, 4, 3 }, {0, 6, 2, 1 }, { 1, 3, 5, 0 }, {2, 4, 0, 5 } };
30 28
31Snake::Snake(QCanvas* c) 29Snake::Snake(QCanvas* c)
32{ 30{
33 canvas = c; 31 canvas = c;
34 score = 0; 32 score = 0;
35 snakelist.setAutoDelete(true); 33 snakelist.setAutoDelete(true);
36 autoMoveTimer = new QTimer(this); 34 autoMoveTimer = new QTimer(this);
37 connect( autoMoveTimer, SIGNAL(timeout()), this, SLOT(moveSnake()) ); 35 connect( autoMoveTimer, SIGNAL(timeout()), this, SLOT(moveSnake()) );
38 createSnake(); 36 createSnake();
39} 37}
40 38
41void Snake::createSnake() 39void Snake::createSnake()
42{ 40{
43 snakeparts = new QCanvasPixmapArray(); 41 snakeparts = new QCanvasPixmapArray();
44 QString s0 = Resource::findPixmap("snake/s0001"); 42 QString s0 = Resource::findPixmap("snake/s0001");
45 s0.replace(QRegExp("0001"),"%1"); 43 s0.replace(QRegExp("0001"),"%1");
46 snakeparts->readPixmaps(s0, 15); 44 snakeparts->readPixmaps(s0, 15);
47 45
48 grow = 0; 46 grow = 0;
49 last = Key_Right; 47 last = Key_Right;
50 48
51 QCanvasSprite* head = new QCanvasSprite(snakeparts, canvas ); 49 QCanvasSprite* head = new QCanvasSprite(snakeparts, canvas );
diff --git a/noncore/games/solitaire/canvascard.cpp b/noncore/games/solitaire/canvascard.cpp
index 7c4a5ba..c36da6c 100644
--- a/noncore/games/solitaire/canvascard.cpp
+++ b/noncore/games/solitaire/canvascard.cpp
@@ -1,53 +1,48 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "cardgame.h"
22#include "canvascard.h" 21#include "canvascard.h"
23 22
24#include <qpe/resource.h> 23#include <qpe/resource.h>
25 24
26#include <qpainter.h>
27#include <qimage.h>
28#include <qpaintdevice.h>
29#include <qbitmap.h>
30#include <qgfx_qws.h> // Needed to get the device's width 25#include <qgfx_qws.h> // Needed to get the device's width
31 26
32#include <math.h> 27#include <math.h>
33 28
34#if defined( QT_QWS_CASSIOPEIA ) 29#if defined( QT_QWS_CASSIOPEIA )
35#define SLOW_HARDWARE 30#define SLOW_HARDWARE
36#endif 31#endif
37 32
38// Seems to be fast enough to me even without Transformations in the library 33// Seems to be fast enough to me even without Transformations in the library
39//#if defined( QT_NO_TRANSFORMATIONS ) && defined( QT_QWS_IPAQ ) 34//#if defined( QT_NO_TRANSFORMATIONS ) && defined( QT_QWS_IPAQ )
40//#define SLOW_HARDWARE 35//#define SLOW_HARDWARE
41//#endif 36//#endif
42 37
43 38
44QBitmap *Create180RotatedBitmap(QBitmap *srcBitmap) 39QBitmap *Create180RotatedBitmap(QBitmap *srcBitmap)
45{ 40{
46#ifdef QT_NO_TRANSFORMATIONS 41#ifdef QT_NO_TRANSFORMATIONS
47 int w = srcBitmap->width(); 42 int w = srcBitmap->width();
48 int h = srcBitmap->height(); 43 int h = srcBitmap->height();
49 QBitmap *dstBitmap = new QBitmap( w, h ); 44 QBitmap *dstBitmap = new QBitmap( w, h );
50 // ### this is very poorly implemented and probably could be much faster 45 // ### this is very poorly implemented and probably could be much faster
51 for (int i = 0; i < w; i++) 46 for (int i = 0; i < w; i++)
52 for (int j = 0; j < h; j++) 47 for (int j = 0; j < h; j++)
53 bitBlt( dstBitmap, i, j, srcBitmap, w - i - 1, h - j - 1, 1, 1 ); 48 bitBlt( dstBitmap, i, j, srcBitmap, w - i - 1, h - j - 1, 1, 1 );
diff --git a/noncore/games/solitaire/canvascardgame.cpp b/noncore/games/solitaire/canvascardgame.cpp
index 9ae2a23..ed5748e 100644
--- a/noncore/games/solitaire/canvascardgame.cpp
+++ b/noncore/games/solitaire/canvascardgame.cpp
@@ -1,55 +1,47 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "cardgame.h"
22#include "canvasshapes.h"
23#include "canvascard.h"
24#include "canvascardgame.h" 21#include "canvascardgame.h"
25 22
26#include <qpe/resource.h>
27#include <qpe/config.h>
28 23
29#include <qmainwindow.h>
30#include <qmenubar.h>
31#include <qpainter.h>
32#include <qgfx_qws.h> 24#include <qgfx_qws.h>
33 25
34#include <stdlib.h> 26#include <stdlib.h>
35#include <limits.h> 27#include <limits.h>
36#include <time.h> 28#include <time.h>
37#include <math.h> 29#include <math.h>
38 30
39 31
40extern int highestZ; 32extern int highestZ;
41 33
42 34
43class CanvasCardPile : public QCanvasRectangle 35class CanvasCardPile : public QCanvasRectangle
44{ 36{
45public: 37public:
46 CanvasCardPile( CanvasCardGame *ccg, QCanvas *canvas ) : QCanvasRectangle( canvas ), parent( ccg ) { 38 CanvasCardPile( CanvasCardGame *ccg, QCanvas *canvas ) : QCanvasRectangle( canvas ), parent( ccg ) {
47 pile = new QPixmap( 0, 0 ); 39 pile = new QPixmap( 0, 0 );
48 pileHeight = 0; 40 pileHeight = 0;
49 firstCard = NULL; 41 firstCard = NULL;
50 } 42 }
51 43
52 void addCard( CanvasCard *card ); 44 void addCard( CanvasCard *card );
53 void advance(int stage); 45 void advance(int stage);
54 void animatedMove() { animatedMove(savedX, savedY); } 46 void animatedMove() { animatedMove(savedX, savedY); }
55 void savePos(void) { savedX = (int)x(); savedY = (int)y(); } 47 void savePos(void) { savedX = (int)x(); savedY = (int)y(); }
diff --git a/noncore/games/solitaire/canvascardwindow.cpp b/noncore/games/solitaire/canvascardwindow.cpp
index c12344a..503bc92 100644
--- a/noncore/games/solitaire/canvascardwindow.cpp
+++ b/noncore/games/solitaire/canvascardwindow.cpp
@@ -1,56 +1,51 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "canvascardwindow.h" 21#include "canvascardwindow.h"
22#include "patiencecardgame.h"
23#include "freecellcardgame.h" 22#include "freecellcardgame.h"
24#include "chicanecardgame.h" 23#include "chicanecardgame.h"
25#include "harpcardgame.h" 24#include "harpcardgame.h"
26#include "teeclubcardgame.h" 25#include "teeclubcardgame.h"
27 26
28#include <qpe/resource.h>
29 27
30#include <qmainwindow.h>
31#include <qpopupmenu.h>
32#include <qstyle.h>
33 28
34 29
35CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) : 30CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) :
36 QMainWindow(parent, name, f), canvas(230, 260), snapOn(TRUE), cardBack(4), gameType(0), 31 QMainWindow(parent, name, f), canvas(230, 260), snapOn(TRUE), cardBack(4), gameType(0),
37 cardGame(NULL) 32 cardGame(NULL)
38{ 33{
39 setIcon( Resource::loadPixmap( "cards" ) ); 34 setIcon( Resource::loadPixmap( "cards" ) );
40 setCaption(tr("Patience")); 35 setCaption(tr("Patience"));
41 36
42 // Create Playing Area for Games 37 // Create Playing Area for Games
43 if ( QPixmap::defaultDepth() < 12 ) { 38 if ( QPixmap::defaultDepth() < 12 ) {
44// canvas.setBackgroundColor(QColor(0x51, 0x74, 0x6B)); 39// canvas.setBackgroundColor(QColor(0x51, 0x74, 0x6B));
45// canvas.setBackgroundColor(QColor(0x20, 0xb0, 0x50)); 40// canvas.setBackgroundColor(QColor(0x20, 0xb0, 0x50));
46 canvas.setBackgroundColor(QColor(0x08, 0x98, 0x2D)); 41 canvas.setBackgroundColor(QColor(0x08, 0x98, 0x2D));
47 } else { 42 } else {
48 QPixmap bg; 43 QPixmap bg;
49 bg.convertFromImage( Resource::loadImage( "table_pattern" ), ThresholdDither ); 44 bg.convertFromImage( Resource::loadImage( "table_pattern" ), ThresholdDither );
50 canvas.setBackgroundPixmap(bg); 45 canvas.setBackgroundPixmap(bg);
51 } 46 }
52 47
53#if defined( QT_QWS_CASSIOPEIA ) 48#if defined( QT_QWS_CASSIOPEIA )
54 canvas.setAdvancePeriod(70); 49 canvas.setAdvancePeriod(70);
55#else 50#else
56 canvas.setAdvancePeriod(30); 51 canvas.setAdvancePeriod(30);
diff --git a/noncore/games/solitaire/canvasshapes.cpp b/noncore/games/solitaire/canvasshapes.cpp
index 6ccd4a4..011958d 100644
--- a/noncore/games/solitaire/canvasshapes.cpp
+++ b/noncore/games/solitaire/canvasshapes.cpp
@@ -1,45 +1,43 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include <qpainter.h>
21#include <qcanvas.h>
22#include <qgfx_qws.h> 20#include <qgfx_qws.h>
23#include "canvasshapes.h" 21#include "canvasshapes.h"
24 22
25 23
26CanvasRoundRect::CanvasRoundRect(int x, int y, QCanvas *canvas) : 24CanvasRoundRect::CanvasRoundRect(int x, int y, QCanvas *canvas) :
27 QCanvasRectangle( x, y, ( qt_screen->deviceWidth() < 200 ) ? 20 : 23, ( qt_screen->deviceWidth() < 200 ) ? 27 : 36, canvas) 25 QCanvasRectangle( x, y, ( qt_screen->deviceWidth() < 200 ) ? 20 : 23, ( qt_screen->deviceWidth() < 200 ) ? 27 : 36, canvas)
28{ 26{
29 setZ(0); 27 setZ(0);
30 show(); 28 show();
31} 29}
32 30
33 31
34void CanvasRoundRect::redraw() 32void CanvasRoundRect::redraw()
35{ 33{
36 hide(); 34 hide();
37 show(); 35 show();
38} 36}
39 37
40 38
41void CanvasRoundRect::drawShape(QPainter &p) 39void CanvasRoundRect::drawShape(QPainter &p)
42{ 40{
43 if ( qt_screen->deviceWidth() < 200 ) 41 if ( qt_screen->deviceWidth() < 200 )
44 p.drawRoundRect( (int)x() + 1, (int)y() + 1, 18, 25); 42 p.drawRoundRect( (int)x() + 1, (int)y() + 1, 18, 25);
45 else 43 else
diff --git a/noncore/games/solitaire/card.cpp b/noncore/games/solitaire/card.cpp
index 609e280..52e38ac 100644
--- a/noncore/games/solitaire/card.cpp
+++ b/noncore/games/solitaire/card.cpp
@@ -1,50 +1,47 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "card.h" 21#include "card.h"
22 22
23#include <qpe/config.h>
24 23
25#include <qpoint.h>
26#include <qlist.h>
27 24
28/* 25/*
29Card( eValue v, eSuit s, bool f ) : 26Card( eValue v, eSuit s, bool f ) :
30 val(v), suit(s), faceUp(f), showing(FALSE), ix(0), iy(0), iz(0), cardPile(NULL) { } 27 val(v), suit(s), faceUp(f), showing(FALSE), ix(0), iy(0), iz(0), cardPile(NULL) { }
31virtual ~Card() { } 28virtual ~Card() { }
32eValue getValue() { return val; } 29eValue getValue() { return val; }
33eSuit getSuit() { return suit; } 30eSuit getSuit() { return suit; }
34CardPile *getCardPile() { return cardPile; } 31CardPile *getCardPile() { return cardPile; }
35bool isFacing() { return faceUp; } 32bool isFacing() { return faceUp; }
36bool isShowing() { return showing; } 33bool isShowing() { return showing; }
37bool isRed() { return ((suit == diamonds) || (suit == hearts)); } 34bool isRed() { return ((suit == diamonds) || (suit == hearts)); }
38int getX(void) { return ix; } 35int getX(void) { return ix; }
39int getY(void) { return iy; } 36int getY(void) { return iy; }
40int getZ(void) { return iz; } 37int getZ(void) { return iz; }
41void setCardPile(CardPile *p) { cardPile = p; } 38void setCardPile(CardPile *p) { cardPile = p; }
42void setFace(bool f) { faceUp = f; } 39void setFace(bool f) { faceUp = f; }
43void flip(void) { flipTo(getX(), getY()); } 40void flip(void) { flipTo(getX(), getY()); }
44virtual void setPos(int x, int y, int z) { ix = x; iy = y; iz = z; } 41virtual void setPos(int x, int y, int z) { ix = x; iy = y; iz = z; }
45virtual void move(int x, int y) { ix = x; iy = y; } 42virtual void move(int x, int y) { ix = x; iy = y; }
46virtual void move(QPoint p) { ix = p.x(); iy = p.y(); } 43virtual void move(QPoint p) { ix = p.x(); iy = p.y(); }
47virtual void flipTo(int x, int y, int steps = 8) { ix = x; iy = y; faceUp = !faceUp; redraw(); Q_UNUSED(steps); } 44virtual void flipTo(int x, int y, int steps = 8) { ix = x; iy = y; faceUp = !faceUp; redraw(); Q_UNUSED(steps); }
48virtual void showCard(void) { showing = TRUE; } 45virtual void showCard(void) { showing = TRUE; }
49virtual void hideCard(void) { showing = FALSE; } 46virtual void hideCard(void) { showing = FALSE; }
50virtual void redraw(void) { } 47virtual void redraw(void) { }
diff --git a/noncore/games/solitaire/cardpile.cpp b/noncore/games/solitaire/cardpile.cpp
index aace2e2..1d572be 100644
--- a/noncore/games/solitaire/cardpile.cpp
+++ b/noncore/games/solitaire/cardpile.cpp
@@ -1,51 +1,49 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "cardpile.h" 21#include "cardpile.h"
22#include "card.h" 22#include "card.h"
23 23
24#include <qpe/config.h> 24#include <qpe/config.h>
25#include <qpoint.h>
26 25
27#include <qlist.h>
28 26
29 27
30CardPile::CardPile(int x, int y) : pileX(x), pileY(y), dealing(FALSE), PileResize(FALSE) { 28CardPile::CardPile(int x, int y) : pileX(x), pileY(y), dealing(FALSE), PileResize(FALSE) {
31 pileWidth = 0; 29 pileWidth = 0;
32 pileHeight = 0; 30 pileHeight = 0;
33 pileNextX = pileX; 31 pileNextX = pileX;
34 pileNextY = pileY; 32 pileNextY = pileY;
35 pileCenterX = x + pileWidth / 2; 33 pileCenterX = x + pileWidth / 2;
36 pileCenterY = y + pileHeight / 2; 34 pileCenterY = y + pileHeight / 2;
37 pileRadius = (pileWidth > pileHeight) ? pileWidth : pileHeight; 35 pileRadius = (pileWidth > pileHeight) ? pileWidth : pileHeight;
38 pileOffsetDown = 13; 36 pileOffsetDown = 13;
39} 37}
40 38
41 39
42int CardPile::distanceFromPile(int x, int y) { 40int CardPile::distanceFromPile(int x, int y) {
43 return (pileCenterX-x)*(pileCenterX-x)+(pileCenterY-y)*(pileCenterY-y); 41 return (pileCenterX-x)*(pileCenterX-x)+(pileCenterY-y)*(pileCenterY-y);
44} 42}
45 43
46 44
47int CardPile::distanceFromNextPos(int x, int y) { 45int CardPile::distanceFromNextPos(int x, int y) {
48 return (pileNextX-x)*(pileNextX-x)+(pileNextY-y)*(pileNextY-y); 46 return (pileNextX-x)*(pileNextX-x)+(pileNextY-y)*(pileNextY-y);
49} 47}
50 48
51 49
diff --git a/noncore/games/solitaire/chicanecardgame.cpp b/noncore/games/solitaire/chicanecardgame.cpp
index 6729a94..6c607b9 100644
--- a/noncore/games/solitaire/chicanecardgame.cpp
+++ b/noncore/games/solitaire/chicanecardgame.cpp
@@ -5,49 +5,48 @@
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19** 19**
20** created on base of patiencecardgame by cam (C.A.Mader) 2002 20** created on base of patiencecardgame by cam (C.A.Mader) 2002
21** Rules for this game: 21** Rules for this game:
22 **use 2 decks = 104 cards 22 **use 2 decks = 104 cards
23 **deal 8 rows with 3 hidden cards and one open card 23 **deal 8 rows with 3 hidden cards and one open card
24** append red to black and vice versa 24** append red to black and vice versa
25 **each card can be layed on a free place 25 **each card can be layed on a free place
26 **deal 8 cards at once 26 **deal 8 cards at once
27** 27**
28**********************************************************************/ 28**********************************************************************/
29#include <qgfx_qws.h>
30#include "chicanecardgame.h" 29#include "chicanecardgame.h"
31 30
32 31
33extern int highestZ; 32extern int highestZ;
34 33
35 34
36 ChicaneCardGame::ChicaneCardGame(QCanvas *c, bool snap, QWidget *parent) : CanvasCardGame(*c, snap, parent, 2)// Use 2 Decks 35 ChicaneCardGame::ChicaneCardGame(QCanvas *c, bool snap, QWidget *parent) : CanvasCardGame(*c, snap, parent, 2)// Use 2 Decks
37{ 36{
38 highestZ = 0; 37 highestZ = 0;
39 38
40 for (int i = 0; i < 8; i++) { 39 for (int i = 0; i < 8; i++) {
41 discardPiles[i] = new ChicaneDiscardPile( 27 + i * 26, 10, canvas() ); 40 discardPiles[i] = new ChicaneDiscardPile( 27 + i * 26, 10, canvas() );
42 addCardPile(discardPiles[i]); 41 addCardPile(discardPiles[i]);
43 } 42 }
44 for (int i = 0; i < 8; i++) { 43 for (int i = 0; i < 8; i++) {
45 workingPiles[i] = new ChicaneWorkingPile( 27 + i * 26, 50, canvas() ); 44 workingPiles[i] = new ChicaneWorkingPile( 27 + i * 26, 50, canvas() );
46 addCardPile(workingPiles[i]); 45 addCardPile(workingPiles[i]);
47 } 46 }
48 faceDownDealingPile = new ChicaneFaceDownDeck( 2, 10, canvas() ); 47 faceDownDealingPile = new ChicaneFaceDownDeck( 2, 10, canvas() );
49} 48}
50 49
51 50
52void ChicaneCardGame::deal(void) 51void ChicaneCardGame::deal(void)
53{ 52{
diff --git a/noncore/games/solitaire/freecellcardgame.cpp b/noncore/games/solitaire/freecellcardgame.cpp
index aeb32fc..d474f4e 100644
--- a/noncore/games/solitaire/freecellcardgame.cpp
+++ b/noncore/games/solitaire/freecellcardgame.cpp
@@ -1,44 +1,43 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include <qgfx_qws.h>
21#include "freecellcardgame.h" 20#include "freecellcardgame.h"
22 21
23 22
24extern int highestZ; 23extern int highestZ;
25int numberOfFreeCells = 4; 24int numberOfFreeCells = 4;
26 25
27 26
28FreecellCardGame::FreecellCardGame(QCanvas *c, bool snap, QWidget *parent) : CanvasCardGame(*c, snap, parent) 27FreecellCardGame::FreecellCardGame(QCanvas *c, bool snap, QWidget *parent) : CanvasCardGame(*c, snap, parent)
29{ 28{
30 numberOfFreeCells = 4; 29 numberOfFreeCells = 4;
31 highestZ = 0; 30 highestZ = 0;
32 31
33 int spaceBetweenPiles = ( qt_screen->deviceWidth() < 200 ) ? 21 : 28; 32 int spaceBetweenPiles = ( qt_screen->deviceWidth() < 200 ) ? 21 : 28;
34 int xOrigin = ( qt_screen->deviceWidth() < 200 ) ? 0 : 5; 33 int xOrigin = ( qt_screen->deviceWidth() < 200 ) ? 0 : 5;
35 int spacing = ( qt_screen->deviceWidth() < 200 ) ? 0 : 0; 34 int spacing = ( qt_screen->deviceWidth() < 200 ) ? 0 : 0;
36 35
37 for (int i = 0; i < 4; i++) { 36 for (int i = 0; i < 4; i++) {
38 freecellPiles[i] = new FreecellFreecellPile( xOrigin + i * spaceBetweenPiles, 10, canvas() ); 37 freecellPiles[i] = new FreecellFreecellPile( xOrigin + i * spaceBetweenPiles, 10, canvas() );
39 addCardPile(freecellPiles[i]); 38 addCardPile(freecellPiles[i]);
40 } 39 }
41 for (int i = 0; i < 4; i++) { 40 for (int i = 0; i < 4; i++) {
42 discardPiles[i] = new FreecellDiscardPile( xOrigin + spacing + 6 + (i + 4) * spaceBetweenPiles, 10, canvas() ); 41 discardPiles[i] = new FreecellDiscardPile( xOrigin + spacing + 6 + (i + 4) * spaceBetweenPiles, 10, canvas() );
43 addCardPile(discardPiles[i]); 42 addCardPile(discardPiles[i]);
44 } 43 }
diff --git a/noncore/games/solitaire/harpcardgame.cpp b/noncore/games/solitaire/harpcardgame.cpp
index 0711622..d13d73b 100644
--- a/noncore/games/solitaire/harpcardgame.cpp
+++ b/noncore/games/solitaire/harpcardgame.cpp
@@ -7,49 +7,48 @@
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19** 19**
20** created on base of patiencecardgame by cam (C.A.Mader) 2002 20** created on base of patiencecardgame by cam (C.A.Mader) 2002
21** Rules for this game: 21** Rules for this game:
22** use 2 decks = 104 cards 22** use 2 decks = 104 cards
23** deal 8 rows with one open card in the first place 23** deal 8 rows with one open card in the first place
24** one hidden and one open in the second place and so on 24** one hidden and one open in the second place and so on
25** append red to black and vice versa 25** append red to black and vice versa
26** each card can be layed on a free place 26** each card can be layed on a free place
27** deal 8 cards at once 27** deal 8 cards at once
28** 28**
29** 29**
30**********************************************************************/ 30**********************************************************************/
31#include <qgfx_qws.h>
32#include "harpcardgame.h" 31#include "harpcardgame.h"
33 32
34 33
35extern int highestZ; 34extern int highestZ;
36 35
37 36
38 HarpCardGame::HarpCardGame(QCanvas *c, bool snap, QWidget *parent) : CanvasCardGame(*c, snap, parent, 2)// Use 2 Decks 37 HarpCardGame::HarpCardGame(QCanvas *c, bool snap, QWidget *parent) : CanvasCardGame(*c, snap, parent, 2)// Use 2 Decks
39{ 38{
40 highestZ = 0; 39 highestZ = 0;
41 40
42 for (int i = 0; i < 8; i++) { 41 for (int i = 0; i < 8; i++) {
43 discardPiles[i] = new HarpDiscardPile( 27 + i * 26, 10, canvas() ); 42 discardPiles[i] = new HarpDiscardPile( 27 + i * 26, 10, canvas() );
44 addCardPile(discardPiles[i]); 43 addCardPile(discardPiles[i]);
45 } 44 }
46 for (int i = 0; i < 8; i++) { 45 for (int i = 0; i < 8; i++) {
47 workingPiles[i] = new HarpWorkingPile( 27 + i * 26, 50, canvas() ); 46 workingPiles[i] = new HarpWorkingPile( 27 + i * 26, 50, canvas() );
48 addCardPile(workingPiles[i]); 47 addCardPile(workingPiles[i]);
49 } 48 }
50 faceDownDealingPile = new HarpFaceDownDeck( 2, 10, canvas() ); 49 faceDownDealingPile = new HarpFaceDownDeck( 2, 10, canvas() );
51} 50}
52 51
53 52
54void HarpCardGame::deal(void) 53void HarpCardGame::deal(void)
55{ 54{
diff --git a/noncore/games/solitaire/main.cpp b/noncore/games/solitaire/main.cpp
index bd3cf8b..9301171 100644
--- a/noncore/games/solitaire/main.cpp
+++ b/noncore/games/solitaire/main.cpp
@@ -1,26 +1,25 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "canvascardwindow.h" 21#include "canvascardwindow.h"
22 22
23#include <qpe/qpeapplication.h>
24#include <opie/oapplicationfactory.h> 23#include <opie/oapplicationfactory.h>
25 24
26OPIE_EXPORT_APP( OApplicationFactory<CanvasCardWindow> ) \ No newline at end of file 25OPIE_EXPORT_APP( OApplicationFactory<CanvasCardWindow> ) \ No newline at end of file
diff --git a/noncore/games/solitaire/patiencecardgame.cpp b/noncore/games/solitaire/patiencecardgame.cpp
index 96a599c..756577a 100644
--- a/noncore/games/solitaire/patiencecardgame.cpp
+++ b/noncore/games/solitaire/patiencecardgame.cpp
@@ -1,44 +1,43 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include <qgfx_qws.h>
21#include "patiencecardgame.h" 20#include "patiencecardgame.h"
22 21
23 22
24int highestZ = 0; 23int highestZ = 0;
25 24
26 25
27PatienceCardGame::PatienceCardGame(QCanvas *c, bool snap, QWidget *parent) : CanvasCardGame(*c, snap, parent) 26PatienceCardGame::PatienceCardGame(QCanvas *c, bool snap, QWidget *parent) : CanvasCardGame(*c, snap, parent)
28{ 27{
29 numberOfTimesThroughDeck = 0; 28 numberOfTimesThroughDeck = 0;
30 highestZ = 0; 29 highestZ = 0;
31 30
32 if ( qt_screen->deviceWidth() < 200 ) 31 if ( qt_screen->deviceWidth() < 200 )
33 { 32 {
34 circleCross = new CanvasCircleOrCross( 7, 16, canvas() ); 33 circleCross = new CanvasCircleOrCross( 7, 16, canvas() );
35 rectangle = new CanvasRoundRect( 30, 10, canvas() ); 34 rectangle = new CanvasRoundRect( 30, 10, canvas() );
36 35
37 for (int i = 0; i < 4; i++) 36 for (int i = 0; i < 4; i++)
38 { 37 {
39 discardPiles[i] = new PatienceDiscardPile( 78 + i * 23, 10, canvas() ); 38 discardPiles[i] = new PatienceDiscardPile( 78 + i * 23, 10, canvas() );
40 addCardPile(discardPiles[i]); 39 addCardPile(discardPiles[i]);
41 } 40 }
42 for (int i = 0; i < 7; i++) 41 for (int i = 0; i < 7; i++)
43 { 42 {
44 workingPiles[i] = new PatienceWorkingPile( 5 + i * 23, 50, canvas() ); 43 workingPiles[i] = new PatienceWorkingPile( 5 + i * 23, 50, canvas() );
diff --git a/noncore/games/solitaire/teeclubcardgame.cpp b/noncore/games/solitaire/teeclubcardgame.cpp
index 0941e0d..b1af757 100644
--- a/noncore/games/solitaire/teeclubcardgame.cpp
+++ b/noncore/games/solitaire/teeclubcardgame.cpp
@@ -7,49 +7,48 @@
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19** 19**
20** created on base of patiencecardgame by cam (C.A.Mader) 2002 20** created on base of patiencecardgame by cam (C.A.Mader) 2002
21** Rules for this game: 21** Rules for this game:
22** use 2 decks = 104 cards 22** use 2 decks = 104 cards
23** deal 9 rows with 5 open cards each 23** deal 9 rows with 5 open cards each
24** append one card to each other card which is one step higher 24** append one card to each other card which is one step higher
25** move only columns of cards which are equal in suit 25** move only columns of cards which are equal in suit
26** each card can be layed on a free place 26** each card can be layed on a free place
27** deal 1 card at once on the first pile 27** deal 1 card at once on the first pile
28** 28**
29** 29**
30**********************************************************************/ 30**********************************************************************/
31#include <qgfx_qws.h>
32#include "teeclubcardgame.h" 31#include "teeclubcardgame.h"
33 32
34 33
35extern int highestZ; 34extern int highestZ;
36 35
37 36
38 TeeclubCardGame::TeeclubCardGame(QCanvas *c, bool snap, QWidget *parent) : CanvasCardGame(*c, snap, parent, 2)// Use 2 Decks 37 TeeclubCardGame::TeeclubCardGame(QCanvas *c, bool snap, QWidget *parent) : CanvasCardGame(*c, snap, parent, 2)// Use 2 Decks
39{ 38{
40 highestZ = 0; 39 highestZ = 0;
41 40
42 for (int i = 0; i < 8; i++) { 41 for (int i = 0; i < 8; i++) {
43 discardPiles[i] = new TeeclubDiscardPile( 27 + i * 26, 10, canvas() ); 42 discardPiles[i] = new TeeclubDiscardPile( 27 + i * 26, 10, canvas() );
44 addCardPile(discardPiles[i]); 43 addCardPile(discardPiles[i]);
45 } 44 }
46 for (int i = 0; i < 9; i++) { 45 for (int i = 0; i < 9; i++) {
47 workingPiles[i] = new TeeclubWorkingPile( 2 + i * 26, 50, canvas() ); 46 workingPiles[i] = new TeeclubWorkingPile( 2 + i * 26, 50, canvas() );
48 addCardPile(workingPiles[i]); 47 addCardPile(workingPiles[i]);
49 } 48 }
50 faceDownDealingPile = new TeeclubFaceDownDeck( 2, 10, canvas() ); 49 faceDownDealingPile = new TeeclubFaceDownDeck( 2, 10, canvas() );
51} 50}
52 51
53 52
54void TeeclubCardGame::deal(void) 53void TeeclubCardGame::deal(void)
55{ 54{
diff --git a/noncore/games/tetrix/main.cpp b/noncore/games/tetrix/main.cpp
index fcf4b33..bf1242f 100644
--- a/noncore/games/tetrix/main.cpp
+++ b/noncore/games/tetrix/main.cpp
@@ -1,28 +1,27 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "qtetrix.h" 21#include "qtetrix.h"
22 22
23#include <qpe/qpeapplication.h>
24 23
25#include <opie/oapplicationfactory.h> 24#include <opie/oapplicationfactory.h>
26 25
27OPIE_EXPORT_APP( OApplicationFactory<QTetrix> ) 26OPIE_EXPORT_APP( OApplicationFactory<QTetrix> )
28 27
diff --git a/noncore/games/tetrix/ohighscoredlg.cpp b/noncore/games/tetrix/ohighscoredlg.cpp
index 7581f51..8d8079e 100644
--- a/noncore/games/tetrix/ohighscoredlg.cpp
+++ b/noncore/games/tetrix/ohighscoredlg.cpp
@@ -1,44 +1,43 @@
1/*************************************************************************** 1/***************************************************************************
2 begin : January 2003 2 begin : January 2003
3 copyright : ( C ) 2003 by Carsten Niehaus 3 copyright : ( C ) 2003 by Carsten Niehaus
4 email : cniehaus@handhelds.org 4 email : cniehaus@handhelds.org
5 **************************************************************************/ 5 **************************************************************************/
6 6
7/*************************************************************************** 7/***************************************************************************
8 * * 8 * *
9 * This program is free software; you can redistribute it and/or modify * 9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by * 10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or * 11 * the Free Software Foundation; either version 2 of the License, or *
12 * ( at your option ) any later version. * 12 * ( at your option ) any later version. *
13 * * 13 * *
14 **************************************************************************/ 14 **************************************************************************/
15 15
16#include <qdialog.h> 16#include <qdialog.h>
17#include <qpe/config.h>
18#include <qlayout.h> 17#include <qlayout.h>
19#include <qpe/config.h>
20#include <qpe/qpeapplication.h> 18#include <qpe/qpeapplication.h>
19#include <qpe/config.h>
21 20
22#include <qstring.h> 21#include <qstring.h>
23#include <qhbox.h> 22#include <qhbox.h>
24#include <qvbox.h> 23#include <qvbox.h>
25#include <qlabel.h> 24#include <qlabel.h>
26#include <qlistview.h> 25#include <qlistview.h>
27#include <qlineedit.h> 26#include <qlineedit.h>
28 27
29#include "ohighscoredlg.h" 28#include "ohighscoredlg.h"
30 29
31OHighscore::OHighscore( int score , int playerLevel ) 30OHighscore::OHighscore( int score , int playerLevel )
32{ 31{
33 pLevel = playerLevel; 32 pLevel = playerLevel;
34 getList(); 33 getList();
35 checkIfItIsANewhighscore( score ); 34 checkIfItIsANewhighscore( score );
36} 35}
37 36
38OHighscore::~OHighscore() 37OHighscore::~OHighscore()
39{ 38{
40 std::list<t_playerData*>::iterator deleteIterator = playerData.begin(); 39 std::list<t_playerData*>::iterator deleteIterator = playerData.begin();
41 for ( ; deleteIterator != playerData.end() ; deleteIterator++ ) 40 for ( ; deleteIterator != playerData.end() ; deleteIterator++ )
42 { 41 {
43 delete ( *deleteIterator ); 42 delete ( *deleteIterator );
44 } 43 }
diff --git a/noncore/games/tetrix/qtetrix.cpp b/noncore/games/tetrix/qtetrix.cpp
index 6d29c3f..20cf1a7 100644
--- a/noncore/games/tetrix/qtetrix.cpp
+++ b/noncore/games/tetrix/qtetrix.cpp
@@ -1,55 +1,52 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21 21
22#include "qtetrix.h" 22#include "qtetrix.h"
23 23
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25#include <qpe/config.h>
26 25
27#include <qapplication.h>
28#include <qlabel.h> 26#include <qlabel.h>
29#include <qdatetime.h> 27#include <qdatetime.h>
30#include <qlayout.h> 28#include <qlayout.h>
31#include <qstring.h>
32 29
33#include "ohighscoredlg.h" 30#include "ohighscoredlg.h"
34 31
35 32
36void drawTetrixButton( QPainter *p, int x, int y, int w, int h, 33void drawTetrixButton( QPainter *p, int x, int y, int w, int h,
37 const QColor *color ) 34 const QColor *color )
38{ 35{
39 QColor fc; 36 QColor fc;
40 if ( color ) { 37 if ( color ) {
41 QPointArray a; 38 QPointArray a;
42 a.setPoints( 3, x,y+h-1, x,y, x+w-1,y ); 39 a.setPoints( 3, x,y+h-1, x,y, x+w-1,y );
43 p->setPen( color->light() ); 40 p->setPen( color->light() );
44 p->drawPolyline( a ); 41 p->drawPolyline( a );
45 a.setPoints( 3, x+1,y+h-1, x+w-1,y+h-1, x+w-1,y+1 ); 42 a.setPoints( 3, x+1,y+h-1, x+w-1,y+h-1, x+w-1,y+1 );
46 p->setPen( color->dark() ); 43 p->setPen( color->dark() );
47 p->drawPolyline( a ); 44 p->drawPolyline( a );
48 x++; 45 x++;
49 y++; 46 y++;
50 w -= 2; 47 w -= 2;
51 h -= 2; 48 h -= 2;
52 fc = *color; 49 fc = *color;
53 } 50 }
54 else 51 else
55 fc = p->backgroundColor(); 52 fc = p->backgroundColor();
diff --git a/noncore/games/tetrix/qtetrixb.cpp b/noncore/games/tetrix/qtetrixb.cpp
index 521f171..3c179df 100644
--- a/noncore/games/tetrix/qtetrixb.cpp
+++ b/noncore/games/tetrix/qtetrixb.cpp
@@ -1,50 +1,48 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21 21
22#include "qtetrixb.h" 22#include "qtetrixb.h"
23#include "qtetrix.h" 23#include "qtetrix.h"
24#include <qtimer.h> 24#include <qtimer.h>
25#include <qkeycode.h>
26#include <qpainter.h>
27 25
28const int waitAfterLineTime = 500; 26const int waitAfterLineTime = 500;
29 27
30QTetrixBoard::QTetrixBoard( QWidget *p, const char *name ) 28QTetrixBoard::QTetrixBoard( QWidget *p, const char *name )
31 : QFrame( p, name ) 29 : QFrame( p, name )
32{ 30{
33 setFrameStyle( QFrame::Panel | QFrame::Sunken ); 31 setFrameStyle( QFrame::Panel | QFrame::Sunken );
34 paint = 0; 32 paint = 0;
35 timer = new QTimer(this); 33 timer = new QTimer(this);
36 connect( timer, SIGNAL(timeout()), SLOT(timeout()) ); 34 connect( timer, SIGNAL(timeout()), SLOT(timeout()) );
37 35
38 colors[0].setRgb(200,100,100); 36 colors[0].setRgb(200,100,100);
39 colors[1].setRgb(100,200,100); 37 colors[1].setRgb(100,200,100);
40 colors[2].setRgb(100,100,200); 38 colors[2].setRgb(100,100,200);
41 colors[3].setRgb(200,200,100); 39 colors[3].setRgb(200,200,100);
42 colors[4].setRgb(200,100,200); 40 colors[4].setRgb(200,100,200);
43 colors[5].setRgb(100,200,200); 41 colors[5].setRgb(100,200,200);
44 colors[6].setRgb(218,170, 0); 42 colors[6].setRgb(218,170, 0);
45 43
46 xOffset = -1; // -1 until a resizeEvent is received. 44 xOffset = -1; // -1 until a resizeEvent is received.
47 blockWidth = 20; 45 blockWidth = 20;
48 yOffset = 30; 46 yOffset = 30;
49 blockHeight = 20; 47 blockHeight = 20;
50 noGame = TRUE; 48 noGame = TRUE;
diff --git a/noncore/games/tictac/main.cpp b/noncore/games/tictac/main.cpp
index cfff683..9aafe4c 100644
--- a/noncore/games/tictac/main.cpp
+++ b/noncore/games/tictac/main.cpp
@@ -1,13 +1,12 @@
1/**************************************************************************** 1/****************************************************************************
2** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 2** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of an example program for Qt. This example 4** This file is part of an example program for Qt. This example
5** program may be used, distributed and modified without limitation. 5** program may be used, distributed and modified without limitation.
6** 6**
7*****************************************************************************/ 7*****************************************************************************/
8 8
9#include <qpe/qpeapplication.h>
10#include <opie/oapplicationfactory.h> 9#include <opie/oapplicationfactory.h>
11#include "tictac.h" 10#include "tictac.h"
12 11
13OPIE_EXPORT_APP( OApplicationFactory<TicTacToe> ) 12OPIE_EXPORT_APP( OApplicationFactory<TicTacToe> )
diff --git a/noncore/games/tictac/tictac.cpp b/noncore/games/tictac/tictac.cpp
index 9de3b58..12ce35f 100644
--- a/noncore/games/tictac/tictac.cpp
+++ b/noncore/games/tictac/tictac.cpp
@@ -1,45 +1,41 @@
1/**************************************************************************** 1/****************************************************************************
2 ** tictac.cpp,v 1.3.8.1 2003/08/29 06:50:40 harlekin Exp 2 ** tictac.cpp,v 1.3.8.1 2003/08/29 06:50:40 harlekin Exp
3 ** 3 **
4 ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. 4 ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
5 ** 5 **
6 ** This file is part of an example program for Qt. This example 6 ** This file is part of an example program for Qt. This example
7 ** program may be used, distributed and modified without limitation. 7 ** program may be used, distributed and modified without limitation.
8 ** 8 **
9 *****************************************************************************/ 9 *****************************************************************************/
10 10
11#include "tictac.h" 11#include "tictac.h"
12#include <qpe/qpeapplication.h> 12#include <qpe/qpeapplication.h>
13#include <qpainter.h>
14#include <qdrawutil.h> 13#include <qdrawutil.h>
15#include <qcombobox.h> 14#include <qcombobox.h>
16#include <qcheckbox.h>
17#include <qlabel.h> 15#include <qlabel.h>
18#include <qlayout.h> 16#include <qlayout.h>
19#include <stdlib.h> // rand() function 17#include <stdlib.h> // rand() function
20#include <qdatetime.h> // seed for rand()
21#include <qstringlist.h> //needed for proper internationalization
22 18
23 19
24//*************************************************************************** 20//***************************************************************************
25//* TicTacButton member functions 21//* TicTacButton member functions
26//*************************************************************************** 22//***************************************************************************
27 23
28// -------------------------------------------------------------------------- 24// --------------------------------------------------------------------------
29// Creates a TicTacButton 25// Creates a TicTacButton
30// 26//
31 27
32TicTacButton::TicTacButton( QWidget *parent ) : QPushButton( parent ) 28TicTacButton::TicTacButton( QWidget *parent ) : QPushButton( parent )
33{ 29{
34 t = Blank; // initial type 30 t = Blank; // initial type
35} 31}
36 32
37// -------------------------------------------------------------------------- 33// --------------------------------------------------------------------------
38// Paints TicTacButton 34// Paints TicTacButton
39// 35//
40 36
41void TicTacButton::drawButtonLabel( QPainter *p ) 37void TicTacButton::drawButtonLabel( QPainter *p )
42{ 38{
43 QRect r = rect(); 39 QRect r = rect();
44 p->setPen( QPen( white,2 ) ); // set fat pen 40 p->setPen( QPen( white,2 ) ); // set fat pen
45 if ( t == Circle ) { 41 if ( t == Circle ) {
diff --git a/noncore/games/wordgame/main.cpp b/noncore/games/wordgame/main.cpp
index f32acff..eb3e2f2 100644
--- a/noncore/games/wordgame/main.cpp
+++ b/noncore/games/wordgame/main.cpp
@@ -1,28 +1,27 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "wordgame.h" 21#include "wordgame.h"
22 22
23#include <qpe/qpeapplication.h>
24#include <opie/oapplicationfactory.h> 23#include <opie/oapplicationfactory.h>
25 24
26 25
27OPIE_EXPORT_APP( OApplicationFactory<WordGame> ) 26OPIE_EXPORT_APP( OApplicationFactory<WordGame> )
28 27
diff --git a/noncore/games/wordgame/wordgame.cpp b/noncore/games/wordgame/wordgame.cpp
index c01551d..43a54f8 100644
--- a/noncore/games/wordgame/wordgame.cpp
+++ b/noncore/games/wordgame/wordgame.cpp
@@ -1,73 +1,64 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21 21
22#include "wordgame.h" 22#include "wordgame.h"
23 23
24#include <qpe/applnk.h>
25#include <qpe/global.h> 24#include <qpe/global.h>
26#include <qpe/filemanager.h>
27#include <qpe/resource.h> 25#include <qpe/resource.h>
28#include <qpe/config.h> 26#include <qpe/config.h>
29 27
30#include <qapplication.h> 28#include <qapplication.h>
31#include <qmessagebox.h> 29#include <qmessagebox.h>
32#include <qcombobox.h> 30#include <qcombobox.h>
33#include <qdatetime.h>
34#include <qfileinfo.h>
35#include <qfile.h>
36#include <qdir.h> 31#include <qdir.h>
37#include <qiconset.h>
38#include <qlabel.h>
39#include <qlineedit.h> 32#include <qlineedit.h>
40#include <qpushbutton.h> 33#include <qpushbutton.h>
41#include <qtextstream.h> 34#include <qtextstream.h>
42#include <qtimer.h> 35#include <qtimer.h>
43#include <qpe/qpetoolbar.h> 36#include <qpe/qpetoolbar.h>
44#include <qtoolbutton.h> 37#include <qtoolbutton.h>
45#include <qvbox.h> 38#include <qvbox.h>
46#include <qwidgetstack.h> 39#include <qwidgetstack.h>
47#include <qpainter.h>
48#include <qlayout.h> 40#include <qlayout.h>
49#include <qregexp.h>
50 41
51#include <stdlib.h> 42#include <stdlib.h>
52#include <unistd.h> 43#include <unistd.h>
53#include <pwd.h> 44#include <pwd.h>
54#include <sys/types.h> 45#include <sys/types.h>
55 46
56enum RuleEffects { 47enum RuleEffects {
57 Multiplier=15, 48 Multiplier=15,
58 MultiplyAll=64, 49 MultiplyAll=64,
59 Start=128 50 Start=128
60}; 51};
61 52
62static int tile_smallw = 16; 53static int tile_smallw = 16;
63static int tile_smallh = 16; 54static int tile_smallh = 16;
64static int tile_bigw = 22; 55static int tile_bigw = 22;
65static int tile_bigh = 22; 56static int tile_bigh = 22;
66static int tile_stweak = -2; 57static int tile_stweak = -2;
67static int tile_btweak = -1; 58static int tile_btweak = -1;
68 59
69static const int rack_tiles=7; 60static const int rack_tiles=7;
70 61
71const char* sampleWGR= 62const char* sampleWGR=
72 "wordgame_shapes\n" 63 "wordgame_shapes\n"
73 "15 15\n" 64 "15 15\n"
diff --git a/noncore/games/zlines/ballpainter.cpp b/noncore/games/zlines/ballpainter.cpp
index c2b34e1..622ec29 100644
--- a/noncore/games/zlines/ballpainter.cpp
+++ b/noncore/games/zlines/ballpainter.cpp
@@ -1,52 +1,49 @@
1/*************************************************************************** 1/***************************************************************************
2 ballpainter.cpp - description 2 ballpainter.cpp - description
3 ------------------- 3 -------------------
4 begin : Fri May 19 2000 4 begin : Fri May 19 2000
5 copyright : (C) 2000 by Roman Merzlyakov 5 copyright : (C) 2000 by Roman Merzlyakov
6 email : roman@sbrf.barrt.ru 6 email : roman@sbrf.barrt.ru
7 copyright : (C) 2000 by Roman Razilov 7 copyright : (C) 2000 by Roman Razilov
8 email : Roman.Razilov@gmx.de 8 email : Roman.Razilov@gmx.de
9 ***************************************************************************/ 9 ***************************************************************************/
10 10
11/*************************************************************************** 11/***************************************************************************
12 * * 12 * *
13 * This program is free software; you can redistribute it and/or modify * 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 * 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 * 15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. * 16 * (at your option) any later version. *
17 * * 17 * *
18 ***************************************************************************/ 18 ***************************************************************************/
19 19
20#include <qpe/resource.h> 20#include <qpe/resource.h>
21 21
22#include <qapplication.h>
23#include "ballpainter.h" 22#include "ballpainter.h"
24//#include "shotcounter.h" 23//#include "shotcounter.h"
25#include <qpainter.h> 24#include <qpainter.h>
26#include "linesboard.h"
27//#include <qcolor.h> 25//#include <qcolor.h>
28#include <qjpegio.h>
29 26
30 27
31#define PIXSIZE 21 28#define PIXSIZE 21
32 29
33int colorLinesArr[NCOLORS] = 30int colorLinesArr[NCOLORS] =
34{0x0000ff, 0x00ff00, 0xff0000, 0x00ffff, 0xff00ff, 0xffff00, 0x005080}; 31{0x0000ff, 0x00ff00, 0xff0000, 0x00ffff, 0xff00ff, 0xffff00, 0x005080};
35// 0x00bbggrr 32// 0x00bbggrr
36// red , green , blue , yellow , violet , cyan , brown 33// red , green , blue , yellow , violet , cyan , brown
37 34
38 35
39 36
40BallPainter::BallPainter() 37BallPainter::BallPainter()
41 : QObject() 38 : QObject()
42{ 39{
43 createPixmap(); 40 createPixmap();
44} 41}
45 42
46BallPainter::~BallPainter() 43BallPainter::~BallPainter()
47{ 44{
48} 45}
49 46
50QPixmap* BallPainter::pixmap( enum Pixmaps pix ) 47QPixmap* BallPainter::pixmap( enum Pixmaps pix )
51{ 48{
52 QString name; 49 QString name;
diff --git a/noncore/games/zlines/field.cpp b/noncore/games/zlines/field.cpp
index 2a87739..0adf4ac 100644
--- a/noncore/games/zlines/field.cpp
+++ b/noncore/games/zlines/field.cpp
@@ -1,44 +1,43 @@
1/*************************************************************************** 1/***************************************************************************
2 field.cpp - description 2 field.cpp - description
3 ------------------- 3 -------------------
4begin : Fri May 19 2000 4begin : Fri May 19 2000
5copyright : (C) 2000 by Roman Merzlyakov 5copyright : (C) 2000 by Roman Merzlyakov
6email : roman@sbrf.barrt.ru 6email : roman@sbrf.barrt.ru
7copyright : (C) 2000 by Roman Razilov 7copyright : (C) 2000 by Roman Razilov
8email : Roman.Razilov@gmx.de 8email : Roman.Razilov@gmx.de
9 ***************************************************************************/ 9 ***************************************************************************/
10 10
11/*************************************************************************** 11/***************************************************************************
12 * * 12 * *
13 * This program is free software; you can redistribute it and/or modify * 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 * 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 * 15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. * 16 * (at your option) any later version. *
17 * * 17 * *
18 ***************************************************************************/ 18 ***************************************************************************/
19#include <stdlib.h> 19#include <stdlib.h>
20#include "cfg.h"
21#include "field.h" 20#include "field.h"
22 21
23Field::Field(QWidget* parent, const char* name) 22Field::Field(QWidget* parent, const char* name)
24 : QWidget( parent, name ) 23 : QWidget( parent, name )
25{ 24{
26 clearField(); 25 clearField();
27} 26}
28 27
29Field::~Field() 28Field::~Field()
30{ 29{
31} 30}
32 31
33void Field::clearField() 32void Field::clearField()
34{ 33{
35 for(int y=0; y<NUMCELLSH; y++) 34 for(int y=0; y<NUMCELLSH; y++)
36 for(int x=0; x<NUMCELLSW; x++) 35 for(int x=0; x<NUMCELLSW; x++)
37 field[y][x].clear(); 36 field[y][x].clear();
38} 37}
39void Field::clearAnim() 38void Field::clearAnim()
40{ 39{
41 for(int y=0; y<NUMCELLSH; y++) 40 for(int y=0; y<NUMCELLSH; y++)
42 for(int x=0; x<NUMCELLSW; x++) 41 for(int x=0; x<NUMCELLSW; x++)
43 field[y][x].setAnim( ANIM_NO ); 42 field[y][x].setAnim( ANIM_NO );
44} 43}
diff --git a/noncore/games/zlines/klines.cpp b/noncore/games/zlines/klines.cpp
index 02ff0db..76c94e2 100644
--- a/noncore/games/zlines/klines.cpp
+++ b/noncore/games/zlines/klines.cpp
@@ -2,64 +2,55 @@
2 klines.cpp - description 2 klines.cpp - description
3 ------------------- 3 -------------------
4 begin : Fri May 19 2000 4 begin : Fri May 19 2000
5 copyright : (C) 2000 by Roman Merzlyakov 5 copyright : (C) 2000 by Roman Merzlyakov
6 email : roman@sbrf.barrt.ru 6 email : roman@sbrf.barrt.ru
7 copyright : (C) 2000 by Roman Razilov 7 copyright : (C) 2000 by Roman Razilov
8 email : Roman.Razilov@gmx.de 8 email : Roman.Razilov@gmx.de
9 ***************************************************************************/ 9 ***************************************************************************/
10 10
11/*************************************************************************** 11/***************************************************************************
12 * * 12 * *
13 * This program is free software; you can redistribute it and/or modify * 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 * 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 * 15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. * 16 * (at your option) any later version. *
17 * * 17 * *
18 ***************************************************************************/ 18 ***************************************************************************/
19/* changes 19/* changes
2021.05.2000 Roman Razilov Menu game/Next 2021.05.2000 Roman Razilov Menu game/Next
21*/ 21*/
22// 22//
23// The implementation of the KLines widget 23// The implementation of the KLines widget
24// 24//
25 25
26#include <qkeycode.h>
27#include <qlabel.h>
28#include <qpushbutton.h>
29#include <qtooltip.h>
30#include <qstring.h>
31#include <stdlib.h> 26#include <stdlib.h>
32#include <unistd.h> 27#include <unistd.h>
33#include <time.h> 28#include <time.h>
34 29
35#include <qapplication.h> 30#include <qapplication.h>
36#include <qmenubar.h>
37#include <qpopupmenu.h>
38 31
39 32
40#include "cfg.h"
41#include <qstatusbar.h>
42#include "klines.h" 33#include "klines.h"
43 34
44 35
45/* 36/*
46 Creates the KLines widget and sets saved options (if any). 37 Creates the KLines widget and sets saved options (if any).
47 */ 38 */
48 39
49KLines::KLines(QWidget *par, const char* n, WFlags fl) : QMainWindow(par,n,fl) 40KLines::KLines(QWidget *par, const char* n, WFlags fl) : QMainWindow(par,n,fl)
50{ 41{
51 time_t t; 42 time_t t;
52 time(&t); 43 time(&t);
53 srand((unsigned int)t + getpid()); 44 srand((unsigned int)t + getpid());
54 45
55 setCaption(QString("ZLines")); 46 setCaption(QString("ZLines"));
56 47
57 mwidget = new MainWidget(this); 48 mwidget = new MainWidget(this);
58 setCentralWidget( mwidget ); 49 setCentralWidget( mwidget );
59 50
60 lsb = mwidget->GetLsb(); 51 lsb = mwidget->GetLsb();
61 lPrompt = mwidget->GetPrompt(); 52 lPrompt = mwidget->GetPrompt();
62 53
63 menu = menuBar(); 54 menu = menuBar();
64 game = new QPopupMenu; 55 game = new QPopupMenu;
65 edit = new QPopupMenu; 56 edit = new QPopupMenu;
diff --git a/noncore/games/zlines/linesboard.cpp b/noncore/games/zlines/linesboard.cpp
index 0965b2c..1e59aeb 100644
--- a/noncore/games/zlines/linesboard.cpp
+++ b/noncore/games/zlines/linesboard.cpp
@@ -1,46 +1,43 @@
1/*************************************************************************** 1/***************************************************************************
2 linesboard.cpp - description 2 linesboard.cpp - description
3 ------------------- 3 -------------------
4 begin : Fri May 19 2000 4 begin : Fri May 19 2000
5 copyright : (C) 2000 by Roman Merzlyakov 5 copyright : (C) 2000 by Roman Merzlyakov
6 email : roman@sbrf.barrt.ru 6 email : roman@sbrf.barrt.ru
7 copyright : (C) 2000 by Roman Razilov 7 copyright : (C) 2000 by Roman Razilov
8 email : Roman.Razilov@gmx.de 8 email : Roman.Razilov@gmx.de
9 ***************************************************************************/ 9 ***************************************************************************/
10 10
11/*************************************************************************** 11/***************************************************************************
12 * * 12 * *
13 * This program is free software; you can redistribute it and/or modify * 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 * 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 * 15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. * 16 * (at your option) any later version. *
17 * * 17 * *
18 ***************************************************************************/ 18 ***************************************************************************/
19#include <qpainter.h> 19#include <qpainter.h>
20#include <qpixmap.h>
21#include <qcolor.h>
22#include <qkeycode.h>
23#include <stdlib.h> 20#include <stdlib.h>
24 21
25#include "linesboard.h" 22#include "linesboard.h"
26 23
27/* 24/*
28 Constructs a LinesBoard widget. 25 Constructs a LinesBoard widget.
29*/ 26*/
30 27
31LinesBoard::LinesBoard( BallPainter * abPainter, QWidget* parent, const char* name ) 28LinesBoard::LinesBoard( BallPainter * abPainter, QWidget* parent, const char* name )
32 : Field( parent, name ) 29 : Field( parent, name )
33{ 30{
34 anim = ANIM_NO; 31 anim = ANIM_NO;
35// waypos = 0; 32// waypos = 0;
36// waylen = 0; 33// waylen = 0;
37// jumpingRow = -1; 34// jumpingRow = -1;
38// jumpingCol = -1; 35// jumpingCol = -1;
39 painting = 0; 36 painting = 0;
40 way = new Waypoints[NUMCELLSW*NUMCELLSH]; 37 way = new Waypoints[NUMCELLSW*NUMCELLSH];
41 38
42 bPainter = abPainter; 39 bPainter = abPainter;
43 40
44 setFocusPolicy( NoFocus ); 41 setFocusPolicy( NoFocus );
45 setBackgroundColor( gray ); 42 setBackgroundColor( gray );
46 43
diff --git a/noncore/games/zlines/main.cpp b/noncore/games/zlines/main.cpp
index ff41f95..238e7d3 100644
--- a/noncore/games/zlines/main.cpp
+++ b/noncore/games/zlines/main.cpp
@@ -1,30 +1,29 @@
1/*************************************************************************** 1/***************************************************************************
2 main.cpp - description 2 main.cpp - description
3 ------------------- 3 -------------------
4 begin : Fri May 19 2000 4 begin : Fri May 19 2000
5 copyright : (C) 2000 by Roman Merzlyakov 5 copyright : (C) 2000 by Roman Merzlyakov
6 email : roman@sbrf.barrt.ru 6 email : roman@sbrf.barrt.ru
7 copyright : (C) 2000 by Roman Razilov 7 copyright : (C) 2000 by Roman Razilov
8 email : Roman.Razilov@gmx.de 8 email : Roman.Razilov@gmx.de
9 ***************************************************************************/ 9 ***************************************************************************/
10 10
11/*************************************************************************** 11/***************************************************************************
12 * * 12 * *
13 * This program is free software; you can redistribute it and/or modify * 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 * 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 * 15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. * 16 * (at your option) any later version. *
17 * * 17 * *
18 ***************************************************************************/ 18 ***************************************************************************/
19 /* 19 /*
20 * Roman Razilov 2000-05-19 debug dummmy 20 * Roman Razilov 2000-05-19 debug dummmy
21 * Roman Razilov 2000-05-21 qimgio 21 * Roman Razilov 2000-05-21 qimgio
22*/ 22*/
23 23
24#include <qglobal.h>
25 24
26 25
27#include <opie/oapplicationfactory.h> 26#include <opie/oapplicationfactory.h>
28#include "klines.h" 27#include "klines.h"
29 28
30OPIE_EXPORT_APP( OApplicationFactory<KLines> ) 29OPIE_EXPORT_APP( OApplicationFactory<KLines> )
diff --git a/noncore/games/zlines/mwidget.cpp b/noncore/games/zlines/mwidget.cpp
index 6641fa2..211d3d3 100644
--- a/noncore/games/zlines/mwidget.cpp
+++ b/noncore/games/zlines/mwidget.cpp
@@ -1,45 +1,44 @@
1/*************************************************************************** 1/***************************************************************************
2 mwidget.cpp - description 2 mwidget.cpp - description
3 ------------------- 3 -------------------
4begin : Fri May 19 2000 4begin : Fri May 19 2000
5copyright : (C) 2000 by Roman Merzlyakov 5copyright : (C) 2000 by Roman Merzlyakov
6email : roman@sbrf.barrt.ru 6email : roman@sbrf.barrt.ru
7copyright : (C) 2000 by Roman Razilov 7copyright : (C) 2000 by Roman Razilov
8email : Roman.Razilov@gmx.de 8email : Roman.Razilov@gmx.de
9 ***************************************************************************/ 9 ***************************************************************************/
10 10
11/*************************************************************************** 11/***************************************************************************
12 * * 12 * *
13 * This program is free software; you can redistribute it and/or modify * 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 * 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 * 15 * the Free Software Foundation; either version 2 of the License, or *
16 * (at your option) any later version. * 16 * (at your option) any later version. *
17 * * 17 * *
18 ***************************************************************************/ 18 ***************************************************************************/
19#include "mwidget.h" 19#include "mwidget.h"
20#include <qlayout.h> 20#include <qlayout.h>
21#include "ballpainter.h"
22#include <qhbox.h> 21#include <qhbox.h>
23#include <qlabel.h> 22#include <qlabel.h>
24 23
25MainWidget::MainWidget( QWidget* parent, const char* name ) 24MainWidget::MainWidget( QWidget* parent, const char* name )
26 : QFrame( parent, name ) 25 : QFrame( parent, name )
27{ 26{
28 BallPainter *bPainter = new BallPainter(); 27 BallPainter *bPainter = new BallPainter();
29 28
30 QGridLayout *Form1Layout = new QGridLayout( this ); 29 QGridLayout *Form1Layout = new QGridLayout( this );
31 Form1Layout->setSpacing( 4 ); 30 Form1Layout->setSpacing( 4 );
32 Form1Layout->setMargin( 4 ); 31 Form1Layout->setMargin( 4 );
33 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 32 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
34 Form1Layout->addItem( spacer, 0, 0 ); 33 Form1Layout->addItem( spacer, 0, 0 );
35 34
36 lsb = new LinesBoard(bPainter, this); 35 lsb = new LinesBoard(bPainter, this);
37 36
38 Form1Layout->addWidget( lsb, 0, 1 ); 37 Form1Layout->addWidget( lsb, 0, 1 );
39 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 38 QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
40 Form1Layout->addItem( spacer_2, 0, 2 ); 39 Form1Layout->addItem( spacer_2, 0, 2 );
41 40
42 QHBox *bottom=new QHBox(this); 41 QHBox *bottom=new QHBox(this);
43 42
44 mPoints=new QLabel(bottom); 43 mPoints=new QLabel(bottom);
45 bottom->setStretchFactor(mPoints, 2); 44 bottom->setStretchFactor(mPoints, 2);
diff --git a/noncore/games/zsame/StoneWidget.cpp b/noncore/games/zsame/StoneWidget.cpp
index 49fa1a4..646fc9c 100644
--- a/noncore/games/zsame/StoneWidget.cpp
+++ b/noncore/games/zsame/StoneWidget.cpp
@@ -1,52 +1,47 @@
1/* 1/*
2 * ksame 0.4 - simple Game 2 * ksame 0.4 - simple Game
3 * Copyright (C) 1997,1998 Marcus Kreutzberger 3 * Copyright (C) 1997,1998 Marcus Kreutzberger
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or 7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version. 8 * (at your option) any later version.
9 * 9 *
10 * This program is distributed in the hope that it will be useful, 10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software 16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 * 18 *
19 */ 19 */
20 20
21#include <stdio.h> 21#include <stdio.h>
22#include <stdlib.h> 22#include <stdlib.h>
23 23
24#include <qpainter.h>
25#include <qpixmap.h>
26#include <qbitmap.h>
27#include <qimage.h>
28#include <qcursor.h>
29 24
30 25
31#include <qpe/resource.h> 26#include <qpe/resource.h>
32 27
33#include <time.h> 28#include <time.h>
34#include <assert.h> 29#include <assert.h>
35 30
36#include "StoneWidget.h" 31#include "StoneWidget.h"
37 32
38 33
39 34
40struct StoneSlice { 35struct StoneSlice {
41 QPixmap stone; 36 QPixmap stone;
42}; 37};
43 38
44 39
45StoneWidget::StoneWidget( QWidget *parent, int x, int y ) 40StoneWidget::StoneWidget( QWidget *parent, int x, int y )
46 : QWidget(parent,"StoneWidget"), stonefield(x,y) 41 : QWidget(parent,"StoneWidget"), stonefield(x,y)
47{ 42{
48// setBackgroundPixmap(QPixmap(locate("wallpaper", "Time-For-Lunch-2.jpg"))); 43// setBackgroundPixmap(QPixmap(locate("wallpaper", "Time-For-Lunch-2.jpg")));
49// QPixmap stonemap(locate("appdata", "stones.png")); 44// QPixmap stonemap(locate("appdata", "stones.png"));
50 45
51 QPixmap stonemap = Resource::loadPixmap("zsame/stones" ); 46 QPixmap stonemap = Resource::loadPixmap("zsame/stones" );
52 assert(!stonemap.isNull()); 47 assert(!stonemap.isNull());
diff --git a/noncore/games/zsame/ZSameWidget.cpp b/noncore/games/zsame/ZSameWidget.cpp
index 5001b55..45a877f 100644
--- a/noncore/games/zsame/ZSameWidget.cpp
+++ b/noncore/games/zsame/ZSameWidget.cpp
@@ -1,67 +1,60 @@
1/* Yo Emacs, this is -*- C++ -*- */ 1/* Yo Emacs, this is -*- C++ -*- */
2/* 2/*
3 * ksame 0.4 - simple Game 3 * ksame 0.4 - simple Game
4 * Copyright (C) 1997,1998 Marcus Kreutzberger 4 * Copyright (C) 1997,1998 Marcus Kreutzberger
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or 8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version. 9 * (at your option) any later version.
10 * 10 *
11 * This program is distributed in the hope that it will be useful, 11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details. 14 * GNU General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU General Public License 16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 * 19 *
20 */ 20 */
21 21
22#include <stdio.h> 22#include <stdio.h>
23 23
24#include <qwidget.h>
25#include <qpushbutton.h>
26#include <qpixmap.h>
27#include <qvbox.h>
28#include <qpopupmenu.h>
29#include <qtoolbar.h> 24#include <qtoolbar.h>
30#include <qmenubar.h> 25#include <qmenubar.h>
31 26
32#include <qapplication.h> 27#include <qapplication.h>
33#include <qaction.h> 28#include <qaction.h>
34#include <qmessagebox.h> 29#include <qmessagebox.h>
35 30
36#include <qpe/resource.h> 31#include <qpe/resource.h>
37#include <opie/oapplicationfactory.h> 32#include <opie/oapplicationfactory.h>
38#include <kapplication.h> 33#include <kapplication.h>
39 34
40 35
41#include "ZSameWidget.h" 36#include "ZSameWidget.h"
42#include "StoneWidget.h"
43#include "version.h"
44 37
45static int default_colors=3; 38static int default_colors=3;
46 39
47#define i18n tr 40#define i18n tr
48 41
49 42
50OPIE_EXPORT_APP( OApplicationFactory<ZSameWidget> ) 43OPIE_EXPORT_APP( OApplicationFactory<ZSameWidget> )
51 44
52 45
53 46
54ZSameWidget::ZSameWidget( QWidget* parent, const char* name, WFlags fl ) 47ZSameWidget::ZSameWidget( QWidget* parent, const char* name, WFlags fl )
55 : QMainWindow( parent, name, fl ) 48 : QMainWindow( parent, name, fl )
56{ 49{
57 setCaption(tr("ZSame")); 50 setCaption(tr("ZSame"));
58 51
59 setToolBarsMovable( false ); 52 setToolBarsMovable( false );
60 QToolBar* con = new QToolBar( this ); 53 QToolBar* con = new QToolBar( this );
61 con->setHorizontalStretchable( true ); 54 con->setHorizontalStretchable( true );
62 QMenuBar* mb = new QMenuBar( con ); 55 QMenuBar* mb = new QMenuBar( con );
63 QToolBar* tb = new QToolBar( this ); 56 QToolBar* tb = new QToolBar( this );
64 57
65 QPopupMenu* fileMenu = new QPopupMenu( this ); 58 QPopupMenu* fileMenu = new QPopupMenu( this );
66 59
67 QAction* a = new QAction(tr("New Game"), Resource::loadIconSet("new") , 60 QAction* a = new QAction(tr("New Game"), Resource::loadIconSet("new") ,