//-----------------------------------------------------------------------------------------------
// PlatformDefines.hpp
//
#pragma once
#ifndef include_PlatformDefines
#define include_PlatformDefines

//-----------------------------------------------------------------------------------------------
// Include any preprocessor directives for how the engine should be built
//
#include "Engine/Core/BuildPreferences.hpp"


//-----------------------------------------------------------------------------------------------
// Build configuration defines
//
#if defined( DEBUG ) || defined( _DEBUG )
#define CONFIGURATION_DEBUG
#else
#define CONFIGURATION_RELEASE
#endif


//-----------------------------------------------------------------------------------------------
// Platform defines
//
#if defined( WIN64 ) || defined( _WIN64 )
	#define PLATFORM_WINDOWS
	#define PLATFORM_64BIT
	#define PLATFORM_NAME "Win64"
	#define PLATFORM_INCLUDE_PATH "PlatformSpecificHeaders_Win64.hpp"

#elif defined( WIN32 ) || defined( _WIN32 )
	#define PLATFORM_WINDOWS
	#define PLATFORM_32BIT
	#define PLATFORM_NAME "Win32"
	#define PLATFORM_INCLUDE_PATH "PlatformSpecificHeaders_Win32.hpp"

#elif defined( XBOX ) || defined( _XBOX )
	#define PLATFORM_XBOX360
	#define PLATFORM_64BIT
	#define PLATFORM_NAME "Xbox 360"
	#define PLATFORM_INCLUDE_PATH "PlatformSpecificHeaders_Xbox360.hpp"
	#define PLATFORM_RENDERER_XBOX360

#elif defined( PS3 ) || defined( PLAYSTATION3 )
	#define PLATFORM_PS3
	#define PLATFORM_64BIT
	#define PLATFORM_NAME "PS3"
	#define PLATFORM_INCLUDE_PATH "PlatformSpecificHeaders_PS3.hpp"
	#define PLATFORM_RENDERER_PS3

#elif defined( __APPLE__ ) 
	#define PLATFORM_APPLE
#error BUILD ERROR: GYPSY NEEDS TO KNOW HOW TO DISTINGUISH IOS FROM OSX
	#define PLATFORM_IOS
	#define PLATFORM_NAME "iOS"
	#define PLATFORM_INCLUDE_PATH "PlatformSpecificHeaders_iOS.hpp"
#error BUILD ERROR: GYPSY NEEDS TO KNOW HOW TO CHECK WHETHER AN IOS CHIPSET IS USING 32 OR 64 BITS PER POINTER
	#define PLATFORM_RENDERER_IOS
#else
	#define PLATFORM_NAME "Unknown"
	#error BUILD ERROR: PlatformDefines.hpp was unable to identify the current platform!
#endif


//-----------------------------------------------------------------------------------------------
// DirectX vs. OpenGL preferences under Windows
//
#if defined( PLATFORM_WINDOWS )
	#if defined( GYPSY_PREFER_DIRECTX )
		#define PLATFORM_RENDERER_WIN32_DIRECTX
	#else // Use OpenGL under Windows unless DirectX was specifically requested
		#define PLATFORM_RENDERER_WIN32_OPENGL
	#endif
#endif


#endif // include_PlatformDefines
