DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T g

⟦42a29c687⟧ TextFile

    Length: 1985 (0x7c1)
    Types: TextFile
    Names: »global.h«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/X/Xconq/global.h« 

TextFile

/* Copyright (c) 1987, 1988  Stanley T. Shebs, University of Utah. */
/* This program may be used, copied, modified, and redistributed freely */
/* for noncommercial purposes, so long as this notice remains intact. */

/* RCS $Header: global.h,v 1.1 88/06/21 12:29:41 shebs Exp $ */

/* Global data structures. */

/* There is actually no inherent limit on the number of winning and losing */
/* conditions, but scenarios usually only need a couple. */

#define NUMCONDS 10

/* Not many types of conditions (probably could think of a few more). */

#define TERRITORY 0
#define UNITCOUNT 1
#define RESOURCECOUNT 2
#define POSSESSION 3

/* Win/lose conditions can take several different forms.  Some of these */
/* slots could be glommed into a union, but so what... */

typedef struct a_condition {
    bool win;                   /* is this a condition of winning or losing? */
    int type;                   /* based on units, resources, or location? */
    int starttime;              /* first turn to check on condition */
    int endtime;                /* last turn to check on condition */
    int sidesn;                 /* side number to which this cond applies */
    int units[MAXUTYPES];       /* numbers for each type of unit */
    int resources[MAXRTYPES];   /* numbers for each type of resource */
    int x, y;                   /* a location */
    int n;                      /* a vanilla value */
} Condition;

/* Definition of structure containing all global variables. */

typedef struct a_global {
    int time;			/* the current turn */
    int endtime;                /* the last turn of the game */
    bool setproduct;            /* true if production changes allowed */
    bool leavemap;              /* true if units can leave the map */
    int numconds;               /* number of conditions... */
    Condition winlose[NUMCONDS];  /* and space for the conditions themselves */
} Global;

/* Just have the one "global" object. */

extern Global global;