2010-07-27 11:41:43 +00:00
|
|
|
/* $Id: cntrlcen.h,v 1.1.1.1 2006/03/17 19:55:32 zicodxx Exp $ */
|
2006-03-20 16:43:15 +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
|
2010-07-27 11:41:43 +00:00
|
|
|
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
2006-03-20 16:43:15 +00:00
|
|
|
COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|
|
|
*/
|
2010-07-27 11:41:43 +00:00
|
|
|
|
2006-03-20 16:43:15 +00:00
|
|
|
/*
|
|
|
|
*
|
2010-07-27 11:41:43 +00:00
|
|
|
* Header for cntrlcen.c
|
2006-03-20 16:43:15 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CNTRLCEN_H
|
|
|
|
#define _CNTRLCEN_H
|
|
|
|
|
|
|
|
#include "vecmat.h"
|
|
|
|
#include "object.h"
|
2008-01-13 00:58:49 +00:00
|
|
|
#include "wall.h"
|
|
|
|
#include "switch.h"
|
|
|
|
|
2010-07-27 11:41:43 +00:00
|
|
|
#define MAX_CONTROLCEN_GUNS 4
|
2006-03-20 16:43:15 +00:00
|
|
|
|
2010-07-27 11:41:43 +00:00
|
|
|
#define CONTROLCEN_WEAPON_NUM 6
|
|
|
|
|
|
|
|
#define MAX_CONTROLCEN_LINKS 10
|
2006-03-20 16:43:15 +00:00
|
|
|
|
2008-01-13 00:58:49 +00:00
|
|
|
typedef struct control_center_triggers {
|
2010-07-27 11:41:43 +00:00
|
|
|
short num_links;
|
|
|
|
short seg[MAX_CONTROLCEN_LINKS];
|
|
|
|
short side[MAX_CONTROLCEN_LINKS];
|
2008-01-13 00:58:49 +00:00
|
|
|
} __pack__ control_center_triggers;
|
|
|
|
|
|
|
|
extern control_center_triggers ControlCenterTriggers;
|
|
|
|
|
2010-07-27 11:41:43 +00:00
|
|
|
extern int N_controlcen_guns;
|
|
|
|
extern int Control_center_been_hit;
|
|
|
|
extern int Control_center_player_been_seen;
|
|
|
|
extern int Control_center_next_fire_time;
|
|
|
|
extern int Control_center_present;
|
2006-03-20 16:43:15 +00:00
|
|
|
extern int Dead_controlcen_object_num;
|
|
|
|
|
|
|
|
extern vms_vector controlcen_gun_points[MAX_CONTROLCEN_GUNS];
|
|
|
|
extern vms_vector controlcen_gun_dirs[MAX_CONTROLCEN_GUNS];
|
|
|
|
extern vms_vector Gun_pos[MAX_CONTROLCEN_GUNS];
|
|
|
|
|
|
|
|
//return the position & orientation of a gun on the control center object
|
|
|
|
extern void calc_controlcen_gun_point(vms_vector *gun_point,vms_vector *gun_dir,object *obj,int gun_num);
|
|
|
|
|
2010-07-27 11:41:43 +00:00
|
|
|
// do whatever this thing does in a frame
|
2006-03-20 16:43:15 +00:00
|
|
|
extern void do_controlcen_frame(object *obj);
|
|
|
|
|
2010-07-27 11:41:43 +00:00
|
|
|
// Initialize control center for a level.
|
|
|
|
// Call when a new level is started.
|
2006-03-20 16:43:15 +00:00
|
|
|
extern void init_controlcen_for_level(void);
|
|
|
|
|
|
|
|
extern void do_controlcen_destroyed_stuff(object *objp);
|
|
|
|
extern void do_controlcen_dead_frame(void);
|
|
|
|
|
2011-01-22 16:56:23 +00:00
|
|
|
extern fix Countdown_timer;
|
2011-03-28 22:35:15 +00:00
|
|
|
extern int Control_center_destroyed, Countdown_seconds_left, Total_countdown_time;
|
2010-07-27 11:41:43 +00:00
|
|
|
|
2008-01-13 00:58:49 +00:00
|
|
|
/*
|
2011-06-01 07:59:51 +00:00
|
|
|
* reads n control_center_triggers structs from a PHYSFS_file
|
2008-01-13 00:58:49 +00:00
|
|
|
*/
|
2011-06-01 07:59:51 +00:00
|
|
|
extern int control_center_triggers_read_n(control_center_triggers *cct, int n, PHYSFS_file *fp);
|
2008-01-13 00:58:49 +00:00
|
|
|
|
2009-10-05 02:51:37 +00:00
|
|
|
/*
|
2011-06-01 07:59:51 +00:00
|
|
|
* reads n control_center_triggers structs from a PHYSFS_file and swaps if specified
|
2009-10-05 02:51:37 +00:00
|
|
|
*/
|
2011-06-01 07:59:51 +00:00
|
|
|
void control_center_triggers_read_n_swap(control_center_triggers *cct, int n, int swap, PHYSFS_file *fp);
|
2009-10-05 02:51:37 +00:00
|
|
|
|
2010-12-24 04:26:24 +00:00
|
|
|
extern int control_center_triggers_write(control_center_triggers *cct, PHYSFS_file *fp);
|
|
|
|
|
2006-03-20 16:43:15 +00:00
|
|
|
#endif
|
|
|
|
|