summaryrefslogtreecommitdiff
path: root/noncore/games/parashoot/helicopter.cpp
Side-by-side diff
Diffstat (limited to 'noncore/games/parashoot/helicopter.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/parashoot/helicopter.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/noncore/games/parashoot/helicopter.cpp b/noncore/games/parashoot/helicopter.cpp
index 0923124..036b21e 100644
--- a/noncore/games/parashoot/helicopter.cpp
+++ b/noncore/games/parashoot/helicopter.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qtopia Environment.
+** This file is part of the Qtopia Environment.
**
@@ -24,3 +24,3 @@
-#include <qpe/resource.h>
+#include <qtopia/resource.h>
@@ -39,3 +39,4 @@ Helicopter::Helicopter(QCanvas* canvas) :
h0.replace(QRegExp("0001"),"%1");
- helicopterarray->readPixmaps(h0,3 );
+ helicopterarray->readPixmaps(h0,4 );
+
setSequence(helicopterarray);
@@ -59,2 +60,10 @@ void Helicopter::advance(int phase)
if (phase == 0) {
+ if (frame() == 3) {
+ delete this;
+ return;
+ }
+
+ if (hits >= 2) {
+ setFrame(3);
+ } else {
setFrame(fr%3);
@@ -64,2 +73,3 @@ void Helicopter::advance(int phase)
}
+}
@@ -85,6 +95,2 @@ void Helicopter::done()
hits++;
- if (hits >= 2) {
- setAnimated(false);
- delete this;
- }
}