/******************************************************************************************
	CRTEST PS   (c) 1999-2001 ISL

	credits.c:			Scrolling Credits 
******************************************************************************************/


#include "global.h"
#include "overlays.h"
#include "main.h"
#include "menu.h"
#include "gametext.h"
#include "map_draw.h"
#include "credits.h"
#include "menu.h"
#include "demo.h"
#include "sound.h"
#include "options.h"
#include "dcinc.h"

#ifdef DREAMCAST
//#include "DC_TIM.h"
#undef NULL
#define NULL 0
#endif

extern char playing_ticker_enabled;

int num_credits;

#define BLNK TEXTSTR_CREDITS_BLANK_LINE		// Saves me a bit of typing..


struct {
	int drawposition;				// position to start drawing the list
	int listposition;				// position in the list
} credits;	


#ifdef DREAMCAST
int creditscolours[] =
{
	0x808040,
	0x808080,
	0,
	0x808040,
	0x808080,
	0,
	0x808040,
	0x808080,
	0,
	0x808040,		// Team leaders
	0x808080,
	0x808080,
	0,
	0x808040,		// Lead Prog
	0x808080,
	0,
	0x808040,		// Prog
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0x808040,		// Tools prog
	0x808080,
	0x808080,
	0,
	0x808040,		// Artists
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0x808040,		// Additional modelling
	0x808080,
	0,
	0x808040,		// Animation
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0x808040,	// Texture art
	0x808080,
	0,
	0x808040,	// concept
	0x808080,
	0,
	0x808040,		// Add prog
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0x808040,		// compression
	0x808080,
	0,
	0x808040,	// lighting
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0x808040,	// Music
	0x808080,
	0,
	0x808040,	// SFX
	0x808080,
	0,
	0x808040,	// Voices (74)
	0x808080,	//(75)
	0x808080,	//(76)
	0x808080,
	0x808080,
	0x808080,
	0x808080,//6 UK voices end here... (80)
	0x808080,//7 F voices end here... (81)
	0x808080,
	0x808080,//9 SP voices end here... (83)
	0x808080,
	0x808080,//11 IT voices end here... (85)
	0x808080,
	0x808080,//13 D voices end here... (87)
	0, //(88)
	0x808040,	// MD
	0x808080,
	0,
	0x808040,	// TD
	0x808080,
	0,
	0x808040,	// Special thanks
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0,
	0,
	0x808040,	// Eidos Credits
	0,
	0x808040,	// Producer
	0x808080,	// Producer name
	0,
	0x808040,	// Executive Producer
	0x808080,	// Ex producer name
	0,
	0x808040,	// Localisation
	0x808080,	// Localisation name
	0,
	0x808040,	// Printing
	0x808080,
	0,
	0x808040,	// PR
	0x808080,	// PR name
	0,
	0x808040,	// Marketing
	0x808080,	// Marketing name
	0,
	0x808040,	// Product
	0x808080,	// Product name
	0,
	0x808040,
	0x808080,
	0x808080,
	0,
	0x808040,	//QA
	0x808080,	//QA Name
	0,
	0x808040,	// Tester
	0x808080,	// Tester Name
	0,
	0,//(150)
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0x804080,	// chicken Pies
	0x804080,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0x804080,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,//(202)
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
#else
int creditscolours[] =
{
	0x808040,
	0x808080,
	0,
	0x808040,
	0x808080,
	0,
	0x808040,
	0x808080,
	0,
	0x808040,		// Team leaders
	0x808080,
	0x808080,
	0,
	0x808040,		// Lead Prog
	0x808080,
	0,
	0x808040,		// Prog
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0x808040,		// Tools prog
	0x808080,
	0x808080,
	0,
	0x808040,		// Artists
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0x808040,		// Additional modelling
	0x808080,
	0,
	0x808040,		// Animation
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0x808040,	// Texture art
	0x808080,
	0,
	0x808040,	// concept
	0x808080,
	0,
	0x808040,		// Add prog
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0x808040,		// compression
	0x808080,
	0,
	0x808040,	// lighting
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0x808040,	// Music
	0x808080,
	0,
	0x808040,	// SFX
	0x808080,
	0,
	0x808040,	// Voices (74)
	0x808080,	//(75)
	0x808080,	//(76)
	0x808080,
	0x808080,
	0x808080,
	0x808080,//6 UK voices end here... (80)
	0x808080,//7 F voices end here... (81)
	0x808080,
	0x808080,//9 SP voices end here... (83)
	0x808080,
	0x808080,//11 IT voices end here... (85)
	0x808080,
	0x808080,//13 D voices end here... (87)
	0, //(88)
	0x808040,	// MD
	0x808080,
	0,
	0x808040,	// TD
	0x808080,
	0,
	0x808040,	// Special thanks
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0x808080,
	0,
	0,
	0,
	0x808040,	// Eidos Credits
	0,
	0x808040,	// Producer
	0x808080,	// Producer name
	0,
	0x808040,	// Executive Producer
	0x808080,	// Ex producer name
	0,
	0x808040,	// Localisation
	0x808080,	// Localisation name
	0,
	0x808040,	// Printing
	0x808080,
	0,
	0x808040,	// PR
	0x808080,	// PR name
	0,
	0x808040,	// Marketing
	0x808080,	// Marketing name
	0,
	0x808040,	// Product
	0x808080,	// Product name
	0,
	0x808040,
	0x808080,
	0x808080,
	0,
	0x808040,	//QA
	0x808080,	//QA Name
	0,
	0x808040,	// Tester
	0x808080,	// Tester Name
	0,
	0,//(150)
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0x804080,	// chicken Pies
	0x804080,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0x804080,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,//(202)
	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};
#endif

#ifdef DREAMCAST
int creditlist[] = 
{
	TEXTSTR_CREDITS_DESIGNED,	//6
	TEXTSTR_CREDITS_BLITZ,		//7
	BLNK,						//8

	TEXTSTR_CREDITS_FOUNDED,	//10
	TEXTSTR_CREDITS_OLIVERS,	//11
	BLNK,						//12
	
	TEXTSTR_CREDITS_PROJECT_MANAGER,		//14
	TEXTSTR_CREDITS_NAMES_DWOOD,			//15
	BLNK,									//16
	
	TEXTSTR_CREDITS_TEAM_LEADER,			//18
	TEXTSTR_CREDITS_NAMES_DFLYNN,			//19
	TEXTSTR_CREDITS_NAMES_DMANUEL,			//20
	BLNK,									//21

	TEXTSTR_CREDITS_LEAD_PROGRAMMER,		//23
	TEXTSTR_CREDITS_NAMES_MHIGGS,			//24
	BLNK,									//25

	
	TEXTSTR_CREDITS_PROGRAMMERS,			//27
	TEXTSTR_CREDITS_NAMES_SBOND,			//41
	TEXTSTR_CREDITS_NAMES_MASH,				//41
	TEXTSTR_CREDITS_NAMES_ASLATER,			//41
	TEXTSTR_CREDITS_NAMES_FWILLIAMS,		//41
	TEXTSTR_CREDITS_NAMES_TDRUMMOND,		//28
	TEXTSTR_CREDITS_NAMES_DHARRIES,			//29
	TEXTSTR_CREDITS_NAMES_BPATERSON,		//30
	TEXTSTR_CREDITS_NAMES_CWILSON,			//31
	BLNK,									//32
									
	TEXTSTR_CREDITS_TOOLS_PROGRAMMERS,		//34
	TEXTSTR_CREDITS_NAMES_JSTEELE,			//35
	TEXTSTR_CREDITS_NAMES_CWILSON,			//36
	BLNK,									//37


	TEXTSTR_CREDITS_ARTISTS,				//51
	TEXTSTR_CREDITS_NAMES_MBEYNON,			//52
	TEXTSTR_CREDITS_NAMES_TCARTWRIGHT,		//53
	TEXTSTR_CREDITS_NAMES_DFLYNN,			//54
	TEXTSTR_CREDITS_NAMES_TKING,			//55
	TEXTSTR_CREDITS_NAMES_JWALSH,			//56
	TEXTSTR_CREDITS_NAMES_DWHITEHEAD,		//57
	BLNK,									//58
			
	TEXTSTR_CREDITS_ADDITIONAL_MODELLING,	//60
	TEXTSTR_CREDITS_NAMES_CSOUTHALL,		//61
	BLNK,									//62

	TEXTSTR_CREDITS_ANIMATION,				//64
	TEXTSTR_CREDITS_NAMES_NADAMS,			//65
	TEXTSTR_CREDITS_NAMES_TCARTWRIGHT,		//66
	TEXTSTR_CREDITS_NAMES_DMANUEL,			//67
	TEXTSTR_CREDITS_NAMES_NPETTIT,			//68
	BLNK,									//69
	
	TEXTSTR_CREDITS_TEXTURE_ART,			//71
	TEXTSTR_CREDITS_NAMES_RJONES,			//72
	BLNK,									//73

	TEXTSTR_CREDITS_ADDITIONAL_ART,			//75
	TEXTSTR_CREDITS_NAMES_SHAYES,			//76
	BLNK,									//77

	TEXTSTR_CREDITS_ADDITIONAL_PROGRAMMERS,	//39
	TEXTSTR_CREDITS_NAMES_IBIRD,			//40
	TEXTSTR_CREDITS_NAMES_SLAMB,			//42
	TEXTSTR_CREDITS_NAMES_ASIDWELL,			//43
	TEXTSTR_CREDITS_NAMES_JWHIGHAM,			//44
	TEXTSTR_CREDITS_NAMES_JSTEELE,			//35
	BLNK,				   					//46
							
	TEXTSTR_CREDITS_COMPRESSION,			//47
	TEXTSTR_CREDITS_NAMES_RHACKETT,			//48
	BLNK,									//49


	TEXTSTR_CREDITS_OLIGHTING,				//79
	TEXTSTR_CREDITS_NAMES_MBEYNON,			//84
	TEXTSTR_CREDITS_NAMES_DFLYNN,			//85
	TEXTSTR_CREDITS_NAMES_SHAYES,			//86
	TEXTSTR_CREDITS_NAMES_NMATHIAS,			//80
	TEXTSTR_CREDITS_NAMES_TKING,			//87
	TEXTSTR_CREDITS_NAMES_JWALSH,			//88
	TEXTSTR_CREDITS_NAMES_DWHITEHEAD,		//89
	BLNK,									//91

	TEXTSTR_CREDITS_MUSIC_WRITTEN,			//92			'music written by'
	TEXTSTR_CREDITS_MUSIC,			//93					'perfect audio design'
	BLNK,

	TEXTSTR_CREDITS_SOUND_EFFECTS,
	TEXTSTR_CREDITS_NAMES_RLORD,
	BLNK,

	TEXTSTR_CREDITS_VOICES,
	TEXTSTR_CREDITS_NAMES_VOICES1,
	TEXTSTR_CREDITS_NAMES_VOICES2,
	TEXTSTR_CREDITS_NAMES_VOICES3,
	TEXTSTR_CREDITS_NAMES_VOICES4,
	TEXTSTR_CREDITS_NAMES_VOICES5,
	TEXTSTR_CREDITS_NAMES_VOICES6,
	TEXTSTR_CREDITS_NAMES_VOICES7,
	TEXTSTR_CREDITS_NAMES_VOICES8,
	TEXTSTR_CREDITS_NAMES_VOICES9,
	TEXTSTR_CREDITS_NAMES_VOICES10,
	TEXTSTR_CREDITS_NAMES_VOICES11,
	TEXTSTR_CREDITS_NAMES_VOICES12,
	TEXTSTR_CREDITS_NAMES_VOICES13,
	BLNK,

	TEXTSTR_CREDITS_MANAGING_DIRECTOR,
	TEXTSTR_CREDITS_NAMES_POLIVER,
	BLNK,

	TEXTSTR_CREDITS_TECHNICAL_DIRECTOR,
	TEXTSTR_CREDITS_NAMES_AOLIVER,
	BLNK,

	TEXTSTR_CREDITS_THANKS_TO,
	TEXTSTR_CREDITS_NAMES_IWAKEFIELD,
	TEXTSTR_CREDITS_NAMES_DWILSONNUNN,
	TEXTSTR_CREDITS_NAMES_CTHALMANN,		//110
	TEXTSTR_CREDITS_NAMES_JHINTON,
	TEXTSTR_CREDITS_NAMES_TSMALL,
	TEXTSTR_CREDITS_NAMES_SPECIAL1,
	TEXTSTR_CREDITS_NAMES_LPRICE,
	TEXTSTR_CREDITS_NAMES_NDAVIES,
	TEXTSTR_CREDITS_NAMES_STHORBURN,
	TEXTSTR_CREDITS_NAMES_RSMYTHE,
	TEXTSTR_CREDITS_NAMES_APARKER,
	TEXTSTR_CREDITS_NAMES_CHART,
	TEXTSTR_CREDITS_NAMES_JPINNOCK,
	TEXTSTR_CREDITS_NAMES_JLYONS,
	TEXTSTR_CREDITS_NAMES_GHERBERT,
	TEXTSTR_CREDITS_NAMES_NRANDALL,
	TEXTSTR_CREDITS_NAMES_LARD,
	TEXTSTR_CREDITS_NAMES_REDBULL,
	BLNK,
	BLNK,
	BLNK,

	TEXTSTR_CREDITS_NAMES_EIDOS,			// Eidos Credits
	BLNK,

	TEXTSTR_CREDITS_EIDOS_PRODUCER,
	TEXTSTR_CREDITS_EIDOS_PRODUCERNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_EXPRODUCER,
	TEXTSTR_CREDITS_EIDOS_EXPRODUCERNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_LOCALISATION,
	TEXTSTR_CREDITS_EIDOS_LOCALISATIONNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_PRINTING,
	TEXTSTR_CREDITS_EIDOS_PRINTINGNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_PR,
	TEXTSTR_CREDITS_EIDOS_PRNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_MARKETING,
	TEXTSTR_CREDITS_EIDOS_MARKETINGNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_PRODUCT,
	TEXTSTR_CREDITS_EIDOS_PRODUCTNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_CREATIVE,
	TEXTSTR_CREDITS_EIDOS_CREATIVENAME,
	TEXTSTR_CREDITS_EIDOS_CREATIVENAME2,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_QA,
	TEXTSTR_CREDITS_EIDOS_QANAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_TESTER,
	TEXTSTR_CREDITS_EIDOS_TESTERNAME,
	BLNK,

	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,

	TEXTSTR_CREDITS_PIES,
	TEXTSTR_CREDITS_PIES2,				
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,

	TEXTSTR_CREDITS_PIES3,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,
	NULL
};
#else
int creditlist[] = 
{
	TEXTSTR_CREDITS_DESIGNED,	//6
	TEXTSTR_CREDITS_BLITZ,		//7
	BLNK,						//8

	TEXTSTR_CREDITS_FOUNDED,	//10
	TEXTSTR_CREDITS_OLIVERS,	//11
	BLNK,						//12
	
	TEXTSTR_CREDITS_PROJECT_MANAGER,		//14
	TEXTSTR_CREDITS_NAMES_DWOOD,			//15
	BLNK,									//16
	
	TEXTSTR_CREDITS_TEAM_LEADER,			//18
	TEXTSTR_CREDITS_NAMES_DFLYNN,			//19
	TEXTSTR_CREDITS_NAMES_DMANUEL,			//20
	BLNK,									//21

	TEXTSTR_CREDITS_LEAD_PROGRAMMER,		//23
	TEXTSTR_CREDITS_NAMES_FWILLIAMS,		//24
	BLNK,									//25

	
	TEXTSTR_CREDITS_PROGRAMMERS,			//27
	TEXTSTR_CREDITS_NAMES_TDRUMMOND,		//28
	TEXTSTR_CREDITS_NAMES_DHARRIES,			//29
	TEXTSTR_CREDITS_NAMES_BPATERSON,		//30
	TEXTSTR_CREDITS_NAMES_CWILSON,			//31
	BLNK,									//32
									
	TEXTSTR_CREDITS_TOOLS_PROGRAMMERS,		//34
	TEXTSTR_CREDITS_NAMES_JSTEELE,			//35
	TEXTSTR_CREDITS_NAMES_CWILSON,			//36
	BLNK,									//37


	TEXTSTR_CREDITS_ARTISTS,				//51
	TEXTSTR_CREDITS_NAMES_MBEYNON,			//52
	TEXTSTR_CREDITS_NAMES_TCARTWRIGHT,		//53
	TEXTSTR_CREDITS_NAMES_DFLYNN,			//54
	TEXTSTR_CREDITS_NAMES_TKING,			//55
	TEXTSTR_CREDITS_NAMES_JWALSH,			//56
	TEXTSTR_CREDITS_NAMES_DWHITEHEAD,		//57
	BLNK,									//58
			
	TEXTSTR_CREDITS_ADDITIONAL_MODELLING,	//60
	TEXTSTR_CREDITS_NAMES_CSOUTHALL,		//61
	BLNK,									//62

	TEXTSTR_CREDITS_ANIMATION,				//64
	TEXTSTR_CREDITS_NAMES_NADAMS,			//65
	TEXTSTR_CREDITS_NAMES_TCARTWRIGHT,		//66
	TEXTSTR_CREDITS_NAMES_DMANUEL,			//67
	TEXTSTR_CREDITS_NAMES_NPETTIT,			//68
	BLNK,									//69
	
	TEXTSTR_CREDITS_TEXTURE_ART,			//71
	TEXTSTR_CREDITS_NAMES_RJONES,			//72
	BLNK,									//73

	TEXTSTR_CREDITS_ADDITIONAL_ART,			//75
	TEXTSTR_CREDITS_NAMES_SHAYES,			//76
	BLNK,									//77

	TEXTSTR_CREDITS_ADDITIONAL_PROGRAMMERS,	//39
	TEXTSTR_CREDITS_NAMES_IBIRD,			//40
	TEXTSTR_CREDITS_NAMES_SBOND,			//41
	TEXTSTR_CREDITS_NAMES_SLAMB,			//42
	TEXTSTR_CREDITS_NAMES_ASIDWELL,			//43
	TEXTSTR_CREDITS_NAMES_JWHIGHAM,			//44
	BLNK,									//46
							
	TEXTSTR_CREDITS_COMPRESSION,			//47
	TEXTSTR_CREDITS_NAMES_RHACKETT,			//48
	BLNK,									//49


	TEXTSTR_CREDITS_OLIGHTING,				//79
	TEXTSTR_CREDITS_NAMES_MBEYNON,			//84
	TEXTSTR_CREDITS_NAMES_DFLYNN,			//85
	TEXTSTR_CREDITS_NAMES_SHAYES,			//86
	TEXTSTR_CREDITS_NAMES_NMATHIAS,			//80
	TEXTSTR_CREDITS_NAMES_TKING,			//87
	TEXTSTR_CREDITS_NAMES_JWALSH,			//88
	TEXTSTR_CREDITS_NAMES_DWHITEHEAD,		//89
	BLNK,									//91

	TEXTSTR_CREDITS_MUSIC_WRITTEN,			//92			'music written by'
	TEXTSTR_CREDITS_MUSIC,			//93					'perfect audio design'
	BLNK,

	TEXTSTR_CREDITS_SOUND_EFFECTS,
	TEXTSTR_CREDITS_NAMES_RLORD,
	BLNK,

	TEXTSTR_CREDITS_VOICES,
	TEXTSTR_CREDITS_NAMES_VOICES1,
	TEXTSTR_CREDITS_NAMES_VOICES2,
	TEXTSTR_CREDITS_NAMES_VOICES3,
	TEXTSTR_CREDITS_NAMES_VOICES4,
	TEXTSTR_CREDITS_NAMES_VOICES5,
	TEXTSTR_CREDITS_NAMES_VOICES6,
	TEXTSTR_CREDITS_NAMES_VOICES7,
	TEXTSTR_CREDITS_NAMES_VOICES8,
	TEXTSTR_CREDITS_NAMES_VOICES9,
	TEXTSTR_CREDITS_NAMES_VOICES10,
	TEXTSTR_CREDITS_NAMES_VOICES11,
	TEXTSTR_CREDITS_NAMES_VOICES12,
	TEXTSTR_CREDITS_NAMES_VOICES13,
	BLNK,

	TEXTSTR_CREDITS_MANAGING_DIRECTOR,
	TEXTSTR_CREDITS_NAMES_POLIVER,
	BLNK,

	TEXTSTR_CREDITS_TECHNICAL_DIRECTOR,
	TEXTSTR_CREDITS_NAMES_AOLIVER,
	BLNK,

	TEXTSTR_CREDITS_THANKS_TO,
	TEXTSTR_CREDITS_NAMES_IWAKEFIELD,
	TEXTSTR_CREDITS_NAMES_DWILSONNUNN,
	TEXTSTR_CREDITS_NAMES_CTHALMANN,		//110
	TEXTSTR_CREDITS_NAMES_JHINTON,
	TEXTSTR_CREDITS_NAMES_TSMALL,
	TEXTSTR_CREDITS_NAMES_SPECIAL1,
	TEXTSTR_CREDITS_NAMES_LPRICE,
	TEXTSTR_CREDITS_NAMES_NDAVIES,
	TEXTSTR_CREDITS_NAMES_STHORBURN,
	TEXTSTR_CREDITS_NAMES_RSMYTHE,
	TEXTSTR_CREDITS_NAMES_APARKER,
	TEXTSTR_CREDITS_NAMES_CHART,
	TEXTSTR_CREDITS_NAMES_JPINNOCK,
	TEXTSTR_CREDITS_NAMES_JLYONS,
	TEXTSTR_CREDITS_NAMES_GHERBERT,
	TEXTSTR_CREDITS_NAMES_NRANDALL,
	TEXTSTR_CREDITS_NAMES_LARD,
	TEXTSTR_CREDITS_NAMES_REDBULL,
	BLNK,
	BLNK,
	BLNK,

	TEXTSTR_CREDITS_NAMES_EIDOS,			// Eidos Credits
	BLNK,

	TEXTSTR_CREDITS_EIDOS_PRODUCER,
	TEXTSTR_CREDITS_EIDOS_PRODUCERNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_EXPRODUCER,
	TEXTSTR_CREDITS_EIDOS_EXPRODUCERNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_LOCALISATION,
	TEXTSTR_CREDITS_EIDOS_LOCALISATIONNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_PRINTING,
	TEXTSTR_CREDITS_EIDOS_PRINTINGNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_PR,
	TEXTSTR_CREDITS_EIDOS_PRNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_MARKETING,
	TEXTSTR_CREDITS_EIDOS_MARKETINGNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_PRODUCT,
	TEXTSTR_CREDITS_EIDOS_PRODUCTNAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_CREATIVE,
	TEXTSTR_CREDITS_EIDOS_CREATIVENAME,
	TEXTSTR_CREDITS_EIDOS_CREATIVENAME2,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_QA,
	TEXTSTR_CREDITS_EIDOS_QANAME,
	BLNK,

	TEXTSTR_CREDITS_EIDOS_TESTER,
	TEXTSTR_CREDITS_EIDOS_TESTERNAME,
	BLNK,

	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,

	TEXTSTR_CREDITS_PIES,
	TEXTSTR_CREDITS_PIES2,				
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,

	TEXTSTR_CREDITS_PIES3,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,
	BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,BLNK,
	NULL
};
#endif

#ifdef DREAMCAST
TIM_HEADER *creditsImg=NULL;
#endif

// Font is 12 pixels high


/*--------------------------------------------------------------------------
	   Function : void creditsDraw(void)
	Description : Draw the credits
	 Parameters :  
	    Returns :  
	       Info : 
--------------------------------------------------------------------------*/

void creditsDraw(void)
{
	int i;

	for(i=credits.listposition;i<credits.listposition+23;i++)
		fontPrintCentred(font,0,credits.drawposition+((i-credits.listposition)*18),TEXTSTR(creditlist[i]),(creditscolours[i]>>16) & 0xff,(creditscolours[i]>>8) & 0xff,creditscolours[i] & 0xff);

#ifdef DREAMCAST
	dcTim_Draw(0, 0, 639, 479, creditsImg);
#else
	drawBGTim();
#endif
}





/*--------------------------------------------------------------------------
	   Function : void creditsCycle(void)
	Description : 
	 Parameters :  
	    Returns :  
	       Info : 
--------------------------------------------------------------------------*/

void creditsCycle(void)
{
	credits.drawposition--;
		
	if(credits.drawposition<-273)
	{
		credits.drawposition=-256;
		credits.listposition++;
	}

	if(credits.listposition==num_credits-9)
		creditsEnd();

#ifndef DREAMCAST
	if(pReadPad->debounce[0] & (PAD_TRIANGLE + PAD_SQUARE + PAD_CROSS + PAD_CIRCLE + PAD_START + PAD_SELECT + PAD_R1 + PAD_R2 + PAD_L1 + PAD_L2))
		creditsEnd();
#endif
}





/*--------------------------------------------------------------------------
	   Function : void creditsStart(void)
	Description : 
	 Parameters :  
	    Returns :  
	       Info : 
--------------------------------------------------------------------------*/

void creditsStart(void)
{
	playing_ticker_enabled = 0;

	overlayLoadingBegin(1);
	creditsLoad();
	overlayLoadingEnd();

	draw_routine = creditsDraw;
	cycle_routine = creditsCycle;

	credits.listposition = 0;					
	credits.drawposition = 150;
	creditsInitListForOtherLangs();
}






/*--------------------------------------------------------------------------
	   Function : void creditsLoad(void)
	Description : 
	 Parameters :  
	    Returns :  
	       Info : 
--------------------------------------------------------------------------*/

void creditsLoad(void)
{
	ULONG *tim;

#ifdef DREAMCAST
	sound_XA_PauseForLoading();
	overlayLoadingBegin(1);
	dcTim_Load(&creditsImg, "FRONTEND\\SPLASH\\ACT1.TIM");
	sound_XA_Resume(-1);
#else

	overlayLoadingBegin(1);
	sound_XA_PauseForLoading();	// Okay, who commented this line out recently? RFW 28-Sep-00

	tim=(ULONG *)fileLoad("FRONTEND\\SPLASH\\ACT1.TIM",0);

	overlayLoadingEnd();

	sound_XA_Resume(TUNE_1_INTRO);

	uploadTimToVRAM(tim);
	
	FREE(tim);
#endif
}





/*--------------------------------------------------------------------------
	   Function : void creditsEnd(void)
	Description : 
	 Parameters :  
	    Returns :  
	       Info : 
--------------------------------------------------------------------------*/

void creditsEnd(void)
{
	playing_ticker_enabled = 1;

#ifdef DREAMCAST
	dcTim_Unload(&creditsImg);
#endif
	optionsStart(OPTIONS_DIARY_START);
}


void creditsInitListForOtherLangs(void)
{
	int i;

	switch(gameTextLang)
	{
	case LANG_D:
#ifdef DREAMCAST
		num_credits = 179;
#else
		num_credits = 174;
#endif
		break;
	case LANG_F:
#ifdef DREAMCAST
		num_credits = 173;
		for(i=87;i<	200;i++)
#else
		num_credits = 168;
		for(i=82;i<	200;i++)
#endif
		{
			creditscolours[i] = creditscolours[i+6];
			creditlist[i] = creditlist[i+6];
		}
		break;
	case LANG_SP:
#ifdef DREAMCAST
		num_credits = 175;
		for(i=89;i<200;i++)
#else
		num_credits = 170;
		for(i=84;i<200;i++)
#endif
		{
			creditscolours[i] = creditscolours[i+4];
			creditlist[i] = creditlist[i+4];
		}
		break;
	case LANG_IT:
#ifdef DREAMCAST
		num_credits = 177;
		for(i=91;i<200;i++)
#else
		num_credits = 172;
		for(i=86;i<200;i++)
#endif
		{
			creditscolours[i] = creditscolours[i+2];
			creditlist[i] = creditlist[i+2];
		}
		break;
	case LANG_UK:
#ifdef DREAMCAST
	case LANG_US:
		num_credits = 172;
		for(i=86;i<200;i++)
#else
		num_credits = 167;
		for(i=81;i<200;i++)
#endif
		{
			creditscolours[i] = creditscolours[i+7];
			creditlist[i] = creditlist[i+7];
		}
		break;
	}
}

