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

#ifndef _DRAW_H
#define _DRAW_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"

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

extern int number_draw_rooms;
extern sint16 draw_rooms[100];

extern int sunset;	// ## sort this fucker out

extern int number_dynamics;
extern sint32 camera_underwater;

extern sint32 DrawPhaseGame(void);
//##extern sint32 DrawPhaseCinematic(void);
extern void DrawRooms(sint16 current_room);
extern void DrawEffect(sint16 fx_num);
extern void DrawDummyItem( ITEM_INFO *item );
extern void DrawLara( ITEM_INFO *item );
extern void DrawSpriteItem( ITEM_INFO *item );
extern void DrawAnimatingItem( ITEM_INFO *item );
extern void DrawLaraInCutScene( ITEM_INFO *item );
extern void DrawGunFlash(int weapon_type, int clip);
extern void CalculateObjectLighting	(ITEM_INFO *item, sint16 *frame);
extern void phd_PutPolygons_I( sint16 *ptr, int clip );
extern void DrawLaraInt( ITEM_INFO *item, sint16 *frame1, sint16 *frame2,int frac,int rate );
extern int GetFrames( ITEM_INFO *item, sint16 *frm[], int *rate );
extern sint16 *GetBestFrame( ITEM_INFO *item );
extern sint16 *GetBoundsAccurate( ITEM_INFO *item );
extern void AddDynamicLight(sint32 x, sint32 y, sint32 z, sint32 intensity, sint32 falloff);

#ifdef PC_VERSION
extern void InitInterpolate( int frac, int rate );
extern void phd_PopMatrix_I(void);
extern void phd_PushMatrix_I(void);
extern void phd_TranslateRel_I( sint32 x, sint32 y, sint32 z );
extern void phd_TranslateRel_ID( sint32 x, sint32 y, sint32 z, sint32 x2, sint32 y2, sint32 z2 );
extern void phd_RotY_I( sint16 ang );
extern void phd_RotX_I( sint16 ang );
extern void phd_RotZ_I( sint16 ang );
extern void phd_RotYXZ_I( sint16 y, sint16 x, sint16 z );
extern void phd_RotYXZpack_I( sint32 r1, sint32 r2 );
extern void gar_RotYXZsuperpack_I( sint16 **pprot1, sint16 **pprot2, int skip );
extern void ClipRoom(ROOM_INFO *r);
extern void gar_RotYXZsuperpack( sint16 **pprot, int skip );
extern void InterpolateMatrix( void );
extern void InterpolateArmMatrix( void );
#endif

#ifdef __cplusplus
}
#endif

#endif
