// BOSSTUI.CPP
//
// Copyright (c) 1998 Symbian Ltd.  All rights reserved.
//

#include <e32cons.h>

CConsoleBase* console;

void DriveEngineL();
void SetupConsoleL();

GLDEF_C TInt E32Main() // main function called by E32
    {
	_LIT(KBossTextUiError,"BossTextUi"); // constant declaration
	CTrapCleanup* cleanup=CTrapCleanup::New(); // get clean-up stack
	TRAPD(error,SetupConsoleL()); // more initialization, then do example
	__ASSERT_ALWAYS(!error,User::Panic(KBossTextUiError,error));
	delete cleanup; // destroy clean-up stack
	return 0; // and return
    }

void SetupConsoleL() // initialize and call example code under cleanup stack
    {
	//constant declarations
	_LIT(KBossPuzzleTextUI,"Boss Puzzle Text UI");
	_LIT(KFailedLeaveCode,"failed: leave code=%d");
	_LIT(KTextOK,"ok");
	_LIT(KPressAnyKey," [press any key]");

	// setup console code
	console=Console::NewL(KBossPuzzleTextUI,
		TSize(KDefaultConsWidth,KDefaultConsHeight));
	CleanupStack::PushL(console);
	TRAPD(error,DriveEngineL()); // perform example function
	if (error) console->Printf(KFailedLeaveCode, error);
	else console->Printf(KTextOK);
	console->Printf(KPressAnyKey);
	console->Getch(); // get and ignore character
	CleanupStack::PopAndDestroy(); // close console
    }

/*
	ok, real stuff starts here
*/

void DriveEngineL()
	{
	}
