1 #ifndef __EFFECT_DEFINITIONS_H 2 #define __EFFECT_DEFINITIONS_H 3 4 /* 5 EFFECT_DEFINITIONS.H 6 7 Copyright (C) 1991-2001 and beyond by Bungie Studios, Inc. 8 and the "Aleph One" developers. 9 10 This program is free software; you can redistribute it and/or modify 11 it under the terms of the GNU General Public License as published by 12 the Free Software Foundation; either version 3 of the License, or 13 (at your option) any later version. 14 15 This program is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License for more details. 19 20 This license is contained in the file "COPYING", 21 which is included with this source code; it is available online at 22 http://www.gnu.org/licenses/gpl.html 23 24 Tuesday, May 31, 1994 5:21:28 PM 25 26 Feb 3, 2000 (Loren Petrich): 27 Added Jjaro-texture effects 28 Added VacBob effects 29 */ 30 31 #include "effects.h" 32 #include "map.h" 33 #include "SoundManagerEnums.h" 34 35 /* ---------- constants */ 36 37 enum /* flags */ 38 { 39 _end_when_animation_loops= 0x0001, 40 _end_when_transfer_animation_loops= 0x0002, 41 _sound_only= 0x0004, /* play the animation�s initial sound and nothing else */ 42 _make_twin_visible= 0x0008, 43 _media_effect= 0x0010 44 }; 45 46 /* ---------- structures */ 47 48 struct effect_definition 49 { 50 int16 collection, shape; 51 52 _fixed sound_pitch; 53 54 uint16 flags; 55 int16 delay, delay_sound; 56 }; 57 58 /* ---------- effect definitions */ 59 60 static struct effect_definition effect_definitions[NUMBER_OF_EFFECT_TYPES]; 61 const struct effect_definition original_effect_definitions[NUMBER_OF_EFFECT_TYPES]= 62 { 63 /* rocket explosion, contrail */ 64 {_collection_rocket, 1, _normal_frequency, _end_when_animation_loops, 0, NONE}, 65 {_collection_rocket, 2, _normal_frequency, _end_when_animation_loops, 0, NONE}, 66 67 /* grenade explosion, contrail */ 68 {_collection_rocket, 9, _normal_frequency, _end_when_animation_loops, 0, NONE}, 69 {_collection_rocket, 4, _normal_frequency, _end_when_animation_loops, 0, NONE}, 70 71 /* bullet ricochet */ 72 {_collection_rocket, 13, _normal_frequency, _end_when_animation_loops, 0, NONE}, 73 74 /* _effect_alien_weapon_ricochet */ 75 {_collection_rocket, 5, _normal_frequency, _end_when_animation_loops, 0, NONE}, 76 77 /* flame thrower burst */ 78 {_collection_rocket, 6, _normal_frequency, _end_when_animation_loops, 0, NONE}, 79 80 /* fighter blood splash */ 81 {_collection_fighter, 8, _normal_frequency, _end_when_animation_loops, 0, NONE}, 82 83 /* player blood splash */ 84 {_collection_rocket, 10, _normal_frequency, _end_when_animation_loops, 0, NONE}, 85 86 /* civilian blood splash, assimilated civilian blood splash */ 87 {_collection_civilian, 7, _normal_frequency, _end_when_animation_loops, 0, NONE}, 88 {BUILD_COLLECTION(_collection_civilian, 3), 12, _normal_frequency, _end_when_animation_loops, 0, NONE}, 89 90 /* enforcer blood splash */ 91 {_collection_enforcer, 5, _normal_frequency, _end_when_animation_loops, 0, NONE}, 92 93 /* _effect_compiler_bolt_minor_detonation, _effect_compiler_bolt_major_detonation, 94 _effect_compiler_bolt_major_contrail */ 95 {_collection_compiler, 6, _normal_frequency, _end_when_animation_loops, 0, NONE}, 96 {BUILD_COLLECTION(_collection_compiler, 1), 6, _normal_frequency, _end_when_animation_loops, 0, NONE}, 97 {BUILD_COLLECTION(_collection_compiler, 1), 5, _normal_frequency, _end_when_animation_loops, 0, NONE}, 98 99 /* _effect_fighter_projectile_detonation, _effect_fighter_melee_detonation */ 100 {BUILD_COLLECTION(_collection_fighter, 0), 10, _normal_frequency, _end_when_animation_loops, 0, NONE}, 101 {BUILD_COLLECTION(_collection_fighter, 0), 11, _normal_frequency, _sound_only, 0, NONE}, 102 103 /* _effect_hunter_projectile_detonation, _effect_hunter_spark */ 104 {BUILD_COLLECTION(_collection_hunter, 0), 4, _normal_frequency, _end_when_animation_loops, 0, NONE}, 105 {BUILD_COLLECTION(_collection_hunter, 0), 8, _normal_frequency, _end_when_animation_loops, 0, NONE}, 106 107 /* _effect_minor_fusion_detonation, _effect_major_fusion_detonation, _effect_major_fusion_contrail */ 108 {BUILD_COLLECTION(_collection_rocket, 0), 14, _normal_frequency, _end_when_animation_loops, 0, NONE}, 109 {BUILD_COLLECTION(_collection_rocket, 0), 15, _higher_frequency, _end_when_animation_loops, 0, NONE}, 110 {BUILD_COLLECTION(_collection_rocket, 0), 16, _higher_frequency, _end_when_animation_loops, 0, NONE}, 111 112 /* _effect_fist_detonation */ 113 {_collection_rocket, 17, _normal_frequency, _sound_only, 0, NONE}, 114 115 /* _effect_minor_defender_detonation, _effect_major_defender_detonation, _effect_defender_spark */ 116 {BUILD_COLLECTION(_collection_defender, 0), 5, _normal_frequency, _end_when_animation_loops, 0, NONE}, 117 {BUILD_COLLECTION(_collection_defender, 1), 5, _normal_frequency, _end_when_animation_loops, 0, NONE}, 118 {BUILD_COLLECTION(_collection_defender, 0), 7, _normal_frequency, _end_when_animation_loops, 0, NONE}, 119 120 /* _effect_trooper_blood_splash */ 121 {_collection_trooper, 8, _normal_frequency, _end_when_animation_loops, 0, NONE}, 122 123 /* _effect_lamp_breaking */ 124 {_collection_scenery1, 22, _normal_frequency, _end_when_animation_loops, 0, NONE}, 125 {_collection_scenery2, 18, _normal_frequency, _end_when_animation_loops, 0, NONE}, 126 {_collection_scenery3, 16, _normal_frequency, _end_when_animation_loops, 0, NONE}, 127 {_collection_scenery5, 8, _normal_frequency, _end_when_animation_loops, 0, NONE}, 128 129 /* _effect_metallic_clang */ 130 {_collection_rocket, 23, _normal_frequency, _sound_only, 0, NONE}, 131 132 /* _effect_teleport_in, _effect_teleport_out */ 133 {_collection_items, 0, _normal_frequency, _end_when_transfer_animation_loops|_make_twin_visible, TICKS_PER_SECOND, _snd_teleport_in}, 134 {_collection_items, 0, _normal_frequency, _end_when_transfer_animation_loops, 0, NONE}, 135 136 /* _effect_small_water_splash, _effect_medium_water_splash, _effect_large_water_splash, _effect_large_water_emergence */ 137 {_collection_scenery1, 0, _normal_frequency, _end_when_animation_loops|_media_effect, 0, NONE}, 138 {_collection_scenery1, 1, _normal_frequency, _end_when_animation_loops|_media_effect, 0, NONE}, 139 {_collection_scenery1, 2, _normal_frequency, _end_when_animation_loops|_sound_only, NONE}, 140 {_collection_scenery1, 3, _normal_frequency, _end_when_animation_loops|_sound_only, NONE}, 141 142 /* _effect_small_lava_splash, _effect_medium_lava_splash, _effect_large_lava_splash, _effect_large_lava_emergence */ 143 {_collection_scenery2, 0, _normal_frequency, _end_when_animation_loops|_media_effect, 0, NONE}, 144 {_collection_scenery2, 1, _normal_frequency, _end_when_animation_loops|_media_effect, 0, NONE}, 145 {_collection_scenery2, 2, _normal_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 146 {_collection_scenery2, 17, _normal_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 147 148 /* _effect_small_sewage_splash, _effect_medium_sewage_splash, _effect_large_sewage_splash, _effect_large_sewage_emergence */ 149 {_collection_scenery3, 0, _normal_frequency, _end_when_animation_loops|_media_effect, 0, NONE}, 150 {_collection_scenery3, 1, _normal_frequency, _end_when_animation_loops|_media_effect, 0, NONE}, 151 {_collection_scenery3, 2, _normal_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 152 {_collection_scenery3, 3, _normal_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 153 154 /* _effect_small_goo_splash, _effect_medium_goo_splash, _effect_large_goo_splash, _effect_large_goo_emergence */ 155 {_collection_scenery5, 0, _normal_frequency, _end_when_animation_loops|_media_effect, 0, NONE}, 156 {_collection_scenery5, 1, _normal_frequency, _end_when_animation_loops|_media_effect, 0, NONE}, 157 {_collection_scenery5, 2, _normal_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 158 {_collection_scenery5, 3, _normal_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 159 160 /* _effect_minor_hummer_projectile_detonation, _effect_major_hummer_projectile_detonation, 161 _effect_durandal_hummer_projectile_detonation, _effect_hummer_spark */ 162 {BUILD_COLLECTION(_collection_hummer, 0), 6, _normal_frequency, _end_when_animation_loops, 0, NONE}, 163 {BUILD_COLLECTION(_collection_hummer, 1), 6, _higher_frequency, _end_when_animation_loops, 0, NONE}, 164 {BUILD_COLLECTION(_collection_hummer, 4), 6, _lower_frequency, _end_when_animation_loops, 0, NONE}, 165 {BUILD_COLLECTION(_collection_hummer, 0), 7, _normal_frequency, _end_when_animation_loops, 0, NONE}, 166 167 /* _effect_cyborg_projectile_detonation, _effect_cyborg_blood_splash */ 168 {_collection_cyborg, 7, _normal_frequency, _end_when_animation_loops, 0, NONE}, 169 {_collection_cyborg, 8, _normal_frequency, _end_when_animation_loops, 0, NONE}, 170 171 /* _effect_minor_fusion_dispersal, _effect_major_fusion_dispersal, _effect_overloaded_fusion_dispersal */ 172 {BUILD_COLLECTION(_collection_rocket, 0), 19, _normal_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 173 {BUILD_COLLECTION(_collection_rocket, 0), 20, _higher_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 174 {BUILD_COLLECTION(_collection_rocket, 0), 21, _lower_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 175 176 /* _effect_sewage_yeti_blood_splash, _effect_sewage_yeti_projectile_detonation */ 177 {BUILD_COLLECTION(_collection_yeti, 0), 5, _normal_frequency, _end_when_animation_loops, 0, NONE}, 178 {BUILD_COLLECTION(_collection_yeti, 0), 11, _normal_frequency, _end_when_animation_loops, 0, NONE}, 179 180 /* _effect_water_yeti_blood_splash */ 181 {BUILD_COLLECTION(_collection_yeti, 1), 5, _normal_frequency, _end_when_animation_loops, 0, NONE}, 182 183 /* _effect_lava_yeti_blood_splash, _effect_lava_yeti_projectile_detonation */ 184 {BUILD_COLLECTION(_collection_yeti, 2), 5, _normal_frequency, _end_when_animation_loops, 0, NONE}, 185 {BUILD_COLLECTION(_collection_yeti, 2), 7, _normal_frequency, _end_when_animation_loops, 0, NONE}, 186 187 /* _effect_yeti_melee_detonation */ 188 {_collection_yeti, 8, _normal_frequency, _sound_only, 0, NONE}, 189 190 /* _effect_juggernaut_spark, _effect_juggernaut_missile_contrail */ 191 {_collection_juggernaut, 3, _normal_frequency, _end_when_animation_loops, 0, NONE}, 192 {_collection_rocket, 24, _normal_frequency, _end_when_animation_loops, 0, NONE}, 193 194 // LP addition: Jjaro stuff and VacBobs 195 /* _effect_small_jjaro_splash, _effect_medium_jjaro_splash, _effect_large_jjaro_splash, _effect_large_jjaro_emergence */ 196 {_collection_scenery4, 0, _normal_frequency, _end_when_animation_loops|_media_effect, 0, NONE}, 197 {_collection_scenery4, 1, _normal_frequency, _end_when_animation_loops|_media_effect, 0, NONE}, 198 {_collection_scenery4, 2, _normal_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 199 {_collection_scenery4, 3, _normal_frequency, _end_when_animation_loops|_sound_only, 0, NONE}, 200 201 /* _effect_civilian_fusion_blood_splash, _effect_assimilated_civilian_fusion_blood_splash */ 202 {_collection_civilian_fusion, 7, _normal_frequency, _end_when_animation_loops, 0, NONE}, 203 {BUILD_COLLECTION(_collection_civilian_fusion, 3), 12, _normal_frequency, _end_when_animation_loops, 0, NONE}, 204 }; 205 206 // Added for the convenience of the 1-2-3 Converter 207 uint8 *unpack_effect_definition(uint8 *Stream, effect_definition *Objects, size_t Count); 208 uint8 *pack_effect_definition(uint8 *Stream, effect_definition *Objects, size_t Count); 209 210 #endif 211