
///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_StateMachine_Core.h
// Author : Anthony Gregson
// Date   : 21/11/07
//
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
	#pragma once
#endif   // ifdef ASURA_USE_PRAGMA_ONCE

#ifndef __AVP_STATEMACHINE_CORE_H__
#define __AVP_STATEMACHINE_CORE_H__



////////////////////////////////////////////////////////////////////////////////
// Include files...
////////////////////////////////////////////////////////////////////////////////

#include "Core/Asura_TextureManagement.h"

#include "Core/AVP_StateMachine.h"


////////////////////////////////////////////////////////////////////////////////
// Forward class declarations...
////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
// Global variables...
////////////////////////////////////////////////////////////////////////////////

// Strings used for resource-banks in-game...
static const char*	szAVP_RESOURCE_BANK_NAME_COMMON				= "Common";

static const char*	szAVP_RESOURCE_BANK_NAME_FRONTEND			= "Frontend";
static const char*	szAVP_RESOURCE_BANK_NAME_LOADING			= "Loading";

static const char*	szAVP_RESOURCE_BANK_NAME_PLAYER_ALIEN		= "PlayerAlien";
static const char*	szAVP_RESOURCE_BANK_NAME_PLAYER_MARINE		= "PlayerMarine";
static const char*	szAVP_RESOURCE_BANK_NAME_PLAYER_PREDATOR	= "PlayerPredator";

static const char*	szAVP_RESOURCE_BANK_NAME_MULTIPLAYER		= "Multiplayer";

static const char*	szAVP_RESOURCE_BANK_NAME_LEVEL				= "Level";


// Hash-IDs used for resource-banks in-game...
static const Asura_Hash_ID	uAVP_RESOURCE_BANK_HASH_COMMON			= 0xAF3F29EB;	//Asura_GetHashID("Common");

static const Asura_Hash_ID	uAVP_RESOURCE_BANK_HASH_FRONTEND		= 0xB5EC8E12;	//Asura_GetHashID("Frontend");
static const Asura_Hash_ID	uAVP_RESOURCE_BANK_HASH_LOADING			= 0x1410E13C;	//Asura_GetHashID("Loading");

static const Asura_Hash_ID	uAVP_RESOURCE_BANK_HASH_PLAYER_ALIEN	= 0x214DA086;	//Asura_GetHashID("PlayerAlien");
static const Asura_Hash_ID	uAVP_RESOURCE_BANK_HASH_PLAYER_MARINE	= 0x1C49BBE3;	//Asura_GetHashID("PlayerMarine");
static const Asura_Hash_ID	uAVP_RESOURCE_BANK_HASH_PLAYER_PREDATOR	= 0xD53CACD8;	//Asura_GetHashID("PlayerPredator");

static const Asura_Hash_ID	uAVP_RESOURCE_BANK_HASH_MULTIPLAYER		= 0x2184e15a;	//Asura_GetHashID("Multiplayer");

static const Asura_Hash_ID	uAVP_RESOURCE_BANK_HASH_LEVEL			= 0x06219B84;	//Asura_GetHashID("Level");

// Texture reset-groups for resource-banks in-game...
static const u_int	uAVP_RESOURCE_BANK_TRG_COMMON			= ASURA_TEXTURE_RESETTABLE_GROUP_COMMON;

static const u_int	uAVP_RESOURCE_BANK_TRG_FRONTEND			= ASURA_TEXTURE_RESETTABLE_GROUP_DEFAULT;
static const u_int	uAVP_RESOURCE_BANK_TRG_LOADING			= ASURA_TEXTURE_RESETTABLE_GROUP_DEFAULT;

static const u_int	uAVP_RESOURCE_BANK_TRG_PLAYER_ALIEN		= ASURA_TEXTURE_RESETTABLE_GROUP01;
static const u_int	uAVP_RESOURCE_BANK_TRG_PLAYER_MARINE	= ASURA_TEXTURE_RESETTABLE_GROUP01;
static const u_int	uAVP_RESOURCE_BANK_TRG_PLAYER_PREDATOR	= ASURA_TEXTURE_RESETTABLE_GROUP01;
static const u_int	uAVP_RESOURCE_BANK_TRG_PLAYER_WEAPONS	= ASURA_TEXTURE_RESETTABLE_GROUP01;

static const u_int	uAVP_RESOURCE_BANK_TRG_MULTIPLAYER		= ASURA_TEXTURE_RESETTABLE_GROUP_DEFAULT;

static const u_int	uAVP_RESOURCE_BANK_TRG_LEVEL			= ASURA_TEXTURE_RESETTABLE_GROUP_DEFAULT;


////////////////////////////////////////////////////////////////////////////////
// Class declaration...
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Class  : AVP_StateMachine_Core
// Author : Anthony Gregson
// Date   : 21/11/07
////////////////////////////////////////////////////////////////////////////////

class AVP_StateMachine_Core : public AVP_StateMachine
{
public:
	enum State
	{
		STATE_VOID,

#ifdef ASURA_TOOLS
		STATE_LOADINGTOOLS,
		STATE_TOOLS,
#endif //#ifdef ASURA_TOOLS

#ifdef AVP_USE_DEVELOPMENT_FRONT_END
		STATE_DEVELOPMENTFRONTEND,
#endif //#ifdef AVP_USE_DEVELOPMENT_FRONT_END

#if defined(AVP_USE_GAME_FRONTEND)
		STATE_FOX_FMV,
		STATE_SEGA_FMV,
		STATE_REBELLION_FMV,
		STATE_GAMEFRONTEND,
#endif	//defined(AVP_USE_GAME_FRONTEND)
#if ( defined(AVP_USE_DEV_LOBBY) || defined(AVP_USE_GAME_LOBBY) )
		STATE_MULTIPLAYERLOBBY,	// We may well need multiple states for this, or even a full sub-state machine, as chances are it has some interesting connection stages.
#endif	//defined(AVP_USE_DEV_LOBBY)

		STATE_GAME,	// This has a sub-state machine - AVP_Connection - to handle a whole host of game phases.

		STATE_SHUTTINGDOWN,

		MAX_STATES
	};

	AVP_StateMachine_Core();
	virtual ~AVP_StateMachine_Core() {}

	virtual void Initialise();
	virtual void Shutdown();

	void RequestQuitApplication();

protected:
#ifdef AVP_STATEMACHINE_LOGGING
	virtual const char* GetStateMachineName() { return "AVP_StateMachine_Core"; }
#endif //#ifdef AVP_STATEMACHINE_LOGGING

private:
};   // End of class 'AVP_StateMachine_Core'.


#endif   // ifndef __AVP_STATEMACHINE_CORE_H__


/// End of file. ///
