home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / hostage.h < prev    next >
C/C++ Source or Header  |  1998-06-08  |  5KB  |  167 lines

  1. /*
  2. THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
  3. SOFTWARE CORPORATION ("PARALLAX").  PARALLAX, IN DISTRIBUTING THE CODE TO
  4. END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
  5. ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
  6. IN USING, DISPLAYING,  AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
  7. SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
  8. FREE PURPOSES.  IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
  9. CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES.  THE END-USER UNDERSTANDS
  10. AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.  
  11. COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION.  ALL RIGHTS RESERVED.
  12. */
  13. /*
  14.  * $Source: f:/miner/source/main/rcs/hostage.h $
  15.  * $Revision: 2.0 $
  16.  * $Author: john $
  17.  * $Date: 1995/02/27 11:27:50 $
  18.  * 
  19.  * Header for hostage.c
  20.  * 
  21.  * $Log: hostage.h $
  22.  * Revision 2.0  1995/02/27  11:27:50  john
  23.  * New version 2.0, which has no anonymous unions, builds with
  24.  * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
  25.  * 
  26.  * Revision 1.23  1995/01/15  19:42:06  matt
  27.  * Ripped out hostage faces for registered version
  28.  * 
  29.  * Revision 1.22  1994/12/19  16:35:07  john
  30.  * Made hoastage playback end when ship dies.
  31.  * 
  32.  * Revision 1.21  1994/11/30  17:22:12  matt
  33.  * Ripped out hostage faces in shareware version
  34.  * 
  35.  * Revision 1.20  1994/11/19  19:53:43  matt
  36.  * Added code to full support different hostage head clip & message for
  37.  * each hostage.
  38.  * 
  39.  * Revision 1.19  1994/11/19  16:35:28  matt
  40.  * Got rid of unused code, & made an array smaller
  41.  * 
  42.  * Revision 1.18  1994/10/23  02:10:57  matt
  43.  * Got rid of obsolete hostage_info stuff
  44.  * 
  45.  * Revision 1.17  1994/09/20  00:10:37  matt
  46.  * Finished gauges for Status Bar, including hostage video display.
  47.  * 
  48.  * Revision 1.16  1994/09/01  10:41:24  matt
  49.  * Sizes for powerups now specified in bitmaps.tbl; blob bitmaps now plot
  50.  * correctly if width & height of bitmap are different.
  51.  * 
  52.  * Revision 1.15  1994/08/14  23:15:14  matt
  53.  * Added animating bitmap hostages, and cleaned up vclips a bit
  54.  * 
  55.  * Revision 1.14  1994/07/14  22:06:51  john
  56.  * Fix radar/hostage vclip conflict.
  57.  * 
  58.  * Revision 1.13  1994/07/14  22:05:41  john
  59.  * Made radar display not conflict with hostage
  60.  * vclip talking.
  61.  * 
  62.  * Revision 1.12  1994/07/06  13:41:46  matt
  63.  * Added support for bitmap hostages
  64.  * 
  65.  * Revision 1.11  1994/07/06  12:43:36  john
  66.  * Made generic messages for hostages.
  67.  * 
  68.  * Revision 1.10  1994/07/06  10:55:09  john
  69.  * New structures for hostages.
  70.  * 
  71.  * Revision 1.9  1994/07/05  12:48:47  john
  72.  * Put functionality of New Hostage spec into code.
  73.  * 
  74.  * Revision 1.8  1994/07/01  17:55:14  john
  75.  * First version of not-working hostage system.
  76.  * 
  77.  * Revision 1.7  1994/06/15  14:57:10  john
  78.  * Added triggers to demo recording.
  79.  * 
  80.  * Revision 1.6  1994/06/08  18:15:49  john
  81.  * Bunch of new stuff that basically takes constants out of the code
  82.  * and puts them into bitmaps.tbl.
  83.  * 
  84.  * Revision 1.5  1994/05/02  12:43:06  yuan
  85.  * Fixed warnings.
  86.  * 
  87.  * Revision 1.4  1994/04/06  14:42:46  yuan
  88.  * Adding new powerups.
  89.  * 
  90.  * Revision 1.3  1994/04/01  11:15:14  yuan
  91.  * Added multiple bitmap functionality to all objects...
  92.  * (hostages, powerups, lasers, etc.)  
  93.  * Hostages and powerups are implemented in the object system,
  94.  * just need to finish function call to "affect" player.
  95.  * 
  96.  * Revision 1.2  1994/03/31  12:04:35  matt
  97.  * Added prototypes for 2 funcs
  98.  * 
  99.  * Revision 1.1  1994/03/31  11:39:24  matt
  100.  * Initial revision
  101.  * 
  102.  * 
  103.  */
  104.  
  105.  
  106.  
  107. #ifndef _HOSTAGE_H
  108. #define _HOSTAGE_H
  109.  
  110. #include "vclip.h"
  111.  
  112. //#define HOSTAGE_FACES    1        //if defined, hostage faces are in
  113.  
  114. #define HOSTAGE_SIZE i2f(5)    //3d size of a hostage
  115.  
  116. #define MAX_HOSTAGE_TYPES        1
  117. #define MAX_HOSTAGES                10        //max per any one level
  118. #define HOSTAGE_MESSAGE_LEN    30
  119. #define HOSTAGE_MAX_GLOBALS    10
  120.  
  121. // 1 per hostage
  122. typedef struct hostage_data {
  123.     short        objnum;
  124.     int        objsig;
  125.     //ubyte        type;
  126.     short        vclip_num;
  127.     //short        sound_num;
  128.     char        text[HOSTAGE_MESSAGE_LEN];
  129. } hostage_data;
  130.  
  131. extern char Hostage_global_message[HOSTAGE_MAX_GLOBALS][HOSTAGE_MESSAGE_LEN];
  132. extern int Hostage_num_globals;
  133.  
  134. extern int N_hostage_types;
  135.  
  136. extern int Num_hostages;
  137.  
  138. extern int Hostage_vclip_num[MAX_HOSTAGE_TYPES];    //for each type of hostage
  139.  
  140. extern vclip Hostage_face_clip[MAX_HOSTAGES];
  141.  
  142. extern hostage_data Hostages[MAX_HOSTAGES];
  143.  
  144. void draw_hostage(object *obj);
  145. void hostage_rescue( int hostage_num );
  146. void hostage_init();
  147.  
  148. //returns true if something drew
  149. int do_hostage_effects();
  150.  
  151. void hostage_init_all();
  152. void hostage_compress_all();
  153. int hostage_get_next_slot();
  154. int hostage_is_valid( int hostage_num );
  155. int hostage_object_is_valid( int objnum  );
  156. void hostage_init_info( int objnum );
  157.  
  158. #ifdef HOSTAGE_FACES
  159. int hostage_is_vclip_playing();
  160. void stop_all_hostage_clips();
  161. #else
  162. #define hostage_is_vclip_playing() (0)
  163. #endif
  164.  
  165.  
  166. #endif
  167.