EFFECTS.H 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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/effects.h $
  15. * $Revision: 2.0 $
  16. * $Author: john $
  17. * $Date: 1995/02/27 11:27:34 $
  18. *
  19. * Headerfile for effects.c
  20. *
  21. * $Log: effects.h $
  22. * Revision 2.0 1995/02/27 11:27:34 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.15 1994/11/08 21:12:07 matt
  27. * Added functions to stop & start effects
  28. *
  29. * Revision 1.14 1994/10/13 17:14:11 adam
  30. * MAX_EFFECTS to 60 (ugh)
  31. *
  32. * Revision 1.13 1994/10/05 10:14:34 adam
  33. * MAX_EFFECTS to 50
  34. *
  35. * Revision 1.12 1994/10/04 18:59:09 matt
  36. * Exploding eclips now play eclip while exploding, then switch to static bm
  37. *
  38. * Revision 1.11 1994/10/04 15:17:52 matt
  39. * Took out references to unused constant
  40. *
  41. * Revision 1.10 1994/09/29 14:15:00 matt
  42. * Added sounds for eclips (wall effects)
  43. *
  44. * Revision 1.9 1994/09/25 00:40:24 matt
  45. * Added the ability to make eclips (monitors, fans) which can be blown up
  46. *
  47. * Revision 1.8 1994/08/05 15:55:25 matt
  48. * Cleaned up effects system, and added alternate effects for after mine
  49. * destruction.
  50. *
  51. * Revision 1.7 1994/08/01 23:17:20 matt
  52. * Add support for animating textures on robots
  53. *
  54. * Revision 1.6 1994/05/19 18:13:18 yuan
  55. * MAX_EFFECTS increased to 30
  56. *
  57. * Revision 1.5 1994/03/15 16:32:37 yuan
  58. * Cleaned up bm-loading code.
  59. * (Fixed structures too)
  60. *
  61. * Revision 1.4 1994/03/04 17:09:07 yuan
  62. * New door stuff.
  63. *
  64. * Revision 1.3 1994/01/19 18:22:45 yuan
  65. * Changed number of effects from 10-20
  66. *
  67. * Revision 1.2 1994/01/11 10:39:07 yuan
  68. * Special effects new implementation
  69. *
  70. * Revision 1.1 1994/01/10 10:36:14 yuan
  71. * Initial revision
  72. *
  73. *
  74. */
  75. #ifndef _EFFECTS_H
  76. #define _EFFECTS_H
  77. #include "vclip.h"
  78. #define MAX_EFFECTS 60
  79. //flags for eclips. If no flags are set, always plays
  80. #define EF_CRITICAL 1 //this doesn't get played directly (only when mine critical)
  81. #define EF_ONE_SHOT 2 //this is a special that gets played once
  82. #define EF_STOPPED 4 //this has been stopped
  83. typedef struct eclip {
  84. vclip vc; //imbedded vclip
  85. fix time_left; //for sequencing
  86. int frame_count; //for sequencing
  87. short changing_wall_texture; //Which element of Textures array to replace.
  88. short changing_object_texture; //Which element of ObjBitmapPtrs array to replace.
  89. int flags; //see above
  90. int crit_clip; //use this clip instead of above one when mine critical
  91. int dest_bm_num; //use this bitmap when monitor destroyed
  92. int dest_vclip; //what vclip to play when exploding
  93. int dest_eclip; //what eclip to play when exploding
  94. fix dest_size; //3d size of explosion
  95. int sound_num; //what sound this makes
  96. int segnum,sidenum; //what seg & side, for one-shot clips
  97. } eclip;
  98. extern int Num_effects;
  99. extern eclip Effects[MAX_EFFECTS];
  100. // Set up special effects.
  101. extern void init_special_effects();
  102. // Clear any active one-shots
  103. void reset_special_effects();
  104. // Function called in game loop to do effects.
  105. extern void do_special_effects();
  106. // Restore bitmap
  107. extern void restore_effect_bitmap_icons();
  108. //stop an effect from animating. Show first frame.
  109. void stop_effect(int effect_num);
  110. //restart a stopped effect
  111. void restart_effect(int effect_num);
  112. #endif
  113.