//---------------------------------------------------------------------------
// FILE  : Ass1Main.h
// AUTOR : Aymeric
// DATE  : 05/02/2004
//---------------------------------------------------------------------------

#ifndef Ass1MainH
#define Ass1MainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "HSClass.h"
#include "DragAndDrop.h"
#include "Transition.h"
#include "RandomClass.h"
#include "AutoCursor.h"

//---------------------------------------------------------------------------
class TForm1 : public TForm
{

__published:	// IDE-managed Components
		void __fastcall FormDestroy(TObject *Sender);
		void __fastcall FormCreate(TObject *Sender);
        void __fastcall FormPaint(TObject *Sender);
		void __fastcall FormMouseDown(TObject *Sender, TMouseButton Button,	TShiftState Shift, int X, int Y);
		void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift, int X, int Y);
		void __fastcall FormMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
        void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);

private:	// User declarations
		THotSpotList *PlanetsHSList;	// Planets HotSpot List
		THotSpotList *OrbitsHSList; 	// Orbits HotSpot List
		THotSpotList *PlayHSList;		// Main Screen Hotspot List
		TDragAndDrop *Drag;
		bool PlayBG; 					// true when we have the main screen
		bool PlanetsBG;					// true when we have the screen of planets
        bool NewGame;					// true when we start a new game
        bool Normal;					// true when we are in the Normal Mode
        TPoint mBlitPos;
        TPoint *mBlitPosDrag;			// Remember position of dropped blits
		int TotalGood;					// number of right answers
		int mDragPHSNum;
		int mPrevPlanetsHS;				// Keep a record of the last visited hot spot
		int mPrevPlayHS;				// Keep a record of the last visited hot spot
        int idPlanet;					// the numero of the planet which must move
        int nbError;					// number of errors
		enum {Opaque, Transparent};		// Use for blit function
		Graphics::TBitmap *Intro;
		TTransition *Tx,*Tx2;
        time_t t;						// USe to initialize the random function
        TAutoCursor  *Auto;
        TRandom *Random;

public:		// User declarations
		__fastcall TForm1(TComponent* Owner);
        int MyRand(int max);			// Random function. Out : a number between 0 and max
        void autoHelp();				// Launch the auto help
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif


