Diffstat (limited to 'noncore/games/kbill/MCursor.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/kbill/MCursor.cc | 7 |
1 files changed, 4 insertions, 3 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"); |