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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* Header for hostage.c
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _HOSTAGE_H
|
|
|
|
#define _HOSTAGE_H
|
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
2013-10-26 03:40:50 +00:00
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
#define HOSTAGE_SIZE i2f(5) // 3d size of a hostage
|
|
|
|
|
|
|
|
#define MAX_HOSTAGE_TYPES 1 //only one hostage bitmap
|
2013-03-03 01:03:33 +00:00
|
|
|
#if defined(DXX_BUILD_DESCENT_I)
|
|
|
|
#define MAX_HOSTAGES 10 //max per any one level
|
|
|
|
|
|
|
|
// 1 per hostage
|
2013-12-22 22:03:07 +00:00
|
|
|
struct hostage_data
|
|
|
|
{
|
2013-12-29 04:28:07 +00:00
|
|
|
objnum_t objnum;
|
2013-03-03 01:03:33 +00:00
|
|
|
int objsig;
|
2013-12-22 22:03:07 +00:00
|
|
|
};
|
2013-03-03 01:03:33 +00:00
|
|
|
|
|
|
|
extern hostage_data Hostages[MAX_HOSTAGES];
|
|
|
|
|
|
|
|
//returns true if something drew
|
|
|
|
int do_hostage_effects();
|
|
|
|
|
2013-09-02 23:56:35 +00:00
|
|
|
#ifdef EDITOR
|
2013-03-03 01:03:33 +00:00
|
|
|
void hostage_init_all();
|
|
|
|
void hostage_compress_all();
|
|
|
|
int hostage_is_valid( int hostage_num );
|
2014-08-16 23:18:17 +00:00
|
|
|
int hostage_object_is_valid(vobjptridx_t objnum);
|
|
|
|
void hostage_init_info(vobjptridx_t objnum);
|
2013-03-03 01:03:33 +00:00
|
|
|
#endif
|
2013-09-02 23:56:35 +00:00
|
|
|
#elif defined(DXX_BUILD_DESCENT_II)
|
|
|
|
#ifdef EDITOR
|
|
|
|
static inline void hostage_init_all() {}
|
2013-12-29 04:28:07 +00:00
|
|
|
static inline void hostage_init_info(const objnum_t &) {}
|
2013-09-02 23:56:35 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
extern int N_hostage_types;
|
|
|
|
|
|
|
|
extern int Hostage_vclip_num[MAX_HOSTAGE_TYPES]; // for each type of hostage
|
|
|
|
|
2014-08-16 23:18:17 +00:00
|
|
|
void draw_hostage(vobjptridx_t obj);
|
2014-10-17 02:04:08 +00:00
|
|
|
void hostage_rescue();
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#endif
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
#endif /* _HOSTAGE_H */
|