-rw-r--r-- | noncore/games/qasteroids/view.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/noncore/games/qasteroids/view.cpp b/noncore/games/qasteroids/view.cpp index ef08343..448a54a 100644 --- a/noncore/games/qasteroids/view.cpp +++ b/noncore/games/qasteroids/view.cpp @@ -25,104 +25,104 @@ #include "view.h" #include <qpe/resource.h> #include <qapplication.h> #include <qkeycode.h> #include <qaccel.h> #include <stdlib.h> #include <math.h> #define IMG_BACKGROUND "qasteroids/bg.png" #define REFRESH_DELAY 33 #define SHIP_SPEED 0.3 #define MISSILE_SPEED 10.0 #define SHIP_STEPS 64 #define ROTATE_RATE 2 #define SHIELD_ON_COST 1 #define SHIELD_HIT_COST 30 #define BRAKE_ON_COST 4 #define MAX_ROCK_SPEED 2.5 #define MAX_POWERUP_SPEED 1.5 #define MAX_SHIP_SPEED 8 #define MAX_BRAKES 5 #define MAX_SHIELDS 5 #define MAX_FIREPOWER 5 #define TEXT_SPEED 4 #define PI_X_2 6.283185307 #ifndef M_PI #define M_PI 3.141592654 #endif struct { int id; const char *path; int frames; } kas_animations [] = { // { ID_ROCK_LARGE, "rock1/rock1\%1.png", 32 }, { ID_ROCK_MEDIUM, "rock2/rock2\%1.png", 32 }, { ID_ROCK_SMALL, "rock3/rock3\%1.png", 32 }, { ID_SHIP, "ship/ship\%1.png", 32 }, - { ID_MISSILE, "missile/missile.png", 1 }, + { ID_MISSILE, "missile/missile.png", 0 }, { ID_BIT, "bits/bits\%1.png", 16 }, - { ID_EXHAUST, "exhaust/exhaust.png", 1 }, - { ID_ENERGY_POWERUP, "powerups/energy.png", 1 }, + { ID_EXHAUST, "exhaust/exhaust.png", 0 }, + { ID_ENERGY_POWERUP, "powerups/energy.png", 0 }, // { ID_TELEPORT_POWERUP, "powerups/teleport%1.png", 12 }, - { ID_BRAKE_POWERUP, "powerups/brake.png", 1 }, - { ID_SHIELD_POWERUP, "powerups/shield.png", 1 }, - { ID_SHOOT_POWERUP, "powerups/shoot.png", 1 }, + { ID_BRAKE_POWERUP, "powerups/brake.png", 0 }, + { ID_SHIELD_POWERUP, "powerups/shield.png", 0 }, + { ID_SHOOT_POWERUP, "powerups/shoot.png", 0 }, { ID_SHIELD, "shield/shield\%1.png", 6 }, { 0, 0, 0 } }; KAsteroidsView::KAsteroidsView( QWidget *parent, const char *name ) : QWidget( parent, name ), field(200, 200), view(&field,this) { view.setVScrollBarMode( QScrollView::AlwaysOff ); view.setHScrollBarMode( QScrollView::AlwaysOff ); rocks.setAutoDelete( TRUE ); missiles.setAutoDelete( TRUE ); bits.setAutoDelete( TRUE ); powerups.setAutoDelete( TRUE ); exhaust.setAutoDelete( TRUE ); QPixmap pm( Resource::loadPixmap(IMG_BACKGROUND) ); field.setBackgroundPixmap( pm ); textSprite = new QCanvasText( &field ); QFont font( "helvetica", 14 ); textSprite->setFont( font ); shield = 0; shieldOn = FALSE; refreshRate = REFRESH_DELAY; readSprites(); shieldTimer = new QTimer( this ); connect( shieldTimer, SIGNAL(timeout()), this, SLOT(hideShield()) ); mTimerId = -1; shipPower = MAX_POWER_LEVEL; vitalsChanged = TRUE; can_destroy_powerups = FALSE; mPaused = TRUE; } // - - - KAsteroidsView::~KAsteroidsView() { } |