summaryrefslogtreecommitdiff
path: root/noncore/games
authorkergoth <kergoth>2003-08-09 16:24:58 (UTC)
committer kergoth <kergoth>2003-08-09 16:24:58 (UTC)
commite16d333ec2e8509fc665921ca106c25325bae9e0 (patch) (unidiff)
tree9e9068190a15bc9b2a52ab33b40881128f732c0e /noncore/games
parent1c58d1407f9584fedcdae390a04e2b37e5853361 (diff)
downloadopie-e16d333ec2e8509fc665921ca106c25325bae9e0.zip
opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.gz
opie-e16d333ec2e8509fc665921ca106c25325bae9e0.tar.bz2
Merge from BRANCH_1_0
Diffstat (limited to 'noncore/games') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/backgammon/backgammon.control2
-rw-r--r--noncore/games/backgammon/backgammon.cpp2
-rw-r--r--noncore/games/backgammon/backgammon.h1
-rw-r--r--noncore/games/bounce/kbounce.cpp6
-rw-r--r--noncore/games/buzzword/buzzword.cpp8
-rw-r--r--noncore/games/fifteen/opie-fifteen.control2
-rw-r--r--noncore/games/go/opie-go.control2
-rw-r--r--noncore/games/kpacman/kpacman.cpp2
-rw-r--r--noncore/games/mindbreaker/opie-mindbreaker.control2
-rw-r--r--noncore/games/minesweep/opie-minesweep.control2
-rw-r--r--noncore/games/parashoot/opie-parashoot.control2
-rw-r--r--noncore/games/qasteroids/opie-qasteroids.control2
-rw-r--r--noncore/games/sfcave-sdl/sfcave-sdl.control2
-rw-r--r--noncore/games/sfcave/opie-sfcave.control2
-rw-r--r--noncore/games/snake/interface.cpp4
-rw-r--r--noncore/games/snake/opie-snake.control2
-rw-r--r--noncore/games/solitaire/canvascardwindow.cpp14
-rw-r--r--noncore/games/solitaire/opie-solitaire.control2
-rw-r--r--noncore/games/tetrix/opie-tetrix.control2
-rw-r--r--noncore/games/tictac/main.cpp2
-rw-r--r--noncore/games/tictac/opie-tictac.control2
-rw-r--r--noncore/games/wordgame/opie-wordgame.control2
-rw-r--r--noncore/games/wordgame/wordgame.cpp4
23 files changed, 35 insertions, 36 deletions
diff --git a/noncore/games/backgammon/backgammon.control b/noncore/games/backgammon/backgammon.control
index b75bc60..6468181 100644
--- a/noncore/games/backgammon/backgammon.control
+++ b/noncore/games/backgammon/backgammon.control
@@ -1,10 +1,10 @@
1Package: backgammon 1Package: backgammon
2Files: bin/backgammon apps/Games/backgammon.desktop pics/backgammon help/en/html/backgammon.html 2Files: bin/backgammon apps/Games/backgammon.desktop pics/backgammon help/en/html/backgammon.html
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Ralf Waspe <rwaspe@web.de> 5Maintainer: Ralf Waspe <rwaspe@web.de>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Backgammon Game 8Description: Backgammon Game
10 A Backgammon game for the Opie environment. 9 A Backgammon game for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp
index db1a058..06523f1 100644
--- a/noncore/games/backgammon/backgammon.cpp
+++ b/noncore/games/backgammon/backgammon.cpp
@@ -114,50 +114,48 @@ BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
114 menuBar->insertItem(tr( "Game" ),gamemenu); 114 menuBar->insertItem(tr( "Game" ),gamemenu);
115 115
116 QPopupMenu* thememenu= new QPopupMenu(this); 116 QPopupMenu* thememenu= new QPopupMenu(this);
117 thememenu->insertItem(tr( "New" ),this,SLOT(newtheme())); 117 thememenu->insertItem(tr( "New" ),this,SLOT(newtheme()));
118 thememenu->insertSeparator(); 118 thememenu->insertSeparator();
119 thememenu->insertItem(tr( "Load"),this,SLOT(loadtheme())); 119 thememenu->insertItem(tr( "Load"),this,SLOT(loadtheme()));
120 thememenu->insertItem(tr( "Save" ),this,SLOT(savetheme())); 120 thememenu->insertItem(tr( "Save" ),this,SLOT(savetheme()));
121 thememenu->insertSeparator(); 121 thememenu->insertSeparator();
122 thememenu->insertItem(tr( "Default"),this,SLOT(themedefault())); 122 thememenu->insertItem(tr( "Default"),this,SLOT(themedefault()));
123 thememenu->insertItem(tr( "Delete" ),this,SLOT(deletetheme())); 123 thememenu->insertItem(tr( "Delete" ),this,SLOT(deletetheme()));
124 menuBar->insertItem(tr( "Theme" ),thememenu); 124 menuBar->insertItem(tr( "Theme" ),thememenu);
125 125
126 QPopupMenu* optionmenu=new QPopupMenu(this); 126 QPopupMenu* optionmenu=new QPopupMenu(this);
127 optionmenu->insertItem(tr( "Player" ),this,SLOT(playerselect())); 127 optionmenu->insertItem(tr( "Player" ),this,SLOT(playerselect()));
128 optionmenu->insertSeparator(); 128 optionmenu->insertSeparator();
129 optionmenu->insertItem(tr( "AI" ),this,SLOT(modify_AI())); 129 optionmenu->insertItem(tr( "AI" ),this,SLOT(modify_AI()));
130 optionmenu->insertItem(tr( "Rules" ),this,SLOT(setrules())); 130 optionmenu->insertItem(tr( "Rules" ),this,SLOT(setrules()));
131 menuBar->insertItem(tr( "Options"),optionmenu); 131 menuBar->insertItem(tr( "Options"),optionmenu);
132 132
133 QWidget* mainarea=new QWidget(this); 133 QWidget* mainarea=new QWidget(this);
134 setCentralWidget(mainarea); 134 setCentralWidget(mainarea);
135 //the main area 135 //the main area
136 QBoxLayout* layout=new QBoxLayout(mainarea,QBoxLayout::TopToBottom); 136 QBoxLayout* layout=new QBoxLayout(mainarea,QBoxLayout::TopToBottom);
137 area=new QCanvas(235,235); 137 area=new QCanvas(235,235);
138 QColor bgColor=palette().color(QPalette::Normal,QColorGroup::Background);
139 area->setBackgroundColor(bgColor);
140 boardview=new BackGammonView(area,mainarea); 138 boardview=new BackGammonView(area,mainarea);
141 boardview->setMaximumHeight(240); 139 boardview->setMaximumHeight(240);
142 layout->addWidget(boardview); 140 layout->addWidget(boardview);
143 connect(boardview,SIGNAL(mouse(int,int)),this,SLOT(mouse(int,int))); 141 connect(boardview,SIGNAL(mouse(int,int)),this,SLOT(mouse(int,int)));
144 //status bar 142 //status bar
145 message=new QLabel("<b>Backgammon</b>",mainarea); 143 message=new QLabel("<b>Backgammon</b>",mainarea);
146 message->setAlignment(AlignHCenter); 144 message->setAlignment(AlignHCenter);
147 layout->addWidget(message); 145 layout->addWidget(message);
148 146
149 //the marker 147 //the marker
150 marker_current=new QCanvasRectangle(area); 148 marker_current=new QCanvasRectangle(area);
151 marker_current->setBrush(QColor(0,0,255)); 149 marker_current->setBrush(QColor(0,0,255));
152 marker_current->setSize(15,5); 150 marker_current->setSize(15,5);
153 marker_current->setZ(1); 151 marker_current->setZ(1);
154 152
155 for(a=0;a<4;a++) 153 for(a=0;a<4;a++)
156 { 154 {
157 marker_next[a]=new QCanvasRectangle(area); 155 marker_next[a]=new QCanvasRectangle(area);
158 marker_next[a]->setBrush(QColor(0,255,0)); 156 marker_next[a]->setBrush(QColor(0,255,0));
159 marker_next[a]->setSize(15,5); 157 marker_next[a]->setSize(15,5);
160 marker_next[a]->setZ(1); 158 marker_next[a]->setZ(1);
161 } 159 }
162 160
163 connect(move,SIGNAL(done_dice1()),this,SLOT(done_dice1())); 161 connect(move,SIGNAL(done_dice1()),this,SLOT(done_dice1()));
diff --git a/noncore/games/backgammon/backgammon.h b/noncore/games/backgammon/backgammon.h
index d803489..e3276f1 100644
--- a/noncore/games/backgammon/backgammon.h
+++ b/noncore/games/backgammon/backgammon.h
@@ -1,44 +1,45 @@
1#ifndef BACKGAMMON_H 1#ifndef BACKGAMMON_H
2#define BACKGAMMON_H 2#define BACKGAMMON_H
3 3
4#include "backgammonview.h" 4#include "backgammonview.h"
5#include "canvasimageitem.h" 5#include "canvasimageitem.h"
6//#include "rulesdialog.h" 6//#include "rulesdialog.h"
7#include "moveengine.h" 7#include "moveengine.h"
8 8
9 9
10#include <qlabel.h> 10#include <qlabel.h>
11#include <qmainwindow.h> 11#include <qmainwindow.h>
12//#include <qwidget.h> 12//#include <qwidget.h>
13 13
14 14
15 15
16 16
17class BackGammon : public QMainWindow 17class BackGammon : public QMainWindow
18{ 18{
19 Q_OBJECT 19 Q_OBJECT
20private: 20private:
21 //GUI
21 //the "status" bar 22 //the "status" bar
22 QLabel* message; 23 QLabel* message;
23 //the main drawing area 24 //the main drawing area
24 QCanvas* area; 25 QCanvas* area;
25 BackGammonView* boardview; 26 BackGammonView* boardview;
26 CanvasImageItem* board; 27 CanvasImageItem* board;
27 CanvasImageItem* table; 28 CanvasImageItem* table;
28 CanvasImageItem** p1; 29 CanvasImageItem** p1;
29 CanvasImageItem** p2; 30 CanvasImageItem** p2;
30 CanvasImageItem** p1_side; 31 CanvasImageItem** p1_side;
31 CanvasImageItem** p2_side; 32 CanvasImageItem** p2_side;
32 33
33 CanvasImageItem** diceA1; 34 CanvasImageItem** diceA1;
34 CanvasImageItem** diceA2; 35 CanvasImageItem** diceA2;
35 CanvasImageItem** diceB1; 36 CanvasImageItem** diceB1;
36 CanvasImageItem** diceB2; 37 CanvasImageItem** diceB2;
37 //CanvasImageItem** oddsDice; 38 //CanvasImageItem** oddsDice;
38 CanvasImageItem* nomove_marker; 39 CanvasImageItem* nomove_marker;
39 40
40 QCanvasRectangle* marker_current; 41 QCanvasRectangle* marker_current;
41 QCanvasRectangle* marker_next[4]; 42 QCanvasRectangle* marker_next[4];
42 43
43 //ENGINE 44 //ENGINE
44 MoveEngine* move; 45 MoveEngine* move;
diff --git a/noncore/games/bounce/kbounce.cpp b/noncore/games/bounce/kbounce.cpp
index 5d8aba3..50f4ef6 100644
--- a/noncore/games/bounce/kbounce.cpp
+++ b/noncore/games/bounce/kbounce.cpp
@@ -92,58 +92,58 @@ KJezzball::KJezzball() : QMainWindow(0), m_gameWidget( 0 )
92 92
93void KJezzball::newGame() 93void KJezzball::newGame()
94{ 94{
95 // Check for running game 95 // Check for running game
96 closeGame(); 96 closeGame();
97 if ( m_state==Idle ) 97 if ( m_state==Idle )
98 { 98 {
99 // update displays 99 // update displays
100 m_game.level = 1; 100 m_game.level = 1;
101 m_game.score = 0; 101 m_game.score = 0;
102 102
103 setCaption(tr("Bounce Level %1").arg(m_game.level)); 103 setCaption(tr("Bounce Level %1").arg(m_game.level));
104 ScoreLabel->setText( tr( "Score: %1" ).arg(m_game.score) ); 104 ScoreLabel->setText( tr( "Score: %1" ).arg(m_game.score) );
105 105
106 // start new game 106 // start new game
107 m_state = Running; 107 m_state = Running;
108 108
109 createLevel( m_game.level ); 109 createLevel( m_game.level );
110 startLevel(); 110 startLevel();
111 } 111 }
112} 112}
113 113
114void KJezzball::about() 114void KJezzball::about()
115{ 115{
116 QMessageBox::information( this, "About", 116 QMessageBox::information( this, tr("About"),
117 "Written by: Stefan Schimanski\n" 117 tr("Written by: Stefan Schimanski\n"
118 "Ported by: Martin Imobersteg\n" 118 "Ported by: Martin Imobersteg\n"
119 "\n" 119 "\n"
120 "Click to form walls.\n" 120 "Click to form walls.\n"
121 "Hit space to switch wall direction.\n" 121 "Hit space to switch wall direction.\n"
122 "Try to reduce total space by 75%.\n" 122 "Try to reduce total space by 75%.\n"
123 "\n" 123 "\n"
124 "This program is distributed under\n" 124 "This program is distributed under\n"
125 "the terms of the GPL v2." ); 125 "the terms of the GPL v2.") );
126} 126}
127 127
128void KJezzball::closeGame() 128void KJezzball::closeGame()
129{ 129{
130 if ( m_state!=Idle ) 130 if ( m_state!=Idle )
131 { 131 {
132 stopLevel(); 132 stopLevel();
133 m_state = Idle; 133 m_state = Idle;
134 } 134 }
135} 135}
136 136
137void KJezzball::pauseGame() 137void KJezzball::pauseGame()
138{ 138{
139 switch ( m_state ) 139 switch ( m_state )
140 { 140 {
141 case Running: 141 case Running:
142 m_state = Paused; 142 m_state = Paused;
143 m_gameWidget->display( tr("Game paused.\nPress P to continue!") ); 143 m_gameWidget->display( tr("Game paused.\nPress P to continue!") );
144 stopLevel(); 144 stopLevel();
145 break; 145 break;
146 146
147 case Paused: 147 case Paused:
148 case Suspend: 148 case Suspend:
149 m_state = Running; 149 m_state = Running;
diff --git a/noncore/games/buzzword/buzzword.cpp b/noncore/games/buzzword/buzzword.cpp
index b870a59..97a17a1 100644
--- a/noncore/games/buzzword/buzzword.cpp
+++ b/noncore/games/buzzword/buzzword.cpp
@@ -1,26 +1,26 @@
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> 20#include <qmessagebox.h>
21#include <qmainwindow.h> 21#include <qmainwindow.h>
22#include <qlabel.h> 22#include <qlabel.h>
23#include <qgrid.h> 23#include <qgrid.h>
24#include <qcolor.h> 24#include <qcolor.h>
25#include <qbutton.h> 25#include <qbutton.h>
26#include <qfile.h> 26#include <qfile.h>
@@ -81,75 +81,75 @@ BuzzWord::BuzzWord() : QMainWindow(0)
81 grid = NULL; 81 grid = NULL;
82 gameOver = false; 82 gameOver = false;
83 newGame(); 83 newGame();
84} 84}
85 85
86void BuzzWord::drawGrid() 86void BuzzWord::drawGrid()
87{ 87{
88 QStringList l; 88 QStringList l;
89 89
90 QString path = QPEApplication::qpeDir()+"share/buzzword/"; 90 QString path = QPEApplication::qpeDir()+"share/buzzword/";
91 QFile f( path + "buzzwords" ); 91 QFile f( path + "buzzwords" );
92 if ( !f.open( IO_ReadOnly ) ) 92 if ( !f.open( IO_ReadOnly ) )
93 return; 93 return;
94 94
95 QTextStream t( &f ); 95 QTextStream t( &f );
96 96
97 while (!t.atEnd()) 97 while (!t.atEnd())
98 { 98 {
99 l << t.readLine(); 99 l << t.readLine();
100 } 100 }
101 101
102 f.close(); 102 f.close();
103 103
104 grid = new QGrid(gridVal, this); 104 grid = new QGrid(gridVal, this);
105 grid->setFixedSize(240,240); 105 //grid->setFixedSize( 480, 480 );
106 106
107 for( int c = 0 ; c < gridVal ; c++ ) 107 for( int c = 0 ; c < gridVal ; c++ )
108 { 108 {
109 for( int r = 0 ; r < gridVal ; r++ ) 109 for( int r = 0 ; r < gridVal ; r++ )
110 { 110 {
111 uint pos = rand() % l. count(); 111 uint pos = rand() % l. count();
112 112
113 QString word = QStringList::split(" ", l[pos]).join("\n"); 113 QString word = QStringList::split(" ", l[pos]).join("\n");
114 BuzzItem* bi = new BuzzItem( c, r, word, grid ); 114 BuzzItem* bi = new BuzzItem( c, r, word, grid );
115 connect( bi, SIGNAL(clicked(int, int)), this, SLOT(clicked(int,int)) ); 115 connect( bi, SIGNAL(clicked(int, int)), this, SLOT(clicked(int,int)) );
116 map[c][r] = 0; 116 map[c][r] = 0;
117 117
118 l.remove( l.at( pos )); 118 l.remove( l.at( pos ));
119 } 119 }
120 } 120 }
121} 121}
122 122
123void BuzzWord::clicked(int row, int column) 123void BuzzWord::clicked(int row, int column)
124{ 124{
125 if ( ! gameOver ) 125 if ( ! gameOver )
126 { 126 {
127 int rowTotal = 0; 127 int rowTotal = 0;
128 int columnTotal = 0; 128 int columnTotal = 0;
129 129
130 map[column][row] = 1; 130 map[column][row] = 1;
131 131
132 for( int c = 0 ; c < gridVal ; c++ ) 132 for( int c = 0 ; c < gridVal ; c++ )
133 { 133 {
134 for( int r = 0 ; r < gridVal ; r++ ) 134 for( int r = 0 ; r < gridVal ; r++ )
135 { 135 {
136 if ( map[c][r] == 1 ) 136 if ( map[c][r] == 1 )
137 rowTotal++; 137 rowTotal++;
138 138
139 if ( rowTotal == 4 ) 139 if ( rowTotal == 4 )
140 { 140 {
141 bingo(); 141 bingo();
142 } 142 }
143 } 143 }
144 rowTotal = 0; 144 rowTotal = 0;
145 } 145 }
146 146
147 for( int r = 0 ; r < gridVal ; r++ ) 147 for( int r = 0 ; r < gridVal ; r++ )
148 { 148 {
149 for( int c = 0 ; c < gridVal ; c++ ) 149 for( int c = 0 ; c < gridVal ; c++ )
150 { 150 {
151 if ( map[c][r] == 1 ) 151 if ( map[c][r] == 1 )
152 columnTotal++; 152 columnTotal++;
153 153
154 if ( columnTotal == 4 ) 154 if ( columnTotal == 4 )
155 { 155 {
diff --git a/noncore/games/fifteen/opie-fifteen.control b/noncore/games/fifteen/opie-fifteen.control
index 662fd03..8fa355f 100644
--- a/noncore/games/fifteen/opie-fifteen.control
+++ b/noncore/games/fifteen/opie-fifteen.control
@@ -1,11 +1,11 @@
1Package: opie-fifteen 1Package: opie-fifteen
2Files: bin/fifteen apps/Games/fifteen.desktop pics/fifteen 2Files: bin/fifteen apps/Games/fifteen.desktop pics/fifteen
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Martin Imobersteg <imm@gmx.ch> 5Maintainer: Martin Imobersteg <imm@gmx.ch>
6Architecture: arm 6Architecture: arm
7Arch: iPAQ 7Arch: iPAQ
8Version: $QPE_VERSION-$SUB_VERSION
9Depends: task-opie-minimal 8Depends: task-opie-minimal
10Description: Fifteen pieces game 9Description: Fifteen pieces game
11 A game for the Opie environment. 10 A game for the Opie environment.
11Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/go/opie-go.control b/noncore/games/go/opie-go.control
index 061c02c..24929de 100644
--- a/noncore/games/go/opie-go.control
+++ b/noncore/games/go/opie-go.control
@@ -1,10 +1,10 @@
1Package: opie-go 1Package: opie-go
2Files: bin/go apps/Games/go.desktop pics/go 2Files: bin/go apps/Games/go.desktop pics/go
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Warwick Allison <warwick@trolltech.com> 5Maintainer: Warwick Allison <warwick@trolltech.com>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: The game of Go 8Description: The game of Go
10 A game for the Opie environment. 9 A game for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/kpacman/kpacman.cpp b/noncore/games/kpacman/kpacman.cpp
index 812e9ea..df27c76 100644
--- a/noncore/games/kpacman/kpacman.cpp
+++ b/noncore/games/kpacman/kpacman.cpp
@@ -13,49 +13,49 @@
13#endif 13#endif
14 14
15#include <qkeycode.h> 15#include <qkeycode.h>
16#include <qcolor.h> 16#include <qcolor.h>
17#include <qstring.h> 17#include <qstring.h>
18#include <qpopmenu.h> 18#include <qpopmenu.h>
19#include <qmsgbox.h> 19#include <qmsgbox.h>
20 20
21Kpacman::Kpacman(QWidget *parent, const char *name) 21Kpacman::Kpacman(QWidget *parent, const char *name)
22 : KTMainWindow(parent, name) 22 : KTMainWindow(parent, name)
23{ 23{
24 schemesPopup = new QList<QPopupMenu>; 24 schemesPopup = new QList<QPopupMenu>;
25 schemesPopup->setAutoDelete(TRUE); 25 schemesPopup->setAutoDelete(TRUE);
26 26
27 menu(); 27 menu();
28 28
29 m_view = new QWidget( this, "m_view" ); 29 m_view = new QWidget( this, "m_view" );
30 m_view->setBackgroundColor( black ); 30 m_view->setBackgroundColor( black );
31 m_layout = new QGridLayout( m_view ); 31 m_layout = new QGridLayout( m_view );
32 m_layout->setMargin( 7 ); 32 m_layout->setMargin( 7 );
33 33
34 view = new KpacmanWidget( this, QString(name)+"widget"); 34 view = new KpacmanWidget( this, QString(name)+"widget");
35 m_layout->addWidget( view, 0, 0 ); 35 m_layout->addWidget( view, 0, 0 );
36 36
37 setCaption( "KPacman" ); 37 setCaption( tr("KPacman") );
38 38
39 view->referee->setFocus(); 39 view->referee->setFocus();
40 40
41 connect(view->referee, SIGNAL(setScore(int, int)), 41 connect(view->referee, SIGNAL(setScore(int, int)),
42 view->score, SLOT(setScore(int, int))); 42 view->score, SLOT(setScore(int, int)));
43 connect(view->referee, SIGNAL(setPoints(int)), 43 connect(view->referee, SIGNAL(setPoints(int)),
44 view->score, SLOT(set(int))); 44 view->score, SLOT(set(int)));
45 connect(view->referee, SIGNAL(setLifes(int)), 45 connect(view->referee, SIGNAL(setLifes(int)),
46 view->status, SLOT(setLifes(int))); 46 view->status, SLOT(setLifes(int)));
47 connect(view->referee, SIGNAL(setLevel(int)), 47 connect(view->referee, SIGNAL(setLevel(int)),
48 view->status, SLOT(setLevel(int))); 48 view->status, SLOT(setLevel(int)));
49 connect(view->referee, SIGNAL(forcedHallOfFame(bool)), 49 connect(view->referee, SIGNAL(forcedHallOfFame(bool)),
50 this, SLOT(forcedHallOfFame(bool))); 50 this, SLOT(forcedHallOfFame(bool)));
51 connect(view->referee, SIGNAL(togglePaused()), this, SLOT(togglePaused())); 51 connect(view->referee, SIGNAL(togglePaused()), this, SLOT(togglePaused()));
52 connect(view->referee, SIGNAL(toggleNew()), this, SLOT(toggleNew())); 52 connect(view->referee, SIGNAL(toggleNew()), this, SLOT(toggleNew()));
53 53
54 connect(view->score, SIGNAL(toggleNew()), this, SLOT(toggleNew())); 54 connect(view->score, SIGNAL(toggleNew()), this, SLOT(toggleNew()));
55 connect(view->score, SIGNAL(forcedHallOfFame(bool)), 55 connect(view->score, SIGNAL(forcedHallOfFame(bool)),
56 this, SLOT(forcedHallOfFame(bool))); 56 this, SLOT(forcedHallOfFame(bool)));
57 57
58 APP_CONFIG_BEGIN( cfg ); 58 APP_CONFIG_BEGIN( cfg );
59 focusOutPause = !cfg->readBoolEntry("FocusOutPause", TRUE); 59 focusOutPause = !cfg->readBoolEntry("FocusOutPause", TRUE);
60 focusInContinue = !cfg->readBoolEntry("FocusInContinue", TRUE); 60 focusInContinue = !cfg->readBoolEntry("FocusInContinue", TRUE);
61 hideMouseCursor = !cfg->readBoolEntry("HideMouseCursor", TRUE); 61 hideMouseCursor = !cfg->readBoolEntry("HideMouseCursor", TRUE);
diff --git a/noncore/games/mindbreaker/opie-mindbreaker.control b/noncore/games/mindbreaker/opie-mindbreaker.control
index 7623d6a..7b5ead6 100644
--- a/noncore/games/mindbreaker/opie-mindbreaker.control
+++ b/noncore/games/mindbreaker/opie-mindbreaker.control
@@ -1,10 +1,10 @@
1Package: opie-mindbreaker 1Package: opie-mindbreaker
2Files: bin/mindbreaker apps/Games/mindbreaker.desktop pics/mindbreaker 2Files: bin/mindbreaker apps/Games/mindbreaker.desktop pics/mindbreaker
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Martin Imobersteg <imm@gmx.ch> 5Maintainer: Martin Imobersteg <imm@gmx.ch>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Game: crack the coloured code 8Description: Game: crack the coloured code
10 A game for the Opie environment. 9 A game for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/minesweep/opie-minesweep.control b/noncore/games/minesweep/opie-minesweep.control
index 7236cf8..32f0352 100644
--- a/noncore/games/minesweep/opie-minesweep.control
+++ b/noncore/games/minesweep/opie-minesweep.control
@@ -1,10 +1,10 @@
1Package: opie-minesweep 1Package: opie-minesweep
2Files: bin/minesweep apps/Games/minesweep.desktop pics/minesweep 2Files: bin/minesweep apps/Games/minesweep.desktop pics/minesweep
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Martin Imobersteg <imm@gmx.ch> 5Maintainer: Martin Imobersteg <imm@gmx.ch>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Game: find the mines 8Description: Game: find the mines
10 A game for the Opie environment. 9 A game for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/parashoot/opie-parashoot.control b/noncore/games/parashoot/opie-parashoot.control
index ad955f5..758d24d 100644
--- a/noncore/games/parashoot/opie-parashoot.control
+++ b/noncore/games/parashoot/opie-parashoot.control
@@ -1,10 +1,10 @@
1Package: opie-parashoot 1Package: opie-parashoot
2Files: bin/parashoot apps/Games/parashoot.desktop pics/parashoot 2Files: bin/parashoot apps/Games/parashoot.desktop pics/parashoot
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Martin Imobersteg <imm@gmx.ch> 5Maintainer: Martin Imobersteg <imm@gmx.ch>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Game: shoot the parachutists 8Description: Game: shoot the parachutists
10 A game for the Opie environment. 9 A game for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/qasteroids/opie-qasteroids.control b/noncore/games/qasteroids/opie-qasteroids.control
index 49cc6b2..25a49b4 100644
--- a/noncore/games/qasteroids/opie-qasteroids.control
+++ b/noncore/games/qasteroids/opie-qasteroids.control
@@ -1,10 +1,10 @@
1Package: opie-qasteroids 1Package: opie-qasteroids
2Files: bin/qasteroids apps/Games/qasteroids.desktop pics/qasteroids/* 2Files: bin/qasteroids apps/Games/qasteroids.desktop pics/qasteroids/*
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Martin Jones <mjones@trolltech.com> 5Maintainer: Martin Jones <mjones@trolltech.com>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Game: shoot the asteroids 8Description: Game: shoot the asteroids
10 A game for the Opie environment. 9 A game for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/sfcave-sdl/sfcave-sdl.control b/noncore/games/sfcave-sdl/sfcave-sdl.control
index c017280..9bf43ba 100644
--- a/noncore/games/sfcave-sdl/sfcave-sdl.control
+++ b/noncore/games/sfcave-sdl/sfcave-sdl.control
@@ -1,10 +1,10 @@
1Files: bin/sfcave-sdl apps/Games/sfcave-sdl.desktop pics/sfcave-sdl sounds/sfcave-sdl 1Files: bin/sfcave-sdl apps/Games/sfcave-sdl.desktop pics/sfcave-sdl sounds/sfcave-sdl
2Package: sfcave-sdl 2Package: sfcave-sdl
3Priority: optional 3Priority: optional
4Section: Games 4Section: Games
5Version: $QPE_VERSION-$SUB_VERSION
6Architecture: arm 5Architecture: arm
7Maintainer: Andy Qua (andy.qua@blueyonder.co.uk) 6Maintainer: Andy Qua (andy.qua@blueyonder.co.uk)
8Depends: libSDL,libSDL_-mixer,libSDL-image,libSDL-gfx 7Depends: libSDL,libSDL_-mixer,libSDL-image,libSDL-gfx
9Description: SFCave SDL for the Zaurus. Fly though the cave avoiding the walls. 8Description: SFCave SDL for the Zaurus. Fly though the cave avoiding the walls.
10 9
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/sfcave/opie-sfcave.control b/noncore/games/sfcave/opie-sfcave.control
index 1566959..0ff3e2c 100644
--- a/noncore/games/sfcave/opie-sfcave.control
+++ b/noncore/games/sfcave/opie-sfcave.control
@@ -1,9 +1,9 @@
1Package: opie-sfcave 1Package: opie-sfcave
2Files: bin/sfcave apps/Games/sfcave.desktop pics/sfcave 2Files: bin/sfcave apps/Games/sfcave.desktop pics/sfcave
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Andy Qua <andy.qua@blueyonder.co.uk> 5Maintainer: Andy Qua <andy.qua@blueyonder.co.uk>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: SFCave for the Zaurus. Fly the dot though the cave avoiding the walls. 8Description: SFCave for the Zaurus. Fly the dot though the cave avoiding the walls.
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/snake/interface.cpp b/noncore/games/snake/interface.cpp
index 0f312ac..68e0f14 100644
--- a/noncore/games/snake/interface.cpp
+++ b/noncore/games/snake/interface.cpp
@@ -79,49 +79,49 @@ void SnakeGame::resizeEvent(QResizeEvent *)
79 int fw = style().defaultFrameWidth(); 79 int fw = style().defaultFrameWidth();
80 canvas.resize( s.width() - fw - 2, s.height() - fw - 2); 80 canvas.resize( s.width() - fw - 2, s.height() - fw - 2);
81} 81}
82 82
83void SnakeGame::welcomescreen() 83void SnakeGame::welcomescreen()
84{ 84{
85 QCanvasText* title = new QCanvasText(tr("SNAKE!"), &canvas); 85 QCanvasText* title = new QCanvasText(tr("SNAKE!"), &canvas);
86 title->setColor(yellow); 86 title->setColor(yellow);
87 title->setFont( QFont("times", 18, QFont::Bold) ); 87 title->setFont( QFont("times", 18, QFont::Bold) );
88 int w = title->boundingRect().width(); 88 int w = title->boundingRect().width();
89 title->move(canvas.width()/2 -w/2, canvas.height()/2-110); 89 title->move(canvas.width()/2 -w/2, canvas.height()/2-110);
90 title->show(); 90 title->show();
91 QCanvasPixmapArray* titlearray = new QCanvasPixmapArray(Resource::findPixmap("snake/title")); 91 QCanvasPixmapArray* titlearray = new QCanvasPixmapArray(Resource::findPixmap("snake/title"));
92 QCanvasSprite* titlepic = new QCanvasSprite(titlearray, &canvas); 92 QCanvasSprite* titlepic = new QCanvasSprite(titlearray, &canvas);
93 titlepic->move(canvas.width()/2 - 33, canvas.height()/2-85); 93 titlepic->move(canvas.width()/2 - 33, canvas.height()/2-85);
94 titlepic->show(); 94 titlepic->show();
95 QCanvasText* instr = new QCanvasText(tr("Use the arrow keys to guide the\n" 95 QCanvasText* instr = new QCanvasText(tr("Use the arrow keys to guide the\n"
96 "snake to eat the mouse. You must not\n" 96 "snake to eat the mouse. You must not\n"
97 "crash into the walls, edges or its tail."), 97 "crash into the walls, edges or its tail."),
98 &canvas); 98 &canvas);
99 w = instr->boundingRect().width(); 99 w = instr->boundingRect().width();
100 instr->move(canvas.width()/2-w/2, canvas.height()/2-20); 100 instr->move(canvas.width()/2-w/2, canvas.height()/2-20);
101 instr->setColor(white); 101 instr->setColor(white);
102 instr->show(); 102 instr->show();
103 QCanvasText* cont = new QCanvasText(tr("Press Any Key To Start"), &canvas); 103 QCanvasText* cont = new QCanvasText(tr("Press any key to start"), &canvas);
104 w = cont->boundingRect().width(); 104 w = cont->boundingRect().width();
105 cont->move(canvas.width()/2-w/2, canvas.height()-20); 105 cont->move(canvas.width()/2-w/2, canvas.height()-20);
106 cont->setColor(yellow); 106 cont->setColor(yellow);
107 cont->show(); 107 cont->show();
108 108
109} 109}
110 110
111void SnakeGame::newGame() 111void SnakeGame::newGame()
112{ 112{
113 clear(); 113 clear();
114 snake = new Snake(&canvas); 114 snake = new Snake(&canvas);
115 connect(snake, SIGNAL(dead()), this, SLOT(gameOver()) ); 115 connect(snake, SIGNAL(dead()), this, SLOT(gameOver()) );
116 connect(snake, SIGNAL(targethit()), this, SLOT(levelUp()) ); 116 connect(snake, SIGNAL(targethit()), this, SLOT(levelUp()) );
117 connect(snake, SIGNAL(scorechanged()), this, SLOT(scoreInc()) ); 117 connect(snake, SIGNAL(scorechanged()), this, SLOT(scoreInc()) );
118 connect(this, SIGNAL(moveFaster()), snake, SLOT(increaseSpeed()) ); 118 connect(this, SIGNAL(moveFaster()), snake, SLOT(increaseSpeed()) );
119 last = 0; 119 last = 0;
120 targetamount = 1; 120 targetamount = 1;
121 notargets = 1; 121 notargets = 1;
122 level = 1; 122 level = 1;
123 stage = 1; 123 stage = 1;
124 showScore(0); 124 showScore(0);
125 gamestopped = false; 125 gamestopped = false;
126 waitover = true; 126 waitover = true;
127 int y = canvas.height()-50; 127 int y = canvas.height()-50;
@@ -175,47 +175,47 @@ void SnakeGame::clear()
175} 175}
176 176
177void SnakeGame::gameOver() 177void SnakeGame::gameOver()
178{ 178{
179 int score = snake->getScore(); 179 int score = snake->getScore();
180 QString scoreoutput=""; 180 QString scoreoutput="";
181 scoreoutput.setNum(score); 181 scoreoutput.setNum(score);
182 QCanvasText* gameover = new QCanvasText(tr("GAME OVER!\n Your Score: %1").arg( scoreoutput), &canvas); 182 QCanvasText* gameover = new QCanvasText(tr("GAME OVER!\n Your Score: %1").arg( scoreoutput), &canvas);
183 183
184 gameover->setZ(100); 184 gameover->setZ(100);
185 gameover->setColor(yellow); 185 gameover->setColor(yellow);
186 gameover->setFont( QFont("times", 18, QFont::Bold) ); 186 gameover->setFont( QFont("times", 18, QFont::Bold) );
187 int w = gameover->boundingRect().width(); 187 int w = gameover->boundingRect().width();
188 gameover->move(canvas.width()/2 -w/2, canvas.height()/2 -50); 188 gameover->move(canvas.width()/2 -w/2, canvas.height()/2 -50);
189 gameover->show(); 189 gameover->show();
190 gamestopped = true; 190 gamestopped = true;
191 waitover = false; 191 waitover = false;
192 pauseTimer->start(1500); 192 pauseTimer->start(1500);
193} 193}
194 194
195void SnakeGame::wait() 195void SnakeGame::wait()
196{ 196{
197 waitover = true; 197 waitover = true;
198 pauseTimer->stop(); 198 pauseTimer->stop();
199 QCanvasText* cont = new QCanvasText(tr("Press Any Key to Begin a New Game."), 199 QCanvasText* cont = new QCanvasText(tr("Press any key to begin a new game."),
200 &canvas); 200 &canvas);
201 cont->setZ(100); 201 cont->setZ(100);
202 cont->setColor(white); 202 cont->setColor(white);
203 int w = cont->boundingRect().width(); 203 int w = cont->boundingRect().width();
204 cont->move(canvas.width()/2 -w/2, canvas.height()/2); 204 cont->move(canvas.width()/2 -w/2, canvas.height()/2);
205 cont->show(); 205 cont->show();
206} 206}
207 207
208void SnakeGame::keyPressEvent(QKeyEvent* event) 208void SnakeGame::keyPressEvent(QKeyEvent* event)
209{ 209{
210 if (gamestopped) { 210 if (gamestopped) {
211 if (waitover) 211 if (waitover)
212 newGame(); 212 newGame();
213 else 213 else
214 return; 214 return;
215 } 215 }
216 else { 216 else {
217 int newkey = event->key(); 217 int newkey = event->key();
218 snake->go(newkey); 218 snake->go(newkey);
219 } 219 }
220} 220}
221 221
diff --git a/noncore/games/snake/opie-snake.control b/noncore/games/snake/opie-snake.control
index 3ab6640..ef4fc61 100644
--- a/noncore/games/snake/opie-snake.control
+++ b/noncore/games/snake/opie-snake.control
@@ -1,10 +1,10 @@
1Package: opie-snake 1Package: opie-snake
2Files: bin/snake apps/Games/snake.desktop pics/snake 2Files: bin/snake apps/Games/snake.desktop pics/snake
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Martin Imobersteg <imm@gmx.ch> 5Maintainer: Martin Imobersteg <imm@gmx.ch>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Game: control the snake 8Description: Game: control the snake
10 A game for the Opie environment. 9 A game for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/solitaire/canvascardwindow.cpp b/noncore/games/solitaire/canvascardwindow.cpp
index e836eb2..317a02d 100644
--- a/noncore/games/solitaire/canvascardwindow.cpp
+++ b/noncore/games/solitaire/canvascardwindow.cpp
@@ -49,79 +49,79 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f)
49 canvas.setBackgroundPixmap(bg); 49 canvas.setBackgroundPixmap(bg);
50 } 50 }
51 51
52#if defined( QT_QWS_CASSIOPEIA ) 52#if defined( QT_QWS_CASSIOPEIA )
53 canvas.setAdvancePeriod(70); 53 canvas.setAdvancePeriod(70);
54#else 54#else
55 canvas.setAdvancePeriod(30); 55 canvas.setAdvancePeriod(30);
56#endif 56#endif
57 57
58 58
59#ifdef _PATIENCE_USE_ACCELS_ 59#ifdef _PATIENCE_USE_ACCELS_
60 QPEMenuBar* menu = menuBar(); 60 QPEMenuBar* menu = menuBar();
61 61
62 QPopupMenu* file = new QPopupMenu; 62 QPopupMenu* file = new QPopupMenu;
63 file->insertItem(tr("Patience"), this, SLOT(initPatience()), CTRL+Key_F); 63 file->insertItem(tr("Patience"), this, SLOT(initPatience()), CTRL+Key_F);
64 file->insertItem(tr("Freecell"), this, SLOT(initFreecell()), CTRL+Key_F); 64 file->insertItem(tr("Freecell"), this, SLOT(initFreecell()), CTRL+Key_F);
65 file->insertItem(tr("Chicane"), this, SLOT(initChicane()), CTRL+Key_F); 65 file->insertItem(tr("Chicane"), this, SLOT(initChicane()), CTRL+Key_F);
66 file->insertItem(tr("Harp"), this, SLOT(initHarp()), CTRL+Key_F); 66 file->insertItem(tr("Harp"), this, SLOT(initHarp()), CTRL+Key_F);
67 file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub()), CTRL+Key_F); 67 file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub()), CTRL+Key_F);
68 menu->insertItem(tr("&Game"), file); 68 menu->insertItem(tr("&Game"), file);
69 69
70 menu->insertSeparator(); 70 menu->insertSeparator();
71 71
72 settings = new QPopupMenu; 72 settings = new QPopupMenu;
73 settings->insertItem(tr("&Change Card Backs"), this, SLOT(changeCardBacks()), Key_F2); 73 settings->insertItem(tr("&Change card backs"), this, SLOT(changeCardBacks()), Key_F2);
74 snap_id = settings->insertItem(tr("&Snap To Position"), this, SLOT(snapToggle()), Key_F3); 74 snap_id = settings->insertItem(tr("&Snap to position"), this, SLOT(snapToggle()), Key_F3);
75 settings->setCheckable(TRUE); 75 settings->setCheckable(TRUE);
76 menu->insertItem(tr("&Settings"),settings); 76 menu->insertItem(tr("&Settings"),settings);
77 77
78 menu->insertSeparator(); 78 menu->insertSeparator();
79 79
80 QPopupMenu* help = new QPopupMenu; 80 QPopupMenu* help = new QPopupMenu;
81 help->insertItem(tr("&About"), this, SLOT(help()), Key_F1); 81 help->insertItem(tr("&About"), this, SLOT(help()), Key_F1);
82 help->setItemChecked(dbf_id, TRUE); 82 help->setItemChecked(dbf_id, TRUE);
83 menu->insertItem(tr("&Help"),help); 83 menu->insertItem(tr("&Help"),help);
84#else 84#else
85 QMenuBar* menu = menuBar(); 85 QMenuBar* menu = menuBar();
86 86
87 QPopupMenu* file = new QPopupMenu; 87 QPopupMenu* file = new QPopupMenu;
88 file->insertItem(tr("Patience"), this, SLOT(initPatience())); 88 file->insertItem(tr("Patience"), this, SLOT(initPatience()));
89 file->insertItem(tr("Freecell"), this, SLOT(initFreecell())); 89 file->insertItem(tr("Freecell"), this, SLOT(initFreecell()));
90 file->insertItem(tr("Chicane"), this, SLOT(initChicane())); 90 file->insertItem(tr("Chicane"), this, SLOT(initChicane()));
91 file->insertItem(tr("Harp"), this, SLOT(initHarp())); 91 file->insertItem(tr("Harp"), this, SLOT(initHarp()));
92 file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub())); 92 file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub()));
93 menu->insertItem(tr("Play"), file); 93 menu->insertItem(tr("Play"), file);
94 94
95 menu->insertSeparator(); 95 menu->insertSeparator();
96 96
97 settings = new QPopupMenu; 97 settings = new QPopupMenu;
98 settings->setCheckable(TRUE); 98 settings->setCheckable(TRUE);
99 settings->insertItem(tr("Change Card Backs"), this, SLOT(changeCardBacks())); 99 settings->insertItem(tr("Change card backs"), this, SLOT(changeCardBacks()));
100 snap_id = settings->insertItem(tr("Snap To Position"), this, SLOT(snapToggle())); 100 snap_id = settings->insertItem(tr("Snap to position"), this, SLOT(snapToggle()));
101 QString m; 101 QString m;
102 102
103 drawId = settings->insertItem(tr("Turn One Card"), this, SLOT(drawnToggle())); 103 drawId = settings->insertItem(tr("Turn one card"), this, SLOT(drawnToggle()));
104 menu->insertItem(tr("Settings"),settings); 104 menu->insertItem(tr("Settings"),settings);
105 settings->setCheckable(TRUE); 105 settings->setCheckable(TRUE);
106 106
107#endif 107#endif
108 108
109 menu->show(); 109 menu->show();
110 110
111 Config cfg( "Patience" ); 111 Config cfg( "Patience" );
112 cfg.setGroup( "GlobalSettings" ); 112 cfg.setGroup( "GlobalSettings" );
113 snapOn = cfg.readBoolEntry( "SnapOn", TRUE); 113 snapOn = cfg.readBoolEntry( "SnapOn", TRUE);
114 settings->setItemChecked(snap_id, snapOn); 114 settings->setItemChecked(snap_id, snapOn);
115 115
116 gameType = cfg.readNumEntry( "GameType", -1 ); 116 gameType = cfg.readNumEntry( "GameType", -1 );
117 drawThree = cfg.readBoolEntry( "DrawThree", FALSE); 117 drawThree = cfg.readBoolEntry( "DrawThree", FALSE);
118 if ( gameType == 0 ) { 118 if ( gameType == 0 ) {
119 cardGame = new PatienceCardGame( &canvas, snapOn, this ); 119 cardGame = new PatienceCardGame( &canvas, snapOn, this );
120 cardGame->setNumberToDraw(drawThree ? 3 : 1); 120 cardGame->setNumberToDraw(drawThree ? 3 : 1);
121 121
122 setCaption(tr("Patience")); 122 setCaption(tr("Patience"));
123 setCentralWidget(cardGame); 123 setCentralWidget(cardGame);
124 cardGame->readConfig( cfg ); 124 cardGame->readConfig( cfg );
125 setCardBacks(); 125 setCardBacks();
126 } else if ( gameType == 1 ) { 126 } else if ( gameType == 1 ) {
127 cardGame = new FreecellCardGame( &canvas, snapOn, this ); 127 cardGame = new FreecellCardGame( &canvas, snapOn, this );
@@ -262,51 +262,51 @@ void CanvasCardWindow::initTeeclub()
262} 262}
263 263
264 264
265void CanvasCardWindow::snapToggle() 265void CanvasCardWindow::snapToggle()
266{ 266{
267 snapOn = !snapOn; 267 snapOn = !snapOn;
268 settings->setItemChecked(snap_id, snapOn); 268 settings->setItemChecked(snap_id, snapOn);
269 cardGame->toggleSnap(); 269 cardGame->toggleSnap();
270} 270}
271 271
272 272
273void CanvasCardWindow::drawnToggle() 273void CanvasCardWindow::drawnToggle()
274{ 274{
275 drawThree=!drawThree; 275 drawThree=!drawThree;
276 Config cfg( "Patience" ); 276 Config cfg( "Patience" );
277 cfg.setGroup( "GlobalSettings" ); 277 cfg.setGroup( "GlobalSettings" );
278 cardGame->toggleCardsDrawn(); 278 cardGame->toggleCardsDrawn();
279 updateDraw(); 279 updateDraw();
280 cfg.writeEntry( "DrawThree", drawThree); 280 cfg.writeEntry( "DrawThree", drawThree);
281 cfg.write(); 281 cfg.write();
282} 282}
283 283
284void CanvasCardWindow::updateDraw() { 284void CanvasCardWindow::updateDraw() {
285 if(cardGame->cardsDrawn() == 3){ 285 if(cardGame->cardsDrawn() == 3){
286 settings->changeItem(drawId, tr("Turn One Card")); 286 settings->changeItem(drawId, tr("Turn one card"));
287 } else { 287 } else {
288 settings->changeItem(drawId, tr("Turn Three Cards")); 288 settings->changeItem(drawId, tr("Turn three cards"));
289 } 289 }
290} 290}
291 291
292 292
293void CanvasCardWindow::setCardBacks() 293void CanvasCardWindow::setCardBacks()
294{ 294{
295 QCanvasItemList l = canvas.allItems(); 295 QCanvasItemList l = canvas.allItems();
296 296
297 for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) { 297 for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it) {
298 if ( (*it)->rtti() == canvasCardId ) 298 if ( (*it)->rtti() == canvasCardId )
299 ((CanvasCard *)(*it))->setCardBack( cardBack ); 299 ((CanvasCard *)(*it))->setCardBack( cardBack );
300 } 300 }
301} 301}
302 302
303 303
304void CanvasCardWindow::changeCardBacks() 304void CanvasCardWindow::changeCardBacks()
305{ 305{
306 cardBack++; 306 cardBack++;
307 307
308 if (cardBack == 5) 308 if (cardBack == 5)
309 cardBack = 0; 309 cardBack = 0;
310 310
311 setCardBacks(); 311 setCardBacks();
312} 312}
diff --git a/noncore/games/solitaire/opie-solitaire.control b/noncore/games/solitaire/opie-solitaire.control
index 76e7208..5fa521f 100644
--- a/noncore/games/solitaire/opie-solitaire.control
+++ b/noncore/games/solitaire/opie-solitaire.control
@@ -1,10 +1,10 @@
1Package: opie-solitaire 1Package: opie-solitaire
2Files: bin/patience apps/Games/patience.desktop pics/cards 2Files: bin/patience apps/Games/patience.desktop pics/cards
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Martin Imobersteg <imm@gmx.ch> 5Maintainer: Martin Imobersteg <imm@gmx.ch>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Game: solitaire card games 8Description: Game: solitaire card games
10 A solitaire game for the Opie environment. 9 A solitaire game for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/tetrix/opie-tetrix.control b/noncore/games/tetrix/opie-tetrix.control
index e335507..e901dbf 100644
--- a/noncore/games/tetrix/opie-tetrix.control
+++ b/noncore/games/tetrix/opie-tetrix.control
@@ -1,11 +1,11 @@
1Package: opie-tetrix 1Package: opie-tetrix
2Files: bin/tetrix apps/Games/tetrix.desktop pics/tetrix/* 2Files: bin/tetrix apps/Games/tetrix.desktop pics/tetrix/*
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Martin Imobersteg <imm@gmx.ch> 5Maintainer: Martin Imobersteg <imm@gmx.ch>
6Architecture: arm 6Architecture: arm
7Arch: iPAQ 7Arch: iPAQ
8Version: $QPE_VERSION-$SUB_VERSION
9Depends: task-opie-minimal 8Depends: task-opie-minimal
10Description: Game: control falling blocks 9Description: Game: control falling blocks
11 A game for the Opie environment. 10 A game for the Opie environment.
11Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/tictac/main.cpp b/noncore/games/tictac/main.cpp
index f2ab334..78fb3b7 100644
--- a/noncore/games/tictac/main.cpp
+++ b/noncore/games/tictac/main.cpp
@@ -4,28 +4,28 @@
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 <qpe/qpeapplication.h> 11#include <qpe/qpeapplication.h>
12#include <stdlib.h> 12#include <stdlib.h>
13#include "tictac.h" 13#include "tictac.h"
14 14
15 15
16int main( int argc, char **argv ) 16int main( int argc, char **argv )
17{ 17{
18 QPEApplication a( argc, argv ); 18 QPEApplication a( argc, argv );
19 int n = 3; 19 int n = 3;
20 if ( argc == 2 ) // get board size n 20 if ( argc == 2 ) // get board size n
21 n = atoi(argv[1]); 21 n = atoi(argv[1]);
22 if ( n < 3 || n > 10 ) { // out of range 22 if ( n < 3 || n > 10 ) { // out of range
23 qWarning( "%s: Board size must be from 3x3 to 10x10", argv[0] ); 23 qWarning( "%s: Board size must be from 3x3 to 10x10", argv[0] );
24 return 1; 24 return 1;
25 } 25 }
26 TicTacToe ttt( n ); // create game 26 TicTacToe ttt( n ); // create game
27 a.setMainWidget( &ttt ); 27 a.setMainWidget( &ttt );
28 ttt.setCaption("TicTac"); 28 ttt.setCaption( QObject::tr("TicTac") );
29 ttt.show(); // show widget 29 ttt.show(); // show widget
30 return a.exec(); // go 30 return a.exec(); // go
31} 31}
diff --git a/noncore/games/tictac/opie-tictac.control b/noncore/games/tictac/opie-tictac.control
index c4ee36c..0074505 100644
--- a/noncore/games/tictac/opie-tictac.control
+++ b/noncore/games/tictac/opie-tictac.control
@@ -1,9 +1,9 @@
1Package: opie-tictac 1Package: opie-tictac
2Files: bin/tictac apps/Games/tictac.desktop pics/tictac 2Files: bin/tictac apps/Games/tictac.desktop pics/tictac
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: ljp <ljp@llornkcor.com> 5Maintainer: ljp <ljp@llornkcor.com>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Tic Tac Toe game. 8Description: Tic Tac Toe game.
9Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/wordgame/opie-wordgame.control b/noncore/games/wordgame/opie-wordgame.control
index 3be8e8f..c7dc126 100644
--- a/noncore/games/wordgame/opie-wordgame.control
+++ b/noncore/games/wordgame/opie-wordgame.control
@@ -1,11 +1,11 @@
1Package: opie-wordgame 1Package: opie-wordgame
2Files: bin/wordgame apps/Games/wordgame.desktop pics/wordgame 2Files: bin/wordgame apps/Games/wordgame.desktop pics/wordgame
3Priority: optional 3Priority: optional
4Section: opie/games 4Section: opie/games
5Maintainer: Martin Imobersteg <imm@gmx.ch> 5Maintainer: Martin Imobersteg <imm@gmx.ch>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 7Depends: task-opie-minimal
9Description: Crossword game 8Description: Crossword game
10 A crossword game for the Opie environment. 9 A crossword game for the Opie environment.
11 Play against the computer or human opponents. 10 Play against the computer or human opponents.
11Version: $QPE_VERSION$EXTRAVERSION
diff --git a/noncore/games/wordgame/wordgame.cpp b/noncore/games/wordgame/wordgame.cpp
index d3160f4..d46e824 100644
--- a/noncore/games/wordgame/wordgame.cpp
+++ b/noncore/games/wordgame/wordgame.cpp
@@ -269,73 +269,73 @@ void WordGame::startGame(const QStringList& playerlist)
269 for (QStringList::ConstIterator it=playerlist.begin(); it!=playerlist.end(); ++it) 269 for (QStringList::ConstIterator it=playerlist.begin(); it!=playerlist.end(); ++it)
270 addPlayer(*it); 270 addPlayer(*it);
271 scoreinfo->init(namelist); 271 scoreinfo->init(namelist);
272 272
273 if ( nplayers ) { 273 if ( nplayers ) {
274 player=0; 274 player=0;
275 readyRack(player); 275 readyRack(player);
276 } 276 }
277 277
278 board->show(); 278 board->show();
279 racks->show(); 279 racks->show();
280} 280}
281 281
282bool WordGame::loadRules(const QString &name) 282bool WordGame::loadRules(const QString &name)
283{ 283{
284 QString filename = Global::applicationFileName( "wordgame", name ); 284 QString filename = Global::applicationFileName( "wordgame", name );
285 QFile file( filename ); 285 QFile file( filename );
286 if ( !file.open( IO_ReadOnly ) ) 286 if ( !file.open( IO_ReadOnly ) )
287 return FALSE; 287 return FALSE;
288 288
289 QTextStream ts( &file ); 289 QTextStream ts( &file );
290 290
291 QString title = name; 291 QString title = name;
292 title.truncate( title.length() - 6 ); 292 title.truncate( title.length() - 6 );
293 setCaption( title ); 293 //setCaption( title );
294 294
295 QString shapepixmap; 295 QString shapepixmap;
296 ts >> shapepixmap; 296 ts >> shapepixmap;
297 int htiles,vtiles; 297 int htiles,vtiles;
298 ts >> htiles >> vtiles; 298 ts >> htiles >> vtiles;
299 299
300 if ( htiles < 3 || vtiles < 3 ) 300 if ( htiles < 3 || vtiles < 3 )
301 return FALSE; 301 return FALSE;
302 302
303 QString rule_shapes; 303 QString rule_shapes;
304 for (int i=0; i<vtiles; i++) { 304 for (int i=0; i<vtiles; i++) {
305 QString line; 305 QString line;
306 ts >> line; 306 ts >> line;
307 rule_shapes += line; 307 rule_shapes += line;
308 } 308 }
309 static int rule_effects[12]; 309 static int rule_effects[12];
310 int re=0,e; 310 int re=0,e;
311 ts >> e; 311 ts >> e;
312 while ( e && re < 10 ) { 312 while ( e && re < 10 ) {
313 rule_effects[re] = e; 313 rule_effects[re] = e;
314 if ( re++ < 10 ) ts >> e; 314 if ( re++ < 10 ) ts >> e;
315 } 315 }
316 316
317 QImage shim = Resource::loadImage("wordgame/wordgame_shapes.xpm"); 317 QImage shim = Resource::loadImage("wordgame/wordgame_shapes");
318 shim = shim.smoothScale((re-1)*TileItem::smallWidth(),TileItem::smallHeight()); 318 shim = shim.smoothScale((re-1)*TileItem::smallWidth(),TileItem::smallHeight());
319 QPixmap bgshapes; 319 QPixmap bgshapes;
320 bgshapes.convertFromImage(shim); 320 bgshapes.convertFromImage(shim);
321 321
322 rule_effects[re++] = 100; // default bonus 322 rule_effects[re++] = 100; // default bonus
323 board = new Board(bgshapes, htiles, vtiles, vbox); 323 board = new Board(bgshapes, htiles, vtiles, vbox);
324 board->setRules(rule_shapes, rule_effects); 324 board->setRules(rule_shapes, rule_effects);
325 connect(board, SIGNAL(temporaryScore(int)), scoreinfo, SLOT(showTemporaryScore(int))); 325 connect(board, SIGNAL(temporaryScore(int)), scoreinfo, SLOT(showTemporaryScore(int)));
326 326
327 bag = new Bag; 327 bag = new Bag;
328 328
329 int count; 329 int count;
330 ts >> count; 330 ts >> count;
331 while ( count ) { 331 while ( count ) {
332 QString text; 332 QString text;
333 int value; 333 int value;
334 ts >> text >> value; 334 ts >> text >> value;
335 if ( text == "_" ) 335 if ( text == "_" )
336 text = ""; 336 text = "";
337 337
338 Tile t(text, value); 338 Tile t(text, value);
339 for (int n=count; n--; ) 339 for (int n=count; n--; )
340 bag->add(t); 340 bag->add(t);
341 341