INV.H
The inv.h file contains definitions for SPACE_INVADERS game, classes.
/****************************************************************
    SPACE INVADERS (V1.0), BY AHARON HILLEL.
    gcc version 3.2 (mingw special 20020817-1)
    ALLEGRO VERSION: 4.1.12 (WIP)
    ALLEGRO DATE:    2003-11-10
****************************************************************/
#include "base.h"
/***********************************************
   PLACE ALL CLASSES THAT ARE USED BY INVADERS
   GAME IN THIS FILE.
***********************************************/

#if !defined( _INV_H_ )
#define _INV_H_
#define MOTHER_SHIP_Y_TOP 54
#define MOTHER_SHIP_TIME_EXPR (550 + (rand() % 100))

#define INV_INVADERS_FORMATION_Y_START 74
#define GAL_INVADERS_FORMATION_Y_START 224
#define INVADER_W 48
#define INVADER_H 30
#define INVADERS_COLS     12
#define GAL_INVADERS_COLS  8
#define INVADERS_ROWS  5
#define INV_GLAVADERS_ROWS 4  // For GALVADERS game.

#define INV_TYPES 18

#define INV_PLAYER_BULLET_SPEED -8

struct st_mother_ship_type
{
    class enemy *ship;
    int time_for_mother_ship;
    int x_start;
    int x_inc;
    st_enemy_params e;
};
typedef st_mother_ship_type st_mother_ship;

class inv_formation : public formation
{
    private:
      BITMAP *dest;
      int next_bullet;
      const int level;
      st_pixel *fire_options;
      int n_fire_options;
      int invaders_landed_on_earth;
      unsigned int frame_rate_n_items[8];
      unsigned int frame_rate_index;
      unsigned int s_frame_rate;
      
      st_mother_ship mother_ship;
      void move_mother_ship(void);
      
    public:
      static st_bullet_params bullet_params;
      static st_pixel bullet_test_pixles[];
      static st_colors bullet_test_colors;
    
      inv_formation(BITMAP *dst, const int l, const st_formation_param &p);
      inline int get_level(void) { return level; };
      inline int get_invaders_landed_on_earth(void) { return invaders_landed_on_earth; };
      int destroy_mother_ship(int hit_x_pos);
      inline void set_next_bullet(int value) { next_bullet = value; };
      inline void remove() { if(mother_ship.ship) mother_ship.ship->remove(); formation::remove(); };
      inline void draw() { if(mother_ship.ship) mother_ship.ship->draw(); formation::draw(); };
      void action();
      ~inv_formation();
};

class inv_formation *create_invaders_formation(unsigned char game_type, int level, RLE_SPRITE **dt, int index, BITMAP *dst);
#endif // _INV_H_