HOSTAGE.H 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. #ifndef _HOSTAGE_H
  105. #define _HOSTAGE_H
  106. #include "vclip.h"
  107. //#define HOSTAGE_FACES 1 //if defined, hostage faces are in
  108. #define HOSTAGE_SIZE i2f(5) //3d size of a hostage
  109. #define MAX_HOSTAGE_TYPES 1
  110. #define MAX_HOSTAGES 10 //max per any one level
  111. #define HOSTAGE_MESSAGE_LEN 30
  112. #define HOSTAGE_MAX_GLOBALS 10
  113. // 1 per hostage
  114. typedef struct hostage_data {
  115. short objnum;
  116. int objsig;
  117. //ubyte type;
  118. short vclip_num;
  119. //short sound_num;
  120. char text[HOSTAGE_MESSAGE_LEN];
  121. } hostage_data;
  122. extern char Hostage_global_message[HOSTAGE_MAX_GLOBALS][HOSTAGE_MESSAGE_LEN];
  123. extern int Hostage_num_globals;
  124. extern int N_hostage_types;
  125. extern int Num_hostages;
  126. extern int Hostage_vclip_num[MAX_HOSTAGE_TYPES]; //for each type of hostage
  127. extern vclip Hostage_face_clip[MAX_HOSTAGES];
  128. extern hostage_data Hostages[MAX_HOSTAGES];
  129. void draw_hostage(object *obj);
  130. void hostage_rescue( int hostage_num );
  131. void hostage_init();
  132. //returns true if something drew
  133. int do_hostage_effects();
  134. void hostage_init_all();
  135. void hostage_compress_all();
  136. int hostage_get_next_slot();
  137. int hostage_is_valid( int hostage_num );
  138. int hostage_object_is_valid( int objnum );
  139. void hostage_init_info( int objnum );
  140. #ifdef HOSTAGE_FACES
  141. int hostage_is_vclip_playing();
  142. void stop_all_hostage_clips();
  143. #else
  144. #define hostage_is_vclip_playing() (0)
  145. #endif
  146. #endif