~ubuntu-branches/ubuntu/intrepid/wing/intrepid

« back to all changes in this revision

Viewing changes to planetype.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar (Debian packages)
  • Date: 2006-05-29 15:23:03 UTC
  • mfrom: (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20060529152303-m1nyh4gf9b9few04
Tags: 0.7-27
* debian/control:
  + Removed the wing/wing-data circular dependency.
  + Set policy to 3.7.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "planetype.h"
2
 
extern volatile int timer;
3
1
 
4
2
//========================================================================
5
3
PlaneTYPE :: PlaneTYPE ( )
9
7
  myImageIndex ( 0 ),
10
8
  explode_stage ( 0 ),  
11
9
  last_shot_time ( 0 ),
12
 
  invuln_count ( 0 ),
13
10
  myScore               (0),
14
11
  myNumLives   ( MAX_NUM_LIVES )
15
12
{ }
83
80
        return dead;
84
81
}
85
82
//========================================================================
86
 
bool PlaneTYPE :: GetVuln ( ) const
87
 
{
88
 
        return !dead && !invuln_count;
89
 
}
90
 
//========================================================================
91
83
int PlaneTYPE :: GetNumLives ( ) const
92
84
{
93
85
        return myNumLives;
102
94
{
103
95
        myBullets.UpdateAndDisplayShot ( buffer );
104
96
   if ( ! dead )
105
 
   {
106
 
                if (invuln_count > 0)
107
 
                        invuln_count--;
108
 
                if (!(invuln_count & 1))
109
 
                        draw_sprite ( buffer, myArrayOfImages.GetImage( myImageIndex ), myXPos, myYPos );
110
 
   }
 
97
                draw_sprite ( buffer, myArrayOfImages.GetImage( myImageIndex ), myXPos, myYPos );
111
98
        else if ( explode_stage != PLANE_EXPLODE_STAGES - 1 )
112
99
   {
113
100
                draw_sprite ( buffer, explode_images.GetImage( explode_stage ), myXPos, myYPos );
196
183
   myImageIndex = myArrayOfImages.Length () / 2;
197
184
   dead = false;
198
185
   explode_stage = 0;
199
 
   invuln_count = 100;
200
186
}
201
187
//=======================================================================