//===========================================================================//
// File:	AnimationState.cpp											
//---------------------------------------------------------------------------//
//   Date    Who  Modification                                               //
// --------  ---  ---------------------------------------------------------- //
// 02/23/999  JSE  Inital coding
//---------------------------------------------------------------------------//
// Copyright (C) 1998, Microsoft Corp.										 //
// All Rights reserved worldwide                                             //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL               //
//===========================================================================//

#include "MW4Headers.hpp"
#include "Airplane.hpp"
#include "AirplaneAnimationStateEngine.hpp"


//#############################################################################
//##########################    AirplaneAnimationState    #####################
//#############################################################################


AirplaneAnimationStateEngine::ClassData*
	AirplaneAnimationStateEngine::DefaultData = NULL;

const StateEngine::StateEntry
	AirplaneAnimationStateEngine::StateEntries[]=
{
	STATE_ENTRY(AirplaneAnimationStateEngine, Idle),
	STATE_ENTRY(AirplaneAnimationStateEngine, TakeOff),
	STATE_ENTRY(AirplaneAnimationStateEngine, EndTakeOff)
};

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
	AirplaneAnimationStateEngine::InitializeClass()
{
	Check_Object(AnimationStateEngine::DefaultData);
	Verify(!DefaultData);
	DefaultData =
		new ClassData(
			AirplaneAnimationStateEngineClassID,
			"AirplaneAnimationStateEngine",
			AnimationStateEngine::DefaultData,
			ELEMENTS(StateEntries),
			StateEntries,
			NULL,
			NULL
		);
	Register_Object(DefaultData);
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
	AirplaneAnimationStateEngine::TerminateClass()
{
	Unregister_Object(DefaultData);
	delete DefaultData;
	DefaultData = NULL;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
AirplaneAnimationStateEngine*
	AirplaneAnimationStateEngine::Make(Vehicle *vehicle, const FactoryRequest *request)
{
	Check_Object(request);
	Check_Object(vehicle);
	gos_PushCurrentHeap(Heap);
	AirplaneAnimationStateEngine* engine = new AirplaneAnimationStateEngine(vehicle, DefaultData, request);
	gos_PopCurrentHeap();
	return engine;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
	AirplaneAnimationStateEngine::Save(FactoryRequest *request)
{
	Check_Object(this);
	Check_Object(request);
	
	AnimationStateEngine::Save(request);


}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
void
	AirplaneAnimationStateEngine::Reuse(const FactoryRequest *request)
{
	Check_Object(this);
	Check_Object(request);

	AnimationStateEngine::Reuse(request);

}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
AirplaneAnimationStateEngine::AirplaneAnimationStateEngine(
	Vehicle *vehicle,
	ClassData *class_data,
	const FactoryRequest *request
):
	AnimationStateEngine(vehicle, class_data, request)
{

}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//

AirplaneAnimationStateEngine::~AirplaneAnimationStateEngine()
{

}

//#############################################################################
//##########################    AnimationStateEngine    #######################
//#############################################################################

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//

void
	AirplaneAnimationStateEngine::TestClass()
{
	Verify(IsDerivedFrom(DefaultData));
}

