//===========================================================================//
// File:	rp4lbe4.hh                                                          //
// Project: MUNGA           Brick: Red Planet LBE Application					  //
// Contents: 																					  //
//---------------------------------------------------------------------------//
//   Date    Who  Modification                                               //
// --------  ---  ---------------------------------------------------------- //
//                                            										  //
//---------------------------------------------------------------------------//
// Copyright (C) 1994, Virtual World Entertainment, Inc.                     //
// All Rights reserved worldwide                                             //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL               //
//===========================================================================//
//
// NOTE (reconstruction): This is the SURVIVING original header, recovered
// verbatim from
//   410SRC\Telsa40\Rel410\CODE\BT\BT_L4\BTL4APP.HPP
// (the stale file-banner above -- "rp4lbe4.hh / Red Planet" -- is a
// copy-paste artifact present in the shipped source and is preserved here
// for fidelity).  btl4app.cpp is reconstructed to match this declaration
// exactly; see btl4app.cpp for the per-method @ADDR evidence.
//

#if !defined(BTL4APP_HPP)
#	define BTL4APP_HPP

#	if !defined(L4APP_HPP)
#		include <l4app.hpp>		// L4Application base (WinTesla MUNGA_L4)
#	endif
#	if !defined(APPMSG_HPP)
#		include <appmsg.hpp>	// RunMissionMessage / StopMissionMessage
#	endif

#	if !defined(BTL4MPPR_HPP)
#		include <btl4mppr.hpp>
#	endif

	//##########################################################################
	//######################    BTL4Application    ##########################
	//##########################################################################

	//##########################################################################
	//######################    RP4L4Application    ############################
	//##########################################################################

	class BTL4Application:
		public L4Application
	{
	public:
		BTL4Application(
			HINSTANCE hInstance,
			HWND hWnd,
			ResourceFile *resource_file,
			ClassID class_ID=L4ApplicationClassID,
			SharedData &shared_data=DefaultData
		);
		~BTL4Application();

		static Derivation ClassDerivations;
		static SharedData DefaultData;

	private:
		Registry*
			MakeRegistry();

		VideoRenderer*
			MakeVideoRenderer();

		AudioRenderer*
			MakeAudioRenderer();

		GaugeRenderer*
			MakeGaugeRenderer(int *secondaryIndex, int *aux1Index, int *aux2Index);

		ModeManager*
			MakeModeManager();

		ControlsManager*
			MakeControlsManager();

		Mission*
			MakeMission(
				NotationFile *notation_file,
				ResourceFile *resources
			);

		Entity*
			MakeViewpointEntity(Entity::MakeMessage *);

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	// Message Support
	//
	private:
		static const HandlerEntry MessageHandlerEntries[];

	protected:
		static MessageHandlerSet MessageHandlers;

    void
			RunMissionMessageHandler(RunMissionMessage *message);
	 void
			StopMissionMessageHandler(StopMissionMessage *message);

	};

#endif
