#include<ultra64.h>

extern Vtx buoy_light_r_v[];
extern Vtx buoy_light_r_vmcur[];
extern Tri buoy_light_r_tri[];
extern Lights1 buoy_light_r_material[];
extern Mtx buoy_light_r_matrix[];

extern unsigned short beach_br_txt[];
extern unsigned short check_f1_txt[];
extern unsigned short check_f2_txt[];
extern unsigned short cross1_txt[];
extern unsigned short dokan_1_txt[];
extern unsigned short goal_f1_txt[];
extern unsigned short goal_f2_txt[];
extern unsigned short green1_2_txt[];
extern unsigned short green_d_txt[];
extern unsigned short pole1_txt[];
extern unsigned short pole2_txt[];
extern unsigned short rock_1_2_txt[];
extern unsigned short rock_2_2_txt[];
extern unsigned short rock_3_txt[];
extern unsigned short rock_4_2_txt[];
extern unsigned short roof_gr1_txt[];
extern unsigned short roof_gr2_txt[];
extern unsigned short sabitetu1_txt[];
extern unsigned short saku1_txt[];
extern unsigned short start_f1_txt[];
extern unsigned short start_f2_txt[];
extern unsigned short tree1_txt[];
extern unsigned short tube_l1_2_txt[];
extern unsigned short tube_light1_txt[];
extern unsigned short tube_light2_txt[];
extern unsigned short wall13_tw_2_txt[];
extern unsigned short wall17_d_txt[];
extern unsigned short wall_bk1_txt[];
extern unsigned short wall_bk2_txt[];
extern unsigned short wall_br1_txt[];
extern unsigned short wall_gr2_txt[];
extern unsigned short wall_gr4_txt[];
extern unsigned short wall_rf1_txt[];
extern unsigned short wall_rock_2_txt[];
extern unsigned short wall_top_txt[];
extern unsigned short wall_wd1_txt[];
extern unsigned short wall_wd2_txt[];
extern unsigned short wall_wd3_2_txt[];
extern unsigned short wall_wd4_txt[];
extern unsigned short wall_wh1_txt[];
extern unsigned short wave_f1_txt[];
extern unsigned short wave_f2_txt[];
extern unsigned short window_a1_txt[];
extern unsigned short window_a2_txt[];
extern unsigned short window3_txt[];
extern unsigned short road1_txt[];
extern unsigned short sidea1_txt[];
extern unsigned short light_fog1_txt[];
extern unsigned short buoy_l_l_txt[];
extern unsigned short buoy_l_r_txt[];
extern unsigned short buoy_light_txt[];
extern unsigned short bridge1_txt[];
extern unsigned short green1_rgb_txt[];
extern unsigned short roof1_txt[];
extern unsigned short roof2_txt[];
extern unsigned short side1_txt[];
extern unsigned short veranda1_txt[];
extern unsigned short wall10_txt[];
extern unsigned short wall13_txt[];
extern unsigned short wall15_txt[];
extern unsigned short wall16_txt[];
extern unsigned short wall17_txt[];
extern unsigned short wall18_txt[];
extern unsigned short wall2_txt[];
extern unsigned short wall4_txt[];
extern unsigned short wall5_txt[];
extern unsigned short wall6_txt[];
extern unsigned short wall7_txt[];
extern unsigned short wall8_txt[];
extern unsigned short wall9_txt[];
extern unsigned short water1_txt[];
extern unsigned short window1_txt[];
extern unsigned short window2_txt[];
extern unsigned short wlight0_txt[];
extern unsigned short wlight1_txt[];
extern unsigned short wlight2_txt[];
extern unsigned short wlight3_txt[];



