Subversion Repositories shark

Rev

Blame | Last modification | View Log | RSS feed

#define _ATCSIM_HEADER_

#ifndef _INPUT_
#include "input.h"
#endif

#ifndef _CONST_
#include "constants.h"
#endif

#ifndef _ATC_HEADER_
#include "atc.h"
#endif

#include <modules/cabs.h>

/* useful colors... */
int white;
int black;
int red;
int gray;
int green;
int blue;

extern void scenario_jetcontrol();
extern void init_jetcontrol();

extern void read_airports_info();
extern void read_aeroplanes_info();

extern void init_planes();
extern void init_atcs();

typedef struct
{
        int id;
        char airportname[25];  //name of the airport
        int x;
        int y;
        int airportsize;
} airport;

typedef struct
{
        int id;  //id of the plane, which is the id of the task
        int model_id;  //to map to the model that we are using
        int curr_speed;
        int curr_altitude;
        int src_airport_id;
        int dest_airport_id;
        int currx;
        int curry;
        int xtemp;  //temp destination when redirected
        int ytemp;  //temp destination when redirected
        int dept_time;
        int arr_time;
        int zone_id;  //to specify which zone the plane is flying in
        int is_flying;
} aeroplane;    //this struct will be global and contain all information about an aeroplane


typedef struct
{
        int model_id;
        char model[20];
        int year_of_manu;
        int max_passengers;
        int weight;
        int planesize;
        int min_speed;
        int max_speed;
        int min_altitude;
        int max_altitude;
} aeroplane_model_info;

typedef struct
{
        int id;
        int x;
        int y;
} atc;


typedef struct
{
        char written;
        int xtemp;
        int ytemp;
} atcplanecab;

CAB plane_atc_cab_id[NPLANECABS];
CAB atc_plane_cab_id[NPLANECABS];