home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / apilot.lha / APilot / APilot_Opt / defs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-03  |  4.4 KB  |  103 lines

  1. /*************************************************************************
  2.  *
  3.  * defs.h -- General defines and parameters for adjusting APilot
  4.  *           behaviour.
  5.  *
  6.  *-------------------------------------------------------------------------
  7.  * Authors: Casper Gripenberg  (casper@alpha.hut.fi)
  8.  *          Kjetil Jacobsen  (kjetilja@stud.cs.uit.no)    
  9.  *
  10.  */
  11.  
  12. #ifndef __DEFS_H__
  13. #define __DEFS_H__
  14.  
  15. /*
  16.  * General game parameters.
  17.  */
  18. #define PRECS           128     /* Precision for float -> integer        */
  19.                                 /* conversion. Should be a power of 2    */
  20.                                 /* maximum performance.                  */
  21.  
  22. #define SHFTPR          7       /* PRECS = 2 ^ SHFTPR             */
  23.  
  24. #define APILOT_NFR      2       /* How many frames will pass      */
  25.                                 /* before each screen update      */
  26.  
  27. #define MY_BUFFERS      2       /* Not really used yet. But maybe future */
  28.                                 /* versions support n-buffering, so far  */
  29.                                 /* only double-buffer support:  has to   */
  30.                                 /* be 2.                                 */
  31.  
  32. #define SCR_DEPTH       2       /* Number of colors = SCR_DEPTH ^ 2      */
  33.  
  34. #define HUDON_TIME       300    /* No. of frames the hud should remain on.  */
  35. #define DEF_GRAVITY      0.02   /* Default gravity.                         */
  36.  
  37. #define POINT_CHUNK_SIZE 200    /* Max number of points flying around the   */
  38.                                 /* screen at the same time.                 */
  39.  
  40. /*
  41.  * Parameters for shots (or bullets) fired from a ship.
  42.  */
  43. #define BUL_MASS        10     
  44. #define BUL_DIST        14       /* Distance of new bullets from ship center  */
  45. #define BUL_LIFE        90       /* Number of frames the bullets live         */
  46. #define BUL_SPEED       4        /* Speed of bullets in pixels/sec.           */
  47. #define BUL_ANGLE       12       /* The angle at which new bullets            */
  48.                                  /* are added eg. +-BUL_ANGLE                 */
  49. /*
  50.  * Ship parameters.
  51.  */
  52. #define MAXFUEL         5000     /* Fuel, used for everything.                */
  53. #define SHP_MASS        100      /* Mass, used in collisions.                 */
  54. #define SHL_SIZE        12       /* Shield radius.                            */
  55. #define ROT_SPEED       4        /* How much rotation(degrees)/frame          */
  56. #define THR_POWER       0.125    /* Bigger value->better acceleration.        */
  57.  
  58. #define SHL_ANIM        21       /* Number of shield images in animation      */
  59.                                  /* NOTE: If this value is changed, you need  */
  60.                  /* to change some values in main.c too...    */
  61.  
  62. /*
  63.  * Explosion parameters.
  64.  */
  65. #define EXP_MASS        20
  66. #define EXP_MAXSIZE     120      /* Max number of points in an explosion.     */
  67. #define EXP_LIFE        40       /* How many 1/50s an average explosion point */
  68.                                  /* lives.                                    */
  69. #define EXP_LIFESPREAD  12       /* How much the avg explosion point lifetime */
  70.                                  /* varies.                                   */
  71.  
  72. /* 
  73.  * Parameters for ship exhaust.
  74.  * EXH_xxx defines should perhaps be built into the shape of the ship..
  75.  * Maybe later..
  76.  */
  77. #define EXH_MASS        5
  78. #define EXH_COUNT       3        /* Particles / thrustsequence.               */
  79. #define EXH_DIST        11       /* Distance of exhaust from ship center.     */
  80.  
  81. #define EXH_WIDTH       13       /* The width of the exhaust right at the     */
  82.                                  /* rear of the ship. Must be odd!            */
  83.  
  84. #define EXH_LIFESPREAD  10       /* How much the exhaust avg life             */
  85.                                  /* varies: +- EXH_LIFESPREAD number          */
  86.                                  /* of frames.                                */
  87.  
  88. /*
  89.  * Cannon parameters.
  90.  */
  91. #define CAN_HEIGHT MAP_BLOCKSIZE/3 /* Height of cannons.                      */
  92.  
  93. #define CAN_SHOTMASS    8
  94. #define CAN_SHOTLIFE    90
  95. #define CAN_FIREANGLE   40       /* The max/min angle the cannon can fire.    */
  96. #define CAN_FIREDELAY   90       /* How many frames will pass until cannon    */
  97.                                  /* fires next time. 50 = 1 second.           */
  98. #define CAN_FDSPREAD    20       /* How much the FIREDELAY will vary.         */
  99.  
  100. #define CAN_DEDTIME     2000     /* How many frames cannon will remain dead.  */
  101.  
  102. #endif
  103.