/****************************************************************************
*
* CAMERA.H
*
* PROGRAMMER : Chris
*    VERSION : 00.00
*    CREATED : 01/06/98
*   MODIFIED : 01/06/98
*       TABS : 5
*
* DESCRIPTION
*	Header file for CAMERA.C
*
*****************************************************************************/

#ifndef _CAMERA_H
#define _CAMERA_H

#ifdef __cplusplus
extern "C" {
#endif

/*---------------------------------------------------------------------------
 *	Import Headers
\*--------------------------------------------------------------------------*/

#ifdef PSX_VERSION
#include "../spec_psx/typedefs.h"
#else
#include "..\specific\stypes.h"
#endif

#include "items.h"
#include "anim.h"

/* -------- ## stick this somewhere better ## */
#define GAME_FOV	80			   // Field of View for Game

/*---------------------------------------------------------------------------
 *	Constants
\*--------------------------------------------------------------------------*/

#define NO_CAMERA -1

typedef enum camera_type {
	CHASE_CAMERA,
	FIXED_CAMERA,
	LOOK_CAMERA,
	COMBAT_CAMERA,
	CINEMATIC_CAMERA,
	HEAVY_CAMERA
}CAMERA_TYPE;

/* -------- Camera flags to modify basic behaviour */

#define FOLLOW_CENTRE 	1
#define NO_CHUNKY     	2
#define CHASE_OBJECT  	3
#define NO_MINY		0xffffff

/*---------------------------------------------------------------------------
 *	Type Definitions
\*--------------------------------------------------------------------------*/

typedef struct {
	GAME_VECTOR pos;
	GAME_VECTOR target;
	CAMERA_TYPE type;
	CAMERA_TYPE old_type;
	sint32 shift, flags, fixed_camera;
	sint32 number_frames, bounce, underwater;
	sint32 target_distance, target_square;
	sint16 target_angle, actual_angle;
	sint16 target_elevation;
	sint16 box;
	sint16 number, last, timer, speed;
	long		min_ypos;		// Set the minimum Y position that camera will fall to (0xffffff = not used).
	ITEM_INFO *item, *last_item;			// item to use as target (usually Lara)
	OBJECT_VECTOR *fixed;     // array of fixed camera positions
	int mike_at_lara;
	PHD_VECTOR mike_pos;	// world coordinate origin of projection plane (0,0,phd_persp in screen coordinates) (for sound)
} CAMERA_INFO;

/*---------------------------------------------------------------------------
 *	Prototypes
\*--------------------------------------------------------------------------*/

extern CAMERA_INFO camera;

extern char UseForcedFixedCamera;
extern GAME_VECTOR ForcedFixedCamera;

extern long NumFixedCameras;

extern void InitialiseCamera();
extern void CalculateCamera();
extern void MoveCamera(GAME_VECTOR *ideal, int speed);
extern void ChaseCamera(ITEM_INFO *item);
extern void CombatCamera(ITEM_INFO *item);
extern void LookCamera(ITEM_INFO *item);
extern void ViewPosition(ITEM_INFO *item, GAME_VECTOR *ideal);
extern void FixedCamera();


#ifdef __cplusplus
}
#endif


#endif

