/******************************************************************************** Ultra 64 MARIO Brothers File Select Stage Strategy & main Copyright 1995 Nintendo co., ltd. All rights reserved Junary 8, 1996 ********************************************************************************/ #define PUSH 1 #define NOPUSH 2 #define MODORU8 se8_font1 #define SCOREMIRU8 se8_font2 #define COPYSURU8 se8_font3 #define KESU8 se8_font4 #define MYSCORE 0 #define HISCORE 1 #if ENGLISH static unsigned char se8_font1[] = {f8_R, f8_E, f8_T, f8_U, f8_R, f8_N, 0xff}; // modoru static unsigned char se8_font2[] = {f8_C, f8_H, f8_E, f8_C, f8_K, 0x9e, f8_S, f8_C, f8_O, f8_R, f8_E, 0xff}; //score miru static unsigned char se8_font3[] = {f8_C, f8_O, f8_P, f8_Y, 0x9e, f8_F, f8_I, f8_L, f8_E, 0xff}; //file copy static unsigned char se8_font4[] = {f8_E, f8_R, f8_A, f8_S, f8_E, 0x9e, f8_F, f8_I, f8_L, f8_E, 0xff}; //file remove #elif CHINA static unsigned char se8_font1[] = {0x1, 0x16, 0x1, 0x17, 0xff, 0xff, }; // RETURN static unsigned char se8_font2[] = {0x1, 0x18, 0x1, 0x19, 0x1, 0x2, 0x1, 0x3, 0xff, 0xff, }; // check score static unsigned char se8_font3[] = {0x1, 0x1a, 0x1, 0x1b, 0x1, 0x1c, 0x1, 0x1d, 0xff, 0xff, }; //file copy static unsigned char se8_font4[] = {0x1, 0x1e, 0x1, 0x1f, 0x1, 0x1c, 0x1, 0x1d, 0xff, 0xff, };//file remove #else static unsigned char se8_font1[] = {0x62, 0xf0, 0x53, 0x68, 0xff}; // modoru static unsigned char se8_font2[] = {0x7c, 0x79, 0x70, 0x6c, 0x5f, 0x68,0xff}; //score miru static unsigned char se8_font3[] = {0x8b, 0xd5, 0x71, 0x98, 0x79, 0xf1, 0x8a, 0x9f, 0xff}; //file copy static unsigned char se8_font4[] = {0x8b, 0xd5, 0x71, 0x98, 0x48, 0x4c, 0xff}; //file remove #endif #if ENGLISH static unsigned char se8_SuFont[][8] = { {f8_S, f8_T, f8_E, f8_R, f8_E, f8_O, 0xff}, {f8_M, f8_O, f8_N, f8_O, 0xff}, {f8_H, f8_E, f8_A, f8_D, f8_S, f8_E, f8_T, 0xff}, }; #elif CHINA static unsigned char se8_SuFont[][8] = { {0x1, 0x20, 0x1, 0x21, 0x1, 0x22, 0xff, 0xff, }, // stereo {0x1, 0x23, 0x1, 0x22, 0x1, 0x24, 0xff, 0xff, }, // mono {0x1, 0x25, 0x1, 0x26, 0xff, 0xff, }, // headset }; #else static unsigned char se8_SuFont[][8] = { {k8_su, k8_te,k8_re,k8_o ,0xff}, {k8_mo, k8_no,k8_ra,k8_ru,0xff}, {k8_he,sk8_tu, 0xf0,k8_to,k8_ho,k8_n,0xff}, }; #endif #if ENGLISH static unsigned char s88_marioA[] = {f8_M, f8_A, f8_R, f8_I, f8_O, 0x9e, 0x0a, 0xff}; //marioA static unsigned char s88_marioB[] = {f8_M, f8_A, f8_R, f8_I, f8_O, 0x9e, 0x0b, 0xff}; //marioB static unsigned char s88_marioC[] = {f8_M, f8_A, f8_R, f8_I, f8_O, 0x9e, 0x0c, 0xff}; //marioC static unsigned char s88_marioD[] = {f8_M, f8_A, f8_R, f8_I, f8_O, 0x9e, 0x0d, 0xff}; //marioD #elif CHINA static unsigned char s88_marioA[] = {0x1, 0x3d, 0x1, 0x3e, 0x1, 0x3f,0xff, 0x9e, 0x00, 0x0a, 0xff, 0xff}; //marioA static unsigned char s88_marioB[] = {0x1, 0x3d, 0x1, 0x3e, 0x1, 0x3f, 0xff, 0x9e, 0x00, 0x0b, 0xff, 0xff}; //marioB static unsigned char s88_marioC[] = {0x1, 0x3d, 0x1, 0x3e, 0x1, 0x3f, 0xff, 0x9e, 0x00, 0x0c, 0xff, 0xff}; //marioC static unsigned char s88_marioD[] = {0x1, 0x3d, 0x1, 0x3e, 0x1, 0x3f, 0xff, 0x9e, 0x00, 0x0d, 0xff, 0xff}; //marioD #else static unsigned char s88_marioA[] = {0x8e, 0x97, 0x74, 0x0a, 0xff}; //marioA static unsigned char s88_marioB[] = {0x8e, 0x97, 0x74, 0x0b, 0xff}; //marioB static unsigned char s88_marioC[] = {0x8e, 0x97, 0x74, 0x0c, 0xff}; //marioC static unsigned char s88_marioD[] = {0x8e, 0x97, 0x74, 0x0d, 0xff}; //marioD #endif #if CHINA static unsigned char se16_new[] = {0x7e, 0x7f, 0x82, 0x83, 0xfe, 0x80, 0x81, 0x84, 0x85, 0xff}; //new #else static unsigned char se16_new[] = {23, 14, 32, 0xff}; //new #endif /*------------------------------------------------------------------------------*/ /* Cursol */ /*------------------------------------------------------------------------------*/ /********************************************************************************/ /* Controllar Button Event . */ /********************************************************************************/ static void ContButton(void) { if (selectNo == 7 ||selectNo == 8 ||selectNo == 9 ||selectNo == 10 ) { if (contOr->trigger & (CONT_START+CONT_B) ) { cursol_ptr[0] = (short)cursol_pos[0]; cursol_ptr[1] = (short)cursol_pos[1]; cursol_flag = 1; } else if (contOr->trigger & CONT_A) { score_flag = (1 - score_flag); Na_FixSeFlagEntry(NA_SYS_CLICK); // SendMotorEvent(5,80); /* MOTOR 1997.6.5 */ } #if CHINA else if ((contOr->trigger & CONT_L) || (contOr->trigger & CONT_R)) { pageNo = 1 - pageNo; Na_FixSeFlagEntry(NA_SYS_CLICK); // SendMotorEvent(5,80); /* MOTOR 1997.6.5 */ } #endif } else { if (contOr->trigger & (CONT_A+CONT_START+CONT_B) ) { cursol_ptr[0] = (short)cursol_pos[0]; cursol_ptr[1] = (short)cursol_pos[1]; cursol_flag = 1; } } } /********************************************************************************/ /* Cursol Move Event . */ /********************************************************************************/ static void CursolMove(void) { short stickx = (short)(contOr->stickx); short sticky = (short)(contOr->sticky); if (sticky > -2 && sticky < 2) sticky = 0; if (stickx > -2 && stickx < 2) stickx = 0; cursol_pos[0] += (float)(stickx/8); cursol_pos[1] += (float)(sticky/8); // if (cursol_pos[0] > 120) cursol_pos[0] = 120; // if (cursol_pos[0] < -150) cursol_pos[0] = -150; // if (cursol_pos[1] > 110) cursol_pos[1] = 110; // if (cursol_pos[1] < -90) cursol_pos[1] = -90; if (cursol_pos[0] > 132) cursol_pos[0] = 132; if (cursol_pos[0] < -132) cursol_pos[0] = -132; if (cursol_pos[1] > 90) cursol_pos[1] = 90; if (cursol_pos[1] < -90) cursol_pos[1] = -90; if (cursol_flag == 0) { ContButton(); } // rmonpf(("x %d\n", cursol_ptr[0])); // rmonpf(("y %d\n\n",cursol_ptr[1])); // rmonpf(("x %d\n", (int)(cursol_pos[0])+160)); // rmonpf(("y %d\n\n",(int)(cursol_pos[1])+120)); // rmonpf(("x %d\n", (int)(cursol_pos[0]))); // rmonpf(("y %d\n\n",(int)(cursol_pos[1]))); } /********************************************************************************/ /* Cursol Move Event . */ /********************************************************************************/ static void DrawCursolEvent(void) { CursolMove(); iTranslate(PUSH,(float)((cursol_pos[0]+160) - 5.),(float)((cursol_pos[1]+120) - 25.),0); if (cursol_flag == 0) gSPDisplayList(graphPtr++, RCP_se_cursolA); if (cursol_flag != 0) gSPDisplayList(graphPtr++, RCP_se_cursolB); gSPPopMatrix(graphPtr++,G_MTX_MODELVIEW); if (cursol_flag != 0) { cursol_flag++; if (cursol_flag == 5) cursol_flag = 0; } } /*==============================================================================*/ /* File Select Message */ /*==============================================================================*/ /********************************************************************************/ /* Draw 16bits Special Font . */ /********************************************************************************/ static void Draw16SpecialFont(char code,short posx,short posy,unsigned char* font) { gSPDisplayList(graphPtr++, RCP_tfont2_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value - click_alpha); Draw16bitFont(code, posx, posy,font); gSPDisplayList(graphPtr++, RCP_tfont2_off); } /********************************************************************************/ /* Draw 8bits Special Font . */ /********************************************************************************/ static void Draw8SpecialFont(short posx,short posy,unsigned char* font) { gSPDisplayList(graphPtr++, RCP_mess_font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value - click_alpha); Draw8bitFont(posx,posy,font); gSPDisplayList(graphPtr++, RCP_mess_font_off); } /*==============================================================================*/ /********************************************************************************/ /* Special Font Alpha . */ /********************************************************************************/ static char SpecialFontAlpha(void) { if (click_flag == 1) { click_alpha += 50; if (click_alpha == 250) {click_flag = 0; return(1);} } else { if (click_alpha > 0) click_alpha -= 50; } return(0); } /*==============================================================================*/ /*==============================================================================*/ /* Common Function . */ /*==============================================================================*/ /********************************************************************************/ /* Draw Course Star Number . */ /********************************************************************************/ static void DrawFileStarNum(char player,short posx,short posy) { static unsigned char se16_starnum1[] = {0x35, 0xff}; //star num static unsigned char se16_starnum2[] = {0x32, 0xff}; //star num unsigned char star_num[8]; char flag = 0; if (BuIsActive(player) == 1) { short starNum = BuGetTotalStars(player); Draw16bitFont(2,posx ,posy,se16_starnum1); if (starNum < 100) { Draw16bitFont(2,posx+16,posy,se16_starnum2); flag = 16; } #if CHINA I_itochar_16(starNum,star_num); #else I_itochar(starNum,star_num); #endif Draw16bitFont(2,posx+(16+flag),posy,star_num); } else #if CHINA Draw16bitFont(2,posx-2,posy-5,se16_new); #else Draw16bitFont(2,posx,posy,se16_new); #endif } /*==============================================================================*/ /*==============================================================================*/ /* Print File SelectScene . */ /*==============================================================================*/ //********************************************************************************/ /* Course Select Scene . */ /********************************************************************************/ static void PrintCourseSelectScene(void) { #if ENGLISH static unsigned char se16_font1[] = {f16_S, f16_E, f16_L, f16_E, f16_C, f16_T, 0x9e, f16_F, f16_I, f16_L, f16_E, 0xff}; //file Select static unsigned char se8_font1[] = {f8_S, f8_C, f8_O, f8_R, f8_E, 0xff}; //score static unsigned char se8_font2[] = {f8_C, f8_O, f8_P, f8_Y, 0xff}; //copy static unsigned char se8_font3[] = {f8_E, f8_R, f8_A, f8_S, f8_E, 0xff}; //remove static short ce_posx; #elif CHINA static unsigned char se16_font1[] = {0x96, 0x97, 0x9a, 0x9b, 0x9e, 0x9f, 0xfe, 0x98, 0x99, 0x9c, 0x9d, 0xa0, 0xa1, 0xff}; //file Select static unsigned char se8_font1[] = {0x1, 0x2, 0x1, 0x3, 0xff, 0xff,}; //score static unsigned char se8_font2[] = {0x1, 0x1a, 0x1, 0x1b, 0xff, 0xff,}; //copy static unsigned char se8_font3[] = {0x1, 0x1e, 0x1, 0x1f, 0xff, 0xff,}; //remove static short ce_posx; #else static unsigned char se16_font1[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0xff}; //file Select static unsigned char se8_font1[] = {0x7c, 0x79, 0x70, 0xff}; //score static unsigned char se8_font2[] = {0x79, 0xf1, 0x8a, 0x9f, 0xff}; //copy static unsigned char se8_font3[] = {0x48, 0x4c, 0xff}; //remove static short ce_posx; #endif gSPDisplayList(graphPtr++, RCP_tfont2_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); #if ENGLISH Draw16bitFont(2, 93, 35,se16_font1); #elif CHINA Draw16bitFont(1, 106, 25,se16_font1); #else Draw16bitFont(1, 96, 35,se16_font1); #endif DrawFileStarNum(0, 92, 78); DrawFileStarNum(1, 209, 78); DrawFileStarNum(2, 92, 118); DrawFileStarNum(3, 209 ,118); gSPDisplayList(graphPtr++, RCP_tfont2_off); gSPDisplayList(graphPtr++, RCP_mess_font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); #if ENGLISH || CHINA Draw8bitFont( 50+2,39,se8_font1); #if CHINA Draw8bitFont(113,39,se8_font2); #else Draw8bitFont(115+2,39,se8_font2); #endif Draw8bitFont(180-3,39,se8_font3); ce_posx = CharCentering(254,se8_SuFont[sound_flag],10); Draw8bitFont(ce_posx,39,se8_SuFont[sound_flag]); #else Draw8bitFont( 50,39,se8_font1); Draw8bitFont(115,39,se8_font2); Draw8bitFont(180,39,se8_font3); ce_posx = CharCentering(254,se8_SuFont[sound_flag],10); Draw8bitFont(ce_posx,39,se8_SuFont[sound_flag]); #endif gSPDisplayList(graphPtr++, RCP_mess_font_off); #if CHINA gSPDisplayList(graphPtr++, RCP_mess_font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); Draw8bitFont( 92, 164,s88_marioA); Draw8bitFont(207, 164,s88_marioB); Draw8bitFont( 92, 124,s88_marioC); Draw8bitFont(207, 124,s88_marioD); gSPDisplayList(graphPtr++, RCP_mess_font_off); #else gSPDisplayList(graphPtr++, RCP_s88font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); DrawS88Font( 92, 65,s88_marioA); DrawS88Font(207, 65,s88_marioB); DrawS88Font( 92,105,s88_marioC); DrawS88Font(207,105,s88_marioD); gSPDisplayList(graphPtr++, RCP_s88font_off); #endif // rmonpf(("x->%d y->%d\n",(int)(cursol_pos[0]+160),(int)(cursol_pos[1]+120))); } /*==============================================================================*/ /* Score Scene Data */ /* */ /*==============================================================================*/ /********************************************************************************/ /* Course Score Scene . */ /********************************************************************************/ static void ChangeMessageInScoreScene(char message) { #if ENGLISH static unsigned char se16_font1[] = {f16_C, f16_H, f16_E, f16_C, f16_K, 0x9e, f16_F, f16_I, f16_L, f16_E, 0xff}; //Check Score static unsigned char se8_font1[] = {f8_N, f8_O, 0x9e, f8_S, f8_A, f8_V, f8_E, f8_D, 0x9e, f8_D, f8_A, f8_T, f8_A, 0x9e, f8_E, f8_X, f8_I, f8_S, f8_T, f8_S, 0xff}; //file ni Data ga arimasen switch (message) { case 0: Draw16SpecialFont(2,90+5,35,se16_font1); break; case 1: Draw8SpecialFont(99,190,se8_font1); break; } #elif CHINA static unsigned char se16_font1[] = {0x46, 0x47, 0x4a, 0x4b, 0x4e, 0x4f, 0xfe, 0x48, 0x49, 0x4c, 0x4d, 0x50, 0x51, 0xff}; //Check Score static unsigned char se8_font1[] = {0x1, 0x29, 0x1, 0x2a, 0x1, 0x2b, 0x1, 0x2c, 0x1, 0x1, 0x1, 0x2d, 0x1, 0x2e, 0xff, 0xff,}; //no saved data exits switch (message) { case 0: Draw16SpecialFont(2,106,25,se16_font1); break; case 1: Draw8SpecialFont(99,190,se8_font1); break; } #else static unsigned char se16_font1[] = {0x15,0x16,0x12, 0x09, 0x13, 0x08, 0x14, 0x0d, 0x17, 0xff}; //Score static unsigned char se8_font1[] = {0x8b, 0xd5, 0x71, 0x98, 0x55, 0xf0, 0x82, 0x9f, 0x7f, 0xf0, 0x45, 0x40, 0x67, 0x5e, 0x4d, 0x6d, 0xff}; //file ni Data ga arimasen switch (message) { case 0: Draw16SpecialFont(1,90,35,se16_font1); break; case 1: Draw8SpecialFont(90,190,se8_font1); break; } #endif } /********************************************************************************/ /* Course Score Scene . */ /********************************************************************************/ static void PrintCourseScoreScene(void) { if (click_counter == 20) click_flag = 1; if (SpecialFontAlpha() == 1) { if (click_mess == 0) click_mess = 1; else click_mess = 0; } ChangeMessageInScoreScene(click_mess); gSPDisplayList(graphPtr++, RCP_tfont2_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); DrawFileStarNum(0, 90, 76); DrawFileStarNum(1, 211, 76); DrawFileStarNum(2, 90, 119); DrawFileStarNum(3, 211 ,119); gSPDisplayList(graphPtr++, RCP_tfont2_off); gSPDisplayList(graphPtr++, RCP_mess_font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); #if ENGLISH || CHINA Draw8bitFont( 44,35,MODORU8); Draw8bitFont(135,35,COPYSURU8); Draw8bitFont(231,35,KESU8); #else Draw8bitFont( 45,35,MODORU8); Draw8bitFont(128,35,COPYSURU8); Draw8bitFont(228,35,KESU8); #endif gSPDisplayList(graphPtr++, RCP_mess_font_off); #if CHINA gSPDisplayList(graphPtr++, RCP_mess_font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); Draw8bitFont( 89, 164,s88_marioA); Draw8bitFont(211, 164,s88_marioB); Draw8bitFont( 89, 121,s88_marioC); Draw8bitFont(211, 121,s88_marioD); gSPDisplayList(graphPtr++, RCP_mess_font_off); #else gSPDisplayList(graphPtr++, RCP_s88font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); DrawS88Font( 89, 62,s88_marioA); DrawS88Font(211, 62,s88_marioB); DrawS88Font( 89,105,s88_marioC); DrawS88Font(211,105,s88_marioD); gSPDisplayList(graphPtr++, RCP_s88font_off); #endif // rmonpf(("x->%d y->%d\n",(int)(cursol_pos[0]+160),(int)(cursol_pos[1]+120))); } /*==============================================================================*/ /* Copy Scene Data */ /* */ /*==============================================================================*/ /********************************************************************************/ /* Course Copy Scene . */ /********************************************************************************/ static void ChangeMessageInCopyScene(char message) { #if ENGLISH static unsigned char se16_font1[] = {f16_C, f16_O, f16_P, f16_Y, 0x9e, f16_F, f16_I, f16_L, f16_E, 0xff}; //COPY FILE static unsigned char se8_font1[] = {f8_C, f8_O, f8_P, f8_Y, 0x9e, f8_I, f8_T, 0x9e, f8_T, f8_O, 0x9e, f8_W, f8_H, f8_E, f8_R, f8_E, 0xf4, 0xff}; //COPY IT TO WHERE? static unsigned char se8_font2[] = {f8_N, f8_O, 0x9e, f8_S, f8_A, f8_V, f8_E, f8_D, 0x9e, f8_D, f8_A, f8_T, f8_A, 0x9e, f8_E, f8_X, f8_I, f8_S, f8_T, f8_S, 0xff}; //file ni Data ga arimasen static unsigned char se8_font3[] = {f8_C, f8_O, f8_P, f8_Y, f8_I, f8_N, f8_G, 0x9e, f8_C, f8_O, f8_M, f8_P, f8_L, f8_E, f8_T, f8_E, f8_D, 0xff}; //copy owarimasita static unsigned char se8_font4[] = {f8_S, f8_A, f8_V, f8_E, f8_D, 0x9e, f8_D, f8_A, f8_T, f8_A, 0x9e, f8_E, f8_X, f8_I, f8_T, f8_S, 0xff}; //file ni Data ga haittemasu static unsigned char se8_font5[] = {f8_N, f8_O, 0x9e, f8_E, f8_M, f8_P, f8_T, f8_Y, 0x9e, f8_F, f8_I, f8_L, f8_E, 0xff}; //NO EMPTY FILE #elif CHINA static unsigned char se16_font1[] = {0x52, 0x53, 0x56, 0x57, 0x5a, 0x5b, 0xfe, 0x54, 0x55, 0x58, 0x59, 0x5c, 0x5d, 0xff}; //COPY FILE static unsigned char se8_font1[] = {0x1, 0x1a, 0x1, 0x1b, 0x1, 0x2f, 0x1, 0x30, 0x1, 0x31, 0xff, 0xff, }; //COPY IT TO WHERE? static unsigned char se8_font2[] = {0x1, 0x29, 0x1, 0x2a, 0x1, 0x2b, 0x1, 0x2c, 0x1, 0x1, 0x1, 0x2d, 0x1, 0x2e, 0xff, 0xff,}; //no saved data exists static unsigned char se8_font3[] = {0x1, 0x1a, 0x1, 0x1b, 0x1, 0x32, 0x1, 0x33, 0xff, 0xff,}; //copying completed static unsigned char se8_font4[] = {0x1, 0x2a, 0x1, 0x2b, 0x1, 0x2c, 0x1, 0x1, 0x1, 0x2d, 0x1, 0x2e, 0xff, 0xff, }; //saved data exists static unsigned char se8_font5[] = {0x1, 0x29, 0x1, 0x2a, 0x1, 0x34, 0x1, 0x1c, 0x1, 0x1d, 0xff, 0xff, }; //NO EMPTY FILE #else static unsigned char se16_font1[] = {0x00, 0x01, 0x02, 0x03, 0x09,0x0a, 0x0b, 0x0c, 0x0d, 0xff}; //file Copy suru static unsigned char se8_font1[] = {0xf0, 0x53, 0x49, 0x55, 0x79, 0xf1,0x8a, 0x9f, 0x4b, 0x5e, 0x4c, 0x45, 0xf4, 0xff}; //dokoni copy suru? static unsigned char se8_font2[] = {0x8b, 0xd5, 0x71, 0x98, 0x55, 0xf0, 0x82, 0x9f, 0x7f, 0xf0, 0x45, 0x40, 0x67, 0x5e, 0x4d, 0x6d, 0xff}; //file ni Data ga arimasen static unsigned char se8_font3[] = {0x79, 0xf1, 0x8a, 0x9f, 0x44, 0x6b, 0x67, 0x5e, 0x4b, 0x4f, 0xff}; //copy owarimasita static unsigned char se8_font4[] = {0x8b, 0xd5, 0x71, 0x98, 0x55, 0xf0, 0x82, 0x9f, 0x7f, 0xf0, 0x45, 0x59, 0x41, 0xa1, 0x52, 0x5e, 0x4c, 0xff}; //file ni Data ga haittemasu static unsigned char se8_font5[] = {0x45, 0x66, 0x58, 0x8b, 0xd5, 0x71, 0x98, 0xf0, 0x45, 0x40, 0x67, 0x5e, 0x4d, 0x6d, 0xff}; //karano file ga arimasen #endif #if ENGLISH || CHINA switch (message) { case 0: if (fileFlow_flag == 1) Draw8SpecialFont(119,190,se8_font5); else #if CHINA Draw16SpecialFont(2,104,25,se16_font1); #else Draw16SpecialFont(2,104,35,se16_font1); #endif break; case 1: Draw8SpecialFont(109,190,se8_font1); break; case 2: Draw8SpecialFont(101,190,se8_font2); break; case 3: Draw8SpecialFont(110,190,se8_font3); break; case 4: Draw8SpecialFont(110,190,se8_font4); break; } #else switch (message) { case 0: if (fileFlow_flag == 1) Draw8SpecialFont(90,190,se8_font5); else Draw16SpecialFont(1,90,35,se16_font1); break; case 1: Draw8SpecialFont(90,190,se8_font1); break; case 2: Draw8SpecialFont(90,190,se8_font2); break; case 3: Draw8SpecialFont(90,190,se8_font3); break; case 4: Draw8SpecialFont(90,190,se8_font4); break; } #endif } /********************************************************************************/ /* Course Copy Scene . */ /********************************************************************************/ static void CopySceneMessageEvent(void) { switch(buttonData[5]->bu_mode) { case 0: if (click_counter == 20) click_flag = 1; if (SpecialFontAlpha() == 1) { if (click_mess == 0) click_mess = 2; else click_mess = 0; } break; case 1: if (click_counter == 20 && click_mess == 4 ) click_flag = 1; if (SpecialFontAlpha() == 1) { if (click_mess != 1) click_mess = 1; else click_mess = 4; } break; case 2: if (click_counter == 20) click_flag = 1; if (SpecialFontAlpha() == 1) { if (click_mess != 3) click_mess = 3; else click_mess = 0; } break; } } /********************************************************************************/ /* File Copy Scene . */ /********************************************************************************/ static void PrintFileCopyScene(void) { CopySceneMessageEvent(); ChangeMessageInCopyScene(click_mess); gSPDisplayList(graphPtr++, RCP_tfont2_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); DrawFileStarNum(0, 90, 76); DrawFileStarNum(1, 211, 76); DrawFileStarNum(2, 90, 119); DrawFileStarNum(3, 211 ,119); gSPDisplayList(graphPtr++, RCP_tfont2_off); gSPDisplayList(graphPtr++, RCP_mess_font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); #if ENGLISH || CHINA Draw8bitFont( 44,35,MODORU8); Draw8bitFont(128,35,SCOREMIRU8); Draw8bitFont(230,35,KESU8); #else Draw8bitFont( 45,35,MODORU8); Draw8bitFont(133,35,SCOREMIRU8); Draw8bitFont(230,35,KESU8); #endif gSPDisplayList(graphPtr++, RCP_mess_font_off); #if CHINA gSPDisplayList(graphPtr++, RCP_mess_font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); Draw8bitFont( 89, 164,s88_marioA); Draw8bitFont(211, 164,s88_marioB); Draw8bitFont( 89, 121,s88_marioC); Draw8bitFont(211, 121,s88_marioD); gSPDisplayList(graphPtr++, RCP_mess_font_off); #else gSPDisplayList(graphPtr++, RCP_s88font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); DrawS88Font( 89, 62,s88_marioA); DrawS88Font(211, 62,s88_marioB); DrawS88Font( 89,105,s88_marioC); DrawS88Font(211,105,s88_marioD); gSPDisplayList(graphPtr++, RCP_s88font_off); #endif // rmonpf(("x->%d y->%d\n",(int)(cursol_pos[0]+160),(int)(cursol_pos[1]+120))); } /*==============================================================================*/ /* Remove Scene Data */ /* */ /*==============================================================================*/ /********************************************************************************/ /* Draw Yes No . */ /********************************************************************************/ static void DrawYesNo(short posx,short posy) { short delta = (short)(frameCounter*0x1000); short cur_posx = cursol_pos[0] + (posx+70); short cur_posy = cursol_pos[1] + 120; #if ENGLISH static unsigned char se8_font1[] = {f8_Y, f8_E, f8_S, 0xff}; //hai static unsigned char se8_font2[] = {f8_N, f8_O, 0xff}; //iie #elif CHINA static unsigned char se8_font1[] = {0x1, 0x36, 0xff, 0xff}; //yes static unsigned char se8_font2[] = {0x1, 0x37, 0xff, 0xff}; //no #else static unsigned char se8_font1[] = {0x59, 0x41, 0xff}; //hai static unsigned char se8_font2[] = {0x41, 0x41, 0x43, 0xff}; //iie #endif #if ENGLISH || CHINA #if CHINA if (((cur_posx < 158+15) && (cur_posx > 158-15)) && ((cur_posy < 200+10) && (cur_posy > 200-10))) { #else if (((cur_posx < 154+15) && (cur_posx > 154-15)) && ((cur_posy < 200+10) && (cur_posy > 200-10))) { #endif blink_alpha[0] = 205+sin(delta)*50; blink_alpha[1] = 150; yesNo_flag = 1; } else if (((cur_posx < 203+15) && (cur_posx > 203-15)) && ((cur_posy < 200+10) && (cur_posy > 200-10))) { blink_alpha[0] = 150; blink_alpha[1] = 205+sin(delta)*50; yesNo_flag = 2; } #else if (((cur_posx < 154+10) && (cur_posx > 154-10)) && ((cur_posy < 200+10) && (cur_posy > 200-10))) { blink_alpha[0] = 205+sin(delta)*50; blink_alpha[1] = 150; yesNo_flag = 1; } else if (((cur_posx < 203+10) && (cur_posx > 203-10)) && ((cur_posy < 200+10) && (cur_posy > 200-10))) { blink_alpha[0] = 150; blink_alpha[1] = 205+sin(delta)*50; yesNo_flag = 2; } #endif else { blink_alpha[0] = 150; blink_alpha[1] = 150; yesNo_flag = 0; } if (cursol_flag == 2) { if (yesNo_flag == 1) { Na_FixSeFlagEntry(NA_VC1_DOWN); SendMotorEvent(5,80); /* MOTOR 1997.6.5 */ buttonData[6]->bu_mode = 2; click_flag = 1; click_counter = 0; BuClearStorage(click_file); //Main Copy Function buttonData[click_file+21]->map.shape = stageShapes[S_bg08]; //Change Shape buttonData[click_file]->map.shape = stageShapes[S_bg08]; //Change Shape yesNo_flag = 0; } else if (yesNo_flag == 2) { Na_FixSeFlagEntry(NA_SYS_CLICK); SendMotorEvent(5,80); /* MOTOR 1997.6.5 */ buttonData[click_file+21]->s[state_flag].d = 6; buttonData[6]->bu_mode = 0; click_flag = 1; click_counter = 0; yesNo_flag = 0; } } gSPDisplayList(graphPtr++, RCP_mess_font_on); gDPSetEnvColor(graphPtr++,blink_alpha[0],blink_alpha[0],blink_alpha[0],alpha_value); #if CHINA Draw8bitFont(posx+60,posy,se8_font1); #else Draw8bitFont(posx+56,posy,se8_font1); #endif gDPSetEnvColor(graphPtr++,blink_alpha[1],blink_alpha[1],blink_alpha[1],alpha_value); Draw8bitFont(posx+98,posy,se8_font2); gSPDisplayList(graphPtr++, RCP_mess_font_off); } /********************************************************************************/ /* Remove Data Scene . */ /********************************************************************************/ static void ChangeMessageInRemoveScene(char message) { #if ENGLISH unsigned char se16_font1[] = {f16_E, f16_R, f16_A, f16_S, f16_E, 0x9e, f16_F, f16_I, f16_L, f16_E, 0xff}; //ERASE FILE unsigned char se8_font1[] = {f8_S, f8_U, f8_R, f8_E, 0xf4, 0xff}; //SURE? unsigned char se8_font2[] = {f8_N, f8_O, 0x9e, f8_S, f8_A, f8_V, f8_E, f8_D, 0x9e, f8_D, f8_A, f8_T, f8_A, 0x9e, f8_E, f8_X, f8_I, f8_S, f8_T, f8_S, 0xff}; //file ni Data ga arimasen unsigned char se8_font3[] = {f8_M, f8_A, f8_R, f8_I, f8_O, 0x9e, f8_A, 0x9e, f8_J, f8_U, f8_S, f8_T, 0x9e, f8_E, f8_R, f8_A, f8_S, f8_E, f8_D, 0xff}; //mario x wo kesimasita unsigned char se8_font4[] = {f8_S, f8_A, f8_V, f8_E, f8_D, 0x9e, f8_D, f8_A, f8_T, f8_A, 0x9e, f8_E, f8_X, f8_I, f8_T, f8_S, 0xff}; //file ni Data ga haittemasu switch (message) { case 0: Draw16SpecialFont(2,98,35,se16_font1); break; case 1: Draw8SpecialFont(90,190,se8_font1); DrawYesNo(90,190); break; case 2: Draw8SpecialFont(100,190,se8_font2); break; case 3: se8_font3[6] = click_file + 10; Draw8SpecialFont(100,190,se8_font3); break; case 4: Draw8SpecialFont(100,190,se8_font4); break; } #elif CHINA unsigned char se16_font1[] = {0x5e, 0x5f, 0x62, 0x63, 0x66, 0x67, 0xfe, 0x60, 0x61, 0x64, 0x65, 0x68, 0x69, 0xff}; //ERASE FILE unsigned char se8_font1[] = {0x1, 0x38, 0x1, 0xe, 0x1, 0x39, 0x1, 0x3a, 0xff, 0xff,}; //SURE? unsigned char se8_font2[] = {0x1, 0x29, 0x1, 0x2a, 0x1, 0x2b, 0x1, 0x2c, 0x1, 0x1, 0x1, 0x2d, 0x1, 0x2e, 0xff, 0xff,}; //no saved data exists unsigned char se8_font3[] = {0x1, 0x1c, 0x1, 0x1d, 0x1, 0x3b, 0x1, 0x1e, 0x1, 0x1f, 0xff, 0xff,}; //mario a erased unsigned char se8_font4[] = {0x1, 0x2a, 0x1, 0x2b, 0x1, 0x2c, 0x1, 0x1, 0x1, 0x2d, 0x1, 0x2e, 0xff, 0xff,}; //saved data exists switch (message) { case 0: Draw16SpecialFont(2,106,25,se16_font1); break; case 1: Draw8SpecialFont(90,190,se8_font1); DrawYesNo(90,190); break; case 2: Draw8SpecialFont(100,190,se8_font2); break; case 3: se8_font3[15] = click_file + 10; Draw8SpecialFont(100,190,se8_font3); break; case 4: Draw8SpecialFont(100,190,se8_font4); break; } #else unsigned char se16_font1[] = {0x00, 0x01, 0x02, 0x03, 0x0e, 0x0c, 0xff}; //file Kesu unsigned char se8_font1[] = {0x5d, 0x6d, 0x53, 0xf4, 0xff}; //hont? unsigned char se8_font2[] = {0x8b, 0xd5, 0x71, 0x98, 0x55, 0xf0, 0x82, 0x9f, 0x7f, 0xf0, 0x45, 0x40, 0x67, 0x5e, 0x4d, 0x6d, 0xff}; //file ni Data ga arimasen unsigned char se8_font3[] = {0x8e, 0x97, 0x74, 0x0a, 0x6c, 0x48, 0x4b, 0x5e, 0x4b, 0x4f, 0xff}; //mario x wo kesimasita unsigned char se8_font4[] = {0x8b, 0xd5, 0x71, 0x98, 0x55, 0xf0, 0x82, 0x9f, 0x7f, 0xf0, 0x45, 0x59, 0x41, 0xa1, 0x52, 0x5e, 0x4c, 0xff}; //file ni Data ga haittemasu switch (message) { case 0: Draw16SpecialFont(1,111,35,se16_font1); break; case 1: Draw8SpecialFont(90,190,se8_font1); DrawYesNo(90,190); break; case 2: Draw8SpecialFont(90,190,se8_font2); break; case 3: se8_font3[3] = click_file + 10; Draw8SpecialFont(90,190,se8_font3); break; case 4: Draw8SpecialFont(90,190,se8_font4); break; } #endif } /********************************************************************************/ /* Remove Data Message Event . */ /********************************************************************************/ static void RemoveSceneMessageEvent(void) { switch(buttonData[6]->bu_mode) { case 0: if (click_counter == 20 && click_mess == 2) click_flag = 1; if (SpecialFontAlpha() == 1) { if (click_mess == 0) click_mess = 2; else click_mess = 0; } break; case 1: if (SpecialFontAlpha() == 1) { if (click_mess != 1) click_mess = 1; cursol_pos[0] = 43; cursol_pos[1] = 80; } break; case 2: if (click_counter == 20) click_flag = 1; if (SpecialFontAlpha() == 1) { if (click_mess != 3) click_mess = 3; else click_mess = 0; } break; } } /********************************************************************************/ /* File Remove Scene . */ /********************************************************************************/ static void PrintFileRemoveScene(void) { RemoveSceneMessageEvent(); ChangeMessageInRemoveScene(click_mess); gSPDisplayList(graphPtr++, RCP_tfont2_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); DrawFileStarNum(0, 90, 76); DrawFileStarNum(1, 211, 76); DrawFileStarNum(2, 90, 119); DrawFileStarNum(3, 211 ,119); gSPDisplayList(graphPtr++, RCP_tfont2_off); gSPDisplayList(graphPtr++, RCP_mess_font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); #if ENGLISH Draw8bitFont( 44,35,MODORU8); Draw8bitFont(127,35,SCOREMIRU8); Draw8bitFont(233,35,COPYSURU8); #elif CHINA Draw8bitFont( 45,35,MODORU8); Draw8bitFont(129,35,SCOREMIRU8); Draw8bitFont(228,35,COPYSURU8); #else Draw8bitFont( 45,35,MODORU8); Draw8bitFont(133,35,SCOREMIRU8); Draw8bitFont(223,35,COPYSURU8); #endif gSPDisplayList(graphPtr++, RCP_mess_font_off); #if CHINA gSPDisplayList(graphPtr++, RCP_mess_font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); Draw8bitFont( 89, 164,s88_marioA); Draw8bitFont(211, 164,s88_marioB); Draw8bitFont( 89, 121,s88_marioC); Draw8bitFont(211, 121,s88_marioD); gSPDisplayList(graphPtr++, RCP_mess_font_off); #else gSPDisplayList(graphPtr++, RCP_s88font_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); DrawS88Font( 89, 62,s88_marioA); DrawS88Font(211, 62,s88_marioB); DrawS88Font( 89,105,s88_marioC); DrawS88Font(211,105,s88_marioD); gSPDisplayList(graphPtr++, RCP_s88font_off); #endif // rmonpf(("x->%d y->%d\n",(int)(cursol_pos[0]+160),(int)(cursol_pos[1]+120))); } /*==============================================================================*/ /* Print Sound Select . */ /*==============================================================================*/ //********************************************************************************/ /* Sound Select Scene . */ /********************************************************************************/ static void PrintSoundSelect(void) { int i; short ce_posx; unsigned char alpha_tmp; #if ENGLISH unsigned char se16_font1[] = {f16_S, f16_O, f16_U, f16_N, f16_D, 0x9e, f16_S, f16_E, f16_L, f16_E, f16_C, f16_T, 0xff}; //Sound Select #elif CHINA unsigned char se16_font1[] = {0xa2, 0xa3, 0xa6, 0xa7, 0xaa, 0xab, 0xfe, 0xa4, 0xa5, 0xa8, 0xa9, 0xac, 0xad, 0xff}; //Sound Select #else unsigned char se16_font1[] = {0x18, 0x19, 0x1a, 0x1b, 0x04, 0x05, 0x06, 0x07, 0xff}; //Sound Select #endif gSPDisplayList(graphPtr++, RCP_tfont2_on); gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); #if ENGLISH Draw16bitFont(2, 88, 35,se16_font1); #elif CHINA Draw16bitFont(2, 106, 55,se16_font1); #else Draw16bitFont(1, 96, 35,se16_font1); #endif gSPDisplayList(graphPtr++, RCP_tfont2_off); gSPDisplayList(graphPtr++, RCP_mess_font_on); for (i=0; i<3; i++) { if (sound_flag == i) { gDPSetEnvColor(graphPtr++,255,255,255,alpha_value); } else { gDPSetEnvColor(graphPtr++, 0, 0, 0,alpha_value); } ce_posx = CharCentering(87+74*i,se8_SuFont[i],10); Draw8bitFont(ce_posx, 87,se8_SuFont[i]); } gSPDisplayList(graphPtr++, RCP_mess_font_off); } /*==============================================================================*/ /********************************************************************************/ /* Print 88 ExStar Number . */ /********************************************************************************/ static void DrawExstarNum(char player,short posx,short posy) { unsigned char chara_num[40]; #if CHINA unsigned char s88_Star[] = { 0x00, 0xfa, 0x00, 0xfb, 0xff, 0xff }; #else static unsigned char s88_Star[] = { 0xfa, 0xfb, 0xff,}; #endif #if CHINA Draw8bitFont(posx,posy ,s88_Star); I_itochar(BuGetExtraStars(player),chara_num); Draw8bitFont(posx+16,posy ,chara_num); #else DrawS88Font(posx,posy ,s88_Star); I_itochar(BuGetExtraStars(player),chara_num); DrawS88Font(posx+16,posy ,chara_num); #endif } /********************************************************************************/ /* Print 88 Coin Number . */ /********************************************************************************/ static void Draw88CoinNum(char player,short course,short posx,short posy) { unsigned char chara_num[40]; unsigned char get_starFlag = BuGetStarFlag(player,course); #if CHINA unsigned char s88_Coin[] = { 0x00, 0xf9, 0x00, 0xfb, 0xff, 0xff,}; unsigned char s88_star[] = { 0x00, 0xfa, 0xff, 0xff }; #else unsigned char s88_Coin[] = { 0xf9, 0xfb, 0xff,}; unsigned char s88_star[] = { 0xfa,0xff }; #endif #if ENGLISH unsigned char se88_font[][8] = { //Mario {0x9f, 0x9f, 0x9f, 0x9f, 0xff}, {0x40, 0x41, 0x0a, 0xff}, {0x40, 0x41, 0x0b, 0xff}, {0x40, 0x41, 0x0c, 0xff}, {0x40, 0x41, 0x0d, 0xff}, }; #elif CHINA unsigned char se88_font[][16] = { //Mario {0x00, 0x9f, 0x00, 0x9f, 0x00, 0x9f, 0x00, 0x9f, 0xff, 0xff}, {0x00, 0x40, 0x00, 0x41, 0x00, 0x0a, 0xff, 0xff}, {0x00, 0x40, 0x00, 0x41, 0x00, 0x0b, 0xff, 0xff}, {0x00, 0x40, 0x00, 0x41, 0x00, 0x0c, 0xff, 0xff}, {0x00, 0x40, 0x00, 0x41, 0x00, 0x0d, 0xff, 0xff}, }; #else unsigned char se88_font[][5] = { //Mario {0x9f, 0x9f, 0x9f, 0x9f,0xff}, {0x8e, 0x97, 0x74, 0x0a,0xff}, {0x8e, 0x97, 0x74, 0x0b,0xff}, {0x8e, 0x97, 0x74, 0x0c,0xff}, {0x8e, 0x97, 0x74, 0x0d,0xff}, }; #endif if (score_flag == MYSCORE) { #if CHINA Draw8bitFont(25+posx,posy ,s88_Coin); I_itochar(BuGetNumCoins(player,course),chara_num); Draw8bitFont(25+posx+16,posy ,chara_num); if (get_starFlag & (0x01<<6)) { Draw8bitFont(posx+70,posy,s88_star); } #else DrawS88Font(25+posx,posy ,s88_Coin); I_itochar(BuGetNumCoins(player,course),chara_num); DrawS88Font(25+posx+16,posy ,chara_num); if (get_starFlag & (0x01<<6)) { DrawS88Font(posx+70,posy,s88_star); } #endif } else { #if ENGLISH DrawS88Font(posx+18,posy ,s88_Coin); I_itochar(BuGetHiScore(course),chara_num); DrawS88Font(posx+16+18,posy ,chara_num); DrawS88Font(posx+45+15,posy ,se88_font[BuGetWinner(course)]); #elif CHINA Draw8bitFont(posx+18,posy ,s88_Coin); I_itochar(BuGetHiScore(course),chara_num); Draw8bitFont(posx+16+18,posy ,chara_num); Draw8bitFont(posx+45+15,posy ,se88_font[BuGetWinner(course)]); #else DrawS88Font(posx,posy ,s88_Coin); I_itochar(BuGetHiScore(course),chara_num); DrawS88Font(posx+16,posy ,chara_num); DrawS88Font(posx+45,posy ,se88_font[BuGetWinner(course)]); #endif } } /********************************************************************************/ /* Print 88 Star . */ /********************************************************************************/ #if CHINA static void DrawCourseStar(char player,short course,short posx,short posy) { short i = 0; unsigned char star[40]; unsigned char get_starFlag = BuGetStarFlag(player,course); char star_num = BuGetCourseStars(player,course); if (get_starFlag & (0x01<<6)) { star_num--; } for (i=0; i