diff options
Diffstat (limited to 'kpacman/board.cpp')
-rw-r--r-- | kpacman/board.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kpacman/board.cpp b/kpacman/board.cpp index 5a30994..1f98f7f 100644 --- a/kpacman/board.cpp +++ b/kpacman/board.cpp @@ -1,16 +1,16 @@ #include <kapp.h> #include <klocale.h> -#include <qrect.h> -#include <qregexp.h> -#include <qmessagebox.h> -#include <qfile.h> -#include <qtextstream.h> +#include <ntqrect.h> +#include <ntqregexp.h> +#include <ntqmessagebox.h> +#include <ntqfile.h> +#include <ntqtextstream.h> #include "board.h" #include "bitmaps.h" -Board::Board(int size) : QArray<int> (size) +Board::Board(int size) : TQArray<int> (size) { sz = size; // set size of board @@ -20,7 +20,7 @@ Board::Board(int size) : QArray<int> (size) init(None); // initialize varibales } -void Board::init(Image image, QString levelName) +void Board::init(Image image, TQString levelName) { prisonEntry = OUT; prisonExit = OUT; @@ -49,28 +49,28 @@ void Board::init(Image image, QString levelName) if (mapName == levelName) image = File; else { - QFile levelFile(levelName); + TQFile levelFile(levelName); if (!levelFile.open(IO_ReadOnly)) { - QString msg = i18n("The levelmap could not be constructed.\n\n" + TQString msg = i18n("The levelmap could not be constructed.\n\n" "The file '@LEVELNAME@' does not exist,\n" "or could not be opened for reading."); - msg.replace(QRegExp("@LEVELNAME@"), levelName); - // QMessageBox::information(0, i18n("Initialization Error"), msg); + msg.replace(TQRegExp("@LEVELNAME@"), levelName); + // TQMessageBox::information(0, i18n("Initialization Error"), msg); printf("%s\n", msg.data()); } else { map.fill(' ', BoardHeight*BoardWidth); int height = 0; - QTextStream levelStream(&levelFile); + TQTextStream levelStream(&levelFile); while (!levelStream.eof() && height < BoardHeight) { - QString line = levelStream.readLine(); + TQString line = levelStream.readLine(); - if (line.find(QRegExp("^ *;")) == -1) { + if (line.find(TQRegExp("^ *;")) == -1) { - line.replace(QRegExp(";.*"), ""); // strip off comments - line.replace(QRegExp("\" *$"), ""); // strip off trailing " - line.replace(QRegExp("^ *\""), ""); // strip off leading " + line.replace(TQRegExp(";.*"), ""); // strip off comments + line.replace(TQRegExp("\" *$"), ""); // strip off trailing " + line.replace(TQRegExp("^ *\""), ""); // strip off leading " map.replace(height*BoardWidth, (line.length() > BoardWidth) ? BoardWidth : line.length(), |