// KJL 25/02/00 17:10:12 - Asura_PlatformBasics.h
//
//  Standard windows headers, gathered together in one place
//

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef _included_Asura_PlatformBasics_h_
#define _included_Asura_PlatformBasics_h_ 

// If the project hasn't dictated otherwise, default to a minimum OS of
// Windows 2000.
#ifndef _WIN32_WINDOWS
#define _WIN32_WINDOWS (0x0500)
#endif
#ifndef WINVER
#define WINVER (0x0500)
#endif
#ifndef _WIN32_WINNT
#define _WIN32_WINNT (0x0500)
#endif

#define WIN32_LEAN_AND_MEAN

#include <windows.h>
#include <windowsx.h>
#include <winuser.h>

#ifdef _MSC_VER 
// nonstandard extension used : nameless struct/union
#pragma warning(disable:4201)
#endif

#include <mmsystem.h>

#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>

#ifdef _MSC_VER 
// nonstandard extension used : nameless struct/union
#pragma warning(disable:4201)
#endif


#undef PlaySound

typedef char           Asura_Char;
typedef unsigned short Asura_UnicodeChar;

template< class T > static inline void SAFE_RELEASE( T*& ptObject )
{
	if( ptObject )
	{
		ptObject->Release();
	}

	ptObject = NULL;
}

template< class T > static inline void SAFE_RELEASE_ARRAY( T* ptObjects, const u_int uCount )
{
	for( u_int u = 0; u < uCount; ++u)
	{
		SAFE_RELEASE( ptObjects[u] );
	}
}

#endif//_included_Asura_PlatformBasics_h_
