home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Games / Arashi 1.1.1 / source code / Game Source / jam src / STORM.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-14  |  3.9 KB  |  155 lines  |  [TEXT/KAHL]

  1. /*/
  2.      Project Arashi: STORM.h
  3.      Major release: Version 1.1d2, 9/5/95
  4.  
  5.      Last modification: Sunday, February 14, 1993, 10:54
  6.      Created: Sunday, February 12, 1989, 23:17
  7.  
  8.      Copyright © 1989-1993, Juri Munkki
  9. /*/
  10.  
  11. #ifdef    _MAKEGRID_
  12. #define    GLOBAL
  13. #else
  14. #define    GLOBAL        extern
  15. #endif
  16.  
  17. #include "STStruct.h"
  18.  
  19. #define    MAXSHOTS    9
  20.  
  21. #define MAXSEGS     32
  22. #define DEPTH        120
  23. #define STARTDEPTH    20
  24. #define    ZOOMDEPTH    -19
  25.  
  26. #define    STARDIVISION    4
  27. #define    MAXCENTERSTARS    10L
  28.  
  29. typedef    union
  30. {
  31.     long    f;
  32.     int        i;
  33. }    IFixed;
  34.  
  35.  
  36. typedef struct
  37. {
  38.     int        lane;
  39.     int        level;
  40.  
  41. }    Shot,*ShotPtr;
  42.  
  43. typedef    struct
  44. {
  45.     int        state;        /*    State that the player is in.        */
  46.     int        timer;        /*    State timer.                        */
  47.     int        endtimer;    /*    Time after complete/before fly thru    */
  48.  
  49.     /*    Position information:                                    */
  50.     int        rawpos;        /*    "raw" player position"                */
  51.     int        lane;        /*    Current lane of player.                */
  52.     int        oldlane;    /*    Old position of player.                */
  53.     int        shifter;    /*    Visual twist of player on lane.        */
  54.     int        flydepth;    /*    Position during flythru.            */
  55.     int        dropdepth;    /*    Position when dropping dead.        */
  56.  
  57.     /*    Fighting information:                                    */
  58.     int        pendingshot;/*    Is there a buffered mouse press?    */
  59.     int        couldshoot;    /*    Was there a shot fired?                */
  60.     int        superzapping;/*    1->superzap, 2->single enemy zap.    */
  61.     int        changedlane;/*    Was there a lane change?            */
  62.     int        lanestat[MAXSEGS];    /*    Flags for enemy presence.    */
  63.     int        segmstat[MAXSEGS+1];/*    Flags for enemy presence.    */
  64.     int        lanemissing[MAXSEGS];/*    Flags for field display.    */
  65.     
  66.     /*    Game information:                                        */
  67.     int        lives;        /*    How many lives left?                */
  68.     long    score;        /*    Amount of points player has.        */
  69.     int        drawscore;    /*    True, if score needs to be drawn.    */
  70.     long    freeLives;    /*  Score needed for next free life        (mz)     */
  71.     unsigned    int        Flags;     /* set of flags checked by bit position.*/
  72.                                 /* see heroflags.h for details (mz)        */
  73. }    Player;
  74.  
  75. enum    {    HeroPlaying, HeroFlying, HeroDropping, HeroCracking,
  76.             HeroDisintegrating, HeroPostMortem, HeroDead, HeroQuit    };
  77.  
  78. typedef    struct
  79. {    int        numsegs;        /*    Number of segments on this grid.    */
  80.     int        wraps;            /*    Does this grid wrap around?            */
  81.     int        *unitlen;        /*    Pointer to table of segment widths.    */
  82.     int        *x[MAXSEGS];    /*    Tables of segment edge x coords.    */
  83.     int        *y[MAXSEGS];    /*    Tables of segment edge y coords.    */
  84.     int        *xc[MAXSEGS];    /*    Tables of segment center x coords.    */
  85.     int        *yc[MAXSEGS];    /*    Tables of segment center y coords.    */
  86.     int        starsegs;        /*    Number of divisions for stars.        */
  87.     int        starx[STARDIVISION*MAXSEGS][2];    /*    center star x stuff    */
  88.     int        stary[STARDIVISION*MAXSEGS][2];    /*    center star y stuff    */
  89. }    GridWorld;
  90.  
  91. typedef    struct
  92. {    int        numsegs;
  93.     int        wraps;
  94.     int        xoff;
  95.     int        yoff;
  96.     int        unitlen;
  97.     int        x[MAXSEGS];
  98.     int        y[MAXSEGS];
  99. }    worldstruct;
  100.  
  101. typedef struct
  102. {
  103.     int        numsegs;
  104.     char    wraps;
  105.     char    seglen;
  106.     char    xoff;
  107.     char    yoff;
  108.     int        filler;
  109.     int        ang[MAXSEGS];
  110. }    shape;
  111.  
  112. /*    Masks for different types of monsters for stat array.            */
  113. enum
  114. {    FlipMask=1,
  115.     PlasMask=2,
  116.     FuseMask=4,
  117.     PulsMask=8,
  118.     SpikeMask=16
  119. };
  120.  
  121. /*    Enums for sounds. Note that sound files are in alphabetical order!    */
  122. enum    {    Blast,        /*    Title lightning        */
  123.             Blow,        /*    Exploding fuseball    */
  124.             Bonk,        /*    Player movement        */
  125.             Dziung,        /*    Spiker explode        */
  126.             PhazerIn,    /*    Player shots        */
  127.             PhazerOut,    /*    */
  128.             FallYell,    /*    Player falling.        */
  129.             FallZap,    /*    Player capture        */
  130.             FlyThru,    /*    Level warp            */
  131.             Phazer2,    /*    Flipping pulsar        */
  132.             Splitter,    /*    Exploding pulsar    */
  133.             Springy,    /*    */
  134.             Swish,        /*    Player hit            */
  135.             Swoosh,        /*    Exploding flipper    */
  136.             Whiz,        /*    Flying plasma        */
  137.             Zroom,        /*    Splitting tanker    */
  138.             ZZFreeLife,    /*     Chime for free life    (mz) */
  139.             ZZSuperZap    /* for superzap (mz) */
  140.             
  141.         };
  142.  
  143. enum    {    NormalPlay, RecordPlay, PlaybackPlay    };
  144.  
  145. GLOBAL    worldstruct    gridOutline;
  146. GLOBAL    GridWorld    ww;
  147. GLOBAL    int            NextSeg[MAXSEGS+1];
  148. GLOBAL    int            PrevSeg[MAXSEGS+1];
  149. GLOBAL    char        *LaneSel[MAXSEGS+1];
  150.  
  151. extern    int        VAIsLate;
  152. void    StarApproach(int *notify,int color);
  153. void    IncreaseScore(long);
  154.  
  155.