summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kpacman/score.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/games/kpacman/score.cpp b/noncore/games/kpacman/score.cpp
index b3ff3d9..e91771b 100644
--- a/noncore/games/kpacman/score.cpp
+++ b/noncore/games/kpacman/score.cpp
@@ -1,79 +1,79 @@
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 "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> 22#include <qpixmap.h>
23#include <qstring.h> 23#include <qstring.h>
24#include <qdstream.h> 24#include <qdstream.h>
25#include <qkeycode.h> 25#include <qkeycode.h>
26#include <qtimer.h> 26#include <qtimer.h>
27#include <qfileinfo.h> 27#include <qfileinfo.h>
28 28
29#include "bitfont.h" 29#include "bitfont.h"
30 30
31Score::Score(QWidget *parent, const char *name, int Scheme, int Mode, Bitfont *font) : QWidget(parent, name) 31Score::Score(QWidget *parent, const char *name, int Scheme, int Mode, Bitfont *font) : QWidget(parent, name)
32{ 32{
33 setFocusPolicy(QWidget::StrongFocus); 33 setFocusPolicy(QWidget::StrongFocus);
34 34
35 paused = FALSE; 35 paused = FALSE;
36 36
37 lastScore = -1; 37 lastScore = -1;
38 lastPlayer = -1; 38 lastPlayer = -1;
39 39
40 cursorBlinkTimer = 0; 40 cursorBlinkTimer = 0;
41 cursorBlinkMS = -1; 41 cursorBlinkMS = -1;
42 cursor.x = -1; 42 cursor.x = -1;
43 cursor.y = -1; 43 cursor.y = -1;
44 cursor.on = FALSE; 44 cursor.on = FALSE;
45 cursor.chr = QChar('?'); 45 cursor.chr = QChar('?');
46 46
47 initKeys(); 47 initKeys();
48 48
49 scheme = Scheme; 49 scheme = Scheme;
50 mode = Mode; 50 mode = Mode;
51 confScheme(); 51 confScheme();
52 52
53 bitfont = font; 53 bitfont = font;
54 54
55 highscoreFile.setName(locateHighscoreFilePath().filePath()); 55 highscoreFile.setName(locateHighscoreFilePath().filePath());
56 read(); 56 read();
57 57
58 for (int p = 0; p < maxPlayer; p++) { 58 for (int p = 0; p < maxPlayer; p++) {
59 playerScore[p] = 0; 59 playerScore[p] = 0;
60 playerName[p] = getenv("LOGNAME"); 60 playerName[p] = getenv("LOGNAME");
61 if (playerName[p].length() < minPlayerNameLength) 61 if (playerName[p].length() < minPlayerNameLength)
62 playerName[p].setExpand(minPlayerNameLength-1, ' '); 62 playerName[p].setExpand(minPlayerNameLength-1, ' ');
63 63
64 for (uint i = 0; i < playerName[p].length(); i++) 64 for (uint i = 0; i < playerName[p].length(); i++)
65 if (playerName[p].at(i) < bitfont->firstChar() || 65 if (playerName[p].at(i) < bitfont->firstChar() ||
66 playerName[p].at(i) > bitfont->lastChar()) 66 playerName[p].at(i) > bitfont->lastChar())
67 playerName[p].at(i) = playerName[p].at(i).upper(); 67 playerName[p].at(i) = playerName[p].at(i).upper();
68 } 68 }
69} 69}
70 70
71Score::~Score() 71Score::~Score()
72{ 72{
73 // write(); 73 // write();
74} 74}
75 75
76void Score::paintEvent( QPaintEvent *e) 76void Score::paintEvent( QPaintEvent *e)
77{ 77{
78 if (rect(1, 0, tr(" 1UP ")).intersects(e->rect())) { 78 if (rect(1, 0, tr(" 1UP ")).intersects(e->rect())) {
79 QPixmap pix; 79 QPixmap pix;