/*=============================================================================
	UnPlayer.h: Unreal player class.
	Copyright 1997-1999 Epic Games, Inc. All Rights Reserved.

	Revision history:
		* Created by Tim Sweeney
=============================================================================*/

/*-----------------------------------------------------------------------------
	UPlayer.
-----------------------------------------------------------------------------*/

//
// A player, the base class of UViewport (local players) and UNetConnection (remote players).
//

/*class DLL_IMPORT UInteractions : public UObject
{
};

class DLL_IMPORT UInteraction : public UInteractions
{
};*/

// x22 fix
class ENGINE_API UInteractions : public UObject
{
public:
    DECLARE_CLASS(UInteractions,UObject,0,Engine)
    NO_DEFAULT_CONSTRUCTOR(UInteractions)
};


struct UInteraction_eventNotifyMusicChange_Parms
{
};
struct UInteraction_eventNotifyLevelChange_Parms
{
};
struct UInteraction_eventInitialized_Parms
{
};
class ENGINE_API UInteraction : public UInteractions
{
public:
    BITFIELD bActive:1;
    BITFIELD bVisible:1;
    BITFIELD bRequiresTick:1;
    BITFIELD bNativeEvents:1;
    class UPlayer* ViewportOwner;
    class UInteractionMaster* Master;
    DECLARE_FUNCTION(execScreenToWorld);
    DECLARE_FUNCTION(execWorldToScreen);
    DECLARE_FUNCTION(execConsoleCommand);
    DECLARE_FUNCTION(execInitialize);
    DECLARE_CLASS(UInteraction,UInteractions,0,Engine)
    NO_DEFAULT_CONSTRUCTOR(UInteraction)
};

struct UInteractionMaster_eventNotifyLevelChange_Parms
{
    TArray<class UInteraction*> InteractionArray;
};
struct UInteractionMaster_eventProcess_Message_Parms
{
    FString Msg;
    FLOAT MsgLife;
    TArray<class UInteraction*> InteractionArray;
};
struct UInteractionMaster_eventProcess_Tick_Parms
{
    TArray<class UInteraction*> InteractionArray;
    FLOAT DeltaTime;
};
struct UInteractionMaster_eventProcess_PostRender_Parms
{
    TArray<class UInteraction*> InteractionArray;
    class UCanvas* Canvas;
};
struct UInteractionMaster_eventProcess_PreRender_Parms
{
    TArray<class UInteraction*> InteractionArray;
    class UCanvas* Canvas;
};
struct UInteractionMaster_eventProcess_KeyEvent_Parms
{
    TArray<class UInteraction*> InteractionArray;
    BYTE Key;
    BYTE Action;
    FLOAT Delta;
    BITFIELD ReturnValue;
};
struct UInteractionMaster_eventProcess_KeyType_Parms
{
    TArray<class UInteraction*> InteractionArray;
    BYTE Key;
    FString Unicode;
    BITFIELD ReturnValue;
};
struct UInteractionMaster_eventSetFocusTo_Parms
{
    class UInteraction* Inter;
    class UPlayer* ViewportOwner;
};
struct UInteractionMaster_eventRemoveInteraction_Parms
{
    class UInteraction* RemoveMe;
};
struct UInteractionMaster_eventAddInteraction_Parms
{
    FString InteractionName;
    class UPlayer* AttachTo;
    class UInteraction* ReturnValue;
};

class DLL_IMPORT UInteractionMaster : public UInteractions
{
public:
	class UClient* Client;
	class UInteraction* BaseMenu;
	class UInteraction* Console;
	TArray<class UInteraction*> GlobalInteractions;
	BITFIELD bRequireRawJoystick:1;

	virtual UBOOL Exec( const TCHAR* Cmd, FOutputDevice& Ar )=0;

      unsigned long eventProcess_KeyEvent(TArray<UInteraction *>,unsigned char &,unsigned char &,float);
      unsigned long eventProcess_KeyType(TArray<UInteraction *>,unsigned char &,class FString const &);
      void DisplayCopyright(void);
      void eventNotifyLevelChange(TArray<UInteraction *>);
      void eventProcess_Message(class FString const &,float,TArray<UInteraction *>);
      void eventProcess_PostRender(TArray<UInteraction *>,class UCanvas *);
      void eventProcess_PreRender(TArray<UInteraction *>,class UCanvas *);
      void eventProcess_Tick(TArray<UInteraction *>,float);
      void eventRemoveInteraction(class UInteraction *);
      void eventSetFocusTo(class UInteraction *,class UPlayer *);
      void execTravel(struct FFrame &,void * const);
      void MasterProcessMessage(class FString const &,float);
      void MasterProcessPostRender(class UCanvas *);
      void MasterProcessPreRender(class UCanvas *);
      void MasterProcessTick(float);

};

class ENGINE_API UPlayer : public UObject, public FOutputDevice, public FExec
{
	DECLARE_ABSTRACT_CLASS(UPlayer,UObject,CLASS_Transient|CLASS_Config,Engine)

	//FOutputDevice* vfOut;
	//FExec* vfExec;
    class APlayerController* Actor;
    class APlayerController* OldActor;
    class UConsole* Console;
    BITFIELD bWindowsMouseAvailable:1 GCC_PACK(4);
    BITFIELD bShowWindowsMouse:1;
    FLOAT WindowsMouseX GCC_PACK(4);
    FLOAT WindowsMouseY;
    INT CurrentVoiceBandwidth;
    INT CurrentNetSpeed;
    INT ConfiguredInternetSpeed;
    INT ConfiguredLanSpeed;
    BYTE SelectedCursor;
    class UInteractionMaster* InteractionMaster GCC_PACK(4);
    TArray<class UInteraction*> LocalInteractions;
    class UBaseGUIController* GUIController;
	// Constructor.
	UPlayer();

	// UObject interface.
	void Serialize( FArchive& Ar );
	void Destroy();

	// FExec interface.
	UBOOL Exec( const TCHAR* Cmd, FOutputDevice& Ar );

	// UPlayer interface.
	virtual void ReadInput( FLOAT DeltaSeconds )=0;
};

/*-----------------------------------------------------------------------------
	The End.
-----------------------------------------------------------------------------*/
