summaryrefslogtreecommitdiff
path: root/noncore/games/parashoot/cannon.cpp
Side-by-side diff
Diffstat (limited to 'noncore/games/parashoot/cannon.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/games/parashoot/cannon.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/noncore/games/parashoot/cannon.cpp b/noncore/games/parashoot/cannon.cpp
index 3c0a5fe..5671351 100644
--- a/noncore/games/parashoot/cannon.cpp
+++ b/noncore/games/parashoot/cannon.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.
**
@@ -20,3 +20,3 @@
-#include <qpe/resource.h>
+#include <qtopia/resource.h>
@@ -40,6 +40,5 @@ shotsfired=0;
setFrame(index);
- move(canvas->width()/2-20, canvas->height()-32);
- // co ords for barrel of cannon when upright
- barrelypos = canvas->height()-32;
- barrelxpos = canvas->width()/2;
+
+ reposition();
+
movedir = NoDir;
@@ -140 +139,12 @@ int Cannon::rtti() const
}
+
+void Cannon::reposition(void)
+{
+ move(canvas()->width()/2-20, canvas()->height()-32);
+ // co ords for barrel of cannon when upright
+ barrelypos = canvas()->height()-32;
+ barrelxpos = canvas()->width()/2;
+
+ setFrame(index);
+ setCoords();
+}