summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--kpacman/bitfont.cpp2
-rw-r--r--kpacman/board.cpp8
-rw-r--r--kpacman/board.h4
-rw-r--r--kpacman/kpacman.h6
-rw-r--r--kpacman/kpacmanview.cpp2
-rw-r--r--kpacman/painter.cpp8
-rw-r--r--kpacman/painter.h8
-rw-r--r--kpacman/referee.cpp6
-rw-r--r--kpacman/referee.h40
-rw-r--r--kpacman/score.cpp2
-rw-r--r--kpacman/status.cpp2
-rw-r--r--kpacman/status.h6
13 files changed, 49 insertions, 49 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c3fcf00..833e868 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,9 +57,9 @@ option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
include( ConfigureChecks.cmake )
-###### global compiler settings (Qt2 stuff: TQArray vs TQMemArray -- qmemarray.h)
+###### global compiler settings
-add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST -UTQT_NO_COMPAT )
+add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
diff --git a/kpacman/bitfont.cpp b/kpacman/bitfont.cpp
index 91b4baa..1f4d3d9 100644
--- a/kpacman/bitfont.cpp
+++ b/kpacman/bitfont.cpp
@@ -26,7 +26,7 @@ TQPixmap Bitfont::text(TQString str, TQColor fg, TQColor bg)
TQPixmap FG(str.length()*fontWidth, fontHeight);
TQBitmap MASK(str.length()*fontWidth, fontHeight, TRUE);
- const uchar *s = (const uchar *) str.data();
+ const uchar *s = (const uchar *) str.local8Bit().data();
for (uint i = 0; i < str.length(); i++) {
if (font.width() == font.height())
bitBlt(&MASK, i*fontWidth, 0, &font,
diff --git a/kpacman/board.cpp b/kpacman/board.cpp
index 618838d..95ad5f2 100644
--- a/kpacman/board.cpp
+++ b/kpacman/board.cpp
@@ -11,7 +11,7 @@
#include "board.h"
#include "bitmaps.h"
-Board::Board(int size) : TQArray<int> (size)
+Board::Board(int size) : TQMemArray<int> (size)
{
sz = size; // set size of board
@@ -58,7 +58,7 @@ void Board::init(Image image, TQString levelName)
"or could not be opened for reading.");
msg.replace(TQRegExp("@LEVELNAME@"), levelName);
// TQMessageBox::information(0, i18n("Initialization Error"), msg);
- printf("%s\n", msg.data());
+ printf("%s\n", msg.local8Bit());
} else {
map.fill(' ', BoardHeight*BoardWidth);
int height = 0;
@@ -75,7 +75,7 @@ void Board::init(Image image, TQString levelName)
map.replace(height*BoardWidth,
(line.length() > BoardWidth) ? BoardWidth : line.length(),
- line.data());
+ line.local8Bit());
height++;
}
@@ -93,7 +93,7 @@ void Board::init(Image image, TQString levelName)
break;
case Level : setup(demo_bits);
break;
- case File : setup((uchar *) map.data());
+ case File : setup((uchar *) map.local8Bit().data());
break;
default : break;
}
diff --git a/kpacman/board.h b/kpacman/board.h
index 9c19820..3b56973 100644
--- a/kpacman/board.h
+++ b/kpacman/board.h
@@ -1,7 +1,7 @@
#ifndef BOARD_H
#define BOARD_H
-#include <tqarray.h>
+#include <tqmemarray.h>
#include <tqstring.h>
#include <tqptrlist.h>
#include <tqrect.h>
@@ -37,7 +37,7 @@ enum Image { None, Intro, Demo, Level, File };
#define pacmanBit 0x0040
#define monsterBit 0x0100
-class Board : public TQArray<int>
+class Board : public TQMemArray<int>
{
public:
Board (int size);
diff --git a/kpacman/kpacman.h b/kpacman/kpacman.h
index eb20398..e577f38 100644
--- a/kpacman/kpacman.h
+++ b/kpacman/kpacman.h
@@ -173,10 +173,10 @@ class KpacmanApp : public TDEMainWindow
TQPtrList<TDEPopupMenu> *schemesPopup; // submenus for selecting scheme
// ID's of the menuitem(s) for finding/selecting scheme by id
- TQArray<int> modeID;
- TQArray<int> schemeID;
+ TQMemArray<int> modeID;
+ TQMemArray<int> schemeID;
- TQArray<int> schemeMode; // mode(group) of the schemes, -1 if no group
+ TQMemArray<int> schemeMode; // mode(group) of the schemes, -1 if no group
bool highscoresChecked; // highscores display active
bool focusedPause; // Pause caused by focusEvents
diff --git a/kpacman/kpacmanview.cpp b/kpacman/kpacmanview.cpp
index cf89358..eeb396f 100644
--- a/kpacman/kpacmanview.cpp
+++ b/kpacman/kpacmanview.cpp
@@ -120,7 +120,7 @@ void KpacmanView::confScheme()
"or is of an unknown format.");
msg.replace(TQRegExp("@FONTNAME@"), fontName);
// TQMessageBox::critical(this, i18n("Initialization Error"), msg);
- printf("%s\n", msg.data());
+ printf("%s\n", msg.local8Bit());
}
}
diff --git a/kpacman/painter.cpp b/kpacman/painter.cpp
index 256afe0..16c0083 100644
--- a/kpacman/painter.cpp
+++ b/kpacman/painter.cpp
@@ -70,7 +70,7 @@ TQPtrList<TQPixmap> *Painter::loadPixmap(TQWidget *parent, TQString pixmapName,
"or is of an unknown format.");
msg.replace(TQRegExp("@PIXMAPNAME@"), pixmapName);
// TQMessageBox::critical(parent, i18n("Initialization Error"), msg);
- printf("%s\n", msg.data());
+ printf("%s\n", msg.local8Bit());
return 0;
}
@@ -668,7 +668,7 @@ TQString Painter::decodeHexOctString(TQString s)
return s;
}
-void Painter::fillScoreString(TQStrList &list, TQArray<int> &values)
+void Painter::fillScoreString(TQStrList &list, TQMemArray<int> &values)
{
if( !list.isEmpty())
list.clear();
@@ -692,11 +692,11 @@ void Painter::fillScoreString(TQStrList &list, TQArray<int> &values)
s.insert(0, char (values[i] / 1000 + 0x10));
}
- list.append(s.data());
+ list.append(s.local8Bit());
}
}
-void Painter::fillArray(TQArray<int> &array, TQString values, int max)
+void Painter::fillArray(TQMemArray<int> &array, TQString values, int max)
{
array.resize(max);
int last = 0;
diff --git a/kpacman/painter.h b/kpacman/painter.h
index 4781af9..a15c615 100644
--- a/kpacman/painter.h
+++ b/kpacman/painter.h
@@ -53,8 +53,8 @@ public:
protected:
TQString decodeHexOctString(TQString str);
- void fillScoreString(TQStrList &, TQArray<int> &);
- void fillArray(TQArray<int> &, TQString, int);
+ void fillScoreString(TQStrList &, TQMemArray<int> &);
+ void fillArray(TQMemArray<int> &, TQString, int);
void fillStrList(TQStrList &, TQString, int);
void fillPixmapName(TQStrList &);
@@ -75,9 +75,9 @@ private:
int BlockWidth;
int BlockHeight;
- TQArray<int> fruitScore;
+ TQMemArray<int> fruitScore;
TQStrList fruitScoreString;
- TQArray<int> monsterScore;
+ TQMemArray<int> monsterScore;
TQStrList monsterScoreString;
TQString pixmapDirectory;
diff --git a/kpacman/referee.cpp b/kpacman/referee.cpp
index 6051365..dc1a53e 100644
--- a/kpacman/referee.cpp
+++ b/kpacman/referee.cpp
@@ -424,7 +424,7 @@ void Referee::initKeys()
RightKey = TDEAccel::stringToKey(right);
}
-void Referee::fillArray(TQArray<int> &array, TQString values, int max)
+void Referee::fillArray(TQMemArray<int> &array, TQString values, int max)
{
if (max < 0)
max = values.contains(',')+1;
@@ -901,10 +901,10 @@ void Referee::introPaint(int t)
case 12 : repaint(pix->draw(38, 28, RoomPix, i18n("\"CLYDE\""), ORANGE, TQColor(), AlignLeft), FALSE);
break;
case 13 : pts.sprintf("%d", pointScore);
- repaint(pix->draw(28, 44, RoomPix, pts.data(), WHITE, TQColor(), AlignRight), FALSE);
+ repaint(pix->draw(28, 44, RoomPix, pts.local8Bit(), WHITE, TQColor(), AlignRight), FALSE);
repaint(pix->draw(31, 44, RoomPix, "\x1C\x1D\x1E", WHITE, TQColor(), AlignLeft), FALSE);
pts.sprintf("%d", energizerScore);
- repaint(pix->draw(28, 48, RoomPix, pts.data(), WHITE, TQColor(), AlignRight), FALSE);
+ repaint(pix->draw(28, 48, RoomPix, pts.local8Bit(), WHITE, TQColor(), AlignRight), FALSE);
repaint(pix->draw(31, 48, RoomPix, "\x1C\x1D\x1E", WHITE, TQColor(), AlignLeft), FALSE);
break;
case 14 : // "@ 1980 MIDWAY MFG.CO."
diff --git a/kpacman/referee.h b/kpacman/referee.h
index 4d5fd4e..c147d18 100644
--- a/kpacman/referee.h
+++ b/kpacman/referee.h
@@ -80,7 +80,7 @@ protected:
void focusOutEvent(TQFocusEvent *);
void focusInEvent(TQFocusEvent *);
- void fillArray(TQArray<int> &, TQString, int);
+ void fillArray(TQMemArray<int> &, TQString, int);
void fillStrList(TQStrList &, TQString, int);
void fillMapName();
@@ -102,22 +102,22 @@ private:
TQString mapDirectory;
TQStrList mapName;
- TQArray<int> speed;
- TQArray<int> monsterIQ;
- TQArray<int> fruitIQ;
- TQArray<int> fruitIndex;
- TQArray<int> pacmanTicks;
- TQArray<int> remTicks;
- TQArray<int> dangerousTicks;
- TQArray<int> harmlessTicks;
- TQArray<int> harmlessDurTicks;
- TQArray<int> harmlessWarnTicks;
- TQArray<int> arrestTicks;
- TQArray<int> arrestDurTicks;
- TQArray<int> fruitTicks;
- TQArray<int> fruitAppearsTicks;
- TQArray<int> fruitDurTicks;
- TQArray<int> fruitScoreDurTicks;
+ TQMemArray<int> speed;
+ TQMemArray<int> monsterIQ;
+ TQMemArray<int> fruitIQ;
+ TQMemArray<int> fruitIndex;
+ TQMemArray<int> pacmanTicks;
+ TQMemArray<int> remTicks;
+ TQMemArray<int> dangerousTicks;
+ TQMemArray<int> harmlessTicks;
+ TQMemArray<int> harmlessDurTicks;
+ TQMemArray<int> harmlessWarnTicks;
+ TQMemArray<int> arrestTicks;
+ TQMemArray<int> arrestDurTicks;
+ TQMemArray<int> fruitTicks;
+ TQMemArray<int> fruitAppearsTicks;
+ TQMemArray<int> fruitDurTicks;
+ TQMemArray<int> fruitScoreDurTicks;
int monsterScoreDurMS;
int playerDurMS;
@@ -135,9 +135,9 @@ private:
int pointScore;
int energizerScore;
- TQArray<int> fruitScore;
- TQArray<int> monsterScore;
- TQArray<int> extraLifeScore;
+ TQMemArray<int> fruitScore;
+ TQMemArray<int> monsterScore;
+ TQMemArray<int> extraLifeScore;
int extraLifeScoreIndex;
int nextExtraLifeScore;
diff --git a/kpacman/score.cpp b/kpacman/score.cpp
index c4f86b8..68a5682 100644
--- a/kpacman/score.cpp
+++ b/kpacman/score.cpp
@@ -128,7 +128,7 @@ void Score::paintEvent( TQPaintEvent *e)
for (int i = 0; i < 10; i++) {
s.sprintf("%2d%9d %-3.3s %-8.8s",
i+1, hallOfFame[i].points, hallOfFame[i].name.utf8().data(),
- formatDate(hallOfFame[i].moment.date()).data());
+ formatDate(hallOfFame[i].moment.date()).utf8());
if (rect(1, (11+i)*1.25, s).intersects(e->rect())) {
TQPixmap pix = bitfont->text(s, (i == lastScore) ? YELLOW : WHITE, BLACK);
bitBlt(this, x(1), y((11+i)*1.25), &pix);
diff --git a/kpacman/status.cpp b/kpacman/status.cpp
index 65fb7f0..b89e49d 100644
--- a/kpacman/status.cpp
+++ b/kpacman/status.cpp
@@ -136,7 +136,7 @@ TQString Status::decodeHexOctString(TQString s)
return s;
}
-void Status::fillArray(TQArray<int> &array, TQString values, int max)
+void Status::fillArray(TQMemArray<int> &array, TQString values, int max)
{
array.resize(max);
int last = 0;
diff --git a/kpacman/status.h b/kpacman/status.h
index deb162d..6cbf759 100644
--- a/kpacman/status.h
+++ b/kpacman/status.h
@@ -11,7 +11,7 @@
#include <tqwidget.h>
#include <tqpixmap.h>
#include <tqstring.h>
-#include <tqarray.h>
+#include <tqmemarray.h>
#include <tqptrlist.h>
#include <tqstrlist.h>
#include <tqregexp.h>
@@ -35,7 +35,7 @@ protected:
TQString decodeHexOctString(TQString str);
- void fillArray(TQArray<int> &, TQString, int);
+ void fillArray(TQMemArray<int> &, TQString, int);
void fillStrList(TQStrList &, TQString, int);
void fillPixmapName(TQStrList &);
@@ -46,7 +46,7 @@ protected:
void initPixmaps();
private:
- TQArray<int> levelPos;
+ TQMemArray<int> levelPos;
int actualLifes;
int actualLevel;