1 /* $Id: effects.h,v 1.4 2003-10-10 09:36:35 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
17 * Headerfile for effects.c
20 * Revision 1.1 1995/05/16 15:56:08 allender
23 * Revision 2.0 1995/02/27 11:27:34 john
24 * New version 2.0, which has no anonymous unions, builds with
25 * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
27 * Revision 1.15 1994/11/08 21:12:07 matt
28 * Added functions to stop & start effects
30 * Revision 1.14 1994/10/13 17:14:11 adam
31 * MAX_EFFECTS to 60 (ugh)
33 * Revision 1.13 1994/10/05 10:14:34 adam
36 * Revision 1.12 1994/10/04 18:59:09 matt
37 * Exploding eclips now play eclip while exploding, then switch to static bm
39 * Revision 1.11 1994/10/04 15:17:52 matt
40 * Took out references to unused constant
42 * Revision 1.10 1994/09/29 14:15:00 matt
43 * Added sounds for eclips (wall effects)
45 * Revision 1.9 1994/09/25 00:40:24 matt
46 * Added the ability to make eclips (monitors, fans) which can be blown up
48 * Revision 1.8 1994/08/05 15:55:25 matt
49 * Cleaned up effects system, and added alternate effects for after mine
52 * Revision 1.7 1994/08/01 23:17:20 matt
53 * Add support for animating textures on robots
55 * Revision 1.6 1994/05/19 18:13:18 yuan
56 * MAX_EFFECTS increased to 30
58 * Revision 1.5 1994/03/15 16:32:37 yuan
59 * Cleaned up bm-loading code.
60 * (Fixed structures too)
62 * Revision 1.4 1994/03/04 17:09:07 yuan
65 * Revision 1.3 1994/01/19 18:22:45 yuan
66 * Changed number of effects from 10-20
68 * Revision 1.2 1994/01/11 10:39:07 yuan
69 * Special effects new implementation
71 * Revision 1.1 1994/01/10 10:36:14 yuan
83 #define MAX_EFFECTS 110
85 //flags for eclips. If no flags are set, always plays
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
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
107 extern int Num_effects;
108 extern eclip Effects[MAX_EFFECTS];
110 // Set up special effects.
111 extern void init_special_effects();
113 // Clear any active one-shots
114 void reset_special_effects();
116 // Function called in game loop to do effects.
117 extern void do_special_effects();
120 extern void restore_effect_bitmap_icons();
122 //stop an effect from animating. Show first frame.
123 void stop_effect(int effect_num);
125 //restart a stopped effect
126 void restart_effect(int effect_num);
129 #define eclip_read_n(ec, n, fp) cfread(ec, sizeof(eclip), n, fp)
132 * reads n eclip structs from a CFILE
134 extern int eclip_read_n(eclip *ec, int n, CFILE *fp);
137 #endif /* _EFFECTS_H */