home *** CD-ROM | disk | FTP | other *** search
/ Amiga ACS 1998 #6 / amigaacscoverdisc1998-061998.iso / games / descent / source / main / effects.h < prev    next >
Text File  |  1998-06-08  |  4KB  |  130 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/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.  
  76.  
  77.  
  78. #ifndef _EFFECTS_H
  79. #define _EFFECTS_H
  80.  
  81. #include "vclip.h"
  82.  
  83. #define MAX_EFFECTS 60
  84.  
  85. //flags for eclips.  If no flags are set, always plays
  86.  
  87. #define EF_CRITICAL        1        //this doesn't get played directly (only when mine critical)
  88. #define EF_ONE_SHOT        2        //this is a special that gets played once
  89. #define EF_STOPPED        4        //this has been stopped
  90.  
  91. typedef struct eclip {
  92.     vclip         vc;                //imbedded vclip
  93.     fix            time_left;        //for sequencing
  94.     int            frame_count;    //for sequencing
  95.     short            changing_wall_texture;            //Which element of Textures array to replace.
  96.     short            changing_object_texture;        //Which element of ObjBitmapPtrs array to replace.
  97.     int            flags;            //see above
  98.     int            crit_clip;        //use this clip instead of above one when mine critical
  99.     int            dest_bm_num;    //use this bitmap when monitor destroyed
  100.     int            dest_vclip;        //what vclip to play when exploding
  101.     int            dest_eclip;        //what eclip to play when exploding
  102.     fix            dest_size;        //3d size of explosion
  103.     int            sound_num;        //what sound this makes
  104.     int            segnum,sidenum;    //what seg & side, for one-shot clips
  105. } eclip;
  106.  
  107. extern int Num_effects;
  108. extern eclip Effects[MAX_EFFECTS];
  109.  
  110. // Set up special effects.
  111. extern void init_special_effects(); 
  112.  
  113. // Clear any active one-shots
  114. void reset_special_effects();
  115.  
  116. // Function called in game loop to do effects.
  117. extern void do_special_effects();
  118.  
  119. // Restore bitmap
  120. extern void restore_effect_bitmap_icons();
  121.  
  122. //stop an effect from animating.  Show first frame.
  123. void stop_effect(int effect_num);
  124.  
  125. //restart a stopped effect
  126. void restart_effect(int effect_num);
  127.  
  128. #endif
  129. 
  130.