home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / TIERRA40.ZIP / ALMOND / OVERVIEW / OVERVIEW.H < prev    next >
C/C++ Source or Header  |  1992-07-06  |  3KB  |  187 lines

  1. /*
  2. * overview.h
  3. *
  4. * Copyright (c) 1991, 1992 by Marc W. Cygnus and Virtual Life
  5. * All Rights Reserved.
  6. *
  7. */
  8.  
  9. #ifndef    __OVERVIEW_H
  10. #define    __OVERVIEW_H
  11.  
  12. #include "portlayr.h"
  13.  
  14. #include <almemory.h>
  15. #include <mlayer.h>
  16.  
  17.  
  18. #define    MicroRez    10
  19. #define    ZoomRez        3
  20. #define    HiRez        0
  21. #define    MedRez        1
  22. #define    LoRez        2
  23.  
  24. #define    HiRezCutoff    60000L
  25. #define    LoRezCutoff    100000L
  26.  
  27. #define OV_DISABLED     0
  28. #define OV_ENABLED      1
  29. #define IP_DISABLED     2
  30. #define IP_ENABLED      3
  31. #define MV_DISABLED     4
  32. #define MV_ENABLED      5
  33.  
  34. #define    NUM_SPECCOLOURS        9
  35.  
  36. /*** constants used with statbox ***/
  37.  
  38. #define         ST_UBorder      6
  39. #define         ST_KeyWidth     10
  40. #define         ST_KeyLength    30
  41. #define         ST_Skip0        0.5
  42. #define         ST_Skip1        0.4
  43. #define         ST_Skip2        0.4
  44. #define         ST_LBorder      6
  45. #define        ST_UpdateRate    14
  46.  
  47. /*** ***/
  48.  
  49.  
  50. #define    MEM_SCROLL        1
  51.  
  52.  
  53. #define        OV_VERSION        "(beta.2)"
  54.  
  55.  
  56. typedef struct    _size_map {    /* to keep track of size class info */
  57.  
  58.   u_long                len;
  59.   u_long                pop;
  60.   u_char                colour;
  61.   struct _size_map *    next;
  62.  
  63. } Sizemap;
  64.  
  65.  
  66. typedef struct    _org_map {    /* list of actual organisms */
  67.  
  68.   u_long        start;
  69.   u_long        len;
  70.   u_long        ip_location;
  71.   u_long        from;
  72.   u_long        to;
  73.   u_long        colour;
  74.   struct _org_map    *next;
  75.   struct _org_map    *prev;
  76.  
  77. } OrgMap;
  78.  
  79.  
  80. typedef struct    _mem_map {    /* to provide redraw and query abilities */
  81.  
  82.   u_short        start;
  83.   u_short        len;
  84.   struct _org_map    *org;
  85.   struct _mem_map    *next;
  86.  
  87. } MemMap;
  88.  
  89.  
  90. typedef struct {
  91.   XtAppContext        app_con;
  92.   Display        *d;
  93.  
  94.   Widget        top;
  95.   Widget        gfxframe;
  96.   Widget        memframe;
  97.   Widget        etcbox;
  98.   Widget        statbox;
  99.   Widget        memscroll;
  100.  
  101.   Widget        l_simulation;
  102.   Widget        l_stats;
  103.   char            s_simulation[ 128 ];    /* HARDCODED CONSTANT */
  104.  
  105.   GC            memgc;
  106.  
  107.   Colormap        cmap;
  108.  
  109.   String        geometry;
  110.   String        iconGeometry;
  111.   Pixel            foreground;
  112.   Pixel            background;
  113.   Pixel            cmemory;
  114.   Pixel            cspectrum[NUM_SPECCOLOURS];
  115.   Pixel            cother;
  116.  
  117.   XFontStruct        *defaultfont;
  118.  
  119.   String        ifname;
  120.   XFontStruct        *infofont;
  121.   String        mlfname;
  122.   XFontStruct        *memlabelfont;
  123.   String        stfname;
  124.   XFontStruct        *statfont;
  125.  
  126.   int            memscrollwidth;
  127.  
  128. } GtXStuff, *GtXStuffPtr;
  129.  
  130.  
  131. typedef struct {
  132.   GtXStuff    X;
  133.  
  134.   int        simstate;
  135.   int        ipstate;
  136.   int        mvstate;
  137.  
  138.   Sizemap    *sizemaproot;
  139.   u_long    colours[NUM_SPECCOLOURS];
  140.   int        numcolours;
  141.   u_long    key_list[ NUM_SPECCOLOURS+1 ][ 4 ];
  142.  
  143.   char        hostname[ 65 ];        /* MAXHOSTNAMELEN + 1 */
  144.   u_short    simport;
  145.  
  146.   MemMap    **memmap;
  147.   int        memrows;
  148.  
  149.   OrgMap    *orgmap;
  150.  
  151.   long        InstExe_m;
  152.   long        NumCells;
  153.   long        NumGenotypes;
  154.   long        NumSizes;
  155.  
  156.   u_long    memsize;
  157.   int        rez;
  158.   int        hashlen;
  159.   int        memrwidth;
  160.   int        memrspace;
  161.   int        memrlen;
  162.   int        vbd;
  163.   int        lbd;
  164.   int        rbd;
  165.   int        ebwidth;
  166.   int        memlabelskip;
  167.   int        mfwidth;
  168.   int        mfheight;
  169.   int        realmfheight;
  170.   int        statheight;
  171.   int        winwidth;
  172.   float        sbprop;
  173.  
  174.   int        memviewport;
  175.  
  176.   hMtLinkInfo    hLink;        /* link handle for sim being monitored */
  177.  
  178. } GtGlobalSet;
  179.  
  180.  
  181.  
  182. extern GtGlobalSet        GS;
  183.  
  184.  
  185.  
  186. #endif    /* add nothing past this line */
  187.