#define gs_Nin_LoadTextureImage(timg,fmt,siz,width,height,tmem,tt)	\
	gsDPSetTextureImage(fmt,siz,1,timg),	\
	gsDPTileSync(),	\
	gsDPSetTile(fmt,siz,0,tmem,tt,0,0,0,0,0,0,0),	\
	gsDPLoadSync(),	\
	gsDPLoadBlock(tt,0,0,width*height-1,CALC_DXT(width,siz##_BYTES))

#define gs_Nin_SetUpTileDescrip(fmt,siz,width,height,tmem,tt,cs,ms,ss,ct,mt,st)	\
	gsDPTileSync(),	\
	gsDPSetTile(fmt,siz,((((width)*siz##_LINE_BYTES)+7)>>3),tmem,tt,0,ct,mt,st,cs,ms,ss),	\
	gsDPSetTileSize(tt,0,0,(width-1)<<G_TEXTURE_IMAGE_FRAC,(height-1)<<G_TEXTURE_IMAGE_FRAC)

#define G_CC_PRIMSHADE PRIMITIVE,0,SHADE,0,0,0,0,SHADE

/* main display list */


/* ======== Default ======== */

static	Gfx buoy_light_r_grp_DefaultT[]={

	gs_Nin_SetUpTileDescrip(G_IM_FMT_IA,G_IM_SIZ_16b,16,32,0,0,G_TX_WRAP,4,0,G_TX_CLAMP,5,0),
	gs_Nin_LoadTextureImage(buoy_light_txt,G_IM_FMT_IA,G_IM_SIZ_16b,16,32,0,7),

	gsSPVertex(&buoy_light_r_v[0],8,0),
	gsSP1Quadrangle(0, 1, 2, 3),
	gsSP1Quadrangle(4, 5, 1, 0),
	gsSP1Quadrangle(3, 2, 6, 7),
	gsSP1Quadrangle(7, 6, 5, 4),
	gsSPEndDisplayList(),
}; /* Default */ 

/* ======== db ======== */

Gfx buoy_light_r_modelT[]={
	gsSPDisplayList(buoy_light_r_grp_DefaultT),
	gsSPEndDisplayList(),
}; /* db */ 

/* ======== Default ======== */

static	Gfx buoy_light_r_grp_Default[]={

	gsSPTexture(65535, 65535,0, 0, 1),

	gs_Nin_SetUpTileDescrip(G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,0,G_TX_CLAMP,4,0,G_TX_CLAMP,4,0),
	gs_Nin_LoadTextureImage(buoy_l_r_txt,G_IM_FMT_RGBA,G_IM_SIZ_16b,16,16,0,7),



	gsSPVertex(&buoy_light_r_v[8],12,0),
	gsSP1Quadrangle(0, 1, 2, 3),
	gsSP1Quadrangle(4, 5, 6, 7),
	gsSP1Quadrangle(7, 6, 1, 0),
	gsSP1Quadrangle(8, 9, 10, 11),
	gsSP1Quadrangle(3, 2, 5, 4),
	gsSPEndDisplayList(),
}; /* Default */ 

/* ======== db ======== */

Gfx buoy_light_r_model[]={
	gsSPDisplayList(buoy_light_r_grp_Default),
	gsSPEndDisplayList(),
}; /* db */ 


#undef G_CC_PRIMSHADE

#undef gs_Nin_LoadTextureImage

#undef gs_Nin_SetUpTileDescrip

/* 20 vertices */
Vtx buoy_light_r_v[]={
	{0,500,120,0,4096,0,255,132,121,255},	/* 0 */
	{0,-150,50,0,4096,1024,255,132,121,255},	/* 1 */
	{50,-150,0,0,2560,1024,255,132,121,255},	/* 2 */
	{120,500,0,0,0,0,255,132,121,255},	/* 3 */
	{-120,500,0,0,8192,0,255,132,121,255},	/* 4 */
	{-50,-150,0,0,5632,1024,255,132,121,255},	/* 5 */
	{0,-150,-50,0,4096,1024,255,132,121,255},	/* 6 */
	{0,500,-120,0,4096,0,255,132,121,255},	/* 7 */
	{50,-150,0,0,682,-170,118,-23,0,255},	/* 8 */
	{30,-250,0,0,512,0,118,-23,0,255},	/* 9 */
	{0,-250,-30,0,512,512,0,-23,-118,255},	/* 10 */
	{0,-150,-50,0,682,682,0,-23,-118,255},	/* 11 */
	{-50,-150,0,0,-170,682,-117,-23,0,255},	/* 12 */
	{-30,-250,0,0,0,512,-117,-23,0,255},	/* 13 */
	{0,-250,30,0,0,0,0,-23,117,255},	/* 14 */
	{0,-150,50,0,-170,-170,0,-23,117,255},	/* 15 */
	{50,-150,0,0,42,469,255,255,255,255},	/* 16 */
	{0,-150,-50,0,469,469,255,255,255,255},	/* 17 */
	{-50,-150,0,0,469,42,255,255,255,255},	/* 18 */
	{0,-150,50,0,42,42,255,255,255,255},	/* 19 */
};


/*   0 vertices */
/* 16 x 16  G_IM_SIZ_16b G_IM_FMT_RGBA  */
unsigned short buoy_l_r_txt[] = {
	0x1, 0x1, 0x1, 0x1, 0x41, 0x843, 0x1083, 0x1043, 0x843, 0x883, 0x843, 0x1, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x843, 0x1041, 0x2041, 0x3081, 0x3081, 0x4105, 0x3907, 0x20c5, 0x1043, 0x843, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x841, 0x1841, 0x3081, 0x58c1, 0x7141, 0x7901, 0x8985, 0x8209, 0x5947, 0x4149, 0x2907, 0x1085, 0x1, 0x1, 
	0x1, 0x841, 0x1041, 0x4081, 0x7101, 0x9141, 0xb1c1, 0xca43, 0xca43, 0xca87, 0xaa07, 0x79c7, 0x5189, 0x20c7, 0x841, 0x1, 
	0x1, 0x1041, 0x3081, 0x6901, 0xa181, 0xd241, 0xf2c1, 0xfb01, 0xfb43, 0xfb85, 0xe305, 0xa9c3, 0x6903, 0x3883, 0x1041, 0x41, 
	0x1, 0x1841, 0x50c1, 0x9141, 0xd241, 0xfb41, 0xfb81, 0xfbc1, 0xfbc1, 0xfb81, 0xfb83, 0xe2c5, 0xa183, 0x5901, 0x2041, 0x1083, 
	0x1, 0x2841, 0x6901, 0xa981, 0xeac1, 0xfb41, 0xfc41, 0xfcc1, 0xfcc1, 0xfc81, 0xfb81, 0xfb01, 0xba01, 0x7943, 0x3081, 0x1083, 
	0x801, 0x3081, 0x7901, 0xb9c1, 0xf2c1, 0xfbc1, 0xfcc1, 0xfcc1, 0xfcc1, 0xfcc1, 0xfbc1, 0xfb01, 0xc201, 0x8101, 0x3881, 0x1043, 
	0x801, 0x3081, 0x7901, 0xb9c1, 0xfb01, 0xfbc1, 0xfcc1, 0xfcc1, 0xfcc1, 0xfcc1, 0xfbc1, 0xfb01, 0xb9c1, 0x8101, 0x3881, 0x1041, 
	0x1, 0x2841, 0x6901, 0xa981, 0xf2c1, 0xfc05, 0xfd05, 0xfd03, 0xfcc1, 0xfc41, 0xfb41, 0xf2c1, 0xa981, 0x7101, 0x3081, 0x841, 
	0x1, 0x1841, 0x50c1, 0x9141, 0xd283, 0xfd0d, 0xfd91, 0xfd09, 0xfc01, 0xfb41, 0xfb41, 0xd241, 0x9141, 0x58c1, 0x2041, 0x841, 
	0x1, 0x801, 0x3081, 0x68c1, 0xa183, 0xe38b, 0xfd11, 0xfc49, 0xfb03, 0xf2c1, 0xd241, 0xa181, 0x6901, 0x3081, 0x801, 0x1, 
	0x1, 0x1, 0x1841, 0x3881, 0x68c1, 0x9983, 0xc205, 0xc203, 0xb9c1, 0xa981, 0x9141, 0x6901, 0x3881, 0x1001, 0x1, 0x1, 
	0x1, 0x1, 0x801, 0x1883, 0x3883, 0x50c1, 0x68c1, 0x7901, 0x7901, 0x6901, 0x50c1, 0x3081, 0x1041, 0x801, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x1, 0x1043, 0x2083, 0x2881, 0x3081, 0x3081, 0x2841, 0x1841, 0x801, 0x1, 0x1, 0x1, 0x1, 
	0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x801, 0x801, 0x801, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 
};

#if 0
/* 16 x 32  G_IM_SIZ_16b G_IM_FMT_IA    */
unsigned short buoy_light_txt[] = {
	0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 
	0xff00, 0xff00, 0xff00, 0xff00, 0xff07, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 0xff00, 
	0xff00, 0xff00, 0xff00, 0xff00, 0xff07, 0xff00, 0xff00, 0xff00, 0xff07, 0xff07, 0xff07, 0xff07, 0xff07, 0xff07, 0xff07, 0xff07, 
	0xff0d, 0xff0a, 0xff07, 0xff07, 0xff0a, 0xff0a, 0xff0a, 0xff07, 0xff0d, 0xff0d, 0xff0d, 0xff0d, 0xff0d, 0xff0d, 0xff10, 0xff15, 
	0xff18, 0xff15, 0xff0d, 0xff0d, 0xff15, 0xff18, 0xff18, 0xff13, 0xff13, 0xff13, 0xff13, 0xff13, 0xff13, 0xff18, 0xff1c, 0xff20, 
	0xff22, 0xff1e, 0xff18, 0xff18, 0xff20, 0xff22, 0xff22, 0xff1e, 0xff1e, 0xff1e, 0xff1e, 0xff1c, 0xff1e, 0xff22, 0xff25, 0xff2a, 
	0xff2a, 0xff27, 0xff22, 0xff22, 0xff29, 0xff2c, 0xff2c, 0xff27, 0xff27, 0xff27, 0xff27, 0xff25, 0xff27, 0xff2a, 0xff2e, 0xff35, 
	0xff32, 0xff2f, 0xff2a, 0xff2a, 0xff31, 0xff35, 0xff34, 0xff2f, 0xff32, 0xff31, 0xff2f, 0xff2e, 0xff2f, 0xff32, 0xff3a, 0xff3f, 
	0xff3a, 0xff37, 0xff32, 0xff32, 0xff38, 0xff3f, 0xff3f, 0xff37, 0xff3e, 0xff3c, 0xff3b, 0xff3a, 0xff38, 0xff3c, 0xff44, 0xff48, 
	0xff43, 0xff41, 0xff3c, 0xff3b, 0xff42, 0xff48, 0xff4a, 0xff42, 0xff48, 0xff47, 0xff46, 0xff44, 0xff43, 0xff47, 0xff4e, 0xff51, 
	0xff4d, 0xff4b, 0xff47, 0xff46, 0xff4c, 0xff51, 0xff53, 0xff4c, 0xff4e, 0xff4d, 0xff4c, 0xff4b, 0xff4a, 0xff4d, 0xff54, 0xff57, 
	0xff57, 0xff54, 0xff51, 0xff50, 0xff56, 0xff59, 0xff5b, 0xff56, 0xff54, 0xff53, 0xff52, 0xff51, 0xff50, 0xff53, 0xff5a, 0xff5c, 
	0xff5d, 0xff5c, 0xff58, 0xff56, 0xff5b, 0xff5f, 0xff61, 0xff5d, 0xff5a, 0xff59, 0xff58, 0xff57, 0xff56, 0xff59, 0xff60, 0xff62, 
	0xff63, 0xff62, 0xff5d, 0xff5b, 0xff61, 0xff64, 0xff66, 0xff63, 0xff63, 0xff61, 0xff61, 0xff5c, 0xff5b, 0xff5f, 0xff65, 0xff67, 
	0xff6a, 0xff69, 0xff64, 0xff61, 0xff66, 0xff69, 0xff6b, 0xff6a, 0xff6b, 0xff69, 0xff69, 0xff64, 0xff61, 0xff64, 0xff6a, 0xff6c, 
	0xff6f, 0xff6f, 0xff6b, 0xff66, 0xff6b, 0xff6e, 0xff70, 0xff70, 0xff70, 0xff70, 0xff70, 0xff6c, 0xff69, 0xff6b, 0xff6f, 0xff71, 
	0xff74, 0xff74, 0xff72, 0xff6d, 0xff70, 0xff73, 0xff75, 0xff75, 0xff75, 0xff75, 0xff75, 0xff73, 0xff71, 0xff73, 0xff75, 0xff76, 
	0xff79, 0xff79, 0xff78, 0xff75, 0xff77, 0xff78, 0xff7a, 0xff7a, 0xff7a, 0xff7a, 0xff7a, 0xff78, 0xff78, 0xff78, 0xff7a, 0xff7b, 
	0xff7e, 0xff7e, 0xff7d, 0xff7c, 0xff7c, 0xff7d, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7f, 0xff7d, 0xff7d, 0xff7d, 0xff7f, 0xff80, 
	0xff83, 0xff83, 0xff82, 0xff81, 0xff81, 0xff82, 0xff83, 0xff83, 0xff84, 0xff84, 0xff84, 0xff82, 0xff82, 0xff82, 0xff84, 0xff84, 
	0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff87, 0xff87, 
	0xff8b, 0xff8b, 0xff8b, 0xff8a, 0xff8a, 0xff8a, 0xff8a, 0xff8a, 0xff8b, 0xff8b, 0xff8b, 0xff8b, 0xff8b, 0xff8b, 0xff8b, 0xff8b, 
	0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 
	0xff94, 0xff93, 0xff93, 0xff93, 0xff93, 0xff93, 0xff93, 0xff93, 0xff93, 0xff93, 0xff93, 0xff93, 0xff94, 0xff94, 0xff94, 0xff94, 
	0xff98, 0xff97, 0xff97, 0xff97, 0xff97, 0xff97, 0xff97, 0xff97, 0xff97, 0xff97, 0xff97, 0xff97, 0xff98, 0xff98, 0xff98, 0xff98, 
	0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 
	0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa2, 
	0xffaa, 0xffa9, 0xffa9, 0xffa9, 0xffa9, 0xffa9, 0xffa9, 0xffa9, 0xffaa, 0xffaa, 0xffaa, 0xffaa, 0xffaa, 0xffaa, 0xffaa, 0xffaa, 
	0xffb1, 0xffb1, 0xffb1, 0xffb1, 0xffb1, 0xffb1, 0xffb1, 0xffb1, 0xffb1, 0xffb0, 0xffb0, 0xffb0, 0xffb0, 0xffb0, 0xffb0, 0xffb0, 
	0xffb8, 0xffb8, 0xffb8, 0xffb8, 0xffb8, 0xffb8, 0xffb8, 0xffb8, 0xffb8, 0xffb7, 0xffb7, 0xffb7, 0xffb7, 0xffb7, 0xffb7, 0xffb7, 
	0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 0xffbf, 
	0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 0xffc3, 
};
#endif

