/*
	コースセレクト時に転送  
*/
#include	<ultra64.h>
#include	"../../ot_system.h"
#include	"../../kn_memory.h"
#include	"../../kn_def.h"
#include	"../../kn_course.h"

#include "couse_sw_a.tex"
#include "couse_sw_b.tex"

/* 日本語メッセージ */
#include "jf_course_select18.tex"
#include "jf_bestscore8.tex"

#include "jf_csel_handi.tex"
#include "jf_csel_on.tex"
#include "jf_csel_off.tex"
#include "jf_texJfSinMe3_1.tex"
#include "sin_yomenai.tex"

static Vp vp = {
	SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0,	/* scale */
	SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0,	/* translate */
};

/* =========================================================================*/
/*
	ディスプレイリスト
*/
Gfx dlInitCourseBlackBox[] = {
	/***********************************************************************
	 	Setting RSP
	************************************************************************/
	gsSPClearGeometryMode( 0xffffffff ),
	gsSPViewport( &vp ),
	gsSPTexture( 0, 0, 0, 0, G_OFF ),
	/***********************************************************************
	 	Setting RDP
	************************************************************************/
	gsDPPipeSync(),
	gsDPSetCycleType( G_CYC_FILL ),
	gsDPSetCombineMode( G_CC_DECALRGBA, G_CC_DECALRGBA ),
	gsDPSetRenderMode( G_RM_NOOP, G_RM_NOOP2 ),
	gsDPSetAlphaCompare( G_AC_NONE ),
   	gsDPSetFillColor( GPACK_RGBA5551(0, 0, 0, 1) << 16 | GPACK_RGBA5551(0, 0, 0, 1) ),
	/***********************************************************************
	 	END
	************************************************************************/
	gsSPEndDisplayList()
};

/* ======================================================================= */
/*
	ＢＧ
*/
Gfx dlCourseClearZB[] = {
	gsSPViewport( &vp ),
	gsSPClearGeometryMode( 0xffffffff ),
	gsSPSetGeometryMode( G_SHADE ),
    gsSPTexture( 0, 0, 0, 0, G_OFF ),
    gsDPPipeSync( ),
    gsDPSetCycleType( G_CYC_FILL ),
	gsDPSetCombineMode( G_CC_SHADE, G_CC_SHADE ),
	gsDPSetRenderMode( G_RM_OPA_SURF, G_RM_OPA_SURF2 ),
    gsDPSetDepthImage( OS_K0_TO_PHYSICAL((ushort *)Z_BUFFER) ),
    gsDPSetColorImage( G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WD,
				    OS_K0_TO_PHYSICAL((ushort *)Z_BUFFER) ),
    gsDPSetFillColor( (GPACK_ZDZ(G_MAXFBZ,0) << 16 | GPACK_ZDZ(G_MAXFBZ,0)) ),
    gsDPFillRectangle( DISPLAY_X1+SX_COURSE_CMAP, DISPLAY_Y1+SY_COURSE_CMAP,
					   DISPLAY_X1+SX_COURSE_CMAP+WD_COURSE_CMAP-1,
					   DISPLAY_Y1+SY_COURSE_CMAP+HT_COURSE_CMAP-1 ),

	gsSPEndDisplayList()
};
/* ======================================================================= */
