ftp.nice.ch/pub/next/games/action/MCommand.0.91.N.bs.tar.gz#/BattleView.h

This is BattleView.h in view mode; [Download] [Up]

/*

    Copyright 1992, Stefanos Kiakas. All rights reserved.

    You may not delete this notice.

*/

/* Generated by Interface Builder */
#import <appkit/View.h>
#import <dpsclient/event.h>
#include <sys/param.h>


#define CITIES  10
#define TARGETS 11

#define CITY      1
#define BASE      2


#define FALSE     0
#define TRUE      !FALSE

typedef struct CBstruct
{
   NXPoint coord;
   int     type;
} CBRec;


typedef struct mNode 
{
           NXPoint dPos,cPos;
   	   float   delta_x,delta_y;
	   struct  mNode *next;
} MSLE_NODE, *MSLE_NODE_PNTR;

typedef struct eNode 
{
           NXPoint cPt;
	   float   rad;
	   BOOL    maxReached;
	   struct  eNode *next;
} EXP_NODE, *EXP_PNTR;
   
typedef struct maNode 
{
           NXPoint sPos,dPos,cPos;
	   int  targetLoc;
   	   float   delta_x,delta_y;
	   struct  maNode *next;
} MA_NODE, *MA_NODE_PNTR;
 

static CBRec CBarray[TARGETS] = { {10.0,5.0,CITY},     
                                  {55.0,10.0,CITY},
				  {100.0,5.0,CITY},
				  {140.0,5.0,CITY},
				  {185.0,10.0,CITY},
				  {280.0,10.0,CITY},
				  {320.0,5.0,CITY},
				  {360.0,5.0,CITY},
				  {410.0,10.0,CITY},
				  {460.0,5.0,CITY},   
				  {230.0,15.0,BASE}  };

@interface BattleView:View
{
   id outScore;
   id outMissiles;
 
   DPSTimedEntry  gameTimer;
   float xpos,ypos,rad;
   BOOL  maxReached;
   struct mList 
   {
      int            launched;
      MSLE_NODE_PNTR next;
   } defensiveMissiles;

   struct maList 
   {
      int          launched;
      MA_NODE_PNTR next;
   } offensiveMissiles;
  

   struct eList 
   {
      int       exploding;
      EXP_PNTR  next;
   } defensiveExplosions,surfaceExplosions;
 
   BOOL cityStatus[CITIES];
   int phaseOne,
       displayBase,
       startNewGame,
       gameRunning,
       gamePaused;
       
   int    activeCities;
   
   float  dFactor,        // difficulty factor speed of attack missiles
   	  cdiffinc,
	  cdiffstart,
	  cdiffmax,
	  ndiffinc,
	  ndiffstart,
	  ndiffmax;      
 
   unsigned int aTimeBefore;
   id cursorImage;
    
    
   int  score,missiles,lastBonusAt;
   
   id redAlertSound; 
   id cityBitmap;
   id launcherBitmap;
   
   NXRect cBounds;
   
   char appDirectory[MAXPATHLEN];
   
   	 
}

- initFrame:(const NXRect *) frm;

- (const char *)appDirectory;

- newGame:sender;

- pauseGame:sender;

- selectExperienced:sender;

- selectNovice:sender;

- selectPro:sender;

- resetCursorRects;

- drawSelf:(const NXRect *)r :(int)c;

- mouseDown:(NXEvent *)theEvent;

- addToAirExplosions:(EXP_PNTR)aExp;

- addToSurfaceExplosions:(EXP_PNTR)aExp;

- surfaceExplosionsDraw;

- expDraw;

- missilePath;

- newGame:sender;

- step;

- drawCityBM:(NXPoint) dcPt;

- drawLaunchPad;

- attackMissilesPath;

- nextLevel;

- bonusPoints;

- selectTargets;

- addToAirExplosions: (EXP_PNTR )aExp;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.