-rw-r--r-- | noncore/games/kbill/MCursor.cc | 7 | ||||
-rw-r--r-- | noncore/games/kbill/Picture.cc | 6 | ||||
-rw-r--r-- | noncore/games/kbill/config.in | 2 | ||||
-rw-r--r-- | noncore/games/kbill/kbill.pro | 2 |
4 files changed, 9 insertions, 8 deletions
diff --git a/noncore/games/kbill/MCursor.cc b/noncore/games/kbill/MCursor.cc index c581693..93dd559 100644 --- a/noncore/games/kbill/MCursor.cc +++ b/noncore/games/kbill/MCursor.cc | |||
@@ -11,49 +11,50 @@ | |||
11 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * |
12 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * |
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | #include "MCursor.h" | 17 | #include "MCursor.h" |
18 | 18 | ||
19 | #ifdef KDEVER | 19 | #ifdef KDEVER |
20 | #include <kapp.h> | 20 | #include <kapp.h> |
21 | #include <kstandarddirs.h> | 21 | #include <kstandarddirs.h> |
22 | #endif | 22 | #endif |
23 | #include <iostream> | 23 | #include <opie2/odebug.h> |
24 | using namespace Opie::Core; | ||
24 | #include <qpe/resource.h> | 25 | #include <qpe/resource.h> |
25 | MCursor::~MCursor() { | 26 | MCursor::~MCursor() { |
26 | delete cursor; | 27 | delete cursor; |
27 | } | 28 | } |
28 | 29 | ||
29 | void MCursor::load(const char *name, int masked) { | 30 | void MCursor::load(const char *name, int masked) { |
30 | 31 | ||
31 | #ifdef KDEVER | 32 | #ifdef KDEVER |
32 | QString file, mfile; | 33 | QString file, mfile; |
33 | KStandardDirs dirs; | 34 | KStandardDirs dirs; |
34 | 35 | ||
35 | 36 | ||
36 | file = dirs.findResource("data","kbill/bitmaps/" + QString::fromLocal8Bit(name) + ".xbm"); | 37 | file = dirs.findResource("data","kbill/bitmaps/" + QString::fromLocal8Bit(name) + ".xbm"); |
37 | 38 | ||
38 | QBitmap bitmap, mask; | 39 | QBitmap bitmap, mask; |
39 | if (bitmap.load(file) == FALSE) { | 40 | if (bitmap.load(file) == FALSE) { |
40 | std::cerr << "cannot open " << file << std::endl; | 41 | oerr << "cannot open " << file << oendl; |
41 | exit(1); | 42 | exit(1); |
42 | } | 43 | } |
43 | if (masked == SEP_MASK) { | 44 | if (masked == SEP_MASK) { |
44 | // mfile.sprintf ("%sbitmaps/%s_mask.xbm", (const char*)dir, name); | 45 | // mfile.sprintf ("%sbitmaps/%s_mask.xbm", (const char*)dir, name); |
45 | mfile = file = dirs.findResource("data","kbill/bitmaps/" + QString::fromLocal8Bit(name) + "_mask.xbm"); | 46 | mfile = file = dirs.findResource("data","kbill/bitmaps/" + QString::fromLocal8Bit(name) + "_mask.xbm"); |
46 | if (mask.load(mfile) == FALSE) { | 47 | if (mask.load(mfile) == FALSE) { |
47 | std::cerr << "cannot open " << file << std::endl; | 48 | oerr << "cannot open " << file << oendl; |
48 | exit(1); | 49 | exit(1); |
49 | } | 50 | } |
50 | } | 51 | } |
51 | else | 52 | else |
52 | mask = bitmap; | 53 | mask = bitmap; |
53 | #endif | 54 | #endif |
54 | 55 | ||
55 | QBitmap bitmap, mask; | 56 | QBitmap bitmap, mask; |
56 | bitmap = Resource::loadBitmap("kbill/bitmaps/" + QString::fromLocal8Bit(name)); | 57 | bitmap = Resource::loadBitmap("kbill/bitmaps/" + QString::fromLocal8Bit(name)); |
57 | 58 | ||
58 | if (masked == SEP_MASK) | 59 | if (masked == SEP_MASK) |
59 | mask = bitmap = Resource::loadBitmap("kbill/bitmaps/" + QString::fromLocal8Bit(name) + "_mask.xbm"); | 60 | mask = bitmap = Resource::loadBitmap("kbill/bitmaps/" + QString::fromLocal8Bit(name) + "_mask.xbm"); |
diff --git a/noncore/games/kbill/Picture.cc b/noncore/games/kbill/Picture.cc index 9d46257..cf96ddf 100644 --- a/noncore/games/kbill/Picture.cc +++ b/noncore/games/kbill/Picture.cc | |||
@@ -7,26 +7,26 @@ | |||
7 | ***************************************************************************/ | 7 | ***************************************************************************/ |
8 | 8 | ||
9 | /*************************************************************************** | 9 | /*************************************************************************** |
10 | * * | 10 | * * |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * |
12 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | * the Free Software Foundation; either version 2 of the License, or * |
14 | * (at your option) any later version. * | 14 | * (at your option) any later version. * |
15 | * * | 15 | * * |
16 | ***************************************************************************/ | 16 | ***************************************************************************/ |
17 | #include "Picture.h" | 17 | #include "Picture.h" |
18 | 18 | ||
19 | #include <iostream> | 19 | #include <opie2/odebug.h> |
20 | 20 | using namespace Opie::Core; | |
21 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
22 | #ifdef KDEVER | 22 | #ifdef KDEVER |
23 | #include <kapp.h> | 23 | #include <kapp.h> |
24 | #include <kstandarddirs.h> | 24 | #include <kstandarddirs.h> |
25 | #include <kdebug.h> | 25 | #include <kdebug.h> |
26 | #endif | 26 | #endif |
27 | void Picture::load(const char *name, int index) { | 27 | void Picture::load(const char *name, int index) { |
28 | //QString dir = KApplication::kde_datadir(), file; | 28 | //QString dir = KApplication::kde_datadir(), file; |
29 | // QString dir = locate("data",""),file; | 29 | // QString dir = locate("data",""),file; |
30 | // dir += "/kbill/"; | 30 | // dir += "/kbill/"; |
31 | // if (index>=0) | 31 | // if (index>=0) |
32 | // file.sprintf ("%spixmaps/%s_%d.xpm", (const char *)dir, name, index); | 32 | // file.sprintf ("%spixmaps/%s_%d.xpm", (const char *)dir, name, index); |
@@ -39,25 +39,25 @@ void Picture::load(const char *name, int index) { | |||
39 | if (index>=0) { | 39 | if (index>=0) { |
40 | //kdDebug() << "Here"; | 40 | //kdDebug() << "Here"; |
41 | QString sindex; | 41 | QString sindex; |
42 | sindex.setNum(index); | 42 | sindex.setNum(index); |
43 | // kdDebug() << "kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm"; | 43 | // kdDebug() << "kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm"; |
44 | file = dirs.findResource("data","kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm"); | 44 | file = dirs.findResource("data","kbill/pixmaps/" + QString::fromLocal8Bit(name) + "_" + sindex + ".xpm"); |
45 | } else { | 45 | } else { |
46 | file = dirs.findResource("data","kbill/pixmaps/" + QString::fromLocal8Bit(name) + ".xpm"); | 46 | file = dirs.findResource("data","kbill/pixmaps/" + QString::fromLocal8Bit(name) + ".xpm"); |
47 | } | 47 | } |
48 | kdDebug() << file << std::endl; | 48 | kdDebug() << file << std::endl; |
49 | pix = new QPixmap(); | 49 | pix = new QPixmap(); |
50 | if (pix->load(file) == FALSE) | 50 | if (pix->load(file) == FALSE) |
51 | std::cerr << "cannot open " << file << std::endl; | 51 | oerr << "cannot open " << file << oendl; |
52 | width = pix->width(); | 52 | width = pix->width(); |
53 | height = pix->height(); | 53 | height = pix->height(); |
54 | #endif | 54 | #endif |
55 | QString sindex; | 55 | QString sindex; |
56 | pix = new QPixmap(); | 56 | pix = new QPixmap(); |
57 | sindex.setNum(index); | 57 | sindex.setNum(index); |
58 | if (index>=0) | 58 | if (index>=0) |
59 | pix->load(Resource::findPixmap("kbill/pixmaps/" + QString::fromLocal8Bit(name) +"_"+ sindex)); | 59 | pix->load(Resource::findPixmap("kbill/pixmaps/" + QString::fromLocal8Bit(name) +"_"+ sindex)); |
60 | else | 60 | else |
61 | pix->load(Resource::findPixmap("kbill/pixmaps/" + QString::fromLocal8Bit(name))); | 61 | pix->load(Resource::findPixmap("kbill/pixmaps/" + QString::fromLocal8Bit(name))); |
62 | 62 | ||
63 | width = pix->width(); | 63 | width = pix->width(); |
diff --git a/noncore/games/kbill/config.in b/noncore/games/kbill/config.in index ba830a9..a505e34 100644 --- a/noncore/games/kbill/config.in +++ b/noncore/games/kbill/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config KBILL | 1 | config KBILL |
2 | boolean "opie-kbill (hit Bill before he can infect your network with a wannabe OS)" | 2 | boolean "opie-kbill (hit Bill before he can infect your network with a wannabe OS)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE |
diff --git a/noncore/games/kbill/kbill.pro b/noncore/games/kbill/kbill.pro index 8ecad10..c1d2652 100644 --- a/noncore/games/kbill/kbill.pro +++ b/noncore/games/kbill/kbill.pro | |||
@@ -1,16 +1,16 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG = qt warn_on | 2 | CONFIG = qt warn_on |
3 | HEADERS = kbill.h field.h Bucket.h Cable.h Computer.h Game.h Horde.h \ | 3 | HEADERS = kbill.h field.h Bucket.h Cable.h Computer.h Game.h Horde.h \ |
4 | Library.h MCursor.h Monster.h Network.h Picture.h Spark.h Strings.h \ | 4 | Library.h MCursor.h Monster.h Network.h Picture.h Spark.h Strings.h \ |
5 | UI.h objects.h inputbox.h | 5 | UI.h objects.h inputbox.h |
6 | SOURCES = field.cpp Bucket.cc Cable.cc Computer.cc Game.cc Horde.cc \ | 6 | SOURCES = field.cpp Bucket.cc Cable.cc Computer.cc Game.cc Horde.cc \ |
7 | Library.cc MCursor.cc Monster.cc Network.cc Picture.cc \ | 7 | Library.cc MCursor.cc Monster.cc Network.cc Picture.cc \ |
8 | Spark.cc UI.cpp inputbox.cpp kbill.cpp | 8 | Spark.cc UI.cpp inputbox.cpp kbill.cpp |
9 | INTERFACES = helpdialog.ui | 9 | INTERFACES = helpdialog.ui |
10 | TARGET = kbill | 10 | TARGET = kbill |
11 | INCLUDEPATH+= $(OPIEDIR)/include | 11 | INCLUDEPATH+= $(OPIEDIR)/include |
12 | DEPENDPATH+= $(OPIEDIR)/include | 12 | DEPENDPATH+= $(OPIEDIR)/include |
13 | LIBS += -lqpe -lstdc++ | 13 | LIBS += -lqpe -lopiecore2 |
14 | DESTDIR = $(OPIEDIR)/bin | 14 | DESTDIR = $(OPIEDIR)/bin |
15 | 15 | ||
16 | include( $(OPIEDIR)/include.pro ) | 16 | include( $(OPIEDIR)/include.pro ) |