From 576eb4299a00bc053db35414406f46372a0f70f2 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:42:31 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksokoban/ImageData.cpp | 56 +++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'ksokoban/ImageData.cpp') diff --git a/ksokoban/ImageData.cpp b/ksokoban/ImageData.cpp index 13040c47..c34ece36 100644 --- a/ksokoban/ImageData.cpp +++ b/ksokoban/ImageData.cpp @@ -20,10 +20,10 @@ #include "ImageData.h" #include -#include -#include -#include -#include +#include +#include +#include +#include ImageData::ImageData() : indexSize_(0), size_(0), halfSize_(0) { random.setSeed(0); @@ -52,28 +52,28 @@ ImageData::expandIndex(int size) { indexSize_ = size; } -const QPixmap & +const TQPixmap & ImageData::upperLarge(int index) { assert(index >= 0); if (indexSize_ <= index) expandIndex(index); return largeStone_xpm_[(unsigned char)upperLargeIndex_[index]]; } -const QPixmap & +const TQPixmap & ImageData::lowerLarge(int index) { assert(index >= 0); if (indexSize_ <= index) expandIndex(index); return largeStone_xpm_[(unsigned char)lowerLargeIndex_[index]]; } -const QPixmap & +const TQPixmap & ImageData::leftSmall(int index) { assert(index >= 0); if (indexSize_ <= index) expandIndex(index); return smallStone_xpm_[(unsigned char)leftSmallIndex_[index]]; } -const QPixmap & +const TQPixmap & ImageData::rightSmall(int index) { assert(index >= 0); if (indexSize_ <= index) expandIndex(index); @@ -91,12 +91,12 @@ ImageData::resize(int size) { for (int i=0; i g && r > b) { // only modify redish pixels - QColor col(r, g, b); - QColor lcol = col.light(130); + TQColor col(r, g, b); + TQColor lcol = col.light(130); img.setPixel(x, y, lcol.rgb()); } @@ -162,7 +162,7 @@ ImageData::brighten(QImage& img) { } void -ImageData::wall(QPainter &p, int x, int y, int index, bool left, bool right) { +ImageData::wall(TQPainter &p, int x, int y, int index, bool left, bool right) { if (left) p.drawPixmap(x, y, upperLarge(index-1), halfSize_); else p.drawPixmap(x, y, leftSmall(index)); @@ -173,41 +173,41 @@ ImageData::wall(QPainter &p, int x, int y, int index, bool left, bool right) { } void -ImageData::floor(QPainter &p, int x, int y) { +ImageData::floor(TQPainter &p, int x, int y) { p.eraseRect(x, y, size_, size_); } void -ImageData::goal(QPainter &p, int x, int y) { +ImageData::goal(TQPainter &p, int x, int y) { p.drawPixmap(x, y, otherPixmaps_[2]); } void -ImageData::man(QPainter &p, int x, int y) { +ImageData::man(TQPainter &p, int x, int y) { p.drawPixmap(x, y, otherPixmaps_[3]); } void -ImageData::object(QPainter &p, int x, int y) { +ImageData::object(TQPainter &p, int x, int y) { p.drawPixmap(x, y, otherPixmaps_[0]); } void -ImageData::saveman(QPainter &p, int x, int y) { +ImageData::saveman(TQPainter &p, int x, int y) { p.drawPixmap(x, y, otherPixmaps_[4]); } void -ImageData::treasure(QPainter &p, int x, int y) { +ImageData::treasure(TQPainter &p, int x, int y) { p.drawPixmap(x, y, otherPixmaps_[1]); } void -ImageData::brightObject(QPainter &p, int x, int y) { +ImageData::brightObject(TQPainter &p, int x, int y) { p.drawPixmap(x, y, brightObject_); } void -ImageData::brightTreasure(QPainter &p, int x, int y) { +ImageData::brightTreasure(TQPainter &p, int x, int y) { p.drawPixmap(x, y, brightTreasure_); } -- cgit v1.2.1