This repository has been archived on 2022-06-27. You can view files and clone it, but cannot push or open issues or pull requests.
Xash3DArchive/engine/common/com_export.h

68 lines
2.1 KiB
C
Raw Normal View History

2009-11-03 22:00:00 +01:00
//=======================================================================
// Copyright XashXT Group 2009 <20>
2010-01-08 22:00:00 +01:00
// com_export.h - safe calls exports from other libraries
2009-11-03 22:00:00 +01:00
//=======================================================================
2010-01-08 22:00:00 +01:00
#ifndef COM_EXPORT_H
#define COM_EXPORT_H
2009-11-03 22:00:00 +01:00
2010-08-12 22:00:00 +02:00
#include "cm_local.h"
2010-11-16 22:00:00 +01:00
#ifdef __cplusplus
extern "C" {
#endif
2009-11-03 22:00:00 +01:00
// linked interfaces
2010-07-01 22:00:00 +02:00
extern stdlib_api_t com;
extern vsound_exp_t *se;
2010-03-06 22:00:00 +01:00
extern render_exp_t *re;
2009-11-03 22:00:00 +01:00
2010-11-16 22:00:00 +01:00
#ifdef __cplusplus
}
#endif
2010-10-26 22:00:00 +02:00
_inline int CL_CreateDecalList( decallist_t *pList, qboolean changelevel )
2010-07-01 22:00:00 +02:00
{
if( !re ) return 0;
return re->CreateDecalList( pList, changelevel );
}
2009-11-03 22:00:00 +01:00
//
// vsound.dll exports
//
#define S_Shutdown if( se ) se->Shutdown
#define S_StartStreaming if( se ) se->StartStreaming
2010-09-30 22:00:00 +02:00
#define S_StopStreaming if( se ) se->StopStreaming
2009-11-03 22:00:00 +01:00
#define S_StartSound if( se ) se->StartSound
2010-04-24 22:00:00 +02:00
#define S_AmbientSound if( se ) se->StaticSound
2009-11-03 22:00:00 +01:00
#define S_StartLocalSound if( se ) se->StartLocalSound
#define S_StartBackgroundTrack if( se ) se->StartBackgroundTrack
#define S_StopBackgroundTrack if( se ) se->StopBackgroundTrack
#define S_RawSamples if( se ) se->StreamRawSamples
#define S_StopAllSounds if( se ) se->StopAllSounds
2010-04-21 22:00:00 +02:00
#define S_StopSound if( se ) se->StopSound
2009-11-03 22:00:00 +01:00
#define S_AddLoopingSound if( se ) se->AddLoopingSound
#define S_Activate if( se ) se->Activate
2010-10-09 22:00:00 +02:00
#define S_ExtraUpdate if( se ) se->ExtraUpdate
2010-06-28 22:00:00 +02:00
#define S_RenderFrame if( se ) se->RenderFrame
2009-11-03 22:00:00 +01:00
#define S_BeginRegistration if( se ) se->BeginRegistration
#define S_EndRegistration if( se ) se->EndRegistration
2010-06-28 22:00:00 +02:00
_inline void S_FadeClientVolume( float fadePercent, float fadeOutSeconds, float holdTime, float fadeInSeconds )
{
if( se ) se->FadeClientVolume( fadePercent, fadeOutSeconds, holdTime, fadeInSeconds );
}
2009-11-03 22:00:00 +01:00
_inline sound_t S_RegisterSound( const char *name )
{
if( !se ) return 0;
return se->RegisterSound( name );
}
2010-10-16 22:00:00 +02:00
_inline int S_GetCurrentStaticSounds( soundlist_t *pout, int size, int entchannel )
{
if( !se ) return 0;
return se->GetCurrentStaticSounds( pout, size, entchannel );
}
2010-01-08 22:00:00 +01:00
#endif//COM_EXPORT_H