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

#ifndef _SPECIFIC_H
#define _SPECIFIC_H

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

#include "typedefs.h"
#include "cd.h"
#include "..\game\items.h"

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

//#define PLAY_FMV
//#define PSX_SONY_DEMO_SHELL
//#define TEST_SONY_DEMO_SHELL

/*---------------------------------------------------------------------------
 *	Macros
\*--------------------------------------------------------------------------*/

#define S_SoundSetMasterVolume(nVolume)
#define S_CDVolume(nVolume)
#define S_FinishInventory()
#define S_ClearScreen()
#define S_SetGamma(gamma)
#define S_SetBackgroundGamma(gamma)
#define S_CopyBufferToScreen()
#define S_LoadingScreen(nLevel)

#define S_InitialiseScreen(n) phd_InitWindow(GAME_FOV);
#define S_OutputPolyList() GPU_EndScene();
#define S_InsertBackground(objptr)	phd_PutPolygons_AtBack(objptr, -1, 0)

#if defined(CD_LOAD) || defined(PLAY_CDTRACKS)
#define S_CDGetLoc() CDDA_GetCurrentLoc()
#else
#define S_CDGetLoc() 0
#endif

//#define S_CalculateStaticMeshLight(x, y, z, shade, shadeB, r) S_CalculateStaticLight(shade)

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

extern int game_paused;

extern int GtSFXEnabled;
extern uint32 GdwUWClutSub;
extern uint32 swClutSub;

extern sint32 S_SoundPlaySample(int nSample,uint16 wVol,int nPitch,sint16 wPan);
extern sint32 S_SoundPlaySampleLooped(int nSample,uint16 wVol,int nPitch,sint16 wPan);
extern void S_SoundSetPanAndVolume(sint32 handle,sint16 wPan,uint16 wVolume);
extern void S_SoundStopSample(sint32 handle);
extern void S_SoundStopAllSamples();
extern void S_PauseAllSamples();
extern void S_UnpauseAllSamples();
extern sint32 S_SoundSampleIsPlaying(sint32 handle);
extern void S_SoundSetPitch(sint32 handle,int nPitch);

/* -------- CD.C */

extern void S_CDPlay(sint16 track,int mode);
extern void S_CDStop();
extern void S_CDPause();
extern void S_CDRestart();
extern void S_StartSyncedAudio(int nTrack);

extern void S_Pause();
extern void S_Wait(int nFrames);
extern int S_PlayFMV(int sequence,int flag);
extern void S_control_screen_position();

extern void S_SetupBelowWater(int underwater);	// now in get.mip
extern void S_SetupAboveWater(int underwater);	// now in get.mip
extern void S_AnimateTextures(int nframes);
extern void S_InsertInvBgnd(sint16 *objptr);
extern sint32 S_DumpScreen();
extern sint32 S_DumpScreenCine();
extern void S_InitialisePolyList();

/* -------- ROOMLOAD.C */

extern int S_LoadGameFlow(char *filename);
extern int S_LoadLevelFile(char *fname, int level_number, int type);

/* -------- LITE_SRC.C */

extern void SetLightMatrices();
extern void S_CalculateLight(sint32 x, sint32 y, sint32 z, sint16 room_number, ITEM_LIGHT *il);
extern void S_CalculateStaticLight(sint16 adder);

/* -------- DRAWOBJ.MIP */

extern void phd_PutPolygons(sint16 *mesh, sint32 clip);
extern void InitObjGTE();

/* -------- 3D_OBJ.C */

extern void phd_PutPolygons_AtBack(sint16 *objptr, int clip, int type);
extern void CreateMonoScreen();
extern void RemoveMonoScreen();
//extern void DrawMonoScreen();

/* -------- PSX_INIT.C */

extern void S_InitialiseSystem();
extern void S_CleanupSystem();
extern void S_ExitSystem(char* exit_message);

/* -------- SPU.C */

extern void S_SetReverbType(sint16 reverb);

#endif
