From 503fddb48f2229ecc6ed6930a99c4d740ff979e5 Mon Sep 17 00:00:00 2001 From: gregory guy Date: Mon, 17 Aug 2020 20:03:11 +0200 Subject: Second step, convert to tqt3 libraries. Signed-off-by: gregory guy --- kpacman/board.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'kpacman/board.cpp') 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 #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "board.h" #include "bitmaps.h" -Board::Board(int size) : QArray (size) +Board::Board(int size) : TQArray (size) { sz = size; // set size of board @@ -20,7 +20,7 @@ Board::Board(int size) : QArray (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(), -- cgit v1.2.1