summaryrefslogtreecommitdiff
path: root/noncore/games/parashoot
Side-by-side diff
Diffstat (limited to 'noncore/games/parashoot') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/parashoot/base.cpp5
-rw-r--r--noncore/games/parashoot/bullet.cpp5
-rw-r--r--noncore/games/parashoot/cannon.cpp5
-rw-r--r--noncore/games/parashoot/helicopter.cpp4
-rw-r--r--noncore/games/parashoot/interface.cpp10
-rw-r--r--noncore/games/parashoot/man.cpp7
6 files changed, 18 insertions, 18 deletions
diff --git a/noncore/games/parashoot/base.cpp b/noncore/games/parashoot/base.cpp
index 5f3c79d..f232536 100644
--- a/noncore/games/parashoot/base.cpp
+++ b/noncore/games/parashoot/base.cpp
@@ -17,24 +17,23 @@
** not clear to you.
**
**********************************************************************/
#include "codes.h"
#include "base.h"
-#include <qtopia/resource.h>
-
+#include <opie2/oresource.h>
int damage;
Base::Base(QCanvas* canvas) :
QCanvasSprite(0, canvas),
kaboom("landmine"),
ohdear("crmble01")
{
basearray = new QCanvasPixmapArray();
- QString b0 = Resource::findPixmap("parashoot/b0001");
+ QString b0 = Opie::Core::OResource::findPixmap("parashoot/b0001");
b0.replace(QRegExp("0001"),"%1");
basearray->readPixmaps(b0, 4);
setSequence(basearray);
setFrame(0);
move(2, canvas->height()-50);
setZ(10);
diff --git a/noncore/games/parashoot/bullet.cpp b/noncore/games/parashoot/bullet.cpp
index 584f564..1f02251 100644
--- a/noncore/games/parashoot/bullet.cpp
+++ b/noncore/games/parashoot/bullet.cpp
@@ -20,25 +20,26 @@
#include "codes.h"
#include "bullet.h"
#include "man.h"
#include "helicopter.h"
-#include <qpe/resource.h>
+#include <opie2/oresource.h>
+
#include <qpe/qmath.h>
int limit;
int shotcount;
int nobullets;
Bullet::Bullet(QCanvas* canvas, double angle, int cannonx, int cannony) :
QCanvasSprite(0, canvas),
bang("collide01")
{
- QCanvasPixmapArray* bulletarray = new QCanvasPixmapArray(Resource::findPixmap("parashoot/bullet"));
+ QCanvasPixmapArray* bulletarray = new QCanvasPixmapArray(Opie::Core::OResource::findPixmap("parashoot/bullet"));
setSequence(bulletarray);
if (nobullets < limit) {
nobullets++;
move(cannonx, cannony);
dy = 0;
dx = 0;
diff --git a/noncore/games/parashoot/cannon.cpp b/noncore/games/parashoot/cannon.cpp
index 330d850..2f4c353 100644
--- a/noncore/games/parashoot/cannon.cpp
+++ b/noncore/games/parashoot/cannon.cpp
@@ -15,27 +15,26 @@
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
-#include <qtopia/resource.h>
-
+#include <opie2/oresource.h>
#include "codes.h"
#include "cannon.h"
Cannon::Cannon(QCanvas* canvas) :
QCanvasSprite(0, canvas)
{
shotsfired=0;
index = 8;
cannonx = 0;
cannony = 0;
cannonarray = new QCanvasPixmapArray();
- QString c0 = Resource::findPixmap("parashoot/can0001");
+ QString c0 = Opie::Core::OResource::findPixmap("parashoot/can0001");
c0.replace(QRegExp("0001"),"%1");
cannonarray->readPixmaps(c0,17);
setSequence(cannonarray);
setFrame(index);
reposition();
diff --git a/noncore/games/parashoot/helicopter.cpp b/noncore/games/parashoot/helicopter.cpp
index 7d91cd1..42adc34 100644
--- a/noncore/games/parashoot/helicopter.cpp
+++ b/noncore/games/parashoot/helicopter.cpp
@@ -19,25 +19,25 @@
**********************************************************************/
#include "helicopter.h"
#include "man.h"
#include "codes.h"
-#include <qtopia/resource.h>
+#include <opie2/oresource.h>
static QList<Helicopter> all;
Helicopter::Helicopter(QCanvas* canvas) :
QCanvasSprite(0, canvas),
chikachika("aland01")
{
all.append(this);
hits = 0;
QCanvasPixmapArray* helicopterarray = new QCanvasPixmapArray();
- QString h0 = Resource::findPixmap("parashoot/helicopter0001");
+ QString h0 = Opie::Core::OResource::findPixmap("parashoot/helicopter0001");
h0.replace(QRegExp("0001"),"%1");
helicopterarray->readPixmaps(h0,4 );
setSequence(helicopterarray);
setAnimated(true);
move(canvas->width(), 5);
diff --git a/noncore/games/parashoot/interface.cpp b/noncore/games/parashoot/interface.cpp
index 5c9b0ef..8ec7032 100644
--- a/noncore/games/parashoot/interface.cpp
+++ b/noncore/games/parashoot/interface.cpp
@@ -18,14 +18,15 @@
**
**********************************************************************/
#include "interface.h"
#include "man.h"
+#include <opie2/oresource.h>
+
#include <qtopia/qpeapplication.h>
-#include <qtopia/resource.h>
#include <qtoolbar.h>
#include <qtoolbutton.h>
ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
QMainWindow(parent,name,f),
@@ -49,14 +50,15 @@ ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
setToolBarsMovable( FALSE );
QToolBar* toolbar = new QToolBar(this);
toolbar->setHorizontalStretchable( TRUE );
setCaption( tr("ParaShoot") );
- new QToolButton( Resource::loadIconSet("new"), tr("New Game"), 0,
- this, SLOT(newGame()), toolbar, "New Game");
+ QToolButton *btn = new QToolButton( Opie::Core::OResource::loadPixmap("new", Opie::Core::OResource::SmallIcon),
+ tr("New Game"), 0, this, SLOT(newGame()), toolbar, "New Game");
+ btn->setUsesBigPixmap( qApp->desktop()->size().width() > 330 );
levelscore = new QLabel(toolbar);
levelscore->setBackgroundMode( PaletteButton );
levelscore->setAlignment( AlignRight | AlignVCenter | ExpandTabs );
toolbar->setStretchableWidget( levelscore );
showScore(0,0);
@@ -76,13 +78,13 @@ ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
void ParaShoot::resizeEvent(QResizeEvent *)
{
QSize s = centralWidget()->size();
int fw = style().defaultFrameWidth();
canvas.resize( s.width() - fw - 2, s.height() - fw - 2);
- QImage bgimage = Resource::loadImage("parashoot/sky");
+ QImage bgimage = Opie::Core::OResource::loadImage("parashoot/sky");
QPixmap bgpixmap;
bgpixmap.convertFromImage(bgimage.smoothScale(canvas.width(),
canvas.height()), QPixmap::Auto);
canvas.setBackgroundPixmap(bgpixmap);
diff --git a/noncore/games/parashoot/man.cpp b/noncore/games/parashoot/man.cpp
index 0a151b0..080615e 100644
--- a/noncore/games/parashoot/man.cpp
+++ b/noncore/games/parashoot/man.cpp
@@ -19,23 +19,22 @@
**********************************************************************/
#include "codes.h"
#include "man.h"
#include "base.h"
-#include <qtopia/resource.h>
-
+#include <opie2/oresource.h>
int mancount;
Man::Man(QCanvas* canvas) :
QCanvasSprite(0, canvas),
splat("lose") // No tr
{
manarray = new QCanvasPixmapArray();
- QString m0 = Resource::findPixmap("parashoot/man0001");
+ QString m0 = Opie::Core::OResource::findPixmap("parashoot/man0001");
m0.replace(QRegExp("0001"),"%1");
manarray->readPixmaps(m0, 7);
setSequence(manarray);
setAnimated(true);
mancount++;
dead = false;
@@ -44,13 +43,13 @@ Man::Man(QCanvas* canvas) :
Man::Man(QCanvas* canvas, int x, int y) :
QCanvasSprite(0, canvas),
splat("bang") // No tr
{
manarray = new QCanvasPixmapArray();
- QString m0 = Resource::findPixmap("parashoot/man0001");
+ QString m0 = Opie::Core::OResource::findPixmap("parashoot/man0001");
m0.replace(QString("0001"),"%1");
manarray->readPixmaps(m0, 7);
setSequence(manarray);
move(x, y);
setFrame(5);
setZ(300);