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 fireball.c
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-02-28 19:36:01 +00:00
|
|
|
#pragma once
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2013-10-26 03:40:50 +00:00
|
|
|
#include <physfs.h>
|
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#ifdef __cplusplus
|
2014-11-17 04:02:25 +00:00
|
|
|
#include "maths.h"
|
2015-02-28 19:36:01 +00:00
|
|
|
#include "fwd-partial_range.h"
|
2015-10-10 03:44:14 +00:00
|
|
|
#include "fwd-object.h"
|
2015-10-10 03:44:14 +00:00
|
|
|
#include "fwd-segment.h"
|
2015-12-05 22:57:24 +00:00
|
|
|
#include "fwd-vecmat.h"
|
2015-07-25 23:10:45 +00:00
|
|
|
#include "pack.h"
|
2012-11-11 22:12:51 +00:00
|
|
|
|
2015-04-19 04:18:53 +00:00
|
|
|
enum powerup_type_t : uint8_t;
|
2013-10-26 03:40:50 +00:00
|
|
|
|
2015-12-22 04:18:50 +00:00
|
|
|
namespace dcx {
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2015-02-28 19:36:01 +00:00
|
|
|
struct expl_wall : prohibit_void_ptr<expl_wall>
|
2013-12-22 22:03:07 +00:00
|
|
|
{
|
2013-12-29 04:28:07 +00:00
|
|
|
segnum_t segnum;
|
2015-02-28 19:36:01 +00:00
|
|
|
uint8_t sidenum;
|
|
|
|
fix time;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct disk_expl_wall
|
|
|
|
{
|
|
|
|
int segnum, sidenum;
|
2006-03-20 17:12:09 +00:00
|
|
|
fix time;
|
2013-12-22 22:03:07 +00:00
|
|
|
};
|
2015-02-28 19:36:01 +00:00
|
|
|
static_assert(sizeof(disk_expl_wall) == 12, "sizeof(disk_expl_wall) wrong");
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2013-03-03 01:03:33 +00:00
|
|
|
// data for exploding walls (such as hostage door)
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2013-03-03 01:03:33 +00:00
|
|
|
#define MAX_EXPLODING_WALLS 10
|
2015-02-28 19:36:01 +00:00
|
|
|
extern array<expl_wall, MAX_EXPLODING_WALLS> expl_wall_list;
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2015-12-22 04:18:50 +00:00
|
|
|
}
|
|
|
|
|
2016-01-09 16:38:15 +00:00
|
|
|
#ifdef dsx
|
2015-12-22 04:18:50 +00:00
|
|
|
namespace dsx {
|
2014-11-23 04:58:45 +00:00
|
|
|
objptridx_t object_create_explosion(vsegptridx_t segnum, const vms_vector &position, fix size, int vclip_type);
|
|
|
|
void object_create_muzzle_flash(vsegptridx_t segnum, const vms_vector &position, fix size, int vclip_type);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2014-11-23 04:58:45 +00:00
|
|
|
objptridx_t object_create_badass_explosion(objptridx_t objp, vsegptridx_t segnum, const vms_vector &position, fix size, int vclip_type,
|
2014-10-02 03:02:34 +00:00
|
|
|
fix maxdamage, fix maxdistance, fix maxforce, cobjptridx_t parent);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
// blows up a badass weapon, creating the badass explosion
|
|
|
|
// return the explosion object
|
2014-10-26 21:36:31 +00:00
|
|
|
void explode_badass_weapon(vobjptridx_t obj,const vms_vector &pos);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
// blows up the player with a badass explosion
|
2014-08-16 23:18:17 +00:00
|
|
|
void explode_badass_player(vobjptridx_t obj);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2014-08-16 23:18:17 +00:00
|
|
|
void explode_object(vobjptridx_t obj,fix delay_time);
|
2014-10-02 03:02:34 +00:00
|
|
|
void do_explosion_sequence(vobjptr_t obj);
|
2014-08-16 23:18:17 +00:00
|
|
|
void do_debris_frame(vobjptridx_t obj); // deal with debris for this frame
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2014-10-02 03:02:34 +00:00
|
|
|
void draw_fireball(vobjptridx_t obj);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2014-11-23 04:58:45 +00:00
|
|
|
void explode_wall(vsegptridx_t segnum, int sidenum);
|
2015-12-22 04:18:50 +00:00
|
|
|
void do_exploding_wall_frame();
|
2015-04-19 04:18:53 +00:00
|
|
|
void maybe_drop_net_powerup(powerup_type_t powerup_type);
|
2014-10-02 03:02:34 +00:00
|
|
|
void maybe_replace_powerup_with_energy(vobjptr_t del_obj);
|
2015-12-22 04:18:50 +00:00
|
|
|
}
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2015-12-22 04:18:50 +00:00
|
|
|
namespace dcx {
|
|
|
|
void init_exploding_walls();
|
2015-11-15 22:30:41 +00:00
|
|
|
enum class explosion_vclip_stage : int
|
|
|
|
{
|
|
|
|
s0,
|
|
|
|
s1,
|
|
|
|
};
|
2015-12-22 04:18:50 +00:00
|
|
|
}
|
2015-11-15 22:30:41 +00:00
|
|
|
|
2015-12-22 04:18:50 +00:00
|
|
|
namespace dsx {
|
2015-11-15 22:30:41 +00:00
|
|
|
int get_explosion_vclip(vcobjptr_t obj, explosion_vclip_stage stage);
|
2013-03-03 01:03:33 +00:00
|
|
|
|
|
|
|
#if defined(DXX_BUILD_DESCENT_II)
|
2014-11-23 04:58:45 +00:00
|
|
|
objptridx_t drop_powerup(int type, int id, int num, const vms_vector &init_vel, const vms_vector &pos, vsegptridx_t segnum);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
// creates afterburner blobs behind the specified object
|
2014-10-02 03:02:34 +00:00
|
|
|
void drop_afterburner_blobs(vobjptr_t obj, int count, fix size_scale, fix lifetime);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2009-10-05 02:51:37 +00:00
|
|
|
/*
|
2016-01-09 16:38:14 +00:00
|
|
|
* reads n expl_wall structs from a PHYSFS_File and swaps if specified
|
2009-10-05 02:51:37 +00:00
|
|
|
*/
|
2016-01-09 16:38:14 +00:00
|
|
|
void expl_wall_read_n_swap(PHYSFS_File *fp, int swap, partial_range_t<expl_wall *>);
|
2012-11-11 00:14:30 +00:00
|
|
|
extern fix Flash_effect;
|
2013-03-03 01:03:33 +00:00
|
|
|
#endif
|
2009-10-05 02:51:37 +00:00
|
|
|
|
2015-09-29 02:41:22 +00:00
|
|
|
segidx_t pick_connected_segment(vcobjptr_t objp, int max_depth);
|
2015-12-22 04:18:50 +00:00
|
|
|
}
|
2015-11-26 02:56:55 +00:00
|
|
|
#endif
|
2012-11-11 00:14:30 +00:00
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#endif
|