/*********************************************************************************************/
/*                                                                                           */
/* Traps/Doors and Stuff                                                                     */
/*                                                                                           */
/*********************************************************************************************/

#ifndef TRAPS_H
#define TRAPS_H

#ifdef __cplusplus
extern "C" {
#endif

/********************************* TYPE DEFINITIONS ******************************************/

enum trap_anims {TRAP_SET, TRAP_ACTIVATE, TRAP_WORKING, TRAP_FINISHED};
enum door_anims {DOOR_CLOSED, DOOR_OPEN};

/******************************* FUNCTION PROTOTYPES *****************************************/

void		EarthQuake					(sint16 item_number);
void		ControlCutShotgun			(sint16 item_number);

void		InitialiseFinalLevel		(void);
void		FinalLevelCounter			(sint16 item_number);

void		AssaultTimer				(sint16 item_number);

void		MiniCopterControl			(sint16 item_number);
void		CopterControl				(sint16 item_number);

void		InitialiseDyingMonk		(sint16 item_number);
void		DyingMonk					(sint16 item_number);

void		InitialiseGondola			(sint16 item_number);
void		GondolaControl				(sint16 item_number);

void		SphereOfDoom				(sint16 item_number);
void		DrawSphereOfDoom			(ITEM_INFO *item);
void		SphereOfDoomCollision	(sint16 item_number, ITEM_INFO *laraitem, COLL_INFO *coll);

void		ControlLaraAlarm			(sint16 item_number);
void		ControlDingDong			(sint16 item_number);
void		ControlAlarmSound			(sint16 item_number);
void		ControlClockChimes		(sint16 item_number);
void		ControlBirdTweeter		(sint16 item_number);
void		ControlGongBonger			(sint16 item_number);

void		MineControl					(sint16 item_number);

void		DeathSlideCollision		(sint16 item_number, ITEM_INFO *litem, COLL_INFO *coll);
void		ControlDeathSlide			(sint16 item_number);

void		ControlSpikeWall			(sint16 item_number);
void		ControlCeilingSpikes		(sint16 item_number);
void		BigBowlControl				(sint16 item_number);

void		HookControl					(sint16 item_number);
void		PropellerControl			(sint16 item_number);

void		SpinningBlade				(sint16 item_number);
void		BellControl					(sint16 item_number);

void		IcicleControl				(sint16 item_number);

void		InitialiseBlade			(sint16 item_number);
void		BladeControl				(sint16 item_number);
void		InitialiseKillerStatue	(sint16 item_number);
void		KillerStatueControl		(sint16 item_number);
void		SpringBoardControl		(sint16 item_number);

void		InitialiseWindow			(sint16 item_number);
void		SmashWindow				(sint16 item_number);
void		WindowControl				(sint16 item_number);
void		SmashIceControl			(sint16 item_number);

void		InitialiseRollingBall   (sint16 item_number);
void		RollingBallControl		(sint16 item_number);
void		RollingBallCollision	( sint16 item_num, ITEM_INFO *litem, COLL_INFO *coll );

void		SpikeCollision			( sint16 item_num, ITEM_INFO *litem, COLL_INFO *coll );

void		InitialiseDoor			(sint16 item_number);
void		DoorControl				(sint16 item_number);

void		TrapDoorControl			(sint16 item_number);
void		TrapDoorFloor			(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
void		TrapDoorCeiling			(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
int			OnTrapDoor				(ITEM_INFO *item, sint32 x, sint32 y);

void		FallingBlock			(sint16 item_number);
void 		FallingBlockFloor		(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
void 		FallingBlockCeiling		(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);

void		DrawBridgeFloor		(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
void		DrawBridgeCeiling		(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
void		DrawBridgeCollision	(sint16 item_num, ITEM_INFO *laraitem, COLL_INFO *coll);

void		Pendulum				(sint16 item_number);

void		InitialiseLift		(sint16 item_number);
void		LiftControl			(sint16 item_number);
void		LiftFloor			(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
void		LiftCeiling			(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);

void 		BridgeFlatFloor			(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
void 		BridgeFlatCeiling		(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
void 		BridgeTilt1Floor		(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
void 		BridgeTilt1Ceiling		(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
void 		BridgeTilt2Floor		(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);
void 		BridgeTilt2Ceiling		(ITEM_INFO *item, sint32 x, sint32 y, sint32 z, sint32 *height);

void 		GeneralControl				(sint16 item_number);
void		DetonatorControl			(sint16 item_number);
void 		TeethTrap				(sint16 item_number);
void 		FallingCeiling			(sint16 item_number);

void		DartEmitterControl		( sint16 item_num );
void		DartsControl			( sint16 item_num );
void		DartEffectControl		( sint16 item_num );

void		FlameEmitterControl	(sint16 item_number);
void		FlameControl			(sint16 fx_number);
void		LaraBurn					(void);

void		LavaBurn					(ITEM_INFO *item);

void		LavaSpray				(sint16 item_number);
void		ControlLavaBlob		(sint16 fx_number);

void		LavaWedge				(sint16 item_number);

void		WaterFall				(sint16 item_number);

int 		ItemNearLara			(PHD_3DPOS *pos, sint32 distance);

void		FlareControl			(sint16 item_number);

#ifdef __cplusplus
}
#endif

#endif
