|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T s
Length: 4131 (0x1023) Types: TextFile Names: »ships.h«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987 └─⟦this⟧ »EUUGD18/General/Gb/ships.h«
/* * Galactic Bloodshed (Robert Chansky, smq@b) */ #define NUMSTYPES (25+1) #define STYPE_POD 0 #define STYPE_SHUTTLE 1 #define STYPE_COMSAT 2 #define STYPE_BATTLE 3 #define STYPE_DESTROYER 4 #define STYPE_FIGHTER 5 #define STYPE_CARGO 6 #define STYPE_EXPLORER 7 #define STYPE_TANKER 8 #define STYPE_STATION 9 #define STYPE_DREADNT 10 #define STYPE_MITHRIL 11 #define STYPE_CRYSTAL 12 #define STYPE_GOD 13 #define STYPE_MINE 14 #define STYPE_MIRROR 15 #define OTYPE_TERRA 16 #define OTYPE_CANIST 17 #define OTYPE_VN 18 #define OTYPE_PLBOMB 19 #define OTYPE_CLOAK 20 #define OTYPE_SUPPRESS 21 #define OTYPE_AMULET 22 #define OTYPE_BIOW 23 #define OTYPE_GR 24 #define OTYPE_TRANSDEV 25 #define NUMABILS 11 /* 0 - 10 */ #define ABIL_CARGO 0 /*#define ABIL_STEALTH 1*/ #define ABIL_DESTCAP 1 #define ABIL_GUNS 2 #define ABIL_FUELCAP 3 #define ABIL_TECH 4 #define ABIL_MAXCREW 5 #define ABIL_ARMOR 6 #define ABIL_COST 7 #define ABIL_MASS 8 #define ABIL_CANMOVE 9 #define ABIL_HASSWITCH 10 #define TOWARDS 1 /* 0 is neither */ #define AWAY 2 #define BOTH 3 typedef struct ship shiptype; typedef struct orders ordertype; typedef struct place placetype; struct orders { /* standing orders for ships, planets */ /*char moves[howmanybytes(MAXPLAYERS)]; /* whom to move towards/away */ /*unsigned speed : 4; /* what speed has been ordered */ /*unsigned towards : 2; /* move towards, away */ /*unsigned biggerthan : 1; /* move away from ships bigger than you */ unsigned bombard : 1; /* bombard planet we're on */ }; struct ship { float xpos,ypos; float fuel,mass; /*char name[NAMESIZE];*/ /*us abils[NUMABILS-2]; /* only certain abilities are kept track*/ unsigned short destshipno; /* destination ship # */ union { ordertype o; /* standing orders for ship */ struct a { /* if the ship is a Space Mirror */ short shipno; /* aimed at what ship */ char snum; /* aimed at what star */ percent intensity; /* intensity of aiming */ unsigned pnum : BITS_MAXPLANETS; /* aimed at what planet */ unsigned level : 2; /* aimed at what level */ } aimed_at; struct o2 { short number; /* for misc functions */ short number2; /* again */ unsigned on : 1; /* on or off */ } object; } orders; char storbits; /* what star # orbits */ char deststar; /* destination star */ unsigned destpnum : BITS_MAXPLANETS; /* destination planet */ unsigned pnumorbits : BITS_MAXPLANETS; /* # of planet if orbiting */ unsigned damage : 7; /* amt of damage */ unsigned rad : 7; /* irradiated */ unsigned destruct : 16; /* stuff it's carrying */ unsigned resource : 16; unsigned popn : 16; /* crew */ unsigned owner : BITS_MAXPLAYERS; /* owner of ship */ unsigned speed : 3; /* what speed to travel at */ /*unsigned augmented : 4; /* # of times augmented (max 10) ? */ unsigned whatdest : 2; /* where going (same as Dir) */ unsigned whatorbits : 2; /* where orbited (same as Dir) */ unsigned type : 5; /* what type ship is */ unsigned is_cloaked : 1; /* 1 bit: is cloaked ship */ unsigned is_sheep : 1; /* 1 bit: is under influence of mind control */ unsigned is_docked : 1; /* 1 bit: is landed on a planet or docked */ unsigned notified : 1; /* 1bit: has been notified of something */ unsigned is_dead : 1; /* 1 bit: is destroyed ship */ unsigned is_examined : 1; /* 1 bit: has been examined */ }; struct place { /* used in function return for finding place */ char snum; char pnum; short shipno; shiptype *shipptr; unsigned level : 2; /* .level: same as Dir */ unsigned err : 1; /* if error */ }; /* whether ship is an object or not */ #define is_object(s) ((s)->type > STYPE_MIRROR) /* can takeoff & land, is mobile, etc. */ #define can_move(s) (Shipdata[(s)->type][ABIL_CANMOVE]) /* has an on/off switch */ #define has_switch(s) (Shipdata[(s)->type][ABIL_HASSWITCH]) extern placetype Getplace(); extern char *Dispplace(),*Dispshiporbits(); extern int Shipdata[NUMSTYPES][NUMABILS]; extern char Shipltrs[]; extern char *Shipnames[];