2006-03-20 17:12:09 +00:00
|
|
|
/*
|
2014-06-01 17:55:23 +00:00
|
|
|
* Portions of this file are copyright Rebirth contributors and licensed as
|
|
|
|
* described in COPYING.txt.
|
|
|
|
* Portions of this file are copyright Parallax Software and licensed
|
|
|
|
* according to the Parallax license below.
|
|
|
|
* See COPYING.txt for license details.
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
|
|
|
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
|
|
|
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
|
|
|
|
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
|
|
|
|
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
|
|
|
|
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
|
|
|
|
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
|
|
|
|
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
|
|
|
|
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|
|
|
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Headerfile for effects.c
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2016-01-09 16:38:12 +00:00
|
|
|
#pragma once
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
#include "vclip.h"
|
2014-01-18 18:02:02 +00:00
|
|
|
#include "dxxsconf.h"
|
|
|
|
#include "compiler-array.h"
|
2014-06-21 23:55:24 +00:00
|
|
|
#include "pack.h"
|
2012-11-11 22:12:51 +00:00
|
|
|
|
2016-01-09 16:38:12 +00:00
|
|
|
#if defined(DXX_BUILD_DESCENT_I) || defined(DXX_BUILD_DESCENT_II)
|
2013-03-03 01:03:33 +00:00
|
|
|
#if defined(DXX_BUILD_DESCENT_I)
|
|
|
|
#define MAX_EFFECTS 60
|
|
|
|
#elif defined(DXX_BUILD_DESCENT_II)
|
2006-03-20 17:12:09 +00:00
|
|
|
#define MAX_EFFECTS 110
|
2013-03-03 01:03:33 +00:00
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
//flags for eclips. If no flags are set, always plays
|
|
|
|
|
|
|
|
#define EF_CRITICAL 1 //this doesn't get played directly (only when mine critical)
|
|
|
|
#define EF_ONE_SHOT 2 //this is a special that gets played once
|
|
|
|
#define EF_STOPPED 4 //this has been stopped
|
|
|
|
|
2011-02-23 16:46:39 +00:00
|
|
|
#define ECLIP_NUM_FUELCEN 2
|
|
|
|
#define ECLIP_NUM_BOSS 53
|
2013-03-03 01:03:33 +00:00
|
|
|
#ifdef DXX_BUILD_DESCENT_II
|
2011-02-23 16:46:39 +00:00
|
|
|
#define ECLIP_NUM_FORCE_FIELD 78
|
2013-03-03 01:03:33 +00:00
|
|
|
#endif
|
2011-02-23 16:46:39 +00:00
|
|
|
|
2014-06-21 23:55:24 +00:00
|
|
|
struct eclip : public prohibit_void_ptr<eclip>
|
2013-12-22 22:03:07 +00:00
|
|
|
{
|
2006-03-20 17:12:09 +00:00
|
|
|
vclip vc; //imbedded vclip
|
|
|
|
fix time_left; //for sequencing
|
2014-09-20 23:47:27 +00:00
|
|
|
uint32_t frame_count; //for sequencing
|
2006-03-20 17:12:09 +00:00
|
|
|
short changing_wall_texture; //Which element of Textures array to replace.
|
|
|
|
short changing_object_texture; //Which element of ObjBitmapPtrs array to replace.
|
|
|
|
int flags; //see above
|
|
|
|
int crit_clip; //use this clip instead of above one when mine critical
|
|
|
|
int dest_bm_num; //use this bitmap when monitor destroyed
|
|
|
|
int dest_vclip; //what vclip to play when exploding
|
|
|
|
int dest_eclip; //what eclip to play when exploding
|
|
|
|
fix dest_size; //3d size of explosion
|
|
|
|
int sound_num; //what sound this makes
|
2013-12-29 04:28:07 +00:00
|
|
|
segnum_t segnum;
|
|
|
|
int sidenum; //what seg & side, for one-shot clips
|
2014-01-12 23:00:43 +00:00
|
|
|
};
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2016-07-23 04:10:42 +00:00
|
|
|
constexpr int eclip_none = -1;
|
2014-10-04 15:04:44 +00:00
|
|
|
|
2014-01-18 18:02:02 +00:00
|
|
|
extern unsigned Num_effects;
|
|
|
|
extern array<eclip, MAX_EFFECTS> Effects;
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
// Set up special effects.
|
|
|
|
extern void init_special_effects();
|
|
|
|
|
|
|
|
// Clear any active one-shots
|
|
|
|
void reset_special_effects();
|
|
|
|
|
|
|
|
// Function called in game loop to do effects.
|
|
|
|
extern void do_special_effects();
|
|
|
|
|
|
|
|
// Restore bitmap
|
|
|
|
extern void restore_effect_bitmap_icons();
|
|
|
|
|
|
|
|
//stop an effect from animating. Show first frame.
|
|
|
|
void stop_effect(int effect_num);
|
|
|
|
|
|
|
|
//restart a stopped effect
|
|
|
|
void restart_effect(int effect_num);
|
|
|
|
|
|
|
|
/*
|
2016-01-09 16:38:14 +00:00
|
|
|
* reads n eclip structs from a PHYSFS_File
|
2006-03-20 17:12:09 +00:00
|
|
|
*/
|
2016-01-09 16:38:14 +00:00
|
|
|
void eclip_read(PHYSFS_File *fp, eclip &ec);
|
2015-12-04 03:36:31 +00:00
|
|
|
#if 0
|
2016-01-09 16:38:14 +00:00
|
|
|
void eclip_write(PHYSFS_File *fp, const eclip &ec);
|
2015-12-04 03:36:31 +00:00
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#endif
|