summaryrefslogtreecommitdiffstats
path: root/ksnake/level.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /ksnake/level.cpp
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksnake/level.cpp')
-rw-r--r--ksnake/level.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/ksnake/level.cpp b/ksnake/level.cpp
index 86360818..0ea100f0 100644
--- a/ksnake/level.cpp
+++ b/ksnake/level.cpp
@@ -23,8 +23,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qbitmap.h>
-#include <qimage.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
#include "level.h"
#include "board.h"
@@ -68,18 +68,18 @@ void Level::create(Img img)
void Level::createRoom()
{
- QImage image = leV->getImage(level);
+ TQImage image = leV->getImage(level);
initBoard(image);
}
void Level::makeImageFromData(const uchar *buf)
{
- QBitmap bitmap(BoardWidth, BoardWidth, buf, true);
- QImage image = bitmap.convertToImage();
+ TQBitmap bitmap(BoardWidth, BoardWidth, buf, true);
+ TQImage image = bitmap.convertToImage();
initBoard (image);
}
-void Level::initBoard(const QImage &image)
+void Level::initBoard(const TQImage &image)
{
int index = 0;
uchar *b;
@@ -88,7 +88,7 @@ void Level::initBoard(const QImage &image)
b = image.scanLine(y);
for ( int x = 0;x < image.width();x++ ) {
- if ( image.bitOrder() == QImage::BigEndian ) {
+ if ( image.bitOrder() == TQImage::BigEndian ) {
if (((*b >> (7 - (x & 7))) & 1) == 1)
board->set(index, brick);
else board->set(index, empty);
@@ -109,13 +109,13 @@ void Level::createBanner()
{
makeImageFromData(level_bits);
- QString num;
+ TQString num;
num.setNum(level);
if(level < 10)
num.insert(0,'0');
- QString left = num.left(1);
- QString right = num.right(1);
+ TQString left = num.left(1);
+ TQString right = num.right(1);
drawNumber ( 606, numbers[left.toInt()] );
drawNumber ( 614, numbers[right.toInt()] );
@@ -123,8 +123,8 @@ void Level::createBanner()
void Level::drawNumber(int beginAt, const uchar *buf)
{
- QBitmap bitmap(7, 9, buf, true);
- QImage image = bitmap.convertToImage();
+ TQBitmap bitmap(7, 9, buf, true);
+ TQImage image = bitmap.convertToImage();
int index = beginAt;
uchar *b;
@@ -134,7 +134,7 @@ void Level::drawNumber(int beginAt, const uchar *buf)
b = image.scanLine(y);
for ( int x = 0;x < image.width();x++ )
{
- if ( image.bitOrder() == QImage::BigEndian )
+ if ( image.bitOrder() == TQImage::BigEndian )
{
if (((*b >> (7 - (x & 7))) & 1) == 1)
board->set(index, brick);