/********************
	kn_race.h
 ********************/
#ifndef _KN_RACE_H_
#define _KN_RACE_H_

/*******************************************************
	DEFINE
*******************************************************/
/* --- ドルフィンパークのメッセージ --- */
#define MAX_NUM_PARK_MESG		11
#if (SW_KN_LANGUAGE == KN_EU)
	#define MAX_NUM_PARK_GMESG_NUM		5
#else
	#define MAX_NUM_PARK_GMESG_NUM		3
#endif
typedef struct {
	int		flag;
	int		numUnit;
	int		width;
    int		sx[MAX_NUM_PARK_GMESG_NUM];
	int		gmesgNum[MAX_NUM_PARK_GMESG_NUM];
} sParkMesg;
#define SX_PARK_MESSAGE_WINDOW	(DISPLAY_X1+14)
#define SY_PARK_MESSAGE_WINDOW	(DISPLAY_Y2-2 - 20)
#define WD_PARK_MESSAGE_WINDOW	(276)
#define HT_PARK_MESSAGE_WINDOW	(20)
#define SX_START_PARK_MESG	(SX_PARK_MESSAGE_WINDOW+WD_PARK_MESSAGE_WINDOW-8)
#define VX_PARK_MESG	2
/* ドルフィンパークのメッセージの状態 */
#define PARK_MESG_SEQ_WAIT		0
#define PARK_MESG_SEQ_REQ		1
#define PARK_MESG_SEQ_DISP_WAIT	2
/* メッセージを出すタイミング */
#define PARK_MESG_REQ_COUNT		100
/* 複数あるメッセージの表示間隔 */
#define DX_PARK_MESG			1

/* シグナルスタート時間 */
#define RACE_SIGNAL_START_COUNT		50
#define RACE_SIGNAL_START_COUNT_2P	46

/* フィニッシュからフェードアウトまでの時間 */
#define RACE_FINISH_FADE_COUNT_GUTS1	130
#define RACE_FINISH_FADE_COUNT_GUTS2	140
#define RACE_FINISH_FADE_COUNT_GUTS3	100
#define RACE_FINISH_FADE_COUNT_GUTS4	120
#define RACE_FINISH_FADE_COUNT_GUTS5	110
#define RACE_FINISH_FADE_COUNT_GUTS6	100

/* ウィニングラン */
#define RACE_WINNING_RUN_COUNT			200		/* 10[sec] */
/* フィニッシュ後のウィニングランの待ち時間 */
#define RACE2FINISH_WAIT_COUNT		1200

/* デモランキング */
#define DEMO_RANKING_SEQ_START_WAIT	0
#define DEMO_RANKING_SEQ_IN		1
#define DEMO_RANKING_SEQ_STOP		2
#define DEMO_RANKING_SEQ_OUT		3
#define DEMO_RANKING_SEQ_TOTAL_WAIT	4
#define DEMO_RANKING_SEQ_TOTAL_IN	5
#define DEMO_RANKING_SEQ_TOTAL_STOP	6
#define DEMO_RANKING_SEQ_TOTAL_EXIT	7

/* スクリーンの幅 */
#define DEMORUN_SCR_WD			265
/* 初期位置 */
#define DEMORUN_SCR_INIT_RX		320
#define DEMORUN_SCR_INIT_LX		(0 - DEMORUN_SCR_WD)
/* 静止位置 */
#define DEMORUN_SCR_STOP_RX		20
/* 移動速度 */
#define DEMORUN_SCR_VX			40
#define DEMORUN_SCR_TOTAL_VX		60
/* ボタンを押してから次に行くまでのウェイト */
#define DEMORUN_NEXT_SEQ_WAIT_COUNT	30

/*******************************************************************************
	VARIABLE
*******************************************************************************/

/*******************************************************************************
	FUNCTION
*******************************************************************************/
extern Gfx 	*makeMainGlistRace( Gfx *gp );
extern Gfx 	*makeMainGlistRace2End( Gfx *gp );
extern void moveMainRace( void );
extern void moveMainRace2End( void );

#endif
