typedef struct {
        long x,y,z;
        } Point3;

typedef struct {
       int x,y;
        } Point2;

typedef struct {
        int owner;
        int np;
        int pts[7]; /*references owner relative points */
        int color;
        int SA;
        long midz;
        int viz;
        } POLY;

typedef struct {
     int owner;
     int bp,ep; /* begin, end vertex # */
     int color;
     int SA;
     long midz;
     } LINE;

typedef struct {
     int owner;
     int center;
     long radius;
     int color;
     int SA;
     } SPHERE;

typedef struct {
     int owner;
     int center;
     int color;
     int SA;
     } POINT;

/* Suface Attributes */
#define EXOBRIGHT 1  /* landing lights, markers, heavy cannon fire */
#define EXODIM    2  /* engines, light firearms */
#define SAOUTLINED  3  /* high byte of color contains outline color */
#define SASOLID           4  /* normal no frills */
#define TFIVE           5  /* 25% pixels, transparent */
#define FIFTY           6  /* 50% pixels, standard crosshatch, transparent */   

typedef struct {
     int np;
     Point3 *points;
     int npoly;
     POLY *polylist;
     int nlines;
     LINE *linelist;
     int nspheres;
     SPHERE *spherelist;
     int npoints;
     POINT *pointlist;
     long bsphere;
     } TEMPLATE;




typedef struct {
     int template; /* for restoration if needed */
     Point3 center;
     int phi,theta,rho;
     int viz;
     int nvert;
     Point3 *vertlist;
     Point3 *viewlist;
     Point2 *piclist;
     long bsphere;
     } TOBJECT;



typedef struct 
        {
        int type; /* 0= empty slot */
        int np;
        int owner;
        int pts[4];
        long radius,midz;
        int viz;
        int color;
	int SA;
        } PRIMIT;


#define TPOLY 1
#define TLINE 2
#define TSPHERE 3
#define TPOINT 4
#define PLEND 50
 
extern int vhandle,orez;
extern long altscreen,orgscreen,oldscreen;
extern long block;
extern int primcnt;

#define move(x, y)      { Cconws("\033Y"); Cconout(32+(y)); Cconout(32+(x)); }
extern PRIMIT primlist[100];
extern int NTEMPLATE;
extern TEMPLATE * templist[20];
extern TOBJECT * objectlist[20];

#include "proto.h"

