home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Games / MCommand / Source / BattleView.h next >
Encoding:
C/C++ Source or Header  |  1994-04-01  |  2.8 KB  |  178 lines

  1. /*
  2.  
  3.     Copyright 1992, Stefanos Kiakas. All rights reserved.
  4.  
  5.     You may not delete this notice.
  6.  
  7. */
  8.  
  9. /* Generated by Interface Builder */
  10. #import <appkit/View.h>
  11. #import <dpsclient/event.h>
  12. #include <sys/param.h>
  13.  
  14.  
  15. #define CITIES  10
  16. #define TARGETS 11
  17.  
  18. #define CITY      1
  19. #define BASE      2
  20.  
  21.  
  22. #define FALSE     0
  23. #define TRUE      !FALSE
  24.  
  25. typedef struct CBstruct
  26. {
  27.    NXPoint coord;
  28.    int     type;
  29. } CBRec;
  30.  
  31.  
  32. typedef struct mNode 
  33. {
  34.            NXPoint dPos,cPos;
  35.           float   delta_x,delta_y;
  36.        struct  mNode *next;
  37. } MSLE_NODE, *MSLE_NODE_PNTR;
  38.  
  39. typedef struct eNode 
  40. {
  41.            NXPoint cPt;
  42.        float   rad;
  43.        BOOL    maxReached;
  44.        struct  eNode *next;
  45. } EXP_NODE, *EXP_PNTR;
  46.    
  47. typedef struct maNode 
  48. {
  49.            NXPoint sPos,dPos,cPos;
  50.        int  targetLoc;
  51.           float   delta_x,delta_y;
  52.        struct  maNode *next;
  53. } MA_NODE, *MA_NODE_PNTR;
  54.  
  55.  
  56. static CBRec CBarray[TARGETS] = { {10.0,5.0,CITY},     
  57.                                   {55.0,10.0,CITY},
  58.                   {100.0,5.0,CITY},
  59.                   {140.0,5.0,CITY},
  60.                   {185.0,10.0,CITY},
  61.                   {280.0,10.0,CITY},
  62.                   {320.0,5.0,CITY},
  63.                   {360.0,5.0,CITY},
  64.                   {410.0,10.0,CITY},
  65.                   {460.0,5.0,CITY},   
  66.                   {230.0,15.0,BASE}  };
  67.  
  68. @interface BattleView:View
  69. {
  70.    id outScore;
  71.    id outMissiles;
  72.  
  73.    DPSTimedEntry  gameTimer;
  74.    float xpos,ypos,rad;
  75.    BOOL  maxReached;
  76.    struct mList 
  77.    {
  78.       int            launched;
  79.       MSLE_NODE_PNTR next;
  80.    } defensiveMissiles;
  81.  
  82.    struct maList 
  83.    {
  84.       int          launched;
  85.       MA_NODE_PNTR next;
  86.    } offensiveMissiles;
  87.   
  88.  
  89.    struct eList 
  90.    {
  91.       int       exploding;
  92.       EXP_PNTR  next;
  93.    } defensiveExplosions,surfaceExplosions;
  94.  
  95.    BOOL cityStatus[CITIES];
  96.    int phaseOne,
  97.        displayBase,
  98.        startNewGame,
  99.        gameRunning,
  100.        gamePaused;
  101.        
  102.    int    activeCities;
  103.    
  104.    float  dFactor,        // difficulty factor speed of attack missiles
  105.          cdiffinc,
  106.       cdiffstart,
  107.       cdiffmax,
  108.       ndiffinc,
  109.       ndiffstart,
  110.       ndiffmax;      
  111.  
  112.    unsigned int aTimeBefore;
  113.    id cursorImage;
  114.     
  115.     
  116.    int  score,missiles,lastBonusAt;
  117.    
  118.    id redAlertSound; 
  119.    id cityBitmap;
  120.    id launcherBitmap;
  121.    
  122.    NXRect cBounds;
  123.    
  124.    char appDirectory[MAXPATHLEN];
  125.    
  126.         
  127. }
  128.  
  129. - initFrame:(const NXRect *) frm;
  130.  
  131. - (const char *)appDirectory;
  132.  
  133. - newGame:sender;
  134.  
  135. - pauseGame:sender;
  136.  
  137. - selectExperienced:sender;
  138.  
  139. - selectNovice:sender;
  140.  
  141. - selectPro:sender;
  142.  
  143. - resetCursorRects;
  144.  
  145. - drawSelf:(const NXRect *)r :(int)c;
  146.  
  147. - mouseDown:(NXEvent *)theEvent;
  148.  
  149. - addToAirExplosions:(EXP_PNTR)aExp;
  150.  
  151. - addToSurfaceExplosions:(EXP_PNTR)aExp;
  152.  
  153. - surfaceExplosionsDraw;
  154.  
  155. - expDraw;
  156.  
  157. - missilePath;
  158.  
  159. - newGame:sender;
  160.  
  161. - step;
  162.  
  163. - drawCityBM:(NXPoint) dcPt;
  164.  
  165. - drawLaunchPad;
  166.  
  167. - attackMissilesPath;
  168.  
  169. - nextLevel;
  170.  
  171. - bonusPoints;
  172.  
  173. - selectTargets;
  174.  
  175. - addToAirExplosions: (EXP_PNTR )aExp;
  176.  
  177. @end
  178.