typedef struct tagLEVINFO
{
	char sLevelName[16];
	char sWorldFile[32];
	char sCollFile[32];
}LEVINFO;

extern UBYTE world;

extern char *WorldDirectoryNames[];	// directory name strings[] ("HUB","ATLANTIS"....) indexxed via "world"
extern char *sAbbrevNames[];
extern char *sSubLevelDirNames[];
extern char *sSubLevelNames[];

int menuCarouselDemo(int startframe, int nframes, int button_quits);
void menuSoundSelect(void);

extern LEVINFO levInfo[];

extern TIMETRIALDATA timeTrialData[];
typedef struct tagMENUITEM
{
	char sText[32];
	int flags;
	int hx,hy;
	int x,y;
	int lx, ly;
}MENUITEM;


typedef	struct	_MENUCTRL
{
	long	soundVol;
	long	musicVol;
	long	difficulty;
	long	language;
	long	controls;
}MENUCTRL;


extern	MENUCTRL menuCtrl;

enum{
	HUB,	
	ATLANTIS,
	CARNIVAL,
	PIRATES,	 
	PREHISTORIC,
	FORTRESS,  	 
	SPACE,
	GENERIC
};


enum{
	L1,
	L2,
	L3,
	BOSS,
	BONUS
};


enum{
	TESTMESH,
	HUB1,		//0	
	HUB2,		//1 
	HUB3,		//2 
	HUB4,		//3 
	HUB5,		//4 
	HUB6,		//5 
	HUB7,		//6 
	HUB8,		//7  

	CAVE,		//8
	ACOURSE,	//9

	ATLANTIS1,//10 
	ATLANTIS2,//11
	ATLANTIS3,//12
	ATLANTISBOSS,	//13
	ATLANTISBONUS,//14

	CARNIVAL1, 	//15
	CARNIVAL2,	//16
	CARNIVAL3,	//17
	CARNIVALBOSS,	//18
	CARNIVALBONUS,//19

	PIRATES1,	  	//20
	PIRATES2,  	//21
	PIRATES3,  	//22
	PIRATESBOSS,	//23
	PIRATESBONUS,	//24

	PREHISTORIC1, //25
	PREHISTORIC2, //26
	PREHISTORIC3, //27
	PREHISTORICBOSS,	//28
	PREHISTORICBONUS,	//29

	FEAR1,  		//30
	FEAR2,  		//31
	FEAR3, 		//32
	FEARBOSS, 	//33
	FEARBONUS,	//34

	SPACE2A,		//35
	SPACE2B,		//36
	SPACE3,		//37
	SPACEBOSS1, 	//38
	SPACEBOSS2, 	//39
	SPACEBONUS, 	//40

	WAYROOM,	  	//41
	WAYROOM2,	  	//41
	WAYROOM3,	  	//41
	WAYROOM4,	  	//41
	WAYROOM5,	  	//41
	ATTEST,
	CATEST,
	PITEST,
	PREHISTORICTEST,
	FEARTEST,
	SPACETEST,
	INTRO,	  	//42
	NUM_LEVELS};

#define TITLE 255

extern UBYTE controlConfig;
extern int fader,fadeout,fadein;
void menuSpinHub(void);
void menuShowLoadingScreen(void);
ULONG menuMainMenu(void);
int menuShowMe(int);

UBYTE language;

extern char *levelNames[];

void	newFrontEnd(void);
void	soundSetup(void);
void	centerScreen(void);
void	controlsScreen(void);
void	languageScreen(int restart_music);
void	timeTrialScreen(void);
void	hiScoreScreen(void);
void menuMusicSelect(void);
void menuInitHiScores(void);
void MenuDrawFade();

#define MenuFadeIn() {fadein=1;fadeout=0;fader=0;sfxvolume=50;sfxPlay(globalFX,SFX_CAST_SPELL_4);sfxvolume=volume;}
#define MenuFadeOut() {fadein=0;fadeout=1;fader=32;sfxvolume=50;sfxPlay(globalFX,SFX_CAST_SPELL_5);sfxvolume=volume;}
void	tipDisplay(void);
void ShowCredits();
void	CheatMenu(void);
void ShowHintText();
int	EnterName(char  *str,int firstTime);
void	bestTimesScreen(void);
void GameOverScreen(int score);

void pauseSetConfirmText();

extern char hiScoreNames[6][4];
extern int hiScoreValues[];
extern UBYTE cheatMenuOn; 
extern UBYTE noHintText;

void	tipBegin(void);
void	tipEnd(void);

void	Load_And_Init_Tips(void);

void	Free_Tips();

int menuLevelSelect(void);
void menuGetTimerString(int time, char *sTime);
int menuShowStats(GameInfoType *pGameInfo, HiScoreType *pHiScores, HiScoreType *pTheseScores);

void menuPrintBack(int zoom);
void menuPrintBackStatic();

extern int infoTextScale;
extern	char *sLevelNames[];
extern NEWMODEL *fadeStar;

#define MENUSELECT(P) ((debounce[P]&PAD_CROSS)||(debounce[P]&PAD_START))

extern UBYTE *tipaddr;

void menuShowScreen(char *name);

//||(debounce[P]&PAD_L3)